Loading transfer_service/tape_client.py +24 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,15 @@ class TapeClient(object): os.remove(f"./{tmp}") cmd = f"{self.EEADM} migrate /tmp/{tmp} -p pl_generic_rw_01" stdin, stdout, stderr = self.client.exec_command(cmd) exitCode = stdout.channel.recv_exit_status() # debug block... out = open("tape_client_log.txt", "a") out.write("MIGRATE\n") out.write(f"exitCode: {exitCode}\n") out.write(f"stdout: {stdout}\n") out.write(f"stderr: {stderr}\n\n") out.close() def recall(self, fileList): """ Loading @@ -103,6 +112,15 @@ class TapeClient(object): os.remove(f"./{tmp}") cmd = f"{self.EEADM} recall /tmp/{tmp}" stdin, stdout, stderr = self.client.exec_command(cmd) exitCode = stdout.channel.recv_exit_status() # debug block... out = open("tape_client_log.txt", "a") out.write("RECALL\n") out.write(f"exitCode: {exitCode}\n") out.write(f"stdout: {stdout}\n") out.write(f"stderr: {stderr}\n\n") out.close() def recallChecksumFiles(self, dirName): """ Loading @@ -112,9 +130,15 @@ class TapeClient(object): cmd = f"find $(dirname {dirName}) -type f \( -iname \"*-md5sum.txt\" \) | {self.EEADM}" stdin, stdout, stderr = self.client.exec_command(cmd) exitCode = stdout.channel.recv_exit_status() # debug block... out = open("tape_client_log.txt", "a") out.write("RECALL_CHECKSUM\n") out.write(f"exitCode: {exitCode}\n") out.write(f"stdout: {stdout}\n") out.write(f"stderr: {stderr}\n\n") out.close() if exitCode: return False else: Loading Loading
transfer_service/tape_client.py +24 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,15 @@ class TapeClient(object): os.remove(f"./{tmp}") cmd = f"{self.EEADM} migrate /tmp/{tmp} -p pl_generic_rw_01" stdin, stdout, stderr = self.client.exec_command(cmd) exitCode = stdout.channel.recv_exit_status() # debug block... out = open("tape_client_log.txt", "a") out.write("MIGRATE\n") out.write(f"exitCode: {exitCode}\n") out.write(f"stdout: {stdout}\n") out.write(f"stderr: {stderr}\n\n") out.close() def recall(self, fileList): """ Loading @@ -103,6 +112,15 @@ class TapeClient(object): os.remove(f"./{tmp}") cmd = f"{self.EEADM} recall /tmp/{tmp}" stdin, stdout, stderr = self.client.exec_command(cmd) exitCode = stdout.channel.recv_exit_status() # debug block... out = open("tape_client_log.txt", "a") out.write("RECALL\n") out.write(f"exitCode: {exitCode}\n") out.write(f"stdout: {stdout}\n") out.write(f"stderr: {stderr}\n\n") out.close() def recallChecksumFiles(self, dirName): """ Loading @@ -112,9 +130,15 @@ class TapeClient(object): cmd = f"find $(dirname {dirName}) -type f \( -iname \"*-md5sum.txt\" \) | {self.EEADM}" stdin, stdout, stderr = self.client.exec_command(cmd) exitCode = stdout.channel.recv_exit_status() # debug block... out = open("tape_client_log.txt", "a") out.write("RECALL_CHECKSUM\n") out.write(f"exitCode: {exitCode}\n") out.write(f"stdout: {stdout}\n") out.write(f"stderr: {stderr}\n\n") out.close() if exitCode: return False else: Loading