Skip to content
Snippets Groups Projects
Commit 3845653e authored by Steven Murray's avatar Steven Murray
Browse files

Removed the nbDrives member variable from the TapePool class

parent f8cd8151
Branches
Tags
No related merge requests found
......@@ -68,7 +68,6 @@ void cta::SqliteDatabase::createSchema() {
");"
"CREATE TABLE TAPEPOOL("
"NAME TEXT PRIMARY KEY,"
"NBDRIVES INTEGER,"
"NBPARTIALTAPES INTEGER,"
"UID INTEGER,"
"GID INTEGER,"
......@@ -781,7 +780,7 @@ std::list<cta::TapePool> cta::SqliteDatabase::selectAllTapePools(const SecurityI
char *zErrMsg = 0;
std::ostringstream query;
std::list<cta::TapePool> pools;
query << "SELECT NAME, NBDRIVES, NBPARTIALTAPES, UID, GID, CREATIONTIME, COMMENT FROM TAPEPOOL ORDER BY NAME;";
query << "SELECT NAME, NBPARTIALTAPES, UID, GID, CREATIONTIME, COMMENT FROM TAPEPOOL ORDER BY NAME;";
sqlite3_stmt *statement;
int rc = sqlite3_prepare(m_dbHandle, query.str().c_str(), -1, &statement, 0 );
if(rc!=SQLITE_OK){
......@@ -795,7 +794,6 @@ std::list<cta::TapePool> cta::SqliteDatabase::selectAllTapePools(const SecurityI
SqliteColumnNameToIndex idx(statement);
pools.push_back(cta::TapePool(
std::string((char *)sqlite3_column_text(statement,idx("NAME"))),
sqlite3_column_int(statement,idx("NBDRIVES")),
sqlite3_column_int(statement,idx("NBPARTIALTAPES")),
cta::UserIdentity(sqlite3_column_int(statement,idx("UID")),
sqlite3_column_int(statement,idx("GID"))),
......@@ -1049,7 +1047,7 @@ cta::TapePool cta::SqliteDatabase::getTapePoolByName(const SecurityIdentity &req
char *zErrMsg = 0;
std::ostringstream query;
cta::TapePool pool;
query << "SELECT NAME, NBDRIVES, NBPARTIALTAPES, UID, GID, CREATIONTIME, COMMENT FROM TAPEPOOL WHERE NAME='" << name << "';";
query << "SELECT NAME, NBPARTIALTAPES, UID, GID, CREATIONTIME, COMMENT FROM TAPEPOOL WHERE NAME='" << name << "';";
sqlite3_stmt *statement;
int rc = sqlite3_prepare(m_dbHandle, query.str().c_str(), -1, &statement, 0 );
if(rc!=SQLITE_OK){
......@@ -1064,7 +1062,6 @@ cta::TapePool cta::SqliteDatabase::getTapePoolByName(const SecurityIdentity &req
SqliteColumnNameToIndex idx(statement);
pool = cta::TapePool(
std::string((char *)sqlite3_column_text(statement,idx("NAME"))),
sqlite3_column_int(statement,idx("NBDRIVES")),
sqlite3_column_int(statement,idx("NBPARTIALTAPES")),
cta::UserIdentity(sqlite3_column_int(statement,idx("UID")),sqlite3_column_int(statement,idx("GID"))),
std::string((char *)sqlite3_column_text(statement,idx("COMMENT"))),
......
......@@ -4,7 +4,6 @@
// constructor
//------------------------------------------------------------------------------
cta::TapePool::TapePool():
m_nbDrives(0),
m_nbPartialTapes(0) {
}
......@@ -19,14 +18,12 @@ cta::TapePool::~TapePool() throw() {
//------------------------------------------------------------------------------
cta::TapePool::TapePool(
const std::string &name,
const uint16_t nbDrives,
const uint32_t nbPartialTapes,
const UserIdentity &creator,
const std::string &comment,
const time_t creationTime):
ConfigurationItem(creator, comment, creationTime),
m_name(name),
m_nbDrives(nbDrives),
m_nbPartialTapes(nbPartialTapes) {
}
......@@ -44,13 +41,6 @@ const std::string &cta::TapePool::getName() const throw() {
return m_name;
}
//------------------------------------------------------------------------------
// getNbDrives
//------------------------------------------------------------------------------
uint16_t cta::TapePool::getNbDrives() const throw() {
return m_nbDrives;
}
//------------------------------------------------------------------------------
// getNbPartialTapes
//------------------------------------------------------------------------------
......
......@@ -27,9 +27,6 @@ public:
* Constructor.
*
* @param name The name of the tape pool.
* @param nbDrives The maximum number of drives that can be concurrently
* assigned to this pool independent of whether they are archiving or
* retrieving files.
* @param nbPartialTapes The maximum number of tapes that can be partially
* full at any moment in time.
* @param creator The identity of the user that created the tape pool.
......@@ -40,7 +37,6 @@ public:
*/
TapePool(
const std::string &name,
const uint16_t nbDrives,
const uint32_t nbPartialTapes,
const UserIdentity &creator,
const std::string &comment,
......@@ -60,17 +56,6 @@ public:
*/
const std::string &getName() const throw();
/**
* Returns the maximum number of drives that can be concurrently
* assigned to this pool independent of whether they are archiving or
* retrieving files.
*
* @return The maximum number of drives that can be concurrently
* assigned to this pool independent of whether they are archiving or
* retrieving files.
*/
uint16_t getNbDrives() const throw();
/**
* Returns the maximum number of tapes that can be partially full at any
* moment in time.
......@@ -87,12 +72,6 @@ private:
*/
std::string m_name;
/**
* The maximum number of drives that can be concurrently assigned to this
* pool independent of whether they are archiving or retrieving files.
*/
uint16_t m_nbDrives;
/**
* The maximum number of tapes that can be partially full at any moment in
* time.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment