X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2ims%2Fviews%2Focloud_view.py;h=441c938c5b31d2c65a1679b81f24bc779bda48c8;hb=d9000f0859a254f2c3c32f30ed71a143e731e2ff;hp=eb6c79f2ad987b603378d405e23819231c6e3620;hpb=49dc99721ca628d0f75f332f9dbdf0d8e6452241;p=pti%2Fo2.git diff --git a/o2ims/views/ocloud_view.py b/o2ims/views/ocloud_view.py index eb6c79f..441c938 100644 --- a/o2ims/views/ocloud_view.py +++ b/o2ims/views/ocloud_view.py @@ -128,7 +128,8 @@ def deployment_managers(uow: unit_of_work.AbstractUnitOfWork, **kwargs): def deployment_manager_one(deploymentManagerId: str, uow: unit_of_work.AbstractUnitOfWork, - profile: str = 'default'): + profile: str = + ocloud.DeploymentManagerProfileDefault): profile = profile.lower() with uow: first = uow.deployment_managers.get(deploymentManagerId) @@ -140,15 +141,17 @@ def deployment_manager_one(deploymentManagerId: str, profile_data = result.pop("profile", None) result['profileName'] = profile + profiles = config.get_dms_support_profiles() + if profile not in profiles: + return "" - if ocloud.DeploymentManagerProfileDefault == profile: - pass - elif ocloud.DeploymentManagerProfileSOL018 == profile: - result['deploymentManagementServiceEndpoint'] = \ + if ocloud.DeploymentManagerProfileDefault == profile \ + or ocloud.DeploymentManagerProfileSOL018 == profile: + result['serviceUri'] = \ profile_data['cluster_api_endpoint'] result['profileData'] = profile_data elif ocloud.DeploymentManagerProfileSOL018HelmCLI == profile: - result['deploymentManagementServiceEndpoint'] = \ + result['serviceUri'] = \ profile_data['cluster_api_endpoint'] helmcli_profile = dict() @@ -159,7 +162,7 @@ def deployment_manager_one(deploymentManagerId: str, deploymentManagerId, profile_data) result['profileData'] = helmcli_profile else: - return None + return "" return result