TM Forum Community

 View Only

Clarification on the Role of Relationships in ServiceSpecification (PARENT/CHILD)

  • 1.  Clarification on the Role of Relationships in ServiceSpecification (PARENT/CHILD)

    TM Forum Member
    Posted 26 days ago
    Edited by Ilyas Premji 26 days ago

    Hello everyone,

    I'm working on defining a ServiceSpecification and I have some doubts regarding the use of the role field within serviceSpecRelationship. According to the documentation, the role field can take values such as PARENT or CHILD, but it's not entirely clear whether this role represents the relationship from the perspective of the specification or the related entity.

    Here's a concrete example from my scenario:

    I am modeling a service specification for ADOM, which includes an aggregation relationship with another entity called DEVICE. In my current implementation, I have the following code:

    specification = ServiceSpecification(
        name=ServiceType.ADOM,
        version=VERSION,
        description="ADOM description",
        serviceSpecRelationship=[
            SpecificationRelationship(
                name=ServiceType.DEVICE,
                relationshipType=ServiceRelationshipType.AGGREGATION,
                role=ServiceRelationshipRole.PARENT,  # <--- This is where I’m uncertain
            ),
        ]
    )
    



    In this context, DEVICE is considered a "child" (subordinate) of ADOM. Based on this, my main doubt is whether the role should be set as PARENT or CHILD.

    1. PARENT: I am stating that the ADOM specification is the parent in the relationship (the ADOM specification aggregates DEVICE).
    2. CHILD: Should I instead declare that DEVICE is a "child," and therefore use CHILD to indicate that ADOM aggregates DEVICE?

    Main questions:

    • Should the value of the role field represent the point of view of the main specification (in this case, ADOM), or should it reflect the relationship from the perspective of the related entity (DEVICE)?
    • Could you provide examples or best practices to better understand how to configure this role correctly?

    Thank you in advance for your help! Any examples or clarifications would be greatly appreciated.


    #General

    ------------------------------
    Ignazio Corvino
    ------------------------------