Arko,
Where a
Card contains
Ports we may represent a
Port as:
{
"id": "abcdef",
"@type": "Port",
"@baseType": "Resource",
...
"resourceRelationship": [
{
"@type": "ResourceRelationship",
"relationshipType": "contained",
"resource": {
"id": "uvwxyz"
"@type": "ResourceRef",
"@referredType": "Card",
...
}
}
]
}
In this case to query the resource inventory collection for Ports on a specific Card you could use:
GET /resourceInventoryManagement/v4/resource?filter=resourceRelationship[?(@.resource.id='uvwxyz')]
You could (also?) manage a "contains" relationship of the
Card:
{
"id": "uvwxyz",
"@type": "Card",
"@baseType": "Resource",
...
"resourceRelationship": [
{
"@type": "ResourceRelationship",
"relationshipType": "contains",
"resource": {
"id": "abcdef"
"@type": "ResourceRef",
"@referredType": "Port",
...
}
},
...
]
}
If you want to get a partial representation of this Card containing just the related Ports:
GET /resourceInventoryManagement/v4/resource/uvwxyz?fields=resourceRelationship[?(@.resource.@referredType='Port')]
------------------------------
Vance Shipley
SigScale
------------------------------
Original Message:
Sent: Jun 22, 2022 06:49
From: Arko Chakravarty
Subject: Resource Inventory Management (TMF369) : How to do filtering for indirect relationship
How to do filtering for indirect relationship
example
Network elements contains shelfs,shelfs contains cards,cards contains ports
I want to filter ports specific to network element id.
------------------------------
Arko Chakravarty
VCT International
------------------------------