Added UpdateSliver
authorTony Mack <tmack@cs.princeton.edu>
Tue, 3 Aug 2010 22:37:35 +0000 (22:37 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 3 Aug 2010 22:37:35 +0000 (22:37 +0000)
sfa/methods/UpdateSliver.py [new file with mode: 0644]
sfa/methods/__init__.py

diff --git a/sfa/methods/UpdateSliver.py b/sfa/methods/UpdateSliver.py
new file mode 100644 (file)
index 0000000..4e23aa6
--- /dev/null
@@ -0,0 +1,35 @@
+from sfa.util.faults import *
+from sfa.util.namespace import *
+from sfa.util.method import Method
+from sfa.util.parameter import Parameter, Mixed
+import sys
+from sfa.methods.CreateSliver import CreateSliver
+
+class UpdateSliver(CreateSliver):
+    """
+    Allocate resources to a slice.  This operation is expected to
+    start the allocated resources asynchornously after the operation
+    has successfully completed.  Callers can check on the status of
+    the resources using SliverStatus.
+
+    @param slice_urn (string) URN of slice to allocate to
+    @param credentials ([string]) of credentials
+    @param rspec (string) rspec to allocate
+    
+    """
+    interfaces = ['aggregate', 'slicemgr', 'geni_am']
+    accepts = [
+        Parameter(str, "Slice URN"),
+        Mixed(Parameter(str, "Credential string"),
+              Parameter(type([str]), "List of credentials")),
+        Parameter(str, "RSpec"),
+        Parameter(type([]), "List of user information")
+        ]
+    returns = Parameter(str, "Allocated RSpec")
+
+
+
+    def call(self, slice_xrn, creds, rspec, users):
+
+        return CreateSliver.call(self, slice_xrn, creds, rspec, users)
+    
index 7908086..394f87c 100644 (file)
@@ -29,6 +29,7 @@ remove_peer_object
 GetVersion
 ListResources
 CreateSliver
+UpdateSliver
 get_geni_aggregates
 DeleteSliver
 SliverStatus