cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [18/50] [abbrv] git commit: updated refs/heads/master to 771d052
Date Tue, 14 Oct 2014 18:15:36 GMT
adding applyStaticRoutes method to the network topology/visitor. it will be used by the VPC
virtual net manager appliance.

Conflicts:
	server/src/com/cloud/network/rules/VirtualNetworkApplianceFactory.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b96035f3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b96035f3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b96035f3

Branch: refs/heads/master
Commit: b96035f3568eae73f17d72bcc56c7701d2c4d85d
Parents: 2da3ced
Author: Wilder Rodrigues <wrodrigues@schubergphilis.com>
Authored: Tue Aug 19 15:10:10 2014 +0200
Committer: wilderrodrigues <wrodrigues@schubergphilis.com>
Committed: Tue Oct 14 15:02:12 2014 +0200

----------------------------------------------------------------------
 .../cloud/network/router/NetworkHelperImpl.java |  6 +-
 .../VirtualNetworkApplianceManagerImpl.java     |  2 +-
 .../network/router/VirtualNetworkStatus.java    | 26 +++++++++
 .../cloud/network/router/VirtualNwStatus.java   | 26 ---------
 .../network/router/VpcNetworkHelperImpl.java    |  2 +-
 .../com/cloud/network/rules/RuleApplier.java    |  7 ---
 .../cloud/network/rules/StaticRoutesRules.java  | 61 ++++++++++++++++++++
 .../rules/VirtualNetworkApplianceFactory.java   |  3 +-
 .../topology/AdvancedNetworkTopology.java       |  8 +++
 .../topology/AdvancedNetworkVisitor.java        |  7 +++
 .../network/topology/BasicNetworkTopology.java  |  6 ++
 .../network/topology/BasicNetworkVisitor.java   |  6 ++
 .../network/topology/NetworkTopology.java       |  3 +
 .../topology/NetworkTopologyVisitor.java        |  2 +
 14 files changed, 125 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/server/src/com/cloud/network/router/NetworkHelperImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/NetworkHelperImpl.java b/server/src/com/cloud/network/router/NetworkHelperImpl.java
index bcebcd7..bf4c7af 100644
--- a/server/src/com/cloud/network/router/NetworkHelperImpl.java
+++ b/server/src/com/cloud/network/router/NetworkHelperImpl.java
@@ -580,7 +580,7 @@ public class NetworkHelperImpl implements NetworkHelper {
                 Long vpcId = routerDeploymentDefinition.getVpc() != null ? routerDeploymentDefinition.getVpc().getId()
: null;
 
                 router = new DomainRouterVO(id, routerOffering.getId(), routerDeploymentDefinition.getVirtualProvider().getId(),
-                        VirtualMachineName.getRouterName(id, VirtualNwStatus.instance), template.getId(),
template.getHypervisorType(),
+                        VirtualMachineName.getRouterName(id, VirtualNetworkStatus.instance),
template.getId(), template.getHypervisorType(),
                         template.getGuestOSId(), owner.getDomainId(), owner.getId(), routerDeploymentDefinition.isRedundant(),
0,
                         false, RedundantState.UNKNOWN, offerHA, false, vpcId);
 
@@ -774,7 +774,7 @@ public class NetworkHelperImpl implements NetworkHelper {
         s_logger.debug("Adding nic for Virtual Router in Control network ");
         List<? extends NetworkOffering> offerings = _networkModel.getSystemAccountNetworkOfferings(NetworkOffering.SystemControlNetwork);
         NetworkOffering controlOffering = offerings.get(0);
-        Network controlConfig = _networkMgr.setupNetwork(VirtualNwStatus.account, controlOffering,
routerDeploymentDefinition.getPlan(),
+        Network controlConfig = _networkMgr.setupNetwork(VirtualNetworkStatus.account, controlOffering,
routerDeploymentDefinition.getPlan(),
                 null, null, false).get(0);
         networks.put(controlConfig, new ArrayList<NicProfile>());
         //3) Public network
@@ -803,7 +803,7 @@ public class NetworkHelperImpl implements NetworkHelper {
                 defaultNic.setDeviceId(2);
             }
             final NetworkOffering publicOffering = _networkModel.getSystemAccountNetworkOfferings(NetworkOffering.SystemPublicNetwork).get(0);
-            final List<? extends Network> publicNetworks = _networkMgr.setupNetwork(VirtualNwStatus.account,
publicOffering,
+            final List<? extends Network> publicNetworks = _networkMgr.setupNetwork(VirtualNetworkStatus.account,
publicOffering,
                     routerDeploymentDefinition.getPlan(), null, null, false);
             final String publicIp = defaultNic.getIp4Address();
             // We want to use the identical MAC address for RvR on public interface if possible

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index 1b9bd84..ab7ea17 100644
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -656,7 +656,7 @@ Configurable, StateListener<State, VirtualMachine.Event, VirtualMachine>
{
             throw new ConfigurationException(msg);
         }
 
-        VirtualNwStatus.account = _accountMgr.getSystemAccount();
+        VirtualNetworkStatus.account = _accountMgr.getSystemAccount();
 
         final String aggregationRange = configs.get("usage.stats.job.aggregation.range");
         _usageAggregationRange = NumbersUtil.parseInt(aggregationRange, 1440);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/server/src/com/cloud/network/router/VirtualNetworkStatus.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkStatus.java b/server/src/com/cloud/network/router/VirtualNetworkStatus.java
new file mode 100644
index 0000000..dd77f5d
--- /dev/null
+++ b/server/src/com/cloud/network/router/VirtualNetworkStatus.java
@@ -0,0 +1,26 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.network.router;
+
+import com.cloud.user.Account;
+
+public class VirtualNetworkStatus {
+
+    public static String instance = "";
+
+    public static Account account = null;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/server/src/com/cloud/network/router/VirtualNwStatus.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNwStatus.java b/server/src/com/cloud/network/router/VirtualNwStatus.java
deleted file mode 100644
index b0a1b48..0000000
--- a/server/src/com/cloud/network/router/VirtualNwStatus.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.network.router;
-
-import com.cloud.user.Account;
-
-public class VirtualNwStatus {
-
-    public static String instance = "";
-
-    public static Account account = null;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java b/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java
index 2e5d696..64ee2b0 100644
--- a/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java
+++ b/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java
@@ -187,7 +187,7 @@ public class VpcNetworkHelperImpl extends NetworkHelperImpl implements
VpcNetwor
                 publicNic.setIsolationUri(IsolationType.Vlan.toUri(publicIp.getVlanTag()));
                 NetworkOffering publicOffering = _networkModel.getSystemAccountNetworkOfferings(NetworkOffering.SystemPublicNetwork).get(0);
                 if (publicNetwork == null) {
-                    List<? extends Network> publicNetworks = _networkMgr.setupNetwork(VirtualNwStatus.account,
+                    List<? extends Network> publicNetworks = _networkMgr.setupNetwork(VirtualNetworkStatus.account,
                             publicOffering, vpcRouterDeploymentDefinition.getPlan(), null,
null, false);
                     publicNetwork = publicNetworks.get(0);
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/server/src/com/cloud/network/rules/RuleApplier.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/rules/RuleApplier.java b/server/src/com/cloud/network/rules/RuleApplier.java
index 04a13e4..84ad5230 100644
--- a/server/src/com/cloud/network/rules/RuleApplier.java
+++ b/server/src/com/cloud/network/rules/RuleApplier.java
@@ -39,7 +39,6 @@ import com.cloud.network.dao.NetworkDao;
 import com.cloud.network.lb.LoadBalancingRulesManager;
 import com.cloud.network.router.NetworkHelper;
 import com.cloud.network.router.RouterControlHelper;
-import com.cloud.network.router.VirtualNetworkApplianceManager;
 import com.cloud.network.router.VirtualRouter;
 import com.cloud.network.vpc.VpcManager;
 import com.cloud.network.vpc.dao.VpcDao;
@@ -58,8 +57,6 @@ import com.cloud.vm.dao.UserVmDao;
 
 public abstract class RuleApplier {
 
-    protected VirtualNetworkApplianceManager _applianceManager;
-
     protected NetworkModel _networkModel;
 
     protected LoadBalancingRulesManager _lbMgr;
@@ -126,10 +123,6 @@ public abstract class RuleApplier {
         return _router;
     }
 
-    public VirtualNetworkApplianceManager getApplianceManager() {
-        return _applianceManager;
-    }
-
     public void createVmDataCommand(final VirtualRouter router, final UserVm vm, final NicVO
nic, final String publicKey, final Commands cmds) {
         final String serviceOffering = _serviceOfferingDao.findByIdIncludingRemoved(vm.getId(),
vm.getServiceOfferingId()).getDisplayText();
         final String zoneName = _dcDao.findById(router.getDataCenterId()).getName();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/server/src/com/cloud/network/rules/StaticRoutesRules.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/rules/StaticRoutesRules.java b/server/src/com/cloud/network/rules/StaticRoutesRules.java
new file mode 100644
index 0000000..f7c4de9
--- /dev/null
+++ b/server/src/com/cloud/network/rules/StaticRoutesRules.java
@@ -0,0 +1,61 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package com.cloud.network.rules;
+
+import java.util.List;
+
+import org.apache.cloudstack.network.topology.NetworkTopologyVisitor;
+
+import com.cloud.agent.api.routing.NetworkElementCommand;
+import com.cloud.agent.api.routing.SetStaticRouteCommand;
+import com.cloud.agent.manager.Commands;
+import com.cloud.dc.DataCenterVO;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.network.router.VirtualRouter;
+import com.cloud.network.vpc.StaticRouteProfile;
+import com.cloud.vm.DomainRouterVO;
+
+public class StaticRoutesRules extends RuleApplier {
+
+    private final List<StaticRouteProfile> staticRoutes;
+
+    public StaticRoutesRules(final List<StaticRouteProfile> staticRoutes) {
+        super(null);
+        this.staticRoutes = staticRoutes;
+    }
+
+    public List<StaticRouteProfile> getStaticRoutes() {
+        return staticRoutes;
+    }
+
+    @Override
+    public boolean accept(final NetworkTopologyVisitor visitor, final VirtualRouter router)
throws ResourceUnavailableException {
+        _router = router;
+
+        return visitor.visit(this);
+    }
+
+    public void createStaticRouteCommands(final List<StaticRouteProfile> staticRoutes,
final DomainRouterVO router, final Commands cmds) {
+        SetStaticRouteCommand cmd = new SetStaticRouteCommand(staticRoutes);
+        cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, _networkHelper.getRouterControlIp(router.getId()));
+        cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName());
+        DataCenterVO dcVo = _dcDao.findById(router.getDataCenterId());
+        cmd.setAccessDetail(NetworkElementCommand.ZONE_NETWORK_TYPE, dcVo.getNetworkType().toString());
+        cmds.addCommand(cmd);
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/server/src/com/cloud/network/rules/VirtualNetworkApplianceFactory.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/rules/VirtualNetworkApplianceFactory.java b/server/src/com/cloud/network/rules/VirtualNetworkApplianceFactory.java
index c545975..4815cbf 100644
--- a/server/src/com/cloud/network/rules/VirtualNetworkApplianceFactory.java
+++ b/server/src/com/cloud/network/rules/VirtualNetworkApplianceFactory.java
@@ -170,6 +170,7 @@ public class VirtualNetworkApplianceFactory {
         applier._networkOfferingDao = _networkOfferingDao;
         applier._routerDao = _routerDao;
         applier._routerControlHelper = _routerControlHelper;
+        applier._networkHelper = _networkHelper;
     }
 
     public IpAssociationRules createIpAssociationRules(final Network network, final List<?
extends PublicIpAddress> ipAddresses) {
@@ -274,8 +275,6 @@ public class VirtualNetworkApplianceFactory {
 
         initBeans(networkAclsRules);
 
-        networkAclsRules._networkHelper = _networkHelper;
-
         return networkAclsRules;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/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 e4fd0e9..bea28cf 100644
--- a/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
+++ b/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
@@ -44,6 +44,7 @@ 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.network.vpc.StaticRouteProfile;
 import com.cloud.vm.DomainRouterVO;
 import com.cloud.vm.NicProfile;
 import com.cloud.vm.VirtualMachine.State;
@@ -59,6 +60,13 @@ public class AdvancedNetworkTopology extends BasicNetworkTopology {
     protected AdvancedNetworkVisitor _advancedVisitor;
 
     @Override
+    public boolean applyStaticRoutes(final List<StaticRouteProfile> staticRoutes,
+            final List<DomainRouterVO> routers) throws ResourceUnavailableException
{
+        // TODO Auto-generated method stub
+        return super.applyStaticRoutes(staticRoutes, routers);
+    }
+
+    @Override
     public boolean setupDhcpForPvlan(final boolean isAddPvlan, final DomainRouterVO router,
final Long hostId, final NicProfile nic) throws ResourceUnavailableException {
 
         if (!nic.getBroadCastUri().getScheme().equals("pvlan")) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/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 df8afb2..d1e5175 100644
--- a/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkVisitor.java
+++ b/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkVisitor.java
@@ -37,6 +37,7 @@ import com.cloud.network.rules.DhcpSubNetRules;
 import com.cloud.network.rules.NetworkAclsRules;
 import com.cloud.network.rules.NicPlugInOutRules;
 import com.cloud.network.rules.PrivateGatewayRules;
+import com.cloud.network.rules.StaticRoutesRules;
 import com.cloud.network.rules.UserdataPwdRules;
 import com.cloud.network.rules.VpcIpAssociationRules;
 import com.cloud.network.vpc.NetworkACLItem;
@@ -160,4 +161,10 @@ public class AdvancedNetworkVisitor extends BasicNetworkVisitor {
 
         return _networkGeneralHelper.sendCommandsToRouter(router, cmds);
     }
+
+    @Override
+    public boolean visit(final StaticRoutesRules staticRoutesRules) throws ResourceUnavailableException
{
+
+        return false;
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/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 b91707f..dd0cd15 100644
--- a/server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
+++ b/server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
@@ -59,6 +59,7 @@ 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.network.vpc.StaticRouteProfile;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.vm.DomainRouterVO;
 import com.cloud.vm.NicProfile;
@@ -108,6 +109,11 @@ public class BasicNetworkTopology implements NetworkTopology {
     }
 
     @Override
+    public boolean applyStaticRoutes(final List<StaticRouteProfile> staticRoutes, final
List<DomainRouterVO> routers) throws ResourceUnavailableException {
+        throw new CloudRuntimeException("applyStaticRoutes not implemented in Basic Network
Topology.");
+    }
+
+    @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.");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/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 5cdb7d5..817fad7 100644
--- a/server/src/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
+++ b/server/src/org/apache/cloudstack/network/topology/BasicNetworkVisitor.java
@@ -50,6 +50,7 @@ import com.cloud.network.rules.SshKeyToRouterRules;
 import com.cloud.network.rules.StaticNat;
 import com.cloud.network.rules.StaticNatRule;
 import com.cloud.network.rules.StaticNatRules;
+import com.cloud.network.rules.StaticRoutesRules;
 import com.cloud.network.rules.UserdataPwdRules;
 import com.cloud.network.rules.UserdataToRouterRules;
 import com.cloud.network.rules.VpcIpAssociationRules;
@@ -271,4 +272,9 @@ public class BasicNetworkVisitor extends NetworkTopologyVisitor {
     public boolean visit(final PrivateGatewayRules userdata) throws ResourceUnavailableException
{
         throw new CloudRuntimeException("PrivateGatewayRules not implemented in Basic Network
Topology.");
     }
+
+    @Override
+    public boolean visit(final StaticRoutesRules staticRoutesRules) throws ResourceUnavailableException
{
+        throw new CloudRuntimeException("StaticRoutesRules not implemented in Basic Network
Topology.");
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/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 5a501f7..3975878 100644
--- a/server/src/org/apache/cloudstack/network/topology/NetworkTopology.java
+++ b/server/src/org/apache/cloudstack/network/topology/NetworkTopology.java
@@ -32,6 +32,7 @@ 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.network.vpc.StaticRouteProfile;
 import com.cloud.vm.DomainRouterVO;
 import com.cloud.vm.NicProfile;
 import com.cloud.vm.VirtualMachineProfile;
@@ -55,6 +56,8 @@ public interface NetworkTopology {
     boolean applyNetworkACLs(final Network network, final List<? extends NetworkACLItem>
rules, final List<? extends VirtualRouter> routers, final boolean isPrivateGateway)
             throws ResourceUnavailableException;
 
+    boolean applyStaticRoutes(final List<StaticRouteProfile> staticRoutes, final List<DomainRouterVO>
routers) throws ResourceUnavailableException;
+
     // ====== USER FOR GUEST NETWORK AND VCP ====== //
 
     boolean applyDhcpEntry(final Network network, final NicProfile nic, final VirtualMachineProfile
profile, final DeployDestination dest, final List<DomainRouterVO> routers)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b96035f3/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 32dcc89..c4f3af5 100644
--- a/server/src/org/apache/cloudstack/network/topology/NetworkTopologyVisitor.java
+++ b/server/src/org/apache/cloudstack/network/topology/NetworkTopologyVisitor.java
@@ -29,6 +29,7 @@ import com.cloud.network.rules.PasswordToRouterRules;
 import com.cloud.network.rules.PrivateGatewayRules;
 import com.cloud.network.rules.SshKeyToRouterRules;
 import com.cloud.network.rules.StaticNatRules;
+import com.cloud.network.rules.StaticRoutesRules;
 import com.cloud.network.rules.UserdataPwdRules;
 import com.cloud.network.rules.UserdataToRouterRules;
 import com.cloud.network.rules.VpcIpAssociationRules;
@@ -73,4 +74,5 @@ public abstract class NetworkTopologyVisitor {
     public abstract boolean visit(DhcpSubNetRules subnet) throws ResourceUnavailableException;
 
     public abstract boolean visit(NicPlugInOutRules nicPlugInOutRules) throws ResourceUnavailableException;
+    public abstract boolean visit(StaticRoutesRules staticRoutesRules) throws ResourceUnavailableException;
 }
\ No newline at end of file


Mime
View raw message