Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-cli
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
d32f6204
Commit
d32f6204
authored
14 years ago
by
Seblu
Browse files
Options
Downloads
Patches
Plain Diff
add command cache
parent
a8fb42a5
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
+1
-0
1 addition, 0 deletions
cccli/command/__init__.py
cccli/command/cache.py
+21
-0
21 additions, 0 deletions
cccli/command/cache.py
with
22 additions
and
0 deletions
cccli/command/__init__.py
+
1
−
0
View file @
d32f6204
...
...
@@ -18,3 +18,4 @@ from cccli.command.vm import *
# by command module
from
cccli.command.list
import
Command_list
from
cccli.command.expert
import
Command_expert
from
cccli.command.cache
import
Command_cache
This diff is collapsed.
Click to expand it.
cccli/command/cache.py
0 → 100644
+
21
−
0
View file @
d32f6204
#!/usr/bin/env python
#coding=utf8
'''
CloudControl cache command
'''
from
cccli.exception
import
*
from
sjrpc.core.exceptions
import
*
from
cccli.printer
import
Printer
,
color
from
cccli.command.command
import
Command
class
Command_cache
(
Command
):
'''
Show server cache statistics
'''
def
__call__
(
self
,
argv
):
try
:
d
=
self
.
cli
.
rpc
.
call
(
"
dbstats
"
)
for
i
,
v
in
d
.
items
():
self
.
printer
.
out
(
"
%s: %s
"
%
(
i
,
v
))
except
RpcError
as
e
:
raise
cmdError
(
"
RPCError: %s
"
%
str
(
e
))
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