Skip to content

Commit 592804f

Browse files
Merge pull request #1966 from caberos/issue1962
update the network vlan on hardware detail
2 parents 0a8aea1 + 4a1636e commit 592804f

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

SoftLayer/CLI/hardware/detail.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from SoftLayer.CLI import helpers
1010
from SoftLayer import utils
1111

12+
1213
# pylint: disable=R0915
1314

1415

@@ -71,9 +72,11 @@ def cli(env, identifier, passwords, price, components):
7172
table.add_row(['last_transaction', last_transaction])
7273
table.add_row(['billing', 'Hourly' if result['hourlyBillingFlag'] else 'Monthly'])
7374

74-
vlan_table = formatting.Table(['type', 'number', 'id'])
75+
vlan_table = formatting.Table(['type', 'number', 'id', 'name', 'netmask'])
7576
for vlan in result['networkVlans']:
76-
vlan_table.add_row([vlan['networkSpace'], vlan['vlanNumber'], vlan['id']])
77+
vlan_table.add_row([vlan['networkSpace'], vlan['vlanNumber'],
78+
vlan['id'], vlan['fullyQualifiedName'],
79+
vlan['primarySubnets'][0]['netmask']])
7780

7881
table.add_row(['vlans', vlan_table])
7982

SoftLayer/fixtures/SoftLayer_Hardware_Server.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,20 @@
5757
{
5858
'networkSpace': 'PRIVATE',
5959
'vlanNumber': 1800,
60-
'id': 9653
60+
'id': 9653,
61+
'fullyQualifiedName': 'dal10.bcr03.14752',
62+
'primarySubnets': [{
63+
'netmask': ''
64+
}]
6165
},
6266
{
6367
'networkSpace': 'PUBLIC',
6468
'vlanNumber': 3672,
65-
'id': 19082
69+
'id': 19082,
70+
'fullyQualifiedName': 'dal10.test03.123',
71+
'primarySubnets': [{
72+
'netmask': ''
73+
}]
6674
},
6775
],
6876
'tagReferences': [

SoftLayer/managers/hardware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def get_hardware(self, hardware_id, **kwargs):
269269
'lastTransaction[transactionGroup],'
270270
'hourlyBillingFlag,'
271271
'tagReferences[id,tag[name,id]],'
272-
'networkVlans[id,vlanNumber,networkSpace],'
272+
'networkVlans[id,vlanNumber,networkSpace, fullyQualifiedName,primarySubnets[ipAddresses]],'
273273
'monitoringServiceComponent,networkMonitors[queryType,lastResult,responseAction],'
274274
'remoteManagementAccounts[username,password]'
275275
)

0 commit comments

Comments
 (0)