def getQuickTestPdf(self, quickTestHandle, copyToLocalPath, where='remoteLinux', renameDestinationFile=None, includeTimestamp=False): """ Description Generate Quick Test result to PDF and retrieve the PDF result file. Parameter where: localWindows|remoteWindows|remoteLinux. The destination. copyToLocalPath: The local destination path to store the PDF result file. renameDestinationFile: Rename the PDF file. includeTimestamp: True|False. Set to True if you don't want to overwrite previous result file. """ response = self.ixnObj.post(self.ixnObj.httpHeader+quickTestHandle+'/operations/generateReport', data={'arg1': quickTestHandle}) if response.json()['url'] != '': if self.ixnObj.waitForComplete(response, self.ixnObj.httpHeader+response.json()['url']) == 1: raise IxNetRestApiException if where == 'localWindows': response = self.ixnObj.get(self.ixnObj.httpHeader+response.json()['url']) self.fileMgmtObj.copyFileWindowsToLocalWindows(response.json()['result'], copyToLocalPath, renameDestinationFile, includeTimestamp) if where == 'remoteWindows': # TODO: Work in progress. Not sure if this is possible. resultPath = self.getQuickTestResultPath(quickTestHandle) #self.ixnObj.copyFileWindowsToRemoteWindows(response.json()['result'], copyToLocalPath, renameDestinationFile, includeTimestamp) self.fileMgmtObj.copyFileWindowsToRemoteWindows(resultPath, copyToLocalPath, renameDestinationFile, includeTimestamp) if where == 'remoteLinux': linuxResultPath = self.getQuickTestResultPath(quickTestHandle) self.fileMgmtObj.copyFileWindowsToLocalLinux(linuxResultPath+'\\TestReport.pdf', copyToLocalPath, renameDestinationFile, includeTimestamp) else: self.ixnObj.logInfo('\ngetQuickTestPdf failed. Result path = %s' % response.json()['result'])