cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [13/50] [abbrv] git commit: updated refs/heads/vpc-refactor to a8cb7c1
Date Fri, 03 Oct 2014 11:11:51 GMT
fixing check styles

Conflicts:
	server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
	server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java


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

Branch: refs/heads/vpc-refactor
Commit: d6b4355e2be8418c0af86398f6779df162af46ab
Parents: 0ad3661
Author: Wilder Rodrigues <wrodrigues@schubergphilis.com>
Authored: Tue Aug 19 11:05:53 2014 +0200
Committer: Wilder Rodrigues <wrodrigues@schubergphilis.com>
Committed: Fri Oct 3 06:21:27 2014 +0200

----------------------------------------------------------------------
 .../cloud/network/router/NetworkGeneralHelper.java  | 16 ++++++++--------
 .../network/topology/AdvancedNetworkTopology.java   |  3 +--
 .../network/topology/BasicNetworkTopology.java      |  3 +--
 3 files changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d6b4355e/server/src/com/cloud/network/router/NetworkGeneralHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/NetworkGeneralHelper.java b/server/src/com/cloud/network/router/NetworkGeneralHelper.java
index d22631b..9768de2 100644
--- a/server/src/com/cloud/network/router/NetworkGeneralHelper.java
+++ b/server/src/com/cloud/network/router/NetworkGeneralHelper.java
@@ -215,7 +215,7 @@ public class NetworkGeneralHelper {
         }
         return result;
     }
-    
+
     public void handleSingleWorkingRedundantRouter(final List<? extends VirtualRouter>
connectedRouters, final List<? extends VirtualRouter> disconnectedRouters, final String
reason)
             throws ResourceUnavailableException {
         if (connectedRouters.isEmpty() || disconnectedRouters.isEmpty()) {
@@ -275,7 +275,7 @@ public class NetworkGeneralHelper {
         }
         return priority;
     }
-    
+
     //    @Override
     public NicTO getNicTO(final VirtualRouter router, final Long networkId, final String
broadcastUri) {
         NicProfile nicProfile = _networkModel.getNicProfile(router, networkId, broadcastUri);
@@ -792,22 +792,22 @@ public class NetworkGeneralHelper {
 
         //1) allocate nic for control and source nat public ip
         final LinkedHashMap<Network, List<? extends NicProfile>> networks =
-                this.createRouterNetworks(vpcRouterDeploymentDefinition);
+                createRouterNetworks(vpcRouterDeploymentDefinition);
 
 
         final Long vpcId = vpcRouterDeploymentDefinition.getVpc().getId();
         //2) allocate nic for private gateways if needed
-        final List<PrivateGateway> privateGateways = this._vpcMgr.getVpcPrivateGateways(vpcId);
+        final List<PrivateGateway> privateGateways = _vpcMgr.getVpcPrivateGateways(vpcId);
         if (privateGateways != null && !privateGateways.isEmpty()) {
             for (PrivateGateway privateGateway : privateGateways) {
-                NicProfile privateNic = this._vpcHelper.createPrivateNicProfileForGateway(privateGateway);
+                NicProfile privateNic = _vpcHelper.createPrivateNicProfileForGateway(privateGateway);
                 Network privateNetwork = _networkModel.getNetwork(privateGateway.getNetworkId());
                 networks.put(privateNetwork, new ArrayList<NicProfile>(Arrays.asList(privateNic)));
             }
         }
 
         //3) allocate nic for guest gateway if needed
-        List<? extends Network> guestNetworks = this._vpcMgr.getVpcNetworks(vpcId);
+        List<? extends Network> guestNetworks = _vpcMgr.getVpcNetworks(vpcId);
         for (Network guestNetwork : guestNetworks) {
             if (_networkModel.isPrivateGateway(guestNetwork.getId())) {
                 continue;
@@ -823,8 +823,8 @@ public class NetworkGeneralHelper {
         final List<NicProfile> publicNics = new ArrayList<NicProfile>();
         Network publicNetwork = null;
         for (IPAddressVO ip : ips) {
-            PublicIp publicIp = PublicIp.createFromAddrAndVlan(ip, this._vlanDao.findById(ip.getVlanId()));
-            if ((ip.getState() == IpAddress.State.Allocated || ip.getState() == IpAddress.State.Allocating)
&& this._vpcMgr.isIpAllocatedToVpc(ip) &&
+            PublicIp publicIp = PublicIp.createFromAddrAndVlan(ip, _vlanDao.findById(ip.getVlanId()));
+            if ((ip.getState() == IpAddress.State.Allocated || ip.getState() == IpAddress.State.Allocating)
&& _vpcMgr.isIpAllocatedToVpc(ip) &&
                     !publicVlans.contains(publicIp.getVlanTag())) {
                 s_logger.debug("Allocating nic for router in vlan " + publicIp.getVlanTag());
                 NicProfile publicNic = new NicProfile();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d6b4355e/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 cf872ca..e4fd0e9 100644
--- a/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
+++ b/server/src/org/apache/cloudstack/network/topology/AdvancedNetworkTopology.java
@@ -242,8 +242,7 @@ public class AdvancedNetworkTopology extends BasicNetworkTopology {
 
         if (!connectedRouters.isEmpty()) {
             if (!isZoneBasic && !disconnectedRouters.isEmpty() && disconnectedRouters.get(0).getIsRedundantRouter())
{
-                // These disconnected redundant virtual routers are out of sync
-                // now, stop them for synchronization
+                // These disconnected redundant virtual routers are out of sync now, stop
them for synchronization
                 _nwHelper.handleSingleWorkingRedundantRouter(connectedRouters, disconnectedRouters,
msg);
             }
         } else if (!disconnectedRouters.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d6b4355e/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 8133b59..2b5ae36 100644
--- a/server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
+++ b/server/src/org/apache/cloudstack/network/topology/BasicNetworkTopology.java
@@ -404,8 +404,7 @@ public class BasicNetworkTopology implements NetworkTopology {
 
         if (!connectedRouters.isEmpty()) {
             if (!isZoneBasic && !disconnectedRouters.isEmpty() && disconnectedRouters.get(0).getIsRedundantRouter())
{
-                // These disconnected redundant virtual routers are out of sync
-                // now, stop them for synchronization
+                // These disconnected redundant virtual routers are out of sync now, stop
them for synchronization
                 _nwHelper.handleSingleWorkingRedundantRouter(connectedRouters, disconnectedRouters,
msg);
             }
         } else if (!disconnectedRouters.isEmpty()) {


Mime
View raw message