Commit fa09e666 authored by Raphael Defosseux's avatar Raphael Defosseux

fix(ci): some typos on the container name of MME

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 7b7c23dd
...@@ -165,7 +165,15 @@ class EPCManagement(): ...@@ -165,7 +165,15 @@ class EPCManagement():
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE): if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
mySSH = SSH.SSHConnection() mySSH = SSH.SSHConnection()
mySSH.open(self.IPAddress, self.UserName, self.Password) mySSH.open(self.IPAddress, self.UserName, self.Password)
mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-oai-mme', '\$', 5) self.isMagmaUsed = False
mySSH.command('docker ps -a', '\$', 5)
result = re.search('magma', mySSH.getBefore())
if result is not None:
self.isMagmaUsed = True
if self.isMagmaUsed:
mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-magma-mme', '\$', 5)
else:
mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-oai-mme', '\$', 5)
result = re.search('MME_IP_ADDR = (?P<mme_ip_addr>[0-9\.]+)', mySSH.getBefore()) result = re.search('MME_IP_ADDR = (?P<mme_ip_addr>[0-9\.]+)', mySSH.getBefore())
if result is not None: if result is not None:
self.MmeIPAddress = result.group('mme_ip_addr') self.MmeIPAddress = result.group('mme_ip_addr')
...@@ -290,7 +298,15 @@ class EPCManagement(): ...@@ -290,7 +298,15 @@ 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 top ' + self.containerPrefix + '-oai-mme', '\$', 5) self.isMagmaUsed = False
mySSH.command('docker ps -a', '\$', 5)
result = re.search('magma', mySSH.getBefore())
if result is not None:
self.isMagmaUsed = True
if self.isMagmaUsed:
mySSH.command('docker top ' + self.containerPrefix + '-magma-mme', '\$', 5)
else:
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):
......
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