You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@apache.org on 2014/01/28 15:01:51 UTC

git commit: updated refs/heads/marvin to 226df29

Updated Branches:
  refs/heads/marvin 6c5b1670b -> 226df296d


CLOUDSTACK-5674: Some fixes to marvin and resultant changes to tests.


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

Branch: refs/heads/marvin
Commit: 226df296d0fe98fbaba328eaa7d24546c42f36d2
Parents: 6c5b167
Author: Girish Shilamkar <gi...@clogeny.com>
Authored: Tue Jan 28 02:11:24 2014 -0500
Committer: Girish Shilamkar <gi...@clogeny.com>
Committed: Tue Jan 28 02:11:24 2014 -0500

----------------------------------------------------------------------
 test/integration/smoke/test_hosts.py               |  2 +-
 test/integration/smoke/test_multipleips_per_nic.py |  2 +-
 test/integration/smoke/test_network.py             | 16 ++++++++--------
 test/integration/smoke/test_vm_life_cycle.py       |  2 +-
 tools/marvin/marvin/integration/lib/common.py      | 17 +++++++----------
 5 files changed, 18 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/226df296/test/integration/smoke/test_hosts.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_hosts.py b/test/integration/smoke/test_hosts.py
index ec81d4c..375529a 100644
--- a/test/integration/smoke/test_hosts.py
+++ b/test/integration/smoke/test_hosts.py
@@ -38,7 +38,7 @@ class TestHosts(cloudstackTestCase):
         self.dbclient = self.testClient.getDbConnection()
         self.services = self.testClient.getParsedTestDataConfig()
         self.zone = get_zone(self.apiclient, self.getZoneForTests())
-        self.pod = get_pod(apilcient=self.apiclient, self.zone.id)
+        self.pod = get_pod(self.apiclient, self.zone.id)
         self.cleanup = []
 
         return

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/226df296/test/integration/smoke/test_multipleips_per_nic.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_multipleips_per_nic.py b/test/integration/smoke/test_multipleips_per_nic.py
index 9b34b2c..6eb2d29 100644
--- a/test/integration/smoke/test_multipleips_per_nic.py
+++ b/test/integration/smoke/test_multipleips_per_nic.py
@@ -47,7 +47,7 @@ class TestDeployVM(cloudstackTestCase):
         self.apiclient = self.testClient.getApiClient()
 
         # Get Zone, Domain and Default Built-in template
-        self.domain = get_domain(self.apiclient))
+        self.domain = get_domain(self.apiclient)
         self.zone = get_zone(self.apiclient, self.getZoneForTests())
         self.testdata["mode"] = self.zone.networktype
         self.template = get_template(self.apiclient, self.zone.id, self.testdata["ostype"])

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/226df296/test/integration/smoke/test_network.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py
index 4cb1fb4..28707a3 100644
--- a/test/integration/smoke/test_network.py
+++ b/test/integration/smoke/test_network.py
@@ -18,7 +18,7 @@
 """
 #Import Local Modules
 import marvin
-from marvin.cloudstackException import cloudstackAPIException
+from marvin.cloudstackException import CloudstackAPIException
 from marvin.cloudstackTestCase import *
 from marvin.cloudstackAPI import *
 from marvin.sshClient import SshClient
@@ -383,7 +383,7 @@ class TestPortForwarding(cloudstackTestCase):
                                                 self.apiclient,
                                                 id=nat_rule.id
                                                 )
-        except cloudstackAPIException:
+        except CloudstackAPIException:
             self.debug("Nat Rule is deleted")
 
         # Check if the Public SSH port is inaccessible
@@ -501,7 +501,7 @@ class TestPortForwarding(cloudstackTestCase):
                                                 self.apiclient,
                                                 id=nat_rule.id
                                                 )
-        except cloudstackAPIException:
+        except CloudstackAPIException:
             self.debug("Nat Rule is deleted")
 
         # Check if the Public SSH port is inaccessible
@@ -801,7 +801,7 @@ class TestReleaseIP(cloudstackTestCase):
                                         id=self.nat_rule.id
                                         )
             self.debug("List NAT Rule response" + str(list_nat_rule))
-        except cloudstackAPIException:
+        except CloudstackAPIException:
             self.debug("Port Forwarding Rule is deleted")
 
         # listLoadBalancerRules should not list
@@ -812,7 +812,7 @@ class TestReleaseIP(cloudstackTestCase):
                                      id=self.lb_rule.id
                                      )
             self.debug("List LB Rule response" + str(list_lb_rule))
-        except cloudstackAPIException:
+        except CloudstackAPIException:
             self.debug("Port Forwarding Rule is deleted")
 
         # SSH Attempt though public IP should fail
@@ -927,7 +927,7 @@ class TestDeleteAccount(cloudstackTestCase):
                                     account=self.account.name,
                                     domainid=self.account.domainid
                                     )
-        except cloudstackAPIException:
+        except CloudstackAPIException:
             self.debug("Port Forwarding Rule is deleted")
 
         # ListPortForwardingRules should not
@@ -938,7 +938,7 @@ class TestDeleteAccount(cloudstackTestCase):
                                     account=self.account.name,
                                     domainid=self.account.domainid
                         )
-        except cloudstackAPIException:
+        except CloudstackAPIException:
             self.debug("NATRule is deleted")
 
         #Retrieve router for the user account
@@ -953,7 +953,7 @@ class TestDeleteAccount(cloudstackTestCase):
                              None,
                              "Check routers are properly deleted."
                    )
-        except cloudstackAPIException:
+        except CloudstackAPIException:
             self.debug("Router is deleted")
 
         except Exception as e:

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/226df296/test/integration/smoke/test_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py
index 110a65a..f7316b2 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -679,7 +679,7 @@ class TestVMLifeCycle(cloudstackTestCase):
 
         try:
             #Unmount ISO
-            command = "umount %s" % "mount_dir
+            command = "umount %s" % mount_dir
             ssh_client.execute(command)
         except Exception as e:
             self.fail("SSH failed for virtual machine: %s - %s" %

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/226df296/tools/marvin/marvin/integration/lib/common.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/common.py b/tools/marvin/marvin/integration/lib/common.py
index e8cdfc1..4177b91 100644
--- a/tools/marvin/marvin/integration/lib/common.py
+++ b/tools/marvin/marvin/integration/lib/common.py
@@ -161,8 +161,7 @@ def get_region(apiclient, region_id=None, region_name=None):
     if region_id is not None:
         cmd.id = region_id
     cmd_out = apiclient.listRegions(cmd)
-    return FAILED if validateList(cmd_out)[0] != PASS
-    return cmd_out
+    return FAILED if validateList(cmd_out)[0] != PASS else cmd_out
 
 
 def get_domain(apiclient, domain_id=None, domain_name=None):
@@ -181,8 +180,7 @@ def get_domain(apiclient, domain_id=None, domain_name=None):
     if domain_id is not None:
         cmd.id = domain_id
     cmd_out = apiclient.listRegions(cmd)
-    return FAILED if validateList(cmd_out)[0] != PASS
-    return cmd_out
+    return FAILED if validateList(cmd_out)[0] != PASS else cmd_out
 
 
 def get_zone(apiclient, zone_name=None, zone_id=None):
@@ -202,12 +200,12 @@ def get_zone(apiclient, zone_name=None, zone_id=None):
 
     cmd_out = apiclient.listZones(cmd)
 
-    return FAILED if (validateList(cmd_out)[0] != PASS)
+    if validateList(cmd_out)[0] != PASS: return FAILED
     '''
     Check if input zone name and zone id is None,
     then return first element of List Zones command
     '''
-    if ( zone_name is None and zone_id is None ) 
+    if (zone_name is None and zone_id is None): 
         return cmd_out[0]
     else:
         return cmd_out
@@ -235,8 +233,7 @@ def get_pod(apiclient, zone_id=None, pod_id=None, pod_name=None):
 
     cmd_out = apiclient.listPods(cmd)
 
-    return FAILED if ( validateList(cmd_out)[0] != PASS )
-    return cmd_out
+    return FAILED if (validateList(cmd_out)[0] != PASS) else cmd_out
 
 
 def get_template(apiclient, zone_id=None, ostype_desc=None, template_filter="featured", template_type='BUILTIN',
@@ -259,7 +256,7 @@ def get_template(apiclient, zone_id=None, ostype_desc=None, template_filter="fea
     cmd.description = ostype_desc
     ostypes_out = apiclient.listOsTypes(cmd)
 
-    return FAILED if (validateList(ostypes_out)[0] != PASS )
+    if (validateList(ostypes_out)[0] != PASS): return FAILED
 
     ostype_id = ostypes_out[0].id
 
@@ -284,7 +281,7 @@ def get_template(apiclient, zone_id=None, ostype_desc=None, template_filter="fea
     Get the Templates pertaining
     '''
     list_templatesout = apiclient.listTemplates(cmd)
-    return FAILED if validateList(list_templatesout)[0] != PASS
+    if validateList(list_templatesout)[0] != PASS: return FAILED
 
     for template in list_templatesout:
         if template.ostypeid == ostype_id and template.isready and template.templatetype == template_type: