Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
itminedu
snf-ganeti
Commits
600eeb31
Commit
600eeb31
authored
13 years ago
by
Apollon Oikonomopoulos
Browse files
Options
Downloads
Patches
Plain Diff
Add network query LUXI method
Signed-off-by:
Apollon Oikonomopoulos
<
apollon@noc.grnet.gr
>
parent
7ffdb1d8
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
lib/luxi.py
+4
-0
4 additions, 0 deletions
lib/luxi.py
lib/server/masterd.py
+9
-0
9 additions, 0 deletions
lib/server/masterd.py
with
13 additions
and
0 deletions
lib/luxi.py
+
4
−
0
View file @
600eeb31
...
...
@@ -61,6 +61,7 @@ REQ_QUERY_JOBS = "QueryJobs"
REQ_QUERY_INSTANCES
=
"
QueryInstances
"
REQ_QUERY_NODES
=
"
QueryNodes
"
REQ_QUERY_GROUPS
=
"
QueryGroups
"
REQ_QUERY_NETWORKS
=
"
QueryNetworks
"
REQ_QUERY_EXPORTS
=
"
QueryExports
"
REQ_QUERY_CONFIG_VALUES
=
"
QueryConfigValues
"
REQ_QUERY_CLUSTER_INFO
=
"
QueryClusterInfo
"
...
...
@@ -539,6 +540,9 @@ class Client(object):
def
QueryGroups
(
self
,
names
,
fields
,
use_locking
):
return
self
.
CallMethod
(
REQ_QUERY_GROUPS
,
(
names
,
fields
,
use_locking
))
def
QueryNetworks
(
self
,
names
,
fields
,
use_locking
):
return
self
.
CallMethod
(
REQ_QUERY_NETWORKS
,
(
names
,
fields
,
use_locking
))
def
QueryExports
(
self
,
nodes
,
use_locking
):
return
self
.
CallMethod
(
REQ_QUERY_EXPORTS
,
(
nodes
,
use_locking
))
...
...
This diff is collapsed.
Click to expand it.
lib/server/masterd.py
+
9
−
0
View file @
600eeb31
...
...
@@ -301,6 +301,15 @@ class ClientOps:
op
=
opcodes
.
OpGroupQuery
(
names
=
names
,
output_fields
=
fields
)
return
self
.
_Query
(
op
)
elif
method
==
luxi
.
REQ_QUERY_NETWORKS
:
(
names
,
fields
,
use_locking
)
=
args
logging
.
info
(
"
Received network query request for %s
"
,
names
)
if
use_locking
:
raise
errors
.
OpPrereqError
(
"
Sync queries are not allowed
"
,
errors
.
ECODE_INVAL
)
op
=
opcodes
.
OpNetworkQuery
(
names
=
names
,
output_fields
=
fields
)
return
self
.
_Query
(
op
)
elif
method
==
luxi
.
REQ_QUERY_EXPORTS
:
nodes
,
use_locking
=
args
if
use_locking
:
...
...
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