diff options
Diffstat (limited to 'sanitycheck/netconf')
-rw-r--r-- | sanitycheck/netconf/Makefile | 22 | ||||
-rw-r--r-- | sanitycheck/netconf/docker-compose.yml | 75 | ||||
-rw-r--r-- | sanitycheck/netconf/test_models/models-configuration.ini | 2 | ||||
-rw-r--r-- | sanitycheck/netconf/test_models/test-model.data.xml | 25 | ||||
-rw-r--r-- | sanitycheck/netconf/test_models/test-model.yang | 10 |
5 files changed, 134 insertions, 0 deletions
diff --git a/sanitycheck/netconf/Makefile b/sanitycheck/netconf/Makefile new file mode 100644 index 0000000..b880202 --- /dev/null +++ b/sanitycheck/netconf/Makefile @@ -0,0 +1,22 @@ +all: start + +.PHONY: start + +start: + @echo "##### Start NETCONF server with AVCN manager #####" + docker-compose up -d + @echo "##### DONE #####" + +stop: + @echo "##### Stop NETCONF server with AVCN manager #####" + docker-compose down + @echo "##### DONE #####" + +health-check: + @echo "##### NETCONF simulator Health check #####\n" + curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://localhost:6555/readiness + +change-config: + @echo "##### Trigger config change for model test-model #####" + curl -X POST http://localhost:6555/change_config/test-model -d @test_models/test-model.data.xml --header "Content-Type: application/xml" + @echo "\n##### DONE #####" diff --git a/sanitycheck/netconf/docker-compose.yml b/sanitycheck/netconf/docker-compose.yml new file mode 100644 index 0000000..6db483d --- /dev/null +++ b/sanitycheck/netconf/docker-compose.yml @@ -0,0 +1,75 @@ +version: '3.5' + +services: + +# +# Kafka + + zookeeper: + image: wurstmeister/zookeeper + ports: + - "2181:2181" + networks: + - nf-simulator-network + + kafka1: + image: wurstmeister/kafka:1.1.0 + ports: + - "9092:9092" + hostname: kafka1 + networks: + - nf-simulator-network + environment: + KAFKA_ADVERTISED_PORT: 9092 + KAFKA_ADVERTISED_HOST_NAME: kafka1 + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_CREATE_TOPICS: "config:1:1" + KAFKA_DELETE_RETENTION_MS: 604800000 + KAFKA_LOG_CLEANER_DELETE_RETENTION_MS: 604800000 + depends_on: + - zookeeper + +# +# NETCONF - server + + netconf-server: + container_name: netconf-server + image: onap/org.onap.integration.nfsimulator.netconfserver:latest + ports: + - "830:830" + - "6513:6513" + - "6555:6555" + volumes: + - ./test_models:/resources/models + networks: + - nf-simulator-network + depends_on: + - zookeeper + - kafka1 + +# +# AVCN - manager + avcn-manager: + image: onap/org.onap.integration.nfsimulator.avcnmanager:latest + ports: + - "9090:8080" + restart: on-failure + hostname: avcn-manager + networks: + - nf-simulator-network + environment: + REST_CLIENT_VES_ENDPOINT: https://sample1:sample1@ves:8443/eventListener/v7 + KAFKA_BOOTSTRAP_SERVERS: kafka1:9092 + KAFKA_SOURCE_TOPIC: config + KAFKA_APPLICATION_ID: avcn-manager + REST_CLIENT_PNFSIMULATOR_ENDPOINT: http://ves-client:5000/simulator/start + depends_on: + - zookeeper + - kafka1 + +# +# external network +networks: + nf-simulator-network: + external: + name: nf-simulator-network diff --git a/sanitycheck/netconf/test_models/models-configuration.ini b/sanitycheck/netconf/test_models/models-configuration.ini new file mode 100644 index 0000000..1fee0aa --- /dev/null +++ b/sanitycheck/netconf/test_models/models-configuration.ini @@ -0,0 +1,2 @@ +[SUBSCRIPTION] +models = test-model diff --git a/sanitycheck/netconf/test_models/test-model.data.xml b/sanitycheck/netconf/test_models/test-model.data.xml new file mode 100644 index 0000000..8f30188 --- /dev/null +++ b/sanitycheck/netconf/test_models/test-model.data.xml @@ -0,0 +1,25 @@ +<!-- + ============LICENSE_START======================================================= + Simulator + ================================================================================ + Copyright (C) 2021 Nokia. All rights reserved. + ================================================================================ + 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. + ============LICENSE_END========================================================= + --> + +<config xmlns="http://onap.org/test-model"> + <itemValue1>45</itemValue1> + <itemValue2>37</itemValue2> + <itemValue3>58</itemValue3> +</config> diff --git a/sanitycheck/netconf/test_models/test-model.yang b/sanitycheck/netconf/test_models/test-model.yang new file mode 100644 index 0000000..0f4e699 --- /dev/null +++ b/sanitycheck/netconf/test_models/test-model.yang @@ -0,0 +1,10 @@ +module test-model { + namespace "http://onap.org/test-model"; + prefix config; + container config { + config true; + leaf itemValue1 {type uint32;} + leaf itemValue2 {type uint32;} + leaf itemValue3 {type uint32;} + } +} |