def deleteFolder(self, filePath=None): """ Deletes a folder on the IxLoad gateway server. """ import sshAssistant try: sshClient = sshAssistant.Connect(self.apiServerIp, self.sshUsername, self.sshPassword, pkeyFile=self.sshPkeyFile, port=self.sshPort) except: self.logError('\ndeleteFolder failed to ssh: {}. This is not a test failure.'.format(self.apiServerIp)) return if self.osPlatform == 'linux': stdout,stderr = sshClient.enterCommand('rm -rf {}'.format(filePath)) if self.osPlatform == 'windows': sshClient.enterCommand('rmdir {} /s /q'.format(filePath))