Revision 8572f1fe lib/client/gnt_node.py
b/lib/client/gnt_node.py | ||
---|---|---|
34 | 34 |
from ganeti import constants |
35 | 35 |
from ganeti import errors |
36 | 36 |
from ganeti import netutils |
37 |
from cStringIO import StringIO |
|
37 | 38 |
|
38 | 39 |
|
39 | 40 |
#: default list of field for L{ListNodes} |
... | ... | |
388 | 389 |
result = cl.QueryNodes(fields=["name", "pip", "sip", |
389 | 390 |
"pinst_list", "sinst_list", |
390 | 391 |
"master_candidate", "drained", "offline", |
391 |
"master_capable", "vm_capable", "powered"], |
|
392 |
"master_capable", "vm_capable", "powered", |
|
393 |
"ndparams", "custom_ndparams"], |
|
392 | 394 |
names=args, use_locking=False) |
393 | 395 |
|
394 |
for (name, primary_ip, secondary_ip, pinst, sinst, |
|
395 |
is_mc, drained, offline, master_capable, vm_capable, powered) in result: |
|
396 |
for (name, primary_ip, secondary_ip, pinst, sinst, is_mc, drained, offline, |
|
397 |
master_capable, vm_capable, powered, ndparams, |
|
398 |
ndparams_custom) in result: |
|
396 | 399 |
ToStdout("Node name: %s", name) |
397 | 400 |
ToStdout(" primary ip: %s", primary_ip) |
398 | 401 |
ToStdout(" secondary ip: %s", secondary_ip) |
... | ... | |
416 | 419 |
ToStdout(" - %s", iname) |
417 | 420 |
else: |
418 | 421 |
ToStdout(" secondary for no instances") |
422 |
ToStdout(" node parameters:") |
|
423 |
buf = StringIO() |
|
424 |
FormatParameterDict(buf, ndparams_custom, ndparams, level=2) |
|
425 |
ToStdout(buf.getvalue().rstrip("\n")) |
|
419 | 426 |
|
420 | 427 |
return 0 |
421 | 428 |
|
Also available in: Unified diff