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 (parent:
151b658
)
added components (get_components) method
author
Tony Mack
<tmack@cs.princeton.edu>
Fri, 20 Nov 2009 01:07:10 +0000
(
01:07
+0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Fri, 20 Nov 2009 01:07:10 +0000
(
01:07
+0000)
sfa/client/sfi.py
patch
|
blob
|
history
diff --git
a/sfa/client/sfi.py
b/sfa/client/sfi.py
index
06b8f05
..
c05625d
100755
(executable)
--- a/
sfa/client/sfi.py
+++ b/
sfa/client/sfi.py
@@
-138,6
+138,7
@@
class Sfi:
"update": "record",
"aggregates": "[name]",
"registries": "[name]",
"update": "record",
"aggregates": "[name]",
"registries": "[name]",
+ "components": "[name]",
"slices": "",
"resources": "[name]",
"create": "name rspec",
"slices": "",
"resources": "[name]",
"create": "name rspec",
@@
-691,6
+692,9
@@
class Sfi:
def aggregates(self, opts, args):
def aggregates(self, opts, args):
+ """
+ return a list of details about known aggregates
+ """
user_cred = self.get_user_cred().save_to_string(save_parents=True)
hrn = None
if args:
user_cred = self.get_user_cred().save_to_string(save_parents=True)
hrn = None
if args:
@@
-704,6
+708,9
@@
class Sfi:
return
def registries(self, opts, args):
return
def registries(self, opts, args):
+ """
+ return a list of details about known registries
+ """
user_cred = self.get_user_cred().save_to_string(save_parents=True)
hrn = None
if args:
user_cred = self.get_user_cred().save_to_string(save_parents=True)
hrn = None
if args:
@@
-715,6
+722,22
@@
class Sfi:
result = self.registry.get_registries(user_cred, hrn, request_hash)
display_list(result)
return
result = self.registry.get_registries(user_cred, hrn, request_hash)
display_list(result)
return
+
+ def components(self, opts, args):
+ """
+ return a list of details about known components
+ """
+ user_cred = self.get_user_cred().save_to_string(save_parents=True)
+ hrn = None
+ if args:
+ hrn = args[0]
+ request_hash=None
+ if self.hashrequest:
+ arg_list = [user_cred, hrn]
+ request_hash = self.key.compute_hash(arg_list)
+ result = self.sm.components(user_cred, hrn, request_hash)
+ display_list(result)
+ return
#
# Slice-related commands
#
# Slice-related commands