{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph/pulls/comments/110890720","pull_request_review_id":32093473,"id":110890720,"diff_hunk":"@@ -0,0 +1,176 @@\n+# List of valid osd flags\n+OSD_FLAGS = [\n+    'pause', 'noup', 'nodown', 'noout', 'noin', 'nobackfill',\n+    'norecover', 'noscrub', 'nodeep-scrub',\n+]\n+\n+# Implemented osd commands\n+OSD_IMPLEMENTED_COMMANDS = [\n+    'scrub', 'deep_scrub', 'repair'\n+]\n+\n+# Valid values for the 'var' argument to 'ceph osd pool set'\n+POOL_PROPERTIES_1 = [\n+    'size', 'min_size', 'crash_replay_interval', 'pg_num',\n+    'crush_ruleset', 'hashpspool',\n+]\n+\n+POOL_PROPERTIES_2 = [\n+    'pgp_num'\n+]\n+\n+POOL_PROPERTIES = POOL_PROPERTIES_1 + POOL_PROPERTIES_2\n+\n+# Valid values for the 'ceph osd pool set-quota' command\n+POOL_QUOTA_PROPERTIES = [\n+    ('quota_max_bytes', 'max_bytes'),\n+    ('quota_max_objects', 'max_objects'),\n+]\n+\n+POOL_ARGS = POOL_PROPERTIES + map(\n+    lambda x: x[0],\n+    POOL_QUOTA_PROPERTIES\n+)\n+\n+\n+# Transform command to a human readable form\n+def HUMANIFY_COMMAND(command):","path":"src/pybind/mgr/coleoid/common.py","position":37,"original_position":37,"commit_id":"c2650d1fb027bdf7eb652b54b6a513217fd7f18a","original_commit_id":"c2650d1fb027bdf7eb652b54b6a513217fd7f18a","user":{"login":"jcsp","id":944640,"avatar_url":"https://avatars0.githubusercontent.com/u/944640?v=3","gravatar_id":"","url":"https://api.github.com/users/jcsp","html_url":"https://github.com/jcsp","followers_url":"https://api.github.com/users/jcsp/followers","following_url":"https://api.github.com/users/jcsp/following{/other_user}","gists_url":"https://api.github.com/users/jcsp/gists{/gist_id}","starred_url":"https://api.github.com/users/jcsp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcsp/subscriptions","organizations_url":"https://api.github.com/users/jcsp/orgs","repos_url":"https://api.github.com/users/jcsp/repos","events_url":"https://api.github.com/users/jcsp/events{/privacy}","received_events_url":"https://api.github.com/users/jcsp/received_events","type":"User","site_admin":false},"body":"Function names should be lower_case","created_at":"2017-04-11T12:39:57Z","updated_at":"2017-04-11T12:39:57Z","html_url":"https://github.com/ceph/ceph/pull/14457#discussion_r110890720","pull_request_url":"https://api.github.com/repos/ceph/ceph/pulls/14457","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments/110890720"},"html":{"href":"https://github.com/ceph/ceph/pull/14457#discussion_r110890720"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph/pulls/14457"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph/pulls/14457","id":115305240,"html_url":"https://github.com/ceph/ceph/pull/14457","diff_url":"https://github.com/ceph/ceph/pull/14457.diff","patch_url":"https://github.com/ceph/ceph/pull/14457.patch","issue_url":"https://api.github.com/repos/ceph/ceph/issues/14457","number":14457,"state":"open","locked":false,"title":"[DNM] ceph-mgr: Implement new Flask-based rest api","user":{"login":"b-ranto","id":8439091,"avatar_url":"https://avatars1.githubusercontent.com/u/8439091?v=3","gravatar_id":"","url":"https://api.github.com/users/b-ranto","html_url":"https://github.com/b-ranto","followers_url":"https://api.github.com/users/b-ranto/followers","following_url":"https://api.github.com/users/b-ranto/following{/other_user}","gists_url":"https://api.github.com/users/b-ranto/gists{/gist_id}","starred_url":"https://api.github.com/users/b-ranto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b-ranto/subscriptions","organizations_url":"https://api.github.com/users/b-ranto/orgs","repos_url":"https://api.github.com/users/b-ranto/repos","events_url":"https://api.github.com/users/b-ranto/events{/privacy}","received_events_url":"https://api.github.com/users/b-ranto/received_events","type":"User","site_admin":false},"body":"The new rest API uses Flask with flask-restful extension and simplifies\r\nthe code significantly. It should be mostly equivalent in functionality\r\nto the django-based rest API.\r\n\r\nThe new API uses Ceph auth system (requires caps mon allow *) and is\r\nself-documenting via /doc endpoint.\r\n\r\nSigned-off-by: Boris Ranto <branto@redhat.com>","created_at":"2017-04-11T12:10:39Z","updated_at":"2017-04-11T12:39:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ee15eefd1f92dfc3eb01697b196affa530e6213","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph/pulls/14457/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph/pulls/14457/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph/issues/14457/comments","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/c2650d1fb027bdf7eb652b54b6a513217fd7f18a","head":{"label":"ceph:wip-rest-flask","ref":"wip-rest-flask","sha":"c2650d1fb027bdf7eb652b54b6a513217fd7f18a","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars0.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2310495,"name":"ceph","full_name":"ceph/ceph","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars0.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":false,"url":"https://api.github.com/repos/ceph/ceph","forks_url":"https://api.github.com/repos/ceph/ceph/forks","keys_url":"https://api.github.com/repos/ceph/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph/teams","hooks_url":"https://api.github.com/repos/ceph/ceph/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph/events","assignees_url":"https://api.github.com/repos/ceph/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph/tags","blobs_url":"https://api.github.com/repos/ceph/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph/subscription","commits_url":"https://api.github.com/repos/ceph/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph/merges","archive_url":"https://api.github.com/repos/ceph/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph/downloads","issues_url":"https://api.github.com/repos/ceph/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/ceph/ceph/deployments","created_at":"2011-09-01T21:41:26Z","updated_at":"2017-04-11T12:01:17Z","pushed_at":"2017-04-11T12:13:01Z","git_url":"git://github.com/ceph/ceph.git","ssh_url":"git@github.com:ceph/ceph.git","clone_url":"https://github.com/ceph/ceph.git","svn_url":"https://github.com/ceph/ceph","homepage":"http://ceph.com","size":201940,"stargazers_count":3096,"watchers_count":3096,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1822,"mirror_url":null,"open_issues_count":550,"forks":1822,"open_issues":550,"watchers":3096,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"ca1a132d5abf530ce303a095c08fb3c9afb6c1bd","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars0.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2310495,"name":"ceph","full_name":"ceph/ceph","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars0.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph","description":"Ceph is a distributed object, block, and file storage platform ","fork":false,"url":"https://api.github.com/repos/ceph/ceph","forks_url":"https://api.github.com/repos/ceph/ceph/forks","keys_url":"https://api.github.com/repos/ceph/ceph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph/teams","hooks_url":"https://api.github.com/repos/ceph/ceph/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph/events","assignees_url":"https://api.github.com/repos/ceph/ceph/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph/tags","blobs_url":"https://api.github.com/repos/ceph/ceph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph/subscription","commits_url":"https://api.github.com/repos/ceph/ceph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph/merges","archive_url":"https://api.github.com/repos/ceph/ceph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph/downloads","issues_url":"https://api.github.com/repos/ceph/ceph/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph/releases{/id}","deployments_url":"https://api.github.com/repos/ceph/ceph/deployments","created_at":"2011-09-01T21:41:26Z","updated_at":"2017-04-11T12:01:17Z","pushed_at":"2017-04-11T12:13:01Z","git_url":"git://github.com/ceph/ceph.git","ssh_url":"git@github.com:ceph/ceph.git","clone_url":"https://github.com/ceph/ceph.git","svn_url":"https://github.com/ceph/ceph","homepage":"http://ceph.com","size":201940,"stargazers_count":3096,"watchers_count":3096,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1822,"mirror_url":null,"open_issues_count":550,"forks":1822,"open_issues":550,"watchers":3096,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph/pulls/14457"},"html":{"href":"https://github.com/ceph/ceph/pull/14457"},"issue":{"href":"https://api.github.com/repos/ceph/ceph/issues/14457"},"comments":{"href":"https://api.github.com/repos/ceph/ceph/issues/14457/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph/pulls/14457/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph/pulls/14457/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph/statuses/c2650d1fb027bdf7eb652b54b6a513217fd7f18a"}}}}
{"actor":{"display_login":"jcsp"}}