// TODO : This is a hacking fix
// at VR startup time, information in VirtualMachineProfile may not updated to DB yet,
// getRouterControlIp() may give wrong IP under basic network mode in VMware environment
final NicProfile controlNic = getControlNic(profile);
final SetMonitorServiceCommand command = new SetMonitorServiceCommand(servicesTO);
command.setAccessDetail(NetworkElementCommand.ROUTER_IP, controlNic.getIp4Address());
command.setAccessDetail(NetworkElementCommand.ROUTER_GUEST_IP, getRouterIpInNetwork(networkId, router.getId()));
command.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());
if (!add) {
command.setAccessDetail(NetworkElementCommand.ROUTER_MONITORING_ENABLE, add.toString());
}
cmds.addCommand("monitor", command);
}