2121 'IPs' ,
2222 'hardware' ,
2323 'vs' ]))
24- @click .option ('--datacenter' , '-d' ,
25- help = "Filter by datacenter shortname (sng01, dal05, ...)" )
26- @click .option ('--identifier' , help = "Filter by network identifier" )
27- @click .option ('--subnet-type' , '-t' , help = "Filter by subnet type" )
28- @click .option ('--network-space' , help = "Filter by network space" )
29- @click .option ('--ipv4' , '--v4' , is_flag = True , help = "Display only IPv4 subnets" )
30- @click .option ('--ipv6' , '--v6' , is_flag = True , help = "Display only IPv6 subnets" )
3124@environment .pass_env
32- def cli (env , sortby , datacenter , identifier , subnet_type , network_space , ipv4 , ipv6 ):
25+ def cli (env , sortby ):
3326 """List subnets."""
3427
3528 mgr = SoftLayer .NetworkManager (env .client )
@@ -40,19 +33,7 @@ def cli(env, sortby, datacenter, identifier, subnet_type, network_space, ipv4, i
4033 ])
4134 table .sortby = sortby
4235
43- version = 0
44- if ipv4 :
45- version = 4
46- elif ipv6 :
47- version = 6
48-
49- subnets = mgr .list_subnets (
50- datacenter = datacenter ,
51- version = version ,
52- identifier = identifier ,
53- subnet_type = subnet_type ,
54- network_space = network_space ,
55- )
36+ subnets = mgr .list_subnets ()
5637
5738 for subnet in subnets :
5839 table .add_row ([
@@ -62,7 +43,7 @@ def cli(env, sortby, datacenter, identifier, subnet_type, network_space, ipv4, i
6243 utils .lookup (subnet ,
6344 'networkVlan' ,
6445 'networkSpace' ) or formatting .blank (),
65- utils .lookup (subnet , 'datacenter' , 'name' ,) or formatting .blank (),
46+ utils .lookup (subnet , 'datacenter' , 'name' , ) or formatting .blank (),
6647 subnet ['networkVlanId' ],
6748 subnet ['ipAddressCount' ],
6849 len (subnet ['hardware' ]),
0 commit comments