]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
radosgw-admin: use zonegroup realm id in zone add command
authorOrit Wasserman <owasserm@redhat.com>
Tue, 22 Sep 2015 20:08:57 +0000 (22:08 +0200)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:04 +0000 (16:13 -0800)
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_admin.cc

index 5604af61851c9ed121712f79945faedf8258dc52..457d9be2eeb1b622a418fa23140d19864e93ad7c 100644 (file)
@@ -2406,6 +2406,14 @@ int main(int argc, char **argv)
          return ret;
        }
 
+       if (realm_id.empty() && realm_name.empty()) {
+         if (zonegroup.realm_id.empty()) {
+           cerr << "no realm info provided" << std::endl;
+           return -EINVAL;
+         }
+         realm_id = zonegroup.realm_id;
+       }
+         
        RGWRealm realm(realm_id, realm_name);
        ret = realm.init(g_ceph_context, store);
        if (ret < 0) {