git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'geni-v3' of ssh://git.onelab.eu/git/sfa into geni-v3
[sfa.git]
/
sfa
/
nitos
/
nitosslices.py
diff --git
a/sfa/nitos/nitosslices.py
b/sfa/nitos/nitosslices.py
index
2edd209
..
875a5a9
100644
(file)
--- a/
sfa/nitos/nitosslices.py
+++ b/
sfa/nitos/nitosslices.py
@@
-7,7
+7,7
@@
from sfa.util.xrn import Xrn, get_leaf, get_authority, urn_to_hrn
from sfa.rspecs.rspec import RSpec
from sfa.rspecs.rspec import RSpec
-from sfa.nitos.nitosxrn import NitosXrn, hrn_to_nitos_slicename, xrn_to_hostname
+from sfa.nitos.nitosxrn import NitosXrn, hrn_to_nitos_slicename, xrn_to_hostname
, xrn_to_channel
MAXINT = 2L**31-1
MAXINT = 2L**31-1
@@
-96,7
+96,7
@@
class NitosSlices:
slice_name = hrn_to_nitos_slicename(channel['slice_id'])
if slice_name != slice['slice_name']:
continue
slice_name = hrn_to_nitos_slicename(channel['slice_id'])
if slice_name != slice['slice_name']:
continue
- channel_num =
channel['channel_num']
+ channel_num =
xrn_to_channel(channel['component_id'])
nitos_channel = self.driver.filter_nitos_results(nitos_channels, {'channel': channel_num})[0]
# fill the requested channel with nitos ids
requested_channel['slice_id'] = slice['slice_id']
nitos_channel = self.driver.filter_nitos_results(nitos_channels, {'channel': channel_num})[0]
# fill the requested channel with nitos ids
requested_channel['slice_id'] = slice['slice_id']
@@
-153,7
+153,8
@@
class NitosSlices:
- def verify_slice(self, slice_hrn, slice_record, sfa_peer, options={}):
+ def verify_slice(self, slice_hrn, slice_record, sfa_peer, options=None):
+ if options is None: options={}
slicename = hrn_to_nitos_slicename(slice_hrn)
slices = self.driver.shell.getSlices({}, [])
slices = self.driver.filter_nitos_results(slices, {'slice_name': slicename})
slicename = hrn_to_nitos_slicename(slice_hrn)
slices = self.driver.shell.getSlices({}, [])
slices = self.driver.filter_nitos_results(slices, {'slice_name': slicename})
@@
-168,7
+169,8
@@
class NitosSlices:
return slice
return slice
- def verify_users(self, slice_hrn, slice_record, users, sfa_peer, options={}):
+ def verify_users(self, slice_hrn, slice_record, users, sfa_peer, options=None):
+ if options is None: options={}
# get slice info
slicename = hrn_to_nitos_slicename(slice_hrn)
slices = self.driver.shell.getSlices({}, [])
# get slice info
slicename = hrn_to_nitos_slicename(slice_hrn)
slices = self.driver.shell.getSlices({}, [])
@@
-204,7
+206,8
@@
class NitosSlices:
return added_users
return added_users
- def verify_keys(self, persons, users, options={}):
+ def verify_keys(self, persons, users, options=None):
+ if options is None: options={}
# existing keys
key_ids = []
for person in persons:
# existing keys
key_ids = []
for person in persons: