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
469f88e1
Commit
469f88e1
authored
Oct 16, 2008
by
Iustin Pop
Browse files
Show the cluster parametrs in gnt-cluster info
This is just a raw update without any special formatting. Reviewed-by: imsnah
parent
2f7635f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/cmdlib.py
View file @
469f88e1
...
...
@@ -1865,17 +1865,20 @@ class LUQueryClusterInfo(NoHooksLU):
"""Return cluster config.
"""
cluster
=
self
.
cfg
.
GetClusterInfo
()
result
=
{
"name"
:
self
.
cfg
.
GetClusterName
(),
"software_version"
:
constants
.
RELEASE_VERSION
,
"protocol_version"
:
constants
.
PROTOCOL_VERSION
,
"config_version"
:
constants
.
CONFIG_VERSION
,
"os_api_version"
:
constants
.
OS_API_VERSION
,
"export_version"
:
constants
.
EXPORT_VERSION
,
"master"
:
self
.
cfg
.
GetMasterNode
(),
"architecture"
:
(
platform
.
architecture
()[
0
],
platform
.
machine
()),
"hypervisor_type"
:
self
.
cfg
.
GetHypervisorType
(),
"enabled_hypervisors"
:
self
.
cfg
.
GetClusterInfo
().
enabled_hypervisors
,
"name"
:
cluster
.
cluster_name
,
"master"
:
cluster
.
master_node
,
"hypervisor_type"
:
cluster
.
hypervisor
,
"enabled_hypervisors"
:
cluster
.
enabled_hypervisors
,
"hvparams"
:
cluster
.
hvparams
,
"beparams"
:
cluster
.
beparams
,
}
return
result
...
...
scripts/gnt-cluster
View file @
469f88e1
...
...
@@ -145,7 +145,20 @@ def ShowClusterConfig(opts, args):
print
(
"Architecture (this node): %s (%s)"
%
(
result
[
"architecture"
][
0
],
result
[
"architecture"
][
1
]))
print
(
"Cluster hypervisor: %s"
%
result
[
"hypervisor_type"
])
print
(
"Default hypervisor: %s"
%
result
[
"hypervisor_type"
])
print
(
"Enabled hypervisors: %s"
%
", "
.
join
(
result
[
"enabled_hypervisors"
]))
print
"Hypervisor parameters:"
for
hv_name
,
hv_dict
in
result
[
"hvparams"
].
items
():
print
" - %s:"
%
hv_name
for
item
,
val
in
hv_dict
.
iteritems
():
print
" %s: %s"
%
(
item
,
val
)
print
"Cluster parameters:"
for
gr_name
,
gr_dict
in
result
[
"beparams"
].
items
():
print
" - %s:"
%
gr_name
for
item
,
val
in
gr_dict
.
iteritems
():
print
" %s: %s"
%
(
item
,
val
)
return
0
...
...
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