cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [03/50] [abbrv] apply network acls; acls items to pvt gw; vpc ip association
Date Tue, 14 Oct 2014 18:15:21 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b97f2b05/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
b/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
index 794ed4c..05ad17f 100644
--- a/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
+++ b/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
@@ -27,10 +27,16 @@ import org.springframework.stereotype.Component;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.network.Network;
+import com.cloud.network.PublicIpAddress;
+import com.cloud.network.router.VirtualRouter;
 import com.cloud.network.rules.DhcpEntryRules;
+import com.cloud.network.rules.NetworkAclsRules;
+import com.cloud.network.rules.NicPlugInOutRules;
 import com.cloud.network.rules.RuleApplier;
 import com.cloud.network.rules.RuleApplierWrapper;
 import com.cloud.network.rules.UserdataPwdRules;
+import com.cloud.network.rules.VpcIpAssociationRules;
+import com.cloud.network.vpc.NetworkACLItem;
 import com.cloud.vm.DomainRouterVO;
 import com.cloud.vm.NicProfile;
 import com.cloud.vm.VirtualMachineProfile;
@@ -48,7 +54,7 @@ public class AdvancedNetworkTopology extends BasicNetworkTopology {
     public boolean applyUserData(final Network network, final NicProfile nic, final VirtualMachineProfile
profile, final DeployDestination dest, final List<DomainRouterVO> routers)
             throws ResourceUnavailableException {
 
-        s_logger.debug("APPLYING USERDATA RULES");
+        s_logger.debug("APPLYING VPC USERDATA RULES");
 
         final String typeString = "userdata and password entry";
         final boolean isPodLevelException = false;
@@ -64,7 +70,7 @@ public class AdvancedNetworkTopology extends BasicNetworkTopology {
     public boolean applyDhcpEntry(final Network network, final NicProfile nic, final VirtualMachineProfile
profile, final DeployDestination dest,
             final List<DomainRouterVO> routers) throws ResourceUnavailableException
{
 
-        s_logger.debug("APPLYING DHCP ENTRY RULES");
+        s_logger.debug("APPLYING VPC DHCP ENTRY RULES");
 
         final String typeString = "dhcp entry";
         final Long podId = null;
@@ -75,4 +81,48 @@ public class AdvancedNetworkTopology extends BasicNetworkTopology {
 
         return applyRules(network, routers, typeString, isPodLevelException, podId, failWhenDisconnect,
new RuleApplierWrapper<RuleApplier>(dhcpRules));
     }
+
+    @Override
+    public boolean associatePublicIP(final Network network, final List<? extends PublicIpAddress>
ipAddresses, final List<? extends VirtualRouter> routers)
+            throws ResourceUnavailableException {
+        if (ipAddresses == null || ipAddresses.isEmpty()) {
+            s_logger.debug("No ip association rules to be applied for network " + network.getId());
+            return true;
+        }
+
+        //only one router is supported in VPC now
+        VirtualRouter router = routers.get(0);
+
+        if (router.getVpcId() == null) {
+            return super.associatePublicIP(network, ipAddresses, routers);
+        }
+
+        s_logger.debug("APPLYING VPC IP RULES");
+
+        final String typeString = "vpc ip association";
+        final boolean isPodLevelException = false;
+        final boolean failWhenDisconnect = false;
+        final Long podId = null;
+
+        NicPlugInOutRules nicPlugInOutRules = _virtualNetworkApplianceFactory.createNicPluInOutRules(network,
ipAddresses);
+        VpcIpAssociationRules ipAssociationRules = _virtualNetworkApplianceFactory.createVpcIpAssociationRules(network,
ipAddresses, nicPlugInOutRules);
+
+        return applyRules(network, routers, typeString, isPodLevelException, podId, failWhenDisconnect,
new RuleApplierWrapper<RuleApplier>(ipAssociationRules));
+    }
+
+    @Override
+    public boolean applyNetworkACLs(final Network network, final List<? extends NetworkACLItem>
rules, final List<? extends VirtualRouter> routers, final boolean isPrivateGateway)
+            throws ResourceUnavailableException {
+
+        s_logger.debug("APPLYING NETWORK ACLs RULES");
+
+        final String typeString = "network acls";
+        final boolean isPodLevelException = false;
+        final boolean failWhenDisconnect = false;
+        final Long podId = null;
+
+        NetworkAclsRules aclsRules = _virtualNetworkApplianceFactory.createNetworkAclRules(network,
rules, isPrivateGateway);
+
+        return applyRules(network, routers, typeString, isPodLevelException, podId, failWhenDisconnect,
new RuleApplierWrapper<RuleApplier>(aclsRules));
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b97f2b05/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkVisitor.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkVisitor.java
b/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkVisitor.java
index ae5951f..35c1755 100644
--- a/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkVisitor.java
+++ b/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkVisitor.java
@@ -17,21 +17,25 @@
 
 package org.apache.cloudstack.network.topology;
 
+import java.util.List;
+import java.util.Map;
+
 import org.springframework.stereotype.Component;
 
 import com.cloud.agent.api.Command;
 import com.cloud.agent.manager.Commands;
 import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.Network;
+import com.cloud.network.PublicIpAddress;
 import com.cloud.network.router.VirtualRouter;
 import com.cloud.network.rules.DhcpEntryRules;
 import com.cloud.network.rules.DhcpSubNetRules;
 import com.cloud.network.rules.NetworkAclsRules;
-import com.cloud.network.rules.PasswordToRouterRules;
+import com.cloud.network.rules.NicPlugInOutRules;
 import com.cloud.network.rules.PrivateGatewayRules;
-import com.cloud.network.rules.SshKeyToRouterRules;
 import com.cloud.network.rules.UserdataPwdRules;
-import com.cloud.network.rules.UserdataToRouterRules;
 import com.cloud.network.rules.VpcIpAssociationRules;
+import com.cloud.network.vpc.NetworkACLItem;
 import com.cloud.vm.NicVO;
 import com.cloud.vm.UserVmVO;
 import com.cloud.vm.VirtualMachineProfile;
@@ -68,28 +72,41 @@ public class AdvancedNetworkVisitor extends BasicNetworkVisitor {
     }
 
     @Override
-    public boolean visit(final SshKeyToRouterRules sshkey) throws ResourceUnavailableException
{
-        return false;
-    }
+    public boolean visit(final NicPlugInOutRules nicPlugInOutRules) throws ResourceUnavailableException
{
+        final VirtualRouter router = nicPlugInOutRules.getRouter();
 
-    @Override
-    public boolean visit(final PasswordToRouterRules pwd) throws ResourceUnavailableException
{
-        return false;
+        final Commands commands = nicPlugInOutRules.getNetUsageCommands();
+
+        return _applianceManager.sendCommandsToRouter(router, commands);
     }
 
     @Override
     public boolean visit(final NetworkAclsRules acls) throws ResourceUnavailableException
{
-        return false;
+        final VirtualRouter router = acls.getRouter();
+        final Network network = acls.getNetwork();
+
+        Commands commands = new Commands(Command.OnError.Continue);
+        List<? extends NetworkACLItem> rules = acls.getRules();
+        acls.createNetworkACLsCommands(rules, router, commands, network.getId(), acls.isPrivateGateway());
+
+        return _applianceManager.sendCommandsToRouter(router, commands);
     }
 
     @Override
     public boolean visit(final VpcIpAssociationRules vpcip) throws ResourceUnavailableException
{
-        return false;
-    }
+        final VirtualRouter router = vpcip.getRouter();
 
-    @Override
-    public boolean visit(final UserdataToRouterRules userdata) throws ResourceUnavailableException
{
-        return false;
+        Commands cmds = new Commands(Command.OnError.Continue);
+        Map<String, String> vlanMacAddress = vpcip.getVlanMacAddress();
+        List<PublicIpAddress> ipsToSend = vpcip.getIpsToSend();
+
+
+        if (!ipsToSend.isEmpty()) {
+            vpcip.createVpcAssociatePublicIPCommands(router, ipsToSend, cmds, vlanMacAddress);
+            return _applianceManager.sendCommandsToRouter(router, cmds);
+        } else {
+            return true;
+        }
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b97f2b05/server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java b/server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
index 63b9376..318f7e2 100644
--- a/server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
+++ b/server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
@@ -42,6 +42,7 @@ import com.cloud.network.PublicIpAddress;
 import com.cloud.network.VpnUser;
 import com.cloud.network.lb.LoadBalancingRule;
 import com.cloud.network.router.VirtualRouter;
+import com.cloud.network.rules.DhcpEntryRules;
 import com.cloud.network.rules.FirewallRule;
 import com.cloud.network.rules.FirewallRules;
 import com.cloud.network.rules.IpAssociationRules;
@@ -56,6 +57,8 @@ import com.cloud.network.rules.UserdataPwdRules;
 import com.cloud.network.rules.UserdataToRouterRules;
 import com.cloud.network.rules.VirtualNetworkApplianceFactory;
 import com.cloud.network.rules.VpnRules;
+import com.cloud.network.vpc.NetworkACLItem;
+import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.vm.DomainRouterVO;
 import com.cloud.vm.NicProfile;
 import com.cloud.vm.UserVmVO;
@@ -101,6 +104,12 @@ public class BasicNetworkTopology implements NetworkTopology {
     }
 
     @Override
+    public boolean applyNetworkACLs(final Network network, final List<? extends NetworkACLItem>
rules, final List<? extends VirtualRouter> routers, final boolean isPrivateGateway)
+            throws ResourceUnavailableException {
+        throw new CloudRuntimeException("applyNetworkACLs not implemented in Basic Network
Topology.");
+    }
+
+    @Override
     public boolean configDhcpForSubnet(final Network network, final NicProfile nic, final
VirtualMachineProfile profile, final DeployDestination dest,
             final List<DomainRouterVO> routers) throws ResourceUnavailableException
{
         return false;
@@ -109,9 +118,6 @@ public class BasicNetworkTopology implements NetworkTopology {
     @Override
     public boolean applyDhcpEntry(final Network network, final NicProfile nic, final VirtualMachineProfile
profile, final DeployDestination dest,
             final List<DomainRouterVO> routers) throws ResourceUnavailableException
{
-<<<<<<< HEAD
-        return false;
-=======
 
         s_logger.debug("APPLYING DHCP ENTRY RULES");
 
@@ -119,9 +125,11 @@ public class BasicNetworkTopology implements NetworkTopology {
         final Long podId = dest.getPod().getId();
         boolean isPodLevelException = false;
 
-        //for user vm in Basic zone we should try to re-deploy vm in a diff pod if it fails
to deploy in original pod; so throwing exception with Pod scope
-        if (podId != null && profile.getVirtualMachine().getType() == VirtualMachine.Type.User
&& network.getTrafficType() == TrafficType.Guest &&
-                network.getGuestType() == Network.GuestType.Shared) {
+        // for user vm in Basic zone we should try to re-deploy vm in a diff pod
+        // if it fails to deploy in original pod; so throwing exception with Pod
+        // scope
+        if (podId != null && profile.getVirtualMachine().getType() == VirtualMachine.Type.User
&& network.getTrafficType() == TrafficType.Guest
+                && network.getGuestType() == Network.GuestType.Shared) {
             isPodLevelException = true;
         }
 
@@ -130,7 +138,6 @@ public class BasicNetworkTopology implements NetworkTopology {
         DhcpEntryRules dhcpRules = _virtualNetworkApplianceFactory.createDhcpEntryRules(network,
nic, profile, dest);
 
         return applyRules(network, routers, typeString, isPodLevelException, podId, failWhenDisconnect,
new RuleApplierWrapper<RuleApplier>(dhcpRules));
->>>>>>> ee0389b... fixing import in virtual router element and checkstyle
in dhcp entry related changes
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b97f2b05/server/src/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java b/server/src/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
index 430ce86..d95ca03 100644
--- a/server/src/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
+++ b/server/src/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
@@ -40,6 +40,7 @@ import com.cloud.network.rules.FirewallRules;
 import com.cloud.network.rules.IpAssociationRules;
 import com.cloud.network.rules.LoadBalancingRules;
 import com.cloud.network.rules.NetworkAclsRules;
+import com.cloud.network.rules.NicPlugInOutRules;
 import com.cloud.network.rules.PasswordToRouterRules;
 import com.cloud.network.rules.PortForwardingRule;
 import com.cloud.network.rules.PrivateGatewayRules;
@@ -216,16 +217,6 @@ public class BasicNetworkVisitor extends NetworkTopologyVisitor {
     }
 
     @Override
-    public boolean visit(final NetworkAclsRules nat) throws ResourceUnavailableException
{
-        throw new CloudRuntimeException("NetworkAclsRules not implemented in Basic Network
Topology.");
-    }
-
-    @Override
-    public boolean visit(final VpcIpAssociationRules nat) throws ResourceUnavailableException
{
-        throw new CloudRuntimeException("VpcIpAssociationRules not implemented in Basic Network
Topology.");
-    }
-
-    @Override
     public boolean visit(final UserdataToRouterRules userdata) throws ResourceUnavailableException
{
         final VirtualRouter router = userdata.getRouter();
 
@@ -239,11 +230,6 @@ public class BasicNetworkVisitor extends NetworkTopologyVisitor {
     }
 
     @Override
-    public boolean visit(final PrivateGatewayRules userdata) throws ResourceUnavailableException
{
-        throw new CloudRuntimeException("PrivateGatewayRules not implemented in Basic Network
Topology.");
-    }
-
-    @Override
     public boolean visit(final VpnRules vpn) throws ResourceUnavailableException {
         VirtualRouter router = vpn.getRouter();
         List<? extends VpnUser> users = vpn.getUsers();
@@ -263,4 +249,24 @@ public class BasicNetworkVisitor extends NetworkTopologyVisitor {
     public boolean visit(final VpnRules userdata) throws ResourceUnavailableException {
         return false;
     }
+
+    @Override
+    public boolean visit(final NicPlugInOutRules nicPlugInOutRules) throws ResourceUnavailableException
{
+        throw new CloudRuntimeException("NicPlugInOutRules not implemented in Basic Network
Topology.");
+    }
+
+    @Override
+    public boolean visit(final NetworkAclsRules nat) throws ResourceUnavailableException
{
+        throw new CloudRuntimeException("NetworkAclsRules not implemented in Basic Network
Topology.");
+    }
+
+    @Override
+    public boolean visit(final VpcIpAssociationRules nat) throws ResourceUnavailableException
{
+        throw new CloudRuntimeException("VpcIpAssociationRules not implemented in Basic Network
Topology.");
+    }
+
+    @Override
+    public boolean visit(final PrivateGatewayRules userdata) throws ResourceUnavailableException
{
+        throw new CloudRuntimeException("PrivateGatewayRules not implemented in Basic Network
Topology.");
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b97f2b05/server/src/org/apache/cloudstack/network/topology/NetworkTopology.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/network/topology/NetworkTopology.java b/server/src/org/apache/cloudstack/network/topology/NetworkTopology.java
index 42d6197..d61de37 100644
--- a/server/src/org/apache/cloudstack/network/topology/NetworkTopology.java
+++ b/server/src/org/apache/cloudstack/network/topology/NetworkTopology.java
@@ -31,6 +31,7 @@ import com.cloud.network.rules.FirewallRule;
 import com.cloud.network.rules.RuleApplier;
 import com.cloud.network.rules.RuleApplierWrapper;
 import com.cloud.network.rules.StaticNat;
+import com.cloud.network.vpc.NetworkACLItem;
 import com.cloud.vm.DomainRouterVO;
 import com.cloud.vm.NicProfile;
 import com.cloud.vm.VirtualMachineProfile;
@@ -49,10 +50,12 @@ public interface NetworkTopology {
     boolean applyDhcpEntry(final Network network, final NicProfile nic, final VirtualMachineProfile
profile, final DeployDestination dest, final List<DomainRouterVO> routers)
             throws ResourceUnavailableException;
 
-    boolean applyRules(final Network network, final List<? extends VirtualRouter> routers,
final String typeString, final boolean isPodLevelException, final Long podId,
-            final boolean failWhenDisconnect, RuleApplierWrapper<RuleApplier> ruleApplier)
throws ResourceUnavailableException;
+    // ====== USER FOR VPC ONLY ====== //
+
+    boolean applyNetworkACLs(final Network network, final List<? extends NetworkACLItem>
rules, final List<? extends VirtualRouter> routers, final boolean isPrivateGateway)
+            throws ResourceUnavailableException;
 
-    // ====== USER FOR GUEST NETWORK ====== //
+    // ====== USER FOR GUEST NETWORK AND VCP ====== //
 
     boolean applyUserData(final Network network, final NicProfile nic, final VirtualMachineProfile
profile, final DeployDestination dest, final List<DomainRouterVO> routers)
             throws ResourceUnavailableException;
@@ -74,4 +77,7 @@ public interface NetworkTopology {
 
     boolean saveUserDataToRouter(final Network network, final NicProfile nic, final VirtualMachineProfile
profile, final List<? extends VirtualRouter> routers)
             throws ResourceUnavailableException;
+
+    boolean applyRules(final Network network, final List<? extends VirtualRouter> routers,
final String typeString, final boolean isPodLevelException, final Long podId,
+            final boolean failWhenDisconnect, RuleApplierWrapper<RuleApplier> ruleApplier)
throws ResourceUnavailableException;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b97f2b05/server/src/org/apache/cloudstack/network/topology/NetworkTopologyVisitor.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/network/topology/NetworkTopologyVisitor.java
b/server/src/org/apache/cloudstack/network/topology/NetworkTopologyVisitor.java
index d925f16..e284ac5 100644
--- a/server/src/org/apache/cloudstack/network/topology/NetworkTopologyVisitor.java
+++ b/server/src/org/apache/cloudstack/network/topology/NetworkTopologyVisitor.java
@@ -23,6 +23,7 @@ import com.cloud.network.rules.FirewallRules;
 import com.cloud.network.rules.IpAssociationRules;
 import com.cloud.network.rules.LoadBalancingRules;
 import com.cloud.network.rules.NetworkAclsRules;
+import com.cloud.network.rules.NicPlugInOutRules;
 import com.cloud.network.rules.PasswordToRouterRules;
 import com.cloud.network.rules.PrivateGatewayRules;
 import com.cloud.network.rules.SshKeyToRouterRules;
@@ -69,4 +70,5 @@ public abstract class NetworkTopologyVisitor {
     public abstract boolean visit(DhcpPvlanRules vpn) throws ResourceUnavailableException;
 
     public abstract boolean visit(DhcpSubNetRules vpn) throws ResourceUnavailableException;
+    public abstract boolean visit(NicPlugInOutRules nicPlugInOutRules) throws ResourceUnavailableException;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b97f2b05/server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java b/server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java
index fc98db6..d24951e 100644
--- a/server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java
+++ b/server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java
@@ -33,17 +33,12 @@ import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.network.Network;
-import com.cloud.network.PublicIpAddress;
 import com.cloud.network.RemoteAccessVpn;
 import com.cloud.network.Site2SiteVpnConnection;
 import com.cloud.network.VpcVirtualNetworkApplianceService;
 import com.cloud.network.VpnUser;
-import com.cloud.network.lb.LoadBalancingRule;
 import com.cloud.network.router.VirtualRouter;
 import com.cloud.network.router.VpcVirtualNetworkApplianceManager;
-import com.cloud.network.rules.FirewallRule;
-import com.cloud.network.rules.StaticNat;
-import com.cloud.network.vpc.NetworkACLItem;
 import com.cloud.network.vpc.PrivateGateway;
 import com.cloud.network.vpc.StaticRouteProfile;
 import com.cloud.user.Account;
@@ -67,32 +62,6 @@ public class MockVpcVirtualNetworkApplianceManager extends ManagerBase
implement
     }
 
     /* (non-Javadoc)
-     * @see com.cloud.network.router.VirtualNetworkApplianceManager#savePasswordToRouter(com.cloud.network.Network,
com.cloud.vm.NicProfile, com.cloud.vm.VirtualMachineProfile, java.util.List)
-     */
-    @Override
-    public boolean savePasswordToRouter(final Network network, final NicProfile nic, final
VirtualMachineProfile profile, final List<? extends VirtualRouter> routers)
-        throws ResourceUnavailableException {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    @Override
-    public boolean saveSSHPublicKeyToRouter(final Network network, final NicProfile nic,
final VirtualMachineProfile profile, final List<? extends VirtualRouter> routers, final
String sshPublicKey)
-        throws ResourceUnavailableException {
-        return false;  //To change body of implemented methods use File | Settings | File
Templates.
-    }
-
-    /* (non-Javadoc)
-     * @see com.cloud.network.router.VirtualNetworkApplianceManager#saveUserDataToRouter(com.cloud.network.Network,
com.cloud.vm.NicProfile, com.cloud.vm.VirtualMachineProfile, java.util.List)
-     */
-    @Override
-    public boolean saveUserDataToRouter(final Network network, final NicProfile nic, final
VirtualMachineProfile profile, final List<? extends VirtualRouter> routers)
-        throws ResourceUnavailableException {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    /* (non-Javadoc)
      * @see com.cloud.network.router.VirtualNetworkApplianceManager#startRemoteAccessVpn(com.cloud.network.Network,
com.cloud.network.RemoteAccessVpn, java.util.List)
      */
     @Override
@@ -111,25 +80,6 @@ public class MockVpcVirtualNetworkApplianceManager extends ManagerBase
implement
     }
 
     /* (non-Javadoc)
-     * @see com.cloud.network.router.VirtualNetworkApplianceManager#associatePublicIP(com.cloud.network.Network,
java.util.List, java.util.List)
-     */
-    @Override
-    public boolean associatePublicIP(final Network network, final List<? extends PublicIpAddress>
ipAddress, final List<? extends VirtualRouter> routers)
-        throws ResourceUnavailableException {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    /* (non-Javadoc)
-     * @see com.cloud.network.router.VirtualNetworkApplianceManager#applyFirewallRules(com.cloud.network.Network,
java.util.List, java.util.List)
-     */
-    @Override
-    public boolean applyFirewallRules(final Network network, final List<? extends FirewallRule>
rules, final List<? extends VirtualRouter> routers) throws ResourceUnavailableException
{
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    /* (non-Javadoc)
      * @see com.cloud.network.router.VirtualNetworkApplianceManager#getRoutersForNetwork(long)
      */
     @Override
@@ -152,7 +102,6 @@ public class MockVpcVirtualNetworkApplianceManager extends ManagerBase
implement
      */
     @Override
     public VirtualRouter stop(final VirtualRouter router, final boolean forced, final User
callingUser, final Account callingAccount) throws ConcurrentOperationException,
-        ResourceUnavailableException {
         // TODO Auto-generated method stub
         return null;
     }
@@ -166,38 +115,9 @@ public class MockVpcVirtualNetworkApplianceManager extends ManagerBase
implement
         return null;
     }
 
-    /* (non-Javadoc)
-     * @see com.cloud.network.router.VirtualNetworkApplianceManager#applyStaticNats(com.cloud.network.Network,
java.util.List, java.util.List)
-     */
-    @Override
-    public boolean applyStaticNats(final Network network, final List<? extends StaticNat>
rules, final List<? extends VirtualRouter> routers) throws ResourceUnavailableException
{
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    /* (non-Javadoc)
-     * @see com.cloud.network.router.VirtualNetworkApplianceManager#applyDhcpEntry(com.cloud.network.Network,
com.cloud.vm.NicProfile, com.cloud.vm.VirtualMachineProfile, com.cloud.deploy.DeployDestination,
java.util.List)
-     */
-    @Override
-    public boolean applyDhcpEntry(final Network config, final NicProfile nic, final VirtualMachineProfile
vm, final DeployDestination dest, final List<DomainRouterVO> routers)
-        throws ResourceUnavailableException {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    /* (non-Javadoc)
-     * @see com.cloud.network.router.VirtualNetworkApplianceManager#applyUserData(com.cloud.network.Network,
com.cloud.vm.NicProfile, com.cloud.vm.VirtualMachineProfile, com.cloud.deploy.DeployDestination,
java.util.List)
-     */
-    @Override
-    public boolean applyUserData(final Network config, final NicProfile nic, final VirtualMachineProfile
vm, final DeployDestination dest, final List<DomainRouterVO> routers)
-        throws ResourceUnavailableException {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
     @Override
     public boolean configDhcpForSubnet(final Network network, final NicProfile nic, final
VirtualMachineProfile uservm, final DeployDestination dest, final List<DomainRouterVO>
routers)
-        throws ResourceUnavailableException {
+            throws ResourceUnavailableException {
         return false;  //To change body of implemented methods use File | Settings | File
Templates.
     }
 
@@ -211,7 +131,6 @@ public class MockVpcVirtualNetworkApplianceManager extends ManagerBase
implement
      */
     @Override
     public VirtualRouter startRouter(final long routerId, final boolean reprogramNetwork)
throws ConcurrentOperationException, ResourceUnavailableException,
-        InsufficientCapacityException {
         // TODO Auto-generated method stub
         return null;
     }
@@ -221,7 +140,6 @@ public class MockVpcVirtualNetworkApplianceManager extends ManagerBase
implement
      */
     @Override
     public VirtualRouter rebootRouter(final long routerId, final boolean reprogramNetwork)
throws ConcurrentOperationException, ResourceUnavailableException,
-        InsufficientCapacityException {
         // TODO Auto-generated method stub
         return null;
     }
@@ -312,17 +230,10 @@ public class MockVpcVirtualNetworkApplianceManager extends ManagerBase
implement
      */
     @Override
     public boolean removeVpcRouterFromGuestNetwork(final VirtualRouter router, final Network
network, final boolean isRedundant) throws ConcurrentOperationException,
-        ResourceUnavailableException {
         // TODO Auto-generated method stub
         return false;
     }
 
-    @Override
-    public boolean applyNetworkACLs(final Network network, final List<? extends NetworkACLItem>
rules, final List<? extends VirtualRouter> routers, final boolean privateGateway)
-        throws ResourceUnavailableException {
-        return false;  //To change body of implemented methods use File | Settings | File
Templates.
-    }
-
     /* (non-Javadoc)
      * @see com.cloud.network.router.VpcVirtualNetworkApplianceManager#setupPrivateGateway(com.cloud.network.vpc.PrivateGateway,
com.cloud.network.router.VirtualRouter)
      */
@@ -375,13 +286,6 @@ public class MockVpcVirtualNetworkApplianceManager extends ManagerBase
implement
     }
 
     @Override
-    public boolean applyLoadBalancingRules(final Network network, final List<? extends
LoadBalancingRule> rules, final List<? extends VirtualRouter> routers)
-        throws ResourceUnavailableException {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    @Override
     public VirtualRouter findRouter(final long routerId) {
         // TODO Auto-generated method stub
         return null;
@@ -425,4 +329,4 @@ public class MockVpcVirtualNetworkApplianceManager extends ManagerBase
implement
         // TODO Auto-generated method stub
         return null;
     }
-}
+}
\ No newline at end of file


Mime
View raw message