Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 56D71200AE4 for ; Thu, 26 May 2016 05:05:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 55B0C160A34; Thu, 26 May 2016 03:05:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7A72D160A2E for ; Thu, 26 May 2016 05:05:47 +0200 (CEST) Received: (qmail 67558 invoked by uid 500); 26 May 2016 03:05:43 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 64741 invoked by uid 99); 26 May 2016 03:05:41 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 May 2016 03:05:41 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9D8BCEAB54; Thu, 26 May 2016 03:05:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: swill@apache.org To: commits@cloudstack.apache.org Date: Thu, 26 May 2016 03:05:56 -0000 Message-Id: <6d1a3110c9f84831b58dccf846a521d7@git.apache.org> In-Reply-To: <499c689eb98a479db368b0a82be15974@git.apache.org> References: <499c689eb98a479db368b0a82be15974@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [17/39] git commit: updated refs/heads/master to 3c800b4 archived-at: Thu, 26 May 2016 03:05:48 -0000 Nuage VSP : Extending Marvin test coverage Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2ca0d9b0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2ca0d9b0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2ca0d9b0 Branch: refs/heads/master Commit: 2ca0d9b0e105e9b6d5462319e0ada716d3b66e55 Parents: d862a09 Author: Prashanth Manthena Authored: Mon May 2 10:16:34 2016 +0200 Committer: Nick Livens Committed: Tue May 24 11:12:19 2016 +0200 ---------------------------------------------------------------------- .../plugins/nuagevsp/nuageTestCase.py | 8 +++--- .../plugins/nuagevsp/test_nuage_vpc_network.py | 28 +++++++++++++++----- tools/marvin/marvin/deployDataCenter.py | 17 +++++++++++- 3 files changed, 43 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ca0d9b0/test/integration/plugins/nuagevsp/nuageTestCase.py ---------------------------------------------------------------------- diff --git a/test/integration/plugins/nuagevsp/nuageTestCase.py b/test/integration/plugins/nuagevsp/nuageTestCase.py index 9d0d077..11032a6 100644 --- a/test/integration/plugins/nuagevsp/nuageTestCase.py +++ b/test/integration/plugins/nuagevsp/nuageTestCase.py @@ -50,7 +50,7 @@ import socket class nuageTestCase(cloudstackTestCase): @classmethod - def setUpClass(cls): + def setUpClass(cls, zone=None): cls.debug("setUpClass nuageTestCase") # We want to fail quicker, if it's a failure @@ -60,9 +60,11 @@ class nuageTestCase(cloudstackTestCase): cls.api_client = test_client.getApiClient() cls.db_client = test_client.getDbConnection() cls.test_data = test_client.getParsedTestDataConfig() - # Get Zone, Domain and templates - cls.zone = get_zone(cls.api_client) + cls.zone = get_zone(cls.api_client, + zone_name=zone.name if zone else None, + zone_id=zone.id if zone else None + ) cls.domain = get_domain(cls.api_client) cls.template = get_template(cls.api_client, cls.zone.id, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ca0d9b0/test/integration/plugins/nuagevsp/test_nuage_vpc_network.py ---------------------------------------------------------------------- diff --git a/test/integration/plugins/nuagevsp/test_nuage_vpc_network.py b/test/integration/plugins/nuagevsp/test_nuage_vpc_network.py index a8361d0..15134b6 100644 --- a/test/integration/plugins/nuagevsp/test_nuage_vpc_network.py +++ b/test/integration/plugins/nuagevsp/test_nuage_vpc_network.py @@ -15,22 +15,22 @@ # specific language governing permissions and limitations # under the License. -""" Tests for basic VPC Network functionality with Nuage VSP SDN plugin +""" Component tests for basic VPC Network functionality with Nuage VSP SDN plugin """ # Import Local Modules from nuageTestCase import nuageTestCase -from marvin.lib.base import Account +from marvin.lib.base import Account, Zone # Import System Modules from nose.plugins.attrib import attr -class TestVpcNetworkNuage(nuageTestCase): +class TestNuageVpcNetwork(nuageTestCase): """ Test basic VPC Network functionality with Nuage VSP SDN plugin """ @classmethod - def setUpClass(cls): - super(TestVpcNetworkNuage, cls).setUpClass() + def setUpClass(cls, zone=None): + super(TestNuageVpcNetwork, cls).setUpClass(zone=zone) return def setUp(self): @@ -45,7 +45,7 @@ class TestVpcNetworkNuage(nuageTestCase): @attr(tags=["advanced", "nuagevsp"], required_hardware="false") def test_nuage_vpc_network(self): - """ Test Basic VPC Network Functionality with Nuage VSP SDN plugin + """ Test basic VPC Network functionality with Nuage VSP SDN plugin """ # 1. Create Nuage VSP VPC offering, check if it is successfully created and enabled. @@ -97,3 +97,19 @@ class TestVpcNetworkNuage(nuageTestCase): # VSD verification for ACL item self.verify_vsp_firewall_rule(acl_item) + + @attr(tags=["advanced", "nuagevsp", "multizone"], required_hardware="false") + def test_nuage_vpc_network_multizone(self): + """ Test basic VPC Network functionality with Nuage VSP SDN plugin on multiple zones + """ + + # Repeat the tests in the above testcase "test_nuage_vpc_network" on multiple zones + + self.debug("Testing basic VPC Network functionality with Nuage VSP SDN plugin on multiple zones...") + zones = Zone.list(self.api_client) + if len(zones) == 1: + self.skipTest("There is only one Zone configured: skipping test") + for zone in zones: + self.debug("Zone - %s" % zone.name) + self.setUpClass(zone=zone) + self.test_nuage_vpc_network() http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ca0d9b0/tools/marvin/marvin/deployDataCenter.py ---------------------------------------------------------------------- diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py index 889aab5..2413328 100644 --- a/tools/marvin/marvin/deployDataCenter.py +++ b/tools/marvin/marvin/deployDataCenter.py @@ -561,7 +561,7 @@ class DeployDataCenters(object): netprov.physicalnetworkid = phynetwrk.id result = self.__apiClient.addNetworkServiceProvider(netprov) self.enableProvider(result.id) - elif provider.name in ['Netscaler', 'JuniperSRX', 'F5BigIp', 'NiciraNvp']: + elif provider.name in ['Netscaler', 'JuniperSRX', 'F5BigIp', 'NiciraNvp', 'NuageVsp']: netprov = addNetworkServiceProvider.\ addNetworkServiceProviderCmd() netprov.name = provider.name @@ -631,6 +631,21 @@ class DeployDataCenters(object): self.__tcRunLogger.\ debug("==== AddNiciraNvp Successful =====") self.__addToCleanUp("NiciraNvp", ret.id) + elif provider.name == 'NuageVsp': + dev = addNuageVspDevice.addNuageVspDeviceCmd() + dev.hostname = device.hostname + dev.port = device.port + dev.username = device.username + dev.password = device.password + dev.retrycount = device.retrycount + dev.retryinterval = device.retryinterval + dev.physicalnetworkid = phynetwrk.id + ret = self.__apiClient.addNuageVspDevice(dev) + if ret.id: + self.__tcRunLogger.\ + debug("==== addNuageVspDevice " + "Successful=====") + self.__addToCleanUp("addNuageVspDevice", ret.id) else: raise InvalidParameterException( "Device %s doesn't match "