Skip to content

[Tools] Fix cta-admin sc and tape ls exit code inconsistencies

Description

This commit updates the storage class ls command to throw a UserError exception when the requested storage class does not exist in the catalogue.

It also changes the tape ls command behavior. Previously, when a nonexistent vid was specified as search criteria, an empty list of tapes would be returned. Now a UserError exception will be thrown and an exit code 2 will be returned by the command instead of an empty list.

If the user specifies any of the other options tapepool, VO, logical library, physical library, media type or vendor that does not exist, an empty list will be returned. The reason for this is that vid is the primary key of the TAPE table.

Checklist

  • Documentation reflects the changes made.
  • Merge Request title is clear, concise, and suitable as a changelog entry. See our contributing docs

References

Closes #1286 (closed)

Edited by Konstantina Skovola

Merge request reports

Loading