Unverified Commit 2cdd2a50 authored by kharade's avatar kharade

OAI banner added

parent 30defdf4
...@@ -103,10 +103,12 @@ WORKDIR /openair-upf/bin ...@@ -103,10 +103,12 @@ WORKDIR /openair-upf/bin
COPY --from=vpp-upf-builder /vpp-upf/scripts/entrypoint.sh . COPY --from=vpp-upf-builder /vpp-upf/scripts/entrypoint.sh .
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vpp . COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vpp .
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vppctl . COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vppctl .
COPY --from=vpp-upf-builder /vpp-upf/scripts/nrf_client.py .
WORKDIR /openair-upf/etc WORKDIR /openair-upf/etc
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/init.conf . COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/init.conf .
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/startup_debug.conf . COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/startup_debug.conf .
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/upf_profile.json .
WORKDIR /usr/lib64 WORKDIR /usr/lib64
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/ . COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/ .
......
#!/usr/bin/env bash #!/usr/bin/env bash
#"""
#/*
# * 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
# */
#
#/*! \file nrf_client.py
# \author Rohan KHARADE
# \date 2021
# \email: rohan.kharade@openairinterface.org
#*/
#"""
# files are common to docker and native installation # files are common to docker and native installation
#____________ #____________
# init.conf => upf config # init.conf => upf config
......
...@@ -35,20 +35,10 @@ logging.basicConfig(format='%(asctime)s] %(filename)s: %(levelname)s ' ...@@ -35,20 +35,10 @@ logging.basicConfig(format='%(asctime)s] %(filename)s: %(levelname)s '
'- %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p') '- %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
class upf_profile(object): class upf_profile(object):
def __init__(self, create_topo_log_level=None, fqdn = None, nrf_ip = None, nrf_port = None, http_version = None): def __init__(self, nrf_ip = None, nrf_port = None, http_version = None):
self.logger = logging.getLogger("upf") self.logger = logging.getLogger("upf")
atexit.register(self.goodbye) # register a message to print out when exit atexit.register(self.goodbye) # register a message to print out when exit
if create_topo_log_level:
if create_topo_log_level == 'debug':
self.logger.setLevel(logging.DEBUG)
elif create_topo_log_level == 'info':
self.logger.setLevel(logging.INFO)
elif create_topo_log_level == 'warn':
self.logger.setLevel(logging.WARNING)
elif create_topo_log_level == 'error':
self.logger.setLevel(logging.ERROR)
elif create_topo_log_level == 'critic':
self.logger.setLevel(logging.CRITICAL)
message = " NRF UPF client started " message = " NRF UPF client started "
self.logger.info(message) self.logger.info(message)
#@@@@@@@@ Initialize arguments #@@@@@@@@ #@@@@@@@@ Initialize arguments #@@@@@@@@
...@@ -138,28 +128,38 @@ class upf_profile(object): ...@@ -138,28 +128,38 @@ class upf_profile(object):
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description='Process commandline arguments and override configurations') description='Process commandline arguments and override configurations')
parser.add_argument('--log', metavar='[level]', action='store', type=str,
required=False, default='debug',
help='set the log level: debug, info (default), warning, error, critical. default = info')
parser.add_argument('--fqdn', metavar='[number]', action='store', type=str,
required=False, default='oai-upf-vpp.org',
help='set the fqdn for upf. default = oai-upf-vpp.org')
parser.add_argument('--nrf_ip', metavar='[number]', action='store', type=str, parser.add_argument('--nrf_ip', metavar='[number]', action='store', type=str,
required=False, default='192.168.71.130', required=False, default='192.168.71.130',
help='set the nrf ip address. default = 192.168.71.130') help='set the nrf ip address. default = 192.168.71.130')
parser.add_argument('--nrf_port', metavar='[number]', action='store', type=str, parser.add_argument('--nrf_port', metavar='[number]', action='store', type=str,
required=False, default='8080', required=False, default='8080',
help='set the nrf ip address. default = 8080') help='set the nrf port. default = 8080')
parser.add_argument('--http_version', metavar='[number]', action='store', type=str, parser.add_argument('--http_version', metavar='[number]', action='store', type=str,
required=False, default='2', required=False, default='2',
help='set the nrf ip address. default = 2') help='set the nrf ip address. default = 2')
args = parser.parse_args() args = parser.parse_args()
nrf_client = upf_profile(args.log, args.fqdn, args.nrf_ip, args.nrf_port, args.http_version) nrf_client = upf_profile(args.nrf_ip, args.nrf_port, args.http_version)
nrf_client.display_upf_profile() nrf_client.display_upf_profile()
nrf_client.trigger_nf_registration() nrf_client.trigger_nf_registration()
()
\ No newline at end of file """
* Usage of nrf client -->
$ python nrf_client.py -h
usage: nrf_client.py [-h] [--nrf_ip [number]] [--nrf_port [number]]
[--http_version [number]]
Process commandline arguments and override configurations
optional arguments:
-h, --help show this help message and exit
--nrf_ip [number] set the nrf ip address. default = 192.168.71.130
--nrf_port [number] set the nrf port. default = 8080
--http_version [number] set the nrf ip address. default = 2
"""
#!/bin/bash #!/bin/bash
#"""
#/*
# * 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
# */
#
#/*! \file nrf_client.py
# \author Rohan KHARADE
# \date 2021
# \email: rohan.kharade@openairinterface.org
#*/
#"""
if [ $(id -u) -ne 0 ]; then if [ $(id -u) -ne 0 ]; then
exec sudo -E "$0" "$@" exec sudo -E "$0" "$@"
fi fi
......
...@@ -198,7 +198,7 @@ services: ...@@ -198,7 +198,7 @@ services:
ipv4_address: 192.168.72.134 ipv4_address: 192.168.72.134
public_net_sgi_lan: public_net_sgi_lan:
ipv4_address: 192.168.73.134 ipv4_address: 192.168.73.134
entrypoint: /bin/bash -c "sleep infinity" #entrypoint: /bin/bash -c "sleep infinity"
oai-ext-dn: oai-ext-dn:
image: ubuntu:bionic image: ubuntu:bionic
privileged: true privileged: true
......
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