Skip to content
Snippets Groups Projects
kill.py 696 B
Newer Older
#!/usr/bin/env python
#coding=utf8

'''
CloudControl Connection related commands
'''

from cccli.exception import *
from sjrpc.core.exceptions import *
from cccli.printer import Printer, color
from cccli.command.command import TqlCommand

class Command_kill(TqlCommand):
    '''Kill a server connection'''

    def __init__(self, cli, argv0):
        TqlCommand.__init__(self, cli, argv0)
        self.tql_filter += "&con"

    def __call__(self, argv):
        # args parse
        self.parse_args(argv)
        if len(self.args) != 1:
            raise cmdBadArgument()
        # rpccall
        self.rpccall("kill", self.args[0])

    def remote_functions(self):
        return set(("kill",))