Commit 759beb9c authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

update CI scripts for supporting NRF

parent 0ecceac7
...@@ -38,6 +38,9 @@ class smfConfigGen(): ...@@ -38,6 +38,9 @@ class smfConfigGen():
self.udm_ip_addr = '' self.udm_ip_addr = ''
self.udm_port = '80' self.udm_port = '80'
self.udm_api_version = 'v2' self.udm_api_version = 'v2'
self.nrf_ip_addr = ''
self.nrf_port = '80'
self.nrf_api_version = 'v1'
self.upf_ip_addr = '' self.upf_ip_addr = ''
self.apn = 'carrier.com' self.apn = 'carrier.com'
self.dns1_ip = '192.168.18.129' self.dns1_ip = '192.168.18.129'
...@@ -85,6 +88,9 @@ class smfConfigGen(): ...@@ -85,6 +88,9 @@ class smfConfigGen():
smfFile.write('SMF_CONF[@UDM_IPV4_ADDRESS@]=\'' + self.udm_ip_addr + '\'\n') smfFile.write('SMF_CONF[@UDM_IPV4_ADDRESS@]=\'' + self.udm_ip_addr + '\'\n')
smfFile.write('SMF_CONF[@UDM_PORT@]=' + self.udm_port + '\n') smfFile.write('SMF_CONF[@UDM_PORT@]=' + self.udm_port + '\n')
smfFile.write('SMF_CONF[@UDM_API_VERSION@]=\'' + self.udm_api_version + '\'\n') smfFile.write('SMF_CONF[@UDM_API_VERSION@]=\'' + self.udm_api_version + '\'\n')
smfFile.write('SMF_CONF[@NRF_IPV4_ADDRESS@]=\'' + self.nrf_ip_addr + '\'\n')
smfFile.write('SMF_CONF[@NRF_PORT@]=' + self.nrf_port + '\n')
smfFile.write('SMF_CONF[@NRF_API_VERSION@]=\'' + self.nrf_api_version + '\'\n')
smfFile.write('SMF_CONF[@UPF_IPV4_ADDRESS@]=\'' + self.upf_ip_addr + '\'\n') smfFile.write('SMF_CONF[@UPF_IPV4_ADDRESS@]=\'' + self.upf_ip_addr + '\'\n')
smfFile.write('\n') smfFile.write('\n')
smfFile.write('for K in "${!SMF_CONF[@]}"; do \n') smfFile.write('for K in "${!SMF_CONF[@]}"; do \n')
...@@ -111,6 +117,7 @@ def Usage(): ...@@ -111,6 +117,7 @@ def Usage():
print(' --n4=[SMF N4 Interface Name]') print(' --n4=[SMF N4 Interface Name]')
print(' --amf_ip_addr=[AMF IP Address]') print(' --amf_ip_addr=[AMF IP Address]')
print(' --udm_ip_addr=[UDM IP Address]') print(' --udm_ip_addr=[UDM IP Address]')
print(' --nrf_ip_addr=[NRF IP Address]')
print(' --upf_ip_addr=[UPF IP Address]') print(' --upf_ip_addr=[UPF IP Address]')
print(' --from_docker_file') print(' --from_docker_file')
print('---------------------------------------------------------------------------------------------- SMF Not Mandatory -----') print('---------------------------------------------------------------------------------------------- SMF Not Mandatory -----')
...@@ -144,6 +151,9 @@ while len(argvs) > 1: ...@@ -144,6 +151,9 @@ while len(argvs) > 1:
elif re.match('^\-\-udm_ip_addr=(.+)$', myArgv, re.IGNORECASE): elif re.match('^\-\-udm_ip_addr=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-udm_ip_addr=(.+)$', myArgv, re.IGNORECASE) matchReg = re.match('^\-\-udm_ip_addr=(.+)$', myArgv, re.IGNORECASE)
mySmfCfg.udm_ip_addr = matchReg.group(1) mySmfCfg.udm_ip_addr = matchReg.group(1)
elif re.match('^\-\-nrf_ip_addr=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-nrf_ip_addr=(.+)$', myArgv, re.IGNORECASE)
mySmfCfg.nrf_ip_addr = matchReg.group(1)
elif re.match('^\-\-upf_ip_addr=(.+)$', myArgv, re.IGNORECASE): elif re.match('^\-\-upf_ip_addr=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-upf_ip_addr=(.+)$', myArgv, re.IGNORECASE) matchReg = re.match('^\-\-upf_ip_addr=(.+)$', myArgv, re.IGNORECASE)
mySmfCfg.upf_ip_addr = matchReg.group(1) mySmfCfg.upf_ip_addr = matchReg.group(1)
...@@ -179,6 +189,9 @@ if mySmfCfg.kind == 'SMF': ...@@ -179,6 +189,9 @@ if mySmfCfg.kind == 'SMF':
elif mySmfCfg.udm_ip_addr == '': elif mySmfCfg.udm_ip_addr == '':
Usage() Usage()
sys.exit('missing UDM IP address') sys.exit('missing UDM IP address')
elif mySmfCfg.nrf_ip_addr == '':
Usage()
sys.exit('missing NRF IP address')
elif mySmfCfg.upf_ip_addr == '': elif mySmfCfg.upf_ip_addr == '':
Usage() Usage()
sys.exit('missing UPF IP address') sys.exit('missing UPF IP address')
......
...@@ -97,10 +97,6 @@ SMF = ...@@ -97,10 +97,6 @@ SMF =
API_VERSION = "@UDM_API_VERSION@"; # YOUR UDM API VERSION FOR SBI CONFIG HERE API_VERSION = "@UDM_API_VERSION@"; # YOUR UDM API VERSION FOR SBI CONFIG HERE
}; };
UPF_LIST = (
{IPV4_ADDRESS = "@UPF_IPV4_ADDRESS@" ;} # YOUR UPF CONFIG HERE
);
NRF : NRF :
{ {
IPV4_ADDRESS = "@NRF_IPV4_ADDRESS@"; # YOUR NRF CONFIG HERE IPV4_ADDRESS = "@NRF_IPV4_ADDRESS@"; # YOUR NRF CONFIG HERE
...@@ -108,6 +104,10 @@ SMF = ...@@ -108,6 +104,10 @@ SMF =
API_VERSION = "@NRF_API_VERSION@"; # YOUR NRF API VERSION FOR SBI CONFIG HERE API_VERSION = "@NRF_API_VERSION@"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
}; };
UPF_LIST = (
{IPV4_ADDRESS = "@UPF_IPV4_ADDRESS@" ;} # YOUR UPF CONFIG HERE
);
LOCAL_CONFIGURATION : LOCAL_CONFIGURATION :
{ {
USE_LOCAL_CONFIGURATION = "yes"; USE_LOCAL_CONFIGURATION = "yes";
......
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