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

mgr/restful: A couple of restful fixes #18649

Merged
merged 4 commits into from Nov 29, 2017
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
2 changes: 2 additions & 0 deletions qa/workunits/rest/test_mgr_rest_api.py
Expand Up @@ -72,6 +72,8 @@
('get', '/request?page=0', {}),
('delete', '/request', {}),
('get', '/request', {}),
('patch', '/pool/1', {'pg_num': 128}),
('patch', '/pool/1', {'pgp_num': 128}),
]

for method, endpoint, args in screenplay:
Expand Down
3 changes: 2 additions & 1 deletion src/pybind/mgr/restful/common.py
Expand Up @@ -12,7 +12,7 @@
# Valid values for the 'var' argument to 'ceph osd pool set'
POOL_PROPERTIES_1 = [
'size', 'min_size', 'pg_num',
'crush_rule', 'hashpspool',
'crush_rule', 'hashpspool', 'auid',
]

POOL_PROPERTIES_2 = [
Expand Down Expand Up @@ -86,6 +86,7 @@ def pool_update_commands(pool_name, args):
'prefix': 'osd pool set',
'pool': pool_name,
'var': var,
'val': args[var],
})

return commands
Expand Down
9 changes: 4 additions & 5 deletions src/pybind/mgr/restful/module.py
Expand Up @@ -176,11 +176,10 @@ def __json__(self):
self.finished
),
'waiting': map(
lambda x: {
'command': x.command,
'outs': x.outs,
'outb': x.outb,
},
lambda x: map(
lambda y: common.humanify_command(y),
x
),
self.waiting
),
'failed': map(
Expand Down