minor changes to epc.py, helpreadme.py, main.py to complete the export of EPC functions from main

This commit is contained in:
Gabriele Perrone
2020-01-23 10:41:49 +01:00
parent 5e8af1ade9
commit 3f546cb48a
3 changed files with 13 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ class EPCManagement():
def InitializeHSS(self):
if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '':
HELP.GenericHelp()
HELP.GenericHelp(Version)
HELP.EPCSrvHelp(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, self.EPCSourceCodePath, self.EPCType)
sys.exit('Insufficient EPC Parameters')
#mySSH = SSH()
@@ -68,7 +68,7 @@ class EPCManagement():
def InitializeMME(self):
if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '':
HELP.GenericHelp()
HELP.GenericHelp(Version)
HELP.EPCSrvHelp(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, self.EPCSourceCodePath, self.EPCType)
sys.exit('Insufficient EPC Parameters')
mySSH = SSH.SSHConnection()
@@ -101,7 +101,7 @@ class EPCManagement():
def InitializeSPGW(self):
if self.EPCIPAddress == '' or self.EPCUserName == '' or self.EPCPassword == '' or self.EPCSourceCodePath == '' or self.EPCType == '':
HELP.GenericHelp()
HELP.GenericHelp(Version)
HELP.EPCSrvHelp(self.EPCIPAddress, self.EPCUserName, self.EPCPassword, self.EPCSourceCodePath, self.EPCType)
sys.exit('Insufficient EPC Parameters')
mySSH = SSH.SSHConnection()

View File

@@ -2,9 +2,9 @@
# Functions Declaration
#-----------------------------------------------------------
def GenericHelp():
def GenericHelp(vers):
print('----------------------------------------------------------------------------------------------------------------------')
print('main.py Ver: 0.1')
print('main.py Ver: ' + vers)
print('----------------------------------------------------------------------------------------------------------------------')
print('Usage: python main.py [options]')
print(' --help Show this help.')

View File

@@ -486,7 +486,7 @@ class OaiCiTest():
self.CreateHtmlTestRow(self.Build_OAI_UE_args, 'KO', ALL_PROCESSES_OK, 'OAI UE')
self.CreateHtmlTabFooter(False)
sys.exit(1)
"""
def InitializeHSS(self):
if EPC.EPCIPAddress == '' or EPC.EPCUserName == '' or EPC.EPCPassword == '' or EPC.EPCSourceCodePath == '' or EPC.EPCType == '':
Usage()
@@ -581,7 +581,7 @@ class OaiCiTest():
logging.error('This option should not occur!')
SSH.close()
self.CreateHtmlTestRow(self.EPCType, 'OK', ALL_PROCESSES_OK)
"""
def CheckFlexranCtrlInstallation(self):
if EPC.EPCIPAddress == '' or EPC.EPCUserName == '' or EPC.EPCPassword == '':
return
@@ -2934,7 +2934,7 @@ class OaiCiTest():
SSH.close()
except:
os.kill(os.getppid(),signal.SIGUSR1)
"""
def CheckHSSProcess(self, status_queue):
try:
SSH.open(self.EPCIPAddress, EPC.EPCUserName, EPC.EPCPassword)
@@ -2999,7 +2999,7 @@ class OaiCiTest():
SSH.close()
except:
os.kill(os.getppid(),signal.SIGUSR1)
"""
def AnalyzeLogFile_eNB(self, eNBlogFile):
if (not os.path.isfile('./' + eNBlogFile)):
return -1
@@ -3603,7 +3603,7 @@ class OaiCiTest():
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
self.eNBmbmsEnables[int(self.eNB_instance)] = False
self.eNBstatuses[int(self.eNB_instance)] = -1
"""
def TerminateHSS(self):
SSH.open(self.EPCIPAddress, EPC.EPCUserName, EPC.EPCPassword)
if re.match('OAI-Rel14-CUPS', self.EPCType, re.IGNORECASE):
@@ -3679,7 +3679,7 @@ class OaiCiTest():
logging.error('This should not happen!')
SSH.close()
self.CreateHtmlTestRow('N/A', 'OK', ALL_PROCESSES_OK)
"""
def TerminateFlexranCtrl(self):
if self.flexranCtrlInstalled == False or self.flexranCtrlStarted == False:
return
@@ -3975,7 +3975,7 @@ class OaiCiTest():
SSH.command('zip iperf.log.zip iperf*.log', '\$', 60)
SSH.command('rm iperf*.log', '\$', 5)
SSH.close()
"""
def LogCollectHSS(self):
SSH.open(self.EPCIPAddress, EPC.EPCUserName, EPC.EPCPassword)
SSH.command('cd ' + self.EPCSourceCodePath + '/scripts', '\$', 5)
@@ -4020,7 +4020,7 @@ class OaiCiTest():
else:
logging.error('This option should not occur!')
SSH.close()
"""
def LogCollectOAIUE(self):
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
SSH.command('cd ' + self.UESourceCodePath, '\$', 5)