Compare commits

...

12 Commits

Author SHA1 Message Date
Michael Dürre
d73b07475f pre-devcontainer-rebuild 2023-03-24 17:10:55 +00:00
Michael Dürre
d67c03a264 fix build script 2023-03-14 11:13:50 +00:00
Michael Dürre
c15e00f3e9 update integration solution for all VES messages 2023-03-14 11:13:31 +00:00
Michael Dürre
ccd46058c6 commiting all the changes so far; work in progress 2023-03-09 16:14:41 +00:00
Michael Dürre
7598c0cac7 add o1Config section to gnb.conf 2023-03-01 15:02:56 +00:00
Michael Dürre
c66eec2b7d [adrian] first commit to save status 2023-02-24 09:07:31 +00:00
Michael Dürre
a61e569cb2 add partially filled example for gnb 2023-02-14 07:24:12 +00:00
Michael Dürre
006aaaaa8d fix docker-compose for the gnb 2023-02-14 07:23:40 +00:00
Michael Dürre
9d8dad92b5 fix gnb docker build 2023-02-14 07:23:21 +00:00
Michael Dürre
bfab79924a add integration folder to test 2023-02-14 06:27:31 +00:00
Adrian Lita
3d26fc5146 added netconf dependencies and tried ubuntu22 with no success 2023-02-07 14:10:42 +01:00
Michael Dürre
7045fd089c add yang specs 2023-01-31 16:50:30 +00:00
90 changed files with 24087 additions and 3 deletions

5
.gitignore vendored
View File

@@ -22,3 +22,8 @@ tags
nfapi_nr_interface_scf
*.log
*.out
**/*_3gpp*.yang
**/specification/available-yangs
**/integration/dcae/externalRepo
/dev

View File

@@ -2429,6 +2429,13 @@ add_executable(nr-softmodem
${OPENAIR_DIR}/common/utils/lte/ue_power.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/common/utils/netconf/netconf_session.c
${OPENAIR_DIR}/common/utils/netconf/netconf.c
${OPENAIR_DIR}/common/utils/netconf/netconf_demos.c
${OPENAIR_DIR}/common/utils/netconf/o1config.c
${OPENAIR_DIR}/common/utils/netconf/utils.c
${OPENAIR_DIR}/common/utils/netconf/ves_demo_alarm.c
${OPENAIR_DIR}/common/utils/netconf/ves.c
${PHY_INTERFACE_DIR}/queue_t.c
${XFORMSINTERFACE_SOURCE}
${T_SOURCE}
@@ -2448,6 +2455,7 @@ target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPT
target_link_libraries(nr-softmodem PRIVATE ${LIB_LMS_LIBRARIES})
target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr-softmodem PRIVATE yang sysrepo curl)
add_dependencies( nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc)
@@ -2842,6 +2850,7 @@ if(OAI_NW_DRIVER_USE_NETLINK)
endif()
make_driver(ue_ip ${OPENAIR2_DIR}/NETWORK_DRIVER/UE_IP ${ue_ip_src})
#include (common/utils/netconf/netconf_CMakeLists.txt)
include (common/utils/telnetsrv/telnetsrv_CMakeLists.txt)
include(${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt)
include (${OPENAIR_DIR}/common/utils/websrv/websrv_CMakeLists.txt)

80
build-gnb-docker.sh Executable file
View File

@@ -0,0 +1,80 @@
#!/bin/bash
OSBASE="ubuntu22"
TIMESTAMP=$(date -u +'%Y%m%dT%H%M%SZ')
TIMESTAMP_TAG="$OSBASE-$TIMESTAMP"
BUILD_RAN_BASE="false"
BUILD_RAN_BUILD="false"
BUILD_RAN_DEV="false"
BUILD_RAN_GNB="false"
until [ -z "$1" ]
do
case "$1" in
--all)
BUILD_RAN_BASE="true"
BUILD_RAN_BUILD="true"
BUILD_RAN_DEV="true"
BUILD_RAN_GNB="true"
shift
;;
--base)
BUILD_RAN_BASE="true"
shift
;;
--build)
BUILD_RAN_BUILD="true"
shift
;;
--dev)
BUILD_RAN_DEV="true"
shift
;;
--gnb)
BUILD_RAN_GNB="true"
shift
;;
--no-cache)
NO_CACHE="--no-cache"
shift
;;
*)
shift
;;
esac
done
if ! $BUILD_RAN_BUILD && ! $BUILD_RAN_GNB && ! $BUILD_RAN_DEV && ! $BUILD_RAN_GNB; then
BUILD_RAN_BUILD="true"
BUILD_RAN_GNB="true"
fi
if $BUILD_RAN_BASE; then
docker build $NO_CACHE --target ran-base --tag ran-base:$OSBASE-latest --file docker/Dockerfile.base.$OSBASE .
if [ ! $? -eq 0 ]; then
exit 1
fi
fi
if $BUILD_RAN_BUILD; then
docker build $NO_CACHE --target ran-build --build-arg BASETAG=$OSBASE-latest --tag ran-build:$OSBASE-latest --file docker/Dockerfile.build.$OSBASE .
if [ ! $? -eq 0 ]; then
exit 1
fi
fi
if $BUILD_RAN_DEV; then
docker build $NO_CACHE --target ran-dev --build-arg BASETAG=$OSBASE-latest --tag ran-dev:$OSBASE-latest --file docker/Dockerfile.dev.$OSBASE .
if [ ! $? -eq 0 ]; then
exit 1
fi
fi
if $BUILD_RAN_GNB; then
docker build $NO_CACHE --target oai-gnb --build-arg BASETAG=$OSBASE-latest --tag oai-gnb:$OSBASE-latest --tag oai-gnb:$TIMESTAMP_TAG --file docker/Dockerfile.gNB.ubuntu22 .
if [ ! $? -eq 0 ]; then
exit 1
fi
fi

View File

@@ -0,0 +1,139 @@
# Netconf Server for O1 interface
## Specification
For this part please look into the [specification](../../../../specification/README.md) folder.
## Configuration
Example
```
o1Config :
{
nfNodeId = "gnb-test01";
netconfUsername = "netconf";
netconfPassword = "netconf!";
netconfPort = 58300;
netconfHost = "192.168.5.207";
vesUrl = "https://dcae-ves-collector:8443/eventListener/v7";
vesBasicAuthUsername = "sample1";
vesBasicAuthPassword = "sample1";
vesNfVendorName = "OpenAirInterface";
vesNfNamingCode = "OGNB";
vesOamIpv6 = "";
vesFtpServerPort = 21;
vesFtpServerListenAddress = "0.0.0.0";
vesFtpServerUrl = "ftp://netconfr:netconf@gnodeb01-test:21";
demoAlarmingInterval = 30;
};
```
Properties:
| property | type | mandatory | description |
| -------- | ---- | --------- | ----------- |
| nfNodeId | string |true | network function node-id to get mounted via netconf |
| netconfUsername | string | true | username to access netconf server(at the moment hardcoded)|
| netconfPassword | string | true | password to access netconf server(at the moment hardcoded)|
| netconfPort | uint_16 | true | port to listen on for netconf server(at the moment hardcoded to 830).|
| netconfHost | string | true | |
| vesUrl| string | false | url to send VES messages to. If not set, complete VES functionality is disabled |
| vesBasicAuthUsername| string | if vesUrl | basic auth username for the VES collector |
| vesBasicAuthPassword | string | if vesUrl | basic auth password for the VES collector |
| vesNfVendorName | string | if vesUrl | vendor name to be sent in the VES messages |
| vesNfNamingCode | string | if vesUrl | nfNamingCode to be sent in the VES messages |
| vesOamIpv6 | string | false | |
| vesFtpServerPort | uint_16 | false ||
| vesFtpServerListenAddress| string | false | |
| vesFtpServerUrl | string | false | |
| demoAlarmingInterval | unit_16| false | interval in seconds to send and clear a demo alarm sent via VES |
The VES functionality can be disabled by just not setting the ```vesUrl```. With this all of the ```vesXXX``` properties are obsolete.
## Software Architecture
```
|----------------------------------------------------------------------------------------------|
| OAI container | Netopeer2 server | | FTPes-server | |
| |--------------------| |------------------| |
| | | |
| | | |
| |--------------------| | |
| | sysrepo | | |
| | (datastore) | | |
| |--------------------| | |
| gnb.conf | | |
| | | | |
| ------------------------------------------------------------------------------------------ |
| | nr-softmodem | | | |
| | | | | |
| | read-oper- edit-config- | |
| | callbacks callbacks | |
| | ves-client | |
| | | |
| | | |
| | | |
| | | |
| | | |
|----------------------------------------------------------------------------------------------|
```
## Minimal Deployment Architecture
This picture is only showing the directly connected components to the OAI gNodeB. This is NOT a complete deployment since there a some more components needed to make everything work together.
```
smo-network-----|------------------------------------------------------------------------
| | |
|-------------------| |--------------------| |-----------------|
| SDNC | | VES-Collector | | FileCollector |
| | | | | |
|-------------------| |--------------------| |-----------------|
| | |
oam-network-----|-------------------------|----------------------|-------------------
| | |
|--------------------------------------------------------------------|
| | NETCONF-Server | | VES-Client | | FTPes-Server | |
| |----------------| |------------| |--------------| |
| |
| OAI gNodeB |
| |
|--------------------------------------------------------------------|
```
## Integration Deployment And Usage
for this documentation please check the [integration](../../../../integration/README.md) folder.
### PNF Registration
By starting up the gNodeB should automatically sends a pnfRegistration message to the VES-Collector. This message will be received by the SDNC and creates then a NETCONF connection between the itself and the device.
### PNF Alarming
If the ```demoAlarmingInterval``` is set, every n seconds there will be a alarm notification sent via VES to raise and clear the demoAlarm.
### PNF Performance Data
To transmit performance data to the ONAP system there is a ```file-ready``` event sent to the VES-Collector which contains the information of the file to transmit. The will be collected by the File-Collector via FTPes or SFTP.
For demo purpose we have now created a trigger inside which is sending such a file ready event. To do this you have to do the following steps.
* Open the ConfigApp with the gNodeB
```
http://localhost:8080/odlux/index.html#/configuration/{node-id}/_3gpp-common-managed-element:ManagedElement[OAI%20gNodeB]
```
* _3gpp-common-managed-element > Attributes
* click edit on the top right corner
* set the userLabel property to ```pmData``` and click save to trigger the ```file-ready``` event once.
* afterwards you have to reset it to ```disabled``` and back if you want to trigger it again
* up to now the file and its data is hardcoded. But it shows that the workflow is working

View File

@@ -0,0 +1,41 @@
#pragma once
// constants to set
#define MANAGED_ELEMENT_ID "OAI gNodeB"
#define MANAGED_ELEMENT_GNBDUFUNCTION_ID "OAI-DU"
#define MANAGED_ELEMENT_GNBCUCPFUNCTION_ID "OAI-CUCP"
#define MANAGED_ELEMENT_GNBCUUPFUNCTION_ID "OAI-CUUP"
#define MANAGED_ELEMENT_GNBDUFUNCTION_BWDUPLINK_NAME "Uplink"
#define MANAGED_ELEMENT_GNBDUFUNCTION_BWDDOWNLINK_NAME "Downlink"
// generated xpaths out of the constants
#define XPATH_MANAGED_ELEMENT_BASE1 "/_3gpp-common-managed-element:ManagedElement[id='" MANAGED_ELEMENT_ID
#define XPATH_MANAGED_ELEMENT_BASE XPATH_MANAGED_ELEMENT_BASE1 "']"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BASE1 XPATH_MANAGED_ELEMENT_BASE "/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BASE2 XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BASE1 MANAGED_ELEMENT_GNBDUFUNCTION_ID
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BASE XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BASE2 "']"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_BASE1 XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BASE "/_3gpp-nr-nrm-bwp:BWP[id='"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_BASE2 XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_BASE1 MANAGED_ELEMENT_GNBDUFUNCTION_BWDDOWNLINK_NAME
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_BASE XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_BASE2 "']"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_BASE XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_BASE "/attributes"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_BWPCONTEXT XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_BASE "/bwpContext"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_ISINITIALBWP XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_BASE "/isInitialBwp"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_SUBCARRIERSPACING XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_BASE "/subCarrierSpacing"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_CYCLICPREFIX XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_BASE "/cyclicPrefix"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_STARTRB XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_BASE "/startRB"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_NUMBEROFRBS XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPDOWNLINK_ATTRIBUTES_BASE "/numberOfRBs"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_BASE1 XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BASE "/_3gpp-nr-nrm-bwp:BWP[id='"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_BASE2 XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_BASE1 MANAGED_ELEMENT_GNBDUFUNCTION_BWDUPLINK_NAME
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_BASE XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_BASE2 "']"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_BASE XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_BASE "/attributes"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_BWPCONTEXT XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_BASE "/bwpContext"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_ISINITIALBWP XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_BASE "/isInitialBwp"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_SUBCARRIERSPACING XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_BASE "/subCarrierSpacing"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_CYCLICPREFIX XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_BASE "/cyclicPrefix"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_STARTRB XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_BASE "/startRB"
#define XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_NUMBEROFRBS XPATH_MANAGED_ELEMENT_GNBDUFUNCTION_BWPUPLINK_ATTRIBUTES_BASE "/numberOfRBs"

View File

@@ -0,0 +1,114 @@
#include "netconf.h"
#include "o1config.h"
#include "netconf_session.h"
#include "netconf_log.h"
#include "utils.h"
#include "ves.h"
#include "ves_demo_alarm.h"
int netconf_init(void) {
int rc = 0;
//get configuration
o1_config_t config = {0};
rc = o1_config_read(&config);
if(rc != 0) {
netconf_log_error("o1_config_read() failed");
goto failed;
}
o1_config_print(&config);
//init netconf
sr_log_stderr(SR_LL_WRN);
rc = netconf_session_init();
if(rc != 0) {
netconf_log_error("netconf_session_init() failed");
goto failed;
}
//init ves
if (o1_config_is_ves_enabled(&config)) {
ves_header_t data = {
hostname: get_hostname(),
nf_naming_code: config.ves_nf_naming_code,
nf_vendor_name: config.ves_nf_vendor_name,
pnf_id: config.netconf_node_id
};
ves_config_t ves_config = {
url: config.ves_url,
username: config.ves_basicauth_username,
password: config.ves_basicauth_password
};
rc = ves_init(&ves_config, &data);
free(data.hostname);
if(rc != 0) {
netconf_log_error("ves_init() failed");
goto failed;
}
ves_registration_data_t pnf_reg_data= {
pnf_username: config.netconf_username,
pnf_password: config.netconf_password,
pnf_ip_v4_address: config.netconf_host,
pnf_ip_v6_address: config.ves_oam_ipv6,
pnf_port: config.netconf_port,
mac_address: "12:34:56:78:90:AB", //TODO get it programatically
vendor: config.ves_nf_vendor_name,
model: "testModel",
type: "gNB",
is_tls: false
};
rc = ves_pnf_registration_execute(&pnf_reg_data);
if(rc != 0) {
netconf_log_error("ves_pnf_registration_execute() failed");
goto failed;
}
if(o1_config_is_demoalarming_enabled(&config)){
ves_demo_alarm_start(&config);
}
}
rc = netconf_disable_nacm(netconf_session_running);
if(rc != 0) {
netconf_log("netconf_disable_nacm() failed\n");
}
printf("netconf_demo_populate()...\n");
rc = netconf_demo_populate();
if(rc != 0) {
netconf_log_error("netconf_demo_subscribe_edit_change() failed");
}
printf("netconf_demo_subscribe_edit_change()...\n");
rc = netconf_demo_subscribe_edit_change();
if(rc != 0) {
netconf_log_error("netconf_demo_subscribe_edit_change() failed");
}
printf("netconf_demo_subscribe_operational()...\n");
rc = netconf_demo_subscribe_operational();
if(rc != 0) {
netconf_log_error("netconf_demo_subscribe_operational() failed");
}
o1_config_free(&config);
return 0;
failed:
ves_free();
o1_config_free(&config);
return 1;
}
int netconf_free(void) {
ves_free();
netconf_session_free();
return 0;
}

View File

@@ -0,0 +1,11 @@
#pragma once
#include <sysrepo.h>
int netconf_init(void);
int netconf_free(void);
int netconf_disable_nacm(sr_session_ctx_t *session);
int netconf_demo_populate(void);
int netconf_demo_subscribe_edit_change();
int netconf_demo_subscribe_operational();

View File

@@ -0,0 +1,38 @@
set(NETCONFROOT ${OPENAIR_DIR}/common/utils/netconf )
set(NETCONFROOTSRV_SOURCE
${NETCONFROOT}/netconf.c
${NETCONFROOT}/netconf_demos.c
${NETCONFROOT}/netconf_session.c
${NETCONFROOT}/o1config.c
${NETCONFROOT}/utils.c
${NETCONFROOT}/ves.c
)
add_library(netconfsrv MODULE ${NETCONFSRV_SOURCE} )
target_link_libraries(netconfsrv PRIVATE yang sysrepo )
foreach(NETCONFLIB enb gnb 4Gue 5Gue)
set(NETCONFLIB_SRCS "")
foreach(NETCONFLIB_ASRC measurements phycmd)
set(NETCONFLIB_SRC ${OPENAIR_DIR}/common/utils/netconfsrv/netconfsrv_${NETCONFLIB}_${NETCONFLIB_ASRC}.c)
if (EXISTS ${NETCONFLIB_SRC})
set( NETCONFLIB_SRCS "${NETCONFLIB_SRC};${NETCONFLIB_SRCS}")
endif()
endforeach()
if(NOT "${NETCONFLIB_SRCS}" STREQUAL "")
message("Add ${NETCONFLIB} specific telnet functions in libnetconfsrv_${NETCONFLIB}.so")
add_library(netconfsrv_${NETCONFLIB} MODULE ${NETCONFLIB_SRCS} )
add_dependencies(netconfsrv netconfsrv_${NETCONFLIB})
target_link_libraries(netconfsrv_${NETCONFLIB} PRIVATE asn1_nr_rrc asn1_lte_rrc)
install(TARGETS netconfsrv_${NETCONFLIB} DESTINATION bin)
else()
message("No specific netconf functions for ${NETCONFLIB}")
endif()
endforeach()
install(TARGETS netconfsrv DESTINATION bin)
if (EXISTS "${OPENAIR_CMAKE}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_CMAKE}/ran_build/build")
install(TARGETS netconfsrv DESTINATION ${OPENAIR_CMAKE}/ran_build/build)
endif (EXISTS "${OPENAIR_CMAKE}/ran_build/build" AND IS_DIRECTORY "${OPENAIR_CMAKE}/ran_build/build")

View File

@@ -0,0 +1,353 @@
#include "netconf.h"
#include "netconf_log.h"
#include "netconf_session.h"
#include "ves.h"
#include <sysrepo.h>
#include <libyang/libyang.h>
#include <stdint.h>
static int test_edit_callback(sr_session_ctx_t *session, uint32_t sub_id, const char *module_name, const char *xpath, sr_event_t event, uint32_t request_id, void *private_data);
static int test_oper_callback(sr_session_ctx_t *session, uint32_t sub_id, const char *module_name, const char *path, const char *request_xpath, uint32_t request_id, struct lyd_node **parent, void *private_data);
int netconf_disable_nacm(sr_session_ctx_t *session) {
#define IETF_NETCONF_ACM_ENABLE_NACM_SCHEMA_XPATH "/ietf-netconf-acm:nacm/enable-nacm"
#define IETF_NETCONF_ACM_GROUPS_SCHEMA_XPATH "/ietf-netconf-acm:nacm/groups"
#define IETF_NETCONF_ACM_RULE_LIST_SCHEMA_XPATH "/ietf-netconf-acm:nacm/rule-list"
int rc = 0;
rc = sr_set_item_str(session, IETF_NETCONF_ACM_ENABLE_NACM_SCHEMA_XPATH, "true", 0, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("sr_set_item_str() failed");
goto failed;
}
rc = sr_set_item_str(session, IETF_NETCONF_ACM_GROUPS_SCHEMA_XPATH"/group[name='sudo']/user-name", "netconf", 0, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("sr_set_item_str() failed");
goto failed;
}
rc = sr_set_item_str(session, IETF_NETCONF_ACM_RULE_LIST_SCHEMA_XPATH"[name='sudo-rules']/group", "sudo", 0, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("sr_set_item_str() failed");
goto failed;
}
rc = sr_set_item_str(session, IETF_NETCONF_ACM_RULE_LIST_SCHEMA_XPATH"[name='sudo-rules']/rule[name='allow-all-sudo']/module-name", "*", 0, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("sr_set_item_str() failed");
goto failed;
}
rc = sr_set_item_str(session, IETF_NETCONF_ACM_RULE_LIST_SCHEMA_XPATH"[name='sudo-rules']/rule[name='allow-all-sudo']/path", "/", 0, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("sr_set_item_str() failed");
goto failed;
}
rc = sr_set_item_str(session, IETF_NETCONF_ACM_RULE_LIST_SCHEMA_XPATH"[name='sudo-rules']/rule[name='allow-all-sudo']/access-operations", "*", 0, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("sr_set_item_str() failed");
goto failed;
}
rc = sr_set_item_str(session, IETF_NETCONF_ACM_RULE_LIST_SCHEMA_XPATH"[name='sudo-rules']/rule[name='allow-all-sudo']/action", "permit", 0, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("sr_set_item_str() failed");
goto failed;
}
rc = sr_set_item_str(session, IETF_NETCONF_ACM_RULE_LIST_SCHEMA_XPATH"[name='sudo-rules']/rule[name='allow-all-sudo']/comment", "Corresponds all the rules under the sudo group as defined in O-RAN.WG4.MP.0-v05.00", 0, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("sr_set_item_str() failed");
goto failed;
}
rc = sr_apply_changes(session, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("sr_apply_changes() failed");
goto failed;
}
return 0;
failed:
sr_discard_changes(session);
return 1;
}
int netconf_demo_populate(void) {
int rc = 0;
const char *list_running[] = {
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']",
0,
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']",
0,
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/attributes/vnfParametersList[vnfInstanceId='SDNR_NODE_ID']",
0,
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']",
0,
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/attributes/bwpContext",
"DL",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/attributes/isInitialBwp",
"INITIAL",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/attributes/subCarrierSpacing",
"60",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/attributes/cyclicPrefix",
"NORMAL",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/attributes/startRB",
"0",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/attributes/numberOfRBs",
"2",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/ThresholdMonitor[id='Threshold']",
0,
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/ThresholdMonitor[id='Threshold']/attributes/administrativeState",
"UNLOCKED",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']",
0,
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/attributes/bwpContext",
"UL",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/attributes/isInitialBwp",
"INITIAL",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/attributes/subCarrierSpacing",
"15",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/attributes/cyclicPrefix",
"EXTENDED",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/attributes/startRB",
"0",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/attributes/numberOfRBs",
"2",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/ThresholdMonitor[id='Threshold']",
0,
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/ThresholdMonitor[id='Threshold']/attributes/administrativeState",
"UNLOCKED",
//alarms
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/AlarmList[id='CUUP-alarms']",
0,
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/AlarmList[id='CUUP-alarms']/attributes/administrativeState",
"UNLOCKED",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/AlarmList[id='CUUP-alarms']/attributes/alarmRecords[alarmId='alarm-id-01']",
0,
//mandatory nodes
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/attributes/priorityLabel",
"5",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/attributes/priorityLabel",
"6",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/attributes/gNBId",
"7",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/attributes/gNBIdLength",
"23",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/attributes/gNBDUId",
"8",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/attributes/vnfParametersList[vnfInstanceId='SDNR_NODE_ID']/autoScalable",
"true",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/attributes/priorityLabel",
"9",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/attributes/priorityLabel",
"10",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/ThresholdMonitor[id='Threshold']/attributes/thresholdInfoList[idx='0']/thresholdLevel",
"12",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/ThresholdMonitor[id='Threshold']/attributes/thresholdInfoList[idx='0']/thresholdLevel",
"13",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/ThresholdMonitor[id='Threshold']/attributes/thresholdInfoList[idx='0']/thresholdDirection",
"UP",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/ThresholdMonitor[id='Threshold']/attributes/thresholdInfoList[idx='0']/thresholdDirection",
"UP",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/ThresholdMonitor[id='Threshold']/attributes/thresholdInfoList[idx='0']/thresholdValue",
"14",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/ThresholdMonitor[id='Threshold']/attributes/thresholdInfoList[idx='0']/thresholdValue",
"15",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Downlink']/ThresholdMonitor[id='Threshold']/attributes/monitorGranularityPeriod",
"16",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/_3gpp-nr-nrm-bwp:BWP[id='Uplink']/ThresholdMonitor[id='Threshold']/attributes/monitorGranularityPeriod",
"17",
0
};
const char *list_operational[] = {
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/_3gpp-nr-nrm-gnbdufunction:GNBDUFunction[id='OAI-DU']/attributes/rimRSReportConf[reportInterval='1000']/reportIndicator",
"DISABLED",
//alarms
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/AlarmList[id='CUUP-alarms']/attributes/operationalState",
"ENABLED",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/AlarmList[id='CUUP-alarms']/attributes/numOfAlarmRecords",
"1",
"/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/AlarmList[id='CUUP-alarms']/attributes/lastModification",
"2023-02-07T08:44:26.0Z",
0
};
const char **l = list_running;
while(*l) {
const char *xpath = *l;
const char *value = *(l + 1);
netconf_log("[config] populating %s with %s.. ", xpath, value);
rc = sr_set_item_str(netconf_session_running, xpath, value, 0, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("error on line %d", __LINE__);
}
l += 2;
}
rc = sr_apply_changes(netconf_session_running, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("error on sr_apply_changes line %d", __LINE__);
}
l = list_operational;
while(*l) {
const char *xpath = *l;
const char *value = *(l + 1);
netconf_log("[oper] populating %s with %s.. ", xpath, value);
rc = sr_set_item_str(netconf_session_operational, xpath, value, 0, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("error on line %d", __LINE__);
}
l += 2;
}
rc = sr_apply_changes(netconf_session_operational, 0);
if(rc != SR_ERR_OK) {
netconf_log_error("error on sr_apply_changes line %d", __LINE__);
}
return 0;
}
int netconf_demo_subscribe_edit_change() {
const char *xpath = "/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/attributes/userLabel";
int rc = sr_module_change_subscribe(netconf_session_running, "_3gpp-common-managed-element", xpath, test_edit_callback, NULL, 0, 0, &netconf_session_subscription);
if (rc != SR_ERR_OK) {
netconf_log_error("sr_module_change_subscribe() failed");
goto failed;
}
return 0;
failed:
return 1;
}
int netconf_demo_subscribe_operational() {
static uint32_t counter = 1;
const char *xpath = "/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/attributes";
int rc = sr_oper_get_subscribe(netconf_session_operational, "_3gpp-common-managed-element", xpath, test_oper_callback, &counter, SR_SUBSCR_DEFAULT, &netconf_session_subscription);
if(rc != SR_ERR_OK) {
netconf_log_error("sr_oper_get_subscribe() failed");
goto failed;
}
return 0;
failed:
return 1;
}
int test_edit_callback(sr_session_ctx_t *session, uint32_t sub_id, const char *module_name, const char *xpath, sr_event_t event, uint32_t request_id, void *private_data) {
sr_change_iter_t *it = NULL;
int rc = SR_ERR_OK;
char path[512];
sr_change_oper_t oper;
sr_val_t *old_value = NULL;
sr_val_t *new_value = NULL;
(void)sub_id;
(void)request_id;
(void)private_data;
if(event == SR_EV_CHANGE) {
if (xpath) {
sprintf(path, "%s//.", xpath);
}
else {
sprintf(path, "/%s:*//.", module_name);
}
rc = sr_get_changes_iter(session, path, &it);
if (rc != SR_ERR_OK) {
netconf_log_error("sr_get_changes_iter() failed");
goto failed;
}
while ((rc = sr_get_change_next(session, it, &oper, &old_value, &new_value)) == SR_ERR_OK) {
if((oper == SR_OP_CREATED) || (oper == SR_OP_MODIFIED)) {
if(strcmp("/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/attributes/userLabel", new_value->xpath) == 0) {
if(strcmp(new_value->data.string_val, "enabled") == 0) {
printf("enabled\n");
}
else if(strcmp(new_value->data.string_val, "disabled") == 0) {
printf("disabled\n");
}
else if(strstr(new_value->data.string_val, "pmData") == new_value->data.string_val) {
ves_file_ready_t pm_data = {
.expires_on = "2099-12-31T235959.0Z",
.filesize = 1234,
.filelocation = "/ftp/test.gz"
};
int rc = ves_pnf_pmdata_fileready_execute(&pm_data);
if(rc != 0) {
netconf_log_error("ves_pnf_pmdata_fileready_execute() failed");
}
}
else {
return SR_ERR_VALIDATION_FAILED;
}
}
}
sr_free_val(old_value);
sr_free_val(new_value);
}
sr_free_change_iter(it);
}
return SR_ERR_OK;
failed:
return SR_ERR_INTERNAL;
}
static int test_oper_callback(sr_session_ctx_t *session, uint32_t sub_id, const char *module_name, const char *path, const char *request_xpath, uint32_t request_id, struct lyd_node **parent, void *private_data) {
uint32_t *counter = private_data;
(void)session;
(void)sub_id;
(void)module_name;
(void)path;
(void)request_xpath;
(void)request_id;
const char *xpath = "/_3gpp-common-managed-element:ManagedElement[id='OAI gNodeB']/attributes/SupportedPerfMetricGroup/granularityPeriods";
char value[10];
sprintf(value, "%d", *counter);
struct lyd_node *node;
LY_ERR rc = lyd_new_path(*parent, 0, xpath, value, 0, &node);
if(rc != LY_SUCCESS) {
netconf_log_error("lyd_new_path() failed");
goto failed;
}
(*counter)++;
return SR_ERR_OK;
failed:
return SR_ERR_INTERNAL;
}

View File

@@ -0,0 +1,9 @@
#pragma once
#include <stdio.h>
// #define netconf_log_error(format, args...) fprintf(stderr, format, ## args);
#define netconf_log_error(format, ...) { fprintf(stderr, "\033[1;31m[err/:%5d]\033[0m ", __LINE__); fprintf(stderr, format, ##__VA_ARGS__); fprintf(stderr, "\n"); }
// #define netconf_log(format, args...) fprintf(stderr, format, ## args);
#define netconf_log(format, ...) { fprintf(stdout, "\033[1m[log/:%5d]\033[0m ", __LINE__); fprintf(stdout, format, ##__VA_ARGS__); fprintf(stdout, "\n"); }

View File

@@ -0,0 +1,62 @@
#include "netconf_session.h"
#include "netconf_log.h"
sr_conn_ctx_t *netconf_session_connection = 0;
sr_session_ctx_t *netconf_session_running = 0;
sr_session_ctx_t *netconf_session_operational = 0;
const struct ly_ctx *netconf_session_context = 0;
sr_subscription_ctx_t *netconf_session_subscription = 0;
int netconf_session_init(void) {
int rc = SR_ERR_OK;
/* connect to sysrepo */
rc = sr_connect(0, &netconf_session_connection);
if(SR_ERR_OK != rc) {
netconf_log_error("sr_connect failed");
goto netconf_session_init_cleanup;
}
/* start session */
rc = sr_session_start(netconf_session_connection, SR_DS_OPERATIONAL, &netconf_session_operational);
if (rc != SR_ERR_OK) {
netconf_log_error("sr_session_start operational failed");
goto netconf_session_init_cleanup;
}
rc = sr_session_start(netconf_session_connection, SR_DS_RUNNING, &netconf_session_running);
if (rc != SR_ERR_OK) {
netconf_log_error("sr_session_start running failed");
goto netconf_session_init_cleanup;
}
/* get context */
netconf_session_context = sr_acquire_context(netconf_session_connection);
if(netconf_session_context == 0) {
netconf_log_error("sr_acquire_context failed");
goto netconf_session_init_cleanup;
}
return 0;
netconf_session_init_cleanup:
return 1;
}
void netconf_session_free(void) {
if(netconf_session_subscription) {
sr_unsubscribe(netconf_session_subscription);
}
sr_release_context(netconf_session_connection);
sr_session_stop(netconf_session_operational);
sr_session_stop(netconf_session_running);
sr_disconnect(netconf_session_connection);
netconf_session_connection = 0;
netconf_session_running = 0;
netconf_session_operational = 0;
netconf_session_context = 0;
}

View File

@@ -0,0 +1,13 @@
#pragma once
#include <libyang/libyang.h>
#include <sysrepo.h>
extern sr_conn_ctx_t *netconf_session_connection;
extern sr_session_ctx_t *netconf_session_running;
extern sr_session_ctx_t *netconf_session_operational;
extern const struct ly_ctx *netconf_session_context;
extern sr_subscription_ctx_t *netconf_session_subscription;
int netconf_session_init(void);
void netconf_session_free(void);

View File

