fixed up the names of new site names/slices to be more PLC compatible
[sfa.git] / sfa / methods / update.py
1 ### $Id$
2 ### $URL$
3
4 import time
5 from sfa.util.faults import *
6 from sfa.util.method import Method
7 from sfa.util.parameter import Parameter, Mixed
8 from sfa.methods.Update import Update
9
10 class update(Update):
11     """
12     Deprecated. Use Update instead.
13
14     Update an object in the registry. Currently, this only updates the
15     PLC information associated with the record. The SFA fields (name, type,
16     GID) are fixed.
17     
18     @param cred credential string specifying rights of the caller
19     @param record a record dictionary to be updated
20
21     @return 1 if successful, faults otherwise 
22     """
23
24     interfaces = ['registry']
25     
26     accepts = [
27         Parameter(str, "Credential string"),
28         Parameter(dict, "Record dictionary to be updated"),
29         Mixed(Parameter(str, "Human readable name of the original caller"),
30               Parameter(None, "Origin hrn not specified"))
31         ]
32
33     returns = Parameter(int, "1 if successful")
34     
35     def call(self, cred, record_dict, origin_hrn=None):
36         
37         return Update.call(self, record_dict, cred)
38