Skip to content

Commit af3dead

Browse files
committed
test: update test_network_acl.py to test conserve mode
1 parent 7243cd3 commit af3dead

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/integration/smoke/test_network_acl.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,32 @@ def test_network_acl(self):
125125
self.assertTrue(vm.state == 'Running', "VM is not running")
126126
self.debug("VM %s deployed in VPC %s" %(vm.id, vpc.id))
127127

128+
# 6) Acquire a Public IP, and add Load Balancing Rule
129+
public_ip = PublicIPAddress.create(
130+
self.apiclient,
131+
zoneid=self.zone.id,
132+
accountid=self.account.name,
133+
domainid= self.domain.id,
134+
vpcid= vpc.id
135+
)
136+
LoadBalancerRule.create(
137+
self.apiclient,
138+
self.services["lbrule"],
139+
ipaddressid=public_ip.ipaddress.id,
140+
accountid=self.account.name,
141+
vpcid= vpc.id,
142+
networkid=ntwk.id,
143+
domainid=self.account.domainid)
144+
145+
# 7) Add Port Forwarding Rule with same Public IP to test conserve mode
146+
NATRule.create(
147+
self.apiclient,
148+
self.virtual_machine,
149+
self.services["natrule"],
150+
ipaddressid=public_ip.ipaddress.id,
151+
vpcid= vpc.id,
152+
networkid=ntwk.id)
153+
128154
@classmethod
129155
def tearDownClass(cls):
130156
try:

0 commit comments

Comments
 (0)