Prevent v1_api from making requests to v2_registry
In glance v2, when one opts to use v2_registry, it is required that
'data_api' is set to 'glance.db.registry.api'. This is returned by
method 'get_api()' which currently simply returns whatever is provided
to 'data_api'. This is suitable for v2. But when using v1, this same
method is used to fetch the db api. This returns 'glance.db.registry.api'
which inturn relies on the registry rpc client (v2).
To prevent this, this patch proposes to change what get_api()
will return based on whether it is serving v1 api or v2 api.
Reviewed: https:/ /review. openstack. org/431709 /git.openstack. org/cgit/ openstack/ glance/ commit/ ?id=c74e6bb8dde e8ad1ad2479f3fc fd8396dedef55b
Committed: https:/
Submitter: Jenkins
Branch: master
commit c74e6bb8ddee8ad 1ad2479f3fcfd83 96dedef55b
Author: Dharini Chandrasekar <email address hidden>
Date: Thu Feb 9 18:34:02 2017 +0000
Prevent v1_api from making requests to v2_registry
In glance v2, when one opts to use v2_registry, it is required that db.registry. api'. This is returned by db.registry. api'
'data_api' is set to 'glance.
method 'get_api()' which currently simply returns whatever is provided
to 'data_api'. This is suitable for v2. But when using v1, this same
method is used to fetch the db api. This returns 'glance.
which inturn relies on the registry rpc client (v2).
To prevent this, this patch proposes to change what get_api()
will return based on whether it is serving v1 api or v2 api.
Change-Id: Ifef36859b3f769 2769a6991364b60 63c9f7cc451
Closes-Bug: 1516706