If you leave off the second part of the life expectancy interval, it means
"more than". e.g., Setting only the first time to today + one month would
mean "more than one month".
Signed-off-by: Sage Weil <sage@redhat.com>
ss << "unable to parse datetime '" << from_str << "'";
r = -EINVAL;
cmdctx->reply(r, ss);
- } else if (!to.parse(to_str)) {
+ } else if (to_str.size() && !to.parse(to_str)) {
ss << "unable to parse datetime '" << to_str << "'";
r = -EINVAL;
cmdctx->reply(r, ss);
"mgr", "r", "cli,rest")
COMMAND("device set-life-expectancy name=devid,type=CephString "\
"name=from,type=CephString "\
- "name=to,type=CephString",
+ "name=to,type=CephString,req=False",
"Set predicted device life expectancy",
"mgr", "rw", "cli,rest")
COMMAND("device rm-life-expectancy name=devid,type=CephString",