Open APIs

Expand all | Collapse all

[TMF653] Bug/Feature that ServiceTest.validFor is writeable

  • 1.  [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted Mar 05, 2021 01:54

    Hi Folks,

    I noticed that within the current TMF653-ServiceTest-v4.0.0.swagger.json the ServiceTest.validFor attribute is writeable thru ServiceTest_Create.validFor and ServiceTest_Update.validFor.
    The description states:

    The validity time for the test results

    Does that make sense? I would assume an API-Consumer should only read this attribute after the Service Test has been completed. Is this simply a minor error or is there a backstory to it?

    Cheers,

    Jan



    ------------------------------
    Jan Lemmermann
    OSS Lead Architect
    EWE TEL GmbH
    ------------------------------


  • 2.  RE: [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted Mar 05, 2021 08:29
    Service Test is led by @Johanne Mayer and @Ernie Bayha - they might be able to provide additional insights.
    As a general rule, however, I would advocate having as few restrictions as possible in an API model, the obvious ones such as that href and id are not patchable.
    The ability or not to update a specific field would be restricted using role-based access control.
    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.
    ------------------------------



  • 3.  RE: [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted Mar 09, 2021 01:55

    Thanks @Jonathan Goldberg makes sense if this is a general pattern.

    Maybe @Johanne Mayer or @Ernie Bayha can confirm that this is intentional.

    Regards,

    Jan​

    ​​

    ------------------------------
    Jan Lemmermann
    OSS Lead Architect
    EWE TEL GmbH
    ------------------------------



  • 4.  RE: [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted Mar 09, 2021 06:41
    Hi, I am working on some enhancements on TMF653 so I will look into it.

    Regards.... Johanne

    ------------------------------
    Johanne Mayer
    MayerConsult Inc
    ------------------------------



  • 5.  RE: [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted Mar 09, 2021 19:04
    Hi Jan,  I read your comment again to make certain I was not missing anything.  The ServiceTest.validFor attribute is provided for the create and update operations to provide the time that these test results will be considered valid.  Similar to a quote that is valid for a period of time some tests may be valid also for a period of time if the producer of the test knows that nothing will change in the next 24 hours for example.  The producer would provide the length of time the test would be valid for in the execution.  It could be used at the access level to test the speed or whatever other measure you want to test.

    If I missed understood your question just let me know.

    Regards... Johanne

    ------------------------------
    Johanne Mayer
    MayerConsult Inc
    ------------------------------



  • 6.  RE: [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted Aug 05, 2021 09:49
    Hi Johanne,

    Great to know that you are working on enhancements to TMF653. Currently it does not have a StateChange Event, which is needed to notify when the state of the Test is changed (like In-Progress, Complete etc.) Is it already being taken care of in your planned enhancements or I should create  a new Enhancement request for this?

    ------------------------------
    Kinshuk Kulshreshtha
    Oracle Corporation

    My views posted on this forum are personal, and do not reflect the position of my employer or TM Forum.
    ------------------------------



  • 7.  RE: [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted Mar 10, 2021 02:54

    Hi Johanne,

    thanks a lot for the feedback. I think for us the question came up because of our use case.

    System-A (API Consumer) wants to run a service test in System-B (TMF653 API Provider) and executes a CREATE of a /serviceTest.
    System-B executes the test and reports back in the service test with "validFor" how long the test results are valid. In our case System-B has this knowledge, because it executes the test.

    In our case the API Consumer can't specify the value, because it doesn't know the details about where the test result data comes from and how long they are valid.
    But I can also understand if the permission level is kept rather "open". You can still decide in the concrete implementation whether an API consumer can write the field.

    I hope this explains a little bit the background of my question :-)

    Regards,

    Jan



    ------------------------------
    Jan Lemmermann
    OSS Lead Architect
    EWE TEL GmbH
    ------------------------------



  • 8.  RE: [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted Aug 05, 2021 14:19
    Hi Kinshuk,

     We have these 6 notifications defined for this API

    Notifications related to ServiceTest:
        - ServiceTestCreateEvent
        - ServiceTestAttributeValueChangeEvent
        - ServiceTestDeleteEvent

    Notifications related to ServiceTestSpecification:
        - ServiceTestSpecificationCreateEvent
        - ServiceTestSpecificationAttributeValueChangeEvent
        - ServiceTestSpecificationDeleteEvent

    Why can't you use the ServiceTestAttributeValueChangeEvent for the state change?

    In v4.1 I have also added the suggested list of states in the state definition to align with the list of states used in the 7xx test APIs but could not make it an enumeration due to backward compatibility.

    see

    state

    A string. The actual state the service test is in. Recommended states are found in ExecutionStateType schema possible values include acknowledged, rejected, pending, inProgress, cancelled, completed and failed.


    Note that our Open API table is still pointing to the 4.0 version for the user guide rather than the 4.1 but I have reported the issue and it should get fixed shortly. @Alan Pope to let us know when the table is updated.

     ​

    ------------------------------
    Johanne Mayer
    MayerConsult Inc
    ------------------------------



  • 9.  RE: [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted Aug 06, 2021 01:32
    Edited by Kinshuk Kulshreshtha Aug 06, 2021 01:32
    Hi Johanne,

    Using ServiceTestAttributeValueChangeEvent for reporting State Changes is an option. But it goes against the pattern that we have for other TMF APIs. For the following APIs (and others), we already have the StateChangeEvent that is used to notify the change in state.

    TMF622 Product Order
    TMF641 Service Order
    TMF653 Resource Order
    TMF640 Service Activation and Configuration
    TMF702 Resource Activation and Configuration
    TMF644 Resource Function Activation


    I think the reason behind adding a separate event for state change is that the State is not just another attribute. It drives the lifecycle of the test and many external systems would be interested in receiving only the changes in state without bothering about the changes in other attributes during the course of the Test. That way those systems will not get bombarded with all attribute value change events that they are not interested in and can focus on only the lifecycle changes during the test cycle.

    I propose that we should use the same pattern all across and add ServiceTestStateChangeEvent for TMF653 Service Test API to have alignment across the board.


    ------------------------------
    Kinshuk Kulshreshtha
    Oracle Corporation

    My views posted on this forum are personal, and do not reflect the position of my employer or TM Forum.
    ------------------------------



  • 10.  RE: [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted Aug 06, 2021 11:41
    Hi Kinshuk,  I agree.  It makes sense to align with the other APIs.

    I have created a new JIra issue to track this issue AP-2820 and will see if I can add it in a 4.2 release or if I need to wait for 5.0 version.

    Regards.... Johanne

    ------------------------------
    Johanne Mayer
    MayerConsult Inc
    ------------------------------



  • 11.  RE: [TMF653] Bug/Feature that ServiceTest.validFor is writeable

    TM Forum Member
    Posted 29 days ago
    Hi Kinshuk, just to let you know that this additional notification has been added to TMF653 v4.2.  The updated swagger and user guide have been published on the Open API table.  I will close the JIRA issue.

    ------------------------------
    Johanne Mayer
    MayerConsult Inc
    ------------------------------