Open APIs

 View Only
  • 1.  TMF639 ResourceInventory and PATCH/DELETE

    Posted Jun 02, 2021 11:52
    Hi fellow tc guys,

    how would you suggest the PATCH/DELETE requests on resources should be implemented, when the resource id is not universally unique. The two requests don't seem to support a @type parameter either. So, how it is meant to be implemented?

    (In our organization the resource id is type-dependent.)

    Best regards,
    Daniel​​

    ------------------------------
    Daniel Rogowski
    NetCom BW
    ------------------------------


  • 2.  RE: TMF639 ResourceInventory and PATCH/DELETE

    TM Forum Member
    Posted Jun 02, 2021 12:15
    Hi Daniel
    The assumption in TMF Open APIs is that the id of an entity is globally unique. So there will be no two Customer entities with the same id, no two Resource entities with the same id, etc.
    We should distinguish between this technical id (shall we say database sequence or GUID) and the value of a (logical) resource (e.g. TN, IP address), this value should be unique within the same type of resource.
    Does it help?

    ------------------------------
    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.
    ------------------------------



  • 3.  RE: TMF639 ResourceInventory and PATCH/DELETE

    Posted Jun 03, 2021 03:01
    Hi Jonathan,

    thank you for your quick reply.

    We came up with the same idea you suggested. Additionally to our "internal primary keys" we added "external uuid's" to our entities. With the added value of looser coupling between both worlds.

    I was puzzled, because the TMF639 spec v. 4.0.1 on page 10 reads:

    "id    A string. Identifier of an instance of the resource. Required to be unique within the
    resource type. Used in URIs as the identifier for specific instances of a type"

    I interpret this as contradictory to what you wrote. Maybe this should be clarified in the next version.

    Best regards,
    Daniel​​​

    ------------------------------
    Daniel Rogowski
    NetCom BW
    ------------------------------



  • 4.  RE: TMF639 ResourceInventory and PATCH/DELETE

    TM Forum Member
    Posted Jun 03, 2021 03:16
    Thanks Daniel for pointing this out. The general guidance for ids in Open APIs is that they are technical (and immutable), and you should not infer business meaning from them. To quote from TMF630 design guidelines:
    • The ID MUST be canonicalized and MUST not be a business identifier.
    • The ID must be unique and immutable within the collection.
    Looping in @Thomas Braun, the lead for Resource Inventory TMF639, maybe a text correction needs to be made there.

    ------------------------------
    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.
    ------------------------------



  • 5.  RE: TMF639 ResourceInventory and PATCH/DELETE

    TM Forum Member
    Posted Jul 02, 2021 09:28
    Hi Jonathan

    Thanks for clarifying this.
    But I see a challenge here - most OSS implementations have business logical identifiers which would be unique to the inventory type.
    Even if as an application we do add some internal unique identifier; it would be difficult to extend the same to all other existing application.

    How do you suggest we should handle this in a brownfield environment where existing applications are using business keys and would want to integrate with a new application using the TMF Open API?

    ------------------------------
    Mandar Udawant
    Tech Mahindra Limited
    ------------------------------



  • 6.  RE: TMF639 ResourceInventory and PATCH/DELETE

    TM Forum Member
    Posted Jul 11, 2021 04:34
    Hi Mandar
    I don't have a magic solution here. If your business identifiers are unique within their entity domain, then I guess you'll have to use them. The real challenge is that the IDs must be immutable. Consider what happens if some consumer acquires an ID of an entity, and then the id changes. Or an adjacent entity has an entity ref to your entity (a.k.a. foreign key) and the ID changes.
    If the IDs are subject to change, the only workaround that I can think of is to build an isolation layer with ID translation table, this will store your real (business) IDs against technical immutable IDs. External consumers are not aware of your business IDs, only of the technical ID, and communicate via the isolation layer. If a business ID changes it, you update it in the translation table (you will of course need to know what the old ID was to locate the entry).
    Maybe others can think of alternative solutions.
    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.
    ------------------------------



  • 7.  RE: TMF639 ResourceInventory and PATCH/DELETE

    TM Forum Member
    Posted Jul 16, 2021 14:02
    Hi Jonathan

    Thanks for your reply.
    The business keys/IDs are immutable and we want to use the same. But the challenge here is the Patch Request does not support any Resource Type field - so how does the application request which entity or resourse type the request is for? Can I add the "@type": "Device" and "@baseType": "Resource" tags to the Patch Request to support this?


    ------------------------------
    Mandar Udawant
    Tech Mahindra Limited
    ------------------------------



  • 8.  RE: TMF639 ResourceInventory and PATCH/DELETE

    TM Forum Member
    Posted Jul 19, 2021 05:20
    Hi all,

    In general the id should be technical an immutable and the name field that exists can be a business identifier (which are not always immutable).

    I think it would be good if TMF gives further guidance on this.
    How about standardising on uuid format for id in all API ?
    How about a guidance for having an array of alternate names to collect the business keys of legacy applications on all entities?

    Regards

    ------------------------------
    Koen Peeters
    Ciminko Luxembourg
    ------------------------------



  • 9.  RE: TMF639 ResourceInventory and PATCH/DELETE

    TM Forum Member
    Posted Feb 08, 2022 06:02
    Edited by Anu Aulakh Feb 08, 2022 15:15
    Hi @Thomas Braun, @Vance Shipley

    Seeking clarification, in relation to the information shared by Koen that "name" field under Resource in the TMF639, is designed to hold the business identifier (e.g. IMEI number for a mobile handset). I can see from the conformance profile for TMF639 that resource.name is mandatory for POST request. Could you please confirm that this is in fact the case, i.e. resource.name is meant to hold the value (logical identifier) of the resource? 

    Thanks,
    Anu

    cc: @Radhika Desai

    ------------------------------
    Anu Aulakh
    Telstra Corporation
    ------------------------------



  • 10.  RE: TMF639 ResourceInventory and PATCH/DELETE

    TM Forum Member
    Posted Jul 19, 2021 14:40
    The ID (for PATCH, DELETE, GET) must be globally unique for the entity type. For the specific case of logical resource, you could perhaps create globally unique IDs by concatenating the resource type with the resource ID.
    Does that help?

    ------------------------------
    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.
    ------------------------------