X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=o2ims%2Fservice%2Fauditor%2Fpserver_if_handler.py;h=481c05553edbde2cc072724c6c73d03ad57030a6;hb=c34ab47848138150a1456be2fa9f82d7260e37b8;hp=94602f753eca68aaaaf88acd044b4d411bcc7e1c;hpb=94e6f93c3434e5f9a9529246d97d2666a2479299;p=pti%2Fo2.git diff --git a/o2ims/service/auditor/pserver_if_handler.py b/o2ims/service/auditor/pserver_if_handler.py index 94602f7..481c055 100644 --- a/o2ims/service/auditor/pserver_if_handler.py +++ b/o2ims/service/auditor/pserver_if_handler.py @@ -51,11 +51,14 @@ def update_pserver_if( ) first = res.first() if first is None: - resourcetype_id = str(uuid.uuid4()) + res_type_name = 'pserver_if' + resourcetype_id = str(uuid.uuid3( + uuid.NAMESPACE_URL, res_type_name)) uow.resource_types.add(ResourceType( resourcetype_id, - 'pserver_if', stxobj.type, - resourcepool.oCloudId)) + res_type_name, stxobj.type, + resourcepool.oCloudId, + description='An Interface resource type of Physical Server')) else: resourcetype_id = first['resourceTypeId'] @@ -96,7 +99,8 @@ def create_by(stxobj: StxGenericModel, parent: Resource, resourcetype_id: str)\ resourcepool_id = parent.resourcePoolId parent_id = parent.resourceId gAssetId = '' # TODO: global ID - description = "An interface resource of the physical server" + description = "%s : An interface resource of the physical server"\ + % stxobj.name resource = Resource(stxobj.id, resourcetype_id, resourcepool_id, stxobj.name, parent_id, gAssetId, stxobj.content, description)