@@ -0,0 +1,111 @@
#include "o1config.h"
#include "netconf_log.h"
#include <common/utils/assertions.h>
#include <common/utils/LOG/log.h>
#define simOpt PARAMFLAG_NOFREE|PARAMFLAG_CMDLINE_NOPREFIXENABLED
#define simOptMandatory PARAMFLAG_NOFREE|PARAMFLAG_CMDLINE_NOPREFIXENABLED|PARAMFLAG_MANDATORY
static int o1_validate_config(o1_config_t* config);
int o1_config_read(o1_config_t* config) {
memset(config, 0, sizeof(o1_config_t));
paramdef_t o1config_params[] = {
{"nfNodeId", "nodeId for oam for ves mount package\n", simOpt, strptr:&config->netconf_node_id, defstrval:"gnb-test01", TYPE_STRING, 0 },
{"netconfUsername", "username for netconf interface\n", simOpt, strptr:&config->netconf_username, defstrval:"netconf", TYPE_STRING, 0 },
{"netconfPassword", "password for netconf interface\n", simOpt, strptr:&config->netconf_password, defstrval:"netconf!", TYPE_STRING, 0 },
{"netconfPort", "port on host device for netconf interface\n", simOpt, u16ptr:&(config->netconf_port), defuintval:830, TYPE_UINT16, 0 },
{"netconfHost", "ip address on host device for netconf interface\n", simOpt, strptr:&config->netconf_host, defstrval:"0.0.0.0", TYPE_STRING, 0 },
{"vesUrl", "ves endpoint url to send notifications to\n", simOpt, strptr:&config->ves_url, defstrval:"", TYPE_STRING, 0 },
{"vesBasicAuthUsername", "ves endpoint username to authorize\n", simOpt, strptr:&config->ves_basicauth_username, defstrval:"", TYPE_STRING, 0 },
{"vesBasicAuthPassword", "ves endpoint password to authorize\n", simOpt, strptr:&config->ves_basicauth_password, defstrval:"", TYPE_STRING, 0 },
{"vesNfVendorName", "vendor name information for ves packages\n", simOpt, strptr:&config->ves_nf_vendor_name, defstrval:"OAI", TYPE_STRING, 0 },
{"vesNfNamingCode", "naming code information for ves packages\n", simOpt, strptr:&config->ves_nf_naming_code, defstrval:"gNodeB", TYPE_STRING, 0 },
{"vesOamIpv6", "oam ipv6 information for ves mount package\n", simOpt, strptr:&config->ves_oam_ipv6, defstrval:"", TYPE_STRING, 0 },
{"vesFtpServerPort", "ftp server port to serve pm data\n", simOpt, u16ptr:&(config->ves_ftp_server_port), defuintval:21, TYPE_UINT16, 0 },
{"vesFtpServerListenAddress", "ftp listen address to serve pm data\n", simOpt, strptr:&config->ves_ftp_listen_addr, defstrval:"0.0.0.0", TYPE_STRING, 0 },
{"demoAlarmingInterval", "ves alarming interval in seconds for demoing alarms\n",simOpt, u16ptr:&(config->demo_alarming_interval), defuintval:0, TYPE_UINT16, 0 }
};
#if defined(USE_TEST_CONFIG)
(void)o1config_params; //unused
config->netconf_node_id = strdup("gnb-test01");
config->netconf_username = strdup("netconf");
config->netconf_password = strdup("netconf!");
config->netconf_port = 830;
config->netconf_host = strdup("192.168.2.3");
config->ves_url = strdup("https://192.168.5.207:8443/eventListener/v7");
config->ves_basicauth_username = strdup("sample1");
config->ves_basicauth_password = strdup("sample1");
config->ves_nf_vendor_name = strdup("OpenAirInterface");
config->ves_nf_naming_code = strdup("OGNB");
config->ves_oam_ipv6 = strdup("");
config->ves_ftp_server_port = 21;
config->ves_ftp_listen_addr = strdup("0.0.0.0");
config->demo_alarming_interval = 30;
#else
int ret = config_get(o1config_params, sizeof(o1config_params) / sizeof(paramdef_t), "o1Config");
AssertFatal(ret >= 0, "configuration load couldn't be performed");
#endif
return o1_validate_config(config);
}
void o1_config_free(o1_config_t* config) {
free(config->netconf_node_id);
free(config->netconf_username);
free(config->netconf_password);
free(config->netconf_host);
free(config->ves_url);
free(config->ves_basicauth_username);
free(config->ves_basicauth_password);
free(config->ves_nf_vendor_name);
free(config->ves_nf_naming_code);
free(config->ves_oam_ipv6);
free(config->ves_ftp_listen_addr);
}
void o1_config_print(o1_config_t *config) {
netconf_log("Printing config:");
netconf_log("netconf_node_id: %s", config->netconf_node_id);
netconf_log("netconf_username: %s", config->netconf_username);
netconf_log("netconf_password: %s", config->netconf_password);
netconf_log("netconf_port = %d", config->netconf_port);
netconf_log("netconf_host: %s", config->netconf_host);
netconf_log("ves_url: %s", config-> ves_url);
netconf_log("ves_username: %s", config-> ves_basicauth_username);
netconf_log("ves_password: %s", config-> ves_basicauth_password);
netconf_log("ves_nf_vendor_name: %s", config->ves_nf_vendor_name);
netconf_log("ves_nf_naming_code: %s", config->ves_nf_naming_code);
netconf_log("ves_oam_ipv6: %s", config->ves_oam_ipv6);
netconf_log("ves_ftp_server_port = %d", config->ves_ftp_server_port);
netconf_log("ves_ftp_listen_addr: %s", config->ves_ftp_listen_addr);
netconf_log("demo_alarming_interval: %d", config->demo_alarming_interval);
netconf_log("=======");
}
bool o1_config_is_ves_enabled(o1_config_t *config){
return ((config->ves_url) && (strlen(config->ves_url) > 0));
}
bool o1_config_is_demoalarming_enabled(o1_config_t *config) {
return (config->demo_alarming_interval > 0);
}
static int o1_validate_config(o1_config_t* config) {
if (config == NULL) {
return 1;
}
// TODO
if (o1_config_is_ves_enabled(config)) {
//verify vesNfNamingCode (has to be exactly 4 characters long)
}
else {
}
return 0;
}

View File

@@ -0,0 +1,29 @@
#pragma once
#include <common/config/config_userapi.h>
#include "common_lib.h"
typedef struct {
char *netconf_node_id;
char *netconf_username;
char *netconf_password;
uint16_t netconf_port;
char *netconf_host;
char *ves_url;
char *ves_basicauth_username;
char *ves_basicauth_password;
char *ves_nf_vendor_name;
char *ves_nf_naming_code;
char *ves_oam_ipv6;
uint16_t ves_ftp_server_port;
char *ves_ftp_listen_addr;
uint16_t demo_alarming_interval; //send demo alarms every n seconds
} o1_config_t;
int o1_config_read(o1_config_t* config);
void o1_config_free(o1_config_t* config);
void o1_config_print(o1_config_t *config);
bool o1_config_is_ves_enabled(o1_config_t *config);
bool o1_config_is_demoalarming_enabled(o1_config_t *config);

View File

@@ -0,0 +1,75 @@
#pragma once
#include <stdint.h>
#define MAND
#define RO
#define RW
#define KEY
typedef struct oai_alarmRecords_thresholdInfo {
RO MAND char *measurementType;
RO MAND char *direction;
RO char *thresholdLevel;
RO char *thresholdValue;
RO char *hysteresis;
} oai_alarmRecords_thresholdInfo_t;
typedef struct oai_alarmRecords {
RW KEY char *alarmId;
RO MAND char *objectInstance;
RO MAND char *notificationId; //int32_t
RO char *alarmRaisedTime; //yang:date-and-time
RO char *alarmChangedTime; //yang:date-and-time
RO char *alarmClearedTime; //yang:date-and-time
RO char *alarmType; //eventType
RO char *probableCause;
RO char *specificProblem;
RW char *perceivedSeverity; //severity-level
RO char *backedUpStatus;
RO char *backUpObject;
RO char *trendIndication;
RO oai_alarmRecords_thresholdInfo_t *thresholdInfo;
RO char *stateChangeDefinition;
RO char *monitoredAttributes;
RO char *proposedRepairActions;
RO char *additionalText;
// RO char *additionalInformation; <anydata>
RO char *rootCauseIndicator;
RO char *ackTime; //yang:date-and-time
RW char *ackUserId;
RW char *ackSystemId;
RW char *ackState;
RW char *clearUserId;
RW char *clearSystemId;
RO char *serviceUser;
RO char *serviceProvider;
RO char *securityAlarmDetector;
} oai_alarmRecords_t;
typedef struct oai_BWP_ThresholdMonitor {
RW KEY char *id;
RW struct attributes {
RW MAND char *bwpContext;
RW MAND char *isInitialBwp;
RW MAND char *subCarrierSpacing;
RW MAND char *cyclicPrefix;
RW MAND char *startRB;
RW MAND char *numberOfRBs;
};
} oai_BWP_ThresholdMonitor_t;
typedef struct oai_BWP {
RW KEY char *id;
RW struct attributes {
RW MAND char *bwpContext;
RW MAND char *isInitialBwp;
RW MAND char *subCarrierSpacing;
RW MAND char *cyclicPrefix;
RW MAND char *startRB;
RW MAND char *numberOfRBs;
};
RW oai_BWP_ThresholdMonitor_t *ThresholdMonitor;
} oai_BWP_t;

View File

