+using namespace rgw_admin;
+
+static SimpleCmd::Commands all_cmds = {
+ { "user create", OPT::USER_CREATE },
+ { "user info", OPT::USER_INFO },
+ { "user modify", OPT::USER_MODIFY },
+ { "user rename", OPT::USER_RENAME },
+ { "user rm", OPT::USER_RM },
+ { "user suspend", OPT::USER_SUSPEND },
+ { "user enable", OPT::USER_ENABLE },
+ { "user check", OPT::USER_CHECK },
+ { "user stats", OPT::USER_STATS },
+ { "user list", OPT::USER_LIST },
+ { "subuser create", OPT::SUBUSER_CREATE },
+ { "subuser modify", OPT::SUBUSER_MODIFY },
+ { "subuser rm", OPT::SUBUSER_RM },
+ { "key create", OPT::KEY_CREATE },
+ { "key rm", OPT::KEY_RM },
+ { "buckets list", OPT::BUCKETS_LIST },
+ { "bucket list", OPT::BUCKETS_LIST },
+ { "bucket limit check", OPT::BUCKET_LIMIT_CHECK },
+ { "bucket link", OPT::BUCKET_LINK },
+ { "bucket unlink", OPT::BUCKET_UNLINK },
+ { "bucket stats", OPT::BUCKET_STATS },
+ { "bucket check", OPT::BUCKET_CHECK },
+ { "bucket sync info", OPT::BUCKET_SYNC_INFO },
+ { "bucket sync status", OPT::BUCKET_SYNC_STATUS },
+ { "bucket sync markers", OPT::BUCKET_SYNC_MARKERS },
+ { "bucket sync init", OPT::BUCKET_SYNC_INIT },
+ { "bucket sync run", OPT::BUCKET_SYNC_RUN },
+ { "bucket sync disable", OPT::BUCKET_SYNC_DISABLE },
+ { "bucket sync enable", OPT::BUCKET_SYNC_ENABLE },
+ { "bucket rm", OPT::BUCKET_RM },
+ { "bucket rewrite", OPT::BUCKET_REWRITE },
+ { "bucket reshard", OPT::BUCKET_RESHARD },
+ { "bucket chown", OPT::BUCKET_CHOWN },
+ { "bucket radoslist", OPT::BUCKET_RADOS_LIST },
+ { "bucket rados list", OPT::BUCKET_RADOS_LIST },
+ { "policy", OPT::POLICY },
+ { "pool add", OPT::POOL_ADD },
+ { "pool rm", OPT::POOL_RM },
+ { "pool list", OPT::POOLS_LIST },
+ { "pools list", OPT::POOLS_LIST },
+ { "log list", OPT::LOG_LIST },
+ { "log show", OPT::LOG_SHOW },
+ { "log rm", OPT::LOG_RM },
+ { "usage show", OPT::USAGE_SHOW },
+ { "usage trim", OPT::USAGE_TRIM },
+ { "usage clear", OPT::USAGE_CLEAR },
+ { "object put", OPT::OBJECT_PUT },
+ { "object rm", OPT::OBJECT_RM },
+ { "object unlink", OPT::OBJECT_UNLINK },
+ { "object stat", OPT::OBJECT_STAT },
+ { "object rewrite", OPT::OBJECT_REWRITE },
+ { "objects expire", OPT::OBJECTS_EXPIRE },
+ { "objects expire-stale list", OPT::OBJECTS_EXPIRE_STALE_LIST },
+ { "objects expire-stale rm", OPT::OBJECTS_EXPIRE_STALE_RM },
+ { "bi get", OPT::BI_GET },
+ { "bi put", OPT::BI_PUT },
+ { "bi list", OPT::BI_LIST },
+ { "bi purge", OPT::BI_PURGE },
+ { "olh get", OPT::OLH_GET },
+ { "olh readlog", OPT::OLH_READLOG },
+ { "quota set", OPT::QUOTA_SET },
+ { "quota enable", OPT::QUOTA_ENABLE },
+ { "quota disable", OPT::QUOTA_DISABLE },
+ { "gc list", OPT::GC_LIST },
+ { "gc process", OPT::GC_PROCESS },
+ { "lc list", OPT::LC_LIST },
+ { "lc get", OPT::LC_GET },
+ { "lc process", OPT::LC_PROCESS },
+ { "lc reshard fix", OPT::LC_RESHARD_FIX },
+ { "orphans find", OPT::ORPHANS_FIND },
+ { "orphans finish", OPT::ORPHANS_FINISH },
+ { "orphans list jobs", OPT::ORPHANS_LIST_JOBS },
+ { "orphans list-jobs", OPT::ORPHANS_LIST_JOBS },
+ { "zonegroup add", OPT::ZONEGROUP_ADD },
+ { "zonegroup create", OPT::ZONEGROUP_CREATE },
+ { "zonegroup default", OPT::ZONEGROUP_DEFAULT },
+ { "zonegroup delete", OPT::ZONEGROUP_DELETE },
+ { "zonegroup get", OPT::ZONEGROUP_GET },
+ { "zonegroup modify", OPT::ZONEGROUP_MODIFY },
+ { "zonegroup set", OPT::ZONEGROUP_SET },
+ { "zonegroup list", OPT::ZONEGROUP_LIST },
+ { "zonegroups list", OPT::ZONEGROUP_LIST },
+ { "zonegroup remove", OPT::ZONEGROUP_REMOVE },
+ { "zonegroup remove zone", OPT::ZONEGROUP_REMOVE },
+ { "zonegroup rename", OPT::ZONEGROUP_RENAME },
+ { "zonegroup placement add", OPT::ZONEGROUP_PLACEMENT_ADD },
+ { "zonegroup placement modify", OPT::ZONEGROUP_PLACEMENT_MODIFY },
+ { "zonegroup placement rm", OPT::ZONEGROUP_PLACEMENT_RM },
+ { "zonegroup placement list", OPT::ZONEGROUP_PLACEMENT_LIST },
+ { "zonegroup placement get", OPT::ZONEGROUP_PLACEMENT_GET },
+ { "zonegroup placement default", OPT::ZONEGROUP_PLACEMENT_DEFAULT },
+ { "zone create", OPT::ZONE_CREATE },
+ { "zone delete", OPT::ZONE_DELETE },
+ { "zone get", OPT::ZONE_GET },
+ { "zone modify", OPT::ZONE_MODIFY },
+ { "zone set", OPT::ZONE_SET },
+ { "zone list", OPT::ZONE_LIST },
+ { "zones list", OPT::ZONE_LIST },
+ { "zone rename", OPT::ZONE_RENAME },
+ { "zone default", OPT::ZONE_DEFAULT },
+ { "zone placement add", OPT::ZONE_PLACEMENT_ADD },
+ { "zone placement modify", OPT::ZONE_PLACEMENT_MODIFY },
+ { "zone placement rm", OPT::ZONE_PLACEMENT_RM },
+ { "zone placement list", OPT::ZONE_PLACEMENT_LIST },
+ { "zone placement get", OPT::ZONE_PLACEMENT_GET },
+ { "caps add", OPT::CAPS_ADD },
+ { "caps rm", OPT::CAPS_RM },
+ { "metadata get [*]", OPT::METADATA_GET },
+ { "metadata put [*]", OPT::METADATA_PUT },
+ { "metadata rm [*]", OPT::METADATA_RM },
+ { "metadata list [*]", OPT::METADATA_LIST },
+ { "metadata sync status", OPT::METADATA_SYNC_STATUS },
+ { "metadata sync init", OPT::METADATA_SYNC_INIT },
+ { "metadata sync run", OPT::METADATA_SYNC_RUN },
+ { "mdlog list", OPT::MDLOG_LIST },
+ { "mdlog autotrim", OPT::MDLOG_AUTOTRIM },
+ { "mdlog trim", OPT::MDLOG_TRIM },
+ { "mdlog fetch", OPT::MDLOG_FETCH },
+ { "mdlog status", OPT::MDLOG_STATUS },
+ { "sync error list", OPT::SYNC_ERROR_LIST },
+ { "sync error trim", OPT::SYNC_ERROR_TRIM },
+ { "sync policy get", OPT::SYNC_POLICY_GET },
+ { "sync group create", OPT::SYNC_GROUP_CREATE },
+ { "sync group modify", OPT::SYNC_GROUP_MODIFY },
+ { "sync group get", OPT::SYNC_GROUP_GET },
+ { "sync group remove", OPT::SYNC_GROUP_REMOVE },
+ { "sync group flow create", OPT::SYNC_GROUP_FLOW_CREATE },
+ { "sync group flow remove", OPT::SYNC_GROUP_FLOW_REMOVE },
+ { "sync group pipe create", OPT::SYNC_GROUP_PIPE_CREATE },
+ { "sync group pipe modify", OPT::SYNC_GROUP_PIPE_MODIFY },
+ { "sync group pipe remove", OPT::SYNC_GROUP_PIPE_REMOVE },
+ { "bilog list", OPT::BILOG_LIST },
+ { "bilog trim", OPT::BILOG_TRIM },
+ { "bilog status", OPT::BILOG_STATUS },
+ { "bilog autotrim", OPT::BILOG_AUTOTRIM },
+ { "data sync status", OPT::DATA_SYNC_STATUS },
+ { "data sync init", OPT::DATA_SYNC_INIT },
+ { "data sync run", OPT::DATA_SYNC_RUN },
+ { "datalog list", OPT::DATALOG_LIST },
+ { "datalog status", OPT::DATALOG_STATUS },
+ { "datalog autotrim", OPT::DATALOG_AUTOTRIM },
+ { "datalog trim", OPT::DATALOG_TRIM },
+ { "realm create", OPT::REALM_CREATE },
+ { "realm delete", OPT::REALM_DELETE },
+ { "realm get", OPT::REALM_GET },
+ { "realm get default", OPT::REALM_GET_DEFAULT },
+ { "realm get-default", OPT::REALM_GET_DEFAULT },
+ { "realm list", OPT::REALM_LIST },
+ { "realm list periods", OPT::REALM_LIST_PERIODS },
+ { "realm list-periods", OPT::REALM_LIST_PERIODS },
+ { "realm rename", OPT::REALM_RENAME },
+ { "realm set", OPT::REALM_SET },
+ { "realm default", OPT::REALM_DEFAULT },
+ { "realm pull", OPT::REALM_PULL },
+ { "period delete", OPT::PERIOD_DELETE },
+ { "period get", OPT::PERIOD_GET },
+ { "period get-current", OPT::PERIOD_GET_CURRENT },
+ { "period get current", OPT::PERIOD_GET_CURRENT },
+ { "period pull", OPT::PERIOD_PULL },
+ { "period push", OPT::PERIOD_PUSH },
+ { "period list", OPT::PERIOD_LIST },
+ { "period update", OPT::PERIOD_UPDATE },
+ { "period commit", OPT::PERIOD_COMMIT },
+ { "global quota get", OPT::GLOBAL_QUOTA_GET },
+ { "global quota set", OPT::GLOBAL_QUOTA_SET },
+ { "global quota enable", OPT::GLOBAL_QUOTA_ENABLE },
+ { "global quota disable", OPT::GLOBAL_QUOTA_DISABLE },
+ { "sync info", OPT::SYNC_INFO },
+ { "sync status", OPT::SYNC_STATUS },
+ { "role create", OPT::ROLE_CREATE },
+ { "role delete", OPT::ROLE_DELETE },
+ { "role get", OPT::ROLE_GET },
+ { "role modify", OPT::ROLE_MODIFY },
+ { "role list", OPT::ROLE_LIST },
+ { "role policy put", OPT::ROLE_POLICY_PUT },
+ { "role-policy put", OPT::ROLE_POLICY_PUT },
+ { "role policy list", OPT::ROLE_POLICY_LIST },
+ { "role-policy list", OPT::ROLE_POLICY_LIST },
+ { "role policy get", OPT::ROLE_POLICY_GET },
+ { "role-policy get", OPT::ROLE_POLICY_GET },
+ { "role policy delete", OPT::ROLE_POLICY_DELETE },
+ { "role-policy delete", OPT::ROLE_POLICY_DELETE },
+ { "reshard bucket", OPT::BUCKET_RESHARD },
+ { "reshard add", OPT::RESHARD_ADD },
+ { "reshard list", OPT::RESHARD_LIST },
+ { "reshard status", OPT::RESHARD_STATUS },
+ { "reshard process", OPT::RESHARD_PROCESS },
+ { "reshard cancel", OPT::RESHARD_CANCEL },
+ { "mfa create", OPT::MFA_CREATE },
+ { "mfa remove", OPT::MFA_REMOVE },
+ { "mfa get", OPT::MFA_GET },
+ { "mfa list", OPT::MFA_LIST },
+ { "mfa check", OPT::MFA_CHECK },
+ { "mfa resync", OPT::MFA_RESYNC },
+ { "reshard stale-instances list", OPT::RESHARD_STALE_INSTANCES_LIST },
+ { "reshard stale list", OPT::RESHARD_STALE_INSTANCES_LIST },
+ { "reshard stale-instances delete", OPT::RESHARD_STALE_INSTANCES_DELETE },
+ { "reshard stale delete", OPT::RESHARD_STALE_INSTANCES_DELETE },
+ { "pubsub topics list", OPT::PUBSUB_TOPICS_LIST },
+ { "pubsub topic create", OPT::PUBSUB_TOPIC_CREATE },
+ { "pubsub topic get", OPT::PUBSUB_TOPIC_GET },
+ { "pubsub topic rm", OPT::PUBSUB_TOPIC_RM },
+ { "pubsub notification create", OPT::PUBSUB_NOTIFICATION_CREATE },
+ { "pubsub notification rm", OPT::PUBSUB_NOTIFICATION_RM },
+ { "pubsub sub get", OPT::PUBSUB_SUB_GET },
+ { "pubsub sub create", OPT::PUBSUB_SUB_CREATE },
+ { "pubsub sub rm", OPT::PUBSUB_SUB_RM },
+ { "pubsub sub pull", OPT::PUBSUB_SUB_PULL },
+ { "pubsub event rm", OPT::PUBSUB_EVENT_RM },
+};
+
+static SimpleCmd::Aliases cmd_aliases = {
+ { "delete", "del" },
+ { "remove", "rm" },
+ { "rename", "mv" },
+};
+
+
+