magnum/magnum/tests/unit/common
Lingxian Kong 33cc92efe2 [K8S] Delete all related load balancers before deleting cluster
When deleting cluster, Magnum only deletes the load balancers for
Kubernetes services/ingresses before deleting Heat stack. The process of
stack deletion is to delete resources in dependencies, which means, for
Octavia resources, member is deleted first, then pool, listener, and
finally load balancer. The whole process is error-prone, especially
Octavia controller needs to talk to amphora for each API call before
deleting load balancer, if any step fails, the deletion operation will
fail.

Octavia provides cascade deletion API[1] for the load balancer, which
could delete all the related resources in one API call and doesn't
involve communication between Octavia controller and amphora instance.

This patch deletes the api/etcd load balancers (if applicable) before
deleting Heat stack, making the cluster deletion process more robust.

[1]: https://docs.openstack.org/api-ref/load-balancer/v2/index.html?expanded=remove-a-load-balancer-detail#remove-a-load-balancer

story: 2007657
task: 39743
Change-Id: Ibe8f788559d0977475d0991fc99ad91ccfd7dca7
2020-05-12 09:48:11 +00:00
..
cert_manager Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00
x509 Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00
__init__.py Make room for functional tests 2015-04-02 12:25:43 -04:00
test_clients.py Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00
test_context.py Deprecate usage of tenant and user in context 2018-02-06 14:00:43 +00:00
test_docker_utils.py Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00
test_exception.py Stop using deprecated 'message' attribute in Exception 2017-07-24 17:27:24 +05:30
test_keystone.py Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00
test_neutron.py Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00
test_octavia.py [K8S] Delete all related load balancers before deleting cluster 2020-05-12 09:48:11 +00:00
test_policy.py Set is_admin flag correctly in RequestContext 2017-03-03 03:37:08 +00:00
test_profiler.py Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00
test_rpc.py Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00
test_service.py Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00
test_short_id.py Do not use translate to delete chars 2016-02-29 14:34:07 +08:00
test_urlfetch.py Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00
test_utils.py Use unittest.mock instead of third party mock 2020-04-29 17:10:23 +03:00