Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-cli
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
cc-cli
Commits
144db8f6
Commit
144db8f6
authored
13 years ago
by
Seblu
Browse files
Options
Downloads
Patches
Plain Diff
Change command loading schema
parent
ec708438
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cccli/command/__init__.py
+72
-8
72 additions, 8 deletions
cccli/command/__init__.py
cccli/commands.py
+1
-1
1 addition, 1 deletion
cccli/commands.py
with
73 additions
and
9 deletions
cccli/command/__init__.py
+
72
−
8
View file @
144db8f6
...
...
@@ -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
This diff is collapsed.
Click to expand it.
cccli/commands.py
+
1
−
1
View file @
144db8f6
...
...
@@ -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
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment