Repository: cloudstack Updated Branches: refs/heads/master 4bfb7f20c -> 63ff683b8
CLOUDSTACK-7879: Skip dynamic scaling on vmware if vmware-tools are not installed Signed-off-by: SrikanteswaraRao Talluri <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/46d9f8c6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/46d9f8c6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/46d9f8c6 Branch: refs/heads/master Commit: 46d9f8c6f5140019c5a9d6b929900a109abcee3f Parents: 2c08e30 Author: Gaurav Aradhye <[email protected]> Authored: Tue Nov 11 16:05:23 2014 +0530 Committer: SrikanteswaraRao Talluri <[email protected]> Committed: Thu Nov 13 18:27:48 2014 +0530 ---------------------------------------------------------------------- .../component/test_dynamic_compute_offering.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/46d9f8c6/test/integration/component/test_dynamic_compute_offering.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_dynamic_compute_offering.py b/test/integration/component/test_dynamic_compute_offering.py index a3e2d56..d96fd84 100644 --- a/test/integration/component/test_dynamic_compute_offering.py +++ b/test/integration/component/test_dynamic_compute_offering.py @@ -423,6 +423,7 @@ class TestScaleVmDynamicServiceOffering(cloudstackTestCase): def setUpClass(cls): cloudstackTestClient = super(TestScaleVmDynamicServiceOffering,cls).getClsTestClient() cls.api_client = cloudstackTestClient.getApiClient() + cls.hypervisor = cloudstackTestClient.getHypervisorInfo() # Fill services from the external config file cls.services = cloudstackTestClient.getParsedTestDataConfig() @@ -438,7 +439,23 @@ class TestScaleVmDynamicServiceOffering(cloudstackTestCase): ) cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.services["virtual_machine"]["template"] = cls.template.id + cls._cleanup = [] + cls.serviceOffering_static_1 = ServiceOffering.create(cls.api_client, + cls.services["service_offering"]) + cls._cleanup.append(cls.serviceOffering_static_1) + + if cls.hypervisor.lower() == "vmware": + virtual_machine = VirtualMachine.create(cls.api_client,cls.services["virtual_machine"], + serviceofferingid=cls.serviceOffering_static_1.id, mode=cls.zone.networktype) + cls._cleanup.append(virtual_machine) + sshClient = virtual_machine.get_ssh_client() + result = str( + sshClient.execute("service vmware-tools status")).lower() + if not "running" in result: + cls.tearDownClass() + raise unittest.SkipTest("Skipping scale VM operation because\ + VMware tools are not installed on the VM") return @classmethod