@@ -0,0 +1,118 @@
#define _GNU_SOURCE
#include "utils.h"
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include "netconf_log.h"
long int get_microseconds_since_epoch(void) {
time_t t = time(0);
struct timeval tv;
long int useconds;
gettimeofday(&tv, 0);
useconds = t*1000000 + tv.tv_usec; //add the microseconds to the seconds
return useconds;
}
char *get_netconf_timestamp(void) {
time_t rawtime = time(0);
char *nctime = 0;
if (rawtime == -1) {
netconf_log_error("time() failed");
return 0;
}
else {
struct tm *ptm = gmtime(&rawtime);
if (ptm == 0) {
netconf_log_error("gmtime failed");
}
else {
asprintf(&nctime, "%04d-%02d-%02dT%02d:%02d:%02d.0Z", ptm->tm_year + 1900, ptm->tm_mon + 1,
ptm->tm_mday, ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
}
}
return nctime;
}
char *str_replace(const char *orig, const char *rep, const char *with) {
char *result; // the return string
const char *ins; // the next insert point
char *tmp; // varies
int len_rep; // length of rep (the string to remove)
int len_with; // length of with (the string to replace rep with)
int len_front; // distance between rep and end of last rep
int count; // number of replacements
// sanity checks and initialization
if(!orig || !rep) {
return 0;
}
len_rep = strlen(rep);
if(len_rep == 0) {
return 0; // empty rep causes infinite loop during count
}
if (!with) {
with = "";
}
len_with = strlen(with);
// count the number of replacements needed
ins = orig;
for(count = 0; (tmp = strstr(ins, rep)); ++count) {
ins = tmp + len_rep;
}
tmp = result = malloc(strlen(orig) + (len_with - len_rep) * count + 1);
if(!result) {
return 0;
}
// first time through the loop, all the variable are set correctly
// from here on,
// tmp points to the end of the result string
// ins points to the next occurrence of rep in orig
// orig points to the remainder of orig after "end of rep"
while(count--) {
ins = strstr(orig, rep);
len_front = ins - orig;
tmp = strncpy(tmp, orig, len_front) + len_front;
tmp = strcpy(tmp, with) + len_with;
orig += len_front + len_rep; // move to next "end of rep"
}
strcpy(tmp, orig);
return result;
}
char *str_replace_inplace(char *s, const char *rep, const char *with) {
char *ret = str_replace(s, rep, with);
free(s);
if(ret == 0) {
return 0;
}
return ret;
}
char *get_hostname(void) {
char hostname[1024];
hostname[1023] = '\0';
gethostname(hostname, 1023);
return strdup(hostname);
}
unsigned long int get_file_size(const char *filename) {
struct stat st;
stat(filename, &st);
return st.st_size;
}

View File

@@ -0,0 +1,8 @@
#pragma once
long int get_microseconds_since_epoch(void);
char *get_netconf_timestamp(void);
char *str_replace(const char *orig, const char *rep, const char *with);
char *str_replace_inplace(char *s, const char *rep, const char *with);
char *get_hostname(void);
unsigned long int get_file_size(const char *filename);

822
common/utils/netconf/ves.c Normal file
View File

@@ -0,0 +1,822 @@
#define _GNU_SOURCE
#include "ves.h"
#include "utils.h"
#include "netconf_log.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <curl/curl.h>
#define VES_COMMON_HEADER_TEMPLATE "\"commonEventHeader\": {\
\"domain\": \"@domain@\",\
\"eventId\": \"@domain@_@eventType@\",\
\"eventName\": \"@domain@_@eventType@\",\
\"eventType\": \"@eventType@\",\
\"sequence\": @seqId@,\
\"priority\": \"@priority@\",\
\"reportingEntityId\": \"\",\
\"reportingEntityName\": \"@controllerName@\",\
\"sourceId\": \"\",\
\"sourceName\": \"@pnfId@\",\
\"startEpochMicrosec\": @timestamp@,\
\"lastEpochMicrosec\": @timestamp@,\
\"nfNamingCode\": \"@nfNamingCode@\",\
\"nfVendorName\": \"@nfVendorName@\",\
\"timeZoneOffset\": \"+00:00\",\
\"version\": \"4.1\",\
\"vesEventListenerVersion\": \"7.2.1\",\
\"stndDefinedNamespace\": \"@stndDefinedNamespace@\",\
\"nfcNamingCode\": \"NFC\"\
}"
#define VES_PNF_REGISTRATION_TEMPLATE "\"pnfRegistrationFields\": {\
\"pnfRegistrationFieldsVersion\": \"2.1\",\
\"lastServiceDate\": \"2021-03-26\",\
\"macAddress\": \"@macAddress@\",\
\"manufactureDate\": \"2021-01-16\",\
\"modelNumber\": \"@model@\",\
\"oamV4IpAddress\": \"@oamIp@\",\
@ipv6FullDefine@\
\"serialNumber\": \"@vendor@-@type@-@oamIp@-@model@\",\
\"softwareVersion\": \"2.3.5\",\
\"unitFamily\": \"@vendor@-@type@\",\
\"unitType\": \"@type@\",\
\"vendorName\": \"@vendor@\",\
\"additionalFields\": {\
\"oamPort\": \"@port@\",\
\"protocol\": \"SSH\",\
\"username\": \"@username@\",\
\"password\": \"@password@\",\
\"reconnectOnChangedSchema\": \"false\",\
\"sleep-factor\": \"1.5\",\
\"tcpOnly\": \"false\",\
\"connectionTimeout\": \"20000\",\
\"maxConnectionAttempts\": \"100\",\
\"betweenAttemptsTimeout\": \"2000\",\
\"keepaliveDelay\": \"120\"\
}\
}"
#define VES_PNF_ALARMING_TEMPLATE_RAISE "\"stndDefinedFields\": {\
\"schemaReference\": \"https://forge.3gpp.org/rep/sa5/MnS/raw/Rel-18/OpenAPI/TS28532_FaultMnS.yaml#components/schemas/NotifyNewAlarm\",\
\"data\": {\
\"href\": \"href1\",\
\"notificationId\": @seqId@,\
\"notificationType\": \"notifyNewAlarm\",\
\"eventTime\": \"@eventTime@\",\
\"systemDN\": \"xyz\",\
\"alarmId\": \"@alarm@\",\
\"alarmType\": \"COMMUNICATIONS_ALARM\",\
\"probableCause\": \"@alarm@\",\
\"specificProblem\": \"@alarm@\",\
\"perceivedSeverity\": \"@severity@\",\
\"backedUpStatus\": true,\
\"backUpObject\": \"xyz\",\
\"trendIndication\": \"MORE_SEVERE\",\
\"thresholdInfo\": {\
\"observedMeasurement\": \"new\",\
\"observedValue\": 123.1\
},\
\"correlatedNotifications\": [],\
\"stateChangeDefinition\": [{ \"operational-state\": \"DISABLED\" }],\
\"monitoredAttributes\": {\
\"interface\": \"@interface@\"\
},\
\"proposedRepairActions\": \"Call the police!\",\
\"additionalText\": \"O-RAN Software Community OAM\",\
\"additionalInformation\": {\
\"eventTime\": \"@eventTime@\",\
\"equipType\": \"@type@\",\
\"vendor\": \"@vendor@\",\
\"model\": \"@model@\"\
},\
\"rootCauseIndicator\": false\
},\
\"stndDefinedFieldsVersion\": \"1.0\"\
}"
#define VES_PNF_ALARMING_TEMPLATE_CLEAR "\"stndDefinedFields\": {\
\"schemaReference\": \"https://forge.3gpp.org/rep/sa5/MnS/raw/Rel-18/OpenAPI/TS28532_FaultMnS.yaml#components/schemas/NotifyClearedAlarm\",\
\"data\": {\
\"href\": \"href1\",\
\"notificationId\": @seqId@,\
\"notificationType\": \"notifyNewAlarm\",\
\"eventTime\": \"@eventTime@\",\
\"systemDN\": \"xyz\",\
\"alarmId\": \"@alarm@\",\
\"alarmType\": \"COMMUNICATIONS_ALARM\",\
\"probableCause\": \"@alarm@\",\
\"perceivedSeverity\": \"@severity@\",\
\"clearUserId\": \"@vendor@\",\
\"clearSystemId\": \"@vendor@\"\
},\
\"stndDefinedFieldsVersion\": \"1.0\"\
}"
#define VES_FILE_READY_TEMPLATE "\"stndDefinedFields\": {\
\"schemaReference\": \"https://forge.3gpp.org/rep/sa5/MnS/raw/Rel-18/OpenAPI/TS28532_FileDataReportingMnS.yaml#components/schemas/NotifyFileReady\",\
\"data\": {\
\"href\": \"href1\",\
\"notificationId\": 0,\
\"notificationType\": \"notifyFileReady\",\
\"eventTime\": \"@eventTime@\",\
\"systemDN\": \"xyz\",\
\"fileInfoList\": [{\
\"fileLocation\": \"@fileLocation@\",\
\"fileSize\": @fileSize@,\
\"fileReadyTime\": \"@eventTime@\",\
\"fileExpirationTime\": \"@expTime@\",\
\"fileCompression\": \"no\",\
\"fileFormat\": \"xml\",\
\"fileDataType\": \"Performance\"\
}],\
\"additionalText\": \"Have fun!\"\
},\
\"stndDefinedFieldsVersion\": \"1.0\"\
}"
/*
#define VES_FILE_READY_TEMPLATE "\"notificationFields\": {\
\"changeIdentifier\": \"PM_MEAS_FILES\",\
\"changeType\": \"FileReady\",\
\"notificationFieldsVersion\": \"2.0\",\
\"arrayOfNamedHashMap\": [\
{\
\"name\": \"@filename@\",\
\"hashMap\": {\
\"location\": \"@fileLocation@\",\
\"compression\": \"gzip\",\
\"fileFormatType\": \"org.3GPP.32.435#measCollec\",\
\"fileFormatVersion\": \"V5\"\
}\
}\
]\
}"
*/
struct memory {
char *response;
size_t size;
};
static int ves_execute(char *priority, char *domain, char *event_type, char *stnd_defined_namespace, char* main_content);
static int ves_http_request(const char *url, const char *username, const char* password, const char *method, const char *send_data, int *response_code, char **recv_data);
static size_t curl_write_cb(void *data, size_t size, size_t nmemb, void *userp);
static int vsftp_daemon_init(void);
static int vsftp_daemon_deinit(void);
static int sftp_daemon_init(void);
static int sftp_daemon_deinit(void);
static ves_config_t ves_config = {0};
static int ves_seq_id = 0;
static char *ves_common_header = 0;
/**
* initialize ves component
* save config internally
* prepare ves common header as far as possible
*/
int ves_init(ves_config_t *config, ves_header_t *ves) {
if(ves_common_header) {
netconf_log_error("ves_init() already called");
goto failed;
}
ves_common_header = strdup(VES_COMMON_HEADER_TEMPLATE);
if(ves_common_header == 0) {
netconf_log_error("strdup() error");
goto failed;
}
ves_config.url = strdup(config->url);
ves_config.username = strdup(config->username);
ves_config.password = strdup(config->password);
if(!ves_config.url || !ves_config.username || !ves_config.password) {
netconf_log_error("strdup() error");
goto failed;
}
ves_common_header = str_replace_inplace(ves_common_header, "@controllerName@", ves->hostname);
if(ves_common_header == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
ves_common_header = str_replace_inplace(ves_common_header, "@pnfId@", ves->pnf_id);
if(ves_common_header == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
ves_common_header = str_replace_inplace(ves_common_header, "@nfNamingCode@", ves->nf_naming_code);
if(ves_common_header == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
ves_common_header = str_replace_inplace(ves_common_header, "@nfVendorName@", ves->nf_vendor_name);
if(ves_common_header == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
int rc = vsftp_daemon_init();
if(rc != 0) {
netconf_log_error("vsftp_daemon_init() failed");
goto failed;
}
// rc = sftp_daemon_init();
// if(rc != 0) {
// netconf_log_error("sftp_daemon_init() failed");
// goto failed;
// }
return 0;
failed:
ves_free();
return 1;
}
void ves_free() {
vsftp_daemon_deinit();
// sftp_daemon_deinit();
free(ves_common_header);
free(ves_config.url);
free(ves_config.username);
free(ves_config.password);
ves_seq_id = 0;
ves_common_header = 0;
memset(&ves_config, 0, sizeof(ves_config_t));
}
/**
* send ves pnfRegistration
*
*/
int ves_pnf_registration_execute(ves_registration_data_t *ves) {
char *content = strdup(VES_PNF_REGISTRATION_TEMPLATE);
if(content == 0) {
netconf_log_error("strdup() failed");
goto failed;
}
char *port = 0;
asprintf(&port, "%d",ves->pnf_port);
if(port == 0) {
netconf_log_error("asprintf() failed");
goto failed;
}
// fill template
content = str_replace_inplace(content, "@macAddress@", ves->mac_address);
if(content == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
content = str_replace_inplace(content, "@model@", ves->model);
if(content == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
content = str_replace_inplace(content, "@oamIp@", ves->pnf_ip_v4_address);
if(content == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
char *ipv6 = strdup("");
if(ipv6 == 0) {
netconf_log_error("strdup() failed");
goto failed;
}
if(ves->pnf_ip_v6_address && strlen(ves->pnf_ip_v6_address)) {
free(ipv6);
asprintf(&ipv6, "\"oamV6IpAddress\": \"%s\"", ves->pnf_ip_v6_address);
if(ipv6 == 0) {
netconf_log_error("asprintf() failed");
goto failed;
}
}
content = str_replace_inplace(content, "@ipv6FullDefine@", ipv6);
free(ipv6);
if(content == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
content = str_replace_inplace(content, "@vendor@", ves->vendor);
if(content == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
content = str_replace_inplace(content, "@type@", ves->type);
if(content == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
content = str_replace_inplace(content, "@port@", port);
if(content == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
content = str_replace_inplace(content, "@username@", ves->pnf_username);
if(content == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
content = str_replace_inplace(content, "@password@", ves->pnf_password);
if(content == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
int rc = ves_execute(PRIORITY_PNFREGISTRATION, DOMAIN_PNFREGISTRAION, EVENTTYPE_PNFREGISTRATION,
STNDDEF_NAMESPACE_NONE, content);
if(rc != 0) {
netconf_log_error("ves_execute() failed");
goto failed;
}
free(port);
free(content);
return 0;
failed:
free(port);
free(content);
return 1;
}
/**
* send ves pnf file ready event
*
*/
int ves_pnf_pmdata_fileready_execute(ves_file_ready_t* ves_data) {
char *content = strdup(VES_FILE_READY_TEMPLATE);
if(content == 0) {
netconf_log_error("strdup() failed");
goto failed;
}
char *filesize = 0;
asprintf(&filesize, "%lu", ves_data->filesize);
if(filesize == 0) {
netconf_log_error("asprintf() failed");
goto failed;
}
// fill template
content = str_replace_inplace(content, "@expTime@", ves_data->expires_on);
if(content == 0) {
netconf_log_error("str_replace_inplace failed");
goto failed;
}
content = str_replace_inplace(content, "@fileLocation@", ves_data->filelocation);
if(content == 0) {
netconf_log_error("str_replace_inplace failed");
goto failed;
}
content = str_replace_inplace(content, "@fileSize@", filesize);
if(content == 0) {
netconf_log_error("str_replace_inplace failed");
goto failed;
}
int rc = ves_execute(PRIORITY_PMDATA, DOMAIN_PMDATA, EVENTTYPE_PNFALARMING,
STNDDEF_NAMESPACE_NONE, content);
if(rc != 0) {
netconf_log_error("ves_execute() failed");
goto failed;
}
free(filesize);
free(content);
return 0;
failed:
free(filesize);
free(content);
return 1;
}
/**
* send ves pnf alarm
*
*/
int ves_pnf_alarm_execute(ves_alarm_t* ves_alarm) {
char *content;
char *timestamp = 0;
char *seq_id = 0;
if (strcmp(VES_ALARM_ALARMTYPE_NONALARM, ves_alarm->alarm_type) == 0) {
content = strdup(VES_PNF_ALARMING_TEMPLATE_CLEAR);
}
else {
content = strdup(VES_PNF_ALARMING_TEMPLATE_RAISE);
}
if(content == 0) {
netconf_log_error("strdup() failed");
goto failed;
}
// asprintf(&timestamp, "%lu", get_microseconds_since_epoch());
// if(timestamp == 0) {
// netconf_log_error("asprintf() failed");
// goto failed;
// }
timestamp = get_netconf_timestamp();
asprintf(&seq_id, "%d", ves_seq_id);
if(seq_id == 0) {
netconf_log_error("asprintf() failed");
goto failed;
}
content = str_replace_inplace(content, "@eventTime@", timestamp);
if(content == 0) {
netconf_log_error("str_replace_inplace failed");
goto failed;
}
content = str_replace_inplace(content, "@seqId@", seq_id);
if(content == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
content = str_replace_inplace(content, "@notificationId@", "");
if(content == 0) {
netconf_log_error("str_replace_inplace failed");
goto failed;
}
content = str_replace_inplace(content, "@alarm@", ves_alarm->alarm_name);
if(content == 0) {
netconf_log_error("str_replace_inplace failed");
goto failed;
}
content = str_replace_inplace(content, "@severity@", ves_alarm->severity);
if(content == 0) {
netconf_log_error("str_replace_inplace failed");
goto failed;
}
content = str_replace_inplace(content, "@type@", ves_alarm->alarm_type);
if(content == 0) {
netconf_log_error("str_replace_inplace failed");
goto failed;
}
content = str_replace_inplace(content, "@vendor@", ves_alarm->vendor);
if(content == 0) {
netconf_log_error("str_replace_inplace failed");
goto failed;
}
content = str_replace_inplace(content, "@model@", "");
if(content == 0) {
netconf_log_error("str_replace_inplace failed");
goto failed;
}
int rc = ves_execute(PRIORITY_PNFALARMING, DOMAIN_STNDDEFINED, EVENTTYPE_PNFALARMING,
STNDDEF_NAMESPACE_FAULT, content);
if(rc != 0) {
netconf_log_error("ves_execute() failed");
goto failed;
}
free(content);
return 0;
failed:
free(content);
return 1;
}
static int ves_execute(char *priority, char *domain, char *event_type, char *stnd_defined_namespace, char* main_content) {
char *timestamp = 0;
char *seq_id = 0;
char *post_data = 0;
char *header = 0;
asprintf(&timestamp, "%lu", get_microseconds_since_epoch());
if(timestamp == 0) {
netconf_log_error("asprintf() failed");
goto failed;
}
asprintf(&seq_id, "%d", ves_seq_id);
if(seq_id == 0) {
netconf_log_error("asprintf() failed");
goto failed;
}
//fill header
header = strdup(ves_common_header);
if(header == 0) {
netconf_log_error("strdup() failed");
goto failed;
}
header = str_replace_inplace(header, "@seqId@", seq_id);
if(header == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
header = str_replace_inplace(header, "@timestamp@", timestamp);
if(header == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
header = str_replace_inplace(header, "@priority@", priority);
if(header == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
header = str_replace_inplace(header, "@domain@", domain);
if(header == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
header = str_replace_inplace(header, "@eventType@", event_type);
if(header == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
header = str_replace_inplace(header, "@stndDefinedNamespace@", stnd_defined_namespace);
if(header == 0) {
netconf_log_error("str_replace_inplace() failed");
goto failed;
}
//append body
asprintf(&post_data,"{\"event\":{%s,%s}}", header, main_content);
if(post_data == 0) {
netconf_log_error("asprintf() failed");
goto failed;
}
//send request
int response_code;
char *response = 0;
int rc = ves_http_request(ves_config.url, ves_config.username, ves_config.password, "POST", post_data, &response_code, &response);
if(rc != 0) {
netconf_log_error("ves_http_request() failed");
goto failed;
}
netconf_log("response_code = %d", response_code);
if(response) {
netconf_log("response = %s", response);
}
free(response);
if(response_code > 399) {
netconf_log_error("failure http response code: %d", response_code);
goto failed;
}
ves_seq_id++;
free(timestamp);
free(seq_id);
free(post_data);
free(header);
return 0;
failed:
free(timestamp);
free(seq_id);
free(post_data);
free(header);
return 1;
}
static int ves_http_request(const char *url, const char *username, const char* password, const char *method, const char *send_data, int *response_code, char **recv_data) {
const char *send_data_good = send_data;
if(send_data_good == 0) {
send_data_good = "";
}
CURL *curl = curl_easy_init();
if(curl == 0) {
netconf_log_error("curl_easy_init() error");
goto failed;
}
// set curl options
struct curl_slist *header = 0;
header = curl_slist_append(header, "Content-Type: application/json");
if(!header) {
netconf_log_error("curl_slist_append() failed");
goto failed;
}
header = curl_slist_append(header, "Accept: application/json");
if(!header) {
netconf_log_error("curl_slist_append() failed");
goto failed;
}
header = curl_slist_append(header, "X-MinorVersion: 1");
if(!header) {
netconf_log_error("curl_slist_append() failed");
goto failed;
}
CURLcode res = CURLE_OK;
res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 1L); //seconds timeout for a connection
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_TIMEOUT, 1L); //seconds timeout for an operation
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_FRESH_CONNECT, 1L);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
// disable SSL verifications
res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYPEER, 0L);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_PROXY_SSL_VERIFYHOST, 0L);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, method);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_POSTFIELDS, send_data_good);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_URL, url);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
char *credentials = 0;
if((username) && (password)) {
asprintf(&credentials, "%s:%s", username, password);
if(credentials == 0) {
netconf_log_error("asprintf() failed");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_USERPWD, credentials);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
}
struct memory response_data = {0};
if(recv_data) {
res = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write_cb);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
res = curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&response_data);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_setopt() error");
goto failed;
}
}
netconf_log("%s-ing cURL to url=\"%s\" with body=\"%s\"... ", method, url, send_data_good);
res = curl_easy_perform(curl);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_perform() failed");
goto failed;
}
if(response_code) {
long http_rc;
res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_rc);
if(res != CURLE_OK) {
netconf_log_error("curl_easy_getinfo() failed");
goto failed;
}
*response_code = http_rc;
}
if(recv_data) {
*recv_data = response_data.response;
}
free(credentials);
curl_slist_free_all(header);
curl_easy_cleanup(curl);
return 0;
failed:
free(credentials);
curl_slist_free_all(header);
curl_easy_cleanup(curl);
return 1;
}
static size_t curl_write_cb(void *data, size_t size, size_t nmemb, void *userp) {
size_t realsize = size * nmemb;
struct memory *mem = (struct memory *)userp;
char *ptr = realloc(mem->response, mem->size + realsize + 1);
if(ptr == NULL) {
//TODO log_error("realloc failed\n");
return 0; /* out of memory! */
}
mem->response = ptr;
memcpy(&(mem->response[mem->size]), data, realsize);
mem->size += realsize;
mem->response[mem->size] = 0;
return realsize;
}
static int vsftp_daemon_init(void) {
return system("/usr/sbin/vsftpd &");
}
static int vsftp_daemon_deinit(void) {
return system("killall -9 vsftpd");
}
static int sftp_daemon_init(void) {
return system("/usr/sbin/sshd -D &");
}
static int sftp_daemon_deinit(void) {
return system("killall -9 sshd");
}

View File

@@ -0,0 +1,77 @@
#pragma once
#include <stdbool.h>
// common data
typedef struct ves_header {
char *hostname;
char *nf_naming_code;
char *nf_vendor_name;
char *pnf_id;
} ves_header_t;
// ves endpoint configuration
typedef struct ves_config {
char *url; // endpoint url e.g. https://10.20.30.40/enventlistener/v7
char *username; // basic auth username
char *password; // basic auth password
} ves_config_t;
//pnfRegistration data
typedef struct ves_registration_data {
char *pnf_username;
char *pnf_password;
char *pnf_ip_v4_address;
char *pnf_ip_v6_address;
int pnf_port;
char *mac_address;
char *vendor;
char *model;
char *type;
bool is_tls;
} ves_registration_data_t;
//
typedef struct ves_file_ready {
char *filename;
char *filelocation;
unsigned long int filesize;
char *expires_on;
} ves_file_ready_t;
//
typedef struct ves_alarm {
char *alarm_name;
char *severity;
char *alarm_type; //TODO: maybe we should think about enum
char *vendor;
char *model;
} ves_alarm_t;
#define DOMAIN_PNFREGISTRAION "pnfRegistration"
#define DOMAIN_PNFALARMING "fault"
#define DOMAIN_HEARTBEAT "heartbeat"
#define DOMAIN_PMDATA "measurement"
#define DOMAIN_STNDDEFINED "stndDefined"
#define EVENTTYPE_PNFREGISTRATION "EventType5G"
#define EVENTTYPE_PNFALARMING "O_RAN_COMPONENT_Alarms"
#define EVENTTYPE_PMDATA "Notification-gnb_Nokia-FileReady"
#define PRIORITY_PNFREGISTRATION "Low"
#define PRIORITY_PNFALARMING "Low"
#define PRIORITY_PMDATA "Low"
#define STNDDEF_NAMESPACE_FAULT "3GPP-FaultSupervision"
#define STNDDEF_NAMESPACE_NONE ""
#define VES_ALARM_SEVERITY_CLEARED "CLEARED"
#define VES_ALARM_ALARMTYPE_ALARM "ALARM"
#define VES_ALARM_ALARMTYPE_NONALARM "NON-ALARM"
int ves_init(ves_config_t *config, ves_header_t *header);
void ves_free();
int ves_pnf_registration_execute(ves_registration_data_t *data);
int ves_pnf_pmdata_fileready_execute(ves_file_ready_t* ves_data);
int ves_pnf_alarm_execute(ves_alarm_t* ves_alarm);

View File

@@ -0,0 +1,76 @@
#include "ves_demo_alarm.h"
#include "netconf_log.h"
#include "o1config.h"
#include "ves.h"
#include <pthread.h>
typedef struct ves_demo_alarm_params {
int interval;
} ves_demo_alarm_params_t;
static pthread_t ves_demo_alarm_thread;
static void *ves_demo_alarm_routine(void *arg);
int ves_demo_alarm_start(o1_config_t *config) {
ves_demo_alarm_params_t *params = (ves_demo_alarm_params_t *)malloc(sizeof(ves_demo_alarm_params_t));
if(params == 0) {
netconf_log_error("malloc failed");
goto failed;
}
params->interval = config->demo_alarming_interval;
int rc = pthread_create(&ves_demo_alarm_thread, 0, ves_demo_alarm_routine, params);
if(rc != 0) {
netconf_log_error("pthread_create() failed");
goto failed;
}
return 0;
failed:
free(params);
return 1;
}
static void *ves_demo_alarm_routine(void *arg) {
ves_demo_alarm_params_t *params = (ves_demo_alarm_params_t *)arg;
int alarm_type = 0;
while(1) {
sleep(params->interval);
alarm_type++;
if(alarm_type >= 2) {
alarm_type = 0;
}
ves_alarm_t alarm = {
.alarm_name = "demoAlarm",
.vendor = "highstreet",
.model = "oai"
};
if(alarm_type) {
netconf_log("set alarm");
alarm.severity = "MAJOR";
alarm.alarm_type = VES_ALARM_ALARMTYPE_ALARM;
}
else {
netconf_log("clear alarm");
alarm.severity = VES_ALARM_SEVERITY_CLEARED;
alarm.alarm_type = VES_ALARM_ALARMTYPE_NONALARM;
}
netconf_log("alarm");
int rc = ves_pnf_alarm_execute(&alarm);
if(rc != 0) {
netconf_log_error("ves_pnf_alarm_execute() failed");
}
}
free(arg);
return 0;
}

View File

@@ -0,0 +1,5 @@
#pragma once
#include "o1config.h"
int ves_demo_alarm_start(o1_config_t *config);

View File

@@ -42,6 +42,12 @@ RUN apt-get update && \
psmisc \
git \
xxd \
# libyang dependencies
libpcre2-dev \
# libssh dependencies
zlib1g-dev libssl-dev \
# netconf base dependencies
unzip openssl openssh-client \
# python3-pip for conf template generation
python3-pip && \
pip3 install --ignore-installed pyyaml

View File

@@ -0,0 +1,76 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
# *
# * 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.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 18.04
#
#---------------------------------------------------------------------
FROM ubuntu:22.04 AS ran-base
ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
ENV BUILD_UHD_FROM_SOURCE=True
ENV UHD_VERSION=4.3.0.0
RUN \
apt-get clean && \
cd /var/lib/apt && \
mv lists lists.old && \
mkdir -p lists/partial && \
apt-get clean
#install developers pkg/repo
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
#gcc needed for build_oai
build-essential \
psmisc \
git \
xxd \
# libyang dependencies
libpcre2-dev \
# libssh dependencies
zlib1g-dev libssl-dev \
# netconf base dependencies
unzip openssl openssh-client \
# python3-pip for conf template generation
python3-pip && \
pip3 install --ignore-installed pyyaml
# In some network environments, GIT proxy is required
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
#create the WORKDIR
WORKDIR /oai-ran
COPY . .
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libulfius-dev
#run build_oai -I to get the builder image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai -I -w USRP

View File

@@ -27,12 +27,24 @@
FROM ran-base:latest as ran-build
# run dependencies install for netconf
RUN ./docker/scripts/netconf_dep_install.sh
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
# get and install required YANG libraries
RUN \
cd /oai-ran/specification && \
./get-yangs.sh && \
./install-yangs.sh
WORKDIR /oai-ran
# build all targets so final targets can be created afterwards
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib all -w USRP --verbose-ci --noavx512 -c
# ./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib all -w USRP --verbose-ci --noavx512 -c
./build_oai --gNB -w USRP --build-lib telnetsrv --verbose-ci --noavx512 -c

View File

@@ -0,0 +1,50 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
# *
# * 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.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 18.04
#
#---------------------------------------------------------------------
ARG BASETAG="latest"
FROM ran-base:${BASETAG} as ran-build
# run dependencies install for netconf
RUN ./docker/scripts/netconf_dep_install.sh
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
# get and install required YANG libraries
RUN \
cd /oai-ran/specification && \
./get-yangs.sh && \
./install-yangs.sh
WORKDIR /oai-ran
# build all targets so final targets can be created afterwards
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
# ./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib all -w USRP --verbose-ci --noavx512 -c
./build_oai --gNB -w USRP --build-lib telnetsrv --verbose-ci --noavx512 -c

View File

@@ -0,0 +1,75 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
# *
# * 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.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 18.04
#
#---------------------------------------------------------------------
FROM ran-base:latest as ran-dev
# run dependencies install for netconf
RUN ./docker/scripts/netconf_dep_install.sh
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
# get and install required YANG libraries
RUN \
cd /oai-ran/specification && \
./get-yangs.sh && \
./install-yangs.sh
WORKDIR /oai-ran
# build all targets so final targets can be created afterwards
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log
# ./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib all -w USRP --verbose-ci --noavx512 -c
# ./build_oai --gNB -w USRP --build-lib telnetsrv --verbose-ci --noavx512 -c
# Add netconf user and configure access
RUN \
adduser netconf && \
echo "netconf:netconf!" | chpasswd && \
mkdir -p /home/netconf/.ssh
# # Initialize netopeer2
RUN \
/usr/local/share/netopeer2/merge_hostkey.sh && \
/usr/local/share/netopeer2/merge_config.sh
COPY docker/scripts/gnb_entrypoint.sh /opt/oai-gnb/bin/entrypoint.sh
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
#EXPOSE 22100/tcp # ?
#EXPOSE 36412/udp # S1C, SCTP/UDP
#EXPOSE 36422/udp # X2C, SCTP/UDP
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
# ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
# CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
WORKDIR /oai-ran/cmake_targets
CMD ["/bin/sh", "-c", "sleep infinity"]

View File

@@ -0,0 +1,109 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
# *
# * 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.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 18.04
#
#---------------------------------------------------------------------
ARG BASETAG="latest"
FROM ran-build:${BASETAG} AS gnb-build
FROM ran-base:${BASETAG} as ran-dev
RUN apt-get update && \
apt-get install --yes \
openssh-client \
vsftpd
# run dependencies install for netconf
RUN ./docker/scripts/netconf_dep_install.sh
RUN rm -Rf /oai-ran
WORKDIR /oai-ran
COPY . .
# get and install required YANG libraries
RUN \
cd /oai-ran/specification && \
./get-yangs.sh && \
./install-yangs.sh
WORKDIR /oai-ran
# build all targets so final targets can be created afterwards
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log
# ./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib all -w USRP --verbose-ci --noavx512 -c
# ./build_oai --gNB -w USRP --build-lib telnetsrv --build-lib --verbose-ci --noavx512 -c
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/
# Add netconf user and configure access
RUN \
adduser netconf && \
echo "netconf:netconf!" | chpasswd && \
mkdir -p /home/netconf/.ssh
### FTP and SFTP configuration
RUN \
mkdir /ftp && \
chown -R netconf:netconf /ftp && \
mkdir /var/run/vsftpd && \
mkdir /var/run/vsftpd/empty && \
mkdir /run/sshd && \
echo "Match User netconf\n ChrootDirectory /\n X11Forwarding no\n AllowTcpForwarding no\n ForceCommand internal-sftp -d /ftp" >> /etc/ssh/sshd_config
COPY docker/config/vsftpd.conf /etc/vsftpd.conf
COPY docker/config/vsftpd.userlist /etc/vsftpd.userlist
# # Initialize netopeer2
RUN \
/usr/local/share/netopeer2/merge_hostkey.sh && \
/usr/local/share/netopeer2/merge_config.sh
COPY docker/scripts/gnb_entrypoint.sh /opt/oai-gnb/bin/entrypoint.sh
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
#EXPOSE 22100/tcp # ?
#EXPOSE 36412/udp # S1C, SCTP/UDP
#EXPOSE 36422/udp # X2C, SCTP/UDP
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
# ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
# CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
WORKDIR /oai-ran/cmake_targets
CMD ["/bin/sh", "-c", "sleep infinity"]

View File

@@ -58,7 +58,10 @@ RUN apt-get update && \
python3 \
python3-six \
python3-requests \
libusb-1.0-0 && \
libusb-1.0-0 \
# libyang/sysrepo/netopeer2
libpcre2-8-0 \
openssh-client && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-gnb/bin
@@ -102,6 +105,43 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
WORKDIR /opt/oai-gnb/etc
COPY --from=gnb-build /oai-ran/docker/etc .
# Copy relevant netopeer/sysrepo files for gNB
COPY --from=gnb-build \
/usr/local/bin/yanglint \
/usr/local/bin/yangre \
/usr/local/bin/sysrepo-plugind \
/usr/local/bin/sysrepocfg \
/usr/local/bin/sysrepoctl \
/usr/local/bin/netopeer2-cli \
/usr/local/bin/
COPY --from=gnb-build /usr/local/sbin/netopeer2-server /usr/local/sbin/netopeer2-server
COPY --from=gnb-build \
/usr/local/lib/libnetconf2.so \
/usr/local/lib/libssh.so \
/usr/local/lib/libsysrepo.so \
/usr/local/lib/libyang.so \
/usr/local/lib/sysrepo-plugind/ \
/usr/local/lib/
RUN ldconfig
COPY --from=gnb-build /usr/local/share/yang /usr/local/share/yang
COPY --from=gnb-build /usr/local/share/netopeer2 /usr/local/share/netopeer2
COPY --from=gnb-build /etc/sysrepo /etc/sysrepo
# Add netconf user and configure access
RUN \
adduser netconf && \
echo "netconf:netconf!" | chpasswd && \
mkdir -p /home/netconf/.ssh
# # Initialize netopeer2
RUN \
/usr/local/share/netopeer2/merge_hostkey.sh && \
/usr/local/share/netopeer2/merge_config.sh
COPY docker/scripts/gnb_entrypoint.sh /opt/oai-gnb/bin/entrypoint.sh
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
#EXPOSE 22100/tcp # ?

View File

@@ -0,0 +1,173 @@
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
# *
# * 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.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu18.04
#
#---------------------------------------------------------------------
ARG BASETAG="latest"
FROM ran-base:${BASETAG} as gnb-base
FROM ran-build:${BASETAG} AS gnb-build
RUN python3 ./docker/scripts/generateTemplate.py ./docker/scripts/gnb_parameters.yaml && \
cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
#start from scratch for target executable
FROM ubuntu:22.04 as oai-gnb
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
software-properties-common \
procps \
libsctp1 \
tzdata \
libnettle8 \
libblas3 \
libatlas3-base \
libconfig9 \
openssl \
net-tools \
iperf \
iproute2 \
iputils-ping \
gdb \
python3 \
python3-six \
python3-requests \
libusb-1.0-0 \
# libyang/sysrepo/netopeer2
psmisc \
libpcre2-8-0 \
openssh-client \
vsftpd && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-softmodem \
/oai-ran/docker/scripts/entrypoint.sh \
./
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/liboai_eth_transpro.so \
/oai-ran/cmake_targets/ran_build/build/librfsimulator.so \
/oai-ran/cmake_targets/ran_build/build/liboai_usrpdevif.so \
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
/oai-ran/cmake_targets/ran_build/build/libparams_libconfig.so \
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
/oai-ran/cmake_targets/ran_build/build/libldpc.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \
/oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \
/oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \
/usr/local/lib/
# Now we are copying from builder-image the UHD files.
COPY --from=gnb-base /usr/local/bin/uhd_find_devices /usr/local/bin
COPY --from=gnb-base /usr/local/lib/libuhd.so.4.3.0 /usr/local/lib
COPY --from=gnb-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-gnb/bin
COPY --from=gnb-base \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
# Copy the relevant configuration files for gNB
WORKDIR /opt/oai-gnb/etc
COPY --from=gnb-build /oai-ran/docker/etc .
# Copy relevant netopeer/sysrepo files for gNB
COPY --from=gnb-build \
/usr/local/bin/yanglint \
/usr/local/bin/yangre \
/usr/local/bin/sysrepo-plugind \
/usr/local/bin/sysrepocfg \
/usr/local/bin/sysrepoctl \
/usr/local/bin/netopeer2-cli \
/usr/local/bin/
COPY --from=gnb-build /usr/local/sbin/netopeer2-server /usr/local/sbin/netopeer2-server
COPY --from=gnb-build \
/usr/local/lib/libcurl.so \
/usr/local/lib/libnetconf2.so \
/usr/local/lib/libssh.so \
/usr/local/lib/libsysrepo.so \
/usr/local/lib/libyang.so \
/usr/local/lib/sysrepo-plugind/ \
/usr/local/lib/
RUN ldconfig
COPY --from=gnb-build /usr/local/share/yang /usr/local/share/yang
COPY --from=gnb-build /usr/local/share/netopeer2 /usr/local/share/netopeer2
COPY --from=gnb-build /etc/sysrepo /etc/sysrepo
# Add netconf user and configure access
RUN \
adduser netconf && \
echo "netconf:netconf!" | chpasswd && \
mkdir -p /home/netconf/.ssh
### FTP and SFTP configuration
RUN \
mkdir /ftp && \
chown -R netconf:netconf /ftp && \
mkdir /var/run/vsftpd && \
mkdir /var/run/vsftpd/empty && \
mkdir /run/sshd && \
echo "Match User netconf\n ChrootDirectory /\n X11Forwarding no\n AllowTcpForwarding no\n ForceCommand internal-sftp -d /ftp" >> /etc/ssh/sshd_config
COPY docker/config/vsftpd.conf /etc/vsftpd.conf
COPY docker/config/vsftpd.userlist /etc/vsftpd.userlist
# # Initialize netopeer2
RUN \
/usr/local/share/netopeer2/merge_hostkey.sh && \
/usr/local/share/netopeer2/merge_config.sh
COPY docker/scripts/gnb_entrypoint.sh /opt/oai-gnb/bin/entrypoint.sh
WORKDIR /opt/oai-gnb
#EXPOSE 2152/udp # S1U, GTP/UDP
#EXPOSE 22100/tcp # ?
#EXPOSE 36412/udp # S1C, SCTP/UDP
#EXPOSE 36422/udp # X2C, SCTP/UDP
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]

View File

@@ -116,6 +116,7 @@ For example, the eNB:
```bash
docker build --target oai-enb --tag oai-enb:latest --file docker/Dockerfile.eNB.ubuntu18 .
docker build --target oai-gnb --tag oai-gnb:latest --file docker/Dockerfile.gNB.ubuntu22 .
```
After a while:

36
docker/config/vsftpd.conf Normal file
View File

@@ -0,0 +1,36 @@
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
pasv_enable=Yes
pasv_min_port=10000
pasv_max_port=11000
user_sub_token=$USER
local_root=/ftp
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
pasv_promiscuous=YES
allow_writeable_chroot=YES
# rsa_cert_file=/home/netconf/.ssh/melacon.server.crt
# rsa_private_key_file=/home/netconf/.ssh/melacon.server.key
# ssl_enable=YES
# allow_anon_ssl=NO
# force_local_data_ssl=YES
# force_local_logins_ssl=YES
# ssl_tlsv1=YES
# ssl_sslv2=NO
# ssl_sslv3=NO
# require_ssl_reuse=NO
# ssl_ciphers=HIGH

View File

@@ -0,0 +1 @@
netconf

View File

@@ -21,6 +21,7 @@ if [[ -v USE_VOLUMED_CONF ]]; then cp $PREFIX/etc/mounted.conf $PREFIX/etc/gnb.c
# Defualt Parameters
GNB_ID=${GNB_ID:-e00}
NSSAI_SD=${NSSAI_SD:-ffffff}
ENABLE_NETCONF=${ENABLE_NETCONF:-"false"}
# AMF_IP_ADDRESS can be amf ip address of amf fqdn
if [[ -v AMF_IP_ADDRESS ]] && [[ "${AMF_IP_ADDRESS}" =~ [a-zA-Z] ]] && [[ -z `getent hosts $AMF_IP_ADDRESS | awk '{print $1}'` ]]; then echo "not able to resolve AMF FQDN" && exit 1 ; fi
[[ -v AMF_IP_ADDRESS ]] && [[ "${AMF_IP_ADDRESS}" =~ [a-zA-Z] ]] && AMF_IP_ADDRESS=$(getent hosts $AMF_IP_ADDRESS | awk '{print $1}')
@@ -72,7 +73,19 @@ elif [[ -v USE_N3XX ]]; then
fi
# enable printing of stack traces on assert
export gdbStacks=1
export gdbStacks=0
if $ENABLE_NETCONF; then
echo "clearing shared memory for sysrepo"
rm -rf /dev/shm/sr*
if [ $? -eq 0 ]; then
echo "succeeded"
else
echo "failed"
fi
echo "=================================="
echo "== starting netconf server in background"
netopeer2-server -v2 -d &
fi
echo "=================================="
echo "== Starting gNB soft modem"
@@ -92,3 +105,4 @@ else
echo "$@"
exec "$@"
fi

View File

@@ -0,0 +1,78 @@
#!/bin/bash
INSTALL_PATH="/opt/dev/install"
# exit when any command fails
set -e
BUILD_MODE="Release"
# supress warnings from git
git config --global advice.detachedHead false
mkdir -p $INSTALL_PATH
# build and install libssh-dev
cd $INSTALL_PATH
git clone --single-branch --branch libssh-0.9.2 https://git.libssh.org/projects/libssh.git
cd $INSTALL_PATH/libssh
mkdir -p build
cd build
cmake -DWITH_EXAMPLES=OFF ..
make -j4
make install
ldconfig
# build and install libyang
cd $INSTALL_PATH
git clone --single-branch --branch v2.1.30 https://github.com/CESNET/libyang.git
cd $INSTALL_PATH/libyang
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE:String="$BUILD_MODE" -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_BUILD_TESTS=OFF ..
make -j4
make install
ldconfig
# build and install sysrepo
cd $INSTALL_PATH
git clone --single-branch --branch v2.2.36 https://github.com/sysrepo/sysrepo.git
cd $INSTALL_PATH/sysrepo
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE:String="$BUILD_MODE" -DGEN_LANGUAGE_BINDINGS=ON -DGEN_CPP_BINDINGS=ON -DGEN_PYTHON_BINDINGS=OFF -DENABLE_TESTS=OFF -DREPOSITORY_LOC:PATH=/etc/sysrepo -DREQUEST_TIMEOUT=60 -DOPER_DATA_PROVIDE_TIMEOUT=60 ..
make -j4
make install
ldconfig
# build and install libnetconf2
cd $INSTALL_PATH
git clone --single-branch --branch v2.1.28 https://github.com/CESNET/libnetconf2.git
cd $INSTALL_PATH/libnetconf2
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE:String="$BUILD_MODE" -DENABLE_BUILD_TESTS=OFF ..
make -j4
make install
ldconfig
# build and install netopeer2
cd $INSTALL_PATH
git clone --single-branch --branch v2.1.49 https://github.com/CESNET/netopeer2.git
cd $INSTALL_PATH/netopeer2
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE:String="$BUILD_MODE" -DGENERATE_HOSTKEY=OFF -DMERGE_LISTEN_CONFIG=OFF ..
make -j4
make install
# build and install cURL
cd $INSTALL_PATH
git clone --single-branch --branch curl-7_87_0 https://github.com/curl/curl.git
cd $INSTALL_PATH/curl
mkdir -p build
cd build
cmake -DBUILD_TESTING=OFF ..
make -j4
make install
ldconfig

View File

@@ -79,6 +79,8 @@ unsigned short config_frames[4] = {2,9,11,13};
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "nfapi/oai_integration/vendor_ext.h"
#include "common/utils/netconf/netconf.h"
pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
@@ -523,6 +525,10 @@ int main( int argc, char **argv ) {
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
}
//netconf
netconf_init();
set_softmodem_sighandler();
#ifdef DEBUG_CONSOLE
setvbuf(stdout, NULL, _IONBF, 0);
@@ -727,6 +733,7 @@ int main( int argc, char **argv ) {
}
logClean();
netconf_free();
printf("Bye.\n");
return 0;
}

29
integration/.env Normal file
View File

@@ -0,0 +1,29 @@
ADMIN_PASSWORD=admin
PUBPORT_SDNCWEB=8080
PUBPORT_VES=8443
SDNC_WEB_IMAGE=nexus3.onap.org:10001/onap/sdnc-web-image:2.4.2
#SDNC_IMAGE=nexus3.onap.org:10001/onap/sdnc-image:2.4.2
SDNC_IMAGE=hightec/sdnc-image:1.4.0-SNAPSHOT-20230213T025757Z
SDNRDB_IMAGE=docker.elastic.co/elasticsearch/elasticsearch-oss:7.9.3
VES_COLLECTOR_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.8.0
ZOOKEEPER_IMAGE=nexus3.onap.org:10001/onap/dmaap/zookeeper:6.0.3
KAFKA_IMAGE=nexus3.onap.org:10001/onap/dmaap/kafka111:1.0.4
DMAAP_IMAGE=nexus3.onap.org:10001/onap/dmaap/dmaap-mr:1.1.18
DMAAP_DR_DB_IMAGE=nexus3.onap.org:10001/mariadb:10.2.14
# dcae configs
PM_MAPPER_TARGET_CONFIG_PATH=/app-config/application_config.yaml
SOLUTION_DOMAIN=local
DCAE_VES_COLLECTOR_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.10.3
PM_MAPPER_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:latest
PM_MAPPER_TARGET_CONFIG_PATH=/app-config/application_config.yaml
## oh oh
DCAE_DFC_IMAGE=nexus3.onap.org:10003/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest
DCAE_DFC_TARGET_CONFIG_PATH=/app-config/application_config.yaml
DCAE_DFC_TARGET_SPRING_CONFIG=/opt/app/datafile/config/application.yaml
#dmaap config
DMAAP_DR_NODE_IMAGE=nexus3.onap.org:10001/onap/dmaap/datarouter-node:2.1.11
DMAAP_DR_PROV_IP_IMAGE=nexus3.onap.org:10001/onap/dmaap/datarouter-prov:2.1.11
DMAAP_KAFKA_IMAGE=nexus3.onap.org:10001/onap/dmaap/kafka111:1.0.4
DMAAP_MR_IMAGE=nexus3.onap.org:10001/onap/dmaap/dmaap-mr:1.1.18
DMAAP_ZOOKEEPER_IMAGE=nexus3.onap.org:10001/onap/dmaap/zookeeper:6.0.3

120
integration/README.md Normal file
View File

@@ -0,0 +1,120 @@
# Integration
## How to build gNodeB image
We created a script which is doing the same as the instructions inside of the docker folder.
```
./build-gnb-docker.sh --base --build --gnb
```
If the base is already created once, only ```--build``` and ```--gnb``` args are neccessary.
## How to run
### Prerequisites
* docker (sudo apt install docker.io)
* docker-compose (pip3 install docker-compose)
### Start SDN-Controller and its components
* edit ```.env``` file to set image versions and public available ports
* run cmd:
```
docker-compose up -d
```
### Start gNodeB
```
docker-compose -f docker-compose.gnb.yml up -d
```
depending on if VES is configured or not you have to mount the device manually.
### Go to ODLUX gui
* Open URL in the browser: http://your-deployed-ip-address:8181
* login with credentials defined in .env file (default: admin:admin)
* find out ip address of the gnodeb container (```docker inspect gnodeb01-test | grep -i ipaddress)
* mount the device in the connectApp
* node-id: whatever you like
* host: ip address you found out
* port: 830
* username: netconf
* password: netconf!
* now the node should get into the connected state
## Using ODLUX Gui
By default this is available on ```http://localhost:8080```. Default user credentials are username ```admin``` and password ```admin```. The password is configured in the .env file ```ADMIN_PASSWORD```.
On an already started OAI gNodeB you should already see the an entry in the ConnectApp in state ```Connected```. The node-id is corresponding with the gnb.conf of the device. By right-click on it you can see in the context menu ```Info``` all the supported yang specifications, this device is supporting.
If the gnb.conf property ```demoAlarmingInterval``` is set, you should also see an alarm inside of the FaultApp. There you have also a tab ```Alarm Log``` which shows the complete history of incoming alarms into the SDNC.
HINT: If you want to see Notifications as they are coming into the SDNC you have to enable Notifications. Therefore you have to click on your username on the top right corner and then go to settings. There you can enable and disable it. It is disabled by default to prevent flooding the browser with incoming messages, which can cause some instability.
In the ConfigurationApp you are able to read and write configuration from and to the device. Sadly up to now there is a bug in the opendaylight project which is preventing to access a List of objects in the root structure, which is the way 3GPP has designed their Models. Since we are just implementing one root element this list has now the size of one, we have to access this by url and cannot click through from beginning.
```
http://localhost:8080/odlux/index.html#/configuration/{node-id}/_3gpp-common-managed-element:ManagedElement[OAI%20gNodeB]
```
But from there on you have access to all the containers and leafs inside.
## Troubleshooting
### Node does not get into connected state
* check if the gnodeb container is running
* get inside of the gnodeb container and check if the netopeer2 server is running
```
docker exec -ti gnodeb-test bash
ps -ef | grep netopeer
```
* check if exceptions are thrown inside of the SDN-Controller
```
docker exec -ti sdnc bash
less /opt/opendaylight/data/log/karaf.log
go to the end of the log (SHIFT+G) and then upwards to search for exceptions/stacktraces (e.g. wrong username or password)
```
### Node does not even show up after started up
* check the gnb.conf if ```vesUrl``` is correct
* check the VES-Collector if message is coming in
```
$ docker logs -f dcae-ves-collector
```
* there should be a log with something like
```
2023-03-20 13:12:59.697 INFO 28 [nio-8443-exec-5] o.o.d.c.p.MessageRouterHttpStatusMapper : Successfully send event to MR
```
* if not please check the gnb logs
* if yes please make sure that all components of the docker-compose.yml are up running
```
$ docker-compose ps -a
Name Command State Ports
-------------------------------------------------------------------------------------------------------------------------
dcae-dfc java -jar /opt/app/datafil ... Up 8100/tcp, 8433/tcp
dcae-pm-mapper java -jar pm-mapper-1.10.0.jar Up
dcae-ves-collector /bin/sh -c bin/docker-entry.sh Up 8080/tcp, 8443/tcp
dmaap-dr-mariadb docker-entrypoint.sh mysqld Up (healthy) 3306/tcp
dmaap-dr-node sh startup.sh Up 8080/tcp, 8443/tcp
dmaap-dr-prov sh startup.sh Up (healthy) 8080/tcp, 8443/tcp
dmaap-kafka /etc/confluent/docker/run Up 9092/tcp, 9093/tcp
dmaap-message-router sh startup.sh Up 3904/tcp, 3905/tcp
dmaap-zookeeper /etc/confluent/docker/run Up 2181/tcp, 2888/tcp, 3888/tcp
sdnc /bin/sh -c /opt/onap/sdnc/ ... Up 1090/tcp, 1099/tcp, 8181/tcp
sdnc-web /opt/bitnami/scripts/nginx ... Up 0.0.0.0:8080->8080/tcp,:::8080->8080/tcp, 8443/tcp
sdnrdb /tini -- /usr/local/bin/do ... Up 9200/tcp, 9300/tcp
```

Binary file not shown.

View File

@@ -0,0 +1 @@
Er1tmip;T4w[%1}YE?x{fN9v

Binary file not shown.

View File

@@ -0,0 +1 @@
583Ls;XF(qDQu3p!L22gyh1t

View File

@@ -0,0 +1,76 @@
###############################################################################
##
## Collector Server config
##
## - Default values are shown as commented settings.
##
###############################################################################
##
## HTTP(S) service
##
## Normally:
##
## - 8080 is http service
## - https is disabled by default
##
## - At this time, the server always binds to 0.0.0.0
##
##
#collector.service.port=8080
## Authentication is only supported via secure port
## When enabled - require valid keystore defined
collector.service.secure.port=8443
# auth.method flags:
#
# noAuth - default option - no security (http)
# certBasicAuth - auth by certificate and basic auth username / password (https)
auth.method=certBasicAuth
## Combination of userid,hashPassword encoded pwd list to be supported
## userid and pwd comma separated; pipe delimitation between each pair
## Password is generated by crypt-password library using BCrypt algorithm stored in dcaegen2/sdk package
## or https://nexus.onap.org/#nexus-search;quick~crypt-password
header.authlist=sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6
## The keystore must be setup per installation when secure port is configured
collector.keystore.file.location=etc/keystore
collector.keystore.passwordfile=etc/passwordfile
collector.cert.subject.matcher=etc/certSubjectMatcher.properties
## The truststore must be setup per installation when mutual tls support is configured
collector.truststore.file.location=etc/truststore
collector.truststore.passwordfile=etc/trustpasswordfile
## Schema Validation checkflag
## default no validation checkflag (-1)
## If enabled (1) - schemafile location must be specified
collector.schema.checkflag=1
collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.2.1_ONAP.json\"}
## Schema StndDefinedFields Validation checkflag
## default no validation checkflag (-1)
## If enabled (1) - schema files locations must be specified, mapping file path must be specified, schema reference path
## in event json must be specified, path to stndDefined data field in event json must be specified
collector.externalSchema.checkflag=1
collector.externalSchema.schemasLocation=etc/externalRepo/
collector.externalSchema.mappingFileLocation=etc/externalRepo/schema-map.json
event.externalSchema.schemaRefPath=$.event.stndDefinedFields.schemaReference
event.externalSchema.stndDefinedDataPath=$.event.stndDefinedFields.data
## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile
collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance|o-ran-sc-du-hello-world-pm-streaming-oas3=ves-o-ran-sc-du-hello-world-pm-streaming-oas3|o1-notify-pnf-registration=ves-o1-notify-pnf-registration
collector.dmaapfile=etc/ves-dmaap-config.json
## Path to the file containing description of api versions
collector.description.api.version.location=etc/api_version_description.json
## Event transformation Flag - when set expects configurable transformation
## defined under ./etc/eventTransform.json
## Enabled by default; to disable set to 0
event.transform.flag=0
# Describes at what frequency (measured in minutes) should application try to fetch config from CBS
collector.dynamic.config.update.frequency=5

View File

@@ -0,0 +1,29 @@
dmaap.certificateConfig.keyCert: /opt/app/datafile/etc/cert/cert.p12
dmaap.certificateConfig.keyPasswordPath: /opt/app/datafile/etc/cert/p12.pass
dmaap.certificateConfig.trustedCa: /opt/app/datafile/etc/cert/trust.jks
dmaap.certificateConfig.trustedCaPasswordPath: /opt/app/datafile/etc/cert/trust.pass
dmaap.dmaapConsumerConfiguration.consumerGroup: OpenDcae-c12
dmaap.dmaapConsumerConfiguration.consumerId: C12
dmaap.dmaapConsumerConfiguration.timeoutMs: -1
dmaap.security.enableDmaapCertAuth: false
dmaap.security.keyStorePasswordPath: /opt/app/datafile/etc/cert/jks.pass
dmaap.security.keyStorePath: /opt/app/datafile/etc/cert/cert.jks
dmaap.security.trustStorePasswordPath: /opt/app/datafile/etc/cert/trust.pass
dmaap.security.trustStorePath: /opt/app/datafile/etc/cert/trust.jks
service_calls: []
sftp.security.strictHostKeyChecking: true
streams_publishes:
PM_MEAS_FILES:
dmaap_info:
location: loc00
log_url: https://dmaap-dr-prov:8443/feedlog/1
password: pmmapper
publish_url: http://dmaap-dr-prov:8080/publish/1
publisher_id: 1.85gkg
username: pmmapper
type: data_router
streams_subscribes:
dmaap_subscriber:
dmaap_info:
topic_url: http://dmaap-message-router:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT
type: message_router

View File

@@ -0,0 +1,31 @@
spring:
profiles:
active: prod
management:
endpoints:
web:
exposure:
include: "loggers,logfile,health,info,metrics"
server:
port: 8433
ssl:
key-store-type: PKCS12
key-store-password: ericssondfc
key-store: classpath:keystore.jks
key-password: ericssondfc
keyAlias: tomcat-localhost
logging:
level:
ROOT: INFO
org.springframework: INFO
org.springframework.data: INFO
org.springframework.web.reactive.function.client.ExchangeFunctions: INFO
org.onap.dcaegen2.collectors.datafile: TRACE
org.onap.dcaegen2: TRACE
file: /var/log/ONAP/application.log
app:
filepath: config/datafile_endpoints_test.json
springdoc:
show-actuator: true
swagger-ui.disable-swagger-default-url: true

View File

@@ -0,0 +1,36 @@
pm-mapper-filter:
# filters:
# - pmDefVsn: "1.0"
# nfType: "gnb"
# vendor: "Nokia"
# measTypes:
# - attTCHSeizures
# - succTCHSeizures2
# - succImmediateAssignProcs8
filters: [] #disabling filters
key_store_path: "/opt/app/pm-mapper/etc/certs/cert.jks"
key_store_pass_path: "/opt/app/pm-mapper/etc/certs/jks.pass"
trust_store_path: "/opt/app/pm-mapper/etc/certs/trust.jks"
trust_store_pass_path: "/opt/app/pm-mapper/etc/certs/trust.pass"
dmaap_dr_delete_endpoint: "http://dmaap-dr-node:8080/delete"
dmaap_dr_feed_name: "1"
aaf_identity: "aaf_admin@people.osaaf.org"
aaf_password: "demo123456!"
enable_http: true
streams_publishes:
dmaap_publisher:
type: "message_router"
dmaap_info:
topic_url: "http://message-router:3904/events/unauthenticated.PERFORMANCE_MEASUREMENTS"
client_role: "org.onap.dcae.pmPublisher"
location: "csit-pmmapper"
client_id: "1562763644939"
streams_subscribes:
dmaap_subscriber:
type: "data_router"
dmaap_info:
username: "username"
password: "password"
location: "csit-pmmapper"
delivery_url: "http://dcae-pm-mapper:8081/delivery"
subscriber_id: 1

View File

@@ -0,0 +1,9 @@
{
"destination":"/opt/app/VESCollector/etc/externalRepo",
"repositories":[
{
"url":"https://forge.3gpp.org/rep/sa5/MnS.git",
"branch":"Rel-18"
}
]
}

View File

@@ -0,0 +1,226 @@
{
"ves-syslog": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-statechange": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-thresholdCrossingAlert": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-heartbeat": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT/"
}
},
"ves-other": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.SEC_OTHER_OUTPUT/"
}
},
"ves-mobileflow": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-sipsignaling": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-voicequality": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-fault": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.SEC_FAULT_OUTPUT/"
}
},
"ves-measurement": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT/"
}
},
"ves-3gpp-fault-supervision": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT/"
}
},
"ves-3gpp-provisioning": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT/"
}
},
"ves-3gpp-heartbeat": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT/"
}
},
"ves-3gpp-performance-assurance": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT/"
}
},
"ves-syslog-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-statechange-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-thresholdCrossingAlert-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-heartbeat-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-other-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-mobileflow-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-sipsignaling-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTSves7_valid_ip_v4.json-DEV"
}
},
"ves-voicequality-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-fault-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-measurement-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-3gpp-fault-supervision-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT"
}
},
"ves-3gpp-provisioning-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT"
}
},
"ves-3gpp-heartbeat-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-3gpp-performance-assurance-secondary": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/DCAE-SE-COLLECTOR-EVENTS-DEV"
}
},
"ves-pnfRegistration": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.VES_PNFREG_OUTPUT/"
}
},
"ves-o1-notify-pnf-registration": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.VES_O1_NOTIFY_PNF_REGISTRATION_OUTPUT/"
}
},
"ves-o-ran-sc-du-hello-world-pm-streaming-oas3": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.VES_O_RAN_SC_HELLO_WORLD_PM_STREAMING_OUTPUT/"
}
},
"ves-file-ready": {
"type": "message_router",
"dmaap_info": {
"location": "mtl5",
"topic_url": "http://dmaap-message-router:3904/events/unauthenticated.VES_FILE_READY_OUTPUT/"
}
}
}

View File

@@ -0,0 +1,16 @@
ARG BASEIMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.8.0
FROM ubuntu:22.04 AS stage-0
ARG DLREPO=https://forge.3gpp.org/rep/sa5/MnS.git
ARG DLBRANCH=Rel-18
RUN apt update && apt install -y python3 git
COPY install.py /
RUN python3 install.py $DLREPO $DLBRANCH /opt/app/VESCollector/etc/externalRepo
FROM ${BASEIMAGE}
COPY --from=stage-0 --chown=vescollector:vescollector /opt/app/VESCollector/etc/externalRepo /opt/app/VESCollector/etc/externalRepo

View File

@@ -0,0 +1,133 @@
#!/usr/bin/python3
import sys
import os
import subprocess
import json
import re
from typing import List
class Installer:
def __init__(self, url, branch, dstFolder) -> None:
self.downloadUrl = url
self.publicUrlFormat = self.createPublicUrlFormat(url, branch)
print(f'fmt={self.publicUrlFormat}')
self.branch = branch
self.baseFolder = dstFolder
self.subfolder = self.createSubFolder(url, branch)
def createPublicUrlFormat(self, url:str, branch:str)->str:
if url.endswith('.git'):
url = url[:-4]
if url.startswith('git@'):
url = 'https://'+url[4:]
fmt=url+'/raw/'+branch+'/{}'
return fmt
def createSubFolder(self, gitUrl:str, branch:str) -> str:
regex = r"^[^\/]+\/\/(.*)$"
matches = re.finditer(regex, gitUrl)
match = next(matches)
name = match.group(1)
if name.endswith('.git'):
name=name[:-4]
tmp:List[str]=[]
hlp1 = name.split('/')
for h in hlp1:
if '.' in h:
hlp2=h.split('.')
for h2 in hlp2:
tmp.append(h2)
else:
tmp.append(h)
return '/'.join(tmp)+'/'+branch
def getDstFolder(self)->str:
return f'{self.baseFolder}/{self.subfolder}'
def exec(self, cmd:str):
output = subprocess.Popen(
cmd, shell=True, stdout=subprocess.PIPE).stdout.read()
return output
def download(self) -> bool:
print(f'try to download repo {self.downloadUrl} to {self.getDstFolder()}')
self.exec(f'git clone --single-branch --branch {self.branch} {self.downloadUrl} {self.getDstFolder()}')
def getFilesFiltered(self, lst:List[str]=None, path=None, root=None, filter=['yaml','yml'])->List[str]:
if lst is None:
lst=[]
if root is None:
root=str(self.getDstFolder())
if path is None:
path=self.getDstFolder()
if os.path.exists(path) and os.path.isdir(path):
# Iterate over all files and directories in the given path
for filename in os.listdir(path):
if filename.startswith("."):
continue
fmatch=False
# Get the absolute path of the file/directory
abs_path = os.path.join(path, filename)
# If it is a directory, recursively call this function on it
if os.path.isdir(abs_path):
self.getFilesFiltered(lst=lst, path=abs_path, root=root, filter=filter )
# If it is a file, print its absolute path
elif os.path.isfile(abs_path):
for fi in filter:
if abs_path.endswith(fi):
fmatch=True
break
if not fmatch:
continue
relpath=abs_path[len(root)+1:]
lst.append(relpath)
return lst
def urlAlreadyInData(self, data:List[dict], pubUrl:str, key='publicURL'):
for item in data:
if key in item and item[key]==pubUrl:
return True
return False
def createSchemaMap(self):
schemaMapFile = f'{self.baseFolder}/schema-map.json'
if os.path.isfile(schemaMapFile):
with open(schemaMapFile) as fp:
data = json.load(fp)
else:
data:List[dict] = []
files = self.getFilesFiltered()
for file in files:
print(file)
pubUrl = self.publicUrlFormat.format(file)
if self.urlAlreadyInData(data,pubUrl):
print(f'entry with url {pubUrl} already exists. ignoring')
continue
data.append({
'publicURL': pubUrl,
'localURL': f'{self.subfolder}/{file}'
})
with open(schemaMapFile,'w') as fp:
json.dump(data,fp)
def printHelp():
print("Installation script for VES additional formats")
print(" usage: ")
print(" install.py DOWNLOAD-REPO BRANCH DESTINATION-FOLDER")
args = sys.argv
args.pop(0)
if len(args)<3:
print(f'bad parameters ${args}')
printHelp()
exit(1)
dlRepo = args.pop(0)
dlBranch = args.pop(0)
dst = args.pop(0)
installer = Installer(dlRepo, dlBranch, dst)
installer.download()
installer.createSchemaMap()

View File

@@ -0,0 +1,169 @@
###############################################################################
# ============LICENSE_START=======================================================
# org.onap.dmaap
# ================================================================================
# Copyright <20> 2017 AT&T Intellectual Property. 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=========================================================
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
###############################################################################
###############################################################################
##
## Cambria API Server config
##
## - Default values are shown as commented settings.
##
###############################################################################
##
## HTTP service
##
## - 3904 is standard as of 7/29/14.
#
## Zookeeper Connection
##
## Both Cambria and Kafka make use of Zookeeper.
##
#config.zk.servers=172.18.1.1
config.zk.servers=zookeeper
#config.zk.root=/fe3c/cambria/config
###############################################################################
##
## Kafka Connection
##
## Items below are passed through to Kafka's producer and consumer
## configurations (after removing "kafka.")
## if you want to change request.required.acks it can take this one value
#kafka.metadata.broker.list=localhost:9092,localhost:9093
kafka.metadata.broker.list=kafka:9092
##kafka.request.required.acks=-1
#kafka.client.zookeeper=${config.zk.servers}
consumer.timeout.ms=100
zookeeper.connection.timeout.ms=6000
zookeeper.session.timeout.ms=20000
zookeeper.sync.time.ms=2000
auto.commit.interval.ms=1000
fetch.message.max.bytes =1000000
auto.commit.enable=false
#(backoff*retries > zksessiontimeout)
kafka.rebalance.backoff.ms=10000
kafka.rebalance.max.retries=6
###############################################################################
##
## Secured Config
##
## Some data stored in the config system is sensitive -- API keys and secrets,
## for example. to protect it, we use an encryption layer for this section
## of the config.
##
## The key is a base64 encode AES key. This must be created/configured for
## each installation.
#cambria.secureConfig.key=
##
## The initialization vector is a 16 byte value specific to the secured store.
## This must be created/configured for each installation.
#cambria.secureConfig.iv=
## Southfield Sandbox
cambria.secureConfig.key=b/7ouTn9FfEw2PQwL0ov/Q==
cambria.secureConfig.iv=wR9xP5k5vbz/xD0LmtqQLw==
authentication.adminSecret=fe3cCompound
#cambria.secureConfig.key[pc569h]=YT3XPyxEmKCTLI2NK+Sjbw==
#cambria.secureConfig.iv[pc569h]=rMm2jhR3yVnU+u2V9Ugu3Q==
###############################################################################
##
## Consumer Caching
##
## Kafka expects live connections from the consumer to the broker, which
## obviously doesn't work over connectionless HTTP requests. The Cambria
## server proxies HTTP requests into Kafka consumer sessions that are kept
## around for later re-use. Not doing so is costly for setup per request,
## which would substantially impact a high volume consumer's performance.
##
## This complicates Cambria server failover, because we often need server
## A to close its connection before server B brings up the replacement.
##
## The consumer cache is normally enabled.
#cambria.consumer.cache.enabled=true
## Cached consumers are cleaned up after a period of disuse. The server inspects
## consumers every sweepFreqSeconds and will clean up any connections that are
## dormant for touchFreqMs.
#cambria.consumer.cache.sweepFreqSeconds=15
cambria.consumer.cache.touchFreqMs=120000
##stickforallconsumerrequests=false
## The cache is managed through ZK. The default value for the ZK connection
## string is the same as config.zk.servers.
#cambria.consumer.cache.zkConnect=${config.zk.servers}
##
## Shared cache information is associated with this node's name. The default
## name is the hostname plus the HTTP service port this host runs on. (The
## hostname is determined via InetAddress.getLocalHost ().getCanonicalHostName(),
## which is not always adequate.) You can set this value explicitly here.
##
#cambria.api.node.identifier=<use-something-unique-to-this-instance>
#cambria.rateLimit.maxEmptyPollsPerMinute=30
#cambria.rateLimitActual.delay.ms=10
###############################################################################
##
## Metrics Reporting
##
## This server can report its metrics periodically on a topic.
##
#metrics.send.cambria.enabled=true
#metrics.send.cambria.topic=cambria.apinode.metrics #msgrtr.apinode.metrics.dmaap
#metrics.send.cambria.sendEverySeconds=60
cambria.consumer.cache.zkBasePath=/fe3c/cambria/consumerCache
consumer.timeout=17
##############################################################################
#100mb
maxcontentlength=10000
##############################################################################
#AAF Properties
msgRtr.namespace.aaf=org.onap.dmaap.mr.topic
msgRtr.topicfactory.aaf=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic:
enforced.topic.name.AAF=org.onap.dmaap.mr
forceAAF=false
transidUEBtopicreqd=false
defaultNSforUEB=org.onap.dmaap.mr
##############################################################################
#Mirror Maker Agent
msgRtr.mirrormakeradmin.aaf=org.onap.dmaap.mr.mirrormaker|*|admin
msgRtr.mirrormakeruser.aaf=org.onap.dmaap.mr.mirrormaker|*|user
msgRtr.mirrormakeruser.aaf.create=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic:
msgRtr.mirrormaker.timeout=15000
msgRtr.mirrormaker.topic=org.onap.dmaap.mr.mmagent
msgRtr.mirrormaker.consumergroup=mmagentserver
msgRtr.mirrormaker.consumerid=1
kafka.max.poll.interval.ms=300000
kafka.heartbeat.interval.ms=60000
kafka.session.timeout.ms=240000
kafka.max.poll.records=1000

View File

@@ -0,0 +1,19 @@
aaf_locate_url=https://aaf-locate.{{ include "common.namespace" . }}:8095
aaf_url=https://AAF_LOCATE_URL/onap.org.osaaf.aaf.service:2.1
aaf_env=DEV
aaf_lur=org.onap.aaf.cadi.aaf.v2_0.AAFLurPerm
cadi_truststore=/appl/dmaapMR1/etc/org.onap.dmaap.mr.trust.jks
cadi_truststore_password=enc:mN6GiIzFQxKGDzAXDOs7b4j8DdIX02QrZ9QOWNRpxV3rD6whPCfizSMZkJwxi_FJ
cadi_keyfile=/appl/dmaapMR1/etc/org.onap.dmaap.mr.keyfile
cadi_alias=dmaapmr@mr.dmaap.onap.org
cadi_keystore=/appl/dmaapMR1/etc/org.onap.dmaap.mr.p12
cadi_keystore_password=enc:_JJT2gAEkRzXla5xfDIHal8pIoIB5iIos3USvZQT6sL-l14LpI5fRFR_QIGUCh5W
cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_9, OU=OSAAF, O=ONAP, C=US
cadi_loglevel=INFO
cadi_protocols=TLSv1.1,TLSv1.2
cadi_latitude=37.78187
cadi_longitude=-122.26147

View File

@@ -0,0 +1,90 @@
#-------------------------------------------------------------------------------
# ============LICENSE_START==================================================
# * org.onap.dmaap
# * ===========================================================================
# * Copyright <20> 2017 AT&T Intellectual Property. All rights reserved.
# * Copyright (C) 2022 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====================================================
# *
# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
# *
#-------------------------------------------------------------------------------
#
# Configuration parameters set at startup for the DataRouter node
#
# URL to retrieve dynamic configuration
ProvisioningURL = http://dmaap-dr-prov:8080/internal/prov
#
# URL to upload PUB/DEL/EXP logs
LogUploadURL = http://dmaap-dr-prov:8080/internal/logs
#
# The port number for http as seen within the server
IntHttpPort = 8080
#
# The port number for https as seen within the server
IntHttpsPort = 8443
#
# The external port number for https taking port mapping into account
ExtHttpsPort = 443
#
# The minimum interval between fetches of the dynamic configuration from the provisioning server
MinProvFetchInterval = 10000
#
# The minimum interval between saves of the redirection data file
MinRedirSaveInterval = 10000
#
# The path to the directory where log files are stored
LogDir = /opt/app/datartr/logs
#
# The retention interval (in days) for log files
LogRetention = 30
#
# The path to the directories where data and meta data files are stored
SpoolDir = /opt/app/datartr/spool
#
# The path to the redirection data file
RedirectionFile = etc/redirections.dat
#
# The type of keystore for https
KeyStoreType = PKCS12
#
# The type of truststore for https
TrustStoreType = jks
#
# The path to the file used to trigger an orderly shutdown
QuiesceFile = etc/SHUTDOWN
#
# The key used to generate passwords for node to node transfers
NodeAuthKey = Node123!
#
# DR_NODE DEFAULT ENABLED TLS PROTOCOLS
NodeHttpsProtocols = TLSv1.1|TLSv1.2
#
# AAF type to generate permission string
AAFType = org.onap.dmaap-dr.feed
#
# AAF default instance to generate permission string - default should be legacy
AAFInstance = legacy
#
# AAF action to generate permission string - default should be publish
AAFAction = publish
#
# AAF CADI enabled flag
CadiEnabled = false
#
# AAF Props file path
AAFPropsFilePath = /opt/app/osaaf/local/org.onap.dmaap-dr.props
TlsEnabled = false

View File

@@ -0,0 +1,64 @@
#-------------------------------------------------------------------------------
# ============LICENSE_START==================================================
# * org.onap.dmaap
# * ===========================================================================
# * Copyright <20> 2017 AT&T Intellectual Property. All rights reserved.
# * Copyright (C) 2022. 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====================================================
# *
# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
# *
#-------------------------------------------------------------------------------
#Jetty Server properties
org.onap.dmaap.datarouter.provserver.http.port = 8080
org.onap.dmaap.datarouter.nodeserver.http.port = 8080
org.onap.dmaap.datarouter.provserver.https.port = 8443
org.onap.dmaap.datarouter.nodeserver.https.port = 8443
org.onap.dmaap.datarouter.provserver.https.relaxation = true
org.onap.dmaap.datarouter.provserver.aafprops.path = /opt/app/osaaf/local/org.onap.dmaap-dr.props
org.onap.dmaap.datarouter.provserver.accesslog.dir = /opt/app/datartr/logs
org.onap.dmaap.datarouter.provserver.spooldir = /opt/app/datartr/spool
org.onap.dmaap.datarouter.provserver.dbscripts = /opt/app/datartr/etc/misc
org.onap.dmaap.datarouter.provserver.logretention = 30
#DMAAP-597 (Tech Dept) REST request source IP auth
# relaxation to accommodate OOM kubernetes deploy
org.onap.dmaap.datarouter.provserver.isaddressauthenabled = false
org.onap.dmaap.datarouter.provserver.tlsenabled = false
#Localhost address config
org.onap.dmaap.datarouter.provserver.localhost = 127.0.0.1
# Database access
org.onap.dmaap.datarouter.db.driver = org.mariadb.jdbc.Driver
org.onap.dmaap.datarouter.db.url = jdbc:mariadb://dmaap-dr-mariadb:3306/datarouter
org.onap.dmaap.datarouter.db.login = datarouter
org.onap.dmaap.datarouter.db.password = datarouter
# PROV - DEFAULT ENABLED TLS PROTOCOLS
org.onap.dmaap.datarouter.provserver.https.include.protocols = TLSv1.1|TLSv1.2
# AAF config
org.onap.dmaap.datarouter.provserver.cadi.enabled = false
org.onap.dmaap.datarouter.provserver.passwordencryption = PasswordEncryptionKey#@$%^&1234#
org.onap.dmaap.datarouter.provserver.aaf.feed.type = org.onap.dmaap-dr.feed
org.onap.dmaap.datarouter.provserver.aaf.sub.type = org.onap.dmaap-dr.sub
org.onap.dmaap.datarouter.provserver.aaf.instance = legacy
org.onap.dmaap.datarouter.provserver.aaf.action.publish = publish
org.onap.dmaap.datarouter.provserver.aaf.action.subscribe = subscribe

View File

@@ -0,0 +1,208 @@
<!--
============LICENSE_START=======================================================
Copyright © 2019 AT&T Intellectual Property. 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=========================================================
-->
<configuration scan="true" scanPeriod="3 seconds" debug="false">
<contextName>${module.ajsc.namespace.name}</contextName>
<jmxConfigurator />
<property name="logDirectory" value="${AJSC_HOME}/log" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="INFO" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<appender name="DEBUG" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
</encoder>
</appender>
<appender name="ERROR" class="ch.qos.logback.core.ConsoleAppender"> class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
<encoder>
<pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
</encoder>
</appender>
<!-- Msgrtr related loggers -->
<logger name="org.onap.dmaap.dmf.mr.service" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.service.impl" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.resources" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.resources.streamReaders" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.backends" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.backends.kafka" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.backends.memory" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.beans" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.constants" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.exception" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.listener" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.metabroker" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.metrics.publisher" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.metrics.publisher.impl" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.security" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.security.impl" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.transaction" level="INFO" />
<logger name="com.att.dmf.mr.transaction.impl" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.metabroker" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.metabroker" level="INFO" />
<logger name="org.onap.dmaap.dmf.mr.utils" level="INFO" />
<logger name="org.onap.dmaap.mr.filter" level="INFO" />
<!--<logger name="com.att.nsa.cambria.*" level="INFO" />-->
<!-- Msgrtr loggers in ajsc -->
<logger name="org.onap.dmaap.service" level="INFO" />
<logger name="org.onap.dmaap" level="INFO" />
<!-- Spring related loggers -->
<logger name="org.springframework" level="WARN" additivity="false"/>
<logger name="org.springframework.beans" level="WARN" additivity="false"/>
<logger name="org.springframework.web" level="WARN" additivity="false" />
<logger name="com.blog.spring.jms" level="WARN" additivity="false" />
<!-- AJSC Services (bootstrap services) -->
<logger name="ajsc" level="WARN" additivity="false"/>
<logger name="ajsc.RouteMgmtService" level="INFO" additivity="false"/>
<logger name="ajsc.ComputeService" level="INFO" additivity="false" />
<logger name="ajsc.VandelayService" level="WARN" additivity="false"/>
<logger name="ajsc.FilePersistenceService" level="WARN" additivity="false"/>
<logger name="ajsc.UserDefinedJarService" level="WARN" additivity="false" />
<logger name="ajsc.UserDefinedBeansDefService" level="WARN" additivity="false" />
<logger name="ajsc.LoggingConfigurationService" level="WARN" additivity="false" />
<!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet
logging) -->
<logger name="ajsc.utils" level="WARN" additivity="false"/>
<logger name="ajsc.utils.DME2Helper" level="INFO" additivity="false" />
<logger name="ajsc.filters" level="DEBUG" additivity="false" />
<logger name="ajsc.beans.interceptors" level="DEBUG" additivity="false" />
<logger name="ajsc.restlet" level="DEBUG" additivity="false" />
<logger name="ajsc.servlet" level="DEBUG" additivity="false" />
<logger name="com.att" level="WARN" additivity="false" />
<logger name="com.att.ajsc.csi.logging" level="WARN" additivity="false" />
<logger name="com.att.ajsc.filemonitor" level="WARN" additivity="false"/>
<logger name="com.att.nsa.dmaap.util" level="INFO" additivity="false"/>
<logger name="com.att.cadi.filter" level="INFO" additivity="false" />
<!-- Other Loggers that may help troubleshoot -->
<logger name="net.sf" level="WARN" additivity="false" />
<logger name="org.apache.commons.httpclient" level="WARN" additivity="false"/>
<logger name="org.apache.commons" level="WARN" additivity="false" />
<logger name="org.apache.coyote" level="WARN" additivity="false"/>
<logger name="org.apache.jasper" level="WARN" additivity="false"/>
<!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging.
May aid in troubleshooting) -->
<logger name="org.apache.camel" level="WARN" additivity="false" />
<logger name="org.apache.cxf" level="WARN" additivity="false" />
<logger name="org.apache.camel.processor.interceptor" level="WARN" additivity="false"/>
<logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" additivity="false" />
<logger name="org.apache.cxf.service" level="WARN" additivity="false" />
<logger name="org.restlet" level="DEBUG" additivity="false" />
<logger name="org.apache.camel.component.restlet" level="DEBUG" additivity="false" />
<logger name="org.apache.kafka" level="DEBUG" additivity="false" />
<logger name="org.apache.zookeeper" level="INFO" additivity="false" />
<logger name="org.I0Itec.zkclient" level="DEBUG" additivity="false" />
<!-- logback internals logging -->
<logger name="ch.qos.logback.classic" level="INFO" additivity="false"/>
<logger name="ch.qos.logback.core" level="INFO" additivity="false" />
<!-- logback jms appenders & loggers definition starts here -->
<!-- logback jms appenders & loggers definition starts here -->
<appender name="auditLogs" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
</filter>
<encoder>
<pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
</encoder>
</appender>
<appender name="perfLogs" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
</filter>
<encoder>
<pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
</encoder>
</appender>
<appender name="ASYNC-audit" class="ch.qos.logback.classic.AsyncAppender">
<queueSize>1000</queueSize>
<discardingThreshold>0</discardingThreshold>
<appender-ref ref="Audit-Record-Queue" />
</appender>
<logger name="AuditRecord" level="INFO" additivity="FALSE">
<appender-ref ref="STDOUT" />
</logger>
<logger name="AuditRecord_DirectCall" level="INFO" additivity="FALSE">
<appender-ref ref="STDOUT" />
</logger>
<appender name="ASYNC-perf" class="ch.qos.logback.classic.AsyncAppender">
<queueSize>1000</queueSize>
<discardingThreshold>0</discardingThreshold>
<appender-ref ref="Performance-Tracker-Queue" />
</appender>
<logger name="PerfTrackerRecord" level="INFO" additivity="FALSE">
<appender-ref ref="ASYNC-perf" />
<appender-ref ref="perfLogs" />
</logger>
<!-- logback jms appenders & loggers definition ends here -->
<root level="DEBUG">
<appender-ref ref="DEBUG" />
<appender-ref ref="ERROR" />
<appender-ref ref="INFO" />
<appender-ref ref="STDOUT" />
</root>
</configuration>

View File

@@ -0,0 +1,5 @@
Client {
org.apache.zookeeper.server.auth.DigestLoginModule required
username="kafka"
password="kafka_secret";
};

View File

@@ -0,0 +1,4 @@
Server {
org.apache.zookeeper.server.auth.DigestLoginModule required
user_kafka=kafka_secret;
};

View File

@@ -0,0 +1,31 @@
version: '3'
services:
gnb:
image: oai-gnb:ubuntu22-latest
privileged: true
container_name: gnodeb01-test
environment:
- USE_VOLUMED_CONF="yes"
- USE_B2XX="yes"
- USE_ADDITIONAL_OPTIONS="--sa -E --continuous-tx"
- ENABLE_NETCONF=true
volumes:
- /dev:/dev
# - ./gNodeB/gnb.conf:/opt/oai-gnb/etc/mounted.conf:ro
- ./gNodeB/gnb.conf:/opt/oai-gnb/etc/gnb.conf
- ./gNodeB/ftp:/ftp
healthcheck:
# pgrep does NOT work
test: /bin/bash -c "ps aux | grep -v grep | grep -c softmodem"
interval: 10s
timeout: 5s
retries: 5
ports:
- "58300:830"
networks:
- oam
networks:
oam:
external: true

View File

@@ -0,0 +1,293 @@
version: '3'
services:
sdnc-web:
image: ${SDNC_WEB_IMAGE}
container_name: sdnc-web
environment:
- ENABLE_OAUTH=true
- SDNRHOST=sdnc
ports:
- ${PUBPORT_SDNCWEB}:8080
depends_on:
- sdnc
networks:
- smo
sdnc:
image: ${SDNC_IMAGE}
container_name: sdnc
environment:
- SDNRCONTROLLERID=c94bbd5f-d456-44bd-aa7a-47b274f73762
- A1_ADAPTER_NORTHBOUND=false
- CCSDK_REPLICAS=0
- DOMAIN=""
- ENABLE_OAUTH=true
- ODL_ADMIN_PASSWORD=${ADMIN_PASSWORD}
- ODL_CERT_DIR=/opt/opendaylight/current/certs
- SDNC_CONFIG_DIR=/opt/onap/ccsdk/data/properties
- SDNRDBURL=http://sdnrdb:9200
- SDNRDBTYPE=ELASTICSEARCH
- SDNRDM=true
- SDNRINIT=true
- SDNRONLY=true
- SDNRWT=true
- SDNR_ASYNC_HANDLING=true
- SDNR_ASYNC_POOLSIZE=200
- SDNR_NETCONF_CALLHOME_ENABLED=true
- JAVA_OPTS=-Xms256m -Xmx4g
volumes:
- ./sdnc/certs/certs.properties:/opt/opendaylight/current/certs/certs.properties
- ./sdnc/certs/keys0.zip:/opt/opendaylight/current/certs/keys0.zip
- ./sdnc/devicemanager.properties:/opt/opendaylight/etc/devicemanager.properties
- ./sdnc/mountpoint-registrar.properties:/opt/opendaylight/etc/mountpoint-registrar.properties
- ./sdnc/oauth-provider.config.json:/opt/opendaylight/etc/oauth-provider.config.json
- ./sdnc/oauth-aaa-app-config.xml:/opt/onap/sdnc/data/oauth-aaa-app-config.xml
depends_on:
- sdnrdb
- dmaap-kafka
- dcae-ves-collector
networks:
- oam
- smo
sdnrdb:
image: ${SDNRDB_IMAGE}
container_name: sdnrdb
environment:
- discovery.type=single-node
- discovery.seed_hosts='["127.0.0.1"]'
# - discovery.seed_providers
# - cluster.initial_master_nodes
networks:
- smo
dcae-pm-mapper:
image: ${PM_MAPPER_IMAGE}
container_name: dcae-pm-mapper
depends_on:
dmaap-dr-prov:
condition: service_healthy
environment:
CBS_CLIENT_CONFIG_PATH: ${PM_MAPPER_TARGET_CONFIG_PATH}
CONFIG_BINDING_SERVICE: 0.0.0.0
CONFIG_BINDING_SERVICE_SERVICE_PORT: 10000
JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n
PROCESSING_LIMIT_RATE: 1
PROCESSING_THREADS_COUNT: 1
THREADS_MULTIPLIER: 1
# extra_hosts:
# - dmaap-dr-node:${DMAAP_DR_NODE_IP}
# - message-router:$MR_IP
hostname: dcae-pm-mapper
networks:
- smo
# ports:
# - ${PM_MAPPER_PORT_1}:8081
# - ${PM_MAPPER_PORT_2}:5005
volumes:
- ./dcae/pm_mount_config.yaml:${PM_MAPPER_TARGET_CONFIG_PATH}
- ./dcae/certs:/opt/app/pm-mapper/etc/certs/
dcae-ves-collector:
# image: ${DCAE_VES_COLLECTOR_IMAGE}
image: ${DCAE_VES_COLLECTOR_IMAGE}-modified
build:
context: ./dcae/ves-image
args:
- BASEIMAGE=${DCAE_VES_COLLECTOR_IMAGE}
container_name: dcae-ves-collector
environment:
DMAAPHOST: dmaap
hostname: dcae-ves-collector
labels:
- traefik.enable=true
- traefik.http.routers.ves.rule=Host(`ves.${SOLUTION_DOMAIN}`)
- traefik.http.routers.ves.service=ves
- traefik.http.routers.ves.tls=true
- traefik.http.services.ves.loadbalancer.server.port=8443
- traefik.http.services.ves.loadbalancer.server.scheme=https
- traefik.http.routers.ves.tls.certresolver=CertificateResolver0
networks:
- oam
- smo
- traefik-proxy
# ports:
# - 8080:8080
# - 8443:8443
volumes:
- ./dcae/collector.properties:/opt/app/VESCollector/etc/collector.properties
- ./dcae/ves-dmaap-config.json:/opt/app/VESCollector/etc/ves-dmaap-config.json
# - ./dcae/externalRepo:/opt/app/VESCollector/etc/externalRepo
dcae-dfc:
image: ${DCAE_DFC_IMAGE}
container_name: dcae-dfc
environment:
CBS_CLIENT_CONFIG_PATH: ${DCAE_DFC_TARGET_CONFIG_PATH}
CONFIG_BINDING_SERVICE: 0.0.0.0
CONFIG_BINDING_SERVICE_SERVICE_PORT: 10000
JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n
# extra_hosts:
# - dmaap-dr-node:${DMAAP_DR_NODE_IP}
# - dmaap-dr-prov:${DMAAP_DR_PROV_IP}
volumes:
- ./dcae/dfc_mount_config.yaml:${DCAE_DFC_TARGET_CONFIG_PATH}
- ./dcae/dfc_spring_application.yaml:${DCAE_DFC_TARGET_SPRING_CONFIG}
networks:
- smo
# ports:
# - 8100:8100
# - 8000:8000
dmaap-dr-node:
image: ${DMAAP_DR_NODE_IMAGE}
container_name: dmaap-dr-node
hostname: dmaap-dr-node
depends_on:
dmaap-dr-prov:
condition: service_healthy
# extra_hosts:
# - dmaap-dr-prov:$DMAAP_DR_PROV_IP
# - dcae-pm-mapper:$PM_MAPPER_IP
volumes:
- ./dmaap/dr_node.properties:/opt/app/datartr/etc/node.properties
networks:
- smo
# ports:
# - ${DMAAP_DR_NODE_PORT_1}:8443
# - ${DMAAP_DR_NODE_PORT_2}:8080
dmaap-dr-prov:
image: ${DMAAP_DR_PROV_IP_IMAGE}
container_name: dmaap-dr-prov
hostname: dmaap-dr-prov
depends_on:
dmaap-dr-mariadb:
condition: service_healthy
# extra_hosts:
# - dmaap-dr-node:${DMAAP_DR_NODE_IP}
# - dcae-pm-mapper:${PM_MAPPER_IP}
healthcheck:
interval: 10s
retries: 5
test:
- CMD
- curl
- -f
- http://dmaap-dr-prov:8080/internal/prov
timeout: 30s
volumes:
- ./dmaap/dr_provserver.properties:/opt/app/datartr/etc/provserver.properties
networks:
- smo
# ports:
# - 20443:8443
# - ${DMAAP_DR_PROV_PORT_1}:8443
# - ${DMAAP_DR_PROV_PORT_2}:8080
dmaap-kafka:
container_name: dmaap-kafka
image: ${DMAAP_KAFKA_IMAGE}
hostname: kafka
depends_on:
- dmaap-zookeeper
environment:
KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://kafka:9092
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL_PLAINTEXT
KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT
KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_OPTS: -Djava.security.auth.login.config=/etc/kafka/secrets/jaas/zk_client_jaas.conf
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 40000
KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 40000
KAFKA_ZOOKEEPER_SET_ACL: 'true'
enableCadi: 'false'
volumes:
- ./dmaap/zk_client_jaas.conf:/etc/kafka/secrets/jaas/zk_client_jaas.conf
networks:
smo:
aliases:
- kafka
# ports:
# - 9092:9092
dmaap-message-router:
image: ${DMAAP_MR_IMAGE}
container_name: dmaap-message-router
depends_on:
- dmaap-zookeeper
- dmaap-kafka
environment:
enableCadi: 'false'
volumes:
- ./dmaap/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
- ./dmaap/logback.xml:/appl/dmaapMR1/bundleconfig/etc/logback.xml
- ./dmaap/cadi.properties:/appl/dmaapMR1/etc/cadi.properties
networks:
smo:
aliases:
- dmaap
# ports:
# - 3904:3904
# - 3905:3905
dmaap-zookeeper:
image: ${DMAAP_ZOOKEEPER_IMAGE}
container_name: dmaap-zookeeper
hostname: zookeeper
environment:
KAFKA_OPTS: -Djava.security.auth.login.config=/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
-Dzookeeper.kerberos.removeHostFromPrincipal=true -Dzookeeper.kerberos.removeRealmFromPrincipal=true
-Dzookeeper.authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider
-Dzookeeper.requireClientAuthScheme=sasl
ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: 24
ZOOKEEPER_AUTOPURGE_SNAP_RETAIN_COUNT: 3
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_INIT_LIMIT: 10
ZOOKEEPER_MAX_CLIENT_CNXNS: 200
ZOOKEEPER_REPLICAS: 1
ZOOKEEPER_SERVER_ID: null
ZOOKEEPER_SYNC_LIMIT: 5
ZOOKEEPER_TICK_TIME: 2000
volumes:
- ./dmaap/zk_server_jaas.conf:/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
# ports:
# - 2181:2181
networks:
smo:
aliases:
- zookeeper
dmaap-dr-mariadb:
image: ${DMAAP_DR_DB_IMAGE}
container_name: dmaap-dr-mariadb
hostname: mariadb
environment:
MYSQL_DATABASE: datarouter
MYSQL_PASSWORD: datarouter
MYSQL_ROOT_PASSWORD: datarouter
MYSQL_USER: datarouter
healthcheck:
interval: 10s
retries: 5
test:
- CMD
- mysqladmin
- ping
- -h
- localhost
- --silent
timeout: 30s
networks:
- smo
# ports:
# - ${DMAAP_DR_DB_PORT}:3306
networks:
oam:
external: true
smo:
external: true
traefik-proxy:
external: true

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Sample PM File. All values are hypothetical but syntactically correct -->
<measCollecFile xmlns="http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measCollec"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measCollec">
<fileHeader fileFormatVersion="32.435 v6.1" vendorName="Open Air Interface" dnPrefix="SubNetwork=1">
<fileSender elementType="Element Manager" localDn="OMC_PS=10"/>
<measCollec beginTime="2023-03-20T13:00:00+00:00"/>
</fileHeader>
<measData>
<managedElement localDn="ManagedElement=OAI gNodeB" userLabel="SGSN" swVersion="R30.1.5"/>
<measInfo measInfoId="Category A">
<job jobId="01"/>
<granPeriod endTime="2023-03-20T13:15:00+00:00" duration="PT900S"/>
<repPeriod duration="PT1800S"/>
<measTypes>MM.AttGprsAttach MM.SuccGprsAttach MM. AbortedGprsAttach MM.AttIntraSgsnRaUpdate</measTypes>
<measValue measObjLdn="SgsnFunction=1">
<measResults>10 20 30 40</measResults>
</measValue>
</measInfo>
<measInfo measInfoId="Category B">
<job jobId="02"/>
<granPeriod endTime="2023-03-20T13:15:00+00:00" duration="PT900S"/>
<repPeriod duration="PT1800S"/>
<measTypes>MM.AttCombiAttach MM.SuccCombiAttach MM. MM.AbortedCombiAttachMM.AttCombiDetachMs</measTypes>
<measValue measObjLdn="SgsnFunction=2">
<measResults>10 20 30 40</measResults>
</measValue>
</measInfo>
<measInfo measInfoId="Category C">
<job jobId="03"/>
<granPeriod endTime="2023-03-20T13:15:00+00:00" duration="PT1800S"/>
<repPeriod duration="PT900S"/>
<measTypes>MM.AttPsPagingProcIu MM.SuccPsPagingProcIu</measTypes>
<measValue measObjLdn="SgsnFunction=3">
<measResults>25 25</measResults>
</measValue>
</measInfo>
</measData>
<fileFooter>
<measCollec endTime="2023-03-20T13:15:00+00:00"/>
</fileFooter>
</measCollecFile>

292
integration/gNodeB/gnb.conf Normal file
View File

@@ -0,0 +1,292 @@
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; sd = 0x000001; }) });
nr_cellid = 12345678L;
////////// Physical parameters:
do_CSIRS = 1;
do_SRS = 1;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640008;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 106;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 28875;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ( { ipv4 = "127.0.0.5";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "lo";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "127.0.0.1/24";
GNB_INTERFACE_NAME_FOR_NGU = "lo";
GNB_IPV4_ADDRESS_FOR_NGU = "127.0.0.1/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
pucch_TargetSNRx10 = 200;
ulsch_max_frame_inactivity = 0;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 30;
att_rx = 30;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
clock_src = "internal";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
rfsimulator :
{
serveraddr = "server";
serverport = "4043";
options = (); #("saviq"); or/and "chanmod"
modelname = "AWGN";
IQfile = "/tmp/rfsimulator.iqs";
};
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
# config for O1 (netconf and ves)
o1Config :
{
nfNodeId = "gnb-test01";
netconfUsername = "netconf";
netconfPassword = "netconf!";
netconfPort = 58300;
netconfHost = "192.168.5.207";
vesUrl = "https://dcae-ves-collector:8443/eventListener/v7";
vesBasicAuthUsername = "sample1";
vesBasicAuthPassword = "sample1";
vesNfVendorName = "OpenAirInterface";
vesNfNamingCode = "OGNB";
vesOamIpv6 = "";
vesFtpServerPort = 21;
vesFtpServerListenAddress = "0.0.0.0";
demoAlarmingInterval = 30;
};
log_config :
{
global_log_level ="debug";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
ngap_log_level ="info";
f1ap_log_level ="info";
};

View File

@@ -0,0 +1,274 @@
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; sd = 0x000001; }) });
nr_cellid = 12345678L;
////////// Physical parameters:
do_CSIRS = 1;
do_SRS = 1;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640008;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 106;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 28875;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ( { ipv4 = "172.22.0.10";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "eno1";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.5.207/24";
GNB_INTERFACE_NAME_FOR_NGU = "eno1";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.5.207/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
pucch_TargetSNRx10 = 200;
ulsch_max_frame_inactivity = 0;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 30;
att_rx = 30;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
clock_src = "internal";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
rfsimulator :
{
serveraddr = "server";
serverport = "4043";
options = (); #("saviq"); or/and "chanmod"
modelname = "AWGN";
IQfile = "/tmp/rfsimulator.iqs";
};
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
ngap_log_level ="info";
f1ap_log_level ="info";
};

274
integration/gNodeB/nr.conf Normal file
View File

@@ -0,0 +1,274 @@
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; sd = 0x000001; }) });
nr_cellid = 12345678L;
////////// Physical parameters:
do_CSIRS = 1;
do_SRS = 1;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 12;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 43 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 641280;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640008;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 106;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 28875; # 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 12;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 106;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 28875;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ( { ipv4 = "127.0.0.5";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "lo";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "127.0.0.1/24";
GNB_INTERFACE_NAME_FOR_NGU = "lo";
GNB_IPV4_ADDRESS_FOR_NGU = "127.0.0.1/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
pucch_TargetSNRx10 = 200;
ulsch_max_frame_inactivity = 0;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 100;
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 30;
att_rx = 30;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
clock_src = "internal";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
rfsimulator :
{
serveraddr = "server";
serverport = "4043";
options = (); #("saviq"); or/and "chanmod"
modelname = "AWGN";
IQfile = "/tmp/rfsimulator.iqs";
};
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level ="info";
hw_log_level ="info";
phy_log_level ="info";
mac_log_level ="info";
rlc_log_level ="info";
pdcp_log_level ="info";
rrc_log_level ="info";
ngap_log_level ="info";
f1ap_log_level ="info";
};

View File

@@ -0,0 +1,2 @@
keys0.zip
***********

Binary file not shown.

View File

@@ -0,0 +1,51 @@
[aai]
aaiPropertiesFile=null
aaiUrl=off
aaiHeaders=["X-TransactionId: 9999"]
aaiDeleteOnMountpointRemove=false
aaiTrustAllCerts=false
aaiApiVersion=aai/v13
aaiClientConnectionTimeout=30000
aaiApplicationId=SDNR
aaiReadTimeout=60000
aaiUserCredentials=
aaiPcks12ClientCertFile=
aaiPcks12ClientCertPassphrase=
[devicemonitor]
SeverityconnectionLossOAM=Major
SeverityconnectionLossMediator=Major
SeverityconnectionLossNeOAM=Major
[dmonf]
pollAlarms=false
[toggleAlarmFilter]
taEnabled=true
taDelay=3000
[housekeeping]
hkEnabled=false
[dcae]
dcaeUrl=off
dcaeUserCredentials=admin:admin
dcaeHeartbeatPeriodSeconds=120
[pm]
pmEnabled=true
[VESCollector]
VES_COLLECTOR_ENABLED=false
VES_COLLECTOR_TLS_ENABLED=false
VES_COLLECTOR_TRUST_ALL_CERTS=false
VES_COLLECTOR_USERNAME=sample1
VES_COLLECTOR_PASSWORD=sample1
VES_COLLECTOR_IP=127.0.0.1
VES_COLLECTOR_PORT=8080
VES_COLLECTOR_VERSION=v7
REPORTING_ENTITY_NAME=ONAP SDN-R
EVENTLOG_MSG_DETAIL=SHORT
[dmonf14]
useDomApi=${SDNR_ONF14_USEDOMAPI}

View File

@@ -0,0 +1,43 @@
[stndDefinedFault]
topic=unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
consumerGroup=myG
consumerID=C1
timeout=20000
limit=10000
fetchPause=5000
[general]
baseUrl=http://localhost:8181
sdnrUser=admin
sdnrPasswd=${ODL_ADMIN_PASSWORD}
[strimzi-kafka]
strimziEnabled=true
bootstrapServers=kafka:9092
securityProtocol=PLAINTEXT
saslMechanism=PLAIN
saslJaasConfig=PLAIN
[fault]
topic=unauthenticated.SEC_FAULT_OUTPUT
consumerGroup=myG
consumerID=C1
timeout=20000
limit=10000
fetchPause=5000
[provisioning]
topic=unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT
consumerGroup=myG
consumerID=C1
timeout=20000
limit=10000
fetchPause=5000
[pnfRegistration]
topic=unauthenticated.VES_PNFREG_OUTPUT
consumerGroup=myG
consumerID=C1
timeout=20000
limit=10000
fetchPause=5000

View File

@@ -0,0 +1,121 @@
<?xml version="1.0" ?>
<!--
~ ============LICENSE_START=======================================================
~ ONAP : ccsdk features
~ ================================================================================
~ Copyright (C) 2021 highstreet technologies GmbH Intellectual Property.
~ 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=======================================================
~
-->
<shiro-configuration xmlns="urn:opendaylight:aaa:app:config">
<main>
<pair-key>tokenAuthRealm</pair-key>
<pair-value>org.onap.ccsdk.features.sdnr.wt.oauthprovider.OAuth2Realm</pair-value>
</main>
<main>
<pair-key>securityManager.realms</pair-key>
<pair-value>$tokenAuthRealm</pair-value>
</main>
<!-- Used to support OAuth2 use case. -->
<main>
<pair-key>authcBasic</pair-key>
<pair-value>org.opendaylight.aaa.shiro.filters.ODLHttpAuthenticationFilter</pair-value>
</main>
<main>
<pair-key>anyroles</pair-key>
<pair-value>org.onap.ccsdk.features.sdnr.wt.oauthprovider.filters.AnyRoleHttpAuthenticationFilter</pair-value>
</main>
<main>
<pair-key>authcBearer</pair-key>
<!-- <pair-value>org.apache.shiro.web.filter.authc.BearerHttpAuthenticationFilter</pair-value>-->
<pair-value>org.onap.ccsdk.features.sdnr.wt.oauthprovider.filters.BearerAndBasicHttpAuthenticationFilter</pair-value>
</main>
<!-- in order to track AAA challenge attempts -->
<main>
<pair-key>accountingListener</pair-key>
<pair-value>org.opendaylight.aaa.shiro.filters.AuthenticationListener</pair-value>
</main>
<main>
<pair-key>securityManager.authenticator.authenticationListeners</pair-key>
<pair-value>$accountingListener</pair-value>
</main>
<!-- Model based authorization scheme supporting RBAC for REST endpoints -->
<main>
<pair-key>dynamicAuthorization</pair-key>
<pair-value>org.onap.ccsdk.features.sdnr.wt.oauthprovider.filters.CustomizedMDSALDynamicAuthorizationFilter</pair-value>
</main>
<urls>
<pair-key>/**/operations/cluster-admin**</pair-key>
<pair-value>authcBearer, roles[admin]</pair-value>
</urls>
<urls>
<pair-key>/**/v1/**</pair-key>
<pair-value>authcBearer, roles[admin]</pair-value>
</urls>
<!-- allow admin only access to write mdsal auth config -->
<urls>
<pair-key>/rests/**/aaa*/**</pair-key>
<pair-value>authcBearer, roles[admin]</pair-value>
</urls>
<!-- anon access for login api -->
<urls>
<pair-key>/oauth/**</pair-key>
<pair-value>anon</pair-value>
</urls>
<urls>
<pair-key>/ready</pair-key>
<pair-value>anon</pair-value>
</urls>
<!-- anon access for odlux ui -->
<urls>
<pair-key>/odlux/**</pair-key>
<pair-value>anon</pair-value>
</urls>
<!-- admin only access for apidocs -->
<urls>
<pair-key>/apidoc/**</pair-key>
<pair-value>authcBasic, roles[admin]</pair-value>
</urls>
<!-- these two rules are needed for installCerts.py -->
<urls>
<pair-key>/rests/data/network-topology:network-topology</pair-key>
<pair-value>authcBearer, roles[admin]</pair-value>
</urls>
<urls>
<pair-key>/rests/operations/netconf-keystore*</pair-key>
<pair-value>authcBearer, roles[admin]</pair-value>
</urls>
<!-- rfc8040 restconf access with configured dynamic filter -->
<urls>
<pair-key>/rests/**</pair-key>
<pair-value>authcBearer, roles[admin]</pair-value>
</urls>
<!-- any other access with configured dynamic filter -->
<urls>
<pair-key>/**</pair-key>
<pair-value>authcBearer, roles[admin]</pair-value>
</urls>
</shiro-configuration>

View File

@@ -0,0 +1,8 @@
{
"tokenSecret": "my-secret",
"tokenIssuer": "ONAP-SDNC",
"publicUrl": "${SDNC_WEB_URL}",
"redirectUri": "/odlux/index.html#/oauth?token=",
"supportOdlUsers": "true",
"providers": []
}

View File

@@ -0,0 +1,12 @@
set -o xtrace
$GATEWAY_IP=
echo "Setup data router"
docker exec -i datarouter-prov sh -c "curl -X PUT http://dmaap-dr-prov:8080/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$GATEWAY_IP -v"
docker exec -i datarouter-prov sh -c "curl -X PUT http://dmaap-dr-prov:8080/internal/api/NODES?val=dmaap-dr-node\|$GATEWAY_IP -v"
echo "Create data router feed for pmmapper"
curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @./pm-bulk/createFeed.json --post301 --location-trusted -k http://localhost:$DMAAP_DR_PROV_PORT_2
echo "Subscriber pmmaper to data-router feed"
curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @./pm-bulk/addSubscriber.json --post301 --location-trusted -k http://localhost:$DMAAP_DR_PROV_PORT_2/subscribe/1

1
schema-map.json Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

200
specification/README.md Normal file
View File

@@ -0,0 +1,200 @@
# Yang Specification
## Important
It is not allowed to publish any of the 3gpp yang specifications in any kind of repository or something similar.
Please use the ```get-yangs.sh``` script to download the yang files. Th
All yang spec files to implement will be in the ```yang``` folder. Based on this tree and xml files can be generated with the ```generate-parts.sh``` script.
For the O-RAN O1 interface the 3GPP yang files(see sources) are the entrypoint, especially the ```_3gpp-common-managed-element.yang``` and in there its list of ```ManagedElement```s. These are then extended dependent on their functions with e.g. ```_3gpp-nr-nrm-gnbdufunction.yang```.
n
## Mapping
## VES Messages
### pnfRegistration
![pnfVesRegistration](https://wiki.onap.org/download/temp/plantuml7552781749771260603.png?contentType=image/png)
POST /eventListener/v7
```
{
"event": {
"commonEventHeader": {
"domain": "pnfRegistration",
"eventId": "pnfRegistration_EventType5G",
"eventName": "pnfRegistration_EventType5G",
"eventType": "EventType5G",
"sequence": @seqenceId@,
"priority": "Low",
"reportingEntityId": "",
"reportingEntityName": "@hostname@",
"sourceId": "",
"sourceName": "@pnfId@",
"startEpochMicrosec": "@timestamp@",
"lastEpochMicrosec": "@timestamp@",
"nfNamingCode": "@type@",
"nfVendorName": "@vendor@",
"timeZoneOffset": "+00:00",
"version": "4.1",
"vesEventListenerVersion": "7.2.1"
},
"pnfRegistrationFields": {
"pnfRegistrationFieldsVersion": "2.1",
"lastServiceDate": "2021-03-26",
"macAddress": "@macAddress@",
"manufactureDate": "2021-01-16",
"modelNumber": "@model@",
"oamV4IpAddress": "@oamIp@",
"oamV6IpAddress": "@oamIpV6@",
"serialNumber": "@vendor@-@type@-@oamIp@-@model@",
"softwareVersion": "2.3.5",
"unitFamily": "@vendor@-@type@",
"unitType": "@type@",
"vendorName": "@vendor@",
"additionalFields": {
"oamPort": "830",
"protocol": "SSH",
"username": "netconf",
"password": "netconf",
"reconnectOnChangedSchema": "false",
"sleep-factor": "1.5",
"tcpOnly": "false",
"connectionTimeout": "20000",
"maxConnectionAttempts": "100",
"betweenAttemptsTimeout": "2000",
"keepaliveDelay": "120"
}
}
}
}
```
### File based performance monitoring management
![Performance monitoring management](https://wiki.onap.org/download/temp/plantuml8525192104339431559.png?contentType=image/png)
```
POST /eventListener/v7
{
"event": {
"commonEventHeader": {
"domain": "stndDefined",
"eventId": "@eventId@",
"eventName": "stndDefined_performanceMeasurementStreaming_15m",
"eventType": "performanceMeasurementStreaming_15m",
"sequence": @seqId@,
"priority": "Low",
"reportingEntityId": "",
"reportingEntityName": "@hostname@",
"sourceId": "",
"sourceName": "@pnfId@",
"startEpochMicrosec": "@collectionStartTime@",
"lastEpochMicrosec": "@collectionEndTime@",
"internalHeaderFields": {
"intervalStartTime": "@intervalStartTime@",
"intervalEndTime": "@intervalEndTime@"
},
"version": "4.1",
"vesEventListenerVersion": "7.2.1"
},
...TBD (talk to alex)
}
}
```
### pnf Alarming
![pnf Alarming](https://wiki.onap.org/download/temp/plantuml4369307977353937036.png?contentType=image/png)
```
POST /eventListener/v7
{
"event": {
"commonEventHeader": {
"domain": "stndDefined",
"eventId": "stndDefined_O_RAN_COMPONENT_Alarms_@alarm@",
"eventName": "stndDefined_O_RAN_COMPONENT_Alarms_@alarm@",
"eventType": "O_RAN_COMPONENT_Alarms",
"sequence": @seqId@,
"priority": "Low",
"reportingEntityId": "",
"reportingEntityName": "@hostname@",
"sourceId": "",
"sourceName": "@pnfId@",
"startEpochMicrosec": "@timestamp@",
"lastEpochMicrosec": "@timestamp@",
"nfNamingCode": "@type@",
"nfVendorName": "@vendor@",
"timeZoneOffset": "+00:00",
"version": "4.1",
"stndDefinedNamespace": "3GPP-FaultSupervision",
"vesEventListenerVersion": "7.2.1"
},
"stndDefinedFields": {
"schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/-/raw/Rel-16/OpenAPI/TS28532_FaultMnS.yaml#components/schemas/NotifyNewAlarm",
"data": {
"href": "href1",
"notificationId": 0,
"notificationType": "notifyNewAlarm",
"eventTime": "@eventTime@",
"systemDN": "xyz",
"alarmId": "@alarm@",
"alarmType": "COMMUNICATIONS_ALARM",
"probableCause": "@alarm@",
"specificProblem": "@alarm@",
"perceivedSeverity": "@severity@",
"backedUpStatus": true,
"backUpObject": "xyz",
"trendIndication": "MORE_SEVERE",
"thresholdInfo": {
"observedMeasurement": "new",
"observedValue": 123.1
},
"correlatedNotifications": [],
"stateChangeDefinition": [{ "operational-state": "DISABLED" }],
"monitoredAttributes": {
"interface": "@interface@"
},
"proposedRepairActions": "Call the police!",
"additionalText": "O-RAN Software Community OAM",
"additionalInformation": {
"eventTime": "@eventTime@",
"equipType": "@type@",
"vendor": "@vendor@",
"model": "@model@"
},
"rootCauseIndicator": false
},
"stndDefinedFieldsVersion": "1.0"
}
}
}
```
## Sources:
- https://forge.3gpp.org/rep/sa5/MnS/-/tree/Rel-18
- https://wiki.o-ran-sc.org/display/OAM/OAM+Architecture
- https://wiki.onap.org/display/DW/SDN-R:+PNF+registration
- https://gerrit.o-ran-sc.org/r/gitweb?p=oam.git;a=tree;f=code/client-scripts-ves-v7;h=7ab5e1ce30d5d12be1dec53e54746b234bc76e69;hb=refs/heads/g-release
- https://netopeer.liberouter.org/doc/sysrepo/master/html/index.html
- https://gitlab.eurecom.fr/mosaic5g/flexric
## Abbreviations
- OAI...OpenAirInterface
- CM....Configuration Management
- FM....Fault Management
- PM....Performance Management
- CU....Centralized Unit
- CUCP..Centralized Unit Control Plane
- CUUP..Centralized Unit User Plane
- DU....Distributed Unit

67
specification/generate-parts.sh Executable file
View File

@@ -0,0 +1,67 @@
#!/bin/bash
DIRBIN="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
pyang=$(which pyang)
yanglint=$(which yanglint)
OUTPUT_GNODEB="$DIRBIN/xml/gnodeb"
OUTPUT_CU="$DIRBIN/xml/cu"
OUTPUT_DU="$DIRBIN/xml/du"
if [ -z "$pyang" ]; then
echo "no executable for pyang forund. please install with pip3 install pyang"
exit 1
fi
if [ ! -d "$DIRBIN/xml" ]; then
mkdir "$DIRBIN/xml"
fi
case "$1" in
validate)
$pyang --strict "$DIRBIN/yang/"*.yang
if [ $? -eq 0 ]; then
echo "yang files are consistent"
else
echo "there is an inconsistency in the yang files"
fi
$yanglint --strict -p "$DIRBIN/yang/" "$DIRBIN/xml/gnodeb_filled.xml"
#$pyang --lint "$DIRBIN/yang/"*.yang
;;
cu)
$pyang "$DIRBIN/yang/"*common*.yang \
"$DIRBIN/yang/"ietf*.yang \
"$DIRBIN/yang/_3gpp-nr-nrm-gnbcucpfunction.yang" \
"$DIRBIN/yang/_3gpp-nr-nrm-gnbcuupfunction.yang" \
-f tree > $OUTPUT_CU.tree
$pyang "$DIRBIN/yang/"*common*.yang \
"$DIRBIN/yang/"ietf*.yang \
"$DIRBIN/yang/_3gpp-nr-nrm-gnbcucpfunction.yang" \
"$DIRBIN/yang/_3gpp-nr-nrm-gnbcuupfunction.yang" \
-f sample-xml-skeleton \
--sample-xml-skeleton-defaults \
--sample-xml-skeleton-annotations > $OUTPUT_CU.xml
;;
du)
$pyang "$DIRBIN/yang/"*common*.yang \
"$DIRBIN/yang/"ietf*.yang \
"$DIRBIN/yang/_3gpp-nr-nrm-gnbdufunction.yang" \
-f tree > $OUTPUT_DU.tree
$pyang "$DIRBIN/yang/"*common*.yang \
"$DIRBIN/yang/"ietf*.yang \
"$DIRBIN/yang/_3gpp-nr-nrm-gnbdufunction.yang" \
-f sample-xml-skeleton \
--sample-xml-skeleton-defaults \
--sample-xml-skeleton-annotations > $OUTPUT_DU.xml
;;
gnodeb|*)
$pyang "$DIRBIN/yang/"*.yang -f tree > $OUTPUT_GNODEB.tree
$pyang "$DIRBIN/yang/"*.yang \
-f sample-xml-skeleton \
--sample-xml-skeleton-defaults \
--sample-xml-skeleton-annotations > $OUTPUT_GNODEB.xml
;;
esac;

48
specification/get-yangs.sh Executable file
View File

@@ -0,0 +1,48 @@
#!/bin/bash
DIRBIN="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
DIR_AVAILABLE_YANGS="$DIRBIN/available-yangs"
DIR_YANGS="$DIRBIN/yang"
FILE_DOWNLOADZIP="$DIRBIN/yangs.zip"
TMPFOLDER="/tmp/o1-yangs"
UNZIP=$(which unzip)
if [ -z "$UNZIP" ]; then
echo "unable to find unzip. please install."
exit 1
fi
# download
if [ ! -f "$FILE_DOWNLOADZIP" ]; then
wget -O "$FILE_DOWNLOADZIP" "https://forge.3gpp.org/rep/sa5/MnS/-/archive/Rel-18/MnS-Rel-18.zip?path=yang-models"
fi
if [ ! -d "$DIR_AVAILABLE_YANGS" ]; then
mkdir "$DIR_AVAILABLE_YANGS"
fi
# cleanup yang folders
rm -rf "$DIR_AVAILABLE_YANGS/"*
rm "$DIR_YANGS/*"
unzip -uj yangs.zip -d "$TMPFOLDER"
cp -r "$TMPFOLDER/"* "$DIR_AVAILABLE_YANGS/"
rm "$FILE_DOWNLOADZIP"
# fill yang folder
cp "$DIR_AVAILABLE_YANGS/"_3gpp-common*.yang "$DIR_YANGS"
cp "$DIR_AVAILABLE_YANGS/"ietf-*.yang "$DIR_YANGS/"
declare special_files=(
"_3gpp-5g-common-yang-types.yang"
"_3gpp-5gc-nrm-configurable5qiset.yang"
"_3gpp-nr-nrm-bwp.yang"
"_3gpp-nr-nrm-ep.yang"
"_3gpp-nr-nrm-gnbcucpfunction.yang"
"_3gpp-nr-nrm-gnbcuupfunction.yang"
"_3gpp-nr-nrm-gnbdufunction.yang"
"_3gpp-nr-nrm-nrsectorcarrier.yang"
"_3gpp-nr-nrm-nrcelldu.yang"
)
for file in "${special_files[@]}"
do
cp "$DIR_AVAILABLE_YANGS/$file" "$DIR_YANGS/"
done

45
specification/install-yangs.sh Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/bash
DIRBIN="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
DIR_YANGS="$DIRBIN/yang"
declare yang_files=(
"ietf-inet-types.yang"
"ietf-yang-schema-mount@2019-01-14.yang"
"ietf-yang-types@2013-07-15.yang"
"_3gpp-common-yang-extensions.yang"
"_3gpp-common-yang-types.yang"
"_3gpp-common-top.yang"
"_3gpp-common-files.yang"
"_3gpp-common-measurements.yang"
"_3gpp-common-ep-rp.yang"
"_3gpp-common-subscription-control.yang"
"_3gpp-common-fm.yang"
"_3gpp-common-trace.yang"
"_3gpp-common-subnetwork.yang"
"_3gpp-common-managed-element.yang"
"_3gpp-5gc-nrm-configurable5qiset.yang"
"_3gpp-5g-common-yang-types.yang"
"_3gpp-common-managed-function.yang"
"_3gpp-common-managementdatacollection.yang"
"_3gpp-common-mnsregistry.yang"
"_3gpp-common-qmcjob.yang"
"_3gpp-nr-nrm-gnbdufunction.yang"
"_3gpp-nr-nrm-gnbcucpfunction.yang"
"_3gpp-nr-nrm-gnbcuupfunction.yang"
"_3gpp-nr-nrm-bwp.yang"
"_3gpp-nr-nrm-nrcelldu.yang"
"_3gpp-nr-nrm-nrsectorcarrier.yang"
"_3gpp-common-filemanagement.yang"
"_3gpp-nr-nrm-ep.yang"
)
for file in "${yang_files[@]}"
do
echo "$DIR_YANGS/$file"
sysrepoctl -i "$DIR_YANGS/$file"
done
sysrepoctl -c _3gpp-common-managed-function -e MeasurementsUnderManagedFunction
sysrepoctl -c _3gpp-common-managed-element -e FmUnderManagedElement

View File

@@ -0,0 +1,98 @@
from typing import List
import re
class YangTreeItem:
def __init__(self, name:str, access:str, listKey:str=None, mandatory=False, type:str=None ) -> None:
self.children:List[YangTreeItem]=[]
self.name = name
self.access = access
self.listKey = listKey
self.mandatory = mandatory
self.type = type
def addChild(self, item):
self.children.append(item)
def __str__(self) -> str:
s=f'YangTreeItem[name={self.name}, access={self.access}]'
@staticmethod
def fromMatch(match:re.Match):
indent = len(match.group(1))
treeLevel = 0 if indent==2 else int((indent-2)/3)
access = match.group(2)
name = match.group(3)
listKey = match.group(6)
hasStar = match.group(4)
itemType = "list" if listKey is not None else "container" if match.group(7) is None else match.group(7)
item = YangTreeItem(name, access, listKey=listKey, mandatory=hasStar, type=itemType)
return treeLevel, item
class YangTreeModule:
def __init__(self, name:str) -> None:
self.name = name
self.elems:List[YangTreeItem]=[]
def addRootElem(self, item:YangTreeItem) -> None:
self.elems.append(item)
def __str__(self) -> str:
s=f'YangTreeModule[name={self.name}, elems=\n'
for elem in self. elems:
s+=f'{elem}\n'
s+="]"
return s
class TreeFile:
REGEX_MODULE = r"^module:\ (.*)$"
#REGEX_ITEMS = r"^([\ |]+)\+--([rwo]+)\ ([^*\ \?]+)([\*\?]?)(\ +(\[([^\]]+)\])?([^\ ]+)?)?$"
REGEX_ITEMS = r"^([\ |]+)\+--([rwo:]+)\ ([^*\ \?]+)([\*\?]?)(\ \[([^\]]+)\])?"
def __init__(self, filename:str) -> None:
self.filename = filename
def parse(self)->List[YangTreeModule]:
modules = []
curModule:YangTreeModule=None
curItems=dict()
curItem=None
with open(self.filename) as fp:
line = fp.readline()
while line is not None:
print(f'parsing line {line}')
matches = re.finditer(TreeFile.REGEX_MODULE, line)
match = next(matches, None)
# found new module
if match is not None:
if curModule is not None:
modules.append(curModule)
curModule = YangTreeModule(match.group(1))
else:
matches = re.finditer(TreeFile.REGEX_ITEMS, line)
match = next(matches, None)
# found new container|list|...
if match is not None:
treeLevel, item = YangTreeItem.fromMatch(match)
if treeLevel == 0:
curModule.addRootElem(item)
else:
curItems[treeLevel-1].addChild(item)
curItems[treeLevel]=item
curItem=item
else:
line = fp.readline()
for module in modules:
print(module)
file = TreeFile('specification/xml/gnodeb.tree')
file.parse()

30
specification/test.py Normal file
View File

@@ -0,0 +1,30 @@
import xml.etree.ElementTree as ET
def merge_xml_tree(xml_file, tree_file):
# Parse the XML and tree files
xml_tree = ET.parse(xml_file)
tree_tree = ET.parse(tree_file)
# Get the root element of the XML tree
root = xml_tree.getroot()
# Iterate over the elements in the tree tree
for tree_element in tree_tree.iter():
# Find the corresponding element in the XML tree
xml_element = root.find(tree_element.tag)
# If the element exists in the XML tree, add the 'rw' or 'ro' attribute
if xml_element is not None:
xml_element.set('access', tree_element.get('rw', 'ro'))
# Return the merged XML tree as a string
return ET.tostring(root)
# Example usage
xml_file = 'xml/gnodeb.xml'
tree_file = 'xml/gnodeb.tree'
merged_xml = merge_xml_tree(xml_file, tree_file)
print(merged_xml)

1086
specification/xml/cu.tree Normal file

File diff suppressed because it is too large Load Diff

0
specification/xml/cu.xml Normal file
View File

861
specification/xml/du.tree Normal file
View File

@@ -0,0 +1,861 @@
module: _3gpp-common-managed-element
+--rw ManagedElement* [id]
+--rw id string
+--rw attributes
| +--rw dnPrefix? types3gpp:DistinguishedName
| +--rw userLabel? string
| +--ro locationName? string
| +--ro managedBy* types3gpp:DistinguishedName
| +--ro managedElementTypeList* string
| +--ro SupportedPerfMetricGroup* []
| | +--ro performanceMetrics* string
| | +--ro granularityPeriods* uint32
| | +--ro reportingMethods* enumeration
| | +--ro monitorGranularityPeriods* uint32
| +--ro vendorName? string
| +--rw userDefinedState? string
| +--ro swVersion? string
| +--rw priorityLabel uint32
+--rw PerfMetricJob* [id] {MeasurementsUnderManagedElement}?
| +--rw id string
| +--rw attributes
| | +--rw administrativeState? types3gpp:AdministrativeState
| | +--ro operationalState types3gpp:OperationalState
| | +--rw jobId? string
| | +--rw performanceMetrics* string
| | +--rw granularityPeriod uint32
| | +--rw objectInstances* types3gpp:DistinguishedName
| | +--rw rootObjectInstances* types3gpp:DistinguishedName
| | +--rw (reportingCtrl)
| | | +--:(file-based-reporting)
| | | | +--rw fileReportingPeriod uint32
| | | | +--rw (reporting-target)?
| | | | +--:(file-target)
| | | | | +--rw fileLocation? string
| | | | +--:(notification-target)
| | | | +--rw notificationRecipientAddress? string
| | | +--:(stream-based-reporting)
| | | +--rw streamTarget string
| | +--ro _linkToFiles string
| +--ro Files* [id]
| +--ro id string
| +--ro attributes
| | +--ro numberOfFiles? uint64
| | +--ro jobRef* types3gpp:DistinguishedName
| | +--ro jobId? string
| +--ro File* [id]
| +--ro id string
| +--ro attributes
| +--ro fileLocation inet:uri
| +--ro fileCompression string
| +--ro fileSize uint64
| +--ro fileDataType enumeration
| +--ro fileFormat string
| +--ro fileReadyTime yang:date-and-time
| +--ro fileExpirationTime yang:date-and-time
| +--ro fileContent string
| +--ro jobRef* types3gpp:DistinguishedName
| +--ro jobId? string
+--rw ThresholdMonitor* [id] {MeasurementsUnderManagedElement}?
| +--rw id string
| +--rw attributes
| +--rw administrativeState? types3gpp:AdministrativeState
| +--ro operationalState types3gpp:OperationalState
| +--rw thresholdInfoList* [idx]
| | +--rw idx uint32
| | +--rw measurementTypes* string
| | +--rw thresholdLevel uint64
| | +--rw thresholdDirection enumeration
| | +--rw thresholdValue union
| | +--rw hysteresis? union
| +--rw monitorGranularityPeriod uint32
| +--rw objectInstances* types3gpp:DistinguishedName
| +--rw rootObjectInstances* types3gpp:DistinguishedName
+--rw NtfSubscriptionControl* [id] {SubscriptionControlUnderManagedElement}?
| +--rw id string
| +--rw attributes
| | +--rw notificationRecipientAddress string
| | +--rw notificationTypes* string
| | +--rw scope* [scopeType]
| | | +--rw scopeType enumeration
| | | +--rw scopeLevel uint16
| | +--rw notificationFilter? string
| +--rw HeartbeatControl* [id]
| +--rw id string
| +--rw attributes
| +--rw heartbeatNtfPeriod uint32
| +--rw triggerHeartbeatNtf? boolean
+--rw AlarmList* [id] {FmUnderManagedElement}?
| +--rw id string
| +--rw attributes
| +--rw administrativeState? types3gpp:AdministrativeState
| +--ro operationalState? types3gpp:OperationalState
| +--ro numOfAlarmRecords uint32
| +--ro lastModification? yang:date-and-time
| +--rw alarmRecords* [alarmId]
| +--rw alarmId string
| +--ro objectInstance string
| +--ro notificationId int32
| +--ro alarmRaisedTime? yang:date-and-time
| +--ro alarmChangedTime? yang:date-and-time
| +--ro alarmClearedTime? yang:date-and-time
| +--ro alarmType? eventType
| +--ro probableCause? string
| +--ro specificProblem? string
| +--rw perceivedSeverity? severity-level
| +--ro backedUpStatus? string
| +--ro backUpObject? string
| +--ro trendIndication? string
| +--ro thresholdInfo* []
| | +--ro measurementType string
| | +--ro direction enumeration
| | +--ro thresholdLevel? string
| | +--ro thresholdValue? string
| | +--ro hysteresis? string
| +--ro stateChangeDefinition? string
| +--ro monitoredAttributes? string
| +--ro proposedRepairActions? string
| +--ro additionalText? string
| +--ro additionalInformation? <anydata>
| +--ro rootCauseIndicator? enumeration
| +--ro ackTime? yang:date-and-time
| +--rw ackUserId? string
| +--rw ackSystemId? string
| +--rw ackState? enumeration
| +--rw clearUserId? string
| +--rw clearSystemId? string
| +--ro serviceUser? string
| +--ro serviceProvider? string
| +--ro securityAlarmDetector? string
+--rw TraceJob* [id] {TraceUnderManagedElement}?
| +--rw id string
| +--rw attributes
| | +--rw tjJobType? enumeration
| | +--rw tjListOfInterfaces* [idx]
| | | +--rw idx uint32
| | | +--rw MSCServerInterfaces* enumeration
| | | +--rw MGWInterfaces* enumeration
| | | +--rw RNCInterfaces* enumeration
| | | +--rw SGSNInterfaces* enumeration
| | | +--rw GGSNInterfaces* enumeration
| | | +--rw S-CSCFInterfaces* enumeration
| | | +--rw P-CSCFInterfaces* enumeration
| | | +--rw I-CSCFInterfaces* enumeration
| | | +--rw MRFCInterfaces* enumeration
| | | +--rw MGCFInterfaces* enumeration
| | | +--rw IBCFInterfaces* enumeration
| | | +--rw E-CSCFInterfaces* enumeration
| | | +--rw BGCFInterfaces* enumeration
| | | +--rw ASInterfaces* enumeration
| | | +--rw HSSInterfaces* enumeration
| | | +--rw EIRInterfaces* enumeration
| | | +--rw BM-SCInterfaces* enumeration
| | | +--rw MMEInterfaces* enumeration
| | | +--rw SGWInterfaces* enumeration
| | | +--rw PDN_GWInterfaces* enumeration
| | | +--rw eNBInterfaces* enumeration
| | | +--rw en-gNBInterfaces* enumeration
| | | +--rw AMFInterfaces* enumeration
| | | +--rw AUSFInterfaces* enumeration
| | | +--rw NEFInterfaces* enumeration
| | | +--rw NRFInterfaces* enumeration
| | | +--rw NSSFInterfaces* enumeration
| | | +--rw PCFInterfaces* enumeration
| | | +--rw SMFInterfaces* enumeration
| | | +--rw SMSFInterfaces* enumeration
| | | +--rw UDMInterfaces* enumeration
| | | +--rw UPFInterfaces* enumeration
| | | +--rw ng-eNBInterfaces* enumeration
| | | +--rw gNB-CU-CPInterfaces* enumeration
| | | +--rw gNB-CU-UPInterfaces* enumeration
| | | +--rw gNB-DUInterfaces* enumeration
| | +--rw tjListOfNeTypes* enumeration
| | +--rw tjPLMNTarget string
| | +--rw tjStreamingTraceConsumerURI inet:uri
| | +--rw tjTraceCollectionEntityAddress union
| | +--rw tjTraceDepth? enumeration
| | +--rw tjTraceReference uint64
| | +--rw tjTraceRecordSessionReference string
| | +--rw tjTraceReportingFormat? enumeration
| | +--rw tjTraceTarget* [targetIdType targetIdValue]
| | | +--rw targetIdType enumeration
| | | +--rw targetIdValue string
| | +--rw tjTriggeringEvent string
| | +--rw tjMDTAnonymizationOfData? enumeration
| | +--rw tjMDTAreaConfigurationForNeighCell* [idx]
| | | +--rw idx uint32
| | | +--rw frequency? string
| | | +--rw cell? string
| | +--rw tjMDTAreaScope* string
| | +--rw tjMDTCollectionPeriodRrmLte? uint32
| | +--rw tjMDTCollectionPeriodM6Lte? uint32
| | +--rw tjMDTCollectionPeriodM7Lte? uint16
| | +--rw tjMDTCollectionPeriodRrmUmts? uint32
| | +--rw tjMDTCollectionPeriodRrmNR? uint32
| | +--rw tjMDTCollectionPeriodM6NR? enumeration
| | +--rw tjMDTCollectionPeriodM7NR? uint32
| | +--rw tjMDTEventListForTriggeredMeasurement enumeration
| | +--rw tjMDTEventThreshold? int64
| | +--rw tjMDTListOfMeasurements int64
| | +--rw tjMDTLoggingDuration uint32
| | +--rw tjMDTLoggingInterval uint32
| | +--rw tjMDTLoggingEventThreshold? uint32
| | +--rw tjMDTLoggedHysteresis? uint32
| | +--rw tjMDTLoggedTimeToTrigger? int32
| | +--rw tjMDTMBSFNAreaList* string
| | +--rw tjMDTMeasurementPeriodLTE uint32
| | +--rw tjMDTMeasurementPeriodUMTS uint32
| | +--rw tjMDTMeasurementQuantity uint64
| | +--rw tjMDTM4ThresholdUmts? uint16
| | +--rw tjMDTPLMList* [mcc mnc]
| | | +--rw mcc Mcc
| | | +--rw mnc Mnc
| | +--rw tjMDTPositioningMethod enumeration
| | +--rw tjMDTReportAmount union
| | +--rw tjMDTReportingTrigger? enumeration
| | +--rw tjMDTReportInterval uint32
| | +--rw tjMDTReportType enumeration
| | +--rw tjMDTSensorInformation? bits
| | +--rw tjMDTTraceCollectionEntityID uint8
| +--ro Files* [id]
| +--ro id string
| +--ro attributes
| | +--ro numberOfFiles? uint64
| | +--ro jobRef* types3gpp:DistinguishedName
| | +--ro jobId? string
| +--ro File* [id]
| +--ro id string
| +--ro attributes
| +--ro fileLocation inet:uri
| +--ro fileCompression string
| +--ro fileSize uint64
| +--ro fileDataType enumeration
| +--ro fileFormat string
| +--ro fileReadyTime yang:date-and-time
| +--ro fileExpirationTime yang:date-and-time
| +--ro fileContent string
| +--ro jobRef* types3gpp:DistinguishedName
| +--ro jobId? string
+--ro Files* [id]
| +--ro id string
| +--ro attributes
| | +--ro numberOfFiles? uint64
| | +--ro jobRef* types3gpp:DistinguishedName
| | +--ro jobId? string
| +--ro File* [id]
| +--ro id string
| +--ro attributes
| +--ro fileLocation inet:uri
| +--ro fileCompression string
| +--ro fileSize uint64
| +--ro fileDataType enumeration
| +--ro fileFormat string
| +--ro fileReadyTime yang:date-and-time
| +--ro fileExpirationTime yang:date-and-time
| +--ro fileContent string
| +--ro jobRef* types3gpp:DistinguishedName
| +--ro jobId? string
+--rw filemgmt3gpp:FileDownloadJob* [id]
| +--rw filemgmt3gpp:id string
| +--rw filemgmt3gpp:attributes
| +--rw filemgmt3gpp:id? string
| +--rw filemgmt3gpp:fileLocation string
| +--rw filemgmt3gpp:notificationRecipientAddress? string
| +--rw filemgmt3gpp:cancelJob boolean
| +--rw filemgmt3gpp:jobMonitor* [id]
| +--rw filemgmt3gpp:id string
| +--ro filemgmt3gpp:status? enumeration
| +--ro filemgmt3gpp:progressPercentage? uint8
| +--ro filemgmt3gpp:progressStateInfo* string
| +--ro filemgmt3gpp:resultStateInfo? string
| +--ro filemgmt3gpp:startTime? yang:date-and-time
| +--ro filemgmt3gpp:endTime? yang:date-and-time
| +--rw filemgmt3gpp:timer? uint32
+--rw qmc3gpp:QMCJob* [id]
| +--rw qmc3gpp:id string
| +--rw qmc3gpp:attributes
| +--rw qmc3gpp:serviceType enumeration
| +--rw qmc3gpp:areaScope? string
| +--rw qmc3gpp:qoECollectionEntityAddress inet:ip-address
| +--rw qmc3gpp:pLMNTarget* [mcc mnc]
| | +--rw qmc3gpp:mcc Mcc
| | +--rw qmc3gpp:mnc Mnc
| +--rw qmc3gpp:qoETarget string
| +--rw qmc3gpp:qoEReference string
| +--rw qmc3gpp:sliceScope* [sd sst]
| | +--rw qmc3gpp:sd string
| | +--rw qmc3gpp:sst uint8
| +--rw qmc3gpp:qMCConfigFile string
| +--rw qmc3gpp:mDTAlignmentInformation? uint64
| +--rw qmc3gpp:availableRANqoEMetrics? enumeration
+--rw gnbdu3gpp:GNBDUFunction* [id]
+--rw gnbdu3gpp:id string
+--rw gnbdu3gpp:attributes
| +--rw gnbdu3gpp:userLabel? string
| +--rw gnbdu3gpp:vnfParametersList* [vnfInstanceId]
| | +--rw gnbdu3gpp:vnfInstanceId string
| | +--rw gnbdu3gpp:vnfdId? string
| | +--rw gnbdu3gpp:flavourId? string
| | +--rw gnbdu3gpp:autoScalable boolean
| +--rw gnbdu3gpp:peeParametersList* [idx]
| | +--rw gnbdu3gpp:idx uint32
| | +--rw gnbdu3gpp:siteIdentification string
| | +--rw gnbdu3gpp:siteLatitude? decimal64
| | +--rw gnbdu3gpp:siteLongitude? decimal64
| | +--rw gnbdu3gpp:siteAltitude? decimal64
| | +--rw gnbdu3gpp:siteDescription string
| | +--rw gnbdu3gpp:equipmentType string
| | +--rw gnbdu3gpp:environmentType string
| | +--rw gnbdu3gpp:powerInterface string
| +--rw gnbdu3gpp:priorityLabel uint32
| +--ro gnbdu3gpp:SupportedPerfMetricGroup* []
| | +--ro gnbdu3gpp:performanceMetrics* string
| | +--ro gnbdu3gpp:granularityPeriods* uint32
| | +--ro gnbdu3gpp:reportingMethods* enumeration
| | +--ro gnbdu3gpp:monitorGranularityPeriods* uint32
| +--rw gnbdu3gpp:gNBId int64
| +--rw gnbdu3gpp:gNBIdLength int32
| +--rw gnbdu3gpp:gNBDUId int64
| +--rw gnbdu3gpp:gNBDUName? string
| +--ro gnbdu3gpp:rimRSReportConf* [reportInterval]
| +--ro gnbdu3gpp:reportIndicator? types3gpp:EnabledDisabled
| +--ro gnbdu3gpp:reportInterval uint32
| +--ro gnbdu3gpp:nrofRIMRSReportInfo uint32
| +--ro gnbdu3gpp:maxPropagationDelay uint32
| +--ro gnbdu3gpp:RimRSReportInfoList* [detectedSetID]
| +--ro gnbdu3gpp:detectedSetID uint32
| +--ro gnbdu3gpp:propagationDelay? uint32
| +--ro gnbdu3gpp:functionalityOfRIMRS enumeration
+--rw gnbdu3gpp:ManagedNFService* [id]
| +--rw gnbdu3gpp:id string
| +--rw gnbdu3gpp:attributes
| +--rw gnbdu3gpp:userLabel? string
| +--ro gnbdu3gpp:nFServiceType string
| +--rw gnbdu3gpp:sAP* [host port]
| | +--rw gnbdu3gpp:host inet:host
| | +--rw gnbdu3gpp:port inet:port-number
| +--rw gnbdu3gpp:operations* [name]
| | +--rw gnbdu3gpp:name string
| | +--rw gnbdu3gpp:allowedNFTypes* string
| | +--ro gnbdu3gpp:operationSemantics enumeration
| +--rw gnbdu3gpp:administrativeState types3gpp:AdministrativeState
| +--ro gnbdu3gpp:operationalState types3gpp:OperationalState
| +--ro gnbdu3gpp:usageState types3gpp:usageState
| +--ro gnbdu3gpp:registrationState? enumeration
+--rw gnbdu3gpp:PerfMetricJob* [id] {MeasurementsUnderManagedFunction}?
| +--rw gnbdu3gpp:id string
| +--rw gnbdu3gpp:attributes
| | +--rw gnbdu3gpp:administrativeState? types3gpp:AdministrativeState
| | +--ro gnbdu3gpp:operationalState types3gpp:OperationalState
| | +--rw gnbdu3gpp:jobId? string
| | +--rw gnbdu3gpp:performanceMetrics* string
| | +--rw gnbdu3gpp:granularityPeriod uint32
| | +--rw gnbdu3gpp:objectInstances* types3gpp:DistinguishedName
| | +--rw gnbdu3gpp:rootObjectInstances* types3gpp:DistinguishedName
| | +--rw (gnbdu3gpp:reportingCtrl)
| | | +--:(gnbdu3gpp:file-based-reporting)
| | | | +--rw gnbdu3gpp:fileReportingPeriod uint32
| | | | +--rw (gnbdu3gpp:reporting-target)?
| | | | +--:(gnbdu3gpp:file-target)
| | | | | +--rw gnbdu3gpp:fileLocation? string
| | | | +--:(gnbdu3gpp:notification-target)
| | | | +--rw gnbdu3gpp:notificationRecipientAddress? string
| | | +--:(gnbdu3gpp:stream-based-reporting)
| | | +--rw gnbdu3gpp:streamTarget string
| | +--ro gnbdu3gpp:_linkToFiles string
| +--ro gnbdu3gpp:Files* [id]
| +--ro gnbdu3gpp:id string
| +--ro gnbdu3gpp:attributes
| | +--ro gnbdu3gpp:numberOfFiles? uint64
| | +--ro gnbdu3gpp:jobRef* types3gpp:DistinguishedName
| | +--ro gnbdu3gpp:jobId? string
| +--ro gnbdu3gpp:File* [id]
| +--ro gnbdu3gpp:id string
| +--ro gnbdu3gpp:attributes
| +--ro gnbdu3gpp:fileLocation inet:uri
| +--ro gnbdu3gpp:fileCompression string
| +--ro gnbdu3gpp:fileSize uint64
| +--ro gnbdu3gpp:fileDataType enumeration
| +--ro gnbdu3gpp:fileFormat string
| +--ro gnbdu3gpp:fileReadyTime yang:date-and-time
| +--ro gnbdu3gpp:fileExpirationTime yang:date-and-time
| +--ro gnbdu3gpp:fileContent string
| +--ro gnbdu3gpp:jobRef* types3gpp:DistinguishedName
| +--ro gnbdu3gpp:jobId? string
+--rw gnbdu3gpp:ThresholdMonitor* [id] {MeasurementsUnderManagedFunction}?
| +--rw gnbdu3gpp:id string
| +--rw gnbdu3gpp:attributes
| +--rw gnbdu3gpp:administrativeState? types3gpp:AdministrativeState
| +--ro gnbdu3gpp:operationalState types3gpp:OperationalState
| +--rw gnbdu3gpp:thresholdInfoList* [idx]
| | +--rw gnbdu3gpp:idx uint32
| | +--rw gnbdu3gpp:measurementTypes* string
| | +--rw gnbdu3gpp:thresholdLevel uint64
| | +--rw gnbdu3gpp:thresholdDirection enumeration
| | +--rw gnbdu3gpp:thresholdValue union
| | +--rw gnbdu3gpp:hysteresis? union
| +--rw gnbdu3gpp:monitorGranularityPeriod uint32
| +--rw gnbdu3gpp:objectInstances* types3gpp:DistinguishedName
| +--rw gnbdu3gpp:rootObjectInstances* types3gpp:DistinguishedName
+--rw gnbdu3gpp:TraceJob* [id] {TraceUnderManagedFunction}?
+--rw gnbdu3gpp:id string
+--rw gnbdu3gpp:attributes
| +--rw gnbdu3gpp:tjJobType? enumeration
| +--rw gnbdu3gpp:tjListOfInterfaces* [idx]
| | +--rw gnbdu3gpp:idx uint32
| | +--rw gnbdu3gpp:MSCServerInterfaces* enumeration
| | +--rw gnbdu3gpp:MGWInterfaces* enumeration
| | +--rw gnbdu3gpp:RNCInterfaces* enumeration
| | +--rw gnbdu3gpp:SGSNInterfaces* enumeration
| | +--rw gnbdu3gpp:GGSNInterfaces* enumeration
| | +--rw gnbdu3gpp:S-CSCFInterfaces* enumeration
| | +--rw gnbdu3gpp:P-CSCFInterfaces* enumeration
| | +--rw gnbdu3gpp:I-CSCFInterfaces* enumeration
| | +--rw gnbdu3gpp:MRFCInterfaces* enumeration
| | +--rw gnbdu3gpp:MGCFInterfaces* enumeration
| | +--rw gnbdu3gpp:IBCFInterfaces* enumeration
| | +--rw gnbdu3gpp:E-CSCFInterfaces* enumeration
| | +--rw gnbdu3gpp:BGCFInterfaces* enumeration
| | +--rw gnbdu3gpp:ASInterfaces* enumeration
| | +--rw gnbdu3gpp:HSSInterfaces* enumeration
| | +--rw gnbdu3gpp:EIRInterfaces* enumeration
| | +--rw gnbdu3gpp:BM-SCInterfaces* enumeration
| | +--rw gnbdu3gpp:MMEInterfaces* enumeration
| | +--rw gnbdu3gpp:SGWInterfaces* enumeration
| | +--rw gnbdu3gpp:PDN_GWInterfaces* enumeration
| | +--rw gnbdu3gpp:eNBInterfaces* enumeration
| | +--rw gnbdu3gpp:en-gNBInterfaces* enumeration
| | +--rw gnbdu3gpp:AMFInterfaces* enumeration
| | +--rw gnbdu3gpp:AUSFInterfaces* enumeration
| | +--rw gnbdu3gpp:NEFInterfaces* enumeration
| | +--rw gnbdu3gpp:NRFInterfaces* enumeration
| | +--rw gnbdu3gpp:NSSFInterfaces* enumeration
| | +--rw gnbdu3gpp:PCFInterfaces* enumeration
| | +--rw gnbdu3gpp:SMFInterfaces* enumeration
| | +--rw gnbdu3gpp:SMSFInterfaces* enumeration
| | +--rw gnbdu3gpp:UDMInterfaces* enumeration
| | +--rw gnbdu3gpp:UPFInterfaces* enumeration
| | +--rw gnbdu3gpp:ng-eNBInterfaces* enumeration
| | +--rw gnbdu3gpp:gNB-CU-CPInterfaces* enumeration
| | +--rw gnbdu3gpp:gNB-CU-UPInterfaces* enumeration
| | +--rw gnbdu3gpp:gNB-DUInterfaces* enumeration
| +--rw gnbdu3gpp:tjListOfNeTypes* enumeration
| +--rw gnbdu3gpp:tjPLMNTarget string
| +--rw gnbdu3gpp:tjStreamingTraceConsumerURI inet:uri
| +--rw gnbdu3gpp:tjTraceCollectionEntityAddress union
| +--rw gnbdu3gpp:tjTraceDepth? enumeration
| +--rw gnbdu3gpp:tjTraceReference uint64
| +--rw gnbdu3gpp:tjTraceRecordSessionReference string
| +--rw gnbdu3gpp:tjTraceReportingFormat? enumeration
| +--rw gnbdu3gpp:tjTraceTarget* [targetIdType targetIdValue]
| | +--rw gnbdu3gpp:targetIdType enumeration
| | +--rw gnbdu3gpp:targetIdValue string
| +--rw gnbdu3gpp:tjTriggeringEvent string
| +--rw gnbdu3gpp:tjMDTAnonymizationOfData? enumeration
| +--rw gnbdu3gpp:tjMDTAreaConfigurationForNeighCell* [idx]
| | +--rw gnbdu3gpp:idx uint32
| | +--rw gnbdu3gpp:frequency? string
| | +--rw gnbdu3gpp:cell? string
| +--rw gnbdu3gpp:tjMDTAreaScope* string
| +--rw gnbdu3gpp:tjMDTCollectionPeriodRrmLte? uint32
| +--rw gnbdu3gpp:tjMDTCollectionPeriodM6Lte? uint32
| +--rw gnbdu3gpp:tjMDTCollectionPeriodM7Lte? uint16
| +--rw gnbdu3gpp:tjMDTCollectionPeriodRrmUmts? uint32
| +--rw gnbdu3gpp:tjMDTCollectionPeriodRrmNR? uint32
| +--rw gnbdu3gpp:tjMDTCollectionPeriodM6NR? enumeration
| +--rw gnbdu3gpp:tjMDTCollectionPeriodM7NR? uint32
| +--rw gnbdu3gpp:tjMDTEventListForTriggeredMeasurement enumeration
| +--rw gnbdu3gpp:tjMDTEventThreshold? int64
| +--rw gnbdu3gpp:tjMDTListOfMeasurements int64
| +--rw gnbdu3gpp:tjMDTLoggingDuration uint32
| +--rw gnbdu3gpp:tjMDTLoggingInterval uint32
| +--rw gnbdu3gpp:tjMDTLoggingEventThreshold? uint32
| +--rw gnbdu3gpp:tjMDTLoggedHysteresis? uint32
| +--rw gnbdu3gpp:tjMDTLoggedTimeToTrigger? int32
| +--rw gnbdu3gpp:tjMDTMBSFNAreaList* string
| +--rw gnbdu3gpp:tjMDTMeasurementPeriodLTE uint32
| +--rw gnbdu3gpp:tjMDTMeasurementPeriodUMTS uint32
| +--rw gnbdu3gpp:tjMDTMeasurementQuantity uint64
| +--rw gnbdu3gpp:tjMDTM4ThresholdUmts? uint16
| +--rw gnbdu3gpp:tjMDTPLMList* [mcc mnc]
| | +--rw gnbdu3gpp:mcc Mcc
| | +--rw gnbdu3gpp:mnc Mnc
| +--rw gnbdu3gpp:tjMDTPositioningMethod enumeration
| +--rw gnbdu3gpp:tjMDTReportAmount union
| +--rw gnbdu3gpp:tjMDTReportingTrigger? enumeration
| +--rw gnbdu3gpp:tjMDTReportInterval uint32
| +--rw gnbdu3gpp:tjMDTReportType enumeration
| +--rw gnbdu3gpp:tjMDTSensorInformation? bits
| +--rw gnbdu3gpp:tjMDTTraceCollectionEntityID uint8
+--ro gnbdu3gpp:Files* [id]
+--ro gnbdu3gpp:id string
+--ro gnbdu3gpp:attributes
| +--ro gnbdu3gpp:numberOfFiles? uint64
| +--ro gnbdu3gpp:jobRef* types3gpp:DistinguishedName
| +--ro gnbdu3gpp:jobId? string
+--ro gnbdu3gpp:File* [id]
+--ro gnbdu3gpp:id string
+--ro gnbdu3gpp:attributes
+--ro gnbdu3gpp:fileLocation inet:uri
+--ro gnbdu3gpp:fileCompression string
+--ro gnbdu3gpp:fileSize uint64
+--ro gnbdu3gpp:fileDataType enumeration
+--ro gnbdu3gpp:fileFormat string
+--ro gnbdu3gpp:fileReadyTime yang:date-and-time
+--ro gnbdu3gpp:fileExpirationTime yang:date-and-time
+--ro gnbdu3gpp:fileContent string
+--ro gnbdu3gpp:jobRef* types3gpp:DistinguishedName
+--ro gnbdu3gpp:jobId? string
module: _3gpp-common-subnetwork
+--rw SubNetwork* [id]
+--rw id string
+--rw attributes
| +--rw dnPrefix? types3gpp:DistinguishedName
| +--rw userLabel? string
| +--rw userDefinedNetworkType? string
| +--ro SupportedPerfMetricGroup* []
| | +--ro performanceMetrics* string
| | +--ro granularityPeriods* uint32
| | +--ro reportingMethods* enumeration
| | +--ro monitorGranularityPeriods* uint32
| +--rw setOfMcc* types3gpp:Mcc
| +--rw priorityLabel uint32
| +--rw parents* -> ../../../SubNetwork/id
| +--rw containedChildren* -> ../../../SubNetwork/id
+--rw PerfMetricJob* [id] {MeasurementsUnderSubNetwork}?
| +--rw id string
| +--rw attributes
| | +--rw administrativeState? types3gpp:AdministrativeState
| | +--ro operationalState types3gpp:OperationalState
| | +--rw jobId? string
| | +--rw performanceMetrics* string
| | +--rw granularityPeriod uint32
| | +--rw objectInstances* types3gpp:DistinguishedName
| | +--rw rootObjectInstances* types3gpp:DistinguishedName
| | +--rw (reportingCtrl)
| | | +--:(file-based-reporting)
| | | | +--rw fileReportingPeriod uint32
| | | | +--rw (reporting-target)?
| | | | +--:(file-target)
| | | | | +--rw fileLocation? string
| | | | +--:(notification-target)
| | | | +--rw notificationRecipientAddress? string
| | | +--:(stream-based-reporting)
| | | +--rw streamTarget string
| | +--ro _linkToFiles string
| +--ro Files* [id]
| +--ro id string
| +--ro attributes
| | +--ro numberOfFiles? uint64
| | +--ro jobRef* types3gpp:DistinguishedName
| | +--ro jobId? string
| +--ro File* [id]
| +--ro id string
| +--ro attributes
| +--ro fileLocation inet:uri
| +--ro fileCompression string
| +--ro fileSize uint64
| +--ro fileDataType enumeration
| +--ro fileFormat string
| +--ro fileReadyTime yang:date-and-time
| +--ro fileExpirationTime yang:date-and-time
| +--ro fileContent string
| +--ro jobRef* types3gpp:DistinguishedName
| +--ro jobId? string
+--rw ThresholdMonitor* [id] {MeasurementsUnderSubNetwork}?
| +--rw id string
| +--rw attributes
| +--rw administrativeState? types3gpp:AdministrativeState
| +--ro operationalState types3gpp:OperationalState
| +--rw thresholdInfoList* [idx]
| | +--rw idx uint32
| | +--rw measurementTypes* string
| | +--rw thresholdLevel uint64
| | +--rw thresholdDirection enumeration
| | +--rw thresholdValue union
| | +--rw hysteresis? union
| +--rw monitorGranularityPeriod uint32
| +--rw objectInstances* types3gpp:DistinguishedName
| +--rw rootObjectInstances* types3gpp:DistinguishedName
+--rw NtfSubscriptionControl* [id] {SubscriptionControlUnderSubNetwork}?
| +--rw id string
| +--rw attributes
| | +--rw notificationRecipientAddress string
| | +--rw notificationTypes* string
| | +--rw scope* [scopeType]
| | | +--rw scopeType enumeration
| | | +--rw scopeLevel uint16
| | +--rw notificationFilter? string
| +--rw HeartbeatControl* [id]
| +--rw id string
| +--rw attributes
| +--rw heartbeatNtfPeriod uint32
| +--rw triggerHeartbeatNtf? boolean
+--rw AlarmList* [id] {FmUnderSubNetwork}?
| +--rw id string
| +--rw attributes
| +--rw administrativeState? types3gpp:AdministrativeState
| +--ro operationalState? types3gpp:OperationalState
| +--ro numOfAlarmRecords uint32
| +--ro lastModification? yang:date-and-time
| +--rw alarmRecords* [alarmId]
| +--rw alarmId string
| +--ro objectInstance string
| +--ro notificationId int32
| +--ro alarmRaisedTime? yang:date-and-time
| +--ro alarmChangedTime? yang:date-and-time
| +--ro alarmClearedTime? yang:date-and-time
| +--ro alarmType? eventType
| +--ro probableCause? string
| +--ro specificProblem? string
| +--rw perceivedSeverity? severity-level
| +--ro backedUpStatus? string
| +--ro backUpObject? string
| +--ro trendIndication? string
| +--ro thresholdInfo* []
| | +--ro measurementType string
| | +--ro direction enumeration
| | +--ro thresholdLevel? string
| | +--ro thresholdValue? string
| | +--ro hysteresis? string
| +--ro stateChangeDefinition? string
| +--ro monitoredAttributes? string
| +--ro proposedRepairActions? string
| +--ro additionalText? string
| +--ro additionalInformation? <anydata>
| +--ro rootCauseIndicator? enumeration
| +--ro ackTime? yang:date-and-time
| +--rw ackUserId? string
| +--rw ackSystemId? string
| +--rw ackState? enumeration
| +--rw clearUserId? string
| +--rw clearSystemId? string
| +--ro serviceUser? string
| +--ro serviceProvider? string
| +--ro securityAlarmDetector? string
+--rw TraceJob* [id] {TraceUnderSubNetwork}?
| +--rw id string
| +--rw attributes
| | +--rw tjJobType? enumeration
| | +--rw tjListOfInterfaces* [idx]
| | | +--rw idx uint32
| | | +--rw MSCServerInterfaces* enumeration
| | | +--rw MGWInterfaces* enumeration
| | | +--rw RNCInterfaces* enumeration
| | | +--rw SGSNInterfaces* enumeration
| | | +--rw GGSNInterfaces* enumeration
| | | +--rw S-CSCFInterfaces* enumeration
| | | +--rw P-CSCFInterfaces* enumeration
| | | +--rw I-CSCFInterfaces* enumeration
| | | +--rw MRFCInterfaces* enumeration
| | | +--rw MGCFInterfaces* enumeration
| | | +--rw IBCFInterfaces* enumeration
| | | +--rw E-CSCFInterfaces* enumeration
| | | +--rw BGCFInterfaces* enumeration
| | | +--rw ASInterfaces* enumeration
| | | +--rw HSSInterfaces* enumeration
| | | +--rw EIRInterfaces* enumeration
| | | +--rw BM-SCInterfaces* enumeration
| | | +--rw MMEInterfaces* enumeration
| | | +--rw SGWInterfaces* enumeration
| | | +--rw PDN_GWInterfaces* enumeration
| | | +--rw eNBInterfaces* enumeration
| | | +--rw en-gNBInterfaces* enumeration
| | | +--rw AMFInterfaces* enumeration
| | | +--rw AUSFInterfaces* enumeration
| | | +--rw NEFInterfaces* enumeration
| | | +--rw NRFInterfaces* enumeration
| | | +--rw NSSFInterfaces* enumeration
| | | +--rw PCFInterfaces* enumeration
| | | +--rw SMFInterfaces* enumeration
| | | +--rw SMSFInterfaces* enumeration
| | | +--rw UDMInterfaces* enumeration
| | | +--rw UPFInterfaces* enumeration
| | | +--rw ng-eNBInterfaces* enumeration
| | | +--rw gNB-CU-CPInterfaces* enumeration
| | | +--rw gNB-CU-UPInterfaces* enumeration
| | | +--rw gNB-DUInterfaces* enumeration
| | +--rw tjListOfNeTypes* enumeration
| | +--rw tjPLMNTarget string
| | +--rw tjStreamingTraceConsumerURI inet:uri
| | +--rw tjTraceCollectionEntityAddress union
| | +--rw tjTraceDepth? enumeration
| | +--rw tjTraceReference uint64
| | +--rw tjTraceRecordSessionReference string
| | +--rw tjTraceReportingFormat? enumeration
| | +--rw tjTraceTarget* [targetIdType targetIdValue]
| | | +--rw targetIdType enumeration
| | | +--rw targetIdValue string
| | +--rw tjTriggeringEvent string
| | +--rw tjMDTAnonymizationOfData? enumeration
| | +--rw tjMDTAreaConfigurationForNeighCell* [idx]
| | | +--rw idx uint32
| | | +--rw frequency? string
| | | +--rw cell? string
| | +--rw tjMDTAreaScope* string
| | +--rw tjMDTCollectionPeriodRrmLte? uint32
| | +--rw tjMDTCollectionPeriodM6Lte? uint32
| | +--rw tjMDTCollectionPeriodM7Lte? uint16
| | +--rw tjMDTCollectionPeriodRrmUmts? uint32
| | +--rw tjMDTCollectionPeriodRrmNR? uint32
| | +--rw tjMDTCollectionPeriodM6NR? enumeration
| | +--rw tjMDTCollectionPeriodM7NR? uint32
| | +--rw tjMDTEventListForTriggeredMeasurement enumeration
| | +--rw tjMDTEventThreshold? int64
| | +--rw tjMDTListOfMeasurements int64
| | +--rw tjMDTLoggingDuration uint32
| | +--rw tjMDTLoggingInterval uint32
| | +--rw tjMDTLoggingEventThreshold? uint32
| | +--rw tjMDTLoggedHysteresis? uint32
| | +--rw tjMDTLoggedTimeToTrigger? int32
| | +--rw tjMDTMBSFNAreaList* string
| | +--rw tjMDTMeasurementPeriodLTE uint32
| | +--rw tjMDTMeasurementPeriodUMTS uint32
| | +--rw tjMDTMeasurementQuantity uint64
| | +--rw tjMDTM4ThresholdUmts? uint16
| | +--rw tjMDTPLMList* [mcc mnc]
| | | +--rw mcc Mcc
| | | +--rw mnc Mnc
| | +--rw tjMDTPositioningMethod enumeration
| | +--rw tjMDTReportAmount union
| | +--rw tjMDTReportingTrigger? enumeration
| | +--rw tjMDTReportInterval uint32
| | +--rw tjMDTReportType enumeration
| | +--rw tjMDTSensorInformation? bits
| | +--rw tjMDTTraceCollectionEntityID uint8
| +--ro Files* [id]
| +--ro id string
| +--ro attributes
| | +--ro numberOfFiles? uint64
| | +--ro jobRef* types3gpp:DistinguishedName
| | +--ro jobId? string
| +--ro File* [id]
| +--ro id string
| +--ro attributes
| +--ro fileLocation inet:uri
| +--ro fileCompression string
| +--ro fileSize uint64
| +--ro fileDataType enumeration
| +--ro fileFormat string
| +--ro fileReadyTime yang:date-and-time
| +--ro fileExpirationTime yang:date-and-time
| +--ro fileContent string
| +--ro jobRef* types3gpp:DistinguishedName
| +--ro jobId? string
+--ro Files* [id]
| +--ro id string
| +--ro attributes
| | +--ro numberOfFiles? uint64
| | +--ro jobRef* types3gpp:DistinguishedName
| | +--ro jobId? string
| +--ro File* [id]
| +--ro id string
| +--ro attributes
| +--ro fileLocation inet:uri
| +--ro fileCompression string
| +--ro fileSize uint64
| +--ro fileDataType enumeration
| +--ro fileFormat string
| +--ro fileReadyTime yang:date-and-time
| +--ro fileExpirationTime yang:date-and-time
| +--ro fileContent string
| +--ro jobRef* types3gpp:DistinguishedName
| +--ro jobId? string
+--rw filemgmt3gpp:FileDownloadJob* [id]
| +--rw filemgmt3gpp:id string
| +--rw filemgmt3gpp:attributes
| +--rw filemgmt3gpp:id? string
| +--rw filemgmt3gpp:fileLocation string
| +--rw filemgmt3gpp:notificationRecipientAddress? string
| +--rw filemgmt3gpp:cancelJob boolean
| +--rw filemgmt3gpp:jobMonitor* [id]
| +--rw filemgmt3gpp:id string
| +--ro filemgmt3gpp:status? enumeration
| +--ro filemgmt3gpp:progressPercentage? uint8
| +--ro filemgmt3gpp:progressStateInfo* string
| +--ro filemgmt3gpp:resultStateInfo? string
| +--ro filemgmt3gpp:startTime? yang:date-and-time
| +--ro filemgmt3gpp:endTime? yang:date-and-time
| +--rw filemgmt3gpp:timer? uint32
+--rw mgtdatcol3gpp:ManagementDataCollection* [id]
| +--rw mgtdatcol3gpp:id string
| +--rw mgtdatcol3gpp:attributes
| +--rw (mgtdatcol3gpp:managementData)
| | +--:(mgtdatcol3gpp:mgtDataCategory)
| | | +--rw mgtdatcol3gpp:category* mgtDataCategoryType
| | +--:(mgtdatcol3gpp:mgtDataName)
| | +--rw mgtdatcol3gpp:name* string
| +--rw mgtdatcol3gpp:targetNodeFilter* [idx]
| | +--rw mgtdatcol3gpp:idx string
| | +--rw mgtdatcol3gpp:areaOfInterest* [idx]
| | | +--rw mgtdatcol3gpp:idx string
| | | +--rw mgtdatcol3gpp:plmnId* [mcc mnc]
| | | | +--rw mgtdatcol3gpp:mcc Mcc
| | | | +--rw mgtdatcol3gpp:mnc Mnc
| | | +--rw mgtdatcol3gpp:tac? types3gpp:Tac
| | +--rw mgtdatcol3gpp:networkDomain? enumeration
| | +--rw mgtdatcol3gpp:cpUpType? enumeration
| | +--rw mgtdatcol3gpp:sst? uint8
| +--rw mgtdatcol3gpp:collectionTimeWindow* [startTime endTime]
| | +--rw mgtdatcol3gpp:startTime yang:date-and-time
| | +--rw mgtdatcol3gpp:endTime yang:date-and-time
| +--rw mgtdatcol3gpp:reportingCtrl* [idx]
| | +--rw mgtdatcol3gpp:idx string
| | +--rw (mgtdatcol3gpp:reportingCtrl)
| | +--:(mgtdatcol3gpp:file-based-reporting)
| | | +--rw mgtdatcol3gpp:fileReportingPeriod uint32
| | | +--rw (mgtdatcol3gpp:reporting-target)?
| | | +--:(mgtdatcol3gpp:file-target)
| | | | +--rw mgtdatcol3gpp:fileLocation? string
| | | +--:(mgtdatcol3gpp:notification-target)
| | | +--rw mgtdatcol3gpp:notificationRecipientAddress? string
| | +--:(mgtdatcol3gpp:stream-based-reporting)
| | +--rw mgtdatcol3gpp:streamTarget string
| +--rw mgtdatcol3gpp:dataScope? enumeration
+--rw mnsregist3gpp:MNSRegistry* [id]
| +--rw mnsregist3gpp:id string
| +--rw mnsregist3gpp:MNSInfo* [mnsType mnsVersion mnsAddress]
| +--rw mnsregist3gpp:id? string
| +--rw mnsregist3gpp:mnsLabel string
| +--rw mnsregist3gpp:mnsType enumeration
| +--rw mnsregist3gpp:mnsVersion string
| +--rw mnsregist3gpp:mnsAddress string
| +--rw mnsregist3gpp:mnsScope* types3gpp:DistinguishedName
+--rw qmc3gpp:QMCJob* [id]
+--rw qmc3gpp:id string
+--rw qmc3gpp:attributes
+--rw qmc3gpp:serviceType enumeration
+--rw qmc3gpp:areaScope? string
+--rw qmc3gpp:qoECollectionEntityAddress inet:ip-address
+--rw qmc3gpp:pLMNTarget* [mcc mnc]
| +--rw qmc3gpp:mcc Mcc
| +--rw qmc3gpp:mnc Mnc
+--rw qmc3gpp:qoETarget string
+--rw qmc3gpp:qoEReference string
+--rw qmc3gpp:sliceScope* [sd sst]
| +--rw qmc3gpp:sd string
| +--rw qmc3gpp:sst uint8
+--rw qmc3gpp:qMCConfigFile string
+--rw qmc3gpp:mDTAlignmentInformation? uint64
+--rw qmc3gpp:availableRANqoEMetrics? enumeration
module: ietf-yang-schema-mount
+--ro schema-mounts
+--ro namespace* [prefix]
| +--ro prefix yang:yang-identifier
| +--ro uri? inet:uri
+--ro mount-point* [module label]
+--ro module yang:yang-identifier
+--ro label yang:yang-identifier
+--ro config? boolean
+--ro (schema-ref)
+--:(inline)
| +--ro inline!
+--:(shared-schema)
+--ro shared-schema!
+--ro parent-reference* yang:xpath1.0
module: _3gpp-nr-nrm-gnbdufunction
+--rw configurable5QISetRef? types3gpp:DistinguishedName
+--rw dynamic5QISetRef? types3gpp:DistinguishedName

0
specification/xml/du.xml Normal file
View File

File diff suppressed because it is too large Load Diff

5971
specification/xml/gnodeb.xml Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,472 @@
module ietf-inet-types {
yang-version 1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-inet-types";
prefix inet;
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
WG Chair: David Kessens
<mailto:david.kessens@nsn.com>
WG Chair: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>
Editor: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>";
description
"This module contains a collection of generally useful derived
YANG data types for Internet addresses and related things.
Copyright (c) 2013 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 6991; see
the RFC itself for full legal notices.";
revision "2013-07-15" {
description
"This revision adds the following new data types:
- ip-address-no-zone
- ipv4-address-no-zone
- ipv6-address-no-zone";
reference
"RFC 6991: Common YANG Data Types";
}
revision "2010-09-24" {
description "Initial revision.";
reference
"RFC 6021: Common YANG Data Types";
}
typedef ip-version {
type enumeration {
enum "unknown" {
value 0;
description
"An unknown or unspecified version of the Internet
protocol.";
}
enum "ipv4" {
value 1;
description
"The IPv4 protocol as defined in RFC 791.";
}
enum "ipv6" {
value 2;
description
"The IPv6 protocol as defined in RFC 2460.";
}
}
description
"This value represents the version of the IP protocol.
In the value set and its semantics, this type is equivalent
to the InetVersion textual convention of the SMIv2.";
reference
"RFC 791: Internet Protocol
RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
RFC 4001: Textual Conventions for Internet Network Addresses";
}
typedef dscp {
type uint8 {
range "0..63";
}
description
"The dscp type represents a Differentiated Services Code Point
that may be used for marking packets in a traffic stream.
In the value set and its semantics, this type is equivalent
to the Dscp textual convention of the SMIv2.";
reference
"RFC 3289: Management Information Base for the Differentiated
Services Architecture
RFC 2474: Definition of the Differentiated Services Field
(DS Field) in the IPv4 and IPv6 Headers
RFC 2780: IANA Allocation Guidelines For Values In
the Internet Protocol and Related Headers";
}
typedef ipv6-flow-label {
type uint32 {
range "0..1048575";
}
description
"The ipv6-flow-label type represents the flow identifier or Flow
Label in an IPv6 packet header that may be used to
discriminate traffic flows.
In the value set and its semantics, this type is equivalent
to the IPv6FlowLabel textual convention of the SMIv2.";
reference
"RFC 3595: Textual Conventions for IPv6 Flow Label
RFC 2460: Internet Protocol, Version 6 (IPv6) Specification";
}
typedef port-number {
type uint16 {
range "0..65535";
}
description
"The port-number type represents a 16-bit port number of an
Internet transport-layer protocol such as UDP, TCP, DCCP, or
SCTP. Port numbers are assigned by IANA. A current list of
all assignments is available from <http://www.iana.org/>.
Note that the port number value zero is reserved by IANA. In
situations where the value zero does not make sense, it can
be excluded by subtyping the port-number type.
In the value set and its semantics, this type is equivalent
to the InetPortNumber textual convention of the SMIv2.";
reference
"RFC 768: User Datagram Protocol
RFC 793: Transmission Control Protocol
RFC 4960: Stream Control Transmission Protocol
RFC 4340: Datagram Congestion Control Protocol (DCCP)
RFC 4001: Textual Conventions for Internet Network Addresses";
}
typedef as-number {
type uint32;
description
"The as-number type represents autonomous system numbers
which identify an Autonomous System (AS). An AS is a set
of routers under a single technical administration, using
an interior gateway protocol and common metrics to route
packets within the AS, and using an exterior gateway
protocol to route packets to other ASes. IANA maintains
the AS number space and has delegated large parts to the
regional registries.
Autonomous system numbers were originally limited to 16
bits. BGP extensions have enlarged the autonomous system
number space to 32 bits. This type therefore uses an uint32
base type without a range restriction in order to support
a larger autonomous system number space.
In the value set and its semantics, this type is equivalent
to the InetAutonomousSystemNumber textual convention of
the SMIv2.";
reference
"RFC 1930: Guidelines for creation, selection, and registration
of an Autonomous System (AS)
RFC 4271: A Border Gateway Protocol 4 (BGP-4)
RFC 4001: Textual Conventions for Internet Network Addresses
RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
Number Space";
}
typedef ip-address {
type union {
type ipv4-address;
type ipv6-address;
}
description
"The ip-address type represents an IP address and is IP
version neutral. The format of the textual representation
implies the IP version. This type supports scoped addresses
by allowing zone identifiers in the address format.";
reference
"RFC 4007: IPv6 Scoped Address Architecture";
}
typedef ipv4-address {
type string {
pattern
'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
+ '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'
+ '(%[\p{N}\p{L}]+)?';
}
description
"The ipv4-address type represents an IPv4 address in
dotted-quad notation. The IPv4 address may include a zone
index, separated by a % sign.
The zone index is used to disambiguate identical address
values. For link-local addresses, the zone index will
typically be the interface index number or the name of an
interface. If the zone index is not present, the default
zone of the device will be used.
The canonical format for the zone index is the numerical
format";
}
typedef ipv6-address {
type string {
pattern
'((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
+ '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
+ '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
+ '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
+ '(%[\p{N}\p{L}]+)?';
pattern
'(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
+ '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
+ '(%.+)?';
}
description
"The ipv6-address type represents an IPv6 address in full,
mixed, shortened, and shortened-mixed notation. The IPv6
address may include a zone index, separated by a % sign.
The zone index is used to disambiguate identical address
values. For link-local addresses, the zone index will
typically be the interface index number or the name of an
interface. If the zone index is not present, the default
zone of the device will be used.
The canonical format of IPv6 addresses uses the textual
representation defined in Section 4 of RFC 5952. The
canonical format for the zone index is the numerical
format as described in Section 11.2 of RFC 4007.";
reference
"RFC 4291: IP Version 6 Addressing Architecture
RFC 4007: IPv6 Scoped Address Architecture
RFC 5952: A Recommendation for IPv6 Address Text
Representation";
}
typedef ip-address-no-zone {
type union {
type ipv4-address-no-zone;
type ipv6-address-no-zone;
}
description
"The ip-address-no-zone type represents an IP address and is
IP version neutral. The format of the textual representation
implies the IP version. This type does not support scoped
addresses since it does not allow zone identifiers in the
address format.";
reference
"RFC 4007: IPv6 Scoped Address Architecture";
}
typedef ipv4-address-no-zone {
type ipv4-address {
pattern '[0-9\.]*';
}
description
"An IPv4 address without a zone index. This type, derived from
ipv4-address, may be used in situations where the zone is
known from the context and hence no zone index is needed.";
}
typedef ipv6-address-no-zone {
type ipv6-address {
pattern '[0-9a-fA-F:\.]*';
}
description
"An IPv6 address without a zone index. This type, derived from
ipv6-address, may be used in situations where the zone is
known from the context and hence no zone index is needed.";
reference
"RFC 4291: IP Version 6 Addressing Architecture
RFC 4007: IPv6 Scoped Address Architecture
RFC 5952: A Recommendation for IPv6 Address Text
Representation";
}
typedef ip-prefix {
type union {
type ipv4-prefix;
type ipv6-prefix;
}
description
"The ip-prefix type represents an IP prefix and is IP
version neutral. The format of the textual representations
implies the IP version.";
}
typedef ipv4-prefix {
type string {
pattern
'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
+ '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'
+ '/(([0-9])|([1-2][0-9])|(3[0-2]))';
}
description
"The ipv4-prefix type represents an IPv4 address prefix.
The prefix length is given by the number following the
slash character and must be less than or equal to 32.
A prefix length value of n corresponds to an IP address
mask that has n contiguous 1-bits from the most
significant bit (MSB) and all other bits set to 0.
The canonical format of an IPv4 prefix has all bits of
the IPv4 address set to zero that are not part of the
IPv4 prefix.";
}
typedef ipv6-prefix {
type string {
pattern
'((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
+ '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
+ '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
+ '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
+ '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))';
pattern
'(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
+ '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
+ '(/.+)';
}
description
"The ipv6-prefix type represents an IPv6 address prefix.
The prefix length is given by the number following the
slash character and must be less than or equal to 128.
A prefix length value of n corresponds to an IP address
mask that has n contiguous 1-bits from the most
significant bit (MSB) and all other bits set to 0.
The IPv6 address should have all bits that do not belong
to the prefix set to zero.
The canonical format of an IPv6 prefix has all bits of
the IPv6 address set to zero that are not part of the
IPv6 prefix. Furthermore, the IPv6 address is represented
as defined in Section 4 of RFC 5952.";
reference
"RFC 5952: A Recommendation for IPv6 Address Text
Representation";
}
typedef domain-name {
type string {
length "1..253";
pattern
'((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*'
+ '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)'
+ '|\.';
}
description
"The domain-name type represents a DNS domain name. The
name SHOULD be fully qualified whenever possible.
Internet domain names are only loosely specified. Section
3.5 of RFC 1034 recommends a syntax (modified in Section
2.1 of RFC 1123). The pattern above is intended to allow
for current practice in domain name use, and some possible
future expansion. It is designed to hold various types of
domain names, including names used for A or AAAA records
(host names) and other records, such as SRV records. Note
that Internet host names have a stricter syntax (described
in RFC 952) than the DNS recommendations in RFCs 1034 and
1123, and that systems that want to store host names in
schema nodes using the domain-name type are recommended to
adhere to this stricter standard to ensure interoperability.
The encoding of DNS names in the DNS protocol is limited
to 255 characters. Since the encoding consists of labels
prefixed by a length bytes and there is a trailing NULL
byte, only 253 characters can appear in the textual dotted
notation.
The description clause of schema nodes using the domain-name
type MUST describe when and how these names are resolved to
IP addresses. Note that the resolution of a domain-name value
may require to query multiple DNS records (e.g., A for IPv4
and AAAA for IPv6). The order of the resolution process and
which DNS record takes precedence can either be defined
explicitly or may depend on the configuration of the
resolver.
Domain-name values use the US-ASCII encoding. Their canonical
format uses lowercase US-ASCII characters. Internationalized
domain names MUST be A-labels as per RFC 5890.";
reference
"RFC 952: DoD Internet Host Table Specification
RFC 1034: Domain Names - Concepts and Facilities
RFC 1123: Requirements for Internet Hosts -- Application
and Support
RFC 2782: A DNS RR for specifying the location of services
(DNS SRV)
RFC 5890: Internationalized Domain Names in Applications
(IDNA): Definitions and Document Framework";
}
typedef host {
type union {
type ip-address;
type domain-name;
}
description
"The host type represents either an IP address or a DNS
domain name.";
}
typedef uri {
type string;
description
"The uri type represents a Uniform Resource Identifier
(URI) as defined by STD 66.
Objects using the uri type MUST be in US-ASCII encoding,
and MUST be normalized as described by RFC 3986 Sections
6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary
percent-encoding is removed, and all case-insensitive
characters are set to lowercase except for hexadecimal
digits, which are normalized to uppercase as described in
Section 6.2.2.1.
The purpose of this normalization is to help provide
unique URIs. Note that this normalization is not
sufficient to provide uniqueness. Two URIs that are
textually distinct after this normalization may still be
equivalent.
Objects using the uri type may restrict the schemes that
they permit. For example, 'data:' and 'urn:' schemes
might not be appropriate.
A zero-length URI is not a valid URI. This can be used to
express 'URI absent' where required.
In the value set and its semantics, this type is equivalent
to the Uri SMIv2 textual convention defined in RFC 5017.";
reference
"RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
Group: Uniform Resource Identifiers (URIs), URLs,
and Uniform Resource Names (URNs): Clarifications
and Recommendations
RFC 5017: MIB Textual Conventions for Uniform Resource
Identifiers (URIs)";
}
} // module ietf-inet-types

View File

@@ -0,0 +1,464 @@
module ietf-netconf-acm {
namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm";
prefix nacm;
import ietf-yang-types {
prefix yang;
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org>
Author: Andy Bierman
<mailto:andy@yumaworks.com>
Author: Martin Bjorklund
<mailto:mbj@tail-f.com>";
description
"Network Configuration Access Control Model.
Copyright (c) 2012 - 2018 IETF Trust and the persons
identified as authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD
License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8341; see
the RFC itself for full legal notices.";
revision "2018-02-14" {
description
"Added support for YANG 1.1 actions and notifications tied to
data nodes. Clarified how NACM extensions can be used by
other data models.";
reference
"RFC 8341: Network Configuration Access Control Model";
}
revision "2012-02-22" {
description
"Initial version.";
reference
"RFC 6536: Network Configuration Protocol (NETCONF)
Access Control Model";
}
/*
* Extension statements
*/
extension default-deny-write {
description
"Used to indicate that the data model node
represents a sensitive security system parameter.
If present, the NETCONF server will only allow the designated
'recovery session' to have write access to the node. An
explicit access control rule is required for all other users.
If the NACM module is used, then it must be enabled (i.e.,
/nacm/enable-nacm object equals 'true'), or this extension
is ignored.
The 'default-deny-write' extension MAY appear within a data
definition statement. It is ignored otherwise.";
}
extension default-deny-all {
description
"Used to indicate that the data model node
controls a very sensitive security system parameter.
If present, the NETCONF server will only allow the designated
'recovery session' to have read, write, or execute access to
the node. An explicit access control rule is required for all
other users.
If the NACM module is used, then it must be enabled (i.e.,
/nacm/enable-nacm object equals 'true'), or this extension
is ignored.
The 'default-deny-all' extension MAY appear within a data
definition statement, 'rpc' statement, or 'notification'
statement. It is ignored otherwise.";
}
/*
* Derived types
*/
typedef user-name-type {
type string {
length "1..max";
}
description
"General-purpose username string.";
}
typedef matchall-string-type {
type string {
pattern '\*';
}
description
"The string containing a single asterisk '*' is used
to conceptually represent all possible values
for the particular leaf using this data type.";
}
typedef access-operations-type {
type bits {
bit create {
description
"Any protocol operation that creates a
new data node.";
}
bit read {
description
"Any protocol operation or notification that
returns the value of a data node.";
}
bit update {
description
"Any protocol operation that alters an existing
data node.";
}
bit delete {
description
"Any protocol operation that removes a data node.";
}
bit exec {
description
"Execution access to the specified protocol operation.";
}
}
description
"Access operation.";
}
typedef group-name-type {
type string {
length "1..max";
pattern '[^\*].*';
}
description
"Name of administrative group to which
users can be assigned.";
}
typedef action-type {
type enumeration {
enum permit {
description
"Requested action is permitted.";
}
enum deny {
description
"Requested action is denied.";
}
}
description
"Action taken by the server when a particular
rule matches.";
}
typedef node-instance-identifier {
type yang:xpath1.0;
description
"Path expression used to represent a special
data node, action, or notification instance-identifier
string.
A node-instance-identifier value is an
unrestricted YANG instance-identifier expression.
All the same rules as an instance-identifier apply,
except that predicates for keys are optional. If a key
predicate is missing, then the node-instance-identifier
represents all possible server instances for that key.
This XML Path Language (XPath) expression is evaluated in the
following context:
o The set of namespace declarations are those in scope on
the leaf element where this type is used.
o The set of variable bindings contains one variable,
'USER', which contains the name of the user of the
current session.
o The function library is the core function library, but
note that due to the syntax restrictions of an
instance-identifier, no functions are allowed.
o The context node is the root node in the data tree.
The accessible tree includes actions and notifications tied
to data nodes.";
}
/*
* Data definition statements
*/
container nacm {
nacm:default-deny-all;
description
"Parameters for NETCONF access control model.";
leaf enable-nacm {
type boolean;
default "true";
description
"Enables or disables all NETCONF access control
enforcement. If 'true', then enforcement
is enabled. If 'false', then enforcement
is disabled.";
}
leaf read-default {
type action-type;
default "permit";
description
"Controls whether read access is granted if
no appropriate rule is found for a
particular read request.";
}
leaf write-default {
type action-type;
default "deny";
description
"Controls whether create, update, or delete access
is granted if no appropriate rule is found for a
particular write request.";
}
leaf exec-default {
type action-type;
default "permit";
description
"Controls whether exec access is granted if no appropriate
rule is found for a particular protocol operation request.";
}
leaf enable-external-groups {
type boolean;
default "true";
description
"Controls whether the server uses the groups reported by the
NETCONF transport layer when it assigns the user to a set of
NACM groups. If this leaf has the value 'false', any group
names reported by the transport layer are ignored by the
server.";
}
leaf denied-operations {
type yang:zero-based-counter32;
config false;
mandatory true;
description
"Number of times since the server last restarted that a
protocol operation request was denied.";
}
leaf denied-data-writes {
type yang:zero-based-counter32;
config false;
mandatory true;
description
"Number of times since the server last restarted that a
protocol operation request to alter
a configuration datastore was denied.";
}
leaf denied-notifications {
type yang:zero-based-counter32;
config false;
mandatory true;
description
"Number of times since the server last restarted that
a notification was dropped for a subscription because
access to the event type was denied.";
}
container groups {
description
"NETCONF access control groups.";
list group {
key name;
description
"One NACM group entry. This list will only contain
configured entries, not any entries learned from
any transport protocols.";
leaf name {
type group-name-type;
description
"Group name associated with this entry.";
}
leaf-list user-name {
type user-name-type;
description
"Each entry identifies the username of
a member of the group associated with
this entry.";
}
}
}
list rule-list {
key name;
ordered-by user;
description
"An ordered collection of access control rules.";
leaf name {
type string {
length "1..max";
}
description
"Arbitrary name assigned to the rule-list.";
}
leaf-list group {
type union {
type matchall-string-type;
type group-name-type;
}
description
"List of administrative groups that will be
assigned the associated access rights
defined by the 'rule' list.
The string '*' indicates that all groups apply to the
entry.";
}
list rule {
key name;
ordered-by user;
description
"One access control rule.
Rules are processed in user-defined order until a match is
found. A rule matches if 'module-name', 'rule-type', and
'access-operations' match the request. If a rule
matches, the 'action' leaf determines whether or not
access is granted.";
leaf name {
type string {
length "1..max";
}
description
"Arbitrary name assigned to the rule.";
}
leaf module-name {
type union {
type matchall-string-type;
type string;
}
default "*";
description
"Name of the module associated with this rule.
This leaf matches if it has the value '*' or if the
object being accessed is defined in the module with the
specified module name.";
}
choice rule-type {
description
"This choice matches if all leafs present in the rule
match the request. If no leafs are present, the
choice matches all requests.";
case protocol-operation {
leaf rpc-name {
type union {
type matchall-string-type;
type string;
}
description
"This leaf matches if it has the value '*' or if
its value equals the requested protocol operation
name.";
}
}
case notification {
leaf notification-name {
type union {
type matchall-string-type;
type string;
}
description
"This leaf matches if it has the value '*' or if its
value equals the requested notification name.";
}
}
case data-node {
leaf path {
type node-instance-identifier;
mandatory true;
description
"Data node instance-identifier associated with the
data node, action, or notification controlled by
this rule.
Configuration data or state data
instance-identifiers start with a top-level
data node. A complete instance-identifier is
required for this type of path value.
The special value '/' refers to all possible
datastore contents.";
}
}
}
leaf access-operations {
type union {
type matchall-string-type;
type access-operations-type;
}
default "*";
description
"Access operations associated with this rule.
This leaf matches if it has the value '*' or if the
bit corresponding to the requested operation is set.";
}
leaf action {
type action-type;
mandatory true;
description
"The access control action associated with the
rule. If a rule has been determined to match a
particular request, then this object is used
to determine whether to permit or deny the
request.";
}
leaf comment {
type string;
description
"A textual description of the access rule.";
}
}
}
}
}

