diff --git a/include/irods/private/storage_tiering/storage_tiering.hpp b/include/irods/private/storage_tiering/storage_tiering.hpp index d6c3694..ca41831 100644 --- a/include/irods/private/storage_tiering/storage_tiering.hpp +++ b/include/irods/private/storage_tiering/storage_tiering.hpp @@ -33,8 +33,6 @@ namespace irods { void migrate_object_to_minimum_restage_tier( const std::string& _object_path, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _source_resource); void schedule_storage_tiering_policy( @@ -44,8 +42,6 @@ namespace irods { void apply_tier_group_metadata_to_object( const std::string& _group_name, const std::string& _object_path, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _source_replica_number, const std::string& _source_resource, const std::string& _destination_resource); @@ -54,20 +50,14 @@ namespace irods { void set_migration_metadata_flag_for_object( rcComm_t* _comm, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _object_path); void unset_migration_metadata_flag_for_object( rcComm_t* _comm, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _object_path); bool object_has_migration_metadata_flag( rcComm_t* _comm, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _object_path); bool skip_object_in_lower_tier( @@ -159,8 +149,6 @@ namespace irods { const std::string& _plugin_instance_name, const std::string& _group_name, const std::string& _object_path, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _source_replica_number, const std::string& _source_resource, const std::string& _destination_resource, diff --git a/src/main.cpp b/src/main.cpp index 1fb3a40..6b915d3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -363,8 +363,6 @@ namespace { rcComm_t* _comm, const std::string& _instance_name, const std::string& _object_path, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _source_replica_number, const std::string& _source_resource, const std::string& _destination_resource, @@ -438,8 +436,7 @@ namespace { irods::storage_tiering st{&comm, _rei, plugin_instance_name}; - st.migrate_object_to_minimum_restage_tier( - object_path, _rei->rsComm->clientUser.userName, _rei->rsComm->clientUser.rodsZone, source_resource); + st.migrate_object_to_minimum_restage_tier(object_path, source_resource); } else if("pep_api_data_obj_open_post" == _rn || "pep_api_data_obj_create_post" == _rn) { @@ -483,10 +480,7 @@ namespace { RcComm& comm = static_cast(conn); irods::storage_tiering st{&comm, _rei, plugin_instance_name}; - st.migrate_object_to_minimum_restage_tier(object_path, - _rei->rsComm->clientUser.userName, - _rei->rsComm->clientUser.rodsZone, - resource_name); + st.migrate_object_to_minimum_restage_tier(object_path, resource_name); } } } @@ -503,16 +497,12 @@ namespace { irods::storage_tiering& _st, const std::string& _group_name, const std::string& _object_path, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _source_replica_number, const std::string& _source_resource, const std::string& _destination_resource) { _st.apply_tier_group_metadata_to_object( _group_name, _object_path, - _user_name, - _user_zone, _source_replica_number, _source_resource, _destination_resource); @@ -742,10 +732,6 @@ irods::error exec_rule_expression( irods::storage_tiering::policy::data_movement == rule_obj.at("rule-engine-operation")) { try { - // proxy for provided user name and zone - const std::string& user_name = rule_obj["user-name"]; - const std::string& user_zone = rule_obj["user-zone"]; - auto& pin = plugin_instance_name; irods::experimental::client_connection conn; RcComm& comm = static_cast(conn); @@ -754,8 +740,6 @@ irods::error exec_rule_expression( auto status = apply_data_movement_policy(&comm, plugin_instance_name, rule_obj["object-path"], - rule_obj["user-name"], - rule_obj["user-zone"], rule_obj["source-replica-number"], rule_obj["source-resource"], rule_obj["destination-resource"], @@ -767,8 +751,6 @@ irods::error exec_rule_expression( status = apply_tier_group_metadata_policy(st, rule_obj["group-name"], rule_obj["object-path"], - rule_obj["user-name"], - rule_obj["user-zone"], rule_obj["source-replica-number"], rule_obj["source-resource"], rule_obj["destination-resource"]); diff --git a/src/storage_tiering.cpp b/src/storage_tiering.cpp index 2555c5e..0b8b358 100644 --- a/src/storage_tiering.cpp +++ b/src/storage_tiering.cpp @@ -648,8 +648,6 @@ namespace irods { config_.instance_name, _group_name, object_path, - _results[2], - _results[3], _results[4], _source_resource, _destination_resource, @@ -727,19 +725,17 @@ namespace irods { const std::string& _plugin_instance_name, const std::string& _group_name, const std::string& _object_path, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _source_replica_number, const std::string& _source_resource, const std::string& _destination_resource, const std::string& _verification_type, const bool _preserve_replicas, const std::string& _data_movement_params) { - if(object_has_migration_metadata_flag(_comm, _user_name, _user_zone, _object_path)) { + if (object_has_migration_metadata_flag(_comm, _object_path)) { return; } - set_migration_metadata_flag_for_object(_comm, _user_name, _user_zone, _object_path); + set_migration_metadata_flag_for_object(_comm, _object_path); nlohmann::json rule_obj = { @@ -750,8 +746,6 @@ namespace irods { , {"rule-engine-instance-name", _plugin_instance_name} , {"group-name", _group_name} , {"object-path", _object_path} - , {"user-name", _user_name} - , {"user-zone", _user_zone} , {"source-replica-number", _source_replica_number} , {"source-resource", _source_resource} , {"destination-resource", _destination_resource} @@ -862,8 +856,6 @@ namespace irods { void storage_tiering::migrate_object_to_minimum_restage_tier( const std::string& _object_path, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _source_resource) { try { @@ -900,8 +892,6 @@ namespace irods { config_.instance_name, group_name, _object_path, - _user_name, - _user_zone, source_replica_number, _source_resource, low_tier_resource_name, @@ -969,8 +959,6 @@ namespace irods { void storage_tiering::set_migration_metadata_flag_for_object( rcComm_t* _comm, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _object_path) { auto access_time = get_metadata_for_data_object( _comm, @@ -996,8 +984,6 @@ namespace irods { void storage_tiering::unset_migration_metadata_flag_for_object( rcComm_t* _comm, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _object_path) { auto access_time = get_metadata_for_data_object( _comm, @@ -1023,8 +1009,6 @@ namespace irods { bool storage_tiering::object_has_migration_metadata_flag( rcComm_t* _comm, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _object_path) { boost::filesystem::path p{_object_path}; std::string coll_name = p.parent_path().string(); @@ -1045,13 +1029,11 @@ namespace irods { void storage_tiering::apply_tier_group_metadata_to_object( const std::string& _group_name, const std::string& _object_path, - const std::string& _user_name, - const std::string& _user_zone, const std::string& _source_replica_number, const std::string& _source_resource, const std::string& _destination_resource) { try { - unset_migration_metadata_flag_for_object(comm_, _user_name, _user_zone, _object_path); + unset_migration_metadata_flag_for_object(comm_, _object_path); } catch(const exception&) { }