def run(self, arglist=None): args = self.parseArgsKeyValue(arglist) # numThreads specifies the number of tcp streams between the two end points. By Default it is set to 1 numThreads = int(args.get("num_threads", "1")) distmasterBase = xenrt.TEC().lookup("TEST_TARBALL_BASE") endpoint0 = ixiachariot.createEndpoint( args['endpointSpec0'], distmasterBase, self) endpoint1 = ixiachariot.createEndpoint( args['endpointSpec1'], distmasterBase, self) endpoint0.install(self.distmasterDir) endpoint1.install(self.distmasterDir) ixiaTest = args['ixiaTestFile'] jobId = xenrt.GEC().jobid() pairTest = ixiachariot.PairTest( endpoint0.ipAddress, endpoint1.ipAddress, ixiaTest, jobId) console = ixiachariot.Console( self.consoleAddress, self.executeOnChariotConsole, XenRTLock()) step("IXIA console is going to run %d TCP streams between the end points." % numThreads) for cmd in pairTest.getCommands(numThreads): console.run(cmd) logDir = xenrt.TEC().getLogdir() sftpclient = xenrt.ssh.SFTPSession( self.consoleAddress, username=self.consoleUser) sftpclient.copyTreeFrom(pairTest.workingDir, logDir + '/results') sftpclient.close()
def testCreateSetsGuest(self): """ When client creates an endpoint Then endpoint created with proper parameters """ fakeHostRegistry = FakeHostRegistry() endpoint = ixiachariot.createEndpoint( 'host/guest', 'distmasterBase', fakeHostRegistry) self.assertEquals('guest@host', endpoint.guest)
def run(self, arglist=None): args = self.parseArgsKeyValue(arglist) # numThreads specifies the number of tcp streams between the two end points. By Default it is set to 1 numThreads = int(args.get("num_threads", "1")) distmasterBase = xenrt.TEC().lookup("TEST_TARBALL_BASE") endpoint0 = ixiachariot.createEndpoint(args['endpointSpec0'], distmasterBase, self) endpoint1 = ixiachariot.createEndpoint(args['endpointSpec1'], distmasterBase, self) endpoint0.install(self.distmasterDir) endpoint1.install(self.distmasterDir) ixiaTest = args['ixiaTestFile'] jobId = xenrt.GEC().jobid() pairTest = ixiachariot.PairTest(endpoint0.ipAddress, endpoint1.ipAddress, ixiaTest, jobId) console = ixiachariot.Console(self.consoleAddress, self.executeOnChariotConsole, XenRTLock()) step( "IXIA console is going to run %d TCP streams between the end points." % numThreads) for cmd in pairTest.getCommands(numThreads): console.run(cmd) logDir = xenrt.TEC().getLogdir() sftpclient = xenrt.ssh.SFTPSession(self.consoleAddress, username=self.consoleUser) sftpclient.copyTreeFrom(pairTest.workingDir, logDir + '/results') sftpclient.close()