diff options
author | DylanB95EST <dylan.byrne@est.tech> | 2022-03-08 17:26:34 +0000 |
---|---|---|
committer | DylanB95EST <dylan.byrne@est.tech> | 2022-03-30 12:01:00 +0100 |
commit | 1839f38e054a958793ec40f524d911253086c74e (patch) | |
tree | 67895018797e6a1ea28f8a99ceb50547c66100c7 /cps-ncmp-rest/src | |
parent | a0bbcfd8de94bb433e787b1a6ee400c988975850 (diff) |
Additional validation for names/identifiers
Implementing additional regex validation for names/identifiers
in CPS
- Introduces a CpsValidator
- Applies to relevent java public API's
- Tests have been updated where necessary
Issue-ID: CPS-322
Change-Id: I29ab8820bb1fe0eee247e425d6bb018bcd38f28e
Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
Diffstat (limited to 'cps-ncmp-rest/src')
4 files changed, 5 insertions, 6 deletions
diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandlerSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandlerSpec.groovy index b642370154..77482d0795 100644 --- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandlerSpec.groovy +++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandlerSpec.groovy @@ -28,7 +28,6 @@ import org.onap.cps.TestUtils import org.onap.cps.ncmp.api.NetworkCmProxyDataService import org.onap.cps.ncmp.api.impl.exception.DmiRequestException import org.onap.cps.ncmp.api.impl.exception.ServerNcmpException -import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle import org.onap.cps.ncmp.rest.controller.NcmpRestInputMapper import org.onap.cps.spi.exceptions.CpsException import org.onap.cps.spi.exceptions.DataNodeNotFoundException diff --git a/cps-ncmp-rest/src/test/resources/dmi_registration_all_singing_and_dancing.json b/cps-ncmp-rest/src/test/resources/dmi_registration_all_singing_and_dancing.json index fd8b56b02d..c2a307db26 100644 --- a/cps-ncmp-rest/src/test/resources/dmi_registration_all_singing_and_dancing.json +++ b/cps-ncmp-rest/src/test/resources/dmi_registration_all_singing_and_dancing.json @@ -3,7 +3,7 @@ "dmiModelPlugin":"service3", "createdCmHandles":[ { - "cmHandle":"ch1(new)", + "cmHandle":"ch1-new", "cmHandleProperties":{ "dmiProp1":"ch1-dmi1", "dmiProp2":"ch1-dmi2" @@ -14,7 +14,7 @@ } }, { - "cmHandle":"ch2(new)", + "cmHandle":"ch2-new", "cmHandleProperties":{ "dmiProp1":"ch2-dmi1", "dmiProp2":"ch2-dmi2" @@ -27,7 +27,7 @@ ], "updatedCmHandles":[ { - "cmHandle":"ch3(upd)", + "cmHandle":"ch3-upd", "cmHandleProperties":{ "dmiProp1":"ch3-dmi1" }, diff --git a/cps-ncmp-rest/src/test/resources/dmi_registration_updates_only.json b/cps-ncmp-rest/src/test/resources/dmi_registration_updates_only.json index 58a1a9836b..26acdbdcbe 100644 --- a/cps-ncmp-rest/src/test/resources/dmi_registration_updates_only.json +++ b/cps-ncmp-rest/src/test/resources/dmi_registration_updates_only.json @@ -2,7 +2,7 @@ "dmiPlugin": "service1", "updatedCmHandles":[ { - "cmHandle":"ch3(upd)", + "cmHandle":"ch3-upd", "cmHandleProperties":{ "dmiProp1":"ch3-dmi1", "dmiProp2":null diff --git a/cps-ncmp-rest/src/test/resources/dmi_registration_without_properties.json b/cps-ncmp-rest/src/test/resources/dmi_registration_without_properties.json index 395c098d21..a5dd7b0aad 100644 --- a/cps-ncmp-rest/src/test/resources/dmi_registration_without_properties.json +++ b/cps-ncmp-rest/src/test/resources/dmi_registration_without_properties.json @@ -4,7 +4,7 @@ "dmiModelPlugin":"service3", "createdCmHandles":[ { - "cmHandle": "ch1(new)" + "cmHandle": "ch1-new" } ] } |