Commit b29b8838 authored by Raphael Defosseux's avatar Raphael Defosseux

[CI]: flexran-rtc support when deployed in a container.

  -- Not completed for X2 Handover case
Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 329a823d
...@@ -225,7 +225,16 @@ class OaiCiTest(): ...@@ -225,7 +225,16 @@ class OaiCiTest():
result = re.search('/opt/flexran_rtc/build/rt_controller', SSH.getBefore()) result = re.search('/opt/flexran_rtc/build/rt_controller', SSH.getBefore())
if result is not None: if result is not None:
RAN.flexranCtrlInstalled=True RAN.flexranCtrlInstalled=True
RAN.flexranCtrlIpAddress=EPC.IPAddress
logging.debug('Flexran Controller is installed') logging.debug('Flexran Controller is installed')
else:
# Maybe flexran-rtc is deployed into a container
SSH.command('docker inspect --format="FLEX_RTC_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" prod-flexran-rtc', '\$', 5)
result = re.search('FLEX_RTC_IP_ADDR = (?P<flex_ip_addr>[0-9\.]+)', SSH.getBefore())
if result is not None:
RAN.flexranCtrlDeployed=True
RAN.flexranCtrlIpAddress=result.group('flex_ip_addr')
logging.debug('Flexran Controller is deployed: ' + RAN.flexranCtrlIpAddress)
SSH.close() SSH.close()
def InitializeFlexranCtrl(self, HTML,RAN,EPC): def InitializeFlexranCtrl(self, HTML,RAN,EPC):
...@@ -1267,12 +1276,12 @@ class OaiCiTest(): ...@@ -1267,12 +1276,12 @@ class OaiCiTest():
i += 1 i += 1
for job in multi_jobs: for job in multi_jobs:
job.join() job.join()
if RAN.flexranCtrlInstalled and RAN.flexranCtrlStarted: if (RAN.flexranCtrlInstalled and RAN.flexranCtrlStarted) or RAN.flexranCtrlDeployed:
SSH = sshconnection.SSHConnection() SSH = sshconnection.SSHConnection()
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('cd /opt/flexran_rtc', '\$', 5) SSH.command('cd ' + EPC.SourceCodePath + '/scripts', '\$', 5)
SSH.command('curl http://localhost:9999/stats | jq \'.\' > log/check_status_' + self.testCase_id + '.log 2>&1', '\$', 5) SSH.command('curl http://' + RAN.flexranCtrlIpAddress + ':9999/stats | jq \'.\' > check_status_' + self.testCase_id + '.log 2>&1', '\$', 5)
SSH.command('cat log/check_status_' + self.testCase_id + '.log | jq \'.eNB_config[0].UE\' | grep -c rnti | sed -e "s#^#Nb Connected UE = #"', '\$', 5) SSH.command('cat check_status_' + self.testCase_id + '.log | jq \'.eNB_config[0].UE\' | grep -c rnti | sed -e "s#^#Nb Connected UE = #"', '\$', 5)
result = re.search('Nb Connected UE = (?P<nb_ues>[0-9]+)', SSH.getBefore()) result = re.search('Nb Connected UE = (?P<nb_ues>[0-9]+)', SSH.getBefore())
passStatus = True passStatus = True
if result is not None: if result is not None:
......
...@@ -215,7 +215,7 @@ log_config = { ...@@ -215,7 +215,7 @@ log_config = {
NETWORK_CONTROLLER : { NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -215,7 +215,7 @@ log_config = { ...@@ -215,7 +215,7 @@ log_config = {
NETWORK_CONTROLLER : { NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -215,7 +215,7 @@ log_config = { ...@@ -215,7 +215,7 @@ log_config = {
NETWORK_CONTROLLER : { NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -112,7 +112,7 @@ log_config = { ...@@ -112,7 +112,7 @@ log_config = {
NETWORK_CONTROLLER : { NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -112,7 +112,7 @@ log_config = { ...@@ -112,7 +112,7 @@ log_config = {
NETWORK_CONTROLLER : { NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -112,7 +112,7 @@ log_config = { ...@@ -112,7 +112,7 @@ log_config = {
NETWORK_CONTROLLER : { NETWORK_CONTROLLER : {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -239,7 +239,7 @@ NETWORK_CONTROLLER : ...@@ -239,7 +239,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0"; FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -448,7 +448,7 @@ NETWORK_CONTROLLER : ...@@ -448,7 +448,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -251,7 +251,7 @@ NETWORK_CONTROLLER : ...@@ -251,7 +251,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0"; FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -395,7 +395,7 @@ NETWORK_CONTROLLER : ...@@ -395,7 +395,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0"; FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -228,7 +228,7 @@ NETWORK_CONTROLLER : ...@@ -228,7 +228,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -228,7 +228,7 @@ NETWORK_CONTROLLER : ...@@ -228,7 +228,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -228,7 +228,7 @@ NETWORK_CONTROLLER : ...@@ -228,7 +228,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -226,7 +226,7 @@ NETWORK_CONTROLLER : ...@@ -226,7 +226,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -247,7 +247,7 @@ NETWORK_CONTROLLER : ...@@ -247,7 +247,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -256,7 +256,7 @@ NETWORK_CONTROLLER : ...@@ -256,7 +256,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0"; FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -250,7 +250,7 @@ NETWORK_CONTROLLER : ...@@ -250,7 +250,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0"; FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -255,7 +255,7 @@ NETWORK_CONTROLLER : ...@@ -255,7 +255,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -249,7 +249,7 @@ NETWORK_CONTROLLER : ...@@ -249,7 +249,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -244,7 +244,7 @@ NETWORK_CONTROLLER : ...@@ -244,7 +244,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "eth0"; FLEXRAN_INTERFACE_NAME = "eth0";
FLEXRAN_IPV4_ADDRESS = "CI_MME_IP_ADDR"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -235,7 +235,7 @@ NETWORK_CONTROLLER : ...@@ -235,7 +235,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -235,7 +235,7 @@ NETWORK_CONTROLLER : ...@@ -235,7 +235,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -235,7 +235,7 @@ NETWORK_CONTROLLER : ...@@ -235,7 +235,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -254,7 +254,7 @@ NETWORK_CONTROLLER : ...@@ -254,7 +254,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -254,7 +254,7 @@ NETWORK_CONTROLLER : ...@@ -254,7 +254,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -254,7 +254,7 @@ NETWORK_CONTROLLER : ...@@ -254,7 +254,7 @@ NETWORK_CONTROLLER :
{ {
FLEXRAN_ENABLED = "no"; FLEXRAN_ENABLED = "no";
FLEXRAN_INTERFACE_NAME = "lo"; FLEXRAN_INTERFACE_NAME = "lo";
FLEXRAN_IPV4_ADDRESS = "127.0.0.1"; FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
FLEXRAN_PORT = 2210; FLEXRAN_PORT = 2210;
FLEXRAN_CACHE = "/mnt/oai_agent_cache"; FLEXRAN_CACHE = "/mnt/oai_agent_cache";
FLEXRAN_AWAIT_RECONF = "no"; FLEXRAN_AWAIT_RECONF = "no";
......
...@@ -221,7 +221,7 @@ class EPCManagement(): ...@@ -221,7 +221,7 @@ class EPCManagement():
mySSH = SSH.SSHConnection() mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password) mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE): if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "ps aux | grep oai_hss"', '\$', 5) mySSH.command('docker top ' + self.containerPrefix + '-oai-hss', '\$', 5)
else: else:
mySSH.command('stdbuf -o0 ps -aux | grep --color=never hss | grep -v grep', '\$', 5) mySSH.command('stdbuf -o0 ps -aux | grep --color=never hss | grep -v grep', '\$', 5)
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE): if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
...@@ -246,7 +246,7 @@ class EPCManagement(): ...@@ -246,7 +246,7 @@ class EPCManagement():
mySSH = SSH.SSHConnection() mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password) mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE): if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "ps aux | grep oai_mme"', '\$', 5) mySSH.command('docker top ' + self.containerPrefix + '-oai-mme', '\$', 5)
else: else:
mySSH.command('stdbuf -o0 ps -aux | grep --color=never mme | grep -v grep', '\$', 5) mySSH.command('stdbuf -o0 ps -aux | grep --color=never mme | grep -v grep', '\$', 5)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE): if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
...@@ -273,11 +273,11 @@ class EPCManagement(): ...@@ -273,11 +273,11 @@ class EPCManagement():
mySSH = SSH.SSHConnection() mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password) mySSH.open(self.IPAddress, self.UserName, self.Password)
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE): if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "ps aux | grep oai_spgwc"', '\$', 5) mySSH.command('docker top ' + self.containerPrefix + '-oai-spgwc', '\$', 5)
result = re.search('oai_spgwc -o -c ', mySSH.getBefore()) result = re.search('oai_spgwc -', mySSH.getBefore())
if result is not None: if result is not None:
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "ps aux | grep oai_spgwu"', '\$', 5) mySSH.command('docker top ' + self.containerPrefix + '-oai-spgwu-tiny', '\$', 5)
result = re.search('oai_spgwu -o -c ', mySSH.getBefore()) result = re.search('oai_spgwu -', mySSH.getBefore())
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE): elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
mySSH.command('stdbuf -o0 ps -aux | grep --color=never spgw | grep -v grep', '\$', 5) mySSH.command('stdbuf -o0 ps -aux | grep --color=never spgw | grep -v grep', '\$', 5)
result = re.search('spgwu -c ', mySSH.getBefore()) result = re.search('spgwu -c ', mySSH.getBefore())
...@@ -439,7 +439,7 @@ class EPCManagement(): ...@@ -439,7 +439,7 @@ class EPCManagement():
# - docker-compose config | grep container_name # - docker-compose config | grep container_name
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5) mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/docker-compose.yml', self.SourceCodePath + '/scripts') mySSH.copyout(self.IPAddress, self.UserName, self.Password, './' + self.yamlPath + '/docker-compose.yml', self.SourceCodePath + '/scripts')
mySSH.command('wget --quiet https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-hss/develop/src/hss_rel14/db/oai_db.cql', '\$', 5) mySSH.command('wget --quiet --tries=3 --retry-connrefused https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-hss/develop/src/hss_rel14/db/oai_db.cql', '\$', 30)
mySSH.command('docker-compose down', '\$', 60) mySSH.command('docker-compose down', '\$', 60)
mySSH.command('docker-compose up -d db_init', '\$', 60) mySSH.command('docker-compose up -d db_init', '\$', 60)
...@@ -531,13 +531,25 @@ class EPCManagement(): ...@@ -531,13 +531,25 @@ class EPCManagement():
mySSH.command('docker cp prod-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap spgwu_' + self.testCase_id + '.pcap', '\$', 60) mySSH.command('docker cp prod-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap spgwu_' + self.testCase_id + '.pcap', '\$', 60)
# Remove all # Remove all
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5) mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
listOfContainers = 'prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny'
nbContainers = 5
# Checking for additional services
mySSH.command('docker-compose config', '\$', 5)
configResponse = mySSH.getBefore()
if configResponse.count('flexran_rtc') == 1:
listOfContainers += ' prod-flexran-rtc'
nbContainers += 1
if configResponse.count('trf_gen') == 1:
listOfContainers += ' prod-trf-gen'
nbContainers += 1
mySSH.command('docker-compose down', '\$', 60) mySSH.command('docker-compose down', '\$', 60)
mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' prod-cassandra prod-oai-hss prod-oai-mme prod-oai-spgwc prod-oai-spgwu-tiny', '\$', 10) mySSH.command('docker inspect --format=\'{{.State.Health.Status}}\' ' + listOfContainers, '\$', 10)
noMoreContainerNb = mySSH.getBefore().count('No such object') noMoreContainerNb = mySSH.getBefore().count('No such object')
mySSH.command('docker inspect --format=\'{{.Name}}\' prod-oai-public-net prod-oai-private-net', '\$', 10) mySSH.command('docker inspect --format=\'{{.Name}}\' prod-oai-public-net prod-oai-private-net', '\$', 10)
noMoreNetworkNb = mySSH.getBefore().count('No such object') noMoreNetworkNb = mySSH.getBefore().count('No such object')
mySSH.close() mySSH.close()
if noMoreContainerNb == 5 and noMoreNetworkNb == 2: if noMoreContainerNb == nbContainers and noMoreNetworkNb == 2:
logging.debug('Undeployment OK') logging.debug('Undeployment OK')
self.htmlObj.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK) self.htmlObj.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
else: else:
......
...@@ -87,6 +87,8 @@ class RANManagement(): ...@@ -87,6 +87,8 @@ class RANManagement():
self.eNBstatuses = [-1, -1, -1] self.eNBstatuses = [-1, -1, -1]
self.flexranCtrlInstalled = False self.flexranCtrlInstalled = False
self.flexranCtrlStarted = False self.flexranCtrlStarted = False
self.flexranCtrlDeployed = False
self.flexranCtrlIpAddress = ''
self.testCase_id = '' self.testCase_id = ''
self.epcPcapFile = '' self.epcPcapFile = ''
self.htmlObj = None self.htmlObj = None
...@@ -581,8 +583,9 @@ class RANManagement(): ...@@ -581,8 +583,9 @@ class RANManagement():
mySSH.command('sed -i -e \'s/CI_RRU1_IP_ADDR/' + self.eNB1IPAddress + '/\' ' + ci_full_config_file, '\$', 2); mySSH.command('sed -i -e \'s/CI_RRU1_IP_ADDR/' + self.eNB1IPAddress + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_RRU2_IP_ADDR/' + self.eNB2IPAddress + '/\' ' + ci_full_config_file, '\$', 2); mySSH.command('sed -i -e \'s/CI_RRU2_IP_ADDR/' + self.eNB2IPAddress + '/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_FR1_CTL_ENB_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2); mySSH.command('sed -i -e \'s/CI_FR1_CTL_ENB_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
if self.flexranCtrlInstalled and self.flexranCtrlStarted: if (self.flexranCtrlInstalled and self.flexranCtrlStarted) or self.flexranCtrlDeployed:
mySSH.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "yes";/\' ' + ci_full_config_file, '\$', 2); mySSH.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "yes";/\' ' + ci_full_config_file, '\$', 2);
mySSH.command('sed -i -e \'s/CI_FLEXRAN_CTL_IP_ADDR/' + self.flexranCtrlIpAddress + '/\' ' + ci_full_config_file, '\$', 2);
else: else:
mySSH.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "no";/\' ' + ci_full_config_file, '\$', 2); mySSH.command('sed -i -e \'s/FLEXRAN_ENABLED.*;/FLEXRAN_ENABLED = "no";/\' ' + ci_full_config_file, '\$', 2);
self.eNBmbmsEnables[int(self.eNB_instance)] = False self.eNBmbmsEnables[int(self.eNB_instance)] = False
......
...@@ -21,7 +21,11 @@ ...@@ -21,7 +21,11 @@
BEGIN{max=0;min=10000} BEGIN{max=0;min=10000}
{ {
if ($0 ~/Mbits/) { if ($0 ~/Mbits/) {
if ($0 ~/KBytes/) {
split($0,a,"KBytes")
} else {
split($0,a,"MBytes") split($0,a,"MBytes")
}
split(a[2],b) split(a[2],b)
if (b[1]>max) { if (b[1]>max) {
max=b[1] max=b[1]
......
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