Skip to content
Snippets Groups Projects
Commit 880ca93b authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Added basic 'migrate()' method + minor changes.

parent 52cb9407
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,16 @@ class TapeClient(object):
sys.exit("FATAL: invalid file/dir.")
self.scp.close()
def migrate(self, fileList):
tmp = str(uuid.uuid1().hex) + "-vos_migrate.tmp"
fp = open(tmp, "a")
for f in fileList:
fp.write(f"{f}\n")
fp.close()
self.copy("./" + tmp, "/tmp/" + tmp)
cmd = "/opt/ibm/ltfsee/bin/eeadm migrate /tmp/" + tmp + " -p pl_generic_rw_01"
stdin, stdout, stderr = self.client.exec_command(cmd)
def recall(self, fileList):
tmp = str(uuid.uuid1().hex) + "-vos_recall.tmp"
fp = open(tmp, "a")
......@@ -80,7 +90,7 @@ class TapeClient(object):
fp.write(f"{f}\n")
fp.close()
self.copy("./" + tmp, "/tmp/" + tmp)
cmd = "eeadm recall /tmp/" + tmp
cmd = "/opt/ibm/ltfsee/bin/eeadm recall /tmp/" + tmp
stdin, stdout, stderr = self.client.exec_command(cmd)
def recallChecksumFiles(self, dirName):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment