Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-ganeti
Commits
32f93223
Commit
32f93223
authored
Aug 08, 2008
by
Michael Hanselmann
Browse files
Add query function for exports
Reviewed-by: iustinp
parent
24fc781f
Changes
2
Hide whitespace changes
Inline
Side-by-side
daemons/ganeti-masterd
View file @
32f93223
...
...
@@ -231,6 +231,11 @@ class ClientOps:
op
=
opcodes
.
OpQueryNodes
(
names
=
names
,
output_fields
=
fields
)
return
self
.
_Query
(
op
)
elif
method
==
luxi
.
REQ_QUERY_EXPORTS
:
nodes
=
args
op
=
opcodes
.
OpQueryExports
(
nodes
=
nodes
)
return
self
.
_Query
(
op
)
else
:
raise
ValueError
(
"Invalid operation"
)
...
...
lib/luxi.py
View file @
32f93223
...
...
@@ -49,6 +49,7 @@ REQ_ARCHIVE_JOB = "ArchiveJob"
REQ_QUERY_JOBS
=
"QueryJobs"
REQ_QUERY_INSTANCES
=
"QueryInstances"
REQ_QUERY_NODES
=
"QueryNodes"
REQ_QUERY_EXPORTS
=
"QueryExports"
DEF_CTMO
=
10
DEF_RWTO
=
60
...
...
@@ -296,4 +297,7 @@ class Client(object):
def
QueryNodes
(
self
,
names
,
fields
):
return
self
.
CallMethod
(
REQ_QUERY_NODES
,
(
names
,
fields
))
def
QueryExports
(
self
,
nodes
):
return
self
.
CallMethod
(
REQ_QUERY_EXPORTS
,
nodes
)
# TODO: class Server(object)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment