def getQuickTestCurrentAction(self, quickTestHandle): """ quickTestHandle = /api/v1/sessions/1/ixnetwork/quickTest/rfc2544throughput/2 """ ixNetworkVersion = self.ixnObj.getIxNetworkVersion() match = re.match('([0-9]+)\.[^ ]+ *', ixNetworkVersion) if int(match.group(1)) >= 8: timer = 10 for counter in range(1,timer+1): response = self.ixnObj.get(self.ixnObj.httpHeader+quickTestHandle+'/results', silentMode=True) if counter < timer and response.json()['currentActions'] == []: self.ixnObj.logInfo('getQuickTestCurrentAction is empty. Waiting %s/%s' % (counter, timer)) time.sleep(1) continue if counter < timer and response.json()['currentActions'] != []: break if counter == timer and response.json()['currentActions'] == []: IxNetRestApiException('getQuickTestCurrentActions: Has no action') return response.json()['currentActions'][-1]['arg2'] else: response = self.ixnObj.get(self.ixnObj.httpHeader+quickTestHandle+'/results') return response.json()['progress']