Revision cc3bcec8 scripts/gnt-node
b/scripts/gnt-node | ||
---|---|---|
41 | 41 |
"pinst_cnt", "sinst_cnt", |
42 | 42 |
] |
43 | 43 |
|
44 |
#: headers (and full field list for L{ListNodes} |
|
45 |
_LIST_HEADERS = { |
|
46 |
"name": "Node", "pinst_cnt": "Pinst", "sinst_cnt": "Sinst", |
|
47 |
"pinst_list": "PriInstances", "sinst_list": "SecInstances", |
|
48 |
"pip": "PrimaryIP", "sip": "SecondaryIP", |
|
49 |
"dtotal": "DTotal", "dfree": "DFree", |
|
50 |
"mtotal": "MTotal", "mnode": "MNode", "mfree": "MFree", |
|
51 |
"bootid": "BootID", |
|
52 |
"ctotal": "CTotal", |
|
53 |
"tags": "Tags", |
|
54 |
"serial_no": "SerialNo", |
|
55 |
"master_candidate": "MasterC", |
|
56 |
"master": "IsMaster", |
|
57 |
} |
|
58 |
|
|
44 | 59 |
|
45 | 60 |
@UsesRPC |
46 | 61 |
def AddNode(opts, args): |
... | ... | |
105 | 120 |
output = GetClient().QueryNodes([], selected_fields) |
106 | 121 |
|
107 | 122 |
if not opts.no_headers: |
108 |
headers = { |
|
109 |
"name": "Node", "pinst_cnt": "Pinst", "sinst_cnt": "Sinst", |
|
110 |
"pinst_list": "PriInstances", "sinst_list": "SecInstances", |
|
111 |
"pip": "PrimaryIP", "sip": "SecondaryIP", |
|
112 |
"dtotal": "DTotal", "dfree": "DFree", |
|
113 |
"mtotal": "MTotal", "mnode": "MNode", "mfree": "MFree", |
|
114 |
"bootid": "BootID", |
|
115 |
"ctotal": "CTotal", |
|
116 |
"tags": "Tags", |
|
117 |
"serial_no": "SerialNo", |
|
118 |
"master_candidate": "MasterC", |
|
119 |
"master": "IsMaster", |
|
120 |
} |
|
123 |
headers = _LIST_HEADERS |
|
121 | 124 |
else: |
122 | 125 |
headers = None |
123 | 126 |
|
... | ... | |
431 | 434 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, |
432 | 435 |
SUBMIT_OPT], |
433 | 436 |
"", "Lists the nodes in the cluster. The available fields" |
434 |
" are (see the man page for details): name, pinst_cnt, pinst_list," |
|
435 |
" sinst_cnt, sinst_list, pip, sip, dtotal, dfree, mtotal, mnode," |
|
436 |
" mfree, bootid, cpu_count, serial_no." |
|
437 |
" The default field list is" |
|
438 |
" (in order): %s." % ", ".join(_LIST_DEF_FIELDS), |
|
439 |
), |
|
437 |
" are (see the man page for details): %s" |
|
438 |
" The default field list is (in order): %s." % |
|
439 |
(", ".join(_LIST_HEADERS), ", ".join(_LIST_DEF_FIELDS))), |
|
440 | 440 |
'modify': (SetNodeParams, ARGS_ONE, |
441 | 441 |
[DEBUG_OPT, FORCE_OPT, |
442 | 442 |
SUBMIT_OPT, |
Also available in: Unified diff