diff options
author | egernug <gerard.nugent@est.tech> | 2024-06-21 12:53:06 +0100 |
---|---|---|
committer | egernug <gerard.nugent@est.tech> | 2024-06-24 16:14:08 +0100 |
commit | 5e4eb8c3bd9886e4c3ee2089b54236a01a99566b (patch) | |
tree | 1f0870f83ea9a79c90ae34deffad8618000d144c /dmi-service/src/test/resources | |
parent | 92de0b14a9fca76ce2da53c9533c16d7c17eab5e (diff) |
Create module structure in DMI Plugin
To push the stub in to DMI Plugin the Plugin will need to be modulized akin to CPS/NCMP. This involves creating a new module in the repo and porting the packages in src into this module
Issue-ID: CPS-2284
Change-Id: Iffa4eded4e49c220891fe73c30ea3b2f12a9e66d
Signed-off-by: egernug <gerard.nugent@est.tech>
Diffstat (limited to 'dmi-service/src/test/resources')
10 files changed, 204 insertions, 0 deletions
diff --git a/dmi-service/src/test/resources/ModuleSchema.json b/dmi-service/src/test/resources/ModuleSchema.json new file mode 100644 index 00000000..50c67154 --- /dev/null +++ b/dmi-service/src/test/resources/ModuleSchema.json @@ -0,0 +1,15 @@ +{ + "ietf-netconf-monitoring:schemas": { + "schema": [ + { + "identifier": "example-identifier", + "version": "example-version", + "format": "example-format", + "namespace": "example:namespace", + "location": [ + "example-location" + ] + } + ] + } +}
\ No newline at end of file diff --git a/dmi-service/src/test/resources/application.yml b/dmi-service/src/test/resources/application.yml new file mode 100644 index 00000000..ddc2b45f --- /dev/null +++ b/dmi-service/src/test/resources/application.yml @@ -0,0 +1,79 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2021-2023 Nordix Foundation +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +rest: + api: + dmi-base-path: /dmi + +security: + permit-uri: /actuator/**,/swagger-ui/**,/swagger-resources/**,/v3/api-docs + auth: + username: cpsuser + password: cpsr0cks! + +sdnc: + baseUrl: http://test + topologyId: test-topology + auth: + username: test + password: test + +cps-core: + baseUrl: some url for cps + dmiRegistrationUrl: some registration url + auth: + username: some cps core user + password: some cps core password + +dmi: + service: + url: some url for the dmi service + avc: + subscription-topic: ncmp-dmi-cm-avc-subscription + subscription-response-topic: dmi-ncmp-cm-avc-subscription + +spring: + application: + name: ncmp-dmi-plugin + mvc: + pathmatch: + matching-strategy: ANT_PATH_MATCHER + kafka: + bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER} + security: + protocol: PLAINTEXT + producer: + key-serializer: org.apache.kafka.common.serialization.StringSerializer + value-serializer: io.cloudevents.kafka.CloudEventSerializer + client-id: ncmp-dmi-plugin + consumer: + group-id: ${NCMP_CONSUMER_GROUP_ID:ncmp-group} + key-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer + value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer + properties: + spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer + spring.deserializer.value.delegate.class: io.cloudevents.kafka.CloudEventDeserializer + spring.json.use.type.headers: false + +app: + ncmp: + async: + topic: ${NCMP_ASYNC_M2M_TOPIC:ncmp-async-m2m} + +logging: + format: json diff --git a/dmi-service/src/test/resources/cmNotificationSubscriptionCreationEvent.json b/dmi-service/src/test/resources/cmNotificationSubscriptionCreationEvent.json new file mode 100644 index 00000000..3b780976 --- /dev/null +++ b/dmi-service/src/test/resources/cmNotificationSubscriptionCreationEvent.json @@ -0,0 +1,43 @@ +{ + "data": { + "cmhandles": [ + { + "cmhandleId": "CMHandle1", + "private-properties": { + "prop1": "prop-value" + } + }, + { + "cmhandleId": "CMHandle2", + "private-properties": { + "prop-x": "prop-valuex", + "prop-p": "prop-valuep" + } + }, + { + "cmhandleId": "CMHandle3", + "private-properties": { + "prop-y": "prop-valuey" + } + } + ], + "predicates": [ + { + "targetFilter": [ + "CMHandle1", + "CMHandle2", + "CMHandle3" + ], + "scopeFilter": { + "datastore": "ncmp-datastore:passthrough-running", + "xpath-filter": [ + "//_3gpp-nr-nrm-gnbdufunction:GNBDUFunction/_3gpp-nr-nrm-nrcelldu:NRCellDU/", + "//_3gpp-nr-nrm-gnbcuupfunction:GNBCUUPFunction//", + "//_3gpp-nr-nrm-gnbcucpfunction:GNBCUCPFunction/_3gpp-nr-nrm-nrcelldu:NRCellCU//", + "//_3gpp-nr-nrm-nrsectorcarrier:NRSectorCarrier//" + ] + } + } + ] + } +}
\ No newline at end of file diff --git a/dmi-service/src/test/resources/createDataWithNormalChar.json b/dmi-service/src/test/resources/createDataWithNormalChar.json new file mode 100644 index 00000000..31cdf1c5 --- /dev/null +++ b/dmi-service/src/test/resources/createDataWithNormalChar.json @@ -0,0 +1,8 @@ +{ + "operation": "create", + "dataType": "application/json", + "data": "normal request body", + "cmHandleProperties": { + "some-property": "some-property-value" + } +}
\ No newline at end of file diff --git a/dmi-service/src/test/resources/createDataWithSpecialChar.json b/dmi-service/src/test/resources/createDataWithSpecialChar.json new file mode 100644 index 00000000..1e7622ee --- /dev/null +++ b/dmi-service/src/test/resources/createDataWithSpecialChar.json @@ -0,0 +1,8 @@ +{ + "operation": "create", + "dataType": "application/json", + "data": "data with quote \" and new line \n", + "cmHandleProperties": { + "some-property": "some-property-value" + } +}
\ No newline at end of file diff --git a/dmi-service/src/test/resources/deleteData.json b/dmi-service/src/test/resources/deleteData.json new file mode 100644 index 00000000..2233fa01 --- /dev/null +++ b/dmi-service/src/test/resources/deleteData.json @@ -0,0 +1,8 @@ +{ + "operation": "delete", + "dataType": "application/json", + "data": "normal request body", + "cmHandleProperties": { + "some-property": "some-property-value" + } +}
\ No newline at end of file diff --git a/dmi-service/src/test/resources/moduleResources.json b/dmi-service/src/test/resources/moduleResources.json new file mode 100644 index 00000000..23adfcba --- /dev/null +++ b/dmi-service/src/test/resources/moduleResources.json @@ -0,0 +1,18 @@ +{ + "data": { + "modules": [ + { + "name": "ietf-yang-library", + "revision": "2016-06-21" + }, + { + "name": "nc-notifications", + "revision": "2008-07-14" + } + ] + }, + "cmHandleProperties": { + "subsystemId": "system-001" + }, + "moduleSetTag": "module-set-tag1" +} diff --git a/dmi-service/src/test/resources/patchData.json b/dmi-service/src/test/resources/patchData.json new file mode 100644 index 00000000..e5466eaf --- /dev/null +++ b/dmi-service/src/test/resources/patchData.json @@ -0,0 +1,8 @@ +{ + "operation": "patch", + "dataType": "application/yang.patch+json", + "data": "normal request body", + "cmHandleProperties": { + "some-property": "some-property-value" + } +}
\ No newline at end of file diff --git a/dmi-service/src/test/resources/readData.json b/dmi-service/src/test/resources/readData.json new file mode 100644 index 00000000..53f6d2ed --- /dev/null +++ b/dmi-service/src/test/resources/readData.json @@ -0,0 +1,9 @@ +{ + "operation": "read", + "dataType": "application/json", + "data": "normal request body", + "cmHandleProperties": { + "some-property": "some-property-value" + }, + "moduleSetTag": "module-set-tag-example" +}
\ No newline at end of file diff --git a/dmi-service/src/test/resources/updateData.json b/dmi-service/src/test/resources/updateData.json new file mode 100644 index 00000000..7cbf4f0c --- /dev/null +++ b/dmi-service/src/test/resources/updateData.json @@ -0,0 +1,8 @@ +{ + "operation": "update", + "dataType": "application/json", + "data": "normal request body", + "cmHandleProperties": { + "some-property": "some-property-value" + } +}
\ No newline at end of file |