X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=sfa%2Fmethods%2FStatus.py;h=e50ce4e3e291f01baa36cb938b63b1c1a3da0ae6;hb=HEAD;hp=68d928e64e4c19133b62f8fd12176c1f6dc6ea7a;hpb=4a2337e7f70cef81a8de37829aa63fc941c4b96e;p=sfa.git diff --git a/sfa/methods/Status.py b/sfa/methods/Status.py index 68d928e6..e50ce4e3 100644 --- a/sfa/methods/Status.py +++ b/sfa/methods/Status.py @@ -1,28 +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'] + interfaces = ['aggregate'] 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.checkCredentialsSpeaksFor(creds, 'sliverstatus', xrns, - check_sliver_callback = self.api.driver.check_sliver_credentials, - options=options) + 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) -