Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: obsolete 'radosgw-admin period prepare' command #11278

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 1 addition & 28 deletions src/rgw/rgw_admin.cc
Expand Up @@ -75,7 +75,6 @@ void _usage()
cout << " object rm remove object\n";
cout << " object unlink unlink object from bucket index\n";
cout << " objects expire run expired objects cleanup\n";
cout << " period prepare prepare a new period\n";
cout << " period delete delete a period\n";
cout << " period get get period info\n";
cout << " period get-current get current period info\n";
Expand Down Expand Up @@ -381,7 +380,6 @@ enum {
OPT_REALM_SET,
OPT_REALM_DEFAULT,
OPT_REALM_PULL,
OPT_PERIOD_PREPARE,
OPT_PERIOD_DELETE,
OPT_PERIOD_GET,
OPT_PERIOD_GET_CURRENT,
Expand Down Expand Up @@ -558,8 +556,6 @@ static int get_cmd(const char *cmd, const char *prev_cmd, const char *prev_prev_
if (strcmp(cmd, "list") == 0)
return OPT_BI_LIST;
} else if (strcmp(prev_cmd, "period") == 0) {
if (strcmp(cmd, "prepare") == 0)
return OPT_PERIOD_PREPARE;
if (strcmp(cmd, "delete") == 0)
return OPT_PERIOD_DELETE;
if (strcmp(cmd, "get") == 0)
Expand Down Expand Up @@ -2458,7 +2454,7 @@ int main(int argc, char **argv)
opt_cmd == OPT_ZONE_CREATE || opt_cmd == OPT_ZONE_DELETE ||
opt_cmd == OPT_ZONE_GET || opt_cmd == OPT_ZONE_SET || opt_cmd == OPT_ZONE_RENAME ||
opt_cmd == OPT_ZONE_LIST || opt_cmd == OPT_ZONE_MODIFY || opt_cmd == OPT_ZONE_DEFAULT ||
opt_cmd == OPT_REALM_CREATE || opt_cmd == OPT_PERIOD_PREPARE ||
opt_cmd == OPT_REALM_CREATE ||
opt_cmd == OPT_PERIOD_DELETE || opt_cmd == OPT_PERIOD_GET ||
opt_cmd == OPT_PERIOD_GET_CURRENT || opt_cmd == OPT_PERIOD_LIST ||
raw_period_update || raw_period_pull ||
Expand Down Expand Up @@ -2492,29 +2488,6 @@ int main(int argc, char **argv)

if (raw_storage_op) {
switch (opt_cmd) {
case OPT_PERIOD_PREPARE:
{
RGWRealm realm(realm_id, realm_name);
int ret = realm.init(g_ceph_context, store);
if (ret < 0) {
cerr << "could not init realm " << ": " << cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWPeriod period;
ret = period.init(g_ceph_context, store, realm.get_id(), realm.get_name(), false);
if (ret < 0) {
cerr << "failed to init period " << ": " << cpp_strerror(-ret) << std::endl;
return -ret;
}
ret = period.create();
if (ret < 0) {
cerr << "ERROR: couldn't create period " << ": " << cpp_strerror(-ret) << std::endl;
return -ret;
}
encode_json("period", period, formatter);
formatter->flush(cout);
}
break;
case OPT_PERIOD_DELETE:
{
if (period_id.empty()) {
Expand Down
1 change: 0 additions & 1 deletion src/test/cli/radosgw-admin/help.t
Expand Up @@ -26,7 +26,6 @@
object rm remove object
object unlink unlink object from bucket index
objects expire run expired objects cleanup
period prepare prepare a new period
period delete delete a period
period get get period info
period get-current get current period info
Expand Down