Search in sources :

Example 1 with ConfigureSharedNetworkUuidCommand

use of com.cloud.agent.api.ConfigureSharedNetworkUuidCommand in project cloudstack by apache.

the class NiciraNvpElement method sharedNetworkSupportUUIDVlanId.

private boolean sharedNetworkSupportUUIDVlanId(Network network, String lSwitchUuid, String ownerName, HostVO niciraNvpHost) {
    String networkCidr = network.getCidr();
    String vlanGateway = network.getGateway();
    String portIpAddress = createLogicalRouterPortIpAddress(networkCidr, vlanGateway);
    NiciraNvpRouterMappingVO mapRouterNetwork = niciraNvpRouterMappingDao.findByNetworkId(network.getId());
    String lRouterUuid = mapRouterNetwork.getLogicalRouterUuid();
    ConfigureSharedNetworkUuidCommand cmd = new ConfigureSharedNetworkUuidCommand(lRouterUuid, lSwitchUuid, portIpAddress, ownerName, network.getId());
    ConfigureSharedNetworkUuidAnswer answer = (ConfigureSharedNetworkUuidAnswer) agentMgr.easySend(niciraNvpHost.getId(), cmd);
    if (answer.getResult() == false) {
        s_logger.error("Failed to configure Logical Router for Shared network " + network.getDisplayText());
        return false;
    }
    return true;
}
Also used : ConfigureSharedNetworkUuidAnswer(com.cloud.agent.api.ConfigureSharedNetworkUuidAnswer) NiciraNvpRouterMappingVO(com.cloud.network.NiciraNvpRouterMappingVO) ConfigureSharedNetworkUuidCommand(com.cloud.agent.api.ConfigureSharedNetworkUuidCommand)

Aggregations

ConfigureSharedNetworkUuidAnswer (com.cloud.agent.api.ConfigureSharedNetworkUuidAnswer)1 ConfigureSharedNetworkUuidCommand (com.cloud.agent.api.ConfigureSharedNetworkUuidCommand)1 NiciraNvpRouterMappingVO (com.cloud.network.NiciraNvpRouterMappingVO)1