incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject [25/28] git commit: refs/heads/master - IPv6: Fix missed AddressFormat in nic table
Date Thu, 31 Jan 2013 23:08:02 GMT
IPv6: Fix missed AddressFormat in nic table


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

Branch: refs/heads/master
Commit: f45576bce59272faae9e8bcf188b112d8c215b0a
Parents: 4adc974
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Wed Jan 30 19:46:30 2013 -0800
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Wed Jan 30 19:46:30 2013 -0800

----------------------------------------------------------------------
 api/src/com/cloud/network/Networks.java            |    2 +-
 .../src/com/cloud/network/NetworkManagerImpl.java  |    8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f45576bc/api/src/com/cloud/network/Networks.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/Networks.java b/api/src/com/cloud/network/Networks.java
index b156619..e3d2158 100755
--- a/api/src/com/cloud/network/Networks.java
+++ b/api/src/com/cloud/network/Networks.java
@@ -48,7 +48,7 @@ public class Networks {
     public enum AddressFormat {
         Ip4,
         Ip6,
-        Mixed
+        DualStack
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f45576bc/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index 863b3c1..0b04799 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -1317,10 +1317,8 @@ public class NetworkManagerImpl implements NetworkManager, Manager,
Listener {
 
         vo.setDefaultNic(profile.isDefaultNic());
 
-        if (profile.getIp4Address() != null) {
-            vo.setIp4Address(profile.getIp4Address());
-            vo.setAddressFormat(AddressFormat.Ip4);
-        }
+        vo.setIp4Address(profile.getIp4Address());
+        vo.setAddressFormat(profile.getFormat());
 
         if (profile.getMacAddress() != null) {
             vo.setMacAddress(profile.getMacAddress());
@@ -3372,7 +3370,7 @@ public class NetworkManagerImpl implements NetworkManager, Manager,
Listener {
     			nic.setIp6Gateway(vlan.getIp6Gateway());
     			nic.setIp6Cidr(vlan.getIp6Cidr());
     			if (ipv4) {
-    				nic.setFormat(AddressFormat.Mixed);
+    				nic.setFormat(AddressFormat.DualStack);
     			} else {
     				nic.setIsolationUri(IsolationType.Vlan.toUri(vlan.getVlanTag()));
     				nic.setBroadcastType(BroadcastDomainType.Vlan);


Mime
View raw message