X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=o2ims%2Fdomain%2Fstx_object.py;h=9629652ef32ccc8f21803c1247f53a7f763c7464;hb=387ee50cfe8e97ba211464c311bb7b6eb9ee2961;hp=90c166feedfb30b77900828cd29d404922d49aec;hpb=b21c925328b0c700fde9001b7a56ea55decdf088;p=pti%2Fo2.git diff --git a/o2ims/domain/stx_object.py b/o2ims/domain/stx_object.py index 90c166f..9629652 100644 --- a/o2ims/domain/stx_object.py +++ b/o2ims/domain/stx_object.py @@ -17,20 +17,16 @@ import datetime import json from o2ims.domain.base import AgRoot -from o2ims.domain.resource_type import ResourceTypeEnum +from o2ims.domain.resource_type import ResourceTypeEnum, MismatchedModel from o2common.helper import o2logging logger = o2logging.get_logger(__name__) -class MismatchedModel(Exception): - pass - - class StxGenericModel(AgRoot): def __init__(self, type: ResourceTypeEnum, api_response: dict = None, content_hash=None) -> None: if api_response: - self.id = api_response.uuid + self.id = str(api_response.uuid) self.type = type self.updatetime = datetime.datetime.strptime( api_response.updated_at.split('.')[0], "%Y-%m-%dT%H:%M:%S") \