From: Greg Farnum Date: Wed, 10 Jul 2013 15:55:45 +0000 (-0700) Subject: rgw-admin: use 'get' instead of 'show' or info for geo stuff X-Git-Tag: v0.67-rc1~114^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2ea6c4cc70fa6736a66e49f42a1220d8a601166d;p=ceph.git rgw-admin: use 'get' instead of 'show' or info for geo stuff 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 --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 4f3d41530061..5a09887e8ccb 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -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) { diff --git a/src/test/cli/radosgw-admin/help.t b/src/test/cli/radosgw-admin/help.t index 7b755aec80b4..d263b22bafb9 100644 --- a/src/test/cli/radosgw-admin/help.t +++ b/src/test/cli/radosgw-admin/help.t @@ -23,13 +23,13 @@ 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