Commit cd87d014 authored by Eric Cano's avatar Eric Cano
Browse files

Added an executable creating a minimal VFS object store and populates it.

parent ff752927
...@@ -40,3 +40,7 @@ set(ObjectStoreUnitTests ...@@ -40,3 +40,7 @@ set(ObjectStoreUnitTests
add_library(ctaobjectstoreunittests SHARED ${ObjectStoreUnitTests}) add_library(ctaobjectstoreunittests SHARED ${ObjectStoreUnitTests})
target_link_libraries(ctaobjectstoreunittests target_link_libraries(ctaobjectstoreunittests
protobuf rados ctacommon gtest gmock CTAObjectStore) protobuf rados ctacommon gtest gmock CTAObjectStore)
add_executable(makeMinimalVFS makeMinimalVFS.cpp)
protobuf CTAObjectStore ctacommon)
\ No newline at end of file
* The CERN Tape Archive (CTA) project
* Copyright (C) 2015 CERN
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <>.
* This program will create a VFS backend for the object store and populate
* it with the minimum elements (the root entry). The program will then print out
* the path the backend store and exit
#include "BackendVFS.hpp"
#include "RootEntry.hpp"
#include <iostream>
int main(void) {
try {
cta::objectstore::BackendVFS be;
cta::objectstore::RootEntry re(be);
std::cout << "New object store path: " << be.getParams()->getPath() << std::endl;
} catch (std::exception & e) {
std::cerr << "Failed to initialise the root entry in a new VFS backend store"
<< std::endl << e.what() << std::endl;
\ No newline at end of file
...@@ -766,7 +766,6 @@ std::unique_ptr<cta::TapeMount> cta::Scheduler::getNextMount( ...@@ -766,7 +766,6 @@ std::unique_ptr<cta::TapeMount> cta::Scheduler::getNextMount(
mountInfo = m_db.getMountInfo(); mountInfo = m_db.getMountInfo();
// Prioritize the mounts. // Prioritize the mounts.
throw NotImplemented(""); throw NotImplemented("");
// TODO: finish // TODO: finish
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