Skip to content

Commit dd50060

Browse files
author
Brian Flores
committed
fix observations
1 parent 9a07660 commit dd50060

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

SoftLayer/CLI/firewall/detail.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,14 @@ def cli(env, identifier, credentials):
5757
table.add_row(['type', _firewall.get('firewallType')])
5858

5959
if credentials:
60-
table.add_row(['FortiGate username', utils.lookup(_firewall, 'managementCredentials', 'username')])
61-
table.add_row(['FortiGate password', utils.lookup(_firewall, 'managementCredentials', 'password')])
60+
table.add_row(['fortiGate username', utils.lookup(_firewall, 'managementCredentials', 'username')])
61+
table.add_row(['fortiGate password', utils.lookup(_firewall, 'managementCredentials', 'password')])
6262

6363
rules = mgr.get_dedicated_fwl_rules(firewall_id)
64-
table.add_row(['rules', get_rules_table(rules)])
64+
if len(rules) != 0:
65+
table.add_row(['rules', get_rules_table(rules)])
66+
else:
67+
table.add_row(['rules', '-'])
6568

6669
if firewall_type == 'vs' or firewall_type == 'server':
6770
rules = mgr.get_standard_fwl_rules(firewall_id)

tests/CLI/modules/firewall_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def test_detail_multi_vlan_firewall(self):
102102
'public vlan': 1255,
103103
'private vlan': 1330,
104104
'type': 'fortigate-security-appliance-10gb',
105-
'FortiGate username': 'myusername',
106-
'FortiGate password': 'test1234',
105+
'fortiGate username': 'myusername',
106+
'fortiGate password': 'test1234',
107107
'rules': [{'#': 1,
108108
'action': 'permit',
109109
'dest': 'any on server:80-80',

0 commit comments

Comments
 (0)