[ https://issues.apache.org/jira/browse/CLOUDSTACK-8476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14555601#comment-14555601 ]
ASF GitHub Bot commented on CLOUDSTACK-8476: -------------------------------------------- Github user gauravaradhye commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/278#discussion_r30870128 --- Diff: test/integration/component/maint/testpath_disable_enable_host.py --- @@ -0,0 +1,309 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +""" Test cases for Disable enable Host Test Path +""" + +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources) +from marvin.lib.base import (Account, + Host, + Cluster, + VirtualMachine, + ServiceOffering, + Snapshot, + DiskOffering, + ) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + get_pod, + list_volumes, + ) + +from marvin.cloudstackAPI import (updateHost, + reconnectHost + ) +import time + + +class TestDisableEnableZone(cloudstackTestCase): + + @classmethod + def setUpClass(cls): + testClient = super(TestDisableEnableZone, cls).getClsTestClient() + cls.apiclient = testClient.getApiClient() + cls.testdata = testClient.getParsedTestDataConfig() + cls.hypervisor = cls.testClient.getHypervisorInfo() + + # Get Zone, Domain and templates + cls.domain = get_domain(cls.apiclient) + cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) + cls.pod = get_pod( + cls.apiclient, + zone_id=cls.zone.id) + + hostList = Host.list(cls.apiclient, zoneid=cls.zone.id, type="routing") + clusterList = Cluster.list(cls.apiclient, id=hostList[0].clusterid) + cls.host = Host(hostList[0].__dict__) + cls.cluster = Cluster(clusterList[0].__dict__) + + cls.template = get_template( + cls.apiclient, + cls.zone.id, + cls.testdata["ostype"]) + + cls._cleanup = [] + + try: + cls.service_offering = ServiceOffering.create( + cls.apiclient, + cls.testdata["service_offering"], + ) + cls._cleanup.append(cls.service_offering) + + cls.disk_offering = DiskOffering.create( + cls.apiclient, + cls.testdata["disk_offering"], + ) + cls._cleanup.append(cls.disk_offering) + + # Create an account + cls.account = Account.create( + cls.apiclient, + cls.testdata["account"], + domainid=cls.domain.id + ) + cls._cleanup.append(cls.account) + + # Create user api client of the account + cls.userapiclient = testClient.getUserApiClient( + UserName=cls.account.name, + DomainName=cls.account.domain + ) + + except Exception as e: + cls.tearDownClass() + raise e + return + + @classmethod + def tearDownClass(cls): + try: + pass --- End diff -- why pass? > Disabling Zone, Pod, Cluster > ---------------------------- > > Key: CLOUDSTACK-8476 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8476 > Project: CloudStack > Issue Type: Test > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: Priti Sarap > > --Test cases for testing the behavior of resources running on > zone/Cluster/Host and admin/non-admin user after disabling the > Zone/Cluster/Host -- This message was sent by Atlassian JIRA (v6.3.4#6332)