sfadump more usable
[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 import sys
5 from sfa.methods.CreateSliver import CreateSliver
6
7 class UpdateSliver(CreateSliver):
8     """
9     Allocate resources to a slice.  This operation is expected to
10     start the allocated resources asynchornously after the operation
11     has successfully completed.  Callers can check on the status of
12     the resources using SliverStatus.
13
14     @param slice_urn (string) URN of slice to allocate to
15     @param credentials ([string]) of credentials
16     @param rspec (string) rspec to allocate
17     
18     """
19     interfaces = ['aggregate', 'slicemgr']
20     accepts = [
21         Parameter(str, "Slice URN"),
22         Mixed(Parameter(str, "Credential string"),
23               Parameter(type([str]), "List of credentials")),
24         Parameter(str, "RSpec"),
25         Parameter(type([]), "List of user information")
26         ]
27     returns = Parameter(str, "Allocated RSpec")
28
29
30
31     def call(self, slice_xrn, creds, rspec, users):
32
33         return CreateSliver.call(self, slice_xrn, creds, rspec, users)
34