aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opnfv/test_suites
AgeCommit message (Expand)AuthorFilesLines
2018-11-09Add test suite for scenario "opnfv_os-ovn-nofeature-ha"rexlee87761-0/+38
2018-09-07Add k8s scenario test suite in Gambiarexlee87765-0/+90
2018-06-27Add testsuite "os-odl-ovs-noha"ting wu1-0/+64
2018-05-08Merge "Implement Virtual Switch resilience test case"Ross Brattain2-0/+16
2018-05-08Merge "Add ODL HA testcase"Ross Brattain1-0/+7
2018-05-03Implement Virtual Switch resilience test caseDimitrios Markou2-0/+16
2018-04-23remove more old apexlake testcasesRoss Brattain2-8/+0
2018-04-20Add ODL HA testcaseDimitrios Markou1-0/+7
2018-04-17remove apex lake tc007 from test suitesRoss Brattain4-52/+0
2018-04-03Bugfix: k8 scenario fixrexlee87762-45/+19
2018-03-31ADD tc042 into CIliyin2-0/+10
2018-03-28add new Fraser scenariosRoss Brattain10-0/+304
2018-03-22Merge "update ci pod in the test suite according to Fraser"Rex Lee1-28/+36
2018-03-22Add k8-nosdn-stor4nfv-ha/noha scenariochenjiankun2-0/+0
2018-03-22update ci pod in the test suite according to Fraserrexlee87761-28/+36
2018-03-22Merge "Add k8-nosdn-stor4nfv-ha/noha scenario"Jack Chan2-0/+36
2018-03-21Add k8-nosdn-stor4nfv-ha/noha scenariochenjiankun2-0/+36
2018-03-21Bugfix: update test case base on node parameters in cirexlee877644-125/+125
2018-03-20update scenario test cases according to gating releaserexlee87761-67/+75
2018-03-08Add ODL noHA testcaseDimitrios Markou1-0/+7
2018-03-06add opnfv_k8-nosdn-lb_ceph-noha_daily.yamlRoss Brattain1-0/+18
2018-02-28scenario: add opnfv_os-odl-bgpvpn-noha_daily.yamlRoss Brattain1-0/+23
2017-10-19Bugfix: move opnfv_os-odl-fdio_dvr-noha_daily.yaml to 'test_suites' directoryJingLu51-0/+38
2017-10-16Create test suite opnfv_os-nosdn-openbaton-ha_dailychenjiankun1-0/+62
2017-10-13Merge "Bugfix: Add opnfv_os-nosdn-ovs_dpdk testsuite for Compass4nfv"Jing Lu2-0/+124
2017-10-13Bugfix: Add opnfv_os-nosdn-ovs_dpdk testsuite for Compass4nfvJingLu52-0/+124
2017-10-13Bugfix: Add opnfv_os-odl_l2-moon-ha_daily testsuite for Compass4nfvJingLu51-0/+62
2017-09-29CI: add new test cases into CI so they can have resultrexlee87761-1/+22
2017-09-28Create test suite for Euphrates releasechenjiankun3-0/+138
2017-09-19add opnfv_os-odl-fdio-dvr-ha_daily.yaml scenarioRoss Brattain1-0/+38
2017-09-18add scenario opnfv_os-nosdn-bar-ha_daily.yaml for BarometerRoss Brattain2-0/+223
2017-09-17rename odl_l3 tests to just odlRoss Brattain3-0/+166
2017-09-14Create opnfv_k8-ovn-lb-noha_daily.yaml test suite filechenjiankun1-0/+18
2017-09-01add opnfv_os-odl-nofeature-noha_daily.yaml for odl_l3 to odl renameRoss Brattain1-0/+56
2017-08-25Create test suite k8-nosdn-lb-noha run with k8s contextchenjiankun1-0/+18
2017-07-31add opnfv_os-odl-sfc-ha_daily.yaml test suiteJingLu51-0/+62
2017-07-17Open storperf testcase to huawei-pod2JingLu51-2/+4
2017-07-06Merge "Blacklist TC011 from suites with ODL"Jing Lu5-0/+10
2017-07-03Blacklist TC011 from suites with ODLAlexandru Nemes5-0/+10
2017-06-30unify pod keywork so api can easily usedrexlee877634-102/+148
2017-05-03run ha test case in compass podrexlee87761-4/+28
2017-04-05Add opnfv_os-ovn-nofeature-noha_daily test suiteJingLu51-0/+62
2017-03-30Bugfix: Add test suite for opnfv_os-odl_l3-ovs-ha_daily scenarioJingLu51-0/+62
2017-03-20add missing test suite files for new scenariosJingLu52-0/+76
2017-03-17add missing test suite files for new scenariosJingLu52-0/+178
2017-02-28Re-enable floating IP tests for bgpvpnRomanos Skiadas2-0/+8
2017-02-23Merge "Update missing license headers"Rex Lee40-0/+340
2017-02-17Update missing license headersDeepak S40-0/+340
2017-02-17Merge " add scenario to solve apex ci fail"Kubi1-0/+21
2017-02-17 add scenario to solve apex ci failrexlee87761-0/+21
span class="n">Pushkeys = handle Pushkeys.sendline(cmd) Result = 0 while Result != 2: Result = Pushkeys.expect(["(yes/no)", "assword:", "PEXPECT]#", pexpect.EOF, pexpect.TIMEOUT]) if(Result == 0): Pushkeys.sendline("yes") if(Result == 1): Pushkeys.sendline(password) if(Result == 2): self.loginfo.log("ONOS Push keys Success!") break if(Result == 3): self.loginfo.log("ONOS Push keys Error!") break time.sleep(2) Pushkeys.prompt() print "Done!" def SetOnosEnvVar(self, handle, masterpass, agentpass): """ Setup onos pushkeys to all devices(3+2) parameters: handle(input): current working handle masterpass: scripts running server's password agentpass: onos cluster&compute node password """ print "Now Setting test environment" for host in self.hosts: print "try to connect " + str(host) result = self.CheckSshNoPasswd(host) if not result: print ("ssh login failed,try to copy master publickey" + "to agent " + str(host)) self.CopyPublicKey(host) self.OnosPushKeys(handle, "onos-push-keys " + self.OCT, masterpass) self.OnosPushKeys(handle, "onos-push-keys " + self.OC1, agentpass) self.OnosPushKeys(handle, "onos-push-keys " + self.OC2, agentpass) self.OnosPushKeys(handle, "onos-push-keys " + self.OC3, agentpass) self.OnosPushKeys(handle, "onos-push-keys " + self.OCN, agentpass) self.OnosPushKeys(handle, "onos-push-keys " + self.OCN2, agentpass) def CheckSshNoPasswd(self, host): """ Check master can connect agent with no password """ login = pexpect.spawn("ssh " + str(host)) index = 4 while index == 4: index = login.expect(['(yes/no)', '>|#|\$', pexpect.EOF, pexpect.TIMEOUT]) if index == 0: login.sendline("yes") index = 4 if index == 1: self.loginfo.log("ssh connect to " + str(host) + " success,no need to copy ssh public key") return True login.interact() return False def ChangeOnosName(self, user, password): """ Change onos name in envDefault file Because some command depend on this parameters: user: onos&compute node user password: onos&compute node password """ print "Now Changing ONOS name&password" filepath = self.home + '/onos/tools/build/envDefaults' line = open(filepath, 'r').readlines() lenall = len(line) - 1 for i in range(lenall): if "ONOS_USER=" in line[i]: line[i] = line[i].replace("sdn", user) if "ONOS_GROUP" in line[i]: line[i] = line[i].replace("sdn", user) if "ONOS_PWD" in line[i]: line[i] = line[i].replace("rocks", password) NewFile = open(filepath, 'w') NewFile.writelines(line) NewFile.close print "Done!" def ChangeTestCasePara(self, testcase, user, password): """ When running test script, there's something need \ to change in every test folder's *.param & *.topo files user: onos&compute node user password: onos&compute node password """ print "Now Changing " + testcase + " name&password" if self.masterusername == 'root': filepath = '/root/' else: filepath = '/home/' + self.masterusername + '/' filepath = (filepath + "OnosSystemTest/TestON/tests/" + testcase + "/" + testcase + ".topo") line = open(filepath, 'r').readlines() lenall = len(line) - 1 for i in range(lenall - 2): if("localhost" in line[i]) or ("OCT" in line[i]): line[i + 1] = re.sub(">\w+", ">" + user, line[i + 1]) line[i + 2] = re.sub(">\w+", ">" + password, line[i + 2]) if ("OC1" in line[i] or "OC2" in line[i] or "OC3" in line[i] or "OCN" in line[i] or "OCN2" in line[i]): line[i + 1] = re.sub(">\w+", ">root", line[i + 1]) line[i + 2] = re.sub(">\w+", ">root", line[i + 2]) NewFile = open(filepath, 'w') NewFile.writelines(line) NewFile.close def SSHlogin(self, ipaddr, username, password): """ SSH login provide a connection to destination. parameters: ipaddr: ip address username: login user name password: login password return: handle """ login = pxssh.pxssh() login.login(ipaddr, username, password, original_prompt='[$#>]') # send command ls -l login.sendline('ls -l') # match prompt login.prompt() print("SSH login " + ipaddr + " success!") return login def SSHRelease(self, handle): # Release ssh handle.logout() def CopyOnostoTestbin(self): sourcefile = self.cipath + '/dependencies/onos' destifile = self.home + '/onos/tools/test/bin/' os.system('pwd') runcommand = 'cp ' + sourcefile + ' ' + destifile os.system(runcommand) def CopyPublicKey(self, host): output = os.popen('cat /root/.ssh/id_rsa.pub') publickey = output.read().strip('\n') tmphandle = self.SSHlogin(self.installer_master, self.installer_master_username, self.installer_master_password) tmphandle.sendline("ssh " + host + " -T \'echo " + str(publickey) + ">>/root/.ssh/authorized_keys\'") tmphandle.prompt() self.SSHRelease(tmphandle) print "Add OCT PublicKey to " + host + " success" def OnosEnvSetup(self, handle): """ Onos Environment Setup function """ self.Gensshkey(handle) self.home = self.GetEnvValue(handle, 'HOME') self.AddKnownHost(handle, self.OC1, "karaf", "karaf") self.AddKnownHost(handle, self.OC2, "karaf", "karaf") self.AddKnownHost(handle, self.OC3, "karaf", "karaf") self.DownLoadCode(handle, 'https://github.com/sunyulin/OnosSystemTest.git') # self.DownLoadCode(handle, 'https://gerrit.onosproject.org/onos') if self.masterusername == 'root': filepath = '/root/' else: filepath = '/home/' + self.masterusername + '/' self.OnosRootPathChange(filepath) self.CopyOnostoTestbin() self.ChangeOnosName(self.agentusername, self.agentpassword) self.InstallDefaultSoftware(handle) self.SetOnosEnvVar(handle, self.masterpassword, self.agentpassword)