Skip to content

Fix usage of cta-admin options of type OptionStrList::FILE_ID

Problem

At the moment, the cta-admin option OptionStrList::FILE_ID is employed inconsistently across the CTA code.

For example, in CtaAdminCmdParser.hpp#L354 it's used for both the "--fxidfile" and "--id" parameters, which have different meanings:

const std::map<std::string, OptionStrList::Key> strListOptions = {
  {"--fxidfile", OptionStrList::FILE_ID},
  {"--vidfile",  OptionStrList::VID    },
  {"--id",       OptionStrList::FILE_ID}
};
  • "--fxidfile" / opt_fidfile:
    • Description: --fxidfile <filename>
    • Actual usage:
      • processRecycleTapeFile_ls: Optional std::vector of Disk File IDs (any string).
      • processTape_Ls: Optional std::vector of Disk File IDs (any string).
      • processTapeFile_Ls: Optional std::vector of Disk File IDs (any string).
  • "--id" / opt_archive_file_ids:
    • Description: --id <archive_file_id>
    • Actual usage:
      • processModifyArchiveFile: Mandatory std::vector of Archive File IDs (strings parsed to integers).
  • "--vidfile" / opt_vidfile:
    • Description: --vidfile <filename>
    • Actual usage:
      • processRepack_Add: Optional std::vector of VIDs.

As we see above, the usage of OptionStrList::FILE_ID (and OptionStrList::VID too) is inconsistent and can lead to confusion.