X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2ims%2Fdomain%2Focloud.py;h=c6f5fd80efed11609d71cd8fd88a5ea85a2e07e2;hb=d9000f0859a254f2c3c32f30ed71a143e731e2ff;hp=a8e7c2f2a50483cd1d6f6ecdb9092e2b65b81227;hpb=a9840e41848cbbffcedf76f0a53ffc5d9bc87c01;p=pti%2Fo2.git diff --git a/o2ims/domain/ocloud.py b/o2ims/domain/ocloud.py index a8e7c2f..c6f5fd8 100644 --- a/o2ims/domain/ocloud.py +++ b/o2ims/domain/ocloud.py @@ -16,15 +16,14 @@ from __future__ import annotations import json from o2common.domain.base import AgRoot, Serializer -from o2common.config import conf as CONF +from o2common.config import config, conf as CONF # from dataclasses import dataclass # from datetime import date # from typing import Optional, List, Set from .resource_type import ResourceKindEnum, ResourceTypeEnum -# from uuid import UUID -DeploymentManagerProfileDefault = 'default' +DeploymentManagerProfileDefault = 'native_k8sapi' DeploymentManagerProfileSOL018 = 'sol018' DeploymentManagerProfileSOL018HelmCLI = 'sol018_helmcli' @@ -55,9 +54,13 @@ class DeploymentManager(AgRoot, Serializer): d['profile'] = json.loads(d['profile']) d['profileSupportList'] = [ DeploymentManagerProfileDefault, - DeploymentManagerProfileSOL018, - DeploymentManagerProfileSOL018HelmCLI, ] + profiles = config.get_dms_support_profiles() + for profile in profiles: + if profile == DeploymentManagerProfileSOL018: + d['profileSupportList'].append(profile) + elif profile == DeploymentManagerProfileSOL018HelmCLI: + d['profileSupportList'].append(profile) return d @@ -81,7 +84,7 @@ class ResourcePool(AgRoot, Serializer): class ResourceType(AgRoot, Serializer): def __init__(self, typeid: str, name: str, typeEnum: ResourceTypeEnum, - ocloudid: str, vender: str = '', model: str = '', + ocloudid: str, vendor: str = '', model: str = '', version: str = '', description: str = '') -> None: super().__init__() @@ -89,7 +92,7 @@ class ResourceType(AgRoot, Serializer): self.resourceTypeEnum = typeEnum self.name = name self.description = description - self.vender = vender + self.vendor = vendor self.model = model self.version = version self.alarmDictionary = {}