mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
server: fix conserve_mode of DefaultIsolatedNetworkOfferingForVpcNetworks (#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 <sureshkumar.anaparti@gmail.com>
This commit is contained in:
parent
0b381d4270
commit
03da8cbd3e
@ -754,3 +754,6 @@ SET `cs`.`domain_id` = (
|
||||
FROM `cloud`.`account` `acc`
|
||||
WHERE `acc`.`id` = `cs`.`account_id`
|
||||
);
|
||||
|
||||
-- Re-apply VPC: update default network offering for vpc tier to conserve_mode=1 (#8309)
|
||||
UPDATE `cloud`.`network_offerings` SET conserve_mode = 1 WHERE name = 'DefaultIsolatedNetworkOfferingForVpcNetworks';
|
||||
|
||||
@ -1119,7 +1119,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
|
||||
NetworkOfferingVO defaultNetworkOfferingForVpcNetworks =
|
||||
new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworks,
|
||||
"Offering for Isolated Vpc networks with Source Nat service enabled", TrafficType.Guest, false, false, null, null, true, Availability.Optional,
|
||||
null, Network.GuestType.Isolated, false, false, false, false, true, true);
|
||||
null, Network.GuestType.Isolated, true, false, false, false, true, true);
|
||||
|
||||
defaultNetworkOfferingForVpcNetworks.setState(NetworkOffering.State.Enabled);
|
||||
defaultNetworkOfferingForVpcNetworks.setSupportsVmAutoScaling(true);
|
||||
|
||||
@ -125,6 +125,32 @@ class TestNetworkACL(cloudstackTestCase):
|
||||
self.assertTrue(vm.state == 'Running', "VM is not running")
|
||||
self.debug("VM %s deployed in VPC %s" %(vm.id, vpc.id))
|
||||
|
||||
# 6) Acquire a Public IP, and add Load Balancing Rule
|
||||
public_ip = PublicIPAddress.create(
|
||||
self.apiclient,
|
||||
zoneid=self.zone.id,
|
||||
accountid=self.account.name,
|
||||
domainid=self.domain.id,
|
||||
vpcid=vpc.id
|
||||
)
|
||||
LoadBalancerRule.create(
|
||||
self.apiclient,
|
||||
self.services["lbrule"],
|
||||
ipaddressid=public_ip.ipaddress.id,
|
||||
accountid=self.account.name,
|
||||
vpcid=vpc.id,
|
||||
networkid=ntwk.id,
|
||||
domainid=self.account.domainid)
|
||||
|
||||
# 7) Add Port Forwarding Rule with same Public IP to test conserve mode
|
||||
NATRule.create(
|
||||
self.apiclient,
|
||||
vm,
|
||||
self.services["natrule"],
|
||||
ipaddressid=public_ip.ipaddress.id,
|
||||
vpcid=vpc.id,
|
||||
networkid=ntwk.id)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user