Search in sources :

Example 16 with NetworkOverviewTO

use of com.cloud.legacymodel.to.NetworkOverviewTO in project cosmic by MissionCriticalCloud.

the class AdvancedNetworkVisitor method visit.

@Override
public boolean visit(final AdvancedVpnRules vpnRules) throws ResourceUnavailableException {
    final VirtualRouter router = vpnRules.getRouter();
    final Commands cmds = new Commands(Command.OnError.Continue);
    final NetworkOverviewTO networkOverview = _commandSetupHelper.createNetworkOverviewFromRouter(router, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), null, null, null);
    final UpdateNetworkOverviewCommand updateNetworkOverviewCommand = _commandSetupHelper.createUpdateNetworkOverviewCommand(router, networkOverview);
    cmds.addCommand(updateNetworkOverviewCommand);
    // results accordingly
    return _networkGeneralHelper.sendCommandsToRouter(router, cmds);
}
Also used : Commands(com.cloud.agent.manager.Commands) NetworkOverviewTO(com.cloud.legacymodel.to.NetworkOverviewTO) UpdateNetworkOverviewCommand(com.cloud.legacymodel.communication.command.UpdateNetworkOverviewCommand) VirtualRouter(com.cloud.legacymodel.network.VirtualRouter)

Aggregations

NetworkOverviewTO (com.cloud.legacymodel.to.NetworkOverviewTO)16 UpdateNetworkOverviewCommand (com.cloud.legacymodel.communication.command.UpdateNetworkOverviewCommand)14 Commands (com.cloud.agent.manager.Commands)13 ResourceUnavailableException (com.cloud.legacymodel.exceptions.ResourceUnavailableException)9 ArrayList (java.util.ArrayList)8 CloudRuntimeException (com.cloud.legacymodel.exceptions.CloudRuntimeException)6 ConcurrentOperationException (com.cloud.legacymodel.exceptions.ConcurrentOperationException)6 ConfigurationException (javax.naming.ConfigurationException)6 DataCenter (com.cloud.legacymodel.dc.DataCenter)5 Ip (com.cloud.legacymodel.network.Ip)5 Network (com.cloud.legacymodel.network.Network)5 VirtualRouter (com.cloud.legacymodel.network.VirtualRouter)5 Vpc (com.cloud.legacymodel.network.vpc.Vpc)4 UpdateVmOverviewCommand (com.cloud.legacymodel.communication.command.UpdateVmOverviewCommand)2 Nic (com.cloud.legacymodel.network.Nic)2 LoadBalancerTO (com.cloud.legacymodel.to.LoadBalancerTO)2 PublicIpAddress (com.cloud.network.PublicIpAddress)2 PrivateIpAddress (com.cloud.network.vpc.PrivateIpAddress)2 PrivateIpVO (com.cloud.network.vpc.PrivateIpVO)2 DomainRouterVO (com.cloud.vm.DomainRouterVO)2