Skip to content

Commit 4dd71cb

Browse files
author
Alena Prokharchyk
committed
VPC: CS-15562 - get info about VR's guest networks from nics table
1 parent 534e6d4 commit 4dd71cb

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎server/src/com/cloud/network/firewall/FirewallManagerImpl.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ public boolean revokeFirewallRulesForIp(long ipId, long userId, Account caller)
585585

586586
for (FirewallRuleVO rule : fwRules) {
587587
// Mark all Firewall rules as Revoke, but don't revoke them yet - we have to revoke all rules for ip, no
588-
// need to send them one by one
588+
// need to send them one by one
589589
revokeFirewallRule(rule.getId(), false, caller, Account.ACCOUNT_ID_SYSTEM);
590590
}
591591

‎server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,6 @@ public boolean finalizeCommandsOnStart(Commands cmds, VirtualMachineProfile<Doma
776776

777777
finalizeSshAndVersionAndNetworkUsageOnStart(cmds, profile, router, controlNic);
778778

779-
780779
//2) FORM PLUG NIC COMMANDS
781780
Map<Nic, Network> guestNics = new HashMap<Nic, Network>();
782781
Map<Nic, Network> publicNics = new HashMap<Nic, Network>();
@@ -894,14 +893,13 @@ public boolean finalizeCommandsOnStart(Commands cmds, VirtualMachineProfile<Doma
894893
throw new CloudRuntimeException("Cannot find related provider of virtual router provider: " + vrProvider.getType().toString());
895894
}
896895

897-
List<Long> routerGuestNtwkIds = _routerDao.getRouterNetworks(router.getId());
898-
for (Long guestNetworkId : routerGuestNtwkIds) {
896+
for (Nic nic : guestNics.keySet()) {
899897
if (reprogramGuestNtwks) {
900-
finalizeIpAssocForNetwork(cmds, router, provider, guestNetworkId);
901-
finalizeNetworkRulesForNetwork(cmds, router, provider, guestNetworkId);
898+
finalizeIpAssocForNetwork(cmds, router, provider, nic.getNetworkId());
899+
finalizeNetworkRulesForNetwork(cmds, router, provider, nic.getNetworkId());
902900
}
903901

904-
finalizeUserDataAndDhcpOnStart(cmds, router, provider, guestNetworkId);
902+
finalizeUserDataAndDhcpOnStart(cmds, router, provider, nic.getNetworkId());
905903
}
906904

907905
return true;

0 commit comments

Comments
 (0)