cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tall...@apache.org
Subject git commit: updated refs/heads/master to 71611da
Date Wed, 17 Sep 2014 09:11:06 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 58ea99a9d -> 71611da17


CLOUDSTACK-7547: Brocade Device Data was hard coded, moved it to config file

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>


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

Branch: refs/heads/master
Commit: 71611da17f082d9d813c89767a69c5b13ba5adf1
Parents: 58ea99a
Author: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
Authored: Mon Sep 15 18:01:01 2014 +0530
Committer: SrikanteswaraRao Talluri <talluri@apache.org>
Committed: Wed Sep 17 14:40:30 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_brocade_vcs.py | 44 ++++++++++-----------
 1 file changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/71611da1/test/integration/component/test_brocade_vcs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_brocade_vcs.py b/test/integration/component/test_brocade_vcs.py
index a5eff53..adaf21b 100644
--- a/test/integration/component/test_brocade_vcs.py
+++ b/test/integration/component/test_brocade_vcs.py
@@ -19,28 +19,25 @@
 """
 #Import Local Modules
 from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import cloudstackTestCase
-from marvin.cloudstackAPI import *
-from marvin.lib.utils import (cleanup_resources,
-                              random_gen, validateList)
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.cloudstackAPI import (listPhysicalNetworks,
+                                  listNetworkServiceProviders,
+                                  addNetworkServiceProvider,
+                                  addBrocadeVcsDevice,
+                                  updateNetworkServiceProvider,
+                                  deleteBrocadeVcsDevice)
+from marvin.lib.utils import (cleanup_resources)
 from marvin.lib.base import (Account,
                              VirtualMachine,
-                             PublicIPAddress,
-                             LoadBalancerRule,
                              ServiceOffering,
                              NetworkOffering,
-                             Host,
-                             Network,
-                             NATRule,
-                             Configurations)
+                             Configurations,
+                             Network)
 from marvin.lib.common import (get_domain,
                                get_zone,
                                get_template)
-from marvin.sshClient import SshClient
-from marvin.codes import PASS
 import time
 
-
 class Services:
     """Test brocade plugin
     """
@@ -73,11 +70,6 @@ class Services:
                                     "publicport": 22,
                                     "protocol": 'TCP',
                                 },
-                         "brocade": {
-                                "ipaddress": '10.24.51.45',
-                                "username": 'admin',
-                                "password": 'password123'
-                         },
                          "network_offering": {
                                     "name": 'Brocade',
                                     "displaytext": 'Brocade',
@@ -118,7 +110,15 @@ class TestBrocadeVcs(cloudstackTestCase):
                             cls.zone.id,
                             cls.services["ostype"]
                            )
-        cls.brocade_services = cls.services["brocade"]
+        try:
+            cls.brocadeDeviceData = cls.config.__dict__["brocadeDeviceData"].__dict__
+            assert cls.brocadeDeviceData["ipaddress"], "ipaddress of brocade device\
+                    not present in config file"
+            assert cls.brocadeDeviceData["username"], "username of brocade device\
+                    not present in config file"
+        except Exception as e:
+            raise unittest.SkipTest("Exception occured while reading\
+                    brocade device data from config file: %s" % e)
         try:
 
            """ Adds Brocade device and enables NS provider"""
@@ -142,9 +142,9 @@ class TestBrocadeVcs(cloudstackTestCase):
 
            cmd2 = addBrocadeVcsDevice.addBrocadeVcsDeviceCmd()
            cmd2.physicalnetworkid = physical_network.id
-           cmd2.username = cls.brocade_services["username"]
-           cmd2.password = cls.brocade_services["password"]
-           cmd2.hostname = cls.brocade_services["ipaddress"]
+           cmd2.username = cls.brocadeDeviceData["username"]
+           cmd2.password = cls.brocadeDeviceData["password"]
+           cmd2.hostname = cls.brocadeDeviceData["ipaddress"]
            cls.brocade = cls.api_client.addBrocadeVcsDevice(cmd2)
 
            if brocade_provider.state != 'Enabled':


Mime
View raw message