X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FStatus.py;h=577d1b7dee22eeaec26174ec383fd19285661c45;hb=fd395e1944dcd49f10a4d5b27ce4983ad389fb96;hp=164093e764066bee958d1505bd34ed781d13453a;hpb=b54e90d0c3868fa5afb89ff784cba0d5d36265ad;p=sfa.git diff --git a/sfa/methods/Status.py b/sfa/methods/Status.py index 164093e7..577d1b7d 100644 --- a/sfa/methods/Status.py +++ b/sfa/methods/Status.py @@ -1,27 +1,31 @@ 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 + class Status(Method): """ Get the status of a sliver - + @param slice_urn (string) URN of slice to allocate to - + """ interfaces = ['aggregate', 'slicemgr', 'component'] accepts = [ Parameter(type([str]), "Slice or sliver URNs"), Parameter(type([dict]), "credentials"), Parameter(dict, "Options") - ] + ] returns = Parameter(dict, "Status details") def call(self, xrns, creds, options): - valid_creds = self.api.auth.checkCredentials(creds, 'sliverstatus', xrns, - check_sliver_callback = self.api.driver.check_sliver_credentials) + valid_creds = self.api.auth.checkCredentialsSpeaksFor( + creds, 'sliverstatus', xrns, + check_sliver_callback=self.api.driver.check_sliver_credentials, + options=options) - self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, xrns, self.name)) + logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s" % + (self.api.interface, xrns, self.name)) return self.api.manager.Status(self.api, xrns, creds, options) -