You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ch...@apache.org on 2013/01/17 01:38:52 UTC

[2/15] git commit: Move unit test

Move unit test

Signed-off-by: Chiradeep Vittal <ch...@apache.org>


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

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 2b43a3e74ef0e448eb407d3a967f9d8cf2a1d71b
Parents: 11b804a
Author: Chiradeep Vittal <ch...@apache.org>
Authored: Wed Jan 16 15:30:08 2013 -0800
Committer: Chiradeep Vittal <ch...@apache.org>
Committed: Wed Jan 16 15:30:08 2013 -0800

----------------------------------------------------------------------
 .../resource/test/CiscoVnmcResourceTest.java       |  115 +++++++++++++++
 1 files changed, 115 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2b43a3e7/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/test/CiscoVnmcResourceTest.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/test/CiscoVnmcResourceTest.java b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/test/CiscoVnmcResourceTest.java
new file mode 100644
index 0000000..ff80616
--- /dev/null
+++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/test/CiscoVnmcResourceTest.java
@@ -0,0 +1,115 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the 
+// specific language governing permissions and limitations
+// under the License.
+package com.cloud.network.resource.test;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.cloud.network.resource.CiscoVnmcResource;
+import com.cloud.utils.exception.ExecutionException;
+
+
+
+public class CiscoVnmcResourceTest {
+	static CiscoVnmcResource resource;
+	static String tenantName = "TenantB";
+	@BeforeClass
+	public static void setUpClass() throws Exception {
+		resource = new CiscoVnmcResource("10.223.56.5", "admin", "C1sco123");
+		try {
+			boolean response = resource.login();
+			assertTrue(response);
+		} catch (ExecutionException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+	@Test
+	public void testLogin() {
+		//fail("Not yet implemented");
+		try {
+			boolean response = resource.login();
+			assertTrue(response);
+		} catch (ExecutionException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+	@Test
+	public void testCreateTenant() {
+		//fail("Not yet implemented");
+		try {
+			boolean response = resource.createTenant(tenantName);
+			assertTrue(response);
+		} catch (ExecutionException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+	
+	@Test
+	public void testCreateTenantVDC() {
+		//fail("Not yet implemented");
+		try {
+			boolean response = resource.createTenantVDC(tenantName);
+			assertTrue(response);
+		} catch (ExecutionException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+	
+	
+	@Test
+	public void testCreateTenantVDCEdgeDeviceProfile() {
+		//fail("Not yet implemented");
+		try {
+			boolean response = resource.createTenantVDCEdgeDeviceProfile(tenantName);
+			assertTrue(response);
+		} catch (ExecutionException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+	
+	@Test
+	public void testCreateTenantVDCEdgeDeviceRoutePolicy() {
+		try {
+			boolean response = resource.createTenantVDCEdgeStaticRoutePolicy(tenantName);
+			assertTrue(response);
+		} catch (ExecutionException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+	
+	@Test
+	public void testCreateTenantVDCEdgeDeviceRoute() {
+		try {
+			boolean response = resource.createTenantVDCEdgeStaticRoute(tenantName, 
+					"10.223.136.1", "Edge_Outside", "0.0.0.0", "0.0.0.0");
+			assertTrue(response);
+		} catch (ExecutionException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+}