{"action":"opened","number":793,"pull_request":{"url":"https://api.github.com/repos/basho/riak_core/pulls/793","id":49984241,"html_url":"https://github.com/basho/riak_core/pull/793","diff_url":"https://github.com/basho/riak_core/pull/793.diff","patch_url":"https://github.com/basho/riak_core/pull/793.patch","issue_url":"https://api.github.com/repos/basho/riak_core/issues/793","number":793,"state":"open","locked":false,"title":"Push more `riak-admin` commands through `clique`","user":{"login":"sanmiguel","id":2122822,"avatar_url":"https://avatars.githubusercontent.com/u/2122822?v=3","gravatar_id":"","url":"https://api.github.com/users/sanmiguel","html_url":"https://github.com/sanmiguel","followers_url":"https://api.github.com/users/sanmiguel/followers","following_url":"https://api.github.com/users/sanmiguel/following{/other_user}","gists_url":"https://api.github.com/users/sanmiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/sanmiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanmiguel/subscriptions","organizations_url":"https://api.github.com/users/sanmiguel/orgs","repos_url":"https://api.github.com/users/sanmiguel/repos","events_url":"https://api.github.com/users/sanmiguel/events{/privacy}","received_events_url":"https://api.github.com/users/sanmiguel/received_events","type":"User","site_admin":false},"body":"There are still commands that do not go via `clique` but I want to checkpoint this now before I go further.\r\n\r\nNB: This will require a corresponding PR in riak to update the `riak-admin` script.\r\n\r\nCommands now available via clique:\r\n  - `riak-admin member-status`\r\n  - `riak-admin security *`\r\n\r\n`riak-admin member-status` is largely a duplicate of `riak-admin cluster status` with the addition of node-counts by status ('Joining', 'Valid' etc).\r\n\r\nI've gone a little further than in refactoring than originally intended for `riak-admin security` commands: I found it annoying to have to add usage in one place, command spec in another and remember to update the base usage string for each sub-command. To tackle this, command spec and usage are now in one (or more, see `riak_core_security_cli:grant_*`) function. Usage is split into 2 parts: structured usage; and description. This way, we simply gather all structured usage lines to build the overall base usage. No repetition, no having to cross-check in completely different parts of the file.\r\n\r\nI'm still not 100% sold that this is a sufficiently objective improvement but subjectively it feels better IMHO.\r\n\r\nAside from this, because we've now separated the code to print the output from the code to structure it, the tests can now actually verify what would get displayed rather than simply assert that no exceptions are thrown.\r\n\r\n@cuyler @nickelization : Gents, I welcome any and all comments, suggestions and criticisms either here or in person next week!\r\n\r\n","created_at":"2015-11-06T17:54:18Z","updated_at":"2015-11-06T17:54:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/basho/riak_core/pulls/793/commits","review_comments_url":"https://api.github.com/repos/basho/riak_core/pulls/793/comments","review_comment_url":"https://api.github.com/repos/basho/riak_core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/basho/riak_core/issues/793/comments","statuses_url":"https://api.github.com/repos/basho/riak_core/statuses/90b878e64410e61557119a3712473ab75a690621","head":{"label":"sanmiguel:mtc-riak-admin-use-moar-clique","ref":"mtc-riak-admin-use-moar-clique","sha":"90b878e64410e61557119a3712473ab75a690621","user":{"login":"sanmiguel","id":2122822,"avatar_url":"https://avatars.githubusercontent.com/u/2122822?v=3","gravatar_id":"","url":"https://api.github.com/users/sanmiguel","html_url":"https://github.com/sanmiguel","followers_url":"https://api.github.com/users/sanmiguel/followers","following_url":"https://api.github.com/users/sanmiguel/following{/other_user}","gists_url":"https://api.github.com/users/sanmiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/sanmiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanmiguel/subscriptions","organizations_url":"https://api.github.com/users/sanmiguel/orgs","repos_url":"https://api.github.com/users/sanmiguel/repos","events_url":"https://api.github.com/users/sanmiguel/events{/privacy}","received_events_url":"https://api.github.com/users/sanmiguel/received_events","type":"User","site_admin":false},"repo":{"id":44322832,"name":"riak_core","full_name":"sanmiguel/riak_core","owner":{"login":"sanmiguel","id":2122822,"avatar_url":"https://avatars.githubusercontent.com/u/2122822?v=3","gravatar_id":"","url":"https://api.github.com/users/sanmiguel","html_url":"https://github.com/sanmiguel","followers_url":"https://api.github.com/users/sanmiguel/followers","following_url":"https://api.github.com/users/sanmiguel/following{/other_user}","gists_url":"https://api.github.com/users/sanmiguel/gists{/gist_id}","starred_url":"https://api.github.com/users/sanmiguel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanmiguel/subscriptions","organizations_url":"https://api.github.com/users/sanmiguel/orgs","repos_url":"https://api.github.com/users/sanmiguel/repos","events_url":"https://api.github.com/users/sanmiguel/events{/privacy}","received_events_url":"https://api.github.com/users/sanmiguel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sanmiguel/riak_core","description":"Distributed systems infrastructure used by Riak.","fork":true,"url":"https://api.github.com/repos/sanmiguel/riak_core","forks_url":"https://api.github.com/repos/sanmiguel/riak_core/forks","keys_url":"https://api.github.com/repos/sanmiguel/riak_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sanmiguel/riak_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sanmiguel/riak_core/teams","hooks_url":"https://api.github.com/repos/sanmiguel/riak_core/hooks","issue_events_url":"https://api.github.com/repos/sanmiguel/riak_core/issues/events{/number}","events_url":"https://api.github.com/repos/sanmiguel/riak_core/events","assignees_url":"https://api.github.com/repos/sanmiguel/riak_core/assignees{/user}","branches_url":"https://api.github.com/repos/sanmiguel/riak_core/branches{/branch}","tags_url":"https://api.github.com/repos/sanmiguel/riak_core/tags","blobs_url":"https://api.github.com/repos/sanmiguel/riak_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sanmiguel/riak_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sanmiguel/riak_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/sanmiguel/riak_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sanmiguel/riak_core/statuses/{sha}","languages_url":"https://api.github.com/repos/sanmiguel/riak_core/languages","stargazers_url":"https://api.github.com/repos/sanmiguel/riak_core/stargazers","contributors_url":"https://api.github.com/repos/sanmiguel/riak_core/contributors","subscribers_url":"https://api.github.com/repos/sanmiguel/riak_core/subscribers","subscription_url":"https://api.github.com/repos/sanmiguel/riak_core/subscription","commits_url":"https://api.github.com/repos/sanmiguel/riak_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/sanmiguel/riak_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/sanmiguel/riak_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/sanmiguel/riak_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/sanmiguel/riak_core/contents/{+path}","compare_url":"https://api.github.com/repos/sanmiguel/riak_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sanmiguel/riak_core/merges","archive_url":"https://api.github.com/repos/sanmiguel/riak_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sanmiguel/riak_core/downloads","issues_url":"https://api.github.com/repos/sanmiguel/riak_core/issues{/number}","pulls_url":"https://api.github.com/repos/sanmiguel/riak_core/pulls{/number}","milestones_url":"https://api.github.com/repos/sanmiguel/riak_core/milestones{/number}","notifications_url":"https://api.github.com/repos/sanmiguel/riak_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sanmiguel/riak_core/labels{/name}","releases_url":"https://api.github.com/repos/sanmiguel/riak_core/releases{/id}","created_at":"2015-10-15T14:24:14Z","updated_at":"2015-10-15T14:24:17Z","pushed_at":"2015-11-06T17:36:12Z","git_url":"git://github.com/sanmiguel/riak_core.git","ssh_url":"git@github.com:sanmiguel/riak_core.git","clone_url":"https://github.com/sanmiguel/riak_core.git","svn_url":"https://github.com/sanmiguel/riak_core","homepage":"","size":10631,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"basho:develop","ref":"develop","sha":"e86aaa62c80a3774ff7c3f74e71e54fa50c93663","user":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"repo":{"id":790938,"name":"riak_core","full_name":"basho/riak_core","owner":{"login":"basho","id":176293,"avatar_url":"https://avatars.githubusercontent.com/u/176293?v=3","gravatar_id":"","url":"https://api.github.com/users/basho","html_url":"https://github.com/basho","followers_url":"https://api.github.com/users/basho/followers","following_url":"https://api.github.com/users/basho/following{/other_user}","gists_url":"https://api.github.com/users/basho/gists{/gist_id}","starred_url":"https://api.github.com/users/basho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basho/subscriptions","organizations_url":"https://api.github.com/users/basho/orgs","repos_url":"https://api.github.com/users/basho/repos","events_url":"https://api.github.com/users/basho/events{/privacy}","received_events_url":"https://api.github.com/users/basho/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/basho/riak_core","description":"Distributed systems infrastructure used by Riak.","fork":false,"url":"https://api.github.com/repos/basho/riak_core","forks_url":"https://api.github.com/repos/basho/riak_core/forks","keys_url":"https://api.github.com/repos/basho/riak_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basho/riak_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basho/riak_core/teams","hooks_url":"https://api.github.com/repos/basho/riak_core/hooks","issue_events_url":"https://api.github.com/repos/basho/riak_core/issues/events{/number}","events_url":"https://api.github.com/repos/basho/riak_core/events","assignees_url":"https://api.github.com/repos/basho/riak_core/assignees{/user}","branches_url":"https://api.github.com/repos/basho/riak_core/branches{/branch}","tags_url":"https://api.github.com/repos/basho/riak_core/tags","blobs_url":"https://api.github.com/repos/basho/riak_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basho/riak_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basho/riak_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/basho/riak_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basho/riak_core/statuses/{sha}","languages_url":"https://api.github.com/repos/basho/riak_core/languages","stargazers_url":"https://api.github.com/repos/basho/riak_core/stargazers","contributors_url":"https://api.github.com/repos/basho/riak_core/contributors","subscribers_url":"https://api.github.com/repos/basho/riak_core/subscribers","subscription_url":"https://api.github.com/repos/basho/riak_core/subscription","commits_url":"https://api.github.com/repos/basho/riak_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/basho/riak_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/basho/riak_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/basho/riak_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/basho/riak_core/contents/{+path}","compare_url":"https://api.github.com/repos/basho/riak_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basho/riak_core/merges","archive_url":"https://api.github.com/repos/basho/riak_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basho/riak_core/downloads","issues_url":"https://api.github.com/repos/basho/riak_core/issues{/number}","pulls_url":"https://api.github.com/repos/basho/riak_core/pulls{/number}","milestones_url":"https://api.github.com/repos/basho/riak_core/milestones{/number}","notifications_url":"https://api.github.com/repos/basho/riak_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basho/riak_core/labels{/name}","releases_url":"https://api.github.com/repos/basho/riak_core/releases{/id}","created_at":"2010-07-22T14:11:49Z","updated_at":"2015-11-04T20:48:45Z","pushed_at":"2015-11-02T21:34:31Z","git_url":"git://github.com/basho/riak_core.git","ssh_url":"git@github.com:basho/riak_core.git","clone_url":"https://github.com/basho/riak_core.git","svn_url":"https://github.com/basho/riak_core","homepage":"","size":20706,"stargazers_count":604,"watchers_count":604,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":209,"mirror_url":null,"open_issues_count":98,"forks":209,"open_issues":98,"watchers":604,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/basho/riak_core/pulls/793"},"html":{"href":"https://github.com/basho/riak_core/pull/793"},"issue":{"href":"https://api.github.com/repos/basho/riak_core/issues/793"},"comments":{"href":"https://api.github.com/repos/basho/riak_core/issues/793/comments"},"review_comments":{"href":"https://api.github.com/repos/basho/riak_core/pulls/793/comments"},"review_comment":{"href":"https://api.github.com/repos/basho/riak_core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/basho/riak_core/pulls/793/commits"},"statuses":{"href":"https://api.github.com/repos/basho/riak_core/statuses/90b878e64410e61557119a3712473ab75a690621"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":49,"additions":953,"deletions":548,"changed_files":6}}