cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tall...@apache.org
Subject [31/50] [abbrv] git commit: updated refs/heads/master to d22adf9
Date Wed, 23 Apr 2014 06:17:43 GMT
CLOUDSTACK-6316: Fixed issues in various files(testcases and marvin related)

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/0d5ec633
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0d5ec633
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0d5ec633

Branch: refs/heads/master
Commit: 0d5ec633715a7d0bbe98485036ec18350a500fb3
Parents: 65e8f2d
Author: SrikanteswaraRao Talluri <talluri@apache.org>
Authored: Fri Apr 4 18:35:17 2014 +0530
Committer: SrikanteswaraRao Talluri <talluri@apache.org>
Committed: Fri Apr 4 19:46:25 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_assign_vm.py    | 20 ++++++++++----------
 .../component/test_deploy_vm_userdata_reg.py    |  4 ++--
 .../component/test_network_offering.py          | 10 +++++-----
 test/integration/component/test_portable_ip.py  | 14 +++++++-------
 .../component/test_project_configs.py           |  6 +++---
 .../component/test_project_limits.py            |  2 +-
 test/integration/component/test_volumes.py      |  2 +-
 tools/marvin/marvin/cloudstackTestClient.py     | 10 ++++++----
 tools/marvin/marvin/lib/common.py               |  4 +---
 9 files changed, 36 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d5ec633/test/integration/component/test_assign_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_assign_vm.py b/test/integration/component/test_assign_vm.py
index 0429fa4..24b63a6 100644
--- a/test/integration/component/test_assign_vm.py
+++ b/test/integration/component/test_assign_vm.py
@@ -354,8 +354,8 @@ class TestVMOwnership(cloudstackTestCase):
         # 1. deploy VM in sub subdomain1
         # 2. stop VM in sub subdomain1
         # 3. assignVirtualMachine to subdomain2
