1 from sfa.util.xrn import urn_to_hrn
2 from sfa.util.method import Method
4 from sfa.storage.parameter import Parameter, Mixed
6 class SliverStatus(Method):
8 Get the status of a sliver
10 @param slice_urn (string) URN of slice to allocate to
13 interfaces = ['aggregate', 'slicemgr', 'component']
15 Parameter(str, "Slice URN"),
16 Mixed(Parameter(str, "Credential string"),
17 Parameter(type([str]), "List of credentials")),
18 Parameter(dict, "Options")
20 returns = Parameter(dict, "Status details")
22 def call(self, slice_xrn, creds, options):
23 hrn, type = urn_to_hrn(slice_xrn)
24 valid_creds = self.api.auth.checkCredentials(creds, 'sliverstatus', hrn)
26 self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, hrn, self.name))
28 status = self.api.manager.SliverStatus(self.api, hrn, valid_creds, options)