Open APIs

 View Only
  • 1.  TMF 633 Characteristic valueType Object Array

    TM Forum Member
    Posted 9 days ago
    Edited by Jay Hamilton 9 days ago

    I am defining TMF 633 service specification characteristics. I have two (phone numbers and CPE ports) that have a max cardinality greater than 1 such that each can have multiple instances. However, they are related and should be paired together.  Still learning how to model so bare with me. To solve this I quickly jumped to trying to figure out how to introduce an objectArray as a characteristic type. I then saw some comments about TMF version 5 as well as the use of combined specifications. What is the current best guidance? Or am I missing something? Ultimately, I expect an array of objects, that look like the following, get sent in as part of the request body in a TMF 641 serviceOrder request. Am also considering if establishing a charactersticRelationShip between the two separate characteristics is sufficient:

    serviceCharacteristic: [
       { 
           name: tnToCPEPortMapping,
           value:  [
              {
                  tn: xxxx,
                  port:xxxx
              },
              {
                  tn: xxxx,
                  port:xxxx
               }
        },
        {
             name: someOtherCharactersticName,
             value: someStringValue
         }
    ]






  • 2.  RE: TMF 633 Characteristic valueType Object Array

    Posted 8 days ago

    Hi Jay

    You could try looking IG1163B_SID_Clarification_CharacterSpec_and_Value document (Section 3) for the use of characteristic relationship.

    That said, since you are only trying to group telephone number to port, then using an objectArrayCharacteristic is probably fine.  You need to add the @type metadata in the value though to discriminate the type of value accordingly.

    Hope this helps.  Good luck!



    ------------------------------
    Dan d'Albuquerque
    Individual
    ------------------------------



  • 3.  RE: TMF 633 Characteristic valueType Object Array

    TM Forum Member
    Posted 7 days ago

    Hi Jay,

    In the version 4 of the TMF633 API, you would use the valueType: "object" and specify the "valueSchemaLocation" property to link to a JSON schema defining your object.

    Something like that:

    {
        "configurable":  true,
        "description":  "TN to CPE port mapping",
        "maxCardinality":  XX,
        "minCardinality":  0,
        "name":  "tnToCPEPortMapping",
        "valueType":  "object",
        "@valueSchemaLocation":  "http://[hostname]/json-schemas/tnToCPEPortMapping-1.0.schema.json"        
    }
    maxCardinality: XX > 1 for a list
    minCardinality among other things control the optional/mandatory aspect of the characteristic
    So basically, the valueType holds the type of the value (if maxCardinality == 1) or value of the elements within the array (if maxCardinality > 1).
    If valueType is object, then you have to specify the valueSchemaLocation property.
    Translated to a TMF 638 characteristic, you would have indeed:
    { 
        "name": "tnToCPEPortMapping",
        "value": [
            {
                "tn": "xxxx",
                "port": "xxxx"
            },
            {
                "tn": "xxxx",
                "port": "xxxx"
            }
        ]
    } 

    Hope that helps,

    Best regards,



    ------------------------------
    Frederic Thise
    Proximus SA
    ------------------------------



  • 4.  RE: TMF 633 Characteristic valueType Object Array

    Posted 7 days ago

    I agree with Frederic and didn't want to reference TMF630 Part 2 Design Guidelines on polymorphism as the text alongside the example of implementing complex characteristics is misleading.

    2.2 Schema based extension for the Characteristic of an entity

    Assuming that Characteristic/CharacteristicSpec  pattern is used, the following example shows how we can extend an API at run time by adding simple or complex characteristics:

                  "resourceCharacteristic": [{

                                               "name": "physicalPort",

                                                     "valueType":"Object",

                                               "value": {

                                                              "@type": "PhysicalPort",

                                                                   "@schemaLocation": "http://host:port/schema/PhysicalPort.yml,

                                                              "name": "LAN Port",

                                                              "isActive": true,

                                               }

    An example, showing the Characteristic/CharacteristicSpec with the specification defining the complex characteristic definition and its associated payload when instantiating the entity would have made sense before providing an example for dynamic runtime extensions.



    ------------------------------
    Dan d'Albuquerque
    Individual
    ------------------------------