Add new physical tape library table to the CTA catalogue
For reference, check issue https://gitlab.cern.ch/cta/operations/-/issues/970.
For various reasons (mainly hardware resource planning), we need to add the concept of physical tape libraries to the the CTA catalogue.
As @vlado mentioned on https://gitlab.cern.ch/cta/operations/-/issues/970, this new table should include:
- name (mandatory, primary key)
- description (manufacturer, what it is used for, what kind of technology it is using)
- URL to the GUI
- location (building room)
- number of physical cartridge slots (mandatory, but updateable)
- number of physical drive slots (mandatory, but updateable)
- comment
Each physical library can contain zero or more logical libraries.
Each logical library must belong to exactly one physical library.
The new table should:
- Be named
PHYSICAL_LIBRARY
(in opposition to the already existing tableLOGICAL_LIBRARY
). - Have
PHYSICAL_LIBRARY_ID
as the primary key. - Have
PHYSICAL_LIBRARY_NAME
as an UNIQUE column. - Be referenced by the
LOGICAL_LIBRARY
table:- By adding a FOREIGN KEY column
PHYSICAL_LIBRARY_ID
to theLOGICAL_LIBRARY
table.
- By adding a FOREIGN KEY column
It should have the following columns (to be discussed):
Column | Description | Required |
---|---|---|
PHYSICAL_LIBRARY_ID | auto-generated number(20) sequence | Yes |
PHYSICAL_LIBRARY_NAME | varchar(100) | Yes |
PHYSICAL_LIBRARY_MANUFACTURER | varchar(100) | Yes |
PHYSICAL_LIBRARY_MODEL | varchar(100) | Yes |
PHYSICAL_LIBRARY_TYPE | varchar(100) | |
GUI_URL | varchar(1000) | |
WEBCAM_URL | varchar(1000) | |
PHYSICAL_LOCATION | varchar(100) | |
NB_PHYSICAL_CARTRIDGE_SLOTS | number(20) | Yes |
NB_AVAILABLE_CARTRIDGE_SLOTS | number(20) | |
NB_PHYSICAL_DRIVE_SLOTS | number(20) | Yes |
USER_COMMENT | varchar(1000) | |
CREATION_LOG_USER_NAME | varchar(100) | Yes |
CREATION_LOG_HOST_NAME | varchar(100) | Yes |
CREATION_LOG_TIME | number(20) | Yes |
LAST_UPDATE_USER_NAME | varchar(100) | Yes |
LAST_UPDATE_HOST_NAME | varchar(100) | Yes |
LAST_UPDATE_TIME | number(20) | Yes |
Regarding the development work, I propose the following tasks:
-
Create new PHYSICAL_LIBRARY
table and FOREIGN KEY inLOGICAL_LIBRARY
. Include it in the future catalogue releasev13.0
. -
Modify the cta-admin
tool, allowing us populate/print thePHYSICAL_LIBRARY
table. Include in the next code release.-
Modify the protobuf to include pysical library data -
Create new client side cmd cta-admin physical library add/ch/rm/ls -
Add function with sql code for adding a pl on frontend -
Add function with sql code for changing a pl on frontend -
Add function with sql code for removing a pl on frontend -
Add function with sql code for selecting a pl on frontend
-
-
Update the schema in production to v13.0
-
Populate the PHYSICAL_LIBRARY
table. Add a physical library to all logical libraries. -
Add NOT NULL
constraint to the new FOREIGN KEY inLOGICAL_LIBRARY
. Include it in the future catalogue releasev14.0
.
Edited by Lasse Tjernaes Wardenaer