1 from sfa.util.xrn import urn_to_hrn
2 from sfa.util.method import Method
3 from sfa.util.parameter import Parameter, Mixed
5 class SliverStatus(Method):
7 Get the status of a sliver
9 @param slice_urn (string) URN of slice to allocate to
12 interfaces = ['aggregate', 'slicemgr', 'component']
14 Parameter(str, "Slice URN"),
15 Mixed(Parameter(str, "Credential string"),
16 Parameter(type([str]), "List of credentials")),
17 Parameter(str, "call_id"),
19 returns = Parameter(dict, "Status details")
21 def call(self, slice_xrn, creds, call_id=""):
22 hrn, type = urn_to_hrn(slice_xrn)
23 valid_creds = self.api.auth.checkCredentials(creds, 'sliverstatus', hrn)
25 self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, hrn, self.name))
27 manager = self.api.get_interface_manager()
28 status = manager.SliverStatus(self.api, hrn, valid_creds, call_id)