Merge "Add username to detailed node list output"

This commit is contained in:
Zuul 2022-12-09 20:26:39 +00:00 committed by Gerrit Code Review
commit 9d98386b62
3 changed files with 4 additions and 2 deletions

View File

@ -205,7 +205,7 @@ class NodePoolCmd(NodepoolApp):
'public_ipv4', 'ipv6', 'state', 'age', 'locked']
if detail:
fields.extend(['pool', 'hostname', 'private_ipv4', 'AZ',
'connection_port', 'launcher',
'username', 'connection_port', 'launcher',
'allocated_to', 'hold_job',
'comment', 'user_data', 'driver_data'])
results = status.node_list(self.zk, node_id)

View File

@ -123,6 +123,7 @@ def node_list(zk, node_id=None):
("hostname", "Hostname"),
("private_ipv4", "Private IPv4"),
("AZ", "AZ"),
("username", "Username"),
("connection_port", "Port"),
("launcher", "Launcher"),
("allocated_to", "Allocated To"),
@ -155,6 +156,7 @@ def node_list(zk, node_id=None):
node.hostname,
node.private_ipv4,
node.az,
node.username,
node.connection_port,
node.launcher,
node.allocated_to,

View File

@ -78,7 +78,7 @@ class TestNodepoolCMD(tests.DBTestCase):
col_count = 9
if detail:
cmd += ['--detail']
col_count = 20
col_count = 21
if not validate_col_count:
col_count = 0
self.assert_listed(configfile, cmd, 6, status, node_cnt, col_count)