Commit 2937bb8e authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Temporary use hardcoded value for NRF info

parent 759beb9c
...@@ -38,9 +38,9 @@ class smfConfigGen(): ...@@ -38,9 +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_ip_addr = ''
self.nrf_port = '80' # self.nrf_port = '80'
self.nrf_api_version = 'v1' # 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'
...@@ -88,9 +88,9 @@ class smfConfigGen(): ...@@ -88,9 +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_IPV4_ADDRESS@]=\'' + self.nrf_ip_addr + '\'\n')
smfFile.write('SMF_CONF[@NRF_PORT@]=' + self.nrf_port + '\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[@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')
...@@ -117,7 +117,7 @@ def Usage(): ...@@ -117,7 +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(' --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 -----')
...@@ -151,9 +151,9 @@ while len(argvs) > 1: ...@@ -151,9 +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): # elif re.match('^\-\-nrf_ip_addr=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-nrf_ip_addr=(.+)$', myArgv, re.IGNORECASE) # matchReg = re.match('^\-\-nrf_ip_addr=(.+)$', myArgv, re.IGNORECASE)
mySmfCfg.nrf_ip_addr = matchReg.group(1) # 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)
...@@ -189,9 +189,9 @@ if mySmfCfg.kind == 'SMF': ...@@ -189,9 +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 == '': # elif mySmfCfg.nrf_ip_addr == '':
Usage() # Usage()
sys.exit('missing NRF IP address') # 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')
......
...@@ -99,9 +99,9 @@ SMF = ...@@ -99,9 +99,9 @@ SMF =
NRF : NRF :
{ {
IPV4_ADDRESS = "@NRF_IPV4_ADDRESS@"; # YOUR NRF CONFIG HERE IPV4_ADDRESS = "192.168.12.100"; # YOUR NRF CONFIG HERE
PORT = @NRF_PORT@; # YOUR NRF CONFIG HERE (default: 80) PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
API_VERSION = "@NRF_API_VERSION@"; # YOUR NRF API VERSION FOR SBI CONFIG HERE API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
}; };
UPF_LIST = ( UPF_LIST = (
......
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