Skip to content

Commit 8a75ea2

Browse files
caberoscaberos
authored andcommitted
add new columns on vlan list(premium, tags)
1 parent a071f3e commit 8a75ea2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

SoftLayer/CLI/vlan/list.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
'datacenter',
1717
'hardware',
1818
'virtual_servers',
19-
'public_ips']
19+
'public_ips',
20+
'premium',
21+
'tag']
2022

2123

2224
@click.command(cls=SoftLayer.CLI.command.SLCommand, )
@@ -45,6 +47,8 @@ def cli(env, sortby, datacenter, number, name, limit):
4547
name=name,
4648
limit=limit)
4749
for vlan in vlans:
50+
billing = 'Yes' if vlan.get('billingItem') else 'No'
51+
4852
table.add_row([
4953
vlan.get('id'),
5054
vlan.get('vlanNumber'),
@@ -54,6 +58,8 @@ def cli(env, sortby, datacenter, number, name, limit):
5458
vlan.get('hardwareCount'),
5559
vlan.get('virtualGuestCount'),
5660
vlan.get('totalPrimaryIpAddressCount'),
61+
billing,
62+
formatting.tags(vlan['tagReferences'])
5763
])
5864

5965
env.fout(table)

SoftLayer/managers/network.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@
4040
'hardwareCount',
4141
'primaryRouter[id, fullyQualifiedDomainName, datacenter]',
4242
'subnetCount',
43+
'billingItem',
4344
'totalPrimaryIpAddressCount',
4445
'virtualGuestCount',
4546
'networkSpace',
4647
'networkVlanFirewall[id,fullyQualifiedDomainName,primaryIpAddress]',
4748
'attachedNetworkGateway[id,name,networkFirewall]',
49+
'tagReferences[tag[name]]',
4850
])
4951
DEFAULT_GET_VLAN_MASK = ','.join([
5052
'firewallInterfaces',

0 commit comments

Comments
 (0)