X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=o2ims%2Fdomain%2Focloud.py;h=380d9196708a304535076a0f0eb23d8cc599113d;hb=e07ca03ee134886983e420fb974ff6c38855a0d6;hp=1775aa29633e67867279118f49ba103320bd3d7c;hpb=defe8209b3628593c186487857fe02586d7e1503;p=pti%2Fo2.git diff --git a/o2ims/domain/ocloud.py b/o2ims/domain/ocloud.py index 1775aa2..380d919 100644 --- a/o2ims/domain/ocloud.py +++ b/o2ims/domain/ocloud.py @@ -23,11 +23,16 @@ from .resource_type import ResourceTypeEnum # from uuid import UUID +DeploymentManagerProfileDefault = 'default' +DeploymentManagerProfileSOL018 = 'sol018' +DeploymentManagerProfileSOL018HelmCLI = 'sol018_helmcli' + + class DeploymentManager(AgRoot, Serializer): def __init__(self, id: str, name: str, ocloudid: str, dmsendpoint: str, description: str = '', supportedLocations: str = '', capabilities: str = '', - capacity: str = '') -> None: + capacity: str = '', profile: str = '') -> None: super().__init__() self.deploymentManagerId = id self.version_number = 0 @@ -38,8 +43,23 @@ class DeploymentManager(AgRoot, Serializer): self.supportedLocations = supportedLocations self.capabilities = capabilities self.capacity = capacity + self.profile = profile self.extensions = [] + def serialize(self): + print(self.__dict__) + d = Serializer.serialize(self) + + if 'profile' in d and d['profile'] != '': + d['profile'] = json.loads(d['profile']) + d['profileSupportList'] = [ + DeploymentManagerProfileDefault, + DeploymentManagerProfileSOL018, + DeploymentManagerProfileSOL018HelmCLI, + ] + + return d + class ResourcePool(AgRoot, Serializer): def __init__(self, id: str, name: str, location: str,