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