diff options
author | Toine Siebelink <toine.siebelink@est.tech> | 2023-12-14 08:36:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2023-12-14 08:36:36 +0000 |
commit | 8e63d7b907bf8e94eacf283af435dfd27fe823ee (patch) | |
tree | 84c87623fa3c770e6eaf2eb2d705985ca2e9f2c9 /cps-ncmp-rest | |
parent | 541ed451d1257f6eb72517f33f470db53fdd7fb4 (diff) | |
parent | d8be9ef1d451f3e19c0c73752ad3d947e8baa9bd (diff) |
Merge "Modify cmHandle registration for alternateId"
Diffstat (limited to 'cps-ncmp-rest')
-rw-r--r-- | cps-ncmp-rest/docs/openapi/components.yaml | 3 | ||||
-rw-r--r-- | cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapperSpec.groovy | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/cps-ncmp-rest/docs/openapi/components.yaml b/cps-ncmp-rest/docs/openapi/components.yaml index 08f5f5bceb..3bee633900 100644 --- a/cps-ncmp-rest/docs/openapi/components.yaml +++ b/cps-ncmp-rest/docs/openapi/components.yaml @@ -140,6 +140,9 @@ components: type: string enum: [COMPLETE, NONE] example: "COMPLETE" + alternateId: + type: string + example: "my-alternate-id" RestCmHandleProperties: type: object additionalProperties: diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapperSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapperSpec.groovy index c4dd91e117..0bc0c1e553 100644 --- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapperSpec.groovy +++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NcmpRestInputMapperSpec.groovy @@ -41,7 +41,7 @@ class NcmpRestInputMapperSpec extends Specification { def 'Convert a created REST CM Handle Input to an NCMP Service CM Handle with #scenario'() { given: 'a rest cm handle input' def inputRestCmHandle = new RestInputCmHandle(cmHandle : 'example-id', cmHandleProperties: registrationDmiProperties, - publicCmHandleProperties: registrationPublicProperties, trustLevel: registrationTrustLevel) + publicCmHandleProperties: registrationPublicProperties, trustLevel: registrationTrustLevel, alternateId: 'my-alternate-id', moduleSetTag: 'my-module-set-tag') def restDmiPluginRegistration = new RestDmiPluginRegistration( createdCmHandles: [inputRestCmHandle]) when: 'to plugin dmi registration is called' @@ -54,6 +54,9 @@ class NcmpRestInputMapperSpec extends Specification { result.createdCmHandles[0].dmiProperties == mappedDmiProperties result.createdCmHandles[0].publicProperties == mappedPublicProperties result.createdCmHandles[0].registrationTrustLevel == mappedTrustLevel + and: 'alternate ID and module set tag converted correctly' + result.createdCmHandles[0].alternateId == 'my-alternate-id' + result.createdCmHandles[0].moduleSetTag == 'my-module-set-tag' where: 'the following parameters are used' scenario | registrationDmiProperties | registrationPublicProperties | registrationTrustLevel || mappedDmiProperties | mappedPublicProperties | mappedTrustLevel 'dmi and public properties' | ['Property-Example': 'example property'] | ['Public-Property-Example': 'public example property'] | 'COMPLETE' || ['Property-Example': 'example property'] | ['Public-Property-Example': 'public example property'] | TrustLevel.COMPLETE |