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
77a9e058
Commit
77a9e058
authored
Feb 23, 2022
by
kharade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced nrf client from python to simple bash script
parent
a07e80f6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
133 additions
and
203 deletions
+133
-203
docker/Dockerfile.upf-vpp.rhel7
docker/Dockerfile.upf-vpp.rhel7
+25
-14
docker/Dockerfile.upf-vpp.ubuntu18
docker/Dockerfile.upf-vpp.ubuntu18
+27
-19
scripts/entrypoint.sh
scripts/entrypoint.sh
+5
-1
scripts/run.sh
scripts/run.sh
+1
-3
scripts/upf_conf/upf_profile.json
scripts/upf_conf/upf_profile.json
+2
-1
src/nrf_client.py
src/nrf_client.py
+0
-165
src/nrf_client.sh
src/nrf_client.sh
+73
-0
No files found.
docker/Dockerfile.upf-vpp.rhel7
View file @
77a9e058
...
@@ -103,21 +103,32 @@ RUN yum repolist --disablerepo=* && \
...
@@ -103,21 +103,32 @@ RUN yum repolist --disablerepo=* && \
yum remove -y wget && \
yum remove -y wget && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*
RUN yum install -y python-pip && pip install termcolor
WORKDIR /openair-upf/bin
WORKDIR /openair-upf/bin
COPY --from=vpp-upf-builder /vpp-upf/scripts/entrypoint.sh .
COPY --from=vpp-upf-builder \
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vpp .
/vpp-upf/scripts/entrypoint.sh \
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vppctl .
/vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vpp \
COPY --from=vpp-upf-builder /vpp-upf/src/nrf_client.py .
/vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vppctl \
/vpp-upf/src/nrf_client.sh ./
WORKDIR /openair-upf/etc
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/init.conf .
COPY --from=vpp-upf-builder \
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/startup_debug.conf .
/vpp-upf/scripts/upf_conf/init.conf \
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/upf_profile.json .
/vpp-upf/scripts/upf_conf/startup_debug.conf \
/vpp-upf/scripts/upf_conf/upf_profile.json \
WORKDIR /usr/lib64
/openair-upf/etc/
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/vpp_plugins/upf_plugin.so \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/vpp_plugins/dpdk_plugin.so \
/usr/lib64/vpp_plugins/
COPY --from=vpp-upf-builder \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libvppinfra.so.21.01.1 \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libvnet.so.21.01.1 \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libvlibmemory.so.21.01.1 \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libvlib.so.21.01.1 \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libsvm.so.21.01.1 \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libnat.so.21.01.1 \
/usr/lib64/
RUN ldconfig
RUN ldconfig
...
...
docker/Dockerfile.upf-vpp.ubuntu18
View file @
77a9e058
...
@@ -86,32 +86,40 @@ RUN apt-get update && \
...
@@ -86,32 +86,40 @@ RUN apt-get update && \
net-tools \
net-tools \
tshark \
tshark \
tzdata\
tzdata\
openssl \
libhyperscan-dev \
libhyperscan-dev \
iproute2 \
iproute2 \
iputils-ping \
iputils-ping \
vim \
curl \
python \
python-pip \
libcurl4-openssl-dev \
libssl-dev \
libnuma1 \
libnuma1 \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*
RUN pip install pycurl termcolor
WORKDIR /openair-upf/bin
WORKDIR /openair-upf/bin
COPY --from=vpp-upf-builder /vpp-upf/scripts/entrypoint.sh .
COPY --from=vpp-upf-builder \
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vpp .
/vpp-upf/scripts/entrypoint.sh \
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vppctl .
/vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vpp \
COPY --from=vpp-upf-builder /vpp-upf/src/nrf_client.py .
/vpp-upf/vpp/build-root/install-vpp-native/vpp/bin/vppctl \
/vpp-upf/src/nrf_client.sh \
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 \
COPY --from=vpp-upf-builder /vpp-upf/scripts/upf_conf/upf_profile.json .
/vpp-upf/scripts/upf_conf/init.conf \
/vpp-upf/scripts/upf_conf/startup_debug.conf \
WORKDIR /usr/lib/x86_64-linux-gnu/
/vpp-upf/scripts/upf_conf/upf_profile.json \
COPY --from=vpp-upf-builder /vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/ .
/openair-upf/etc/
COPY --from=vpp-upf-builder \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/vpp_plugins/upf_plugin.so \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/vpp_plugins/dpdk_plugin.so \
/usr/lib/x86_64-linux-gnu/vpp_plugins/
COPY --from=vpp-upf-builder \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libvppinfra.so.21.01.1 \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libvnet.so.21.01.1 \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libvlibmemory.so.21.01.1 \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libvlib.so.21.01.1 \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libsvm.so.21.01.1 \
/vpp-upf/vpp/build-root/install-vpp-native/vpp/lib/libnat.so.21.01.1 \
/usr/lib/x86_64-linux-gnu/
RUN ldconfig
RUN ldconfig
...
...
scripts/entrypoint.sh
View file @
77a9e058
...
@@ -39,6 +39,10 @@
...
@@ -39,6 +39,10 @@
set
-euo
pipefail
set
-euo
pipefail
CONFIG_DIR
=
"/openair-upf/etc"
CONFIG_DIR
=
"/openair-upf/etc"
BIN_DIR
=
"/openair-upf/bin"
UUID
=
$(
cat
/proc/sys/kernel/random/uuid
)
SGI_IPV4
=
$(
ifconfig
$INTERFACE_CORE
|
grep
"inet "
|
awk
'{print $2}'
)
SGI_IPV4
=
$(
ifconfig
$INTERFACE_CORE
|
grep
"inet "
|
awk
'{print $2}'
)
ACCESS_IPV4
=
$(
ifconfig
$INTERFACE_ACCESS
|
grep
"inet "
|
awk
'{print $2}'
)
ACCESS_IPV4
=
$(
ifconfig
$INTERFACE_ACCESS
|
grep
"inet "
|
awk
'{print $2}'
)
CORE_IPV4
=
$(
ifconfig
$INTERFACE_CP
|
grep
"inet "
|
awk
'{print $2}'
)
CORE_IPV4
=
$(
ifconfig
$INTERFACE_CP
|
grep
"inet "
|
awk
'{print $2}'
)
...
@@ -50,7 +54,7 @@ N6_IPV4_ADDRESS_LOCAL=$(ifconfig $INTERFACE_CORE | grep "inet " | awk '{print $2
...
@@ -50,7 +54,7 @@ N6_IPV4_ADDRESS_LOCAL=$(ifconfig $INTERFACE_CORE | grep "inet " | awk '{print $2
###############################
###############################
# UPF Config
# UPF Config
###############################
###############################
array
=(
${
CONFIG_DIR
}
/
*
.conf
${
CONFIG_DIR
}
/
*
.json
)
array
=(
${
CONFIG_DIR
}
/
*
.conf
${
CONFIG_DIR
}
/
*
.json
${
BIN_DIR
}
/nrf_client.sh
)
for
c
in
"
${
array
[@]
}
"
;
do
for
c
in
"
${
array
[@]
}
"
;
do
# grep variable names (format: ${VAR}) from template to be rendered
# grep variable names (format: ${VAR}) from template to be rendered
VARS
=
$(
grep
-oP
'@[a-zA-Z0-9_]+@'
${
c
}
|
sort
|
uniq
| xargs
)
VARS
=
$(
grep
-oP
'@[a-zA-Z0-9_]+@'
${
c
}
|
sort
|
uniq
| xargs
)
...
...
scripts/run.sh
View file @
77a9e058
...
@@ -80,9 +80,7 @@ do
...
@@ -80,9 +80,7 @@ do
done
done
if
[[
${
REGISTER_NRF
}
==
"yes"
]]
;
then
if
[[
${
REGISTER_NRF
}
==
"yes"
]]
;
then
NRF_APP
=
"
$base
/bin/nrf_client.py"
$base
/bin/nrf_client.sh
NRF_ARGS
=
" --nrf_ip="
$NRF_IP_ADDR
" --nrf_port="
$NRF_PORT
" --http_version="
$HTTP_VERSION
python
$NRF_APP
$NRF_ARGS
fi
fi
sleep
infinity
sleep
infinity
scripts/upf_conf/upf_profile.json
View file @
77a9e058
{
{
"nfInstanceId"
:
"@UUID@"
,
"capacity"
:
100
,
"capacity"
:
100
,
"fqdn"
:
"gw@GW_ID@.vppupf.node.5gcn.mnc@MNC03@.mcc@MCC@.@REALM@"
,
"fqdn"
:
"gw@GW_ID@.vppupf.node.5gcn.mnc@MNC03@.mcc@MCC@.@REALM@"
,
"heartBeatTimer"
:
10
,
"heartBeatTimer"
:
10
,
...
@@ -31,7 +32,7 @@
...
@@ -31,7 +32,7 @@
},
{
},
{
"endpointFqdn"
:
"@NWI_N6@"
,
"endpointFqdn"
:
"@NWI_N6@"
,
"interfaceType"
:
"N6"
,
"interfaceType"
:
"N6"
,
"ipv4EndpointAddresses"
:
[
"@
CORE
_IPV4@"
],
"ipv4EndpointAddresses"
:
[
"@
SGI
_IPV4@"
],
"networkInstance"
:
"@NWI_N6@"
"networkInstance"
:
"@NWI_N6@"
}]
}]
...
...
src/nrf_client.py
deleted
100755 → 0
View file @
a07e80f6
#!/usr/bin/env python
"""
/*
* 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
*/
/*!
\f
ile nrf_client.py
\a
uthor Rohan KHARADE
\date 2018
\email: rohan.kharade@openairinterface.org
*/
"""
import
time
,
sys
,
json
,
logging
,
uuid
,
pycurl
,
argparse
,
atexit
from
termcolor
import
colored
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
,
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
message
=
" NRF UPF client started "
self
.
logger
.
info
(
message
)
#@@@@@@@@ Initialize arguments #@@@@@@@@
self
.
nrf_ip
=
nrf_ip
self
.
nrf_port
=
nrf_port
self
.
http_version
=
http_version
self
.
status_code
=
0
self
.
uuid
=
uuid
.
uuid4
()
self
.
url
=
'http://'
+
str
(
self
.
nrf_ip
)
+
':'
+
str
(
self
.
nrf_port
)
+
'/nnrf-nfm/v1/nf-instances/'
+
str
(
self
.
uuid
)
self
.
curl
=
pycurl
.
Curl
()
self
.
headers
=
[
"Content-Type:application/json"
]
self
.
dir_config
=
'/openair-upf/'
self
.
file_name
=
self
.
dir_config
+
'etc/upf_profile.json'
self
.
conf_file
=
open
(
self
.
file_name
,)
self
.
upf_profile
=
json
.
load
(
self
.
conf_file
)
#@@@@@@@@ Initialize upf profile #@@@@@@@@
self
.
upf_profile
[
'nfInstanceId'
]
=
str
(
self
.
uuid
)
self
.
capacity
=
self
.
upf_profile
[
'capacity'
]
self
.
fqdn
=
self
.
upf_profile
[
'fqdn'
]
self
.
heartBeatTimer
=
self
.
upf_profile
[
'heartBeatTimer'
]
self
.
ipv4Addresses
=
self
.
upf_profile
[
'ipv4Addresses'
]
self
.
nfInstanceId
=
self
.
upf_profile
[
'nfInstanceId'
]
self
.
nfInstanceName
=
self
.
upf_profile
[
'nfInstanceName'
]
self
.
nfStatus
=
self
.
upf_profile
[
'nfStatus'
]
self
.
nfType
=
self
.
upf_profile
[
'nfType'
]
self
.
priority
=
self
.
upf_profile
[
'priority'
]
self
.
sNssais
=
self
.
upf_profile
[
'sNssais'
]
self
.
upfInfo
=
self
.
upf_profile
[
'upfInfo'
]
message
=
" UPF profile is parsed "
self
.
logger
.
info
(
message
)
def
display_upf_profile
(
self
):
message
=
" Display UPF profile "
self
.
logger
.
info
(
message
)
print
(
colored
(
'[*] UPF Profile
\n
\t
fqdn = '
+
self
.
fqdn
+
\
'
\n
\t
capacity = '
+
str
(
self
.
capacity
)
+
\
'
\n
\t
heartBeatTimer = '
+
str
(
self
.
heartBeatTimer
)
+
\
'
\n
\t
ipv4Addresses = '
+
u", "
.
join
(
self
.
ipv4Addresses
)
+
\
'
\n
\t
nfInstanceId = '
+
self
.
nfInstanceId
+
\
'
\n
\t
nfInstanceName = '
+
self
.
nfInstanceName
+
\
'
\n
\t
nfStatus = '
+
self
.
nfStatus
+
\
'
\n
\t
nfType = '
+
self
.
nfType
+
\
'
\n
\t
priority = '
+
str
(
self
.
priority
)
+
\
'
\n
\t
sNssais = '
+
json
.
dumps
(
self
.
sNssais
)
+
\
'
\n
\t
upfInfo = '
+
json
.
dumps
(
self
.
upfInfo
,
indent
=
6
)
\
,
'green'
))
def
trigger_nf_registration
(
self
):
message
=
" Sending NF registration request (HTTP Version - "
+
str
(
self
.
http_version
)
+
")"
self
.
logger
.
info
(
message
)
self
.
curl
.
setopt
(
self
.
curl
.
URL
,
self
.
url
)
self
.
curl
.
setopt
(
self
.
curl
.
HTTPHEADER
,
self
.
headers
)
self
.
curl
.
setopt
(
self
.
curl
.
CUSTOMREQUEST
,
'PUT'
)
self
.
curl
.
setopt
(
self
.
curl
.
POSTFIELDS
,
json
.
dumps
(
self
.
upf_profile
))
if
(
str
(
self
.
http_version
)
==
'2'
):
self
.
curl
.
setopt
(
self
.
curl
.
HTTP_VERSION
,
pycurl
.
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
)
response
=
self
.
curl
.
perform
()
self
.
status_code
=
self
.
curl
.
getinfo
(
self
.
curl
.
RESPONSE_CODE
)
if
self
.
status_code
==
201
or
self
.
status_code
==
200
:
message
=
" Succussfully registered at NRF !!"
self
.
logger
.
info
(
message
)
self
.
trigger_nf_heartbeat
()
else
:
print
(
colored
(
'
\n\n
NF registration failed
\n\n
'
,
'red'
))
def
trigger_nf_heartbeat
(
self
):
patch_data
=
[{
"op"
:
"replace"
,
"path"
:
"/nfStatus"
,
"value"
:
"REGISTERED"
}]
while
True
:
message
=
" Sending NF heartbeat requset (HTTP Version - "
+
str
(
self
.
http_version
)
+
") !!"
self
.
logger
.
info
(
message
)
time
.
sleep
(
5
)
self
.
curl
.
setopt
(
self
.
curl
.
CUSTOMREQUEST
,
'PATCH'
)
self
.
curl
.
setopt
(
self
.
curl
.
POSTFIELDS
,
json
.
dumps
(
patch_data
))
response
=
self
.
curl
.
perform
()
self
.
status_code
=
self
.
curl
.
getinfo
(
self
.
curl
.
RESPONSE_CODE
)
if
self
.
status_code
==
204
:
message
=
" Succussfully received NF heartbeat response !!"
self
.
logger
.
info
(
message
)
else
:
print
(
colored
(
'
\n\n
NF heartbeat procedure failed
\n\n
'
,
'red'
))
def
goodbye
(
self
):
print
(
colored
(
'
\n\n\n
[*] You are now leaving OAI-NRF framework .....
\n\n\n
'
,
'yellow'
))
sys
.
exit
(
0
)
if
__name__
==
'__main__'
:
parser
=
argparse
.
ArgumentParser
(
description
=
'Process commandline arguments and override configurations'
)
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 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
.
nrf_ip
,
args
.
nrf_port
,
args
.
http_version
)
nrf_client
.
display_upf_profile
()
nrf_client
.
trigger_nf_registration
()
"""
* 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
"""
src/nrf_client.sh
0 → 100755
View file @
77a9e058
#!/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 2022
# \email: rohan.kharade@openairinterface.org
#*/
#"""
UUID
=
@UUID@
CONFIG_DIR
=
@CONFIG_DIR@
NRF_URL
=
$NRF_IP_ADDR
:
$NRF_PORT
/nnrf-nfm/v1/nf-instances/
$UUID
##### Variables #####
DUMP_STATUS_CODE
=
$(
echo
'--write-out %{http_code} --silent --output /dev/null'
)
PATCH_DATA
=
$(
echo
'[{"op":"replace","path":"/nfStatus","value":"REGISTERED"}]'
)
CONTENT_TYPE
=
$(
echo
'Content-Type: application/json'
)
HTTP2
=
--http2-prior-knowledge
UPF_PROFILE
=
$CONFIG_DIR
/upf_profile.json
NF_HEARTBEAT_TIMER
=
10
NF_HEARTBEAT_START
=
5
##### NF Registration #####
echo
"Sending NF Registration Request (HTTP Version
$HTTP_VERSION
)"
if
[[
${
HTTP_VERSION
}
==
2
]]
;
then
response
=
$(
curl
$HTTP2
$DUMP_STATUS_CODE
-X
PUT
$NRF_URL
-d
@
$UPF_PROFILE
-H
"
$CONTENT_TYPE
"
)
else
response
=
$(
curl
$DUMP_STATUS_CODE
-X
PUT
$NRF_URL
-d
@
$UPF_PROFILE
-H
"
$CONTENT_TYPE
"
)
fi
##### NF Heartbeat #####
if
[[
${
response
}
==
201
||
${
response
}
==
200
]]
;
then
echo
-e
"Received NF registration response (HTTP_STATUS_CODE_200/201)
\n
"
sleep
$NF_HEARTBEAT_START
while
true
do
echo
"Sending NF heartbeat request"
if
[[
${
HTTP_VERSION
}
==
2
]]
;
then
response
=
$(
curl
$HTTP2
$DUMP_STATUS_CODE
-X
PATCH
$NRF_URL
-d
$PATCH_DATA
-H
"
$CONTENT_TYPE
"
)
else
response
=
$(
curl
$DUMP_STATUS_CODE
-X
PATCH
$NRF_URL
-d
$PATCH_DATA
-H
"
$CONTENT_TYPE
"
)
fi
if
[[
${
response
}
==
204
]]
;
then
echo
-e
"Received NF heartbeat response (HTTP_STATUS_CODE_204)
\n
"
fi
sleep
$NF_HEARTBEAT_TIMER
done
else
echo
-e
"
\n
NF Registration Procedure Failed ........!!!!"
fi
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