Skip to content

Commit d119ffe

Browse files
caberoscaberos
authored andcommitted
fix the hw credential error
1 parent e6a4b9e commit d119ffe

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

SoftLayer/CLI/hardware/credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ def cli(env, identifier):
2929
for credentials in item['passwords']:
3030
table.add_row([credentials.get('username', 'None'),
3131
credentials.get('password', 'None'),
32-
item['softwareLicense']['softwareDescription']['referenceCode'],
32+
item['softwareLicense']['softwareDescription']['name'],
3333
item['softwareLicense']['softwareDescription']['version']])
3434
env.fout(table)

SoftLayer/managers/hardware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def get_hardware(self, hardware_id, **kwargs):
260260
name,
261261
version,
262262
referenceCode]],
263-
passwords[username,password]],'''
263+
passwords[id,username,password]],'''
264264
'billingItem['
265265
'id,nextInvoiceTotalRecurringAmount,'
266266
'nextInvoiceChildren[nextInvoiceTotalRecurringAmount],'

tests/CLI/modules/server_tests.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,16 @@ def test_server_credentials(self):
4646
'softwareDescription':
4747
{
4848
'referenceCode': 'CENTOS_7_64',
49-
'version': '7.8 - 64'}}}]
49+
'version': '7.8 - 64',
50+
'name':'Centos'
51+
}}}]
5052
}
5153
result = self.run_command(['hardware', 'credentials', '12345'])
5254

5355
self.assert_no_fail(result)
5456
self.assertEqual(json.loads(result.output), [
5557
{'Password': 'abc123',
56-
'Software': 'CENTOS_7_64',
58+
'Software': 'Centos',
5759
'Username': 'root',
5860
'Version': '7.8 - 64'}
5961
])

0 commit comments

Comments
 (0)