Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

ALTER TABLE `cloud`.`mshost` MODIFY COLUMN `state` varchar(25);

UPDATE `cloud`.`network_offerings` SET conserve_mode=1 WHERE name='DefaultIsolatedNetworkOfferingForVpcNetworks';

-- Invalidate existing console_session records
UPDATE `cloud`.`console_session` SET removed=now();
-- Modify acquired column in console_session to datetime type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1809,9 +1809,9 @@ public void validateNtwkOffForVpc(final NetworkOffering guestNtwkOff, final List
* ("No redunant router support when network belnogs to VPC"); }
*/

// 4) Conserve mode should be off
// 4) Conserve mode should be off in older versions
if (guestNtwkOff.isConserveMode()) {
throw new InvalidParameterValueException("Only networks with conserve mode Off can belong to VPC");
s_logger.info("Creating a network with conserve mode in VPC");
}

// 5) If Netscaler is LB provider make sure it is in dedicated mode
Expand Down
10 changes: 5 additions & 5 deletions test/integration/component/test_vpc_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,23 +1001,23 @@ def test_10_create_network_with_conserve_mode(self, value):
# 1. Create a network offering with guest type=Isolated that has all
# supported Services(Vpn,dhcpdns,UserData, SourceNat,Static NAT,LB
# and PF,LB,NetworkAcl ) provided by VPCVR and conserve mode is ON
# 2. Create offering fails since Conserve mode ON isn't allowed within
# VPC
# 2. Create offering should succeed since Conserve mode ON is allowed within
# VPC since https://github.com/apache/cloudstack/pull/8309
# 3. Repeat test for offering which has Netscaler as external LB
# provider
"""

self.debug("Creating network offering with conserve mode = ON")

with self.assertRaises(Exception):
try:
nw = NetworkOffering.create(
self.apiclient,
self.services[value],
conservemode=True
)
self.cleanup.append(nw)
self.debug(
"Network creation failed as VPC support nw with conserve mode OFF")
except Exception as e:
self.warn("Network creation failed in VPC with conserve mode ON")
return


Expand Down