Skip to content
Snippets Groups Projects
Commit 01df23a6 authored by Victor Kotlyar's avatar Victor Kotlyar
Browse files

[cta-admin] Add r\w mount counters, isFromCastor and comment to cta-admin tape ls

parent 78706cf6
No related branches found
No related tags found
No related merge requests found
......@@ -785,19 +785,23 @@ void TextFormatter::printTapeLsHeader() {
"last fseq",
"full",
"disabled",
"rdonly",
"rdonly",
"from castor",
"label drive",
"label time",
"last w drive",
"last w time",
"w mounts",
"last r drive",
"last r time",
"r mounts",
"c.user",
"c.host",
"c.time",
"m.user",
"m.host",
"m.time"
"m.time",
"comment"
);
}
......@@ -816,18 +820,22 @@ void TextFormatter::print(const TapeLsItem &tals_item) {
tals_item.full(),
tals_item.disabled(),
tals_item.rdonly(),
tals_item.from_castor(),
tals_item.has_label_log() ? tals_item.label_log().drive() : "",
tals_item.has_label_log() ? timeToStr(tals_item.label_log().time()) : "",
tals_item.has_last_written_log() ? tals_item.last_written_log().drive() : "",
tals_item.has_last_written_log() ? timeToStr(tals_item.last_written_log().time()) : "",
tals_item.write_mount_count(),
tals_item.has_last_read_log() ? tals_item.last_read_log().drive() : "",
tals_item.has_last_read_log() ? timeToStr(tals_item.last_read_log().time()) : "",
tals_item.read_mount_count(),
tals_item.creation_log().username(),
tals_item.creation_log().host(),
timeToStr(tals_item.creation_log().time()),
tals_item.last_modification_log().username(),
tals_item.last_modification_log().host(),
timeToStr(tals_item.last_modification_log().time())
timeToStr(tals_item.last_modification_log().time()),
tals_item.comment()
);
}
......
......@@ -110,6 +110,9 @@ int TapeLsStream::fillBuffer(XrdSsiPb::OStreamBuffer<Data> *streambuf) {
tape_item->set_full(tape.full);
tape_item->set_disabled(tape.disabled);
tape_item->set_rdonly(tape.readOnly);
tape_item->set_from_castor(tape.isFromCastor);
tape_item->set_read_mount_count(tape.readMountCount);
tape_item->set_write_mount_count(tape.writeMountCount);
if(tape.labelLog) {
::cta::common::TapeLog * labelLog = tape_item->mutable_label_log();
......@@ -134,6 +137,7 @@ int TapeLsStream::fillBuffer(XrdSsiPb::OStreamBuffer<Data> *streambuf) {
lastModificationLog->set_username(tape.lastModificationLog.username);
lastModificationLog->set_host(tape.lastModificationLog.host);
lastModificationLog->set_time(tape.lastModificationLog.time);
tape_item->set_comment(tape.comment);
is_buffer_full = streambuf->Push(record);
}
......
Subproject commit 24594c24566684a4da6bbb133c308260502ec625
Subproject commit 4a0013b711b1e04d0721b09e8bc59c2131eff8a6
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment