cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 6d57a86
Date Fri, 21 Aug 2015 21:25:20 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master aea9d4b2a -> 6d57a86cb


Fix for the NicVO.java regression.

Renamed set*() methods to correct naming.


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

Branch: refs/heads/master
Commit: 4b88eabef1310fde8631cc3874a5e07dbca5ee4c
Parents: 9229f35
Author: Boris Schrijver <boris@pcextreme.nl>
Authored: Fri Aug 21 10:06:12 2015 +0200
Committer: Boris Schrijver <boris@pcextreme.nl>
Committed: Fri Aug 21 14:03:00 2015 +0200

----------------------------------------------------------------------
 .../orchestration/NetworkOrchestrator.java      | 32 ++++++++++----------
 engine/schema/src/com/cloud/vm/NicVO.java       | 12 ++++----
 .../InternalLBVMManagerTest.java                |  6 ++--
 .../network/guru/ExternalGuestNetworkGuru.java  |  2 +-
 .../VpcVirtualNetworkApplianceManagerImpl.java  |  2 +-
 .../cloud/network/rules/NicPlugInOutRules.java  |  2 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java  |  8 ++---
 7 files changed, 32 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b88eabe/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index a12540d..50ddc59 100644
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@ -838,7 +838,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
         vo.setDefaultNic(profile.isDefaultNic());
 
-        vo.setIp4Address(profile.getIPv4Address());
+        vo.setIPv4Address(profile.getIPv4Address());
         vo.setAddressFormat(profile.getFormat());
 
         if (profile.getMacAddress() != null) {
@@ -846,8 +846,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
         }
 
         vo.setMode(profile.getMode());
-        vo.setNetmask(profile.getIPv4Netmask());
-        vo.setGateway(profile.getIPv4Gateway());
+        vo.setIPv4Netmask(profile.getIPv4Netmask());
+        vo.setIPv4Gateway(profile.getIPv4Gateway());
 
         if (profile.getBroadCastUri() != null) {
             vo.setBroadcastUri(profile.getBroadCastUri());
@@ -859,25 +859,25 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
         vo.setState(Nic.State.Allocated);
 
-        vo.setIp6Address(profile.getIPv6Address());
-        vo.setIp6Gateway(profile.getIPv6Gateway());
-        vo.setIp6Cidr(profile.getIPv6Cidr());
+        vo.setIPv6Address(profile.getIPv6Address());
+        vo.setIPv6Gateway(profile.getIPv6Gateway());
+        vo.setIPv6Cidr(profile.getIPv6Cidr());
 
         return deviceId;
     }
 
     protected void applyProfileToNicForRelease(NicVO vo, NicProfile profile) {
-        vo.setGateway(profile.getIPv4Gateway());
+        vo.setIPv4Gateway(profile.getIPv4Gateway());
         vo.setAddressFormat(profile.getFormat());
-        vo.setIp4Address(profile.getIPv4Address());
-        vo.setIp6Address(profile.getIPv6Address());
+        vo.setIPv4Address(profile.getIPv4Address());
+        vo.setIPv6Address(profile.getIPv6Address());
         vo.setMacAddress(profile.getMacAddress());
         if (profile.getReservationStrategy() != null) {
             vo.setReservationStrategy(profile.getReservationStrategy());
         }
         vo.setBroadcastUri(profile.getBroadCastUri());
         vo.setIsolationUri(profile.getIsolationUri());
-        vo.setNetmask(profile.getIPv4Netmask());
+        vo.setIPv4Netmask(profile.getIPv4Netmask());
     }
 
     protected void applyProfileToNetwork(NetworkVO network, NetworkProfile profile) {
@@ -1332,16 +1332,16 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
                     networkRate, _networkModel.isSecurityGroupSupportedInNetwork(network),
_networkModel.getNetworkTag(vmProfile.getHypervisorType(), network));
             guru.reserve(profile, network, vmProfile, dest, context);
-            nic.setIp4Address(profile.getIPv4Address());
+            nic.setIPv4Address(profile.getIPv4Address());
             nic.setAddressFormat(profile.getFormat());
-            nic.setIp6Address(profile.getIPv6Address());
+            nic.setIPv6Address(profile.getIPv6Address());
             nic.setMacAddress(profile.getMacAddress());
             nic.setIsolationUri(profile.getIsolationUri());
             nic.setBroadcastUri(profile.getBroadCastUri());
             nic.setReserver(guru.getName());
             nic.setState(Nic.State.Reserved);
