Skip to content

Commit 73ad86d

Browse files
Merge pull request #1899 from caberos/issue1821
slcli firewall detail multiVlan:14109 --credentials
2 parents d153ce3 + 2032088 commit 73ad86d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

SoftLayer/CLI/firewall/detail.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
@click.command(cls=SoftLayer.CLI.command.SLCommand, )
1414
@click.argument('identifier')
15-
@click.option('--credentials', type=click.BOOL,
15+
@click.option('--password', is_flag=True,
1616
help="Display FortiGate username and FortiGate password to multi vlans.")
1717
@environment.pass_env
18-
def cli(env, identifier, credentials):
18+
def cli(env, identifier, password):
1919
"""Detail firewall.
2020
2121
EXAMPLES:
@@ -63,7 +63,7 @@ def cli(env, identifier, credentials):
6363
table.add_row(['private vlan', utils.lookup(_firewall, 'networkGateway', 'privateVlan', 'vlanNumber')])
6464
table.add_row(['type', _firewall.get('firewallType')])
6565

66-
if credentials:
66+
if password:
6767
table.add_row(['fortiGate username', utils.lookup(_firewall, 'managementCredentials', 'username')])
6868
table.add_row(['fortiGate password', utils.lookup(_firewall, 'managementCredentials', 'password')])
6969

tests/CLI/modules/firewall_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_detail_vlan_firewall(self):
7373
'src_mask': '0.0.0.0'}]})
7474

7575
def test_detail_multi_vlan_firewall(self):
76-
result = self.run_command(['firewall', 'detail', 'multiVlan:1234', '--credentials', 'true'])
76+
result = self.run_command(['firewall', 'detail', 'multiVlan:1234', '--password'])
7777
self.assert_no_fail(result)
7878
json_result = json.loads(result.output)
7979
self.assertEqual(json_result['rules'][0]['action'], 'permit')

0 commit comments

Comments
 (0)