This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 06fc4bf538e64522478e71a1c76868825d07d67d
Author: Rohit Yadav <[email protected]>
AuthorDate: Sat Dec 16 23:09:35 2017 +0530

    tests: fix chmod, test flow for vmware/disk-resize smoketest
    
    Signed-off-by: Rohit Yadav <[email protected]>
---
 .../smoke/test_deploy_vm_root_resize.py            | 56 +++++++++-------------
 test/integration/smoke/test_iso.py                 |  0
 test/integration/smoke/test_list_ids_parameter.py  |  0
 .../smoke/test_nested_virtualization.py            |  0
 test/integration/smoke/test_vm_life_cycle.py       |  0
 5 files changed, 22 insertions(+), 34 deletions(-)

diff --git a/test/integration/smoke/test_deploy_vm_root_resize.py 
b/test/integration/smoke/test_deploy_vm_root_resize.py
old mode 100755
new mode 100644
index 463b93e..e23bbce
--- a/test/integration/smoke/test_deploy_vm_root_resize.py
+++ b/test/integration/smoke/test_deploy_vm_root_resize.py
@@ -53,8 +53,8 @@ class TestDeployVmRootSize(cloudstackTestCase):
         cls.services = cls.testClient.getParsedTestDataConfig()
         cls.services["mode"] = cls.zone.networktype
         cls._cleanup = []
+        cls.storageID = None
         cls.updateclone = False
-        cls.restartreq = False
         cls.defaultdiskcontroller = "ide"
         cls.template = get_template(cls.api_client, cls.zone.id)
         if cls.template == FAILED:
@@ -70,7 +70,8 @@ class TestDeployVmRootSize(cloudstackTestCase):
         list_pool_resp = list_storage_pools(cls.api_client,
                                             account=cls.account.name,
                                             domainid=cls.domain.id)
-        #Identify the storage pool type  and set vmware fullclone to
+
+        # Identify the storage pool type  and set vmware fullclone to
         # true if storage is VMFS
         if cls.hypervisor == 'vmware':
              # please make sure url of templateregister dictionary in
@@ -89,26 +90,13 @@ class TestDeployVmRootSize(cloudstackTestCase):
                                               value="scsi")
 
                         cls.updateclone = True
-                        cls.restartreq = True
-
-             list_config_fullclone_global_response = list_configurations(
-                        cls.api_client
-                        , name=
-                        "vmware.create.full.clone")
-             if list_config_fullclone_global_response[0].value=="false":
-                        Configurations.update(cls.api_client,
-                                              "vmware.create.full.clone",
-                                              value="true")
-
-                        cls.updateclone = True
-                        cls.restartreq = True
 
              for strpool in list_pool_resp:
                 if strpool.type.lower() == "vmfs" or strpool.type.lower()== 
"networkfilesystem":
                     list_config_storage_response = list_configurations(
-                        cls.api_client
-                        , name=
-                        "vmware.create.full.clone",storageid=strpool.id)
+                        cls.api_client, name="vmware.create.full.clone",
+                        storageid=strpool.id)
+
                     res = validateList(list_config_storage_response)
                     if res[2]== INVALID_INPUT:
                         raise Exception("Failed to  list configurations ")
@@ -123,12 +111,16 @@ class TestDeployVmRootSize(cloudstackTestCase):
                                            tags="scsi")
                         cls.storageID = strpool.id
                         break
-             if cls.restartreq:
-                cls.restartServer()
 
-                #Giving 90 seconds to management to warm-up,
-                #Experienced failures when trying to deploy a VM exactly when 
management came up
-                time.sleep(90)
+             list_config_fullclone_global_response = list_configurations(
+                        cls.api_client, name="vmware.create.full.clone")
+
+             if list_config_fullclone_global_response[0].value=="false":
+                        Configurations.update(cls.api_client,
+                                              "vmware.create.full.clone",
+                                              value="true")
+                        cls.updateclone = True
+
 
         #create a service offering
         cls.service_offering = ServiceOffering.create(
@@ -147,21 +139,17 @@ class TestDeployVmRootSize(cloudstackTestCase):
 
             if cls.updateclone:
                 Configurations.update(cls.api_client,
-                                      "vmware.create.full.clone",
-                                      value="false",storageid=cls.storageID)
+                                              "vmware.root.disk.controller",
+                                              value=cls.defaultdiskcontroller)
                 Configurations.update(cls.api_client,
                                               "vmware.create.full.clone",
                                               value="false")
                 Configurations.update(cls.api_client,
-                                              "vmware.root.disk.controller",
-                                              value=cls.defaultdiskcontroller)
-                StoragePool.update(cls.api_client, id=cls.storageID,
-                                   tags="")
-                cls.restartServer()
-
-                #Giving 90 seconds to management to warm-up,
-                #Experienced failures when trying to deploy a VM exactly when 
management came up
-                time.sleep(90)
+                                      "vmware.create.full.clone",
+                                      value="false", storageid=cls.storageID)
+                if cls.storageID:
+                    StoragePool.update(cls.api_client, id=cls.storageID,
+                                    tags="")
 
             cleanup_resources(cls.api_client, cls._cleanup)
         except Exception as e:
diff --git a/test/integration/smoke/test_iso.py 
b/test/integration/smoke/test_iso.py
old mode 100755
new mode 100644
diff --git a/test/integration/smoke/test_list_ids_parameter.py 
b/test/integration/smoke/test_list_ids_parameter.py
old mode 100755
new mode 100644
diff --git a/test/integration/smoke/test_nested_virtualization.py 
b/test/integration/smoke/test_nested_virtualization.py
old mode 100755
new mode 100644
diff --git a/test/integration/smoke/test_vm_life_cycle.py 
b/test/integration/smoke/test_vm_life_cycle.py
old mode 100755
new mode 100644

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to