]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw-admin: use 'get' instead of 'show' or info for geo stuff
authorGreg Farnum <greg@inktank.com>
Wed, 10 Jul 2013 15:55:45 +0000 (08:55 -0700)
committerGreg Farnum <greg@inktank.com>
Wed, 10 Jul 2013 17:09:35 +0000 (10:09 -0700)
These all output data that you can put back in via 'set', so they're
a 'get' rather than something else.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/rgw/rgw_admin.cc
src/test/cli/radosgw-admin/help.t

index 4f3d41530061a43799b31bd4cb01933dee40fd3c..5a09887e8ccbf23031688721cd8175ce9369372d 100644 (file)
@@ -62,13 +62,13 @@ void _usage()
   cerr << "  bucket check               check bucket index\n";
   cerr << "  object rm                  remove object\n";
   cerr << "  object unlink              unlink object from bucket index\n";
-  cerr << "  region info                show region info\n";
+  cerr << "  region get                 show region info\n";
   cerr << "  regions list               list all regions set on this cluster\n";
   cerr << "  region set                 set region info\n";
   cerr << "  region default             set default region\n";
-  cerr << "  region-map show            show region-map\n";            
-  cerr << "  region-map set             set region-map\n";            
-  cerr << "  zone info                  show zone cluster params\n";
+  cerr << "  region-map get             show region-map\n";
+  cerr << "  region-map set             set region-map\n";
+  cerr << "  zone get                   show zone cluster params\n";
   cerr << "  zone set                   set zone cluster params\n";
   cerr << "  zone list                  list all zones set on this cluster\n";
   cerr << "  pool add                   add an existing pool for data placement\n";
@@ -199,14 +199,14 @@ enum {
   OPT_OBJECT_STAT,
   OPT_GC_LIST,
   OPT_GC_PROCESS,
-  OPT_REGION_INFO,
+  OPT_REGION_GET,
   OPT_REGION_LIST,
   OPT_REGION_SET,
   OPT_REGION_DEFAULT,
-  OPT_REGIONMAP_SHOW,
+  OPT_REGIONMAP_GET,
   OPT_REGIONMAP_SET,
   OPT_REGIONMAP_UPDATE,
-  OPT_ZONE_INFO,
+  OPT_ZONE_GET,
   OPT_ZONE_SET,
   OPT_ZONE_LIST,
   OPT_CAPS_ADD,
@@ -349,8 +349,8 @@ static int get_cmd(const char *cmd, const char *prev_cmd, bool *need_more)
     if (strcmp(cmd, "stat") == 0)
       return OPT_OBJECT_STAT;
   } else if (strcmp(prev_cmd, "region") == 0) {
-    if (strcmp(cmd, "info") == 0)
-      return OPT_REGION_INFO;
+    if (strcmp(cmd, "get") == 0)
+      return OPT_REGION_GET;
     if (strcmp(cmd, "list") == 0)
       return OPT_REGION_LIST;
     if (strcmp(cmd, "set") == 0)
@@ -362,15 +362,15 @@ static int get_cmd(const char *cmd, const char *prev_cmd, bool *need_more)
       return OPT_REGION_LIST;
   } else if (strcmp(prev_cmd, "region-map") == 0 ||
              strcmp(prev_cmd, "regionmap") == 0) {
-    if (strcmp(cmd, "show") == 0)
-      return OPT_REGIONMAP_SHOW;
+    if (strcmp(cmd, "get") == 0)
+      return OPT_REGIONMAP_GET;
     if (strcmp(cmd, "set") == 0)
       return OPT_REGIONMAP_SET;
     if (strcmp(cmd, "update") == 0)
       return OPT_REGIONMAP_UPDATE;
   } else if (strcmp(prev_cmd, "zone") == 0) {
-    if (strcmp(cmd, "info") == 0)
-      return OPT_ZONE_INFO;
+    if (strcmp(cmd, "get") == 0)
+      return OPT_ZONE_GET;
     if (strcmp(cmd, "set") == 0)
       return OPT_ZONE_SET;
     if (strcmp(cmd, "list") == 0)
@@ -909,11 +909,11 @@ int main(int argc, char **argv)
 
   RGWStreamFlusher f(formatter, cout);
 
-  bool raw_storage_op = (opt_cmd == OPT_REGION_INFO || opt_cmd == OPT_REGION_LIST ||
+  bool raw_storage_op = (opt_cmd == OPT_REGION_GET || opt_cmd == OPT_REGION_LIST ||
                          opt_cmd == OPT_REGION_SET || opt_cmd == OPT_REGION_DEFAULT ||
-                         opt_cmd == OPT_REGIONMAP_SHOW || opt_cmd == OPT_REGIONMAP_SET ||
+                         opt_cmd == OPT_REGIONMAP_GET || opt_cmd == OPT_REGIONMAP_SET ||
                          opt_cmd == OPT_REGIONMAP_UPDATE ||
-                         opt_cmd == OPT_ZONE_INFO || opt_cmd == OPT_ZONE_SET ||
+                         opt_cmd == OPT_ZONE_GET || opt_cmd == OPT_ZONE_SET ||
                          opt_cmd == OPT_ZONE_LIST);
 
 
@@ -933,7 +933,7 @@ int main(int argc, char **argv)
   StoreDestructor store_destructor(store);
 
   if (raw_storage_op) {
-    if (opt_cmd == OPT_REGION_INFO) {
+    if (opt_cmd == OPT_REGION_GET) {
       RGWRegion region;
       int ret = region.init(g_ceph_context, store);
       if (ret < 0) {
@@ -1007,7 +1007,7 @@ int main(int argc, char **argv)
       }
     }
 
-    if (opt_cmd == OPT_REGIONMAP_SHOW) {
+    if (opt_cmd == OPT_REGIONMAP_GET) {
       RGWRegionMap regionmap;
       int ret = regionmap.read(g_ceph_context, store);
       if (ret < 0) {
@@ -1076,7 +1076,7 @@ int main(int argc, char **argv)
       formatter->flush(cout);
     }
 
-    if (opt_cmd == OPT_ZONE_INFO) {
+    if (opt_cmd == OPT_ZONE_GET) {
       RGWRegion region;
       int ret = region.init(g_ceph_context, store);
       if (ret < 0) {
index 7b755aec80b435be8c102e5e13ae4ac9ecf2b1c9..d263b22bafb9074c1a20f49729c3d22b672d3a4e 100644 (file)
     bucket check               check bucket index
     object rm                  remove object
     object unlink              unlink object from bucket index
-    region info                show region info
+    region get                 show region info
     regions list               list all regions set on this cluster
     region set                 set region info
     region default             set default region
-    region-map show            show region-map
+    region-map get             show region-map
     region-map set             set region-map
-    zone info                  show zone cluster params
+    zone get                   show zone cluster params
     zone set                   set zone cluster params
     zone list                  list all zones set on this cluster
     pool add                   add an existing pool for data placement