Skip to content

Commit 676c2e8

Browse files
author
Fernando Ojeda
committed
Fixed hardware credentials issue.
1 parent 3932c4e commit 676c2e8

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

SoftLayer/CLI/hardware/credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import click
55

66
import SoftLayer
7-
from SoftLayer import exceptions
87
from SoftLayer.CLI import environment
8+
from SoftLayer import exceptions
99
from SoftLayer.CLI import formatting
1010
from SoftLayer.CLI import helpers
1111

tests/CLI/modules/server_tests.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_server_cancel_reasons(self):
2525
output = json.loads(result.output)
2626
self.assert_no_fail(result)
2727
self.assertEqual(len(output), 10)
28-
28+
2929
def test_server_credentials(self):
3030
result = self.run_command(['hardware', 'credentials', '12345'])
3131

@@ -39,14 +39,14 @@ def test_server_credentials(self):
3939
def test_server_credentials_exception_passwords_not_found(self):
4040
mock = self.set_mock('SoftLayer_Hardware_Server', 'getObject')
4141
mock.return_value = {
42-
"accountId": 11111,
43-
"domain": "chechu.com",
44-
"fullyQualifiedDomainName": "host3.vmware.chechu.com",
45-
"hardwareStatusId": 5,
46-
"hostname": "host3.vmware",
47-
"id": 12345,
48-
"operatingSystem": {}
49-
}
42+
"accountId": 11111,
43+
"domain": "chechu.com",
44+
"fullyQualifiedDomainName": "host3.vmware.chechu.com",
45+
"hardwareStatusId": 5,
46+
"hostname": "host3.vmware",
47+
"id": 12345,
48+
"operatingSystem": {}
49+
}
5050

5151
result = self.run_command(['hardware', 'credentials', '12345'])
5252

@@ -58,17 +58,17 @@ def test_server_credentials_exception_passwords_not_found(self):
5858
def test_server_credentials_exception_password_not_found(self):
5959
mock = self.set_mock('SoftLayer_Hardware_Server', 'getObject')
6060
mock.return_value = {
61-
"accountId": 11111,
62-
"domain": "chechu.com",
63-
"fullyQualifiedDomainName": "host3.vmware.chechu.com",
64-
"hardwareStatusId": 5,
65-
"hostname": "host3.vmware",
66-
"id": 12345,
67-
"operatingSystem": {
68-
"hardwareId": 22222,
69-
"id": 333333,
70-
"passwords": [{}]
71-
}
61+
"accountId": 11111,
62+
"domain": "chechu.com",
63+
"fullyQualifiedDomainName": "host3.vmware.chechu.com",
64+
"hardwareStatusId": 5,
65+
"hostname": "host3.vmware",
66+
"id": 12345,
67+
"operatingSystem": {
68+
"hardwareId": 22222,
69+
"id": 333333,
70+
"passwords": [{}]
71+
}
7272
}
7373

7474
result = self.run_command(['hardware', 'credentials', '12345'])
@@ -365,7 +365,7 @@ def test_create_server_missing_required(self):
365365

366366
@mock.patch('SoftLayer.CLI.template.export_to_template')
367367
def test_create_server_with_export(self, export_mock):
368-
if(sys.platform.startswith("win")):
368+
if (sys.platform.startswith("win")):
369369
self.skipTest("Test doesn't work in Windows")
370370
result = self.run_command(['--really', 'server', 'create',
371371
'--size=S1270_8GB_2X1TBSATA_NORAID',
@@ -439,7 +439,7 @@ def test_edit_server_failed(self, edit_mock):
439439
hostname='hardware-test1')
440440

441441
def test_edit_server_userfile(self):
442-
if(sys.platform.startswith("win")):
442+
if (sys.platform.startswith("win")):
443443
self.skipTest("Test doesn't work in Windows")
444444
with tempfile.NamedTemporaryFile() as userfile:
445445
userfile.write(b"some data")

0 commit comments

Comments
 (0)