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
ca5fca29
Commit
ca5fca29
authored
14 years ago
by
Seblu
Browse files
Options
Downloads
Patches
Plain Diff
command exec use new callback args
parent
7a933c03
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cccli/command/command.py
+1
-1
1 addition, 1 deletion
cccli/command/command.py
cccli/command/host.py
+2
-3
2 additions, 3 deletions
cccli/command/host.py
with
3 additions
and
4 deletions
cccli/command/command.py
+
1
−
1
View file @
ca5fca29
...
...
@@ -194,7 +194,7 @@ class TqlCommand(OptionCommand):
l
[
_options
[
"
tql_index
"
]]
=
"
id=%s
"
%
obj
[
"
id
"
]
d
=
self
.
cli
.
rpc
.
call
(
*
tuple
(
l
),
**
kwargs
)
if
_options
[
"
callback
"
]
is
not
None
:
_options
[
"
callback
"
](
obj
[
"
output
"
]
)
_options
[
"
callback
"
](
obj
)
if
_options
[
"
status
"
]:
self
.
print_objects
(
d
,
(
"
output
"
))
except
RpcError
as
e
:
...
...
This diff is collapsed.
Click to expand it.
cccli/command/host.py
+
2
−
3
View file @
ca5fca29
...
...
@@ -26,9 +26,8 @@ class Command_exec(TqlCommand):
def
_cb_print_output
(
self
,
d
):
'''
Print output of execute by object
'''
for
o
in
d
:
self
.
printer
.
out
(
"
%s output:
"
%
o
[
0
])
self
.
printer
.
out
(
""
.
join
(
o
[
1
][
0
][
0
:]),
nl
=
""
)
self
.
printer
.
out
(
"
%s output:
"
%
d
[
"
id
"
])
self
.
printer
.
out
(
d
.
get
(
"
output
"
,
""
),
nl
=
""
)
class
Command_shutdown
(
TqlCommand
):
'''
Shutdown a physical host
'''
...
...
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