1515 type = click .Choice (['id' ,
1616 'identifier' ,
1717 'type' ,
18- 'address_space ' ,
18+ 'network_space ' ,
1919 'datacenter' ,
2020 'vlan_id' ,
2121 'IPs' ,
2525 help = "Filter by datacenter shortname (sng01, dal05, ...)" )
2626@click .option ('--identifier' , help = "Filter by network identifier" )
2727@click .option ('--subnet-type' , '-t' , help = "Filter by subnet type" )
28- @click .option ('--address -space' , help = "Filter by address space" )
28+ @click .option ('--network -space' , help = "Filter by network space" )
2929@click .option ('--v4' , '--ipv4' , is_flag = True , help = "Display only IPv4 subnets" )
3030@click .option ('--v6' , '--ipv6' , is_flag = True , help = "Display only IPv6 subnets" )
3131@environment .pass_env
32- def cli (env , sortby , datacenter , identifier , subnet_type , address_space ,
32+ def cli (env , sortby , datacenter , identifier , subnet_type , network_space ,
3333 ipv4 , ipv6 ):
3434 """List subnets."""
3535
3636 mgr = SoftLayer .NetworkManager (env .client )
3737
3838 table = formatting .Table ([
39- 'id' , 'identifier' , 'type' , 'address_space ' , 'datacenter' , 'vlan_id' ,
39+ 'id' , 'identifier' , 'type' , 'network_space ' , 'datacenter' , 'vlan_id' ,
4040 'IPs' , 'hardware' , 'vs' ,
4141 ])
4242 table .sortby = sortby
@@ -52,15 +52,17 @@ def cli(env, sortby, datacenter, identifier, subnet_type, address_space,
5252 version = version ,
5353 identifier = identifier ,
5454 subnet_type = subnet_type ,
55- address_space = address_space ,
55+ network_space = network_space ,
5656 )
5757
5858 for subnet in subnets :
5959 table .add_row ([
6060 subnet ['id' ],
6161 '%s/%s' % (subnet ['networkIdentifier' ], str (subnet ['cidr' ])),
6262 subnet .get ('subnetType' , formatting .blank ()),
63- subnet .get ('addressSpace' , formatting .blank ()),
63+ utils .lookup (subnet ,
64+ 'networkVlan' ,
65+ 'networkSpace' ) or formatting .blank (),
6466 utils .lookup (subnet , 'datacenter' , 'name' ,) or formatting .blank (),
6567 subnet ['networkVlanId' ],
6668 subnet ['ipAddressCount' ],
0 commit comments