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;
}
Aggregations