incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject git commit: Summary: Devcloud tests for vm life cycle
Date Thu, 06 Dec 2012 02:16:46 GMT
Updated Branches:
  refs/heads/master 7ce222710 -> 21819dafb


Summary: Devcloud tests for vm life cycle

Detail: VM Life cycle tests needed minor changes to run them against a
devcloud - basic zone, local storage envrioment.

Signed-off-by: Prasanna Santhanam <tsp@apache.org> 1354760111 -0800


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

Branch: refs/heads/master
Commit: 21819dafb5e5ab03e0b769018b3df630dcaf0a56
Parents: 7ce2227
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Thu Dec 6 00:56:04 2012 +0000
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Wed Dec 5 18:15:11 2012 -0800

----------------------------------------------------------------------
 test/integration/smoke/test_vm_life_cycle.py |   39 +++++++++++++++------
 tools/marvin/marvin/integration/lib/base.py  |    1 +
 tools/marvin/marvin/setup.py                 |    8 ++++-
 3 files changed, 36 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/21819daf/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 50c75d1..1633c53 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -90,7 +90,7 @@ class Services:
                         "displaytext": "Small Instance",
                         "cpunumber": 1,
                         "cpuspeed": 100,
-                        "memory": 256
+                        "memory": 256,
                     },
                 "medium":
                     {
@@ -100,7 +100,7 @@ class Services:
                         "displaytext": "Medium Instance",
                         "cpunumber": 1,
                         "cpuspeed": 100,
-                        "memory": 256
+                        "memory": 256,
                     }
                 },
                 "iso":  # ISO settings for Attach/Detach ISO tests
@@ -125,7 +125,6 @@ class Services:
             #Migrate VM to hostid
             "ostype": 'CentOS 5.3 (64-bit)',
             # CentOS 5.3 (64-bit)
-            "mode":'advanced',
         }
 
 
@@ -139,6 +138,14 @@ class TestDeployVM(cloudstackTestCase):
         # Get Zone, Domain and templates
         domain = get_domain(self.apiclient, self.services)
         zone = get_zone(self.apiclient, self.services)
+        self.services['mode'] = zone.networktype
+
+        #if local storage is enabled, alter the offerings to use localstorage
+        #this step is needed for devcloud
+        if zone.localstorageenabled == True:
+            self.services["service_offerings"]["tiny"]["storagetype"] = 'local'
+            self.services["service_offerings"]["small"]["storagetype"] = 'local'
+            self.services["service_offerings"]["medium"]["storagetype"] = 'local'
 
         template = get_template(
                             self.apiclient,
@@ -170,7 +177,7 @@ class TestDeployVM(cloudstackTestCase):
                         self.account
                         ]
 
-    @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"])
+    @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
     def test_deploy_vm(self):
         """Test Deploy Virtual Machine
         """
@@ -185,7 +192,8 @@ class TestDeployVM(cloudstackTestCase):
                                     self.services["small"],
                                     accountid=self.account.account.name,
                                     domainid=self.account.account.domainid,
-                                    serviceofferingid=self.service_offering.id
+                                    serviceofferingid=self.service_offering.id,
+                                    mode=self.services['mode']
                                 )
 
         list_vm_response = list_virtual_machines(
@@ -242,6 +250,15 @@ class TestVMLifeCycle(cloudstackTestCase):
         # Get Zone, Domain and templates
         domain = get_domain(cls.api_client, cls.services)
         zone = get_zone(cls.api_client, cls.services)
+        cls.services['mode'] = zone.networktype
+
+        #if local storage is enabled, alter the offerings to use localstorage
+        #this step is needed for devcloud
+        if zone.localstorageenabled == True:
+            cls.services["service_offerings"]["tiny"]["storagetype"] = 'local'
+            cls.services["service_offerings"]["small"]["storagetype"] = 'local'
+            cls.services["service_offerings"]["medium"]["storagetype"] = 'local'
+
         template = get_template(
                             cls.api_client,
                             zone.id,
@@ -319,7 +336,7 @@ class TestVMLifeCycle(cloudstackTestCase):
         return
 
     
-    @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"])
+    @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
     def test_01_stop_vm(self):
         """Test Stop Virtual Machine
         """
@@ -355,7 +372,7 @@ class TestVMLifeCycle(cloudstackTestCase):
                         )
         return
 
-    @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"])
+    @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
     def test_02_start_vm(self):
         """Test Start Virtual Machine
         """
@@ -393,7 +410,7 @@ class TestVMLifeCycle(cloudstackTestCase):
                         )
         return
 
-    @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"])
+    @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
     def test_03_reboot_vm(self):
         """Test Reboot Virtual Machine
         """
@@ -669,7 +686,7 @@ class TestVMLifeCycle(cloudstackTestCase):
                         )
         return
 
-    @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"])
+    @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
     def test_06_destroy_vm(self):
         """Test destroy Virtual Machine
         """
@@ -705,7 +722,7 @@ class TestVMLifeCycle(cloudstackTestCase):
                         )
         return
 
-    @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"])
+    @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
     def test_07_restore_vm(self):
         """Test recover Virtual Machine
         """
@@ -818,7 +835,7 @@ class TestVMLifeCycle(cloudstackTestCase):
 
     @attr(configuration = "expunge.interval")
     @attr(configuration = "expunge.delay")
-    @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg"])
+    @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
     def test_09_expunge_vm(self):
         """Test destroy(expunge) Virtual Machine
         """

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/21819daf/tools/marvin/marvin/integration/lib/base.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py
index 66754bd..044c910 100644
--- a/tools/marvin/marvin/integration/lib/base.py
+++ b/tools/marvin/marvin/integration/lib/base.py
@@ -1039,6 +1039,7 @@ class ServiceOffering:
         cmd.displaytext = services["displaytext"]
         cmd.memory = services["memory"]
         cmd.name = services["name"]
+        cmd.storagetype = services["storagetype"]
 
         # Service Offering private to that domain
         if domainid:

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/21819daf/tools/marvin/marvin/setup.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/setup.py b/tools/marvin/marvin/setup.py
index dea67df..07ff5b5 100644
--- a/tools/marvin/marvin/setup.py
+++ b/tools/marvin/marvin/setup.py
@@ -16,7 +16,13 @@
 # under the License.
 
 import os
-from setuptools import setup
+try:
+    from setuptools import setup, find_packages
+except ImportError:
+    from distribute_setup import use_setuptools
+    use_setuptools()
+    from setuptools import setup, find_packages
+
 
 def read(fname):
     return open(os.path.join(os.path.dirname(__file__), fname)).read().strip()


Mime
View raw message