-            nic.setNetmask(profile.getIPv4Netmask());
-            nic.setGateway(profile.getIPv4Gateway());
+            nic.setIPv4Netmask(profile.getIPv4Netmask());
+            nic.setIPv4Gateway(profile.getIPv4Gateway());
 
             if (profile.getReservationStrategy() != null) {
                 nic.setReservationStrategy(profile.getReservationStrategy());
@@ -3315,8 +3315,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
     @Override
     public NicVO savePlaceholderNic(Network network, String ip4Address, String ip6Address,
Type vmType) {
         NicVO nic = new NicVO(null, null, network.getId(), null);
-        nic.setIp4Address(ip4Address);
-        nic.setIp6Address(ip6Address);
+        nic.setIPv4Address(ip4Address);
+        nic.setIPv6Address(ip6Address);
         nic.setReservationStrategy(ReservationStrategy.PlaceHolder);
         nic.setState(Nic.State.Reserved);
         nic.setVmType(vmType);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b88eabe/engine/schema/src/com/cloud/vm/NicVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/vm/NicVO.java b/engine/schema/src/com/cloud/vm/NicVO.java
index febb25c..8154297 100644
--- a/engine/schema/src/com/cloud/vm/NicVO.java
+++ b/engine/schema/src/com/cloud/vm/NicVO.java
@@ -136,7 +136,7 @@ public class NicVO implements Nic {
         return iPv4Address;
     }
 
-    public void setIp4Address(String address) {
+    public void setIPv4Address(String address) {
         iPv4Address = address;
     }
 
@@ -168,7 +168,7 @@ public class NicVO implements Nic {
         return iPv6Address;
     }
 
-    public void setIp6Address(String ip6Address) {
+    public void setIPv6Address(String ip6Address) {
         this.iPv6Address = ip6Address;
     }
 
@@ -182,7 +182,7 @@ public class NicVO implements Nic {
         return iPv4Gateway;
     }
 
-    public void setGateway(String gateway) {
+    public void setIPv4Gateway(String gateway) {
         this.iPv4Gateway = gateway;
     }
 
@@ -195,7 +195,7 @@ public class NicVO implements Nic {
         this.addressFormat = format;
     }
 
-    public void setNetmask(String netmask) {
+    public void setIPv4Netmask(String netmask) {
         this.iPv4Netmask = netmask;
     }
 
@@ -346,7 +346,7 @@ public class NicVO implements Nic {
         return iPv6Gateway;
     }
 
-    public void setIp6Gateway(String ip6Gateway) {
+    public void setIPv6Gateway(String ip6Gateway) {
         this.iPv6Gateway = ip6Gateway;
     }
 
@@ -355,7 +355,7 @@ public class NicVO implements Nic {
         return iPv6Cidr;
     }
 
-    public void setIp6Cidr(String ip6Cidr) {
+    public void setIPv6Cidr(String ip6Cidr) {
         this.iPv6Cidr = ip6Cidr;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b88eabe/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java
b/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java
index bc48d46..b24d511 100644
--- a/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java
+++ b/plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java
@@ -24,8 +24,6 @@ import java.util.List;
 
 import javax.inject.Inject;
 
-import junit.framework.TestCase;
-
 import org.apache.cloudstack.lb.ApplicationLoadBalancerRuleVO;
 import org.apache.cloudstack.network.lb.InternalLoadBalancerVMManager;
 import org.junit.Before;
@@ -74,6 +72,8 @@ import com.cloud.vm.VirtualMachineManager;
 import com.cloud.vm.dao.DomainRouterDao;
 import com.cloud.vm.dao.NicDao;
 
+import junit.framework.TestCase;
+
 /**
  * Set of unittests for InternalLoadBalancerVMManager
  *
@@ -137,7 +137,7 @@ public class InternalLBVMManagerTest extends TestCase {
         vm = setId(vm, 1);
         vm.setPrivateIpAddress("10.2.2.2");
         final NicVO nic = new NicVO("somereserver", 1L, 1L, VirtualMachine.Type.InternalLoadBalancerVm);
-        nic.setIp4Address(requestedIp);
+        nic.setIPv4Address(requestedIp);
 
         final List<DomainRouterVO> emptyList = new ArrayList<DomainRouterVO>();
         final List<DomainRouterVO> nonEmptyList = new ArrayList<DomainRouterVO>();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b88eabe/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
index c0a6ea9..b1d1236 100644
--- a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java
@@ -192,7 +192,7 @@ public class ExternalGuestNetworkGuru extends GuestNetworkGuru {
         for (NicVO nic : nicsInNetwork) {
             if (nic.getIPv4Address() != null) {
                 long ipMask = getIpMask(nic.getIPv4Address(), cidrSize);
-                nic.setIp4Address(NetUtils.long2Ip(newCidrAddress | ipMask));
+                nic.setIPv4Address(NetUtils.long2Ip(newCidrAddress | ipMask));
                 _nicDao.persist(nic);
             }
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b88eabe/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
index 15d80c8..a13ff21 100644
--- a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
@@ -657,7 +657,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
                     final PublicIpAddress nicToUnplug = nicsToUnplug.get(ip.getVlanTag());
                     if (nicToUnplug != null) {
                         final NicVO nicVO = _nicDao.findByIp4AddressAndNetworkIdAndInstanceId(publicNtwkId,
router.getId(), nicToUnplug.getAddress().addr());
-                        nicVO.setIp4Address(ip.getAddress().addr());
+                        nicVO.setIPv4Address(ip.getAddress().addr());
                         _nicDao.update(nicVO.getId(), nicVO);
                         s_logger.debug("Updated the nic " + nicVO + " with the new ip address
" + ip.getAddress().addr());
                         nicsToUnplug.remove(ip.getVlanTag());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b88eabe/server/src/com/cloud/network/rules/NicPlugInOutRules.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/rules/NicPlugInOutRules.java b/server/src/com/cloud/network/rules/NicPlugInOutRules.java
index fa51a1b..40cf72c 100644
--- a/server/src/com/cloud/network/rules/NicPlugInOutRules.java
+++ b/server/src/com/cloud/network/rules/NicPlugInOutRules.java
@@ -201,7 +201,7 @@ public class NicPlugInOutRules extends RuleApplier {
                     final PublicIpAddress nicToUnplug = nicsToUnplug.get(ip.getVlanTag());
                     if (nicToUnplug != null) {
                         NicVO nicVO = nicDao.findByIp4AddressAndNetworkIdAndInstanceId(publicNtwkId,
_router.getId(), nicToUnplug.getAddress().addr());
-                        nicVO.setIp4Address(ip.getAddress().addr());
+                        nicVO.setIPv4Address(ip.getAddress().addr());
                         nicDao.update(nicVO.getId(), nicVO);
                         s_logger.debug("Updated the nic " + nicVO + " with the new ip address
" + ip.getAddress().addr());
                         nicsToUnplug.remove(ip.getVlanTag());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4b88eabe/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index 79e87b6..d26a84d 100644
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -618,7 +618,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Vir
                     if (NetUtils.isValidIp(vmIp)) {
                         // set this vm ip addr in vm nic.
                         if (nic != null) {
-                            nic.setIp4Address(vmIp);
+                            nic.setIPv4Address(vmIp);
                             _nicDao.update(nicId, nic);
                             s_logger.debug("Vm "+ vmId +" IP "+vmIp +" got retrieved successfully");
                             vmIdCountMap.remove(nicId);
@@ -632,7 +632,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Vir
                     //previously vm has ip and nic table has ip address. After vm restart
or stop/start
                     //if vm doesnot get the ip then set the ip in nic table to null
                     if (nic.getIPv4Address() != null) {
-                        nic.setIp4Address(null);
+                        nic.setIPv4Address(null);
                         _nicDao.update(nicId, nic);
                     }
                     if (answer.getDetails() != null) {
@@ -3646,13 +3646,13 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Vir
         boolean ipChanged = false;
         if (originalIp != null && !originalIp.equalsIgnoreCase(returnedIp)) {
             if (returnedIp != null && guestNic != null) {
-                guestNic.setIp4Address(returnedIp);
+                guestNic.setIPv4Address(returnedIp);
                 ipChanged = true;
             }
         }
         if (returnedIp != null && !returnedIp.equalsIgnoreCase(originalIp)) {
             if (guestNic != null) {
-                guestNic.setIp4Address(returnedIp);
+                guestNic.setIPv4Address(returnedIp);
                 ipChanged = true;
             }
         }


Mime
View raw message