-        userapiclient = self.testClient.getUserApiClient(account=self.sdomain_account_user1['account'].name,
-                                                         domain=self.sdomain_account_user1['domain'].name,
+        userapiclient = self.testClient.getUserApiClient(UserName=self.sdomain_account_user1['account'].name,
+                                                         DomainName=self.sdomain_account_user1['domain'].name,
                                                          type=2)
         self.create_vm(self.sdomain_account_user1['account'], self.sdomain_account_user1['domain'])
         self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, userapiclient,
self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
@@ -390,8 +390,8 @@ class TestVMOwnership(cloudstackTestCase):
         # Validate the following:
         # 1. deploy VM in sub subdomain1 with volumes.
         # 3. assignVirtualMachine to subdomain2
-        userapiclient = self.testClient.getUserApiClient(account=self.sdomain_account_user1['account'].name,
-                                                         domain=self.sdomain_account_user1['domain'].name,
+        userapiclient = self.testClient.getUserApiClient(UserName=self.sdomain_account_user1['account'].name,
+                                                         DomainName=self.sdomain_account_user1['domain'].name,
                                                          type=2)
         self.create_vm(self.sdomain_account_user1['account'], self.sdomain_account_user1['domain'],volume=self.sdomain_account_user1['volume'])
         self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, userapiclient,
self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
@@ -432,8 +432,8 @@ class TestVMOwnership(cloudstackTestCase):
         # Validate the following:
         # 1. deploy VM in sub subdomain1 with snapshot.
         # 3. assignVirtualMachine to subdomain2
-        userapiclient = self.testClient.getUserApiClient(account=self.sdomain_account_user1['account'].name,
-                                                         domain=self.sdomain_account_user1['domain'].name,
+        userapiclient = self.testClient.getUserApiClient(UserName=self.sdomain_account_user1['account'].name,
+                                                         DomainName=self.sdomain_account_user1['domain'].name,
                                                          type=2)
         self.create_vm(self.sdomain_account_user1['account'], self.sdomain_account_user1['domain'],
project=self.sdomain_account_user1['project'])
         self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, userapiclient,
self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
@@ -451,8 +451,8 @@ class TestVMOwnership(cloudstackTestCase):
                               account=self.sdomain_account_user2['account'].name,
                               domainid=self.sdomain_account_user2['domain'].id,
                               max=0)
-        userapiclient = self.testClient.getUserApiClient(account=self.sdomain_account_user1['account'].name,
-                                                         domain=self.sdomain_account_user1['domain'].name,
+        userapiclient = self.testClient.getUserApiClient(UserName=self.sdomain_account_user1['account'].name,
+                                                         DomainName=self.sdomain_account_user1['domain'].name,
                                                          type=2)
         self.create_vm(self.sdomain_account_user1['account'], self.sdomain_account_user1['domain'],
snapshot=True)
         self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, userapiclient,
self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)
@@ -471,8 +471,8 @@ class TestVMOwnership(cloudstackTestCase):
                               account=self.sdomain_account_user2['account'].name,
                               domainid=self.sdomain_account_user2['domain'].id,
                               max=0)
-        userapiclient = self.testClient.getUserApiClient(account=self.sdomain_account_user1['account'].name,
-                                                         domain=self.sdomain_account_user1['domain'].name,
+        userapiclient = self.testClient.getUserApiClient(UserName=self.sdomain_account_user1['account'].name,
+                                                         DomainName=self.sdomain_account_user1['domain'].name,
                                                          type=2)
         self.create_vm(self.sdomain_account_user1['account'], self.sdomain_account_user1['domain'],
snapshot=True, volume=self.sdomain_account_user1['volume'])
         self.assertRaises(Exception, self.virtual_machine.assign_virtual_machine, userapiclient,
self.sdomain_account_user2['account'].name ,self.sdomain_account_user2['domain'].id)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d5ec633/test/integration/component/test_deploy_vm_userdata_reg.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_deploy_vm_userdata_reg.py b/test/integration/component/test_deploy_vm_userdata_reg.py
index c87a41a..0fd7a06 100755
--- a/test/integration/component/test_deploy_vm_userdata_reg.py
+++ b/test/integration/component/test_deploy_vm_userdata_reg.py
@@ -72,9 +72,9 @@ class TestDeployVmWithUserData(cloudstackTestCase):
     @classmethod
     def setUpClass(cls):
         cls.testClient = super(TestDeployVmWithUserData, cls).getClsTestClient()
-        cls.api_client = cls.testClient.getApiClient()
+        cls.apiClient = cls.testClient.getApiClient()
         cls.services = Services().services
-        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+        cls.zone = get_zone(cls.apiClient, cls.testClient.getZoneForTests())
         if cls.zone.localstorageenabled:
             #For devcloud since localstroage is enabled
             cls.services["service_offering"]["storagetype"] = "local"

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d5ec633/test/integration/component/test_network_offering.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_network_offering.py b/test/integration/component/test_network_offering.py
index efaa2cb..da43e8a 100644
--- a/test/integration/component/test_network_offering.py
+++ b/test/integration/component/test_network_offering.py
@@ -1180,15 +1180,15 @@ class TestNOWithOnlySourceNAT(cloudstackTestCase):
     @classmethod
     def setUpClass(cls):
         cls.testClient = super(TestNOWithOnlySourceNAT, cls).getClsTestClient()
-        cls.api_client = cls.testClient.getApiClient()
+        cls.apiClient = cls.testClient.getApiClient()
 
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.domain = get_domain(cls.api_client)
-        cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
+        cls.domain = get_domain(cls.apiClient)
+        cls.zone = get_zone(cls.apiClient, cls.testClient.getZoneForTests())
         cls.services['mode'] = cls.zone.networktype
         cls.template = get_template(
-            cls.apiclient,
+            cls.apiClient,
             cls.zone.id,
             cls.services["ostype"]
         )
@@ -1197,7 +1197,7 @@ class TestNOWithOnlySourceNAT(cloudstackTestCase):
         cls.services["virtual_machine"]["template"] = cls.template.id
 
         cls.service_offering = ServiceOffering.create(
-            cls.apiclient,
+            cls.apiClient,
             cls.services["service_offering"]
         )
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d5ec633/test/integration/component/test_portable_ip.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py
index 505c9cd..c67b7cc 100644
--- a/test/integration/component/test_portable_ip.py
+++ b/test/integration/component/test_portable_ip.py
@@ -141,7 +141,7 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase):
 
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.region = get_region(cls.api_client, cls.services)
+        cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
@@ -279,7 +279,7 @@ class TestDeletePortablePublicIpRanges(cloudstackTestCase):
 
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.region = get_region(cls.api_client, cls.services)
+        cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
@@ -453,7 +453,7 @@ class TestListPortablePublicIpRanges(cloudstackTestCase):
 
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.region = get_region(cls.api_client, cls.services)
+        cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
@@ -579,7 +579,7 @@ class TestAssociatePublicIp(cloudstackTestCase):
 
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.region = get_region(cls.api_client, cls.services)
+        cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
@@ -897,7 +897,7 @@ class TestDisassociatePublicIp(cloudstackTestCase):
 
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.region = get_region(cls.api_client, cls.services)
+        cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)
@@ -1149,7 +1149,7 @@ class TestDeleteAccount(cloudstackTestCase):
 
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.region = get_region(cls.api_client, cls.services)
+        cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.services['mode'] = cls.zone.networktype
@@ -1365,7 +1365,7 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
 
         cls.services = Services().services
         # Get Zone, Domain and templates
-        cls.region = get_region(cls.api_client, cls.services)
+        cls.region = get_region(cls.api_client)
         cls.domain = get_domain(cls.api_client)
         cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
         cls.pod = get_pod(cls.api_client, cls.zone.id)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d5ec633/test/integration/component/test_project_configs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_configs.py b/test/integration/component/test_project_configs.py
index e19d90b..983e63a 100644
--- a/test/integration/component/test_project_configs.py
+++ b/test/integration/component/test_project_configs.py
@@ -424,7 +424,7 @@ class TestProjectInviteRequired(cloudstackTestCase):
         cls.services['mode'] = cls.zone.networktype
 
         # Create domains, account etc.
