1 from sfa.util.faults import *
2 from sfa.util.namespace import *
3 from sfa.util.method import Method
4 from sfa.util.parameter import Parameter
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', 'geni_am']
15 Parameter(str, "Slice URN"),
16 Mixed(Parameter(str, "Credential string"),
17 Parameter(type([str]), "List of credentials")),
19 returns = Parameter(dict, "Status details")
21 def call(self, slice_xrn, creds):
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.delete_slice(self.api, xrn, valid_creds)