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 2013/12/30 13:36:31 UTC

[1/2] git commit: updated refs/heads/master to 013f100

Updated Branches:
  refs/heads/4.3 68a0b2792 -> ce38c7195
  refs/heads/master 785931b6f -> 013f10007


 CLOUDSTACK-5635: Fixed issue (Max volumes has been exceeded for domain during test)


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

Branch: refs/heads/master
Commit: 013f100078e79ee044ca5dc7a533e174f459921e
Parents: 785931b
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Mon Dec 30 18:05:04 2013 +0530
Committer: Girish Shilamkar <gi...@clogeny.com>
Committed: Mon Dec 30 18:05:04 2013 +0530

----------------------------------------------------------------------
 .../component/test_resource_limits.py           | 69 +++++++++++++-------
 1 file changed, 44 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/013f1000/test/integration/component/test_resource_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_resource_limits.py b/test/integration/component/test_resource_limits.py
index 07fc5a5..b543e7b 100644
--- a/test/integration/component/test_resource_limits.py
+++ b/test/integration/component/test_resource_limits.py
@@ -17,14 +17,29 @@
 """ P1 tests for Resource limits
 """
 #Import Local Modules
-import marvin
 from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.integration.lib.utils import *
-from marvin.integration.lib.base import *
-from marvin.integration.lib.common import *
-import datetime
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.integration.lib.base import (VirtualMachine,
+                                         Snapshot,
+                                         Template,
+                                         PublicIPAddress,
+                                         Account,
+                                         Domain,
+                                         Volume,
+                                         Network,
+                                         DiskOffering,
+                                         NetworkOffering,
+                                         ServiceOffering,
+                                         Configurations)
+from marvin.integration.lib.common import (list_volumes,
+                                           get_domain,
+                                           get_zone,
+                                           get_template,
+                                           update_resource_limit,
+                                           list_configurations,
+                                           wait_for_cleanup)
+from marvin.integration.lib.utils import cleanup_resources
+import time
 
 
 class Services:
@@ -174,6 +189,8 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         try:
             #Clean up, terminate the created instance, volumes and snapshots
             cleanup_resources(self.apiclient, self.cleanup)
+            # Wait for VMs to expunge
+            wait_for_cleanup(self.apiclient, ["expunge.delay", "expunge.interval"])
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -362,13 +379,13 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         # Exception should be raised for second instance (account_1)
         with self.assertRaises(Exception):
-            public_ip_2 = PublicIPAddress.create(
-                                           self.apiclient,
-                                           virtual_machine_1.account,
-                                           virtual_machine_1.zoneid,
-                                           virtual_machine_1.domainid,
-                                           self.services["server"]
-                                           )
+            PublicIPAddress.create(
+                                   self.apiclient,
+                                   virtual_machine_1.account,
+                                   virtual_machine_1.zoneid,
+                                   virtual_machine_1.domainid,
+                                   self.services["server"]
+                                   )
 
         self.debug(
             "Associating public IP for account: %s" %
@@ -537,7 +554,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         self.debug("Creating snapshot from volume: %s" % volumes[0].id)
         # Create a snapshot from the ROOTDISK (Account 2)
         snapshot_2 = Snapshot.create(self.apiclient,
-                            volumes[0].id,
+                            volume.id,
                             account=self.account_2.name,
                             domainid=self.account_2.domainid,
                             )
@@ -555,7 +572,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         self.debug("Creating snapshot from volume: %s" % volumes[0].id)
         # Create a second snapshot from the ROOTDISK (Account 2)
         snapshot_3 = Snapshot.create(self.apiclient,
-                            volumes[0].id,
+                            volume.id,
                             account=self.account_2.name,
                             domainid=self.account_2.domainid,
                             )
@@ -940,6 +957,8 @@ class TestResourceLimitsDomain(cloudstackTestCase):
         try:
             #Clean up, terminate the created instance, volumes and snapshots
             cleanup_resources(self.apiclient, self.cleanup)
+            # Wait for VMs to expunge
+            wait_for_cleanup(self.apiclient, ["expunge.delay", "expunge.interval"])
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -1071,13 +1090,13 @@ class TestResourceLimitsDomain(cloudstackTestCase):
 
         # Exception should be raised for second Public IP
         with self.assertRaises(Exception):
-            public_ip_2 = PublicIPAddress.create(
-                                           self.apiclient,
-                                           virtual_machine_1.account,
-                                           virtual_machine_1.zoneid,
-                                           virtual_machine_1.domainid,
-                                           self.services["server"]
-                                           )
+            PublicIPAddress.create(
+                                   self.apiclient,
+                                   virtual_machine_1.account,
+                                   virtual_machine_1.zoneid,
+                                   virtual_machine_1.domainid,
+                                   self.services["server"]
+                                   )
         return
 
     @attr(speed="slow")
@@ -1140,7 +1159,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
         self.debug("Creating snapshot from volume: %s" % volumes[0].id)
         # Create a snapshot from the ROOTDISK
         snapshot_1 = Snapshot.create(self.apiclient,
-                            volumes[0].id,
+                            volume.id,
                             account=self.account.name,
                             domainid=self.account.domainid,
                             )
@@ -1158,7 +1177,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
         # Exception should be raised for second snapshot
         with self.assertRaises(Exception):
             Snapshot.create(self.apiclient,
-                            volumes[0].id,
+                            volume.id,
                             account=self.account.name,
                             domainid=self.account.domainid,
                             )


[2/2] git commit: updated refs/heads/4.3 to ce38c71

Posted by gi...@apache.org.
 CLOUDSTACK-5635: Fixed issue (Max volumes has been exceeded for domain during test)


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

Branch: refs/heads/4.3
Commit: ce38c71956482630724accdc8477b59880eaf451
Parents: 68a0b27
Author: Gaurav Aradhye <ga...@clogeny.com>
Authored: Mon Dec 30 18:05:04 2013 +0530
Committer: Girish Shilamkar <gi...@clogeny.com>
Committed: Mon Dec 30 18:06:18 2013 +0530

----------------------------------------------------------------------
 .../component/test_resource_limits.py           | 69 +++++++++++++-------
 1 file changed, 44 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ce38c719/test/integration/component/test_resource_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_resource_limits.py b/test/integration/component/test_resource_limits.py
index 07fc5a5..b543e7b 100644
--- a/test/integration/component/test_resource_limits.py
+++ b/test/integration/component/test_resource_limits.py
@@ -17,14 +17,29 @@
 """ P1 tests for Resource limits
 """
 #Import Local Modules
-import marvin
 from nose.plugins.attrib import attr
-from marvin.cloudstackTestCase import *
-from marvin.cloudstackAPI import *
-from marvin.integration.lib.utils import *
-from marvin.integration.lib.base import *
-from marvin.integration.lib.common import *
-import datetime
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.integration.lib.base import (VirtualMachine,
+                                         Snapshot,
+                                         Template,
+                                         PublicIPAddress,
+                                         Account,
+                                         Domain,
+                                         Volume,
+                                         Network,
+                                         DiskOffering,
+                                         NetworkOffering,
+                                         ServiceOffering,
+                                         Configurations)
+from marvin.integration.lib.common import (list_volumes,
+                                           get_domain,
+                                           get_zone,
+                                           get_template,
+                                           update_resource_limit,
+                                           list_configurations,
+                                           wait_for_cleanup)
+from marvin.integration.lib.utils import cleanup_resources
+import time
 
 
 class Services:
@@ -174,6 +189,8 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         try:
             #Clean up, terminate the created instance, volumes and snapshots
             cleanup_resources(self.apiclient, self.cleanup)
+            # Wait for VMs to expunge
+            wait_for_cleanup(self.apiclient, ["expunge.delay", "expunge.interval"])
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -362,13 +379,13 @@ class TestResourceLimitsAccount(cloudstackTestCase):
 
         # Exception should be raised for second instance (account_1)
         with self.assertRaises(Exception):
-            public_ip_2 = PublicIPAddress.create(
-                                           self.apiclient,
-                                           virtual_machine_1.account,
-                                           virtual_machine_1.zoneid,
-                                           virtual_machine_1.domainid,
-                                           self.services["server"]
-                                           )
+            PublicIPAddress.create(
+                                   self.apiclient,
+                                   virtual_machine_1.account,
+                                   virtual_machine_1.zoneid,
+                                   virtual_machine_1.domainid,
+                                   self.services["server"]
+                                   )
 
         self.debug(
             "Associating public IP for account: %s" %
@@ -537,7 +554,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         self.debug("Creating snapshot from volume: %s" % volumes[0].id)
         # Create a snapshot from the ROOTDISK (Account 2)
         snapshot_2 = Snapshot.create(self.apiclient,
-                            volumes[0].id,
+                            volume.id,
                             account=self.account_2.name,
                             domainid=self.account_2.domainid,
                             )
@@ -555,7 +572,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         self.debug("Creating snapshot from volume: %s" % volumes[0].id)
         # Create a second snapshot from the ROOTDISK (Account 2)
         snapshot_3 = Snapshot.create(self.apiclient,
-                            volumes[0].id,
+                            volume.id,
                             account=self.account_2.name,
                             domainid=self.account_2.domainid,
                             )
@@ -940,6 +957,8 @@ class TestResourceLimitsDomain(cloudstackTestCase):
         try:
             #Clean up, terminate the created instance, volumes and snapshots
             cleanup_resources(self.apiclient, self.cleanup)
+            # Wait for VMs to expunge
+            wait_for_cleanup(self.apiclient, ["expunge.delay", "expunge.interval"])
         except Exception as e:
             raise Exception("Warning: Exception during cleanup : %s" % e)
         return
@@ -1071,13 +1090,13 @@ class TestResourceLimitsDomain(cloudstackTestCase):
 
         # Exception should be raised for second Public IP
         with self.assertRaises(Exception):
-            public_ip_2 = PublicIPAddress.create(
-                                           self.apiclient,
-                                           virtual_machine_1.account,
-                                           virtual_machine_1.zoneid,
-                                           virtual_machine_1.domainid,
-                                           self.services["server"]
-                                           )
+            PublicIPAddress.create(
+                                   self.apiclient,
+                                   virtual_machine_1.account,
+                                   virtual_machine_1.zoneid,
+                                   virtual_machine_1.domainid,
+                                   self.services["server"]
+                                   )
         return
 
     @attr(speed="slow")
@@ -1140,7 +1159,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
         self.debug("Creating snapshot from volume: %s" % volumes[0].id)
         # Create a snapshot from the ROOTDISK
         snapshot_1 = Snapshot.create(self.apiclient,
-                            volumes[0].id,
+                            volume.id,
                             account=self.account.name,
                             domainid=self.account.domainid,
                             )
@@ -1158,7 +1177,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
         # Exception should be raised for second snapshot
         with self.assertRaises(Exception):
             Snapshot.create(self.apiclient,
-                            volumes[0].id,
+                            volume.id,
                             account=self.account.name,
                             domainid=self.account.domainid,
                             )