def verify_domain_stopped(provider, domain): refresh(provider) wait_for(lambda: domain.is_stopped(), delay=DELAY, num_sec=NUM_SEC, message='Domain {} must be stopped'.domain(domain.name), fail_func=lambda: refresh(provider)) for server_group in domain_server_groups(provider, domain): verify_server_group_stopped(provider, server_group)
def test_server_group_stop_start(provider, main_server_group): """Tests domain mode server group stop/start operation on UI Steps: * Invokes 'Stop Server Group' toolbar operation * Checks that server status is stopped in UI, in DB and in MGMT. * Invokes 'Start Server Group' toolbar operation * Waits for some time * Checks that server group's server status is running in UI, in DB and in MGMT. """ verify_server_group_running(provider, main_server_group) main_server_group.stop_server_group() verify_server_group_stopped(provider, main_server_group) main_server_group.start_server_group() verify_server_group_running(provider, main_server_group)
def verify_domain_stopped(provider, domain): for server_group in domain_server_groups(provider, domain): verify_server_group_stopped(provider, server_group)