Merge "Updated distcloud for subcloud region_name changes" into i-release
authorJon Zhang <rong.zhang@windriver.com>
Wed, 28 Feb 2024 03:03:32 +0000 (03:03 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Wed, 28 Feb 2024 03:03:32 +0000 (03:03 +0000)
README-docker-compose.md
README-o2imsbuilder.md
README.md
o2ims/adapter/clients/ocloud_client.py
requirements-stx.txt

index b1e1647..6ba891c 100644 (file)
@@ -35,8 +35,8 @@ cd o2
 mkdir -p temp
 cd temp
 git clone --depth 1 --branch r/stx.7.0 https://opendev.org/starlingx/config.git
-git clone --depth 1 --branch r/stx.7.0 https://opendev.org/starlingx/distcloud-client.git
-
+git clone --branch master https://opendev.org/starlingx/distcloud-client.git
+(cd distcloud-client && git reset --hard eb4e7eeeb09bdf2e1b80984b378c5a8ea9930f04)
 git clone --depth 1 --branch r/stx.7.0 https://opendev.org/starlingx/fault.git
 cd -
 
index 70547c8..adb5e42 100644 (file)
@@ -36,8 +36,9 @@ cd o2
 
 mkdir -p temp
 cd temp
-git clone --depth 1 --branch master https://opendev.org/starlingx/config.git
-git clone --depth 1 --branch master https://opendev.org/starlingx/distcloud-client.git
+git clone --depth 1 --branch r/stx.7.0 https://opendev.org/starlingx/config.git
+git clone --branch master https://opendev.org/starlingx/distcloud-client.git
+(cd distcloud-client && git reset --hard eb4e7eeeb09bdf2e1b80984b378c5a8ea9930f04)
 cd -
 
 docker-compose build
index ab9166e..6dbcbaf 100644 (file)
--- a/README.md
+++ b/README.md
@@ -6,9 +6,10 @@ cloned into temp before docker building
 ```sh
 mkdir -p temp
 cd temp
-git clone --branch master https://opendev.org/starlingx/config.git
-git clone --depth 1 --branch r/stx.7.0 https://opendev.org/starlingx/distcloud-client.git
-git clone --depth 1 --branch master https://opendev.org/starlingx/fault.git
+git clone --branch r/stx.7.0 https://opendev.org/starlingx/config.git
+git clone --branch master https://opendev.org/starlingx/distcloud-client.git
+(cd distcloud-client && git reset --hard eb4e7eeeb09bdf2e1b80984b378c5a8ea9930f04)
+git clone --depth 1 --branch r/stx.7.0 https://opendev.org/starlingx/fault.git
 cd config
 git checkout bca406d1
 patch -p1 < ../../cgtsclient-insecure.patch
index 6c682a2..4e8430f 100644 (file)
@@ -226,9 +226,11 @@ class StxClientImp(object):
             subcloud_additional_details(subcloud_id)
         logger.debug('subcloud name: %s, oam_floating_ip: %s' %
                      (subcloud[0].name, subcloud[0].oam_floating_ip))
+        if subcloud[0].oam_floating_ip == 'unavailable':
+            raise EnvironmentError(f"{subcloud[0].name} was unavailable")
         try:
             os_client_args = config.get_stx_access_info(
-                region_name=subcloud[0].name,
+                region_name=subcloud[0].region_name,
                 subcloud_hostname=subcloud[0].oam_floating_ip)
             # logger.info(os_client_args)
             config_client = get_stx_client(**os_client_args)
@@ -236,7 +238,7 @@ class StxClientImp(object):
             msg = e.format_message()
             if CGTSCLIENT_ENDPOINT_ERROR_MSG in msg:
                 os_client_args = config.get_stx_access_info(
-                    region_name=subcloud[0].name, sub_is_https=True,
+                    region_name=subcloud[0].region_name, sub_is_https=True,
                     subcloud_hostname=subcloud[0].oam_floating_ip)
                 # logger.info(os_client_args)
                 config_client = get_stx_client(**os_client_args)
index 77555c6..88effb5 100644 (file)
@@ -2,6 +2,6 @@
 # -e git+https://opendev.org/starlingx/config.git@master#egg=cgtsclient&subdirectory=sysinv/cgts-client/cgts-client
 # -e git+https://opendev.org/starlingx/fault.git@master#egg=fmclient&subdirectory=python-fmclient/fmclient
 
--e git+https://opendev.org/starlingx/distcloud-client.git@r/stx.7.0#egg=distributedcloud-client&subdirectory=distributedcloud-client
+-e git+https://opendev.org/starlingx/distcloud-client.git@eb4e7eeeb09bdf2e1b80984b378c5a8ea9930f04#egg=distributedcloud-client&subdirectory=distributedcloud-client
 -e git+https://opendev.org/starlingx/config.git@r/stx.7.0#egg=cgtsclient&subdirectory=sysinv/cgts-client/cgts-client
 -e git+https://opendev.org/starlingx/fault.git@r/stx.7.0#egg=fmclient&subdirectory=python-fmclient/fmclient