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