Unverified Commit 54a49ba2 authored by kharade's avatar kharade

config parameters added for httpv2

parent d61518c4
......@@ -277,7 +277,7 @@ install_nghttp2_from_git() {
git clone $GIT_URL
cd nghttp2
git checkout 43ba3125932c1d56addaeded2b7f62637af255cd
git checkout -f v3.10.3
git submodule update --init
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
autoreconf -i
......@@ -440,8 +440,8 @@ check_install_ausf_deps() {
install_nlohmann_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
#install_nghttp2_from_git $1 $2
#ret=$?;[[ $ret -ne 0 ]] && return $ret
install_nghttp2_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
$SUDO ldconfig
return 0
......
......@@ -8,9 +8,11 @@ AUSF =
INTERFACES:{
# AUSF binded interface for SBI interface (e.g., communication with AMF, UDM)
SBI:{
INTERFACE_NAME = "@SBI_IF_NAME@"; # YOUR NETWORK CONFIG HERE
INTERFACE_NAME = "@SBI_IF_NAME@"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = @SBI_PORT@; # YOUR NETWORK CONFIG HERE (default: 80)
PORT = @SBI_PORT@; # YOUR NETWORK CONFIG HERE (default: 80)
API_VERSION = "@SBI_API_VERSION@"; # YOUR API VERSION FOR UDM CONFIG HERE
HTTP2_PORT = @SBI_HTTP2_PORT@; # YOUR NETWORK CONFIG HERE
};
};
......
......@@ -5,6 +5,8 @@ set -euo pipefail
CONFIG_DIR="/openair-ausf/etc"
SBI_PORT=${SBI_PORT:-80}
UDM_PORT=${UDM_PORT:-80}
SBI_HTTP2_PORT=${SBI_HTTP2_PORT:-8080}
SBI_API_VERSION=${SBI_API_VERSION:-v1}
if [[ ${USE_FQDN_DNS} == "yes" ]];then
UDM_IP_ADDRESS=${UDM_IP_ADDRESS:-0.0.0.0}
......
......@@ -121,6 +121,19 @@ int ausf_config::load(const std::string& config_file) {
const Setting& sbi_cfg = new_if_cfg[AUSF_CONFIG_STRING_INTERFACE_SBI];
load_interface(sbi_cfg, sbi);
// HTTP2 port
if (!(sbi_cfg.lookupValue(
AUSF_CONFIG_STRING_SBI_HTTP2_PORT, sbi_http2_port))) {
Logger::ausf_app().error(AUSF_CONFIG_STRING_SBI_HTTP2_PORT "failed");
throw(AUSF_CONFIG_STRING_SBI_HTTP2_PORT " failed");
}
// API Version
if (!(sbi_cfg.lookupValue(
AUSF_CONFIG_STRING_API_VERSION, sbi_api_version))) {
Logger::ausf_app().error(AUSF_CONFIG_STRING_API_VERSION " failed");
throw(AUSF_CONFIG_STRING_API_VERSION " failed");
}
} catch (const SettingNotFoundException& nfex) {
Logger::config().error(
......@@ -223,7 +236,10 @@ void ausf_config::display() {
Logger::config().info("- SBI Networking:");
Logger::config().info(" Iface ................: %s", sbi.if_name.c_str());
Logger::config().info(" IPv4 Addr ............: %s", inet_ntoa(sbi.addr4));
Logger::config().info(" Port .................: %d", sbi.port);
Logger::config().info(" HTTP1 Port ...........: %d", sbi.port);
Logger::config().info(" HTTP2 Port............: %d", sbi_http2_port);
Logger::config().info(
" API Version...........: %s", sbi_api_version.c_str());
Logger::config().info("- UDM:");
Logger::config().info(
......
......@@ -50,6 +50,7 @@
#define AUSF_CONFIG_STRING_INTERFACES "INTERFACES"
#define AUSF_CONFIG_STRING_INTERFACE_SBI "SBI"
#define AUSF_CONFIG_STRING_SBI_HTTP2_PORT "HTTP2_PORT"
#define AUSF_CONFIG_STRING_INTERFACE_NAME "INTERFACE_NAME"
#define AUSF_CONFIG_STRING_IPV4_ADDRESS "IPV4_ADDRESS"
......@@ -90,6 +91,8 @@ class ausf_config {
std::string ausf_name;
interface_cfg_t sbi;
unsigned int sbi_http2_port;
std::string sbi_api_version;
struct {
struct in_addr ipv4_addr;
......
......@@ -294,5 +294,5 @@ IF(STATIC_LINKING)
ENDIF(STATIC_LINKING)
target_link_libraries (ausf ${ASAN}
-Wl,--start-group AUSF 3GPP_COMMON_TYPES 5GAKA AUSF_API CN_UTILS -lnettle ${NETTLE_LIBRARIES} ${CRYPTO_LIBRARIES} -lboost_system -lboost_thread -lboost_date_time -lssl -lcrypto -lgmp -Wl,--end-group pthread m rt config++ boost_system pistache curl)
-Wl,--start-group AUSF 3GPP_COMMON_TYPES 5GAKA AUSF_API CN_UTILS -lnettle ${NETTLE_LIBRARIES} ${CRYPTO_LIBRARIES} -lnghttp2_asio -lboost_system -lboost_thread -lboost_date_time -lssl -lcrypto -lgmp -Wl,--end-group pthread m rt config++ boost_system pistache curl)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment