37252f20d623a843e254953d84b09f53e9a5df72
[sfa.git] / sfa / methods / UpdateSliver.py
1 from sfa.util.faults import *
2 from sfa.util.namespace import *
3 from sfa.util.method import Method
4 from sfa.util.parameter import Parameter, Mixed
5 import sys
6 from sfa.methods.CreateSliver import CreateSliver
7
8 class UpdateSliver(CreateSliver):
9     """
10     Allocate resources to a slice.  This operation is expected to
11     start the allocated resources asynchornously after the operation
12     has successfully completed.  Callers can check on the status of
13     the resources using SliverStatus.
14
15     @param slice_urn (string) URN of slice to allocate to
16     @param credentials ([string]) of credentials
17     @param rspec (string) rspec to allocate
18     
19     """
20     interfaces = ['aggregate', 'slicemgr']
21     accepts = [
22         Parameter(str, "Slice URN"),
23         Mixed(Parameter(str, "Credential string"),
24               Parameter(type([str]), "List of credentials")),
25         Parameter(str, "RSpec"),
26         Parameter(type([]), "List of user information")
27         ]
28     returns = Parameter(str, "Allocated RSpec")
29
30
31
32     def call(self, slice_xrn, creds, rspec, users):
33
34         return CreateSliver.call(self, slice_xrn, creds, rspec, users)
35