Loading cccli/commands/purge.py 0 → 100644 +29 −0 Original line number Diff line number Diff line #!/usr/bin/env python #coding=utf8 ''' CloudControl cancel command ''' from cccli.exception import * from sjrpc.core.exceptions import * from cccli.printer import Printer, color from cccli.command import TqlCommand class Command_purge(TqlCommand): '''Purge a job (delete it)''' def __init__(self, cli, argv0): TqlCommand.__init__(self, cli, argv0) self.tql_filter += "&r=job&state=done" def __call__(self, argv): # arg parse self.parse_args(argv) if len(self.args) != 1: raise cmdBadArgument() # rpc call self.rpccall("purge", self.args[0]) def remote_functions(self): return set(("purge",)) Loading
cccli/commands/purge.py 0 → 100644 +29 −0 Original line number Diff line number Diff line #!/usr/bin/env python #coding=utf8 ''' CloudControl cancel command ''' from cccli.exception import * from sjrpc.core.exceptions import * from cccli.printer import Printer, color from cccli.command import TqlCommand class Command_purge(TqlCommand): '''Purge a job (delete it)''' def __init__(self, cli, argv0): TqlCommand.__init__(self, cli, argv0) self.tql_filter += "&r=job&state=done" def __call__(self, argv): # arg parse self.parse_args(argv) if len(self.args) != 1: raise cmdBadArgument() # rpc call self.rpccall("purge", self.args[0]) def remote_functions(self): return set(("purge",))