Search in sources :

Example 1 with SetupVRCommand

use of com.cloud.legacymodel.communication.command.SetupVRCommand in project cosmic by MissionCriticalCloud.

the class CommandSetupHelper method createVRConfigCommands.

public void createVRConfigCommands(final Vpc vpc, final DomainRouterVO router, final Commands cmds) {
    final SetupVRCommand cmd = new SetupVRCommand(vpc);
    cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, _routerControlHelper.getRouterControlIp(router.getId()));
    cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());
    final Zone zone = zoneRepository.findById(router.getDataCenterId()).orElse(null);
    cmd.setAccessDetail(NetworkElementCommand.ZONE_NETWORK_TYPE, zone.getNetworkType().toString());
    cmds.addCommand(cmd);
}
Also used : Zone(com.cloud.db.model.Zone) SetupVRCommand(com.cloud.legacymodel.communication.command.SetupVRCommand)

Aggregations

Zone (com.cloud.db.model.Zone)1 SetupVRCommand (com.cloud.legacymodel.communication.command.SetupVRCommand)1