def reset_sandbox(): # Wipe out the sandbox and rebuild sandbox.kill_sandbox(conf.sandbox_name()) sandbox.restart_sandbox('default_neutron+mitaka+compat', conf.sandbox_name(), 'sandbox/override_compat', 'sandbox/provisioning/compat-provisioning.sh') # Reset cached containers and reload them (await for services to be up) service.loaded_containers = None setup_package()
def cleanup(): agent = service.get_container_by_hostname('midolman1') # We wait just to make sure that it's been unregistered agent.stop(wait=True) # Wipe out the container sandbox.remove_container(agent) # Restart sandbox, the --no-recreate flag will spawn only missing containers sandbox.restart_sandbox('default_neutron+kilo+compat', conf.sandbox_name(), 'sandbox/override_compat') # Reset cached containers and reload them (await for the new agent to be up) service.loaded_containers = None agent = service.get_container_by_hostname('midolman1') agent.wait_for_status('up')
def cleanup(): agent = service.get_container_by_hostname('midolman1') # We wait just to make sure that it's been unregistered agent.stop(wait=True) # Wipe out the container sandbox.remove_container(agent) # Restart sandbox, the --no-recreate flag will spawn only missing containers sandbox.restart_sandbox('default_v2_neutron+kilo+compat', 'sandbox/override_v2_compat') # Reset cached containers and reload them (await for the new agent to be up) service.loaded_containers = None agent = service.get_container_by_hostname('midolman1') agent.wait_for_status('up')