{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/30032825","id":30032825,"diff_hunk":"@@ -0,0 +1,385 @@\n+package node\n+\n+import (\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"io\"\n+\t\"reflect\"\n+\n+\t\"github.com/golang/glog\"\n+\t\"github.com/spf13/cobra\"\n+\n+\tkapi \"github.com/GoogleCloudPlatform/kubernetes/pkg/api\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/client\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/fields\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl\"\n+\tkcmdutil \"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/util\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/resource\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/labels\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime\"\n+\n+\t\"github.com/openshift/origin/pkg/cmd/util/clientcmd\"\n+)\n+\n+const ManageNodeCommandName = \"manage-node\"\n+\n+type NodeConfig struct {\n+\tCmdFactory *clientcmd.Factory\n+\tKclient    *client.Client\n+\tWriter     io.Writer\n+\n+\t// Supported operations\n+\tSchedulable bool\n+\tEvacuate    bool\n+\tListPods    bool\n+\n+\t// Optional arguments\n+\tSelector    string\n+\tPodSelector string\n+\tDryRun      bool\n+}\n+\n+const manageNodeLongDesc = `Manage node operations: schedulable, evacuate and list-pods.\n+\n+Examples:\n+\n+\t# Block the node accepting any new pods\n+\t$ %[1]s manage-node <mynode> --schedulable=false","path":"pkg/cmd/admin/node/node.go","position":48,"original_position":48,"commit_id":"8cda8092a449b38eabc9cec726484e3a1713ad8b","original_commit_id":"8cda8092a449b38eabc9cec726484e3a1713ad8b","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"don't forget to update this when you update the `fullName`","created_at":"2015-05-11T12:16:49Z","updated_at":"2015-05-11T12:16:49Z","html_url":"https://github.com/openshift/origin/pull/2151#discussion_r30032825","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/2151","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/30032825"},"html":{"href":"https://github.com/openshift/origin/pull/2151#discussion_r30032825"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/2151"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/2151","id":35052309,"html_url":"https://github.com/openshift/origin/pull/2151","diff_url":"https://github.com/openshift/origin/pull/2151.diff","patch_url":"https://github.com/openshift/origin/pull/2151.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/2151","number":2151,"state":"open","locked":false,"title":"OpenShift admin command to manage node operations","user":{"login":"pravisankar","id":1258630,"avatar_url":"https://avatars.githubusercontent.com/u/1258630?v=3","gravatar_id":"","url":"https://api.github.com/users/pravisankar","html_url":"https://github.com/pravisankar","followers_url":"https://api.github.com/users/pravisankar/followers","following_url":"https://api.github.com/users/pravisankar/following{/other_user}","gists_url":"https://api.github.com/users/pravisankar/gists{/gist_id}","starred_url":"https://api.github.com/users/pravisankar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravisankar/subscriptions","organizations_url":"https://api.github.com/users/pravisankar/orgs","repos_url":"https://api.github.com/users/pravisankar/repos","events_url":"https://api.github.com/users/pravisankar/events{/privacy}","received_events_url":"https://api.github.com/users/pravisankar/received_events","type":"User","site_admin":false},"body":"Supported node operations:\r\n  openshift admin manage-node <nodes>|--selector=<node-selector> --schedulable=<true|false>\r\n  openshift admin manage-node <nodes>|--selector=<node-selector> --list-pods [--pod-selector=<selector>]\r\n  openshift admin manage-node <nodes>|--selector=<node-selector> --evacuate [--dry-run] [--pod-selector=<selector>]","created_at":"2015-05-08T22:29:01Z","updated_at":"2015-05-11T12:16:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b10acae2ecced65186e13dca16e18957e2898384","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/2151/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/2151/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/2151/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/8cda8092a449b38eabc9cec726484e3a1713ad8b","head":{"label":"pravisankar:admin-manage-node","ref":"admin-manage-node","sha":"8cda8092a449b38eabc9cec726484e3a1713ad8b","user":{"login":"pravisankar","id":1258630,"avatar_url":"https://avatars.githubusercontent.com/u/1258630?v=3","gravatar_id":"","url":"https://api.github.com/users/pravisankar","html_url":"https://github.com/pravisankar","followers_url":"https://api.github.com/users/pravisankar/followers","following_url":"https://api.github.com/users/pravisankar/following{/other_user}","gists_url":"https://api.github.com/users/pravisankar/gists{/gist_id}","starred_url":"https://api.github.com/users/pravisankar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravisankar/subscriptions","organizations_url":"https://api.github.com/users/pravisankar/orgs","repos_url":"https://api.github.com/users/pravisankar/repos","events_url":"https://api.github.com/users/pravisankar/events{/privacy}","received_events_url":"https://api.github.com/users/pravisankar/received_events","type":"User","site_admin":false},"repo":{"id":26983891,"name":"origin","full_name":"pravisankar/origin","owner":{"login":"pravisankar","id":1258630,"avatar_url":"https://avatars.githubusercontent.com/u/1258630?v=3","gravatar_id":"","url":"https://api.github.com/users/pravisankar","html_url":"https://github.com/pravisankar","followers_url":"https://api.github.com/users/pravisankar/followers","following_url":"https://api.github.com/users/pravisankar/following{/other_user}","gists_url":"https://api.github.com/users/pravisankar/gists{/gist_id}","starred_url":"https://api.github.com/users/pravisankar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravisankar/subscriptions","organizations_url":"https://api.github.com/users/pravisankar/orgs","repos_url":"https://api.github.com/users/pravisankar/repos","events_url":"https://api.github.com/users/pravisankar/events{/privacy}","received_events_url":"https://api.github.com/users/pravisankar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pravisankar/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/pravisankar/origin","forks_url":"https://api.github.com/repos/pravisankar/origin/forks","keys_url":"https://api.github.com/repos/pravisankar/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pravisankar/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pravisankar/origin/teams","hooks_url":"https://api.github.com/repos/pravisankar/origin/hooks","issue_events_url":"https://api.github.com/repos/pravisankar/origin/issues/events{/number}","events_url":"https://api.github.com/repos/pravisankar/origin/events","assignees_url":"https://api.github.com/repos/pravisankar/origin/assignees{/user}","branches_url":"https://api.github.com/repos/pravisankar/origin/branches{/branch}","tags_url":"https://api.github.com/repos/pravisankar/origin/tags","blobs_url":"https://api.github.com/repos/pravisankar/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pravisankar/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pravisankar/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/pravisankar/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pravisankar/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/pravisankar/origin/languages","stargazers_url":"https://api.github.com/repos/pravisankar/origin/stargazers","contributors_url":"https://api.github.com/repos/pravisankar/origin/contributors","subscribers_url":"https://api.github.com/repos/pravisankar/origin/subscribers","subscription_url":"https://api.github.com/repos/pravisankar/origin/subscription","commits_url":"https://api.github.com/repos/pravisankar/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/pravisankar/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/pravisankar/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/pravisankar/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/pravisankar/origin/contents/{+path}","compare_url":"https://api.github.com/repos/pravisankar/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pravisankar/origin/merges","archive_url":"https://api.github.com/repos/pravisankar/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pravisankar/origin/downloads","issues_url":"https://api.github.com/repos/pravisankar/origin/issues{/number}","pulls_url":"https://api.github.com/repos/pravisankar/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/pravisankar/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/pravisankar/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pravisankar/origin/labels{/name}","releases_url":"https://api.github.com/repos/pravisankar/origin/releases{/id}","created_at":"2014-11-22T00:39:33Z","updated_at":"2015-05-07T19:59:40Z","pushed_at":"2015-05-08T22:27:48Z","git_url":"git://github.com/pravisankar/origin.git","ssh_url":"git@github.com:pravisankar/origin.git","clone_url":"https://github.com/pravisankar/origin.git","svn_url":"https://github.com/pravisankar/origin","homepage":"https://openshift.github.io","size":102269,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"5c75b4392a15924ef2bb542a785ddd61058afc7e","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-05-10T21:35:59Z","pushed_at":"2015-05-11T12:07:29Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":154722,"stargazers_count":418,"watchers_count":418,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":200,"mirror_url":null,"open_issues_count":247,"forks":200,"open_issues":247,"watchers":418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/2151"},"html":{"href":"https://github.com/openshift/origin/pull/2151"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/2151"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/2151/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/2151/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/2151/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/8cda8092a449b38eabc9cec726484e3a1713ad8b"}}}}