Skip to content

Commit a3352f1

Browse files
Merge pull request #2181 from allmightyspiff/issues2153
Improved the formatting of hardware details page
2 parents 332d3ea + c4bded1 commit a3352f1

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

SoftLayer/CLI/hardware/detail.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,13 @@ def _bw_table(bw_data):
173173

174174

175175
def _system_table(system_data):
176-
table = formatting.Table(['Type', 'name'])
176+
table = formatting.Table(['Type', 'Name'])
177+
table.align['Type'] = 'r'
178+
table.align['Name'] = 'l'
179+
table.sortby = 'Type'
177180
for system in system_data:
178-
table.add_row([utils.lookup(system, 'hardwareComponentModel',
179-
'hardwareGenericComponentModel',
180-
'hardwareComponentType', 'keyName'),
181-
utils.lookup(system, 'hardwareComponentModel', 'longDescription')])
181+
c_type = utils.lookup(system, 'hardwareComponentModel', 'hardwareGenericComponentModel',
182+
'hardwareComponentType', 'keyName')
183+
c_name = utils.lookup(system, 'hardwareComponentModel', 'longDescription')
184+
table.add_row([c_type, c_name])
182185
return table

snap/snapcraft.yaml

+2-11
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,17 @@ adopt-info: slcli
33
summary: A CLI tool to interact with the SoftLayer API.
44
description: |
55
A command-line interface is also included and can be used to manage various SoftLayer products and services.
6+
SLCLI documentation can be found here: https://softlayer-python.readthedocs.io/en/latest/
67
78
license: MIT
89

910
base: core22
1011
grade: stable
1112
confinement: strict
1213

13-
assumes:
14-
- command-chain
15-
1614
apps:
1715
slcli:
1816
command: bin/slcli
19-
command-chain:
20-
- bin/homeishome-launch
2117
environment:
2218
LC_ALL: C.UTF-8
2319
plugs:
@@ -38,9 +34,4 @@ parts:
3834
- python3
3935

4036
stage-packages:
41-
- python3
42-
43-
homeishome-launch:
44-
plugin: nil
45-
stage-snaps:
46-
- homeishome-launch
37+
- python3

0 commit comments

Comments
 (0)