Repository: softlayer/softlayer-python
Pull request #482 (2015-01-26 15:43:19)

display ipmi password
:        users : :..........:..........:              :
:              : : username : password :              :
:              : :..........:..........:              :
:              : :   root   : ABCD :              :
:              : :..........:..........:              :
: remote users : :...............:............:       :
:              : : ipmi_username :  password  :       :
:              : :...............:............:       :
:              : :      root     : EFGH :       :
:              : :...............:............:       :
:         tags : kvm,sheepdog                         :
:..............:......................................:



Patch:
diff --git a/SoftLayer/CLI/server/detail.py b/SoftLayer/CLI/server/detail.py
index 3af67468..78d03dec 100644
--- a/SoftLayer/CLI/server/detail.py
+++ b/SoftLayer/CLI/server/detail.py
@@ -88,6 +88,11 @@ def cli(env, identifier, passwords, price):
             pass_table.add_row([item['username'], item['password']])
         table.add_row(['users', pass_table])
 
+        pass_table = formatting.Table(['ipmi_username', 'password'])
+        for item in result['remoteManagementAccounts']:
+            pass_table.add_row([item['username'], item['password']])
+        table.add_row(['remote users', pass_table])
+
     tag_row = []
     for tag in result['tagReferences']:
         tag_row.append(tag['tag']['name'])
diff --git a/SoftLayer/managers/hardware.py b/SoftLayer/managers/hardware.py
index 29dde1b1..a4e74d79 100644
--- a/SoftLayer/managers/hardware.py
+++ b/SoftLayer/managers/hardware.py
@@ -293,6 +293,7 @@ def get_hardware(self, hardware_id, **kwargs):
                 'tagReferences[id,tag[name,id]]',
                 'networkVlans[id,vlanNumber,networkSpace]',
                 'billingItem.orderItem.order.userRecord[username]',
+                'remoteManagementAccounts[username,password]',
             ]
             kwargs['mask'] = "mask[%s]" % ','.join(items)
 


Test patch:
diff --git a/SoftLayer/testing/fixtures/SoftLayer_Hardware_Server.py b/SoftLayer/testing/fixtures/SoftLayer_Hardware_Server.py
index 6da486e1..dfe48363 100644
--- a/SoftLayer/testing/fixtures/SoftLayer_Hardware_Server.py
+++ b/SoftLayer/testing/fixtures/SoftLayer_Hardware_Server.py
@@ -38,6 +38,9 @@
             {'username': 'root', 'password': 'abc123'}
         ],
     },
+    'remoteManagementAccounts': [
+        {'username': 'root', 'password': 'abc123'}
+    ],
     'networkVlans': [
         {
             'networkSpace': 'PRIVATE',
diff --git a/SoftLayer/tests/CLI/modules/server_tests.py b/SoftLayer/tests/CLI/modules/server_tests.py
index f11b58a6..9c6c040f 100644
--- a/SoftLayer/tests/CLI/modules/server_tests.py
+++ b/SoftLayer/tests/CLI/modules/server_tests.py
@@ -102,7 +102,6 @@ def test_server_create_options_for_bmc(self, bmpi, packages):
     def test_server_details(self):
         result = self.run_command(['server', 'detail', '1234',
                                    '--passwords', '--price'])
-
         expected = {
             'cores': 2,
             'created': '2013-08-01 15:23:45',
@@ -121,6 +120,7 @@ def test_server_details(self):
             'private_ip': '10.1.0.2',
             'ptr': '2.0.1.10.in-addr.arpa',
             'public_ip': '172.16.1.100',
+            'remote users': [{'password': 'abc123', 'ipmi_username': 'root'}],
             'status': 'ACTIVE',
             'tags': ['test_tag'],
             'users': [{'password': 'abc123', 'username': 'root'}],