summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
6e18a1c)
The O2 application installation on a subcloud will fail because the
default region name is "RegionOne," while the subcloud has a different
region name.
This commit adds an environment variable that allows the user to set the
region name, replacing the default one.
Test Cases:
1. Successfully installed the O2 application on the subcloud.
2. Successfully installed the O2 application on the central cloud.
Issue-ID: INF-467
Change-Id: I893680b8c2519667b1784b751950ea8a3f14cbce
Signed-off-by: Zhang Rong(Jon) <rong.zhang@windriver.com>
value: {{ .Values.ocloud.OS_PASSWORD }}
- name: OS_USERNAME
value: {{ .Values.ocloud.OS_USERNAME }}
value: {{ .Values.ocloud.OS_PASSWORD }}
- name: OS_USERNAME
value: {{ .Values.ocloud.OS_USERNAME }}
+ - name: OS_REGION_NAME
+ value: {{ .Values.ocloud.OS_REGION_NAME }}
- name: PYTHONDONTWRITEBYTECODE
value: "1"
- name: REDIS_HOST
- name: PYTHONDONTWRITEBYTECODE
value: "1"
- name: REDIS_HOST
OS_AUTH_URL: ""
OS_USERNAME: ""
OS_PASSWORD: ""
OS_AUTH_URL: ""
OS_USERNAME: ""
OS_PASSWORD: ""
+ OS_REGION_NAME: "RegionOne"
K8S_KUBECONFIG: ""
API_HOST_EXTERNAL_FLOATING: ""
HELM_USER_PASSWD: "St8rlingX*"
K8S_KUBECONFIG: ""
API_HOST_EXTERNAL_FLOATING: ""
HELM_USER_PASSWD: "St8rlingX*"
return f"https://{host}:{port}"
return f"https://{host}:{port}"
+def get_region_name():
+ region_name = os.environ.get("OS_REGION_NAME", "RegionOne")
+ return region_name
+
+
def get_stx_url():
try:
return get_stx_client_args()["auth_url"]
def get_stx_url():
try:
return get_stx_client_args()["auth_url"]
-def get_stx_access_info(region_name="RegionOne", subcloud_hostname: str = "",
+def get_stx_access_info(region_name=get_region_name(),
+ subcloud_hostname: str = "",
sub_is_https: bool = False):
try:
client_args = get_stx_client_args()
sub_is_https: bool = False):
try:
client_args = get_stx_client_args()