tacker/tacker/nfvo
Hiromu Asahina fff6cec4f2 Fix VIM registration error
The VIM registration fails in an environment where an admin-endpoint is
close even if a reachable public-endpoint is used in the VIM
configuration.

The cause of this problem is that the endpoint for the keystone API and
the endpoint for the authentication are different inside the keystone
client.  The keystone client implicitly selects admin-endpoint for API
requests from service catalogs unless we specify an endpoint URL or
interface [1], i.e., the auth_url in the VIM configuration isn't used
for API requests.

This patch solves the above problem by specifying an endpoint URL when
creating a keystone client instance.

Note that specifying an interface can be a better solution, as the
keystone can provide different interfaces with the same endpoint URL.
However, to achieve this, we have to add a new field to the VIM
configuration for the interface, which makes a huge modification.
Thus, this patch doesn't take this solution.

Also, this patch includes a tiny refactoring on the OpenStack driver.

[1] d5cb761763/keystoneclient/httpclient.py (L251)

Change-Id: Ic743fadbd1ddd59ca6755949e03b77c8715be459
Closes-bug: #1920088
Signed-off-by: Hiromu Asahina <hiromu.asahina.az@hco.ntt.co.jp>
2021-12-09 15:44:40 +09:00
..
drivers Fix VIM registration error 2021-12-09 15:44:40 +09:00
workflows Adapt to python-mistralclient v4.2.0 for PingVIM 2021-02-10 04:51:17 +00:00
__init__.py Implement multisite VIM feature 2016-03-28 15:32:54 -07:00
nfvo_plugin.py Cleanup of .keys() 2020-04-25 08:16:00 +00:00