:Example: tenant1
:Required: No
+``default-placement``
+
+:Description: default placement for the user.
+:Type: string
+:Example: default-placement
+:Required: No
+
+``default-storage-class``
+:Description: default storage class for the user, default-placement must be defined when setting this option.
+:Type: string
+:Example: STANDARD-1A
+:Required: No
+
Response Entities
~~~~~~~~~~~~~~~~~
:Example: ``read, write, delete, *``
:Required: No
+``default-placement``
+
+:Description: default placement for the user.
+:Type: string
+:Example: default-placement
+:Required: No
+
+``default-storage-class``
+:Description: default storage class for the user, default-placement must be defined when setting this option.
+:Type: string
+:Example: STANDARD-1A
+:Required: No
+
Response Entities
~~~~~~~~~~~~~~~~~
std::string op_mask_str;
std::string default_placement_str;
std::string placement_tags_str;
+ std::string default_storage_class_str;
bool gen_key;
bool suspended;
RESTArgs::get_bool(s, "exclusive", false, &exclusive);
RESTArgs::get_string(s, "op-mask", op_mask_str, &op_mask_str);
RESTArgs::get_string(s, "default-placement", default_placement_str, &default_placement_str);
+ RESTArgs::get_string(s, "default-storage-class", default_storage_class_str, &default_storage_class_str);
RESTArgs::get_string(s, "placement-tags", placement_tags_str, &placement_tags_str);
RESTArgs::get_string(s, "account-id", "", &op_state.account_id);
RESTArgs::get_string(s, "path", "", &op_state.path);
if (!default_placement_str.empty()) {
rgw_placement_rule target_rule;
- target_rule.from_str(default_placement_str);
+ target_rule.name = default_placement_str;
+ if (!default_storage_class_str.empty()){
+ target_rule.storage_class = default_storage_class_str;
+ }
if (!driver->valid_placement(target_rule)) {
ldpp_dout(this, 0) << "NOTICE: invalid dest placement: " << target_rule.to_str() << dendl;
op_ret = -EINVAL;
std::string op_mask_str;
std::string default_placement_str;
std::string placement_tags_str;
+ std::string default_storage_class_str;
bool gen_key;
bool suspended;
RESTArgs::get_bool(s, "account-root", false, &account_root);
RESTArgs::get_string(s, "op-mask", op_mask_str, &op_mask_str);
RESTArgs::get_string(s, "default-placement", default_placement_str, &default_placement_str);
+ RESTArgs::get_string(s, "default-storage-class", default_storage_class_str, &default_storage_class_str);
RESTArgs::get_string(s, "placement-tags", placement_tags_str, &placement_tags_str);
RESTArgs::get_string(s, "account-id", "", &op_state.account_id);
RESTArgs::get_string(s, "path", "", &op_state.path);
if (!default_placement_str.empty()) {
rgw_placement_rule target_rule;
- target_rule.from_str(default_placement_str);
+ target_rule.name = default_placement_str;
+ if (!default_storage_class_str.empty()){
+ target_rule.storage_class = default_storage_class_str;
+ }
if (!driver->valid_placement(target_rule)) {
ldpp_dout(this, 0) << "NOTICE: invalid dest placement: " << target_rule.to_str() << dendl;
op_ret = -EINVAL;