Hi Arko
How about something like this? Note that I have not included values here, because this is a defining schema - the values would be in a payload generated according to this schema. I also re-used the Quantity type that encapsulates value and units for things like height, weight, etc.
Hope it helps
"Pole" {
"type": "object",
"properties": {
"poleNumber": {
"type": "string",
"description": "identifying number of the pole"
},
"height": {
"$ref": "../Common/Quantity.schema.json#Quantity",
"description": "height of the pole - includes units and amount"
},
"isShared": {
"type": "boolean",
"description": "indicates if the pole is shared by multiple service providers"
},
"loadCapacity": {
"type": "number",
"description": "How much can the pole take"
}
}
}
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
------------------------------
Original Message:
Sent: May 09, 2022 07:01
From: Arko Chakravarty
Subject: TMF639 Open API resource response to one of our physical inventory which has some specific attributes.
Hi Jonathan,
Thanks for your valuable comment . After going through the document I am able to mapped some of these specific attributes in resourceCharacteristic by Characteristic-based but unable to figure it out map it via Schema -based .Can you please help me to do the same with Schema -based. Shared below sample example with Characteristic-based.
Resource Catalog included, present two complementary methods
- Characteristic-based
- Schema-based
For Characteristic base
"resourceCharacteristic": [
{
"name": "poleNumber",
"valueType": "string",
"value": "pole001"
},{
"name": "height",
"valueType": "integer",
"value": 56
},
{
"name": "heightUnits",
"valueType": "string",
"value": "cm"
},{
"name": "diameter",
"valueType": "integer",
"value": 5
},
{
"name": "diameterUnits",
"valueType": "string",
"value": "cm"
},{
"name": "loadCapacity",
"valueType": "integer",
"value": 67
},
{
"name": "material",
"valueType": "string",
"value": "iron"
},{
"name": "isShared",
"valueType": "boolean",
"value": false
}
],
------------------------------
Arko Chakravarty
VCT International
Original Message:
Sent: May 01, 2022 08:24
From: Jonathan Goldberg
Subject: TMF639 Open API resource response to one of our physical inventory which has some specific attributes.
Hi Arko
The resource inventory (like other inventories such as product, service) is driven by catalog. So in the Resource Catalog (TMF633) you define characteristics for different resource types (such as Tower, Switch, Router, Firewall, etc.). These characteristics are what you refer to as attributes.
An alternative approach is to define specific subclasses of LogicalResource or PhysicalResource, e.g. Tower, and give these subclasses strongly-typed attributes. This is described in summary in the user guide for TMF633, suggest you look there.
Hope it helps.
------------------------------
Jonathan Goldberg
Amdocs Management Limited
Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
Original Message:
Sent: Apr 29, 2022 09:37
From: Arko Chakravarty
Subject: TMF639 Open API resource response to one of our physical inventory which has some specific attributes.
We are trying to map TMF639 Open API resource response to one of our physical inventory which has some specific attributes. We would like to know how to include these specific attributes into the Resource Open API GET response.
For example: Tower (cell tower) inventory has specific attributes like TowerNumber, Height, Antenna Load, etc. How to include these attributes in to Resource Open API GET response?
------------------------------
Arko Chakravarty
VCT International
------------------------------