Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UPF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-UPF
Commits
2cdd2a50
Unverified
Commit
2cdd2a50
authored
Sep 30, 2021
by
kharade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OAI banner added
parent
30defdf4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
24 deletions
+84
-24
docker/Dockerfile.upf-vpp.rhel7
docker/Dockerfile.upf-vpp.rhel7
+2
-0
scripts/entrypoint.sh
scripts/entrypoint.sh
+29
-0
scripts/nrf_client.py
scripts/nrf_client.py
+23
-23
scripts/run.sh
scripts/run.sh
+29
-0
scripts/tests/docker-compose.yml
scripts/tests/docker-compose.yml
+1
-1
No files found.
docker/Dockerfile.upf-vpp.rhel7
View file @
2cdd2a50
...
...
@@ -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/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/scripts/nrf_client.py .
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/startup_debug.conf .
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/upf_profile.json .
WORKDIR /usr/lib64
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/ .
...
...
scripts/entrypoint.sh
View file @
2cdd2a50
#!/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
#____________
# init.conf => upf config
...
...
scripts/nrf_client.py
View file @
2cdd2a50
...
...
@@ -35,20 +35,10 @@ logging.basicConfig(format='%(asctime)s] %(filename)s: %(levelname)s '
'- %(message)s'
,
datefmt
=
'%m/%d/%Y %I:%M:%S %p'
)
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"
)
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 "
self
.
logger
.
info
(
message
)
#@@@@@@@@ Initialize arguments #@@@@@@@@
...
...
@@ -138,28 +128,38 @@ class upf_profile(object):
if
__name__
==
'__main__'
:
parser
=
argparse
.
ArgumentParser
(
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
,
required
=
False
,
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
,
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
,
required
=
False
,
default
=
'2'
,
help
=
'set the nrf ip address. default = 2'
)
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
.
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
"""
scripts/run.sh
View file @
2cdd2a50
#!/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
exec sudo
-E
"
$0
"
"
$@
"
fi
...
...
scripts/tests/docker-compose.yml
View file @
2cdd2a50
...
...
@@ -198,7 +198,7 @@ services:
ipv4_address
:
192.168.72.134
public_net_sgi_lan
:
ipv4_address
:
192.168.73.134
entrypoint
:
/bin/bash -c "sleep infinity"
#
entrypoint: /bin/bash -c "sleep infinity"
oai-ext-dn
:
image
:
ubuntu:bionic
privileged
:
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment