clean up
authorMohamed Larabi <mohamed.larabi@inria.fr>
Fri, 3 May 2013 14:31:32 +0000 (16:31 +0200)
committerMohamed Larabi <mohamed.larabi@inria.fr>
Fri, 3 May 2013 14:31:32 +0000 (16:31 +0200)
sfa/methods/ListSlices.py [deleted file]
sfa/methods/RedeemTicket.py [deleted file]

diff --git a/sfa/methods/ListSlices.py b/sfa/methods/ListSlices.py
deleted file mode 100644 (file)
index b196777..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-from sfa.util.method import Method
-
-from sfa.trust.credential import Credential
-from sfa.storage.parameter import Parameter, Mixed
-
-class ListSlices(Method):
-    """
-    List the slices instantiated at this interface       
-
-    @param cred credential string specifying the rights of the caller
-    @return 1 is successful, faults otherwise  
-    """
-
-    interfaces = ['aggregate', 'slicemgr', 'component']
-    
-    accepts = [
-        Mixed(Parameter(str, "Credential string"),
-              Parameter(type([str]), "List of credentials")),
-        Parameter(dict, "options"),
-        ]
-
-    returns = Parameter(list, "List of slice names")
-    
-    def call(self, creds, options):
-        valid_creds = self.api.auth.checkCredentials(creds, 'listslices')
-
-        #log the call
-        origin_hrn = Credential(string=valid_creds[0]).get_gid_caller().get_hrn()
-        self.api.logger.info("interface: %s\tcaller-hrn: %s\tmethod-name: %s"%(self.api.interface, origin_hrn, self.name))
-
-        return self.api.manager.ListSlices(self.api, creds, options)
diff --git a/sfa/methods/RedeemTicket.py b/sfa/methods/RedeemTicket.py
deleted file mode 100644 (file)
index 522ff12..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-from sfa.util.method import Method
-
-from sfa.storage.parameter import Parameter, Mixed
-
-class RedeemTicket(Method):
-    """
-
-    @param cred credential string specifying the rights of the caller
-    @param ticket 
-    @return 1 is successful, faults otherwise  
-    """
-
-    interfaces = ['component']
-    
-    accepts = [
-        Parameter(str, "Ticket  string representation of SFA ticket"),
-        Mixed(Parameter(str, "Credential string"),
-              Parameter(type([str]), "List of credentials")),
-        ]
-
-    returns = [Parameter(int, "1 if successful")]
-    
-    def call(self, ticket, creds):
-        valid_creds = self.api.auth.checkCredentials(cred, 'redeemticket')
-        self.api.auth.check_ticket(ticket)
-
-        # send the call to the right manager
-        self.api.manager.redeem_ticket(self.api, ticket) 
-        return 1