65d309394d9f904bb4286a1baf1b4b069a819983
Openrc files downloaded through Horizon does not set
OS_PROJECT_DOMAIN_NAME. This means openrc files downloaded from
horizon cannot be used to issue commands to sw-manager, even if
the user they refer to is supposed to be able to issue commands
to sw-manager. This is because nfv-client rejects commands if no
project domain name is specified.
This commit sets the nfv-client's project domain name to "Default"
when none is passed through command line parameters or environment
variables.
The "Default" domain is the default for openstack deployments and
starlingx. Assuming it as a default will not expose a security risk
as this information is not a secret. Users can override the default
value of "Default" by specifying the project domain name through
environment variables or the command line.
A change in nvf-client is done over a change in horizon in order to
minimize changes to components that starlingx does not own. Also,
none of starlingx's other components uses the project domain name.
Nfv client's authentication mechanism is not changed to use something
other than project domain name because that is a major change, and
could potentially cause compatibiltiy issues with
(orchestrated) upgrades.
Test Cases:
PASS: sw-manager upgrade-strategy-show with /etc/platform/openrc
PASS: sw-manager upgrade-strategy-show with admin openrc from horizon
ensure it is successful instead of failure due to lack of
project domain name
PASS: sw-manager upgrad-estrategy-show with admin openrc from horizon,
then manually specifying incorrect OS_PROJECT_DOMAIN_NAME through
environment variable. Ensure this failed and that authentication
actually uses this field.
Change-Id: Ib2e22e9f5556b01115ab0adfb3c9a399825c49d5
Closes-bug: 1989796
Signed-off-by: Jerry Sun <jerry.sun@windriver.com>
nfv
StarlingX NFVI Orchestration
Description
Languages
Python
83.4%
JavaScript
7%
C++
6.5%
Shell
1.5%
Handlebars
0.9%
Other
0.7%