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