X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2ims%2Fdomain%2Focloud.py;h=047fb8bab43e4bc859b752cf62447c7090583ec2;hb=49dc99721ca628d0f75f332f9dbdf0d8e6452241;hp=1775aa29633e67867279118f49ba103320bd3d7c;hpb=defe8209b3628593c186487857fe02586d7e1503;p=pti%2Fo2.git diff --git a/o2ims/domain/ocloud.py b/o2ims/domain/ocloud.py index 1775aa2..047fb8b 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,22 @@ class DeploymentManager(AgRoot, Serializer): self.supportedLocations = supportedLocations self.capabilities = capabilities self.capacity = capacity + self.profile = profile self.extensions = [] + def serialize(self): + 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, @@ -124,7 +143,7 @@ class Ocloud(AgRoot, Serializer): self.version_number = version_number self.name = name self.description = description - self.infrastructureManagementServiceEndpoint = imsendpoint + self.serviceUri = imsendpoint self.resourcePools = [] self.deploymentManagers = [] self.resourceTypes = []