diff options
author | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2024-03-26 12:56:41 +0100 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2024-03-26 15:08:58 +0100 |
commit | 7801bc09e09b7816c7690f14bc18afd013c5e70a (patch) | |
tree | 43e4b556e68747734e545a33d0949cd65e456cce /src | |
parent | 4a99e7286857a83a9e2c557263363228f410bac8 (diff) |
Fix SDC v2 distribution status - desird status
If DOWNLOAD_OK check not for all components
Issue-ID: TEST-404
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Change-Id: I4111ceb8b3aeb69023d8c80a80b6ef57c95b9575
Diffstat (limited to 'src')
-rw-r--r-- | src/onapsdk/configuration/global_settings.py | 9 | ||||
-rw-r--r-- | src/onapsdk/sdc2/service.py | 5 | ||||
-rw-r--r-- | src/onapsdk/version.py | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/onapsdk/configuration/global_settings.py b/src/onapsdk/configuration/global_settings.py index 8bfea14..32eedcd 100644 --- a/src/onapsdk/configuration/global_settings.py +++ b/src/onapsdk/configuration/global_settings.py @@ -84,3 +84,12 @@ SDC_SERVICE_DISTRIBUTION_COMPONENTS = [ "policy-distribution-id", "multicloud-k8s" ] + +# SDC DISTRIBUTION DESIRD STATE +# FOR OTHER COMPONENTS NOTIFICATION IS ENOUGH +SDC_SERVICE_DISTRIBUTION_DESIRED_STATE = { + "SO-sdc-controller": "DOWNLOAD_OK", + "aai-model-loader": "DOWNLOAD_OK", + "sdnc-sdc-listener": "DOWNLOAD_OK", + "policy-distribution-id": "DOWNLOAD_OK", +} diff --git a/src/onapsdk/sdc2/service.py b/src/onapsdk/sdc2/service.py index 079fff5..e7e76e9 100644 --- a/src/onapsdk/sdc2/service.py +++ b/src/onapsdk/sdc2/service.py @@ -68,7 +68,10 @@ class ServiceDistribution(SDC): bool: True if distribution of component was completed. """ - return self.status == "DOWNLOAD_OK" + return not self.failed and ( + self.component_id not in settings.SDC_SERVICE_DISTRIBUTION_DESIRED_STATE + or self.status == settings.SDC_SERVICE_DISTRIBUTION_DESIRED_STATE[ + self.component_id]) @property def failed(self) -> bool: diff --git a/src/onapsdk/version.py b/src/onapsdk/version.py index 33acbae..7e00970 100644 --- a/src/onapsdk/version.py +++ b/src/onapsdk/version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "13.0.6" +__version__ = "13.0.7" |