-        cls.domain = get_domain(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
 
         # Verify 'project.invite.required' is set to false
         configs = Configurations.list(
@@ -574,7 +574,7 @@ class TestProjectInviteRequiredTrue(cloudstackTestCase):
         cls.services['mode'] = cls.zone.networktype
 
         # Create domains, account etc.
-        cls.domain = get_domain(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
 
         # Verify 'project.invite.required' is set to true
         configs = Configurations.list(
@@ -725,7 +725,7 @@ class TestProjectInviteTimeout(cloudstackTestCase):
         cls.services['mode'] = cls.zone.networktype
 
         # Create domains, account etc.
-        cls.domain = get_domain(cls.api_client, cls.services)
+        cls.domain = get_domain(cls.api_client)
 
         # Verify 'project.invite.required' is set to true
         configs = Configurations.list(

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d5ec633/test/integration/component/test_project_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_limits.py b/test/integration/component/test_project_limits.py
index 2420e2d..0727b22 100644
--- a/test/integration/component/test_project_limits.py
+++ b/test/integration/component/test_project_limits.py
@@ -124,7 +124,7 @@ class TestProjectLimits(cloudstackTestCase):
 
     @classmethod
     def setUpClass(cls):
-        cls.testClient = super(TestAddNetScaler, cls).getClsTestClient()
+        cls.testClient = super(TestProjectLimits, cls).getClsTestClient()
         cls.api_client = cls.testClient.getApiClient()
 
         cls.services = Services().services

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d5ec633/test/integration/component/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_volumes.py b/test/integration/component/test_volumes.py
index 2bbc1ae..87755cc 100644
--- a/test/integration/component/test_volumes.py
+++ b/test/integration/component/test_volumes.py
@@ -1110,7 +1110,7 @@ class TestVolumes(cloudstackTestCase):
         )
         self.assertTrue(domuser is not None)
 
-        domapiclient = self.testClient.getUserApiClient(account=domuser.name, domain=dom.name)
+        domapiclient = self.testClient.getUserApiClient(UserName=domuser.name, DomainName=dom.name)
 
         diskoffering = DiskOffering.list(self.apiclient)
         self.assertTrue(isinstance(diskoffering, list), msg="DiskOffering list is not a list?")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d5ec633/tools/marvin/marvin/cloudstackTestClient.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py
index 25dfcc7..281057b 100644
--- a/tools/marvin/marvin/cloudstackTestClient.py
+++ b/tools/marvin/marvin/cloudstackTestClient.py
@@ -399,7 +399,7 @@ class CSTestClient(object):
             return self.__apiClient
         return None
 
-    def getUserApiClient(self, account, domain, type=0):
+    def getUserApiClient(self, UserName=None, DomainName=None, type=0):
         """
         @Name : getUserApiClient
         @Desc : Provides the User API Client to test Users
@@ -407,7 +407,9 @@ class CSTestClient(object):
         @OutPut : FAILED In case of an issue
                   else User API Client
         """
-        return self.__createUserApiClient(account, domain, type)
+        if UserName is None or DomainName is None:
+            return FAILED
+        return self.__createUserApiClient(UserName, DomainName, type)
 
     def submitCmdsAndWait(self, cmds, workers=1):
         '''
@@ -424,7 +426,7 @@ class CSTestClient(object):
                 ntimes, with nums_threads of threads
         '''
         if self.__asyncJobMgr is None:
-            self.__asyncJobMgr = asyncJobMgr.asyncJobMgr(self.__apiClient,
+            self.__asyncJobMgr = asyncJobMgr(self.__apiClient,
                                                          self.__dbConnection)
         self.__asyncJobMgr.submitJobExecuteNtimes(job, ntimes,
                                                   nums_threads,
@@ -436,6 +438,6 @@ class CSTestClient(object):
                of threads
         '''
         if self.__asyncJobMgr is None:
-            self.__asyncJobMgr = asyncJobMgr.asyncJobMgr(self.__apiClient,
+            self.__asyncJobMgr = asyncJobMgr(self.__apiClient,
                                                          self.__dbConnection)
         self.__asyncJobMgr.submitJobs(jobs, nums_threads, interval)

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d5ec633/tools/marvin/marvin/lib/common.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/lib/common.py b/tools/marvin/marvin/lib/common.py
index b9d524c..f08cffb 100644
--- a/tools/marvin/marvin/lib/common.py
+++ b/tools/marvin/marvin/lib/common.py
@@ -160,15 +160,13 @@ def get_region(apiclient, region_id=None, region_name=None):
     @Output : 1. Region  Information for the passed inputs else first Region
               2. FAILED In case the cmd failed
     '''
-    if region_id is None and region_name is None:
-        return FAILED
     cmd = listRegions.listRegionsCmd()
     if region_name is not None:
         cmd.name = region_name
     if region_id is not None:
         cmd.id = region_id
     cmd_out = apiclient.listRegions(cmd)
-    return FAILED if validateList(cmd_out)[0] != PASS else cmd_out
+    return FAILED if validateList(cmd_out)[0] != PASS else cmd_out[0]
 
 
 def get_domain(apiclient, domain_id=None, domain_name=None):


Mime
View raw message