incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject [43/50] [abbrv] git commit: refs/heads/cisco-vnmc-api-integration - CLOUDSTACK-1332: Pass IPv6 DNS to VR
Date Wed, 13 Mar 2013 06:25:04 GMT
CLOUDSTACK-1332: Pass IPv6 DNS to VR


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

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 596e940264231531d0992c0a51341556ac77b770
Parents: 1b40850
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Mon Feb 25 12:34:37 2013 -0800
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Mon Feb 25 16:08:15 2013 -0800

----------------------------------------------------------------------
 api/src/com/cloud/dc/DataCenter.java               |    4 +++
 api/src/com/cloud/vm/NicProfile.java               |   18 +++++++++++++++
 server/src/com/cloud/dc/DataCenterVO.java          |    2 +
 .../src/com/cloud/network/NetworkManagerImpl.java  |    6 +++-
 .../com/cloud/network/guru/DirectNetworkGuru.java  |    2 +
 .../router/VirtualNetworkApplianceManagerImpl.java |   10 ++++++++
 6 files changed, 40 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/596e9402/api/src/com/cloud/dc/DataCenter.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/dc/DataCenter.java b/api/src/com/cloud/dc/DataCenter.java
index 0c77c67..5f32988 100644
--- a/api/src/com/cloud/dc/DataCenter.java
+++ b/api/src/com/cloud/dc/DataCenter.java
@@ -37,6 +37,10 @@ public interface DataCenter extends InfrastructureEntity, Grouping, Identity,
In
 
     String getDns2();
 
+    String getIp6Dns1();
+
+    String getIp6Dns2();
+
     String getGuestNetworkCidr();
 
     String getName();

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/596e9402/api/src/com/cloud/vm/NicProfile.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/NicProfile.java b/api/src/com/cloud/vm/NicProfile.java
index e9e091c..5970ccd 100644
--- a/api/src/com/cloud/vm/NicProfile.java
+++ b/api/src/com/cloud/vm/NicProfile.java
@@ -50,6 +50,8 @@ public class NicProfile implements InternalIdentity {
     Integer deviceId;
     String dns1;
     String dns2;
+    String ip6Dns1;
+    String ip6Dns2;
     Integer networkRate;
     boolean isSecurityGroupEnabled;
     String name;
@@ -332,4 +334,20 @@ public class NicProfile implements InternalIdentity {
 		this.requestedIpv6 = requestedIpv6;
 	}
 
+	public String getIp6Dns1() {
+		return ip6Dns1;
+	}
+
+	public void setIp6Dns1(String ip6Dns1) {
+		this.ip6Dns1 = ip6Dns1;
+	}
+
+	public String getIp6Dns2() {
+		return ip6Dns2;
+	}
+
+	public void setIp6Dns2(String ip6Dns2) {
+		this.ip6Dns2 = ip6Dns2;
+	}
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/596e9402/server/src/com/cloud/dc/DataCenterVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/dc/DataCenterVO.java b/server/src/com/cloud/dc/DataCenterVO.java
index 6d609cf..6da13e7 100644
--- a/server/src/com/cloud/dc/DataCenterVO.java
+++ b/server/src/com/cloud/dc/DataCenterVO.java
@@ -440,6 +440,7 @@ public class DataCenterVO implements DataCenter {
         this.macAddress = macAddress;
     }
 
+ 	@Override
 	public String getIp6Dns1() {
 		return ip6Dns1;
 	}
@@ -448,6 +449,7 @@ public class DataCenterVO implements DataCenter {
 		this.ip6Dns1 = ip6Dns1;
 	}
 
+ 	@Override
 	public String getIp6Dns2() {
 		return ip6Dns2;
 	}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/596e9402/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 1f7e1fd..82893c4 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -3405,6 +3405,8 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager,
L
     			nic.setReservationId(String.valueOf(ip.getVlanTag()));
     			nic.setMacAddress(ip.getMacAddress());
     		}
+    		nic.setDns1(dc.getDns1());
+    		nic.setDns2(dc.getDns2());
     	}
     	
     	if (network.getIp6Gateway() != null) {
@@ -3426,10 +3428,10 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager,
L
     				nic.setMacAddress(ip.getMacAddress());
     			}
     		}
+    		nic.setIp6Dns1(dc.getIp6Dns1());
+    		nic.setIp6Dns2(dc.getIp6Dns2());
     	}
 
-        nic.setDns1(dc.getDns1());
-        nic.setDns2(dc.getDns2());
     }
 
 	@Override

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/596e9402/server/src/com/cloud/network/guru/DirectNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/DirectNetworkGuru.java b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
index 7ea988f..46a525e 100755
--- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
@@ -173,6 +173,8 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru
{
         if (profile != null) {
             profile.setDns1(dc.getDns1());
             profile.setDns2(dc.getDns2());
+            profile.setIp6Dns1(dc.getIp6Dns1());
+            profile.setIp6Dns2(dc.getIp6Dns2());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/596e9402/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 1abca51..980d482 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -1922,6 +1922,8 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase
implements V
         NicProfile controlNic = null;
         String defaultDns1 = null;
         String defaultDns2 = null;
+        String defaultIp6Dns1 = null;
+        String defaultIp6Dns2 = null;
         for (NicProfile nic : profile.getNics()) {
             int deviceId = nic.getDeviceId();
             boolean ipv4 = false, ipv6 = false;
@@ -1945,6 +1947,8 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase
implements V
             	}
                 defaultDns1 = nic.getDns1();
                 defaultDns2 = nic.getDns2();
+                defaultIp6Dns1 = nic.getIp6Dns1();
+                defaultIp6Dns2 = nic.getIp6Dns2();
             }
 
             if (nic.getTrafficType() == TrafficType.Management) {
@@ -2040,6 +2044,12 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase
implements V
             if (defaultDns2 != null) {
                 buf.append(" dns2=").append(defaultDns2);
             }
+            if (defaultIp6Dns1 != null) {
+                buf.append(" ip6dns1=").append(defaultIp6Dns1);
+            }
+            if (defaultIp6Dns2 != null) {
+                buf.append(" ip6dns2=").append(defaultIp6Dns2);
+            }
 
             boolean useExtDns = !dnsProvided;
             /* For backward compatibility */


Mime
View raw message