Revision 651ce6a3 lib/client/gnt_node.py
b/lib/client/gnt_node.py | ||
---|---|---|
249 | 249 |
|
250 | 250 |
# Retrieve relevant parameters of the node group. |
251 | 251 |
ssh_port = None |
252 |
if opts.nodegroup: |
|
253 |
try: |
|
254 |
output = cl.QueryGroups(names=[opts.nodegroup], fields=["ndp/ssh_port"], |
|
255 |
use_locking=False) |
|
256 |
(ssh_port, ) = output[0] |
|
257 |
except (errors.OpPrereqError, errors.OpExecError): |
|
258 |
pass |
|
252 |
try: |
|
253 |
# Passing [] to QueryGroups means query the default group: |
|
254 |
node_groups = [opts.nodegroup] if opts.nodegroup is not None else [] |
|
255 |
output = cl.QueryGroups(names=node_groups, fields=["ndp/ssh_port"], |
|
256 |
use_locking=False) |
|
257 |
(ssh_port, ) = output[0] |
|
258 |
except (errors.OpPrereqError, errors.OpExecError): |
|
259 |
pass |
|
259 | 260 |
|
260 | 261 |
try: |
261 | 262 |
output = cl.QueryNodes(names=[node], |
Also available in: Unified diff