Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions cfme/tests/cloud_infra_common/test_power_control_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
import pytest

from cfme import test_requirements
from cfme.cloud.provider import CloudProvider
from cfme.infrastructure.provider import InfraProvider
from cfme.markers.env_markers.provider import ONE_PER_TYPE
from cfme.utils.appliance import ViaREST

pytestmark = [test_requirements.power, pytest.mark.manual]

Expand Down Expand Up @@ -218,46 +214,6 @@ def test_power_controls_on_vm_in_stack_cloud():
pass


@pytest.mark.manual
@pytest.mark.tier(2)
@pytest.mark.parametrize('context', [ViaREST])
@pytest.mark.provider([CloudProvider, InfraProvider], required_fields=['templates'],
selector=ONE_PER_TYPE)
@test_requirements.multi_region
@test_requirements.power
def test_power_operations_from_global_region(provider, context):
"""
This test case is to check power operations from Global region
Setup is 2 or more appliances(DB should be configured manually). One
is Global region, others are Remote. To get this working enable Central Admin.

Polarion:
assignee: tpapaioa
initialEstimate: 1/2h
caseimportance: high
caseposneg: positive
testtype: functional
startsin: 5.6
casecomponent: Control
tags: power
testSteps:
1. Take two or more appliances
2. Configure DB manually
3. Make one appliance as Global region and others are Remote
4. Add provider to remote region appliance
5. Provision VM
6. Perform power operations on VM from global region
expectedResults:
1.
2.
3.
4.
5.
6. Power operations applicable for this vm should be working as expected
"""
pass


@pytest.mark.tier(2)
def test_check_compliance_policy_option_on_vm_summery_page():
"""
Expand Down
17 changes: 13 additions & 4 deletions cfme/tests/distributed/test_appliance_replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
from cfme.infrastructure.virtual_machines import InfraVmDetailsView
from cfme.markers.env_markers.provider import ONE_PER_TYPE
from cfme.utils import conf
from cfme.utils.appliance import ViaREST
from cfme.utils.appliance import ViaUI
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.conf import cfme_data
from cfme.utils.rest import assert_response
from cfme.utils.wait import wait_for

pytestmark = [
Expand Down Expand Up @@ -138,7 +140,7 @@ def test_appliance_replicate_database_disconnection_with_backlog(provider, repli
@pytest.mark.rhel_testing
@pytest.mark.tier(2)
@pytest.mark.ignore_stream("upstream")
@pytest.mark.parametrize('context', [ViaUI])
@pytest.mark.parametrize('context', [ViaREST, ViaUI])
@pytest.mark.provider([CloudProvider, InfraProvider], selector=ONE_PER_TYPE)
@test_requirements.multi_region
@test_requirements.power
Expand All @@ -165,11 +167,18 @@ def test_replication_vm_power_control(provider, create_vm, context, replicated_a

with global_appliance:
vm = vm_per_appliance[global_appliance]
vm.power_control_from_cfme(option=vm.POWER_OFF, cancel=False)
# navigate_to(provider, 'Details')
if context.name == 'UI':
vm.power_control_from_cfme(option=vm.POWER_OFF, cancel=False)
else:
vm_entity = global_appliance.rest_api.collections.vms.get(name=vm.name)
global_appliance.rest_api.collections.vms.action.stop(vm_entity)
assert_response(global_appliance, task_wait=0)

with remote_appliance:
vm = vm_per_appliance[remote_appliance]
vm.wait_for_vm_state_change(desired_state=vm.STATE_OFF, timeout=900)
assert vm.find_quadicon().data['state'] == 'off', "Incorrect VM quadicon state"
assert not create_vm.mgmt.is_running, "VM is still running"
assert not vm.mgmt.is_running, "VM is still running"


@pytest.mark.rhel_testing
Expand Down