From 273b36a90407df5a9c5c5f105b56471aa8342f3e Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Mon, 8 Jul 2019 14:08:27 +0300 Subject: [PATCH] [ci] Update osresources OSResources script checks that workloads launched at our CI do cleanup in a proper way. * add octavia resources * add neutron trunks Change-Id: Icf1371a4d5b29f313ce51ab2bdd0b9db07fb59da --- tests/ci/osresources.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/ci/osresources.py b/tests/ci/osresources.py index c2ff8ef1..6bf8162e 100755 --- a/tests/ci/osresources.py +++ b/tests/ci/osresources.py @@ -218,6 +218,10 @@ class Neutron(ResourceManager): def list_security_groups(self): return self.client.list_security_groups()["security_groups"] + def list_trunks(self): + if self.has_extension("trunks"): + return self.client.list_trunks()["trunks"] + def list_health_monitors(self): if self.has_extension("lbaas"): return self.client.list_health_monitors()["health_monitors"] @@ -457,6 +461,29 @@ class Watcher(ResourceManager): return self.client.action_plan.list() +class Octavia(ResourceManager): + + REQUIRED_SERVICE = consts.Service.OCTAVIA + + def list_load_balancers(self): + return self.client.load_balancer_list()["loadbalancers"] + + def list_listeners(self): + return self.client.listener_list()["listeners"] + + def list_pools(self): + return self.client.pool_list()["pools"] + + def list_l7policies(self): + return self.client.l7policy_list()["l7policies"] + + def list_health_monitors(self): + return self.client.health_monitor_list()["healthmonitors"] + + def list_amphoras(self): + return self.client.amphora_list()["amphorae"] + + class CloudResources(object): """List and compare cloud resources.