cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seb...@apache.org
Subject git commit: updated refs/heads/master to e8f0b2a
Date Thu, 20 Jun 2013 16:24:48 GMT
Updated Branches:
  refs/heads/master d08a6a4e7 -> e8f0b2a48


pep8'ed the file


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

Branch: refs/heads/master
Commit: e8f0b2a48b6519b2962307050aaaa57772df9b00
Parents: d08a6a4
Author: Daan Hoogland <dhoogland@schubergphilis.com>
Authored: Thu Jun 20 15:55:45 2013 +0200
Committer: Sebastien Goasguen <runseb@gmail.com>
Committed: Thu Jun 20 12:24:28 2013 -0400

----------------------------------------------------------------------
 tools/marvin/marvin/testSetupSuccess.py | 40 ++++++++++++++++++----------
 1 file changed, 26 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8f0b2a4/tools/marvin/marvin/testSetupSuccess.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/testSetupSuccess.py b/tools/marvin/marvin/testSetupSuccess.py
index dcd15e6..1701626 100644
--- a/tools/marvin/marvin/testSetupSuccess.py
+++ b/tools/marvin/marvin/testSetupSuccess.py
@@ -5,9 +5,9 @@
 # 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
@@ -21,6 +21,7 @@ from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from time import sleep as delay
 
+
 class TestSetupSuccess(cloudstackTestCase):
     """
     Test to verify if the cloudstack is ready to launch tests upon
@@ -29,12 +30,13 @@ class TestSetupSuccess(cloudstackTestCase):
     """
     @classmethod
     def setUpClass(cls):
-        cls.apiClient = super(TestSetupSuccess, cls).getClsTestClient().getApiClient()
-        
+        testClient = super(TestSetupSuccess, cls).getClsTestClient()
+        cls.apiClient = testClient.getApiClient()
+
         zones = listZones.listZonesCmd()
         cls.zones_list = cls.apiClient.listZones(zones)
         cls.retry = 2
-        
+
     def test_systemVmReady(self):
         """
         system VMs need to be ready and Running for each zone in cloudstack
@@ -42,19 +44,23 @@ class TestSetupSuccess(cloudstackTestCase):
         for z in self.zones_list:
             retry = self.retry
             while retry != 0:
-                self.debug("looking for system VMs in zone: %s, %s"%(z.id, z.name))
+                self.debug("looking for system VMs in zone: %s, %s" %
+                           (z.id, z.name))
                 sysvms = listSystemVms.listSystemVmsCmd()
                 sysvms.zoneid = z.id
                 sysvms.state = 'Running'
                 sysvms_list = self.apiClient.listSystemVms(sysvms)
                 if sysvms_list is not None and len(sysvms_list) == 2:
                     assert len(sysvms_list) == 2
-                    self.debug("found %d system VMs running {%s}"%(len(sysvms_list), sysvms_list))
+                    self.debug("found %d system VMs running {%s}" %
+                               (len(sysvms_list), sysvms_list))
                     break
                 retry = retry - 1
-                delay(60) #wait a minute for retry
-            self.assertNotEqual(retry, 0, "system VMs not Running in zone %s"%z.name)
-    
+                delay(60)  # wait a minute for retry
+            self.assertNotEqual(retry, 0,
+                                "system VMs not Running in zone %s" %
+                                z.name)
+
     def test_templateBuiltInReady(self):
         """
         built-in templates CentOS to be ready
@@ -68,13 +74,19 @@ class TestSetupSuccess(cloudstackTestCase):
                 templates.listall = 'true'
                 templates_list = self.apiClient.listTemplates(templates)
                 if templates_list is not None:
-                    builtins = [tmpl for tmpl in templates_list if tmpl.templatetype == 'BUILTIN'
and tmpl.isready == True]
+                    builtins = [tmpl
+                                for tmpl in templates_list
+                                if tmpl.templatetype == 'BUILTIN'
+                                and tmpl.isready]
                     if len(builtins) > 0:
-                        self.debug("Found %d builtins ready for use %s"%(len(builtins), builtins))
+                        self.debug("Found %d builtins ready for use %s" %
+                                   (len(builtins), builtins))
                         break
                 retry = retry - 1
-                delay(60) #wait a minute for retry
-            self.assertNotEqual(retry, 0, "builtIn templates not ready in zone %s"%z.name)
+                delay(60)  # wait a minute for retry
+            self.assertNotEqual(retry, 0,
+                                "builtIn templates not ready in zone %s" %
+                                z.name)
 
     def test_deployVmWithBuiltIn(self):
         """


Mime
View raw message