fixed up the names of new site names/slices to be more PLC compatible
[sfa.git] / sfa / methods / remove.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.Remove import Remove
9
10 class remove(Remove):
11     """
12     Deprecated. Use Remove instead.
13
14     Remove an object from the registry. If the object represents a PLC object,
15     then the PLC records will also be removed.
16     
17     @param cred credential string
18     @param type record type
19     @param xrn human readable name of record to remove (hrn or urn)
20
21     @return 1 if successful, faults otherwise 
22     """
23
24     interfaces = ['registry']
25     
26     accepts = [
27         Parameter(str, "Credential string"),
28         Parameter(str, "Record type"),
29         Parameter(str, "Human readable name of slice to instantiate (hrn or urn)"),
30         Mixed(Parameter(str, "Human readable name of the original caller"),
31               Parameter(None, "Origin hrn not specified"))
32         ]
33
34     returns = Parameter(int, "1 if successful")
35     
36     def call(self, cred, type, xrn, origin_hrn=None):
37         
38         return Remove.call(self, xrn, cred, type)