Skip to content

Commit 73df078

Browse files
weizhouapachesureshanaparti
authored andcommitted
server: fix conserve_mode of DefaultIsolatedNetworkOfferingForVpcNetworks (apache#11133)
* server: fix conserve_mode of DefaultIsolatedNetworkOfferingForVpcNetworks * test: update test_network_acl.py to test conserve mode * Update test/integration/smoke/test_network_acl.py Co-authored-by: Suresh Kumar Anaparti <[email protected]>
1 parent 236a6b5 commit 73df078

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,3 +754,6 @@ SET `cs`.`domain_id` = (
754754
FROM `cloud`.`account` `acc`
755755
WHERE `acc`.`id` = `cs`.`account_id`
756756
);
757+
758+
-- Re-apply VPC: update default network offering for vpc tier to conserve_mode=1 (#8309)
759+
UPDATE `cloud`.`network_offerings` SET conserve_mode = 1 WHERE name = 'DefaultIsolatedNetworkOfferingForVpcNetworks';

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+
vm,
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)