Skip the temp-service-create if already exists 38/107338/3
authorBalagangadhar (Bala) Bathula <bb4341@att.com>
Tue, 8 Aug 2023 03:01:44 +0000 (23:01 -0400)
committerGilles Thouenon <gilles.thouenon@orange.com>
Thu, 17 Aug 2023 12:40:15 +0000 (14:40 +0200)
commitce58f21d0a025babe3b5076e24ea82802ebf9703
tree63e3c74e70e2e5b256d01c7bb872a1152e6050d2
parent7a69c663e959822ef9e579b4522a9fa98213afdc
Skip the temp-service-create if already exists

- If a temp-service with a commonId already exists in the
  data-store (temp-service-list), and if the temp-service-create
  is issued, then the controller should fail with an error
  message, indicating it already exists.
- Add code to check if the same commonId exists in the datastore
  and add a failed response.
- Add a new Junit test to check it

JIRA: TRNSPRTPCE-753
Signed-off-by: Balagangadhar (Bala) Bathula <bb4341@att.com>
Co-authored-by: Gilles Thouenon <gilles.thouenon@orange.com>
Change-Id: I9f425e9febd8820f3053ecd5dfdd14f8a66279c4
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImpl.java
servicehandler/src/test/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerImplTest.java