import copy from rally import api from rally.common import objects from rally import plugins from rally.plugins.openstack.cleanup import manager deployment_uuid = "PUT HERE RALLY DEPLOYMENT UUID" task_uuid = "PUT HERE TASK UUID TO CLEANUP RESOURCES FOR" # obtain admin credentials from db rapi = api.API() deployment = rapi.deployment.get(deployment_uuid) # load all rally plugins plugins.load() SERVICES_TO_CLEANUP = ["nova", "neutron", "cinder", "glance"] # modify list of services manager.cleanup(names=SERVICES_TO_CLEANUP, admin={"credential": objects.Credential(**deployment["admin"])}, users=[{"credential": objects.Credential(**u)} for u in deployment["users"]])