1 from sfa.util.faults import *
2 from sfa.util.xrn import urn_to_hrn
3 from sfa.util.method import Method
4 from sfa.util.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(str, "call_id"),
20 returns = Parameter(dict, "Status details")
22 def call(self, slice_xrn, creds, call_id=""):
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 manager = self.api.get_interface_manager()
29 status = manager.SliverStatus(self.api, hrn, valid_creds, call_id)