X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=o2ims%2Fservice%2Fauditor%2Fresourcepool_handler.py;h=b5b0e0d5a6d3304dc5b661f13817e2e23d49415f;hb=refs%2Fchanges%2F08%2F7408%2F4;hp=88cf182114818814762961956dc59b3b3272da46;hpb=d14329a57d8d01d443e4158fa5030a5b5ada4060;p=pti%2Fo2.git diff --git a/o2ims/service/auditor/resourcepool_handler.py b/o2ims/service/auditor/resourcepool_handler.py index 88cf182..b5b0e0d 100644 --- a/o2ims/service/auditor/resourcepool_handler.py +++ b/o2ims/service/auditor/resourcepool_handler.py @@ -20,11 +20,12 @@ from o2ims.domain.stx_object import StxGenericModel # from dataclasses import asdict # from typing import List, Dict, Callable, Type # TYPE_CHECKING -from o2ims.domain import commands +from o2ims.domain import commands, events from o2common.service.unit_of_work import AbstractUnitOfWork # from o2ims.domain.resource_type import InvalidOcloudState from o2ims.domain.resource_type import MismatchedModel from o2ims.domain.ocloud import ResourcePool +from o2ims.domain.subscription_obj import NotificationEventEnum # if TYPE_CHECKING: # from . import unit_of_work @@ -98,4 +99,8 @@ def update_by(target: ResourcePool, stxobj: StxGenericModel, target.hash = stxobj.hash target.oCloudId = parentid target.version_number = target.version_number + 1 - target.events = [] + target.events.append(events.ResourcePoolChanged( + id=stxobj.id, + notificationEventType=NotificationEventEnum.MODIFY, + updatetime=stxobj.updatetime + ))