forked from softlayer/softlayer-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirewall_tests.py
More file actions
30 lines (24 loc) · 1.02 KB
/
firewall_tests.py
File metadata and controls
30 lines (24 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
SoftLayer.tests.CLI.modules.firewall_tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:license: MIT, see LICENSE for more details.
"""
import json
from SoftLayer import testing
class FirewallTests(testing.TestCase):
def test_list_firewalls(self):
result = self.run_command(['firewall', 'list'])
self.assert_no_fail(result)
self.assertEqual(json.loads(result.output),
[{'type': 'VLAN - dedicated',
'server/vlan id': 1,
'features': ['HA'],
'firewall id': 'vlan:1234'},
{'features': '-',
'firewall id': 'vs:1234',
'server/vlan id': 1,
'type': 'Virtual Server - standard'},
{'features': '-',
'firewall id': 'server:1234',
'server/vlan id': 1,
'type': 'Server - standard'}])