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