fixed up the names of new site names/slices to be more PLC compatible
[sfa.git] / sfa / methods / create_slice.py
1 ### $Id$
2 ### $URL$
3
4 from sfa.util.faults import *
5 from sfa.util.namespace import *
6 from sfa.util.method import Method
7 from sfa.util.parameter import Parameter, Mixed
8 from sfa.methods.CreateSliver import CreateSliver
9
10 class create_slice(CreateSliver):
11     """
12     Deprecated. Use CreateSliver instead.
13     Instantiate the specified slice according to whats defined in the specified rspec      
14
15     @param cred credential string specifying the rights of the caller
16     @param hrn human readable name of slice to instantiate (hrn or xrn)
17     @param rspec resource specification
18     @return 1 is successful, faults otherwise  
19     """
20
21     interfaces = ['aggregate', 'slicemgr']
22     
23     accepts = [
24         Parameter(str, "Credential string"),
25         Parameter(str, "Human readable name of slice to instantiate (hrn or xrn)"),
26         Parameter(str, "Resource specification"),
27         Mixed(Parameter(str, "Human readable name of the original caller"),
28               Parameter(None, "Origin hrn not specified"))
29         ]
30
31     returns = Parameter(int, "1 if successful")
32         
33     def call(self, cred, xrn, requested_rspec, origin_hrn=None):
34
35         return CreateSliver.call(self, xrn, cred, requested_rspec, [])