...
6. External RAN NSSMF Simulator
Deployment Guide for External RAN NSSMF Simulator
1. Download:
git clone https://gerrit.onap.org/r/integration cd integration/test/mocks/ran-nssmf-simulator |
2. Environment Setup (Optional):
1) The default listening port of RESTful API is 8443, and you can set environment variable RAN_NSSMF_REST_PORT to change it, such as:
export RAN_NSSMF_REST_PORT=18443 |
2) The default username and password are in RanNssmfSimulator/etc/auth.json, and you can edit the file to change them or add new ones.
3. Install and Run:
There are two options to run the simulator:
Option 1. Directly run it in the current directory:
pip3 install -r requirements.txt python3 main.py |
Option 2. Install it using setuptools, and run it in any directory:
python3 setup.py install --user python3 -m RanNssmfSimulator.MainApp |
Register to ONAP ESR
1. Add an esr-thirdparty-sdnc to ESR:
Run command: |
---|
curl -s -k -u "AAI:AAI" -H "X-FromAppId: testApp" -H "X-TransactionId: 1001" -H "Content-Type: application/json" -H "Accept: application/json" -X PUT https://aai.onap:30233/aai/v20/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/sdnc-an-01 -d @sdnc-an-01.json |
...
Example of sdnc-an-01.json: |
---|
{ "thirdparty-sdnc-id": "sdnc-an-01" } |
2. Add an esr-system-info (RAN NSSMF) to ESR:
Run command: |
---|
curl -s -k -u "AAI:AAI" -H "X-FromAppId: testApp" -H "X-TransactionId: 1001" -H "Content-Type: application/json" -H "Accept: application/json" -X PUT https://aai.onap:30233/aai/v20/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/sdnc-an-01/esr-system-info-list/esr-system-info/nssmf-an-01 -d @nssmf-an-01.json |
...
Example of nssmf-an-01.json: |
---|
{ "esr-system-info-id": "nssmf-an-01", "type": "an", "vendor": "huawei", "system-type": "thirdparty-sdnc", "ip-address": "192.168.35.83", "port": "8443", "user-name": "admin", "password": "123456", "ssl-cacert": "test.ca" } |
Where, ip-address is the IP address or hostname which runs the External RAN NSSMF Simulator, port is the listening port of RESTful API of the simulator,
user-name and password are set in config file RanNssmfSimulator/etc/auth.json of the simulator.
7. External CORE NSSMF Simulator
Installation Steps:
There are two ways to run Core NSSMF simulator. One is to start via jar package(External Core NSSMF Simulator Use Guide) and the other is to start via docker-compose.
Start by docker-compose
This is the package:
View file | ||||
---|---|---|---|---|
|
1. Extract the downloaded cn-nssmf-simulator-docker-compose.tar.gz
tar xf cn-nssmf-simulator-docker-compose.tar.gz -C .
cd cn-nssmf-simulator-docker-compose
2. modify application.properties
# vi application.properties
server.port=11111
notifyurl=http://192.168.235.25:30472/v1/pm/notification
ftppath=sftp://root:oom@192.168.235.25:22/home/ubuntu/dcae/PM.tar.gz
fixeddelay=900000
#Configure the output files generated in docker.
filepath=/app/dcae
amffilepath=/app/dcae/AMF.xml.gz
upffilepath=/app/dcae/UPF.xml.gz
3. modify docker-compose.yml
# vi docker-compose.yml
version: '3'
services:
cn-simulator-docker-compose:
image: openjdk:8-jre-slim
container_name: cn-simulator-test-1
ports:
- "11111:11111"
restart: always
# mount the cn-nssmf-simulator-docker-compose directory of the host machine to the /app directory of the container
# If you need to modify the simulator's configuration file application.properties later,
# you can directly modify the host's cn-nssmf-simulator-docker-compose/application.properties to synchronize to the container
volumes:
- ./:/app
working_dir: /app
entrypoint: java -jar simulator-0.0.1-SNAPSHOT.jar
4. start up the application by running " docker-compose up"
Register to ONAP ESR
1. Add an esr-thirdparty-sdnc to ESR:
Run command: |
---|
curl -s -k -u "AAI:AAI" -H "X-FromAppId: testApp" -H "X-TransactionId: 1001" -H "Content-Type: application/json" -H "Accept: application/json" -X PUT https://aai.onap:30233/aai/v20/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/sdnc-cn-01 -d @sdnc-cn-01.json |
...
Example of sdnc-an-01.json: |
---|
{ "thirdparty-sdnc-id": "sdnc-cn-01" } |
2. Add an esr-system-info (RAN NSSMF) to ESR:
Run command: |
---|
curl -s -k -u "AAI:AAI" -H "X-FromAppId: testApp" -H "X-TransactionId: 1001" -H "Content-Type: application/json" -H "Accept: application/json" -X PUT https://aai.onap:30233/aai/v20/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/sdnc-an-01/esr-system-info-list/esr-system-info/nssmf-cn-01 -d @nssmf-cn-01.json |
...
Example of nssmf-cn-01.json: |
---|
{ "system-name": "E2E", } |
Where,
...
ip-address is
...
the
...
IP
...
address
...
or
...
hostname
...
which
...
runs
...
the
...
External
...
RAN
...
NSSMF
...
Simulator,
...
port is
...
the
...
listening
...
port
...
of
...
RESTful
...
API
...
of
...
the simulator.
9. ACTN Simulator
Refer ACTN Simulator User Guide to setup ACTN-simulator or follow the below steps to launch and initialize domain controllers,
Step 1. Fetch the simulator docker image
First, pull down the simulator image from public docker hub.
|
Step 2. Start the simulator container(s)
After compiling the pnc-simulator image locally or fetching the docker image from remote registry, execute the command below to start the container:
|
|
For demonstration purposes, two domain controllers are required, in our case we use 18181 as SERVER_PORT for domain1 and 18182 for domain2.
After starting the container, you should be able to verify the running container by:
|
Step 3. Initialize the simulator(s)
The simulator offers a set of administrative APIs which are designed for initialization and management purposes.
To initialize the simulator for each domain:
|
For demonstration purposes, two domain controllers are required, both need to be properly launched and initialized. The initialization payloads are attached below.
ESR Registration using AAI ESR Url:
Once a third-party controller is being registered in ONAP, a "Topology Discovery" operation need be triggered and the domain controller will be called in order to retrieve the topology. SDNC then, will store the topology in AAI. Please execute the below curl command for the ESR registration of initialized two domain controllers,
NOTE: Replace <simulator-ip> and <simulator-port> with the IP Address and port of initialized simulators.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
curl -k -X PUT "https://AAI:AAI@<worker-vmIp>:30233/aai/v23/external-system/esr-thirdparty-sdnc-list/esr-thirdparty-sdnc/ff9ef162-951d-4e14-9ce6-b4fa0adf896b" \
-H 'Accept: application/json' \
-H 'X-FromAppId: AAI' \
-H 'X-TransactionId: 1' \
-H 'Content-Type: application/json' \
-d '{
"thirdparty-sdnc-id":"ff9ef162-951d-4e14-9ce6-b4fa0adf896b",
"location": "edge",
"product-name": "TSDN",
"esr-system-info-list":{"esr-system-info":[{
"esr-system-info-id": "7c29b9df-feef-4fa7-b56d-3e39f5ef4a90",
"system-name": "sdnc2",
"vendor": "HUAWEI",
"type": "WAN",
"version": "v1.0",
"service-url": "http://<simulator-ip>:<simulator-port>",
"user-name": "onos",
"password": "rocks",
"system-type": "thirdparty_SDNC",
"protocol": "restconf"
}]}
}' |