This breaks commands like
COMMAND("fs flag set name=flag_name,type=CephChoices,strings=enable_multiple "
"name=val,type=CephString", \
"Set a global CephFS flag", \
"fs", "rw", "cli,rest")
with only one option:
PUT fs/flag/set?flag_name=enable_multiple&val=true: 400
FAILURE: url http://localhost:5000/api/v0.1/fs/flag/set?flag_name=enable_multiple&val=true
expected 200, got 400
Response content: <html><body><table border=1><th>Possible commands:</th><th>Method</th><th>Description</th><tr><td>fs/flag/set?flag_name=enable_multiple&va
l=val(<string>)
</td><td>PUT</td><td>Set a global CephFS flag</td></tr>
</table></body></html>
...and I can't tell why it's there.
Signed-off-by: Sage Weil <sage@redhat.com>
# prefixes go in the URL path
if desc.t == CephPrefix:
url += '/' + desc.instance.prefix
- # CephChoices with 1 required string (not --) do too, unless
- # we've already started collecting params, in which case they
- # too are params
- elif (desc.t == CephChoices and
- len(desc.instance.strings) == 1 and
- desc.req and
- not str(desc.instance).startswith('--') and
- not params):
- url += '/' + str(desc.instance)
else:
# tell/<target> is a weird case; the URL includes what
# would everywhere else be a parameter