def collectDiagnostics(self, diagZipFilename='ixiaDiagnostics.zip', localPath=None): """ Description Collect diagnostics for debugging. Parameter diagZipFileName: : The diagnostic filename to name with .zip extension. localPath: : The local destination where you want to put the collected diag file. """ if localPath is None: localPath = '.' url = self.ixnObj.sessionUrl+'/operations/collectlogs' data = {'arg1': self.ixnObj.headlessSessionId+'/'+diagZipFilename} response = self.ixnObj.post(url, data=data) self.ixnObj.waitForComplete(response, url+'/'+response.json()['id'], silentMode=False, timeout=900) response = self.ixnObj.get(self.ixnObj.sessionUrl+'/files') absolutePath = response.json()['absolute'] if self.ixnObj.serverOs in ['windows', 'windowsConnectionMgr']: absolutePath = absolutePath.replace('/', '\\') self.copyFileWindowsToLocalLinux(windowsPathAndFileName=absolutePath+'\\'+diagZipFilename, localPath=localPath) if self.ixnObj.serverOs == 'linux': self.copyFileLinuxToLocalLinux(linuxApiServerPathAndFileName=absolutePath+'/'+diagZipFilename, localPath=localPath)