Refactoring of Benchmark Context Cleanup

Registered by Carlos L. Torres

The following blueprint will contain a series of patches that will address the following: Refactoring of benchmarks/utils.py to improve cohesion. Splitting user and admin cleanup to their respective classes, re-structure context/utils.py to be more OO.

In detail, the following changes will represent the series of changes it will be deliver:

First Patch:
1) Add a cleanup directory to context,
2) Rename 'cleaner' to 'cleanup' and move it to the directory mentioned above,
3) Split and move everything related to cleanup under benchmark/utils.py and move it to cleanup/utils.py
4) Add and fix unit tests accordingly

Another patch:
1) Split 'user' and 'admin' cleanup to 2 separate classes
2) Add, and update, unit tests

Two or more patches:
1) Refactor context/utils.py to use a more OO approach, by abstracting the common functionality to a base class named Cleaner, and with a method init that takes context['users'], and abstract method that doesn't take any args, but actually executes the cleanup code.
2) Then make all service cleanups extend and implement the Cleaner base class.
3) Add unit tests

Final patch:
1) Adding a retry mechanism for cleanups
2) Improve performance of the cleanup process
3) Add unit tests for this functionality

Blueprint information

Status:
Complete
Approver:
Boris Pavlovic
Priority:
High
Drafter:
Carlos L. Torres
Direction:
Approved
Assignee:
Carlos L. Torres
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Carlos L. Torres
Completed by
Boris Pavlovic

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/benchmark-context-cleanup-refactor,n,z

Addressed by: https://review.openstack.org/90579
    Refactored cleaner and added cleanup/utils

Addressed by: https://review.openstack.org/100590
    Split user and admin cleanup to 2 separate classes

Addressed by: https://review.openstack.org/129060
    WIP Improve rally generic cleanup mechanism

Addressed by: https://review.openstack.org/129499
    Add simple multi thread broker

Addressed by: https://review.openstack.org/132436
    Refactor generic cleanup mechanism part 1

Addressed by: https://review.openstack.org/132437
    Refactor generic cleanup mechanism part 2

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.