Skip to content
Snippets Groups Projects
Commit 144db8f6 authored by Seblu's avatar Seblu
Browse files

Change command loading schema

parent ec708438
No related branches found
No related tags found
No related merge requests found
......@@ -5,15 +5,59 @@
CloudControl CLI Commands Package
'''
# bunch of command
from cccli.command.account import *
from cccli.command.alias import *
from cccli.command.right import *
from cccli.command.shell import *
from cccli.command.tag import *
from cccli.command.vm import *
__all__ = [
"Command",
"OptionCommand",
"RemoteCommand",
"TqlCommand",
"Command_addaccount",
"Command_addright",
"Command_addtag",
"Command_alias",
"Command_cancel",
"Command_clear",
"Command_clone",
"Command_close",
"Command_declose",
"Command_delaccount",
"Command_delright",
"Command_deltag",
"Command_destroy",
"Command_execute",
"Command_expert",
"Command_help",
"Command_history",
"Command_jobs",
"Command_kill",
"Command_list",
"Command_migrate",
"Command_passwd",
"Command_pause",
"Command_quit",
"Command_resume",
"Command_rights",
"Command_server",
"Command_shutdown",
"Command_start",
"Command_stop",
"Command_tagdisplay",
"Command_tags",
"Command_unalias",
"Command_undefine",
"Command_usage",
"Command_version",
"Command_whoami",
]
# by command module
# importing
from cccli.command.command import Command, OptionCommand, RemoteCommand, TqlCommand
from cccli.command.account import Command_addaccount
from cccli.command.account import Command_close
from cccli.command.account import Command_declose
from cccli.command.account import Command_delaccount
from cccli.command.account import Command_passwd
from cccli.command.alias import Command_alias
from cccli.command.alias import Command_unalias
from cccli.command.cancel import Command_cancel
from cccli.command.execute import Command_execute
from cccli.command.expert import Command_expert
......@@ -21,6 +65,26 @@ from cccli.command.jobs import Command_jobs
from cccli.command.kill import Command_kill
from cccli.command.list import Command_list
from cccli.command.migrate import Command_migrate
from cccli.command.right import Command_addright
from cccli.command.right import Command_delright
from cccli.command.right import Command_rights
from cccli.command.server import Command_server
from cccli.command.shell import Command_clear
from cccli.command.shell import Command_help
from cccli.command.shell import Command_history
from cccli.command.shell import Command_quit
from cccli.command.shell import Command_usage
from cccli.command.shell import Command_version
from cccli.command.shell import Command_whoami
from cccli.command.shutdown import Command_shutdown
from cccli.command.tag import Command_addtag
from cccli.command.tag import Command_deltag
from cccli.command.tag import Command_tags
from cccli.command.tagdisplay import Command_tagdisplay
from cccli.command.vm import Command_clone
from cccli.command.vm import Command_destroy
from cccli.command.vm import Command_pause
from cccli.command.vm import Command_resume
from cccli.command.vm import Command_start
from cccli.command.vm import Command_stop
from cccli.command.vm import Command_undefine
......@@ -30,7 +30,7 @@ class Commands(object):
# remove not available commands
for cname in tuple(self.cmds):
cobj = self.cmds[cname](self.cli, cname)
if isinstance(cobj, command.RemoteCommand):
if isinstance(cobj, RemoteCommand):
try:
if len(cobj.remote_functions()) == 0:
raise NotImplementedError("No remote function")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment