diff --git a/SoftLayer/CLI/hardware/credentials.py b/SoftLayer/CLI/hardware/credentials.py index 6371f6392..dc6ddcdef 100644 --- a/SoftLayer/CLI/hardware/credentials.py +++ b/SoftLayer/CLI/hardware/credentials.py @@ -29,6 +29,6 @@ def cli(env, identifier): for credentials in item['passwords']: table.add_row([credentials.get('username', 'None'), credentials.get('password', 'None'), - item['softwareLicense']['softwareDescription']['referenceCode'], + item['softwareLicense']['softwareDescription']['name'], item['softwareLicense']['softwareDescription']['version']]) env.fout(table) diff --git a/SoftLayer/managers/hardware.py b/SoftLayer/managers/hardware.py index 92a820cae..02453efe7 100644 --- a/SoftLayer/managers/hardware.py +++ b/SoftLayer/managers/hardware.py @@ -260,7 +260,7 @@ def get_hardware(self, hardware_id, **kwargs): name, version, referenceCode]], - passwords[username,password]],''' + passwords[id,username,password]],''' 'billingItem[' 'id,nextInvoiceTotalRecurringAmount,' 'nextInvoiceChildren[nextInvoiceTotalRecurringAmount],' diff --git a/tests/CLI/modules/server_tests.py b/tests/CLI/modules/server_tests.py index d2353f32a..2aaca7724 100644 --- a/tests/CLI/modules/server_tests.py +++ b/tests/CLI/modules/server_tests.py @@ -46,14 +46,16 @@ def test_server_credentials(self): 'softwareDescription': { 'referenceCode': 'CENTOS_7_64', - 'version': '7.8 - 64'}}}] + 'version': '7.8 - 64', + 'name': 'Centos' + }}}] } result = self.run_command(['hardware', 'credentials', '12345']) self.assert_no_fail(result) self.assertEqual(json.loads(result.output), [ {'Password': 'abc123', - 'Software': 'CENTOS_7_64', + 'Software': 'Centos', 'Username': 'root', 'Version': '7.8 - 64'} ]) @@ -93,7 +95,7 @@ def test_server_credentials_exception_password_not_found(self): "passwords": [{}], "softwareLicense": { "softwareDescription": { - "referenceCode": None, + "name": None, "version": None } }