This handle the senlin cluster disable/clean
for disable it will detach the polices from the cluster
and resize the cluster to zero (empty cluster)
for clean it will deatach the policies from cluster
clean the policies, receivers then clean the clusters then clean
the profiles
Change-Id: I09421d55c66d91a747bc786fdd250730c79dfd34
* unittest.mock was added in Python 3.3 standard library: use
external 'mock' module, backport for Python 2.7
* assertRaisesRegex() method was added to Python 3.2 unittest module:
use external 'unitttest2' backport for Python 2.7 to not have to
rewrite unit tests just because of Python 2.7
Both added dependencies are specific to Python 2.7 and have no impact
on Python 3.
Related-Bug: 1726399
Change-Id: Ieb32e85d6f40f9b7bed5ba99900be2432d18da9e
This commit is a whole new version of OSPurge. Currently OSPurge suffers
from the following limitations:
* It's slow (monothread)
* It's not guaranteed to complete. If a resource fails to be deleted then
OSPurge can choke on deleting other resources that depends on the first one.
* Not properly unit tested.
* Not modular (one huge file to deal with all services)
This new version is:
* Faster (multithreaded, thanks to a ThreadPoolExecutor)
* Safe (we check and wait for some prerequisites before attempting a
delete)
* 100% unit tested.
* Modular (one file per service)
Note that it's Python3.5 compatible. It also uses OpenStack Shade
and OpenStack client-config libraries so that OSPurge focuses on the
cleaning logic only.
Overall I believe this is a better version of OSPurge and more future
proof. NOte that we tagged and released OSPurge 1.3 recently in case
the new version was not satisfactory to everybody.
Change-Id: I5eb92a0556df210ea3cb4e471b8db3b5bf7ed5ee
in an effort to make things more standardized, we should use the
requirements outlined by the global-requirements team [1].
note that httpretty is no longer a global-requirement, we should
probably transition to using mock or requests-mock.
[1] https://github.com/openstack/requirements/blob/master/global-requirements.txt
Change-Id: I0c46731e7b0427f7564b0c654d6d9be4a4685b2b