From: Thierry Parmentelat Date: Tue, 5 Oct 2010 07:48:12 +0000 (+0200) Subject: dismantle legacy scaffolding - 1 X-Git-Tag: sfa-1.0-2~9^2~7 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=e3d327774e97718e80dbe4b8f2623be819935fb7 dismantle legacy scaffolding - 1 --- diff --git a/sfa/methods/list.py b/sfa/methods/list.py deleted file mode 100644 index 206b5a52..00000000 --- a/sfa/methods/list.py +++ /dev/null @@ -1,34 +0,0 @@ -### $Id$ -### $URL$ - -from sfa.util.faults import * -from sfa.util.namespace import * -from sfa.util.method import Method -from sfa.util.parameter import Parameter, Mixed -from sfa.util.record import SfaRecord -from sfa.methods.List import List - -class list(List): - """ - Deprecated. Use List instead. - - List the records in an authority. - - @param cred credential string specifying the rights of the caller - @param hrn human readable name of authority to list (hrn or urn) - @return list of record dictionaries - """ - interfaces = ['registry'] - - accepts = [ - Parameter(str, "Credential string"), - Parameter(str, "Human readable name (hrn or urn)"), - Mixed(Parameter(str, "Human readable name of the original caller"), - Parameter(None, "Origin hrn not specified")) - ] - - returns = [SfaRecord] - - def call(self, cred, xrn, origin_hrn=None): - - return List.call(self, xrn, cred) diff --git a/sfa/methods/register.py b/sfa/methods/register.py deleted file mode 100644 index 494b969c..00000000 --- a/sfa/methods/register.py +++ /dev/null @@ -1,36 +0,0 @@ -### $Id$ -### $URL$ - -from sfa.trust.certificate import Keypair, convert_public_key -from sfa.trust.gid import * -from sfa.util.faults import * -from sfa.util.method import Method -from sfa.util.parameter import Parameter, Mixed -from sfa.methods.Register import Register - -class register(Register): - """ - Deprecated. Used Register instead. - - Register an object with the registry. In addition to being stored in the - SFA database, the appropriate records will also be created in the - PLC databases - - @param cred credential string - @param record_dict dictionary containing record fields - - @return gid string representation - """ - - interfaces = ['registry'] - - accepts = [ - Parameter(str, "Credential string"), - Parameter(dict, "Record dictionary containing record fields") - ] - - returns = Parameter(int, "String representation of gid object") - - def call(self, cred, record, origin_hrn=None): - - return Register.call(self, record, cred) diff --git a/sfa/methods/remove.py b/sfa/methods/remove.py deleted file mode 100644 index 3419603d..00000000 --- a/sfa/methods/remove.py +++ /dev/null @@ -1,38 +0,0 @@ -### $Id$ -### $URL$ - -from sfa.util.faults import * -from sfa.util.namespace import * -from sfa.util.method import Method -from sfa.util.parameter import Parameter, Mixed -from sfa.methods.Remove import Remove - -class remove(Remove): - """ - Deprecated. Use Remove instead. - - Remove an object from the registry. If the object represents a PLC object, - then the PLC records will also be removed. - - @param cred credential string - @param type record type - @param xrn human readable name of record to remove (hrn or urn) - - @return 1 if successful, faults otherwise - """ - - interfaces = ['registry'] - - accepts = [ - Parameter(str, "Credential string"), - Parameter(str, "Record type"), - Parameter(str, "Human readable name of slice to instantiate (hrn or urn)"), - Mixed(Parameter(str, "Human readable name of the original caller"), - Parameter(None, "Origin hrn not specified")) - ] - - returns = Parameter(int, "1 if successful") - - def call(self, cred, type, xrn, origin_hrn=None): - - return Remove.call(self, xrn, cred, type) diff --git a/sfa/methods/resolve.py b/sfa/methods/resolve.py deleted file mode 100644 index d26625e4..00000000 --- a/sfa/methods/resolve.py +++ /dev/null @@ -1,36 +0,0 @@ -### $Id$ -### $URL$ -import traceback -import types -from sfa.util.faults import * -from sfa.util.namespace import * -from sfa.util.method import Method -from sfa.util.parameter import Parameter, Mixed -from sfa.util.record import SfaRecord -from sfa.methods.Resolve import Resolve - -class resolve(Resolve): - """ - Deprecated. Use Resolve instead - Resolve a record. - - @param cred credential string authorizing the caller - @param hrn human readable name to resolve (hrn or urn) - @return a list of record dictionaries or empty list - """ - - interfaces = ['registry'] - - accepts = [ - Parameter(str, "Credential string"), - Mixed(Parameter(str, "Human readable name (hrn or urn)"), - Parameter(list, "List of Human readable names ([hrn])")) - ] - - returns = [SfaRecord] - - def call(self, cred, xrns, origin_hrn=None): - return Resolve.call(self, xrns, cred) - - - diff --git a/sfa/methods/update.py b/sfa/methods/update.py deleted file mode 100644 index 861bb09f..00000000 --- a/sfa/methods/update.py +++ /dev/null @@ -1,38 +0,0 @@ -### $Id$ -### $URL$ - -import time -from sfa.util.faults import * -from sfa.util.method import Method -from sfa.util.parameter import Parameter, Mixed -from sfa.methods.Update import Update - -class update(Update): - """ - Deprecated. Use Update instead. - - Update an object in the registry. Currently, this only updates the - PLC information associated with the record. The SFA fields (name, type, - GID) are fixed. - - @param cred credential string specifying rights of the caller - @param record a record dictionary to be updated - - @return 1 if successful, faults otherwise - """ - - interfaces = ['registry'] - - accepts = [ - Parameter(str, "Credential string"), - Parameter(dict, "Record dictionary to be updated"), - Mixed(Parameter(str, "Human readable name of the original caller"), - Parameter(None, "Origin hrn not specified")) - ] - - returns = Parameter(int, "1 if successful") - - def call(self, cred, record_dict, origin_hrn=None): - - return Update.call(self, record_dict, cred) -