Commit 74359d2a authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

Completed tape import according to #488

parent cb3c33db
......@@ -240,10 +240,13 @@ BEGIN
'CASTOR', 'CASTOR', getTime(),
'CASTOR', 'CASTOR', getTime()
);
FOR T in (SELECT T.vid, T.model, T.manufacturer, T.library, TS.status, TS.nbfiles,
FOR T in (SELECT T.vid, T.model, T.manufacturer, DGN.dgn, TS.status, TS.nbfiles,
TS.rcount, TS.wcount, TS.rhost, TS.whost, TS.rtime, TS.wtime
FROM castor.Vmgr_tape_info T, castor.Vmgr_tape_side TS
WHERE T.vid = TS.vid AND TS.poolname = inTapePool) LOOP
FROM castor.Vmgr_tape_info T, castor.Vmgr_tape_side TS, castor.Vmgr_tape_dgnmap DGN
WHERE T.vid = TS.vid
AND T.library = DGN.library
AND T.model = DGN.model
AND TS.poolname = inTapePool) LOOP
INSERT INTO Tape (vid, media_type, vendor, logical_library_name, tape_pool_name,
encryption_key, capacity_in_bytes, data_in_bytes, last_fseq, is_disabled, is_full,
label_drive, label_time, last_read_drive, last_read_time, read_mount_count,
......@@ -253,7 +256,7 @@ BEGIN
T.vid,
T.model,
T.manufacturer,
T.library,
T.dgn,
varTapePoolName,
'', -- blank encryption key
decode(T.density, -- capacity: only one of those options
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment