throw new CloudRuntimeException("Cannot find related provider of virtual router provider: " + vrProvider.getType().toString());
}
final List<Long> routerGuestNtwkIds = _routerDao.getRouterNetworks(router.getId());
for (final Long guestNetworkId : routerGuestNtwkIds) {
AggregationControlCommand startCmd = new AggregationControlCommand(Action.Start, router.getInstanceName(), controlNic.getIp4Address(),
getRouterIpInNetwork(guestNetworkId, router.getId()));
cmds.addCommand(startCmd);
if (reprogramGuestNtwks) {
finalizeIpAssocForNetwork(cmds, router, provider, guestNetworkId, null);
finalizeNetworkRulesForNetwork(cmds, router, provider, guestNetworkId);
NetworkOffering offering = _networkOfferingDao.findById((_networkDao.findById(guestNetworkId)).getNetworkOfferingId());
//service monitoring is currently not added in RVR
if (!offering.getRedundantRouter()) {
String serviceMonitringSet = _configDao.getValue(Config.EnableServiceMonitoring.key());
if (serviceMonitringSet != null && serviceMonitringSet.equalsIgnoreCase("true")) {
finalizeMonitorServiceOnStrat(cmds, profile, router, provider, guestNetworkId, true);
} else {
finalizeMonitorServiceOnStrat(cmds, profile, router, provider, guestNetworkId, false);
}
}
}
finalizeUserDataAndDhcpOnStart(cmds, router, provider, guestNetworkId);
AggregationControlCommand finishCmd = new AggregationControlCommand(Action.Finish, router.getInstanceName(), controlNic.getIp4Address(),
getRouterIpInNetwork(guestNetworkId, router.getId()));
cmds.addCommand(finishCmd);
}