cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [2/3] git commit: updated refs/heads/master to f5db821
Date Thu, 30 Jul 2015 12:23:58 GMT
Update NiciraNvpGuestNetworkGuruTest.java

add partial vxlan tests

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

Branch: refs/heads/master
Commit: e63a56d650e31ab513f82ea359756b799217d47e
Parents: d03505a
Author: Sten Spans <sten@blinkenlights.nl>
Authored: Thu Jul 30 12:47:49 2015 +0200
Committer: Sten Spans <sten@blinkenlights.nl>
Committed: Thu Jul 30 12:47:49 2015 +0200

----------------------------------------------------------------------
 .../guru/NiciraNvpGuestNetworkGuruTest.java       | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e63a56d6/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
b/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
index 881c39f..36e4643 100644
--- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
+++ b/plugins/network-elements/nicira-nvp/test/com/cloud/network/guru/NiciraNvpGuestNetworkGuruTest.java
@@ -114,13 +114,17 @@ public class NiciraNvpGuestNetworkGuruTest {
         when(offering.getGuestType()).thenReturn(GuestType.Isolated);
 
         final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
-        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"}));
+        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT",
"VXLAN"}));
         when(physnet.getId()).thenReturn(NETWORK_ID);
 
         when(nosd.areServicesSupportedByNetworkOffering(NETWORK_ID, Service.Connectivity)).thenReturn(true);
 
         assertTrue(guru.canHandle(offering, NetworkType.Advanced, physnet) == true);
 
+        // Supported: IsolationMethod == VXLAN
+        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"VXLAN"}));
+        assertTrue(guru.canHandle(offering, NetworkType.Advanced, physnet) == true);
+
         // Not supported TrafficType != Guest
         when(offering.getTrafficType()).thenReturn(TrafficType.Management);
         assertFalse(guru.canHandle(offering, NetworkType.Advanced, physnet) == true);
@@ -134,7 +138,7 @@ public class NiciraNvpGuestNetworkGuruTest {
         when(offering.getGuestType()).thenReturn(GuestType.Isolated);
         assertFalse(guru.canHandle(offering, NetworkType.Basic, physnet) == true);
 
-        // Not supported: IsolationMethod != STT
+        // Not supported: IsolationMethod != STT, VXLAN
         when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"VLAN"}));
         assertFalse(guru.canHandle(offering, NetworkType.Advanced, physnet) == true);
 
@@ -144,7 +148,7 @@ public class NiciraNvpGuestNetworkGuruTest {
     public void testDesign() {
         final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById((Long)any())).thenReturn(physnet);
-        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"}));
+        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT",
"VXLAN"}));
         when(physnet.getId()).thenReturn(NETWORK_ID);
 
         final NiciraNvpDeviceVO device = mock(NiciraNvpDeviceVO.class);
@@ -171,7 +175,7 @@ public class NiciraNvpGuestNetworkGuruTest {
     public void testDesignNoElementOnPhysicalNetwork() {
         final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById((Long)any())).thenReturn(physnet);
-        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"}));
+        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT",
"VXLAN"}));
         when(physnet.getId()).thenReturn(NETWORK_ID);
 
         mock(NiciraNvpDeviceVO.class);
@@ -217,7 +221,7 @@ public class NiciraNvpGuestNetworkGuruTest {
     public void testDesignNoConnectivityInOffering() {
         final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById((Long)any())).thenReturn(physnet);
-        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"}));
+        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT",
"VXLAN"}));
         when(physnet.getId()).thenReturn(NETWORK_ID);
 
         final NiciraNvpDeviceVO device = mock(NiciraNvpDeviceVO.class);
@@ -243,7 +247,7 @@ public class NiciraNvpGuestNetworkGuruTest {
     public void testImplement() throws InsufficientVirtualNetworkCapacityException {
         final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById((Long)any())).thenReturn(physnet);
-        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"}));
+        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT",
"VXLAN"}));
         when(physnet.getId()).thenReturn(NETWORK_ID);
 
         final NiciraNvpDeviceVO device = mock(NiciraNvpDeviceVO.class);
@@ -412,7 +416,7 @@ public class NiciraNvpGuestNetworkGuruTest {
     public void testShutdown() throws InsufficientVirtualNetworkCapacityException, URISyntaxException
{
         final PhysicalNetworkVO physnet = mock(PhysicalNetworkVO.class);
         when(physnetdao.findById((Long)any())).thenReturn(physnet);
-        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT"}));
+        when(physnet.getIsolationMethods()).thenReturn(Arrays.asList(new String[] {"STT",
"VXLAN"}));
         when(physnet.getId()).thenReturn(NETWORK_ID);
 
         final NiciraNvpDeviceVO device = mock(NiciraNvpDeviceVO.class);


Mime
View raw message