Commit d2722f91 authored by Cedric Caffy's avatar Cedric Caffy
Browse files

Removed the MountPolicy.maxDrivesAllowedPerVo parameter

parent ff8896f5
......@@ -229,7 +229,6 @@ CREATE TABLE MOUNT_POLICY(
RETRIEVE_PRIORITY BIGINT UNSIGNED CONSTRAINT MOUNT_POLICY_RP_NN NOT NULL,
RETRIEVE_MIN_REQUEST_AGE BIGINT UNSIGNED CONSTRAINT MOUNT_POLICY_RMRA_NN NOT NULL,
MAX_DRIVES_ALLOWED BIGINT UNSIGNED CONSTRAINT MOUNT_POLICY_MDA_NN NOT NULL,
MAX_DRIVES_ALLOWED_PER_VO BIGINT UNSIGNED,
USER_COMMENT VARCHAR(1000) CONSTRAINT MOUNT_POLICY_UC_NN NOT NULL,
CREATION_LOG_USER_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLUN_NN NOT NULL,
CREATION_LOG_HOST_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLHN_NN NOT NULL,
......
......@@ -261,7 +261,6 @@ CREATE TABLE MOUNT_POLICY(
RETRIEVE_PRIORITY NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_RP_NN NOT NULL,
RETRIEVE_MIN_REQUEST_AGE NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_RMRA_NN NOT NULL,
MAX_DRIVES_ALLOWED NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_MDA_NN NOT NULL,
MAX_DRIVES_ALLOWED_PER_VO NUMERIC(20, 0),
USER_COMMENT VARCHAR2(1000) CONSTRAINT MOUNT_POLICY_UC_NN NOT NULL,
CREATION_LOG_USER_NAME VARCHAR2(100) CONSTRAINT MOUNT_POLICY_CLUN_NN NOT NULL,
CREATION_LOG_HOST_NAME VARCHAR2(100) CONSTRAINT MOUNT_POLICY_CLHN_NN NOT NULL,
......
......@@ -243,7 +243,6 @@ CREATE TABLE MOUNT_POLICY(
RETRIEVE_PRIORITY NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_RP_NN NOT NULL,
RETRIEVE_MIN_REQUEST_AGE NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_RMRA_NN NOT NULL,
MAX_DRIVES_ALLOWED NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_MDA_NN NOT NULL,
MAX_DRIVES_ALLOWED_PER_VO NUMERIC(20, 0),
USER_COMMENT VARCHAR(1000) CONSTRAINT MOUNT_POLICY_UC_NN NOT NULL,
CREATION_LOG_USER_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLUN_NN NOT NULL,
CREATION_LOG_HOST_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLHN_NN NOT NULL,
......
......@@ -215,7 +215,6 @@ CREATE TABLE MOUNT_POLICY(
RETRIEVE_PRIORITY INTEGER CONSTRAINT MOUNT_POLICY_RP_NN NOT NULL,
RETRIEVE_MIN_REQUEST_AGE INTEGER CONSTRAINT MOUNT_POLICY_RMRA_NN NOT NULL,
MAX_DRIVES_ALLOWED INTEGER CONSTRAINT MOUNT_POLICY_MDA_NN NOT NULL,
MAX_DRIVES_ALLOWED_PER_VO INTEGER,
USER_COMMENT VARCHAR(1000) CONSTRAINT MOUNT_POLICY_UC_NN NOT NULL,
CREATION_LOG_USER_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLUN_NN NOT NULL,
CREATION_LOG_HOST_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLHN_NN NOT NULL,
......
......@@ -7219,7 +7219,6 @@ namespace catalogue{
" RETRIEVE_PRIORITY NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_RP_NN NOT NULL,"
" RETRIEVE_MIN_REQUEST_AGE NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_RMRA_NN NOT NULL,"
" MAX_DRIVES_ALLOWED NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_MDA_NN NOT NULL,"
" MAX_DRIVES_ALLOWED_PER_VO NUMERIC(20, 0),"
" USER_COMMENT VARCHAR2(1000) CONSTRAINT MOUNT_POLICY_UC_NN NOT NULL,"
" CREATION_LOG_USER_NAME VARCHAR2(100) CONSTRAINT MOUNT_POLICY_CLUN_NN NOT NULL,"
" CREATION_LOG_HOST_NAME VARCHAR2(100) CONSTRAINT MOUNT_POLICY_CLHN_NN NOT NULL,"
......@@ -7642,7 +7641,6 @@ namespace catalogue{
" RETRIEVE_PRIORITY BIGINT UNSIGNED CONSTRAINT MOUNT_POLICY_RP_NN NOT NULL,"
" RETRIEVE_MIN_REQUEST_AGE BIGINT UNSIGNED CONSTRAINT MOUNT_POLICY_RMRA_NN NOT NULL,"
" MAX_DRIVES_ALLOWED BIGINT UNSIGNED CONSTRAINT MOUNT_POLICY_MDA_NN NOT NULL,"
" MAX_DRIVES_ALLOWED_PER_VO BIGINT UNSIGNED,"
" USER_COMMENT VARCHAR(1000) CONSTRAINT MOUNT_POLICY_UC_NN NOT NULL,"
" CREATION_LOG_USER_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLUN_NN NOT NULL,"
" CREATION_LOG_HOST_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLHN_NN NOT NULL,"
......@@ -8050,7 +8048,6 @@ namespace catalogue{
" RETRIEVE_PRIORITY INTEGER CONSTRAINT MOUNT_POLICY_RP_NN NOT NULL,"
" RETRIEVE_MIN_REQUEST_AGE INTEGER CONSTRAINT MOUNT_POLICY_RMRA_NN NOT NULL,"
" MAX_DRIVES_ALLOWED INTEGER CONSTRAINT MOUNT_POLICY_MDA_NN NOT NULL,"
" MAX_DRIVES_ALLOWED_PER_VO INTEGER,"
" USER_COMMENT VARCHAR(1000) CONSTRAINT MOUNT_POLICY_UC_NN NOT NULL,"
" CREATION_LOG_USER_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLUN_NN NOT NULL,"
" CREATION_LOG_HOST_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLHN_NN NOT NULL,"
......@@ -8484,7 +8481,6 @@ namespace catalogue{
" RETRIEVE_PRIORITY NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_RP_NN NOT NULL,"
" RETRIEVE_MIN_REQUEST_AGE NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_RMRA_NN NOT NULL,"
" MAX_DRIVES_ALLOWED NUMERIC(20, 0) CONSTRAINT MOUNT_POLICY_MDA_NN NOT NULL,"
" MAX_DRIVES_ALLOWED_PER_VO NUMERIC(20, 0),"
" USER_COMMENT VARCHAR(1000) CONSTRAINT MOUNT_POLICY_UC_NN NOT NULL,"
" CREATION_LOG_USER_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLUN_NN NOT NULL,"
" CREATION_LOG_HOST_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLHN_NN NOT NULL,"
......
......@@ -151,7 +151,6 @@ namespace {
mountPolicy.retrievePriority = 3;
mountPolicy.minRetrieveRequestAge = 4;
mountPolicy.maxDrivesAllowed = 5;
mountPolicy.maxDrivesAllowedPerVo = 6;
mountPolicy.comment = "Create mount policy";
return mountPolicy;
}
......@@ -6422,8 +6421,6 @@ TEST_P(cta_catalogue_CatalogueTest, createMountPolicy) {
ASSERT_EQ(mountPolicyToAdd.minRetrieveRequestAge, mountPolicy.retrieveMinRequestAge);
 
ASSERT_EQ(mountPolicyToAdd.maxDrivesAllowed, mountPolicy.maxDrivesAllowed);
ASSERT_EQ(mountPolicyToAdd.maxDrivesAllowedPerVo,mountPolicy.maxDrivesAllowedPerVo);
 
ASSERT_EQ(mountPolicyToAdd.comment, mountPolicy.comment);
 
......
......@@ -33,7 +33,6 @@ namespace catalogue {
uint64_t retrievePriority;
uint64_t minRetrieveRequestAge;
uint64_t maxDrivesAllowed;
uint64_t maxDrivesAllowedPerVo;
std::string comment;
};
......
......@@ -4952,7 +4952,6 @@ void RdbmsCatalogue::createMountPolicy(const common::dataStructures::SecurityIde
"RETRIEVE_MIN_REQUEST_AGE,"
"MAX_DRIVES_ALLOWED,"
"MAX_DRIVES_ALLOWED_PER_VO,"
"USER_COMMENT,"
......@@ -4973,7 +4972,6 @@ void RdbmsCatalogue::createMountPolicy(const common::dataStructures::SecurityIde
":RETRIEVE_MIN_REQUEST_AGE,"
":MAX_DRIVES_ALLOWED,"
":MAX_DRIVES_ALLOWED_PER_VO,"
":USER_COMMENT,"
......@@ -4995,7 +4993,6 @@ void RdbmsCatalogue::createMountPolicy(const common::dataStructures::SecurityIde
stmt.bindUint64(":RETRIEVE_MIN_REQUEST_AGE", mountPolicy.minRetrieveRequestAge);
stmt.bindUint64(":MAX_DRIVES_ALLOWED", mountPolicy.maxDrivesAllowed);
stmt.bindUint64(":MAX_DRIVES_ALLOWED_PER_VO",mountPolicy.maxDrivesAllowedPerVo);
stmt.bindString(":USER_COMMENT", mountPolicy.comment);
......@@ -5677,7 +5674,6 @@ try {
"RETRIEVE_MIN_REQUEST_AGE AS RETRIEVE_MIN_REQUEST_AGE,"
"MAX_DRIVES_ALLOWED AS MAX_DRIVES_ALLOWED,"
"MAX_DRIVES_ALLOWED_PER_VO AS MAX_DRIVES_ALLOWED_PER_VO,"
"USER_COMMENT AS USER_COMMENT,"
......@@ -5706,7 +5702,6 @@ try {
policy.retrieveMinRequestAge = rset.columnUint64("RETRIEVE_MIN_REQUEST_AGE");
policy.maxDrivesAllowed = rset.columnUint64("MAX_DRIVES_ALLOWED");
policy.maxDrivesAllowedPerVo = rset.columnUint64("MAX_DRIVES_ALLOWED_PER_VO");
policy.comment = rset.columnString("USER_COMMENT");
......
......@@ -194,7 +194,6 @@ CREATE TABLE MOUNT_POLICY(
RETRIEVE_PRIORITY UINT64TYPE CONSTRAINT MOUNT_POLICY_RP_NN NOT NULL,
RETRIEVE_MIN_REQUEST_AGE UINT64TYPE CONSTRAINT MOUNT_POLICY_RMRA_NN NOT NULL,
MAX_DRIVES_ALLOWED UINT64TYPE CONSTRAINT MOUNT_POLICY_MDA_NN NOT NULL,
MAX_DRIVES_ALLOWED_PER_VO UINT64TYPE,
USER_COMMENT VARCHAR(1000) CONSTRAINT MOUNT_POLICY_UC_NN NOT NULL,
CREATION_LOG_USER_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLUN_NN NOT NULL,
CREATION_LOG_HOST_NAME VARCHAR(100) CONSTRAINT MOUNT_POLICY_CLHN_NN NOT NULL,
......
......@@ -33,13 +33,12 @@ MountPolicy::MountPolicy():
archiveMinRequestAge(0),
retrievePriority(0),
retrieveMinRequestAge(0),
maxDrivesAllowed(0),
maxDrivesAllowedPerVo(0){}
maxDrivesAllowed(0){}
MountPolicy::MountPolicy(const std::string name, const uint64_t archivePriority,const uint64_t archiveMinRequestAge, const uint64_t retrievePriority,
const uint64_t retrieveMinRequestAge, const uint64_t maxDrivesAllowed, const uint64_t maxDrivesAllowedPerVo):
const uint64_t retrieveMinRequestAge, const uint64_t maxDrivesAllowed):
name(name), archivePriority(archivePriority), archiveMinRequestAge(archiveMinRequestAge), retrievePriority(retrievePriority),
retrieveMinRequestAge(retrieveMinRequestAge), maxDrivesAllowed(maxDrivesAllowed), maxDrivesAllowedPerVo(maxDrivesAllowedPerVo) {}
retrieveMinRequestAge(retrieveMinRequestAge), maxDrivesAllowed(maxDrivesAllowed) {}
//------------------------------------------------------------------------------
// operator==
//------------------------------------------------------------------------------
......@@ -50,7 +49,6 @@ bool MountPolicy::operator==(const MountPolicy &rhs) const {
&& retrievePriority==rhs.retrievePriority
&& retrieveMinRequestAge==rhs.retrieveMinRequestAge
&& maxDrivesAllowed==rhs.maxDrivesAllowed
&& maxDrivesAllowedPerVo==rhs.maxDrivesAllowedPerVo
&& creationLog==rhs.creationLog
&& lastModificationLog==rhs.lastModificationLog
&& comment==rhs.comment;
......@@ -71,7 +69,6 @@ MountPolicy MountPolicy::operator=(const MountPolicy& other){
this->creationLog = other.creationLog;
this->lastModificationLog = other.lastModificationLog;
this->maxDrivesAllowed = other.maxDrivesAllowed;
this->maxDrivesAllowedPerVo = other.maxDrivesAllowedPerVo;
this->name = other.name;
this->retrieveMinRequestAge = other.retrieveMinRequestAge;
this->retrievePriority = other.retrievePriority;
......@@ -88,14 +85,13 @@ std::ostream &operator<<(std::ostream &os, const MountPolicy &obj) {
<< " retrieve_priority=" << obj.retrievePriority
<< " retrieve_minRequestAge=" << obj.retrieveMinRequestAge
<< " maxDrivesAllowed=" << obj.maxDrivesAllowed
<< " maxDrivesAllowedPerVo=" << obj.maxDrivesAllowedPerVo
<< " creationLog=" << obj.creationLog
<< " lastModificationLog=" << obj.lastModificationLog
<< " comment=" << obj.comment << ")";
return os;
}
MountPolicy MountPolicy::s_defaultMountPolicyForRepack("default_mount_policy_repack",1,1,1,1,1,1);
MountPolicy MountPolicy::s_defaultMountPolicyForRepack("default_mount_policy_repack",1,1,1,1,1);
} // namespace dataStructures
} // namespace common
......
......@@ -48,7 +48,6 @@ struct MountPolicy {
uint64_t retrievePriority;
uint64_t retrieveMinRequestAge;
uint64_t maxDrivesAllowed;
uint64_t maxDrivesAllowedPerVo;
EntryLog creationLog;
EntryLog lastModificationLog;
std::string comment;
......@@ -57,7 +56,7 @@ struct MountPolicy {
static struct MountPolicy s_defaultMountPolicyForRepack;
private:
MountPolicy(const std::string name,const uint64_t archivePriority,const uint64_t archiveMinRequestAge, const uint64_t retrievePriority, const uint64_t retrieveMinRequestAge, const uint64_t maxDrivesAllowed, const uint64_t maxDrivesAllowedPerVo);
MountPolicy(const std::string name,const uint64_t archivePriority,const uint64_t archiveMinRequestAge, const uint64_t retrievePriority, const uint64_t retrieveMinRequestAge, const uint64_t maxDrivesAllowed);
}; // struct MountPolicy
......
......@@ -43,7 +43,6 @@ public:
osmp.set_retrievepriority(retrievePriority);
osmp.set_retieveminrequestage(retrieveMinRequestAge);
osmp.set_maxdrivesallowed(maxDrivesAllowed);
osmp.set_max_drives_allowed_per_vo(maxDrivesAllowedPerVo);
EntryLogSerDeser(creationLog).serialize(*osmp.mutable_creationlog());
EntryLogSerDeser(lastModificationLog).serialize(*osmp.mutable_lastmodificationlog());
osmp.set_comment(comment);
......@@ -55,7 +54,6 @@ public:
retrievePriority=osmp.retrievepriority();
retrieveMinRequestAge=osmp.retieveminrequestage();
maxDrivesAllowed=osmp.maxdrivesallowed();
maxDrivesAllowedPerVo=osmp.max_drives_allowed_per_vo();
EntryLogSerDeser el;
el.deserialize(osmp.creationlog());
creationLog=el;
......
......@@ -300,7 +300,6 @@ message MountPolicy {
required EntryLog creationlog = 8986;
required EntryLog lastmodificationlog = 8987;
required string comment = 8988;
optional uint64 max_drives_allowed_per_vo = 8989;
}
// ------------- Archive Jobs --------------------------------------------------
......
......@@ -168,7 +168,6 @@ public:
const uint64_t retrievePriority = s_retrievePriority;
const uint64_t minRetrieveRequestAge = s_minRetrieveRequestAge;
const uint64_t maxDrivesAllowed = s_maxDrivesAllowed;
const uint64_t maxDrivesAllowedPerVo = s_maxDrivesAllowedPerVo;
const std::string mountPolicyComment = "create mount group";
catalogue::CreateMountPolicyAttributes mountPolicy;
......@@ -178,7 +177,6 @@ public:
mountPolicy.retrievePriority = retrievePriority;
mountPolicy.minRetrieveRequestAge = minRetrieveRequestAge;
mountPolicy.maxDrivesAllowed = maxDrivesAllowed;
mountPolicy.maxDrivesAllowedPerVo = maxDrivesAllowedPerVo;
mountPolicy.comment = mountPolicyComment;
ASSERT_TRUE(catalogue.getMountPolicies().empty());
......@@ -294,7 +292,6 @@ protected:
const uint64_t s_retrievePriority = 3;
const uint64_t s_minRetrieveRequestAge = 4;
const uint64_t s_maxDrivesAllowed = 50;
const uint64_t s_maxDrivesAllowedPerVo = 50;
const uint64_t s_mediaTypeCapacityInBytes = 10;
const std::string s_vo = "vo";
//TempFile m_tempSqliteFile;
......
......@@ -260,7 +260,6 @@ public:
mountPolicy.retrievePriority = 3;
mountPolicy.minRetrieveRequestAge = 4;
mountPolicy.maxDrivesAllowed = 5;
mountPolicy.maxDrivesAllowedPerVo = 6;
mountPolicy.comment = "create mount group";
return mountPolicy;
}
......@@ -273,7 +272,6 @@ public:
mountPolicy.retrievePriority = 1000;
mountPolicy.minRetrieveRequestAge = 0;
mountPolicy.maxDrivesAllowed = 1;
mountPolicy.maxDrivesAllowedPerVo = 1;
mountPolicy.comment = "Immediate mount";
return mountPolicy;
}
......@@ -290,7 +288,6 @@ public:
const uint64_t retrievePriority = mountPolicy.retrievePriority;
const uint64_t minRetrieveRequestAge = mountPolicy.minRetrieveRequestAge;
const uint64_t maxDrivesAllowed = mountPolicy.maxDrivesAllowed;
const uint64_t maxDrivesAllowedPerVo = mountPolicy.maxDrivesAllowedPerVo;
const std::string mountPolicyComment = "create mount group";
ASSERT_TRUE(catalogue.getMountPolicies().empty());
......@@ -308,7 +305,6 @@ public:
ASSERT_EQ(retrievePriority, group.retrievePriority);
ASSERT_EQ(minRetrieveRequestAge, group.retrieveMinRequestAge);
ASSERT_EQ(maxDrivesAllowed, group.maxDrivesAllowed);
ASSERT_EQ(maxDrivesAllowedPerVo,group.maxDrivesAllowedPerVo);
ASSERT_EQ(mountPolicyComment, group.comment);
const std::string ruleComment = "create requester mount-rule";
......
......@@ -1400,8 +1400,6 @@ void RequestMessage::processMountPolicy_Add(cta::xrd::Response &response)
mountPolicy.retrievePriority = retrievepriority;
mountPolicy.minRetrieveRequestAge = minretrieverequestage;
mountPolicy.maxDrivesAllowed = maxdrivesallowed;
//TODO: Add the OptionUint64::MAX_DRIVES_ALLOWED_PER_VO
mountPolicy.maxDrivesAllowedPerVo = maxdrivesallowed;
mountPolicy.comment = comment;
m_catalogue.createMountPolicy(m_cliIdentity, mountPolicy);
......
Subproject commit 52f53bdf8f6f08f4344c8e28cc098c471cda31af
Subproject commit 2e446b975ee7b02b6294933be3a3de05c926d558
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