Skip to content

Commit 62f39af

Browse files
committed
Do not fail if the source or destination subnet mask does not exist for ipv6 rules.
1 parent efe03bc commit 62f39af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SoftLayer/CLI/firewall/detail.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from SoftLayer.CLI import environment
88
from SoftLayer.CLI import firewall
99
from SoftLayer.CLI import formatting
10-
10+
from SoftLayer import utils
1111

1212
@click.command()
1313
@click.argument('identifier')
@@ -41,9 +41,9 @@ def get_rules_table(rules):
4141
rule['action'],
4242
rule['protocol'],
4343
rule['sourceIpAddress'],
44-
rule['sourceIpSubnetMask'],
44+
utils.lookup(rule, 'sourceIpSubnetMask'),
4545
'%s:%s-%s' % (rule['destinationIpAddress'],
4646
rule['destinationPortRangeStart'],
4747
rule['destinationPortRangeEnd']),
48-
rule['destinationIpSubnetMask']])
48+
utils.lookup(rule, 'destinationIpSubnetMask')])
4949
return table

0 commit comments

Comments
 (0)