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
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ class VOSStorage(RedisRPCClient):
        storageType = None
        storageBasePath = None
        storageHostname = None
        tapePool = None
        tapePoolList = []
        tapeHSMFilesystem = None
        tapeHSMFilesystemList = []
        while storageType not in ("cold", "hot"):
            try:
                storageType = input("\nStorage type ['cold' or 'hot']: ")
@@ -40,17 +40,17 @@ class VOSStorage(RedisRPCClient):
            except KeyboardInterrupt:
                sys.exit("\nCTRL+C detected. Exiting...")
        if storageType == "cold":
            storageRequest = { "requestType": "TAPE_POOL_LST" }
            storageRequest = { "requestType": "TAPE_HSM_FS_LST" }
            storageResponse = self.call(storageRequest)
            if "responseType" not in storageResponse:
                sys.exit("FATAL: Malformed response, storage acknowledge expected.\n")
            elif storageResponse["responseType"] == "TAPE_POOL_LST_DONE":
                tapePoolList = storageResponse["tapePoolList"]
                while tapePool not in tapePoolList:
                    print("\nSelect one of the available tape pools:")
                    print("\n" + tabulate([ [t] for t in tapePoolList ], headers = ["tape_pool"], tablefmt = "pretty") + "\n")
            elif storageResponse["responseType"] == "TAPE_HSM_FS_LST_DONE":
                tapeHSMFilesystemList = storageResponse["tapeHSMFilesystemList"]
                while tapeHSMFilesystem not in tapeHSMFilesystemList:
                    print("\nSelect one of the available tape HSM filesystems:")
                    print("\n" + tabulate([ [t] for t in tapeHSMFilesystemList ], headers = ["tape_hsm_fs"], tablefmt = "pretty") + "\n")
                    try:
                       tapePool = input("Please, insert a tape pool: ")
                       tapeHSMFilesystem = input("Please, insert a tape HSM filesystem: ")
                    except ValueError:
                        print("Input type is not valid!")
                    except EOFError:
@@ -81,7 +81,7 @@ class VOSStorage(RedisRPCClient):
                           "storageType": storageType,
                           "basePath": storageBasePath,
                           "hostname": storageHostname,
                           "tapePool": tapePool }
                           "tapeHSMFilesystem": tapeHSMFilesystem }
        storageResponse = self.call(storageRequest)

        if "responseType" not in storageResponse:
@@ -202,8 +202,8 @@ DESCRIPTION
       Adding 'hot' or 'cold' storage points requires a base path
       to be specified (e.g. '/mnt/my_storage/users').

       Adding a 'cold' storage point requires selecting a tape pool
       (a tape pool list is provided).
       Adding a 'cold' storage point requires selecting a tape HSM
       filesystem (a tape HSM filesystem list is provided).

       All storage points require a valid hostname or IP address.
    """)