def test_restart_launchpad(self, mc_proxy, mgmt_domain_name, launchpad_session, launchpad_scraper): mc_proxy.wait_for("/mgmt-domain/domain[name='%s']/launchpad/state" % mgmt_domain_name, 'started', timeout=10, fail_on=['crashed']) stop_launchpad_input = RwMcYang.StopLaunchpadInput( mgmt_domain=mgmt_domain_name) stop_launchpad_output = mc_proxy.rpc(stop_launchpad_input) mc_proxy.wait_for("/mgmt-domain/domain[name='%s']/launchpad/state" % mgmt_domain_name, 'stopped', timeout=60, fail_on=['crashed']) start_launchpad_input = RwMcYang.StartLaunchpadInput( mgmt_domain=mgmt_domain_name) start_launchpad_output = mc_proxy.rpc(start_launchpad_input) mc_proxy.wait_for("/mgmt-domain/domain[name='%s']/launchpad/state" % mgmt_domain_name, 'started', timeout=200, fail_on=['crashed']) rift.vcs.vcs.wait_until_system_started(launchpad_session) launchpad_scraper.reset()
def test_stop_launchpad_redux(self, proxy, mgmt_domain_name): '''Invoke stop launchpad RPC... Again... Asserts: Launchpad begins test in state 'started' Launchpad finishes test in state 'stopped' ''' proxy.wait_for("/mgmt-domain/domain[name='%s']/launchpad/state" % mgmt_domain_name, 'started', timeout=10, fail_on=['crashed']) stop_launchpad_input = RwMcYang.StopLaunchpadInput( mgmt_domain=mgmt_domain_name) stop_launchpad_output = proxy.rpc(stop_launchpad_input) proxy.wait_for("/mgmt-domain/domain[name='%s']/launchpad/state" % mgmt_domain_name, 'stopped', timeout=60, fail_on=['crashed'])
def test_stop_launchpad(self, proxy, mgmt_domain_name): '''Stop launchpad before we leave this class Arguments: proxy - a pytest fixture proxy to RwMcYang mgmt_domain_name - a pytest fixture for the management domain Asserts: Launchpad begins test in state 'started' Launchpad finishes test in state 'stopped' ''' proxy.wait_for( "/mgmt-domain/domain[name='%s']/launchpad/state" % mgmt_domain_name, 'started', timeout=10, fail_on=['crashed']) stop_launchpad_input = RwMcYang.StopLaunchpadInput(mgmt_domain=mgmt_domain_name) stop_launchpad_output = proxy.rpc(stop_launchpad_input) proxy.wait_for( "/mgmt-domain/domain[name='%s']/launchpad/state" % mgmt_domain_name, 'stopped', timeout=120, fail_on=['crashed'])
def test_verify_launchpad_not_started(self, proxy, mgmt_domain_name): '''Verifies that the launchpad is not started Arguments: proxy - a pytest fixture proxy to RwMcYang mgmt_domain_name - a pytest fixture for the management domain name Asserts: rift.auto.session.ProxyExpectTimeoutError is raised ''' with pytest.raises(ProxyExpectTimeoutError): proxy.wait_for( "/mgmt-domain/domain[name='%s']/launchpad/state" % mgmt_domain_name, 'started', timeout=10, fail_on=['crashed']) stop_launchpad_input = RwMcYang.StopLaunchpadInput(mgmt_domain=mgmt_domain_name) stop_launchpad_output = proxy.rpc(stop_launchpad_input) proxy.wait_for( "/mgmt-domain/domain[name='%s']/launchpad/state" % mgmt_domain_name, 'stopped', timeout=120, fail_on=['crashed'])