dismantle legacy scaffolding - 2
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 5 Oct 2010 08:55:38 +0000 (10:55 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 5 Oct 2010 08:55:38 +0000 (10:55 +0200)
sfa/methods/create_slice.py [deleted file]
sfa/methods/delete_slice.py [deleted file]
sfa/methods/get_credential.py [deleted file]
sfa/methods/get_gids.py [deleted file]
sfa/methods/get_resources.py [deleted file]
sfa/methods/get_self_credential.py [deleted file]
sfa/methods/get_slices.py [deleted file]
sfa/methods/get_ticket.py [deleted file]
sfa/methods/redeem_ticket.py [deleted file]
sfa/methods/start_slice.py [deleted file]
sfa/methods/stop_slice.py [deleted file]

diff --git a/sfa/methods/create_slice.py b/sfa/methods/create_slice.py
deleted file mode 100644 (file)
index e7dc111..0000000
+++ /dev/null
@@ -1,35 +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.CreateSliver import CreateSliver
-
-class create_slice(CreateSliver):
-    """
-    Deprecated. Use CreateSliver instead.
-    Instantiate the specified slice according to whats defined in the specified rspec      
-
-    @param cred credential string specifying the rights of the caller
-    @param hrn human readable name of slice to instantiate (hrn or xrn)
-    @param rspec resource specification
-    @return 1 is successful, faults otherwise  
-    """
-
-    interfaces = ['aggregate', 'slicemgr']
-    
-    accepts = [
-        Parameter(str, "Credential string"),
-        Parameter(str, "Human readable name of slice to instantiate (hrn or xrn)"),
-        Parameter(str, "Resource specification"),
-        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, xrn, requested_rspec, origin_hrn=None):
-
-        return CreateSliver.call(self, xrn, cred, requested_rspec, []) 
diff --git a/sfa/methods/delete_slice.py b/sfa/methods/delete_slice.py
deleted file mode 100644 (file)
index 5a6b015..0000000
+++ /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.methods.DeleteSliver import DeleteSliver
-
-class delete_slice(DeleteSliver):
-    """
-    Deprecated. Use delete instead.
-
-    Remove the slice from all nodes.      
-
-    @param cred credential string specifying the rights of the caller
-    @param xrn human readable name specifying the slice to delete (hrn or urn)
-    @return 1 if successful, faults otherwise  
-    """
-
-    interfaces = ['aggregate', 'slicemgr', 'component']
-    
-    accepts = [
-        Parameter(str, "Credential string"),
-        Parameter(str, "Human readable name of slice to delete (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, xrn, origin_hrn=None):
-
-        return DeleteSliver.call(self, xrn, cred)
diff --git a/sfa/methods/get_credential.py b/sfa/methods/get_credential.py
deleted file mode 100644 (file)
index 51f4410..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-### $Id$
-### $URL$
-
-from sfa.trust.credential import *
-from sfa.trust.rights import *
-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.GetCredential import GetCredential
-
-class get_credential(GetCredential):
-    """
-    Deprecated. Use GetCredential instead.
-
-    Retrive a credential for an object
-    If cred == Nonee then the behavior reverts to get_self_credential
-
-    @param cred credential object specifying rights of the caller
-    @param type type of object (user | slice | sa | ma | node)
-    @param hrn human readable name of object (hrn or urn)
-
-    @return the string representation of a credential object  
-    """
-
-    interfaces = ['registry']
-    
-    accepts = [
-        Mixed(Parameter(str, "credential"),
-              Parameter(None, "No credential")),  
-        Parameter(str, "Human readable name (hrn or urn)")
-        ]
-
-    returns = Parameter(str, "String representation of a credential object")
-
-    def call(self, cred, type, xrn, origin_hrn=None):
-        return GetCredential.call(self, cred, xrn, type)
diff --git a/sfa/methods/get_gids.py b/sfa/methods/get_gids.py
deleted file mode 100644 (file)
index c54af0a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-from sfa.util.faults import *
-from sfa.util.method import Method
-from sfa.util.parameter import Parameter, Mixed
-from sfa.methods.GetGids import GetGids
-
-class get_gids(GetGids):
-    """
-    Deprecated. Use GetGids instead.
-
-    Get a list of record information (hrn, gid and type) for 
-    the specified hrns.
-
-    @param cred credential string 
-    @param cert certificate string 
-    @return    
-    """
-
-    interfaces = ['registry']
-    
-    accepts = [
-        Parameter(str, "Certificate string"),
-        Mixed(Parameter(str, "Human readable name (hrn or xrn)"), 
-              Parameter(type([str]), "List of Human readable names (hrn or xrn)")) 
-        ]
-
-    returns = [Parameter(dict, "Dictionary of gids keyed on hrn")]
-    
-    def call(self, cred, xrns):
-        
-        return GetGids.call(self, xrns, cred)     
diff --git a/sfa/methods/get_resources.py b/sfa/methods/get_resources.py
deleted file mode 100644 (file)
index 8ebebcd..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-### $Id$
-### $URL$
-
-from sfa.util.faults import *
-from sfa.util.method import Method
-from sfa.util.parameter import Parameter, Mixed
-from sfa.methods.ListResources import ListResources 
-# RSpecManager_pl is not used. This line is a check that ensures that everything is in place for the import to work.
-import sfa.rspecs.aggregates.rspec_manager_pl
-
-class get_resources(ListResources):
-    """
-    Deprecated. Use ListResources instead. 
-
-    Get an resource specification (rspec). The rspec may describe the resources
-    available at an authority or the resources being used by a slice.      
-
-    @param cred credential string specifying the rights of the caller
-    @param hrn human readable name of the slice we are interesed in or None 
-           for an authority.  
-    """
-
-    interfaces = ['aggregate', 'slicemgr']
-    
-    accepts = [
-        Parameter(str, "Credential string"),
-        Mixed(Parameter(str, "Human readable name (hrn or urn)"),
-              Parameter(None, "hrn not specified")),
-        Mixed(Parameter(str, "Human readable name of the original caller"),
-              Parameter(None, "Origin hrn not specified"))
-        ]
-
-    returns = Parameter(str, "String representatin of an rspec")
-    
-    def call(self, cred, xrn=None, origin_hrn=None):
-        options = {'geni_slice_urn': xrn,
-                   'origin_hrn': origin_hrn
-        }
-                  
-        return ListResources.call(self, cred, options)
diff --git a/sfa/methods/get_self_credential.py b/sfa/methods/get_self_credential.py
deleted file mode 100644 (file)
index 97e7052..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-### $Id: get_credential.py 15321 2009-10-15 05:01:21Z tmack $
-### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfa/methods/get_credential.py $
-
-from sfa.trust.credential import *
-from sfa.trust.rights import *
-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.GetSelfCredential import GetSelfCredential
-
-class get_self_credential(GetSelfCredential):
-    """
-    Deprecated. Use GetSelfCredential instead.
-
-    Retrive a credential for an object
-    @param cert certificate string 
-    @param type type of object (user | slice | sa | ma | node)
-    @param hrn human readable name of object (hrn or urn)
-
-    @return the string representation of a credential object  
-    """
-
-    interfaces = ['registry']
-    
-    accepts = [
-        Parameter(str, "Human readable name (hrn or urn)"),
-        Parameter(str, "certificate"),
-        Mixed(Parameter(str, "Request hash"),
-              Parameter(None, "Request hash not specified"))
-        ]
-
-    returns = Parameter(str, "String representation of a credential object")
-
-    def call(self, cert, type, xrn, origin_hrn=None):
-        """
-        get_self_credential a degenerate version of get_credential used by a client
-        to get his initial credential when de doesnt have one. This is the same as
-        get_credetial(..., cred = None, ...)
-
-        The registry ensures that the client is the principal that is named by
-        (type, name) by comparing the public key in the record's  GID to the
-        private key used to encrypt the client side of the HTTPS connection. Thus
-        it is impossible for one principal to retrive another principal's
-        credential without having the appropriate private key.
-
-        @param type type of object (user | slice | sa | ma | node)
-        @param hrn human readable name of authority to list
-        @return string representation of a credential object
-        """
-        return GetSelfCredential.call(self, cert, xrn, type)
diff --git a/sfa/methods/get_slices.py b/sfa/methods/get_slices.py
deleted file mode 100644 (file)
index 87aad94..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-### $Id$
-### $URL$
-
-from sfa.util.faults import *
-from sfa.util.method import Method
-from sfa.util.parameter import Parameter, Mixed
-from sfa.methods.ListSlices import ListSlices
-
-class get_slices(ListSlices):
-    """
-    Deprecated. Use ListSlices instead.
-    Get a list of instantiated slices at this authority.      
-
-    @param cred credential string specifying the rights of the caller
-    @return list of human readable slice names (hrn).  
-    """
-
-    interfaces = ['aggregate', 'slicemgr', 'component']
-    
-    accepts = [
-        Parameter(str, "Credential string"),
-        Mixed(Parameter(str, "Human readable name of the original caller"),
-              Parameter(None, "Origin hrn not specified"))
-        ]
-
-    returns = [Parameter(str, "Human readable slice name (hrn)")]
-    
-    def call(self, cred, origin_hrn=None):
-
-        return ListSlices.call(self, cred)
diff --git a/sfa/methods/get_ticket.py b/sfa/methods/get_ticket.py
deleted file mode 100644 (file)
index 1a215ea..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-### $Id$
-### $URL$
-import time
-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.GetTicket import GetTicket
-
-class get_ticket(GetTicket):
-    """
-    Deprecated. Use GetTicket instead.
-
-    Retrieve a ticket. This operation is currently implemented on PLC
-    only (see SFA, engineering decisions); it is not implemented on
-    components.
-    
-    The ticket is filled in with information from the PLC database. This
-    information includes resources, and attributes such as user keys and
-    initscripts.
-    
-    @param cred credential string
-    @param name name of the slice to retrieve a ticket for (hrn or urn)
-    @param rspec resource specification dictionary
-    
-    @return the string representation of a ticket object
-    """
-
-    interfaces = ['aggregate', 'slicemgr']
-    
-    accepts = [
-        Parameter(str, "Credential string"),
-        Parameter(str, "Human readable name of slice to retrive a ticket for (hrn or urn)"),
-        Parameter(str, "Resource specification (rspec)"),
-        Mixed(Parameter(str, "Human readable name of the original caller"),
-              Parameter(None, "Origin hrn not specified"))
-        ]
-
-    returns = Parameter(str, "String represeneation of a ticket object")
-    
-    def call(self, cred, xrn, rspec, origin_hrn=None):
-        
-        return GetTicket.call(self, xrn, cred, rspec, None)        
diff --git a/sfa/methods/redeem_ticket.py b/sfa/methods/redeem_ticket.py
deleted file mode 100644 (file)
index 82985e7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-### $Id: reset_slice.py 15428 2009-10-23 15:28:03Z tmack $
-### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfacomponent/methods/reset_slice.py $
-import xmlrpclib
-from sfa.util.faults import *
-from sfa.util.method import Method
-from sfa.util.parameter import Parameter, Mixed
-from sfa.methods.RedeemTicket import RedeemTicket
-
-class redeem_ticket(RedeemTicket):
-    """
-    Deprecated. Use RedeemTicket instead.
-
-    Redeem a approved set of resource allocations (ticket).        
-
-    @param cred credential string specifying the rights of the caller
-    @param ticket 
-    @return 1 is successful, faults otherwise  
-    """
-
-    interfaces = ['component']
-    
-    accepts = [
-        Parameter(str, "Credential string representation of SFA credential"),
-        Parameter(str, "Ticket  string representation of SFA ticket")
-        ]
-
-    returns = [Parameter(int, "1 if successful")]
-    
-    def call(self, cred, ticket):
-
-        return RedeemTicket.call(self, ticket, cred)  
diff --git a/sfa/methods/start_slice.py b/sfa/methods/start_slice.py
deleted file mode 100644 (file)
index cd4bd5f..0000000
+++ /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.methods.Start import Start
-
-class start_slice(Start):
-    """
-    Deprecated. Use Start instead
-
-    Start the specified slice      
-
-    @param cred credential string specifying the rights of the caller
-    @param hrn human readable name of slice to instantiate (urn or hrn)
-    @return 1 is successful, faults otherwise  
-    """
-
-    interfaces = ['aggregate', 'slicemgr', 'component']
-    
-    accepts = [
-        Parameter(str, "Credential string"),
-        Parameter(str, "Human readable name of slice to instantiate (urn or hrn)"),
-        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, xrn, origin_hrn=None):
-        return Start.call(self, xrn, cred) 
diff --git a/sfa/methods/stop_slice.py b/sfa/methods/stop_slice.py
deleted file mode 100644 (file)
index 14d17f2..0000000
+++ /dev/null
@@ -1,33 +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.Stop import Stop
-
-class stop_slice(Stop):
-    """
-    Deprecated. Use Stop instead
-    Stop the specified slice      
-
-    @param cred credential string specifying the rights of the caller
-    @param xrn human readable name of slice to instantiate (hrn or urn)
-    @return 1 is successful, faults otherwise  
-    """
-
-    interfaces = ['aggregate', 'slicemgr', 'component']
-    
-    accepts = [
-        Parameter(str, "Credential string"),
-        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, xrn, origin_hrn=None):
-        return Stop.call(self, xrn, cred)