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

IBM Spectrum Protect integration: replaced 'tapePool' and 'tapePoolList' with...

IBM Spectrum Protect integration: replaced 'tapePool' and 'tapePoolList' with 'tapeHSMFilesystem' and 'tapeHSMFilesystemList'.

Signed-off-by: default avatarCristiano Urban <cristiano.urban@inaf.it>
parent 336cf94e
No related branches found
No related tags found
No related merge requests found
...@@ -28,8 +28,8 @@ class VOSStorage(RedisRPCClient): ...@@ -28,8 +28,8 @@ class VOSStorage(RedisRPCClient):
storageType = None storageType = None
storageBasePath = None storageBasePath = None
storageHostname = None storageHostname = None
tapePool = None tapeHSMFilesystem = None
tapePoolList = [] tapeHSMFilesystemList = []
while storageType not in ("cold", "hot"): while storageType not in ("cold", "hot"):
try: try:
storageType = input("\nStorage type ['cold' or 'hot']: ") storageType = input("\nStorage type ['cold' or 'hot']: ")
...@@ -40,17 +40,17 @@ class VOSStorage(RedisRPCClient): ...@@ -40,17 +40,17 @@ class VOSStorage(RedisRPCClient):
except KeyboardInterrupt: except KeyboardInterrupt:
sys.exit("\nCTRL+C detected. Exiting...") sys.exit("\nCTRL+C detected. Exiting...")
if storageType == "cold": if storageType == "cold":
storageRequest = { "requestType": "TAPE_POOL_LST" } storageRequest = { "requestType": "TAPE_HSM_FS_LST" }
storageResponse = self.call(storageRequest) storageResponse = self.call(storageRequest)
if "responseType" not in storageResponse: if "responseType" not in storageResponse:
sys.exit("FATAL: Malformed response, storage acknowledge expected.\n") sys.exit("FATAL: Malformed response, storage acknowledge expected.\n")
elif storageResponse["responseType"] == "TAPE_POOL_LST_DONE": elif storageResponse["responseType"] == "TAPE_HSM_FS_LST_DONE":
tapePoolList = storageResponse["tapePoolList"] tapeHSMFilesystemList = storageResponse["tapeHSMFilesystemList"]
while tapePool not in tapePoolList: while tapeHSMFilesystem not in tapeHSMFilesystemList:
print("\nSelect one of the available tape pools:") print("\nSelect one of the available tape HSM filesystems:")
print("\n" + tabulate([ [t] for t in tapePoolList ], headers = ["tape_pool"], tablefmt = "pretty") + "\n") print("\n" + tabulate([ [t] for t in tapeHSMFilesystemList ], headers = ["tape_hsm_fs"], tablefmt = "pretty") + "\n")
try: try:
tapePool = input("Please, insert a tape pool: ") tapeHSMFilesystem = input("Please, insert a tape HSM filesystem: ")
except ValueError: except ValueError:
print("Input type is not valid!") print("Input type is not valid!")
except EOFError: except EOFError:
...@@ -81,7 +81,7 @@ class VOSStorage(RedisRPCClient): ...@@ -81,7 +81,7 @@ class VOSStorage(RedisRPCClient):
"storageType": storageType, "storageType": storageType,
"basePath": storageBasePath, "basePath": storageBasePath,
"hostname": storageHostname, "hostname": storageHostname,
"tapePool": tapePool } "tapeHSMFilesystem": tapeHSMFilesystem }
storageResponse = self.call(storageRequest) storageResponse = self.call(storageRequest)
if "responseType" not in storageResponse: if "responseType" not in storageResponse:
...@@ -202,8 +202,8 @@ DESCRIPTION ...@@ -202,8 +202,8 @@ DESCRIPTION
Adding 'hot' or 'cold' storage points requires a base path Adding 'hot' or 'cold' storage points requires a base path
to be specified (e.g. '/mnt/my_storage/users'). to be specified (e.g. '/mnt/my_storage/users').
Adding a 'cold' storage point requires selecting a tape pool Adding a 'cold' storage point requires selecting a tape HSM
(a tape pool list is provided). filesystem (a tape HSM filesystem list is provided).
All storage points require a valid hostname or IP address. All storage points require a valid hostname or IP address.
""") """)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment