4 from sfa.util.faults import *
5 from sfa.util.misc import *
6 from sfa.util.method import Method
7 from sfa.util.parameter import Parameter, Mixed
8 from sfa.util.auth import Auth
10 from sfa.util.slices import Slices
12 class delete_slice(Method):
14 Remove the slice from all nodes.
16 @param cred credential string specifying the rights of the caller
17 @param hrn human readable name specifying the slice to delete
18 @return 1 if successful, faults otherwise
21 interfaces = ['aggregate', 'slicemgr']
24 Parameter(str, "Credential string"),
25 Parameter(str, "Human readable name of slice to delete"),
28 returns = [Parameter(int, "1 if successful")]
30 def call(self, cred, hrn):
32 self.api.auth.check(cred, 'deleteslice')
33 slices = Slices(self.api)
34 slices.delete_slice(hrn)