View File

@@ -0,0 +1,939 @@
module ietf-netconf {
// the namespace for NETCONF XML definitions is unchanged
// from RFC 4741, which this document replaces
namespace "urn:ietf:params:xml:ns:netconf:base:1.0";
prefix nc;
import ietf-inet-types {
prefix inet;
}
import ietf-netconf-acm { prefix nacm; }
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netconf/>
WG List: <netconf@ietf.org>
WG Chair: Bert Wijnen
<bertietf@bwijnen.net>
WG Chair: Mehmet Ersue
<mehmet.ersue@nsn.com>
Editor: Martin Bjorklund
<mbj@tail-f.com>
Editor: Juergen Schoenwaelder
<j.schoenwaelder@jacobs-university.de>
Editor: Andy Bierman
<andy.bierman@brocade.com>";
description
"NETCONF Protocol Data Types and Protocol Operations.
Copyright (c) 2011 IETF Trust and the persons identified as
the document authors. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 6241; see
the RFC itself for full legal notices.";
revision 2013-09-29 {
description
"Updated to include NACM attributes";
reference
"RFC 6536: sec 3.2.5 and 3.2.8";
}
revision 2011-06-01 {
description
"Initial revision";
reference
"RFC 6241: Network Configuration Protocol";
}
extension get-filter-element-attributes {
description
"If this extension is present within an 'anyxml'
statement named 'filter', which must be conceptually
defined within the RPC input section for the <get>
and <get-config> protocol operations, then the
following unqualified XML attribute is supported
within the <filter> element, within a <get> or
<get-config> protocol operation:
type : optional attribute with allowed
value strings 'subtree' and 'xpath'.
If missing, the default value is 'subtree'.
If the 'xpath' feature is supported, then the
following unqualified XML attribute is
also supported:
select: optional attribute containing a
string representing an XPath expression.
The 'type' attribute must be equal to 'xpath'
if this attribute is present.";
}
// NETCONF capabilities defined as features
feature writable-running {
description
"NETCONF :writable-running capability;
If the server advertises the :writable-running
capability for a session, then this feature must
also be enabled for that session. Otherwise,
this feature must not be enabled.";
reference "RFC 6241, Section 8.2";
}
feature candidate {
description
"NETCONF :candidate capability;
If the server advertises the :candidate
capability for a session, then this feature must
also be enabled for that session. Otherwise,
this feature must not be enabled.";
reference "RFC 6241, Section 8.3";
}
feature confirmed-commit {
if-feature candidate;
description
"NETCONF :confirmed-commit:1.1 capability;
If the server advertises the :confirmed-commit:1.1
capability for a session, then this feature must
also be enabled for that session. Otherwise,
this feature must not be enabled.";
reference "RFC 6241, Section 8.4";
}
feature rollback-on-error {
description
"NETCONF :rollback-on-error capability;
If the server advertises the :rollback-on-error
capability for a session, then this feature must
also be enabled for that session. Otherwise,
this feature must not be enabled.";
reference "RFC 6241, Section 8.5";
}
feature validate {
description
"NETCONF :validate:1.1 capability;
If the server advertises the :validate:1.1
capability for a session, then this feature must
also be enabled for that session. Otherwise,
this feature must not be enabled.";
reference "RFC 6241, Section 8.6";
}
feature startup {
description
"NETCONF :startup capability;
If the server advertises the :startup
capability for a session, then this feature must
also be enabled for that session. Otherwise,
this feature must not be enabled.";
reference "RFC 6241, Section 8.7";
}
feature url {
description
"NETCONF :url capability;
If the server advertises the :url
capability for a session, then this feature must
also be enabled for that session. Otherwise,
this feature must not be enabled.";
reference "RFC 6241, Section 8.8";
}
feature xpath {
description
"NETCONF :xpath capability;
If the server advertises the :xpath
capability for a session, then this feature must
also be enabled for that session. Otherwise,
this feature must not be enabled.";
reference "RFC 6241, Section 8.9";
}
// NETCONF Simple Types
typedef session-id-type {
type uint32 {
range "1..max";
}
description
"NETCONF Session Id";
}
typedef session-id-or-zero-type {
type uint32;
description
"NETCONF Session Id or Zero to indicate none";
}
typedef error-tag-type {
type enumeration {
enum in-use {
description
"The request requires a resource that
already is in use.";
}
enum invalid-value {
description
"The request specifies an unacceptable value for one
or more parameters.";
}
enum too-big {
description
"The request or response (that would be generated) is
too large for the implementation to handle.";
}
enum missing-attribute {
description
"An expected attribute is missing.";
}
enum bad-attribute {
description
"An attribute value is not correct; e.g., wrong type,
out of range, pattern mismatch.";
}
enum unknown-attribute {
description
"An unexpected attribute is present.";
}
enum missing-element {
description
"An expected element is missing.";
}
enum bad-element {
description
"An element value is not correct; e.g., wrong type,
out of range, pattern mismatch.";
}
enum unknown-element {
description
"An unexpected element is present.";
}
enum unknown-namespace {
description
"An unexpected namespace is present.";
}
enum access-denied {
description
"Access to the requested protocol operation or
data model is denied because authorization failed.";
}
enum lock-denied {
description
"Access to the requested lock is denied because the
lock is currently held by another entity.";
}
enum resource-denied {
description
"Request could not be completed because of
insufficient resources.";
}
enum rollback-failed {
description
"Request to roll back some configuration change (via
rollback-on-error or <discard-changes> operations)
was not completed for some reason.";
}
enum data-exists {
description
"Request could not be completed because the relevant
data model content already exists. For example,
a 'create' operation was attempted on data that
already exists.";
}
enum data-missing {
description
"Request could not be completed because the relevant
data model content does not exist. For example,
a 'delete' operation was attempted on
data that does not exist.";
}
enum operation-not-supported {
description
"Request could not be completed because the requested
operation is not supported by this implementation.";
}
enum operation-failed {
description
"Request could not be completed because the requested
operation failed for some reason not covered by
any other error condition.";
}
enum partial-operation {
description
"This error-tag is obsolete, and SHOULD NOT be sent
by servers conforming to this document.";
}
enum malformed-message {
description
"A message could not be handled because it failed to
be parsed correctly. For example, the message is not
well-formed XML or it uses an invalid character set.";
}
}
description "NETCONF Error Tag";
reference "RFC 6241, Appendix A";
}
typedef error-severity-type {
type enumeration {
enum error {
description "Error severity";
}
enum warning {
description "Warning severity";
}
}
description "NETCONF Error Severity";
reference "RFC 6241, Section 4.3";
}
typedef edit-operation-type {
type enumeration {
enum merge {
description
"The configuration data identified by the
element containing this attribute is merged
with the configuration at the corresponding
level in the configuration datastore identified
by the target parameter.";
}
enum replace {
description
"The configuration data identified by the element
containing this attribute replaces any related
configuration in the configuration datastore
identified by the target parameter. If no such
configuration data exists in the configuration
datastore, it is created. Unlike a
<copy-config> operation, which replaces the
entire target configuration, only the configuration
actually present in the config parameter is affected.";
}
enum create {
description
"The configuration data identified by the element
containing this attribute is added to the
configuration if and only if the configuration
data does not already exist in the configuration
datastore. If the configuration data exists, an
<rpc-error> element is returned with an
<error-tag> value of 'data-exists'.";
}
enum delete {
description
"The configuration data identified by the element
containing this attribute is deleted from the
configuration if and only if the configuration
data currently exists in the configuration
datastore. If the configuration data does not
exist, an <rpc-error> element is returned with
an <error-tag> value of 'data-missing'.";
}
enum remove {
description
"The configuration data identified by the element
containing this attribute is deleted from the
configuration if the configuration
data currently exists in the configuration
datastore. If the configuration data does not
exist, the 'remove' operation is silently ignored
by the server.";
}
}
default "merge";
description "NETCONF 'operation' attribute values";
reference "RFC 6241, Section 7.2";
}
// NETCONF Standard Protocol Operations
rpc get-config {
description
"Retrieve all or part of a specified configuration.";
reference "RFC 6241, Section 7.1";
input {
container source {
description
"Particular configuration to retrieve.";
choice config-source {
mandatory true;
description
"The configuration to retrieve.";
leaf candidate {
if-feature candidate;
type empty;
description
"The candidate configuration is the config source.";
}
leaf running {
type empty;
description
"The running configuration is the config source.";
}
leaf startup {
if-feature startup;
type empty;
description
"The startup configuration is the config source.
This is optional-to-implement on the server because
not all servers will support filtering for this
datastore.";
}
}
}
anyxml filter {
description
"Subtree or XPath filter to use.";
nc:get-filter-element-attributes;
}
}
output {
anyxml data {
description
"Copy of the source datastore subset that matched
the filter criteria (if any). An empty data container
indicates that the request did not produce any results.";
}
}
}
rpc edit-config {
description
"The <edit-config> operation loads all or part of a specified
configuration to the specified target configuration.";
reference "RFC 6241, Section 7.2";
input {
container target {
description
"Particular configuration to edit.";
choice config-target {
mandatory true;
description
"The configuration target.";
leaf candidate {
if-feature candidate;
type empty;
description
"The candidate configuration is the config target.";
}
leaf running {
if-feature writable-running;
type empty;
description
"The running configuration is the config source.";
}
}
}
leaf default-operation {
type enumeration {
enum merge {
description
"The default operation is merge.";
}
enum replace {
description
"The default operation is replace.";
}
enum none {
description
"There is no default operation.";
}
}
default "merge";
description
"The default operation to use.";
}
leaf test-option {
if-feature validate;
type enumeration {
enum test-then-set {
description
"The server will test and then set if no errors.";
}
enum set {
description
"The server will set without a test first.";
}
enum test-only {
description
"The server will only test and not set, even
if there are no errors.";
}
}
default "test-then-set";
description
"The test option to use.";
}
leaf error-option {
type enumeration {
enum stop-on-error {
description
"The server will stop on errors.";
}
enum continue-on-error {
description
"The server may continue on errors.";
}
enum rollback-on-error {
description
"The server will roll back on errors.
This value can only be used if the 'rollback-on-error'
feature is supported.";
}
}
default "stop-on-error";
description
"The error option to use.";
}
choice edit-content {
mandatory true;
description
"The content for the edit operation.";
anyxml config {
description
"Inline Config content.";
}
leaf url {
if-feature url;
type inet:uri;
description
"URL-based config content.";
}
}
}
}
rpc copy-config {
description
"Create or replace an entire configuration datastore with the
contents of another complete configuration datastore.";
reference "RFC 6241, Section 7.3";
input {
container target {
description
"Particular configuration to copy to.";
choice config-target {
mandatory true;
description
"The configuration target of the copy operation.";
leaf candidate {
if-feature candidate;
type empty;
description
"The candidate configuration is the config target.";
}
leaf running {
if-feature writable-running;
type empty;
description
"The running configuration is the config target.
This is optional-to-implement on the server.";
}
leaf startup {
if-feature startup;
type empty;
description
"The startup configuration is the config target.";
}
leaf url {
if-feature url;
type inet:uri;
description
"The URL-based configuration is the config target.";
}
}
}
container source {
description
"Particular configuration to copy from.";
choice config-source {
mandatory true;
description
"The configuration source for the copy operation.";
leaf candidate {
if-feature candidate;
type empty;
description
"The candidate configuration is the config source.";
}
leaf running {
type empty;
description
"The running configuration is the config source.";
}
leaf startup {
if-feature startup;
type empty;
description
"The startup configuration is the config source.";
}
leaf url {
if-feature url;
type inet:uri;
description
"The URL-based configuration is the config source.";
}
anyxml config {
description
"Inline Config content: <config> element. Represents
an entire configuration datastore, not
a subset of the running datastore.";
}
}
}
}
}
rpc delete-config {
nacm:default-deny-all;
description
"Delete a configuration datastore.";
reference "RFC 6241, Section 7.4";
input {
container target {
description
"Particular configuration to delete.";
choice config-target {
mandatory true;
description
"The configuration target to delete.";
leaf startup {
if-feature startup;
type empty;
description
"The startup configuration is the config target.";
}
leaf url {
if-feature url;
type inet:uri;
description
"The URL-based configuration is the config target.";
}
}
}
}
}
rpc lock {
description
"The lock operation allows the client to lock the configuration
system of a device.";
reference "RFC 6241, Section 7.5";
input {
container target {
description
"Particular configuration to lock.";
choice config-target {
mandatory true;
description
"The configuration target to lock.";
leaf candidate {
if-feature candidate;
type empty;
description
"The candidate configuration is the config target.";
}
leaf running {
type empty;
description
"The running configuration is the config target.";
}
leaf startup {
if-feature startup;
type empty;
description
"The startup configuration is the config target.";
}
}
}
}
}
rpc unlock {
description
"The unlock operation is used to release a configuration lock,
previously obtained with the 'lock' operation.";
reference "RFC 6241, Section 7.6";
input {
container target {
description
"Particular configuration to unlock.";
choice config-target {
mandatory true;
description
"The configuration target to unlock.";
leaf candidate {
if-feature candidate;
type empty;
description
"The candidate configuration is the config target.";
}
leaf running {
type empty;
description
"The running configuration is the config target.";
}
leaf startup {
if-feature startup;
type empty;
description
"The startup configuration is the config target.";
}
}
}
}
}
rpc get {
description
"Retrieve running configuration and device state information.";
reference "RFC 6241, Section 7.7";
input {
anyxml filter {
description
"This parameter specifies the portion of the system
configuration and state data to retrieve.";
nc:get-filter-element-attributes;
}
}
output {
anyxml data {
description
"Copy of the running datastore subset and/or state
data that matched the filter criteria (if any).
An empty data container indicates that the request did not
produce any results.";
}
}
}
rpc close-session {
description
"Request graceful termination of a NETCONF session.";
reference "RFC 6241, Section 7.8";
}
rpc kill-session {
nacm:default-deny-all;
description
"Force the termination of a NETCONF session.";
reference "RFC 6241, Section 7.9";
input {
leaf session-id {
type session-id-type;
mandatory true;
description
"Particular session to kill.";
}
}
}
rpc commit {
if-feature candidate;
description
"Commit the candidate configuration as the device's new
current configuration.";
reference "RFC 6241, Section 8.3.4.1";
input {
leaf confirmed {
if-feature confirmed-commit;
type empty;
description
"Requests a confirmed commit.";
reference "RFC 6241, Section 8.3.4.1";
}
leaf confirm-timeout {
if-feature confirmed-commit;
type uint32 {
range "1..max";
}
units "seconds";
default "600"; // 10 minutes
description
"The timeout interval for a confirmed commit.";
reference "RFC 6241, Section 8.3.4.1";
}
leaf persist {
if-feature confirmed-commit;
type string;
description
"This parameter is used to make a confirmed commit
persistent. A persistent confirmed commit is not aborted
if the NETCONF session terminates. The only way to abort
a persistent confirmed commit is to let the timer expire,
or to use the <cancel-commit> operation.
The value of this parameter is a token that must be given
in the 'persist-id' parameter of <commit> or
<cancel-commit> operations in order to confirm or cancel
the persistent confirmed commit.
The token should be a random string.";
reference "RFC 6241, Section 8.3.4.1";
}
leaf persist-id {
if-feature confirmed-commit;
type string;
description
"This parameter is given in order to commit a persistent
confirmed commit. The value must be equal to the value
given in the 'persist' parameter to the <commit> operation.
If it does not match, the operation fails with an
'invalid-value' error.";
reference "RFC 6241, Section 8.3.4.1";
}
}
}
rpc discard-changes {
if-feature candidate;
description
"Revert the candidate configuration to the current
running configuration.";
reference "RFC 6241, Section 8.3.4.2";
}
rpc cancel-commit {
if-feature confirmed-commit;
description
"This operation is used to cancel an ongoing confirmed commit.
If the confirmed commit is persistent, the parameter
'persist-id' must be given, and it must match the value of the
'persist' parameter.";
reference "RFC 6241, Section 8.4.4.1";
input {
leaf persist-id {
type string;
description
"This parameter is given in order to cancel a persistent
confirmed commit. The value must be equal to the value
given in the 'persist' parameter to the <commit> operation.
If it does not match, the operation fails with an
'invalid-value' error.";
}
}
}
rpc validate {
if-feature validate;
description
"Validates the contents of the specified configuration.";
reference "RFC 6241, Section 8.6.4.1";
input {
container source {
description
"Particular configuration to validate.";
choice config-source {
mandatory true;
description
"The configuration source to validate.";
leaf candidate {
if-feature candidate;
type empty;
description
"The candidate configuration is the config source.";
}
leaf running {
type empty;
description
"The running configuration is the config source.";
}
leaf startup {
if-feature startup;
type empty;
description
"The startup configuration is the config source.";
}
leaf url {
if-feature url;
type inet:uri;
description
"The URL-based configuration is the config source.";
}
anyxml config {
description
"Inline Config content: <config> element. Represents
an entire configuration datastore, not
a subset of the running datastore.";
}
}
}
}
}
}

View File

@@ -0,0 +1,224 @@
module ietf-yang-schema-mount {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount";
prefix yangmnt;
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-yang-types {
prefix yang;
reference
"RFC 6991: Common YANG Data Types";
}
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
Editor: Martin Bjorklund
<mailto:mbj@tail-f.com>
Editor: Ladislav Lhotka
<mailto:lhotka@nic.cz>";
description
"This module defines a YANG extension statement that can be used
to incorporate data models defined in other YANG modules in a
module. It also defines operational state data that specify the
overall structure of the data model.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.
Copyright (c) 2019 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject to
the license terms contained in, the Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8528;
see the RFC itself for full legal notices.";
revision 2019-01-14 {
description
"Initial revision.";
reference
"RFC 8528: YANG Schema Mount";
}
/*
* Extensions
*/
extension mount-point {
argument label;
description
"The argument 'label' is a YANG identifier, i.e., it is of the
type 'yang:yang-identifier'.
The 'mount-point' statement MUST NOT be used in a YANG
version 1 module, neither explicitly nor via a 'uses'
statement.
The 'mount-point' statement MAY be present as a substatement
of 'container' and 'list' and MUST NOT be present elsewhere.
There MUST NOT be more than one 'mount-point' statement in a
given 'container' or 'list' statement.
If a mount point is defined within a grouping, its label is
bound to the module where the grouping is used.
A mount point defines a place in the node hierarchy where
other data models may be attached. A server that implements a
module with a mount point populates the
'/schema-mounts/mount-point' list with detailed information on
which data models are mounted at each mount point.
Note that the 'mount-point' statement does not define a new
data node.";
}
/*
* State data nodes
*/
container schema-mounts {
config false;
description
"Contains information about the structure of the overall
mounted data model implemented in the server.";
list namespace {
key "prefix";
description
"This list provides a mapping of namespace prefixes that are
used in XPath expressions of 'parent-reference' leafs to the
corresponding namespace URI references.";
leaf prefix {
type yang:yang-identifier;
description
"Namespace prefix.";
}
leaf uri {
type inet:uri;
description
"Namespace URI reference.";
}
}
list mount-point {
key "module label";
description
"Each entry of this list specifies a schema for a particular
mount point.
Each mount point MUST be defined using the 'mount-point'
extension in one of the modules listed in the server's
YANG library instance with conformance type 'implement'.";
leaf module {
type yang:yang-identifier;
description
"Name of a module containing the mount point.";
}
leaf label {
type yang:yang-identifier;
description
"Label of the mount point defined using the 'mount-point'
extension.";
}
leaf config {
type boolean;
default "true";
description
"If this leaf is set to 'false', then all data nodes in the
mounted schema are read-only ('config false'), regardless
of their 'config' property.";
}
choice schema-ref {
mandatory true;
description
"Alternatives for specifying the schema.";
container inline {
presence
"A complete self-contained schema is mounted at the
mount point.";
description
"This node indicates that the server has mounted at least
the module 'ietf-yang-library' at the mount point, and
its instantiation provides the information about the
mounted schema.
Different instances of the mount point may have
different schemas mounted.";
}
container shared-schema {
presence
"The mounted schema together with the 'parent-reference'
make up the schema for this mount point.";
description
"This node indicates that the server has mounted at least
the module 'ietf-yang-library' at the mount point, and
its instantiation provides the information about the
mounted schema. When XPath expressions in the mounted
schema are evaluated, the 'parent-reference' leaf-list
is taken into account.
Different instances of the mount point MUST have the
same schema mounted.";
leaf-list parent-reference {
type yang:xpath1.0;
description
"Entries of this leaf-list are XPath 1.0 expressions
that are evaluated in the following context:
- The context node is the node in the parent data tree
where the mount-point is defined.
- The accessible tree is the parent data tree
*without* any nodes defined in modules that are
mounted inside the parent schema.
- The context position and context size are both equal
to 1.
- The set of variable bindings is empty.
- The function library is the core function library
defined in the W3C XPath 1.0 document
(http://www.w3.org/TR/1999/REC-xpath-19991116) and
the functions defined in Section 10 of RFC 7950.
- The set of namespace declarations is defined by the
'namespace' list under 'schema-mounts'.
Each XPath expression MUST evaluate to a node-set
(possibly empty). For the purposes of evaluating
XPath expressions whose context nodes are defined in
the mounted schema, the union of all these node-sets
together with ancestor nodes are added to the
accessible data tree.
Note that in the case 'ietf-yang-schema-mount' is
itself mounted, a 'parent-reference' in the mounted
module may refer to nodes that were brought into the
accessible tree through a 'parent-reference' in the
parent schema.";
}
}
}
}
}
}

View File

@@ -0,0 +1,480 @@
module ietf-yang-types {
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
prefix "yang";
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
WG Chair: David Kessens
<mailto:david.kessens@nsn.com>
WG Chair: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>
Editor: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>";
description
"This module contains a collection of generally useful derived
YANG data types.
Copyright (c) 2013 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD License
set forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 6991; see
the RFC itself for full legal notices.";
revision 2013-07-15 {
description
"This revision adds the following new data types:
- yang-identifier
- hex-string
- uuid
- dotted-quad";
reference
"RFC 6991: Common YANG Data Types";
}
revision 2010-09-24 {
description
"Initial revision.";
reference
"RFC 6021: Common YANG Data Types";
}
/*** collection of counter and gauge types ***/
typedef counter32 {
type uint32;
description
"The counter32 type represents a non-negative integer
that monotonically increases until it reaches a
maximum value of 2^32-1 (4294967295 decimal), when it
wraps around and starts increasing again from zero.
Counters have no defined 'initial' value, and thus, a
single value of a counter has (in general) no information
content. Discontinuities in the monotonically increasing
value normally occur at re-initialization of the
management system, and at other times as specified in the
description of a schema node using this type. If such
other times can occur, for example, the creation of
a schema node of type counter32 at times other than
re-initialization, then a corresponding schema node
should be defined, with an appropriate type, to indicate
the last discontinuity.
The counter32 type should not be used for configuration
schema nodes. A default statement SHOULD NOT be used in
combination with the type counter32.
In the value set and its semantics, this type is equivalent
to the Counter32 type of the SMIv2.";
reference
"RFC 2578: Structure of Management Information Version 2
(SMIv2)";
}
typedef zero-based-counter32 {
type yang:counter32;
default "0";
description
"The zero-based-counter32 type represents a counter32
that has the defined 'initial' value zero.
A schema node of this type will be set to zero (0) on creation
and will thereafter increase monotonically until it reaches
a maximum value of 2^32-1 (4294967295 decimal), when it
wraps around and starts increasing again from zero.
Provided that an application discovers a new schema node
of this type within the minimum time to wrap, it can use the
'initial' value as a delta. It is important for a management
station to be aware of this minimum time and the actual time
between polls, and to discard data if the actual time is too
long or there is no defined minimum time.
In the value set and its semantics, this type is equivalent
to the ZeroBasedCounter32 textual convention of the SMIv2.";
reference
"RFC 4502: Remote Network Monitoring Management Information
Base Version 2";
}
typedef counter64 {
type uint64;
description
"The counter64 type represents a non-negative integer
that monotonically increases until it reaches a
maximum value of 2^64-1 (18446744073709551615 decimal),
when it wraps around and starts increasing again from zero.
Counters have no defined 'initial' value, and thus, a
single value of a counter has (in general) no information
content. Discontinuities in the monotonically increasing
value normally occur at re-initialization of the
management system, and at other times as specified in the
description of a schema node using this type. If such
other times can occur, for example, the creation of
a schema node of type counter64 at times other than
re-initialization, then a corresponding schema node
should be defined, with an appropriate type, to indicate
the last discontinuity.
The counter64 type should not be used for configuration
schema nodes. A default statement SHOULD NOT be used in
combination with the type counter64.
In the value set and its semantics, this type is equivalent
to the Counter64 type of the SMIv2.";
reference
"RFC 2578: Structure of Management Information Version 2
(SMIv2)";
}
typedef zero-based-counter64 {
type yang:counter64;
default "0";
description
"The zero-based-counter64 type represents a counter64 that
has the defined 'initial' value zero.
A schema node of this type will be set to zero (0) on creation
and will thereafter increase monotonically until it reaches
a maximum value of 2^64-1 (18446744073709551615 decimal),
when it wraps around and starts increasing again from zero.
Provided that an application discovers a new schema node
of this type within the minimum time to wrap, it can use the
'initial' value as a delta. It is important for a management
station to be aware of this minimum time and the actual time
between polls, and to discard data if the actual time is too
long or there is no defined minimum time.
In the value set and its semantics, this type is equivalent
to the ZeroBasedCounter64 textual convention of the SMIv2.";
reference
"RFC 2856: Textual Conventions for Additional High Capacity
Data Types";
}
typedef gauge32 {
type uint32;
description
"The gauge32 type represents a non-negative integer, which
may increase or decrease, but shall never exceed a maximum
value, nor fall below a minimum value. The maximum value
cannot be greater than 2^32-1 (4294967295 decimal), and
the minimum value cannot be smaller than 0. The value of
a gauge32 has its maximum value whenever the information
being modeled is greater than or equal to its maximum
value, and has its minimum value whenever the information
being modeled is smaller than or equal to its minimum value.
If the information being modeled subsequently decreases
below (increases above) the maximum (minimum) value, the
gauge32 also decreases (increases).
In the value set and its semantics, this type is equivalent
to the Gauge32 type of the SMIv2.";
reference
"RFC 2578: Structure of Management Information Version 2
(SMIv2)";
}
typedef gauge64 {
type uint64;
description
"The gauge64 type represents a non-negative integer, which
may increase or decrease, but shall never exceed a maximum
value, nor fall below a minimum value. The maximum value
cannot be greater than 2^64-1 (18446744073709551615), and
the minimum value cannot be smaller than 0. The value of
a gauge64 has its maximum value whenever the information
being modeled is greater than or equal to its maximum
value, and has its minimum value whenever the information
being modeled is smaller than or equal to its minimum value.
If the information being modeled subsequently decreases
below (increases above) the maximum (minimum) value, the
gauge64 also decreases (increases).
In the value set and its semantics, this type is equivalent
to the CounterBasedGauge64 SMIv2 textual convention defined
in RFC 2856";
reference
"RFC 2856: Textual Conventions for Additional High Capacity
Data Types";
}
/*** collection of identifier-related types ***/
typedef object-identifier {
type string {
pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))'
+ '(\.(0|([1-9]\d*)))*';
}
description
"The object-identifier type represents administratively
assigned names in a registration-hierarchical-name tree.
Values of this type are denoted as a sequence of numerical
non-negative sub-identifier values. Each sub-identifier
value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers
are separated by single dots and without any intermediate
whitespace.
The ASN.1 standard restricts the value space of the first
sub-identifier to 0, 1, or 2. Furthermore, the value space
of the second sub-identifier is restricted to the range
0 to 39 if the first sub-identifier is 0 or 1. Finally,
the ASN.1 standard requires that an object identifier
has always at least two sub-identifiers. The pattern
captures these restrictions.
Although the number of sub-identifiers is not limited,
module designers should realize that there may be
implementations that stick with the SMIv2 limit of 128
sub-identifiers.
This type is a superset of the SMIv2 OBJECT IDENTIFIER type
since it is not restricted to 128 sub-identifiers. Hence,
this type SHOULD NOT be used to represent the SMIv2 OBJECT
IDENTIFIER type; the object-identifier-128 type SHOULD be
used instead.";
reference
"ISO9834-1: Information technology -- Open Systems
Interconnection -- Procedures for the operation of OSI
Registration Authorities: General procedures and top
arcs of the ASN.1 Object Identifier tree";
}
typedef object-identifier-128 {
type object-identifier {
pattern '\d*(\.\d*){1,127}';
}
description
"This type represents object-identifiers restricted to 128
sub-identifiers.
In the value set and its semantics, this type is equivalent
to the OBJECT IDENTIFIER type of the SMIv2.";
reference
"RFC 2578: Structure of Management Information Version 2
(SMIv2)";
}
typedef yang-identifier {
type string {
length "1..max";
pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*';
pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*';
}
description
"A YANG identifier string as defined by the 'identifier'
rule in Section 12 of RFC 6020. An identifier must
start with an alphabetic character or an underscore
followed by an arbitrary sequence of alphabetic or
numeric characters, underscores, hyphens, or dots.
A YANG identifier MUST NOT start with any possible
combination of the lowercase or uppercase character
sequence 'xml'.";
reference
"RFC 6020: YANG - A Data Modeling Language for the Network
Configuration Protocol (NETCONF)";
}
/*** collection of types related to date and time***/
typedef date-and-time {
type string {
pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?'
+ '(Z|[\+\-]\d{2}:\d{2})';
}
description
"The date-and-time type is a profile of the ISO 8601
standard for representation of dates and times using the
Gregorian calendar. The profile is defined by the
date-time production in Section 5.6 of RFC 3339.
The date-and-time type is compatible with the dateTime XML
schema type with the following notable exceptions:
(a) The date-and-time type does not allow negative years.
(b) The date-and-time time-offset -00:00 indicates an unknown
time zone (see RFC 3339) while -00:00 and +00:00 and Z
all represent the same time zone in dateTime.
(c) The canonical format (see below) of data-and-time values
differs from the canonical format used by the dateTime XML
schema type, which requires all times to be in UTC using
the time-offset 'Z'.
This type is not equivalent to the DateAndTime textual
convention of the SMIv2 since RFC 3339 uses a different
separator between full-date and full-time and provides
higher resolution of time-secfrac.
The canonical format for date-and-time values with a known time
zone uses a numeric time zone offset that is calculated using
the device's configured known offset to UTC time. A change of
the device's offset to UTC time will cause date-and-time values
to change accordingly. Such changes might happen periodically
in case a server follows automatically daylight saving time
(DST) time zone offset changes. The canonical format for
date-and-time values with an unknown time zone (usually
referring to the notion of local time) uses the time-offset
-00:00.";
reference
"RFC 3339: Date and Time on the Internet: Timestamps
RFC 2579: Textual Conventions for SMIv2
XSD-TYPES: XML Schema Part 2: Datatypes Second Edition";
}
typedef timeticks {
type uint32;
description
"The timeticks type represents a non-negative integer that
represents the time, modulo 2^32 (4294967296 decimal), in
hundredths of a second between two epochs. When a schema
node is defined that uses this type, the description of
the schema node identifies both of the reference epochs.
In the value set and its semantics, this type is equivalent
to the TimeTicks type of the SMIv2.";
reference
"RFC 2578: Structure of Management Information Version 2
(SMIv2)";
}
typedef timestamp {
type yang:timeticks;
description
"The timestamp type represents the value of an associated
timeticks schema node at which a specific occurrence
happened. The specific occurrence must be defined in the
description of any schema node defined using this type. When
the specific occurrence occurred prior to the last time the
associated timeticks attribute was zero, then the timestamp
value is zero. Note that this requires all timestamp values
to be reset to zero when the value of the associated timeticks
attribute reaches 497+ days and wraps around to zero.
The associated timeticks schema node must be specified
in the description of any schema node using this type.
In the value set and its semantics, this type is equivalent
to the TimeStamp textual convention of the SMIv2.";
reference
"RFC 2579: Textual Conventions for SMIv2";
}
/*** collection of generic address types ***/
typedef phys-address {
type string {
pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
}
description
"Represents media- or physical-level addresses represented
as a sequence octets, each octet represented by two hexadecimal
numbers. Octets are separated by colons. The canonical
representation uses lowercase characters.
In the value set and its semantics, this type is equivalent
to the PhysAddress textual convention of the SMIv2.";
reference
"RFC 2579: Textual Conventions for SMIv2";
}
typedef mac-address {
type string {
pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}';
}
description
"The mac-address type represents an IEEE 802 MAC address.
The canonical representation uses lowercase characters.
In the value set and its semantics, this type is equivalent
to the MacAddress textual convention of the SMIv2.";
reference
"IEEE 802: IEEE Standard for Local and Metropolitan Area
Networks: Overview and Architecture
RFC 2579: Textual Conventions for SMIv2";
}
/*** collection of XML-specific types ***/
typedef xpath1.0 {
type string;
description
"This type represents an XPATH 1.0 expression.
When a schema node is defined that uses this type, the
description of the schema node MUST specify the XPath
context in which the XPath expression is evaluated.";
reference
"XPATH: XML Path Language (XPath) Version 1.0";
}
/*** collection of string types ***/
typedef hex-string {
type string {
pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
}
description
"A hexadecimal string with octets represented as hex digits
separated by colons. The canonical representation uses
lowercase characters.";
}
typedef uuid {
type string {
pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-'
+ '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}';
}
description
"A Universally Unique IDentifier in the string representation
defined in RFC 4122. The canonical representation uses
lowercase characters.
The following is an example of a UUID in string representation:
f81d4fae-7dec-11d0-a765-00a0c91e6bf6
";
reference
"RFC 4122: A Universally Unique IDentifier (UUID) URN
Namespace";
}
typedef dotted-quad {
type string {
pattern
'(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
+ '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
}
description
"An unsigned 32-bit number expressed in the dotted-quad
notation, i.e., four octets written as decimal numbers
and separated with the '.' (full stop) character.";
}
}

3
start-ubuntu-dev.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
docker run -it --rm --entrypoint bash -w /oai-ran-live -v $(pwd):/oai-ran-live ran-dev:ubuntu22-latest