X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=blobdiff_plain;f=sfa%2Fmethods%2FDelete.py;h=74442ce4932bcbe72be25bf52522b6fe442c3919;hp=920425629b05b1b92a384a7dc5e12eed6d877350;hb=fd395e1944dcd49f10a4d5b27ce4983ad389fb96;hpb=00440a7c7e509301cb49db90ff15abc0f479aaf3 diff --git a/sfa/methods/Delete.py b/sfa/methods/Delete.py index 92042562..74442ce4 100644 --- a/sfa/methods/Delete.py +++ b/sfa/methods/Delete.py @@ -1,5 +1,7 @@ from sfa.util.xrn import urn_to_hrn from sfa.util.method import Method +from sfa.util.sfalogging import logger + from sfa.storage.parameter import Parameter, Mixed from sfa.trust.auth import Auth from sfa.trust.credential import Credential @@ -7,11 +9,11 @@ from sfa.trust.credential import Credential class Delete(Method): """ - Remove the slice or slivers and free the allocated resources + Remove the slice or slivers and free the allocated resources @param xrns human readable name of slice to instantiate (hrn or urn) @param creds credential string specifying the rights of the caller - @return 1 is successful, faults otherwise + @return 1 is successful, faults otherwise """ interfaces = ['aggregate', 'slicemgr', 'component'] @@ -26,13 +28,14 @@ class Delete(Method): returns = Parameter(int, "1 if successful") def call(self, xrns, creds, options): - valid_creds = self.api.auth.checkCredentialsSpeaksFor(creds, 'deletesliver', xrns, - check_sliver_callback=self.api.driver.check_sliver_credentials, - options=options) + valid_creds = self.api.auth.checkCredentialsSpeaksFor( + creds, 'deletesliver', xrns, + check_sliver_callback=self.api.driver.check_sliver_credentials, + options=options) # log the call origin_hrn = Credential(cred=valid_creds[0]).get_gid_caller().get_hrn() - self.api.logger.info("interface: %s\tcaller-hrn: %s\ttarget-hrn: %s\tmethod-name: %s" % - (self.api.interface, origin_hrn, xrns, self.name)) + logger.info("interface: %s\tcaller-hrn: %s\ttarget-hrn: %s\tmethod-name: %s" % + (self.api.interface, origin_hrn, xrns, self.name)) return self.api.manager.Delete(self.api, xrns, creds, options)