]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw-admin: fix use of opt_storage_class
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 3 Dec 2019 17:31:56 +0000 (09:31 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 28 Jan 2020 18:20:39 +0000 (10:20 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_admin.cc

index 45240f16ef9d24870a78a06224ee8ee3543ddd68..a1b44bf5665aefd283cb3441dedeca3c53a1cd9f 100644 (file)
@@ -5268,7 +5268,7 @@ int main(int argc, const char **argv)
            return EINVAL;
          }
 
-         string storage_class = rgw_placement_rule::get_canonical_storage_class(storage_class);
+         string storage_class = rgw_placement_rule::get_canonical_storage_class(opt_storage_class.value_or(string()));
          if (ptiter->second.storage_classes.find(storage_class) == ptiter->second.storage_classes.end()) {
            cerr << "ERROR: storage class '" << storage_class << "' is not defined in zonegroup '" << placement_id << "' placement target" << std::endl;
            return EINVAL;