Github user gauravaradhye commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/153#discussion_r31500491 --- Diff: test/integration/component/test_escalations_templates.py --- @@ -55,23 +63,68 @@ def setUpClass(cls): cls.hypervisor = cls.testClient.getHypervisorInfo() cls.services['mode'] = cls.zone.networktype + cls.mgtSvrDetails = cls.config.__dict__["mgtSvr"][0].__dict__ + builtin_info = get_builtin_template_info(cls.api_client, cls.zone.id) cls.services["privatetemplate"]["url"] = builtin_info[0] cls.services["privatetemplate"]["hypervisor"] = builtin_info[1] cls.services["privatetemplate"]["format"] = builtin_info[2] + cls.services["templates"]["url"] = builtin_info[0] + cls.services["templates"]["hypervisor"] = builtin_info[1] + cls.services["templates"]["format"] = builtin_info[2] + if cls.zone.localstorageenabled: + cls.storagetype = 'local' + cls.services["service_offerings"][ + "tiny"]["storagetype"] = 'local' + cls.services["disk_offering"]["storagetype"] = 'local' + else: + cls.storagetype = 'shared' + cls.services["service_offerings"][ + "tiny"]["storagetype"] = 'shared' + cls.services["disk_offering"]["storagetype"] = 'shared' + cls.services["virtual_machine"]["hypervisor"] = cls.hypervisor + cls.services["virtual_machine"]["zoneid"] = cls.zone.id + cls.services["virtual_machine"]["template"] = cls.template.id + cls.services["custom_volume"]["zoneid"] = cls.zone.id + cls.service_offering = ServiceOffering.create( + cls.api_client, + cls.services["service_offerings"]["tiny"] + ) + cls._cleanup.append(cls.service_offering) except Exception as e: cls.tearDownClass() raise Exception("Warning: Exception in setup : %s" % e) return + @classmethod + def RestartServers(cls): + """ Restart management server and usage server """ + + sshClient = SshClient( + cls.mgtSvrDetails["mgtSvrIp"], + 22, + cls.mgtSvrDetails["user"], + cls.mgtSvrDetails["passwd"] + ) + command = "service cloudstack-management restart" + sshClient.execute(command) + return + @classmethod + def updateConfigurAndRestart(cls,name, value): + Configurations.update(cls.api_client, + name,value ) --- End diff -- Fix pep8 issues. You can do this using autopep8 tool. pip install autopep8. autopep8 -i -a -a fileName.py Then check for any issues remaining to be fixed using pep8 fileName.py command. If there are any, fix them manually. Autopep8 will fix most of the issues but not all.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---