Refactor Client Managers

Registered by Andrea Frittoli

The current client managers instantiate all possible clients at __init__ time and expose the clients via class attributes.
The problem with this is that regardlless of tempest configuration about available services, extensions and API versions, all clients are instantiated.
The proposed change is: clients are only instantiated on demand, the manager internally caches instances of clients and serve them from cache where applicable, test base classes would use get_x_client instead of the attribute, and pass client specific parameters (i.e. API version, extension) into that call

Blueprint information

Status:
Complete
Approver:
Matthew Treinish
Priority:
Medium
Drafter:
Andrea Frittoli
Direction:
Approved
Assignee:
Andrea Frittoli
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Andrea Frittoli
Completed by
Ken'ichi Ohmichi

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/client-manager-refactor,n,z

Addressed by: https://review.openstack.org/92804
    add bp:client-manager-refactor

Addressed by: https://review.openstack.org/258566
    Refactor and split client manager

Gerrit topic: https://review.openstack.org/#q,topic:manager_split,n,z

Addressed by: https://review.openstack.org/260076
    Add a service client data store

Addressed by: https://review.openstack.org/260077
    Migrate compute client group to the new manager

Addressed by: https://review.openstack.org/261067
    Migrate network client group to the new manager

Addressed by: https://review.openstack.org/262859
    Migrate volume client group to the new manager

Addressed by: https://review.openstack.org/262989
    Migrate object storage group to the new manager

Addressed by: https://review.openstack.org/262990
    Migrate image client group to the new manager

Addressed by: https://review.openstack.org/326667
    Prepare the Manager class for tempest.lib

Addressed by: https://review.openstack.org/326671
    Define _set_image_clients

Addressed by: https://review.openstack.org/326672
    Define _set_image_clients

Addressed by: https://review.openstack.org/326683
    Prepare the Manager class for tempest.lib

Addressed by: https://review.openstack.org/327579
    Stop passing TestResources to Managers

Addressed by: https://review.openstack.org/329063
    Handle service available parameters

Addressed by: https://review.openstack.org/329396
    Handle feature flags

Addressed by: https://review.openstack.org/329683
    Service client modules in compute __init__

Addressed by: https://review.openstack.org/331060
    Service client modules in identity __init__

Addressed by: https://review.openstack.org/331061
    Service client modules in network __init__

Addressed by: https://review.openstack.org/331062
    Service client modules in volume __init__

Addressed by: https://review.openstack.org/331063
    Service client modules in image __init__

Addressed by: https://review.openstack.org/331064
    Service client modules in object-storage __init__

Addressed by: https://review.openstack.org/331065
    Service client modules in various services __init__

Gerrit topic: https://review.openstack.org/#q,topic:client-manager-import-cleanup,n,z

Addressed by: https://review.openstack.org/333513
    WIP register interface

Addressed by: https://review.openstack.org/335242
    Register Tempest clients via the new interface

Addressed by: https://review.openstack.org/336126
    Optional setting service client on factory

Addressed by: https://review.openstack.org/339097
    Migrate service_clients to tempest.lib

Addressed by: https://review.openstack.org/347756
    Configure stable service clients via the registry

Addressed by: https://review.openstack.org/351509
    Fix tempest and available modules

Addressed by: https://review.openstack.org/352292
    Try to register all service clients

Addressed by: https://review.openstack.org/490566
    Add release notes for client registration changes

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.