git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
8db6a89
)
no change - various tweaks here and there
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Wed, 3 Jun 2015 14:14:38 +0000
(16:14 +0200)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Wed, 3 Jun 2015 14:14:38 +0000
(16:14 +0200)
sfa/client/sfi.py
patch
|
blob
|
history
sfa/methods/Describe.py
patch
|
blob
|
history
sfa/planetlab/plaggregate.py
patch
|
blob
|
history
sfa/rspecs/elements/element.py
patch
|
blob
|
history
sfa/rspecs/elements/versions/pgv2SliverType.py
patch
|
blob
|
history
sfa/rspecs/versions/pgv2.py
patch
|
blob
|
history
diff --git
a/sfa/client/sfi.py
b/sfa/client/sfi.py
index
2a3e21f
..
8615e1a
100644
(file)
--- a/
sfa/client/sfi.py
+++ b/
sfa/client/sfi.py
@@
-496,9
+496,9
@@
class Sfi:
#panos: a new option to define the type of information about resources a user is interested in
parser.add_option("-i", "--info", dest="info",
help="optional component information", default=None)
#panos: a new option to define the type of information about resources a user is interested in
parser.add_option("-i", "--info", dest="info",
help="optional component information", default=None)
- # a new option to retr
ei
ve or not reservation-oriented RSpecs (leases)
+ # a new option to retr
ie
ve or not reservation-oriented RSpecs (leases)
parser.add_option("-l", "--list_leases", dest="list_leases", type="choice",
parser.add_option("-l", "--list_leases", dest="list_leases", type="choice",
- help="Retr
eive or not reservation-oriented RSpecs ([resources]|leases|all
)",
+ help="Retr
ieve or not reservation-oriented RSpecs ([resources]|leases|all
)",
choices=("all", "resources", "leases"), default="resources")
choices=("all", "resources", "leases"), default="resources")
diff --git
a/sfa/methods/Describe.py
b/sfa/methods/Describe.py
index
018f803
..
ae198c0
100644
(file)
--- a/
sfa/methods/Describe.py
+++ b/
sfa/methods/Describe.py
@@
-36,9
+36,10
@@
class Describe(Method):
options['geni_rspec_version'] = options['rspec_version']
else:
raise SfaInvalidArgument('Must specify an rspec version option. geni_rspec_version cannot be null')
options['geni_rspec_version'] = options['rspec_version']
else:
raise SfaInvalidArgument('Must specify an rspec version option. geni_rspec_version cannot be null')
- valid_creds = self.api.auth.checkCredentialsSpeaksFor(creds, 'listnodes', urns,
- check_sliver_callback = self.api.driver.check_sliver_credentials,
- options=options)
+ valid_creds = self.api.auth.checkCredentialsSpeaksFor(
+ creds, 'listnodes', urns,
+ check_sliver_callback = self.api.driver.check_sliver_credentials,
+ options=options)
# get hrn of the original caller
origin_hrn = options.get('origin_hrn', None)
# get hrn of the original caller
origin_hrn = options.get('origin_hrn', None)
diff --git
a/sfa/planetlab/plaggregate.py
b/sfa/planetlab/plaggregate.py
index
6fabf79
..
7604758
100644
(file)
--- a/
sfa/planetlab/plaggregate.py
+++ b/
sfa/planetlab/plaggregate.py
@@
-280,16
+280,16
@@
class PlAggregate:
rspec_node['slivers'] = [rspec_sliver]
# slivers always provide the ssh service
rspec_node['slivers'] = [rspec_sliver]
# slivers always provide the ssh service
- login = Login({'authentication': 'ssh-keys',
- 'hostname': sliver['hostname'],
+ login = Login({'authentication': 'ssh-keys',
+ 'hostname': sliver['hostname'],
'port':'22',
'username': sliver['name'],
'login': sliver['name']
})
service = ServicesElement({'login': login,
'port':'22',
'username': sliver['name'],
'login': sliver['name']
})
service = ServicesElement({'login': login,
- 'services_user': sliver['services_user']})
- rspec_node['services'] = [service]
- return rspec_node
+
'services_user': sliver['services_user']})
+ rspec_node['services'] = [service]
+ return rspec_node
def get_slice_tags(self, slice):
slice_tag_ids = []
def get_slice_tags(self, slice):
slice_tag_ids = []
diff --git
a/sfa/rspecs/elements/element.py
b/sfa/rspecs/elements/element.py
index
36ad12f
..
df46c89
100644
(file)
--- a/
sfa/rspecs/elements/element.py
+++ b/
sfa/rspecs/elements/element.py
@@
-19,4
+19,5
@@
class Element(dict):
elif hasattr(self.element, name):
return getattr(self.element, name)
else:
elif hasattr(self.element, name):
return getattr(self.element, name)
else:
- raise AttributeError, "class Element has no attribute %s" % name
+ raise AttributeError("class Element of type {} has no attribute {}"
+ .format(self.__class__.__name__, name))
diff --git
a/sfa/rspecs/elements/versions/pgv2SliverType.py
b/sfa/rspecs/elements/versions/pgv2SliverType.py
index
3ad687f
..
ee9797a
100644
(file)
--- a/
sfa/rspecs/elements/versions/pgv2SliverType.py
+++ b/
sfa/rspecs/elements/versions/pgv2SliverType.py
@@
-38,7
+38,7
@@
class PGv2SliverType:
attrib_elem = xml.add_element('{%s}info' % self.namespaces['flack'])
attrib_dict = eval(tag['value'])
for (key, value) in attrib_dict.items():
attrib_elem = xml.add_element('{%s}info' % self.namespaces['flack'])
attrib_dict = eval(tag['value'])
for (key, value) in attrib_dict.items():
- attrib_elem.set(key, value)
+ attrib_elem.set(key, value)
@staticmethod
def get_slivers(xml, filter=None):
if filter is None: filter={}
@staticmethod
def get_slivers(xml, filter=None):
if filter is None: filter={}
diff --git
a/sfa/rspecs/versions/pgv2.py
b/sfa/rspecs/versions/pgv2.py
index
340e92e
..
01a3155
100644
(file)
--- a/
sfa/rspecs/versions/pgv2.py
+++ b/
sfa/rspecs/versions/pgv2.py
@@
-24,7
+24,8
@@
class PGv2(RSpecVersion):
# Networks
def get_networks(self):
network_names = set()
# Networks
def get_networks(self):
network_names = set()
- nodes = self.xml.xpath('//default:node[@component_manager_id] | //node[@component_manager_id]', namespaces=self.namespaces)
+ nodes = self.xml.xpath('//default:node[@component_manager_id] | //node[@component_manager_id]',
+ namespaces=self.namespaces)
for node in nodes:
if 'component_manager_id' in node.attrib:
network_urn = node.get('component_manager_id')
for node in nodes:
if 'component_manager_id' in node.attrib:
network_urn = node.get('component_manager_id')