Skip to content

Commit

Permalink
Added vpn status to user list. Fixed #2178
Browse files Browse the repository at this point in the history
  • Loading branch information
allmightyspiff committed Aug 6, 2024
1 parent a17430e commit b535762
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions SoftLayer/CLI/user/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
column_helper.Column('hardwareCount', ('hardwareCount',)),
column_helper.Column('virtualGuestCount', ('virtualGuestCount',)),
column_helper.Column('2FA', (TWO_FACTO_AUTH,)),
column_helper.Column('classicAPIKey', (CLASSIC_API_KEYS,))
column_helper.Column('classicAPIKey', (CLASSIC_API_KEYS,)),
column_helper.Column('vpn', ('sslVpnAllowedFlag',))
]

DEFAULT_COLUMNS = [
Expand All @@ -30,6 +31,7 @@
'displayName',
'2FA',
'classicAPIKey',
'vpn'
]


Expand All @@ -48,7 +50,7 @@ def cli(env, columns):

table = formatting.Table(columns.columns)
for user in users:
user = _yes_format(user, [TWO_FACTO_AUTH, CLASSIC_API_KEYS])
user = _yes_format(user, [TWO_FACTO_AUTH, CLASSIC_API_KEYS, 'sslVpnAllowedFlag'])
table.add_row([value or formatting.blank()
for value in columns.row(user)])

Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/managers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def list_users(self, objectmask=None, objectfilter=None):

if objectmask is None:
objectmask = """mask[id, username, displayName, userStatus[name], hardwareCount, virtualGuestCount,
email, roles, externalBindingCount,apiAuthenticationKeyCount]"""
email, roles, externalBindingCount,apiAuthenticationKeyCount, sslVpnAllowedFlag]"""

return self.account_service.getUsers(mask=objectmask, filter=objectfilter)

Expand Down

0 comments on commit b535762

Please sign in to comment.