{"action":"created","comment":{"url":"https://api.github.com/repos/cisco-sso/kdk/pulls/comments/216479842","pull_request_review_id":153971679,"id":216479842,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjQ3OTg0Mg==","diff_hunk":"@@ -0,0 +1,64 @@\n+// Copyright © 2018 Cisco Systems, Inc.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//     http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+package kdk\n+\n+import (\n+\t\"fmt\"\n+\n+\t\"github.com/Sirupsen/logrus\"\n+\t\"github.com/cisco-sso/kdk/pkg/prompt\"\n+\t\"github.com/docker/docker/api/types\"\n+)\n+\n+func Restart(cfg KdkEnvConfig, logger logrus.Entry) error {\n+\n+\tvar containerIds []string\n+\n+\tcontainers, err := cfg.DockerClient.ContainerList(cfg.Ctx, types.ContainerListOptions{})\n+\n+\tif err != nil {\n+\t\tlogger.WithField(\"error\", err).Fatal(\"Failed to list docker containers\")\n+\t}\n+\tfor _, container := range containers {","path":"pkg/kdk/restart.go","position":34,"original_position":34,"commit_id":"39c0bfe3cc8b38353e4e18220cd8f6802e1ed113","original_commit_id":"39c0bfe3cc8b38353e4e18220cd8f6802e1ed113","user":{"login":"dcwangmit01","id":1733071,"node_id":"MDQ6VXNlcjE3MzMwNzE=","avatar_url":"https://avatars0.githubusercontent.com/u/1733071?v=4","gravatar_id":"","url":"https://api.github.com/users/dcwangmit01","html_url":"https://github.com/dcwangmit01","followers_url":"https://api.github.com/users/dcwangmit01/followers","following_url":"https://api.github.com/users/dcwangmit01/following{/other_user}","gists_url":"https://api.github.com/users/dcwangmit01/gists{/gist_id}","starred_url":"https://api.github.com/users/dcwangmit01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcwangmit01/subscriptions","organizations_url":"https://api.github.com/users/dcwangmit01/orgs","repos_url":"https://api.github.com/users/dcwangmit01/repos","events_url":"https://api.github.com/users/dcwangmit01/events{/privacy}","received_events_url":"https://api.github.com/users/dcwangmit01/received_events","type":"User","site_admin":false},"body":"We should break this out into its own function.  I've seen this code before.","created_at":"2018-09-10T21:31:38Z","updated_at":"2018-09-10T21:31:38Z","html_url":"https://github.com/cisco-sso/kdk/pull/60#discussion_r216479842","pull_request_url":"https://api.github.com/repos/cisco-sso/kdk/pulls/60","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cisco-sso/kdk/pulls/comments/216479842"},"html":{"href":"https://github.com/cisco-sso/kdk/pull/60#discussion_r216479842"},"pull_request":{"href":"https://api.github.com/repos/cisco-sso/kdk/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/cisco-sso/kdk/pulls/60","id":214262935,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MjYyOTM1","html_url":"https://github.com/cisco-sso/kdk/pull/60","diff_url":"https://github.com/cisco-sso/kdk/pull/60.diff","patch_url":"https://github.com/cisco-sso/kdk/pull/60.patch","issue_url":"https://api.github.com/repos/cisco-sso/kdk/issues/60","number":60,"state":"open","locked":false,"title":"Adding restart implementation","user":{"login":"prabdeb","id":37529789,"node_id":"MDQ6VXNlcjM3NTI5Nzg5","avatar_url":"https://avatars0.githubusercontent.com/u/37529789?v=4","gravatar_id":"","url":"https://api.github.com/users/prabdeb","html_url":"https://github.com/prabdeb","followers_url":"https://api.github.com/users/prabdeb/followers","following_url":"https://api.github.com/users/prabdeb/following{/other_user}","gists_url":"https://api.github.com/users/prabdeb/gists{/gist_id}","starred_url":"https://api.github.com/users/prabdeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prabdeb/subscriptions","organizations_url":"https://api.github.com/users/prabdeb/orgs","repos_url":"https://api.github.com/users/prabdeb/repos","events_url":"https://api.github.com/users/prabdeb/events{/privacy}","received_events_url":"https://api.github.com/users/prabdeb/received_events","type":"User","site_admin":false},"body":"Adding restart implementation for `kdk restart` by using `DockerClient.ContainerRestart`","created_at":"2018-09-10T10:12:13Z","updated_at":"2018-09-10T21:31:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"633cecfb5f25cf0e3e601ede7f29d4f9837e3c3c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"darkyat","id":516887,"node_id":"MDQ6VXNlcjUxNjg4Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/516887?v=4","gravatar_id":"","url":"https://api.github.com/users/darkyat","html_url":"https://github.com/darkyat","followers_url":"https://api.github.com/users/darkyat/followers","following_url":"https://api.github.com/users/darkyat/following{/other_user}","gists_url":"https://api.github.com/users/darkyat/gists{/gist_id}","starred_url":"https://api.github.com/users/darkyat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkyat/subscriptions","organizations_url":"https://api.github.com/users/darkyat/orgs","repos_url":"https://api.github.com/users/darkyat/repos","events_url":"https://api.github.com/users/darkyat/events{/privacy}","received_events_url":"https://api.github.com/users/darkyat/received_events","type":"User","site_admin":false},{"login":"rtluckie","id":1850059,"node_id":"MDQ6VXNlcjE4NTAwNTk=","avatar_url":"https://avatars2.githubusercontent.com/u/1850059?v=4","gravatar_id":"","url":"https://api.github.com/users/rtluckie","html_url":"https://github.com/rtluckie","followers_url":"https://api.github.com/users/rtluckie/followers","following_url":"https://api.github.com/users/rtluckie/following{/other_user}","gists_url":"https://api.github.com/users/rtluckie/gists{/gist_id}","starred_url":"https://api.github.com/users/rtluckie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtluckie/subscriptions","organizations_url":"https://api.github.com/users/rtluckie/orgs","repos_url":"https://api.github.com/users/rtluckie/repos","events_url":"https://api.github.com/users/rtluckie/events{/privacy}","received_events_url":"https://api.github.com/users/rtluckie/received_events","type":"User","site_admin":false},{"login":"josdotso","id":13571670,"node_id":"MDQ6VXNlcjEzNTcxNjcw","avatar_url":"https://avatars3.githubusercontent.com/u/13571670?v=4","gravatar_id":"","url":"https://api.github.com/users/josdotso","html_url":"https://github.com/josdotso","followers_url":"https://api.github.com/users/josdotso/followers","following_url":"https://api.github.com/users/josdotso/following{/other_user}","gists_url":"https://api.github.com/users/josdotso/gists{/gist_id}","starred_url":"https://api.github.com/users/josdotso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josdotso/subscriptions","organizations_url":"https://api.github.com/users/josdotso/orgs","repos_url":"https://api.github.com/users/josdotso/repos","events_url":"https://api.github.com/users/josdotso/events{/privacy}","received_events_url":"https://api.github.com/users/josdotso/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cisco-sso/kdk/pulls/60/commits","review_comments_url":"https://api.github.com/repos/cisco-sso/kdk/pulls/60/comments","review_comment_url":"https://api.github.com/repos/cisco-sso/kdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cisco-sso/kdk/issues/60/comments","statuses_url":"https://api.github.com/repos/cisco-sso/kdk/statuses/39c0bfe3cc8b38353e4e18220cd8f6802e1ed113","head":{"label":"prabdeb:kdk_restart","ref":"kdk_restart","sha":"39c0bfe3cc8b38353e4e18220cd8f6802e1ed113","user":{"login":"prabdeb","id":37529789,"node_id":"MDQ6VXNlcjM3NTI5Nzg5","avatar_url":"https://avatars0.githubusercontent.com/u/37529789?v=4","gravatar_id":"","url":"https://api.github.com/users/prabdeb","html_url":"https://github.com/prabdeb","followers_url":"https://api.github.com/users/prabdeb/followers","following_url":"https://api.github.com/users/prabdeb/following{/other_user}","gists_url":"https://api.github.com/users/prabdeb/gists{/gist_id}","starred_url":"https://api.github.com/users/prabdeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prabdeb/subscriptions","organizations_url":"https://api.github.com/users/prabdeb/orgs","repos_url":"https://api.github.com/users/prabdeb/repos","events_url":"https://api.github.com/users/prabdeb/events{/privacy}","received_events_url":"https://api.github.com/users/prabdeb/received_events","type":"User","site_admin":false},"repo":{"id":140607201,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA2MDcyMDE=","name":"kdk","full_name":"prabdeb/kdk","owner":{"login":"prabdeb","id":37529789,"node_id":"MDQ6VXNlcjM3NTI5Nzg5","avatar_url":"https://avatars0.githubusercontent.com/u/37529789?v=4","gravatar_id":"","url":"https://api.github.com/users/prabdeb","html_url":"https://github.com/prabdeb","followers_url":"https://api.github.com/users/prabdeb/followers","following_url":"https://api.github.com/users/prabdeb/following{/other_user}","gists_url":"https://api.github.com/users/prabdeb/gists{/gist_id}","starred_url":"https://api.github.com/users/prabdeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prabdeb/subscriptions","organizations_url":"https://api.github.com/users/prabdeb/orgs","repos_url":"https://api.github.com/users/prabdeb/repos","events_url":"https://api.github.com/users/prabdeb/events{/privacy}","received_events_url":"https://api.github.com/users/prabdeb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prabdeb/kdk","description":"WIP: Dockerized Kubernetes Development Kit","fork":true,"url":"https://api.github.com/repos/prabdeb/kdk","forks_url":"https://api.github.com/repos/prabdeb/kdk/forks","keys_url":"https://api.github.com/repos/prabdeb/kdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prabdeb/kdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prabdeb/kdk/teams","hooks_url":"https://api.github.com/repos/prabdeb/kdk/hooks","issue_events_url":"https://api.github.com/repos/prabdeb/kdk/issues/events{/number}","events_url":"https://api.github.com/repos/prabdeb/kdk/events","assignees_url":"https://api.github.com/repos/prabdeb/kdk/assignees{/user}","branches_url":"https://api.github.com/repos/prabdeb/kdk/branches{/branch}","tags_url":"https://api.github.com/repos/prabdeb/kdk/tags","blobs_url":"https://api.github.com/repos/prabdeb/kdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prabdeb/kdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prabdeb/kdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/prabdeb/kdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prabdeb/kdk/statuses/{sha}","languages_url":"https://api.github.com/repos/prabdeb/kdk/languages","stargazers_url":"https://api.github.com/repos/prabdeb/kdk/stargazers","contributors_url":"https://api.github.com/repos/prabdeb/kdk/contributors","subscribers_url":"https://api.github.com/repos/prabdeb/kdk/subscribers","subscription_url":"https://api.github.com/repos/prabdeb/kdk/subscription","commits_url":"https://api.github.com/repos/prabdeb/kdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/prabdeb/kdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/prabdeb/kdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/prabdeb/kdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/prabdeb/kdk/contents/{+path}","compare_url":"https://api.github.com/repos/prabdeb/kdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prabdeb/kdk/merges","archive_url":"https://api.github.com/repos/prabdeb/kdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prabdeb/kdk/downloads","issues_url":"https://api.github.com/repos/prabdeb/kdk/issues{/number}","pulls_url":"https://api.github.com/repos/prabdeb/kdk/pulls{/number}","milestones_url":"https://api.github.com/repos/prabdeb/kdk/milestones{/number}","notifications_url":"https://api.github.com/repos/prabdeb/kdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prabdeb/kdk/labels{/name}","releases_url":"https://api.github.com/repos/prabdeb/kdk/releases{/id}","deployments_url":"https://api.github.com/repos/prabdeb/kdk/deployments","created_at":"2018-07-11T17:18:03Z","updated_at":"2018-09-10T07:47:58Z","pushed_at":"2018-09-10T10:02:24Z","git_url":"git://github.com/prabdeb/kdk.git","ssh_url":"git@github.com:prabdeb/kdk.git","clone_url":"https://github.com/prabdeb/kdk.git","svn_url":"https://github.com/prabdeb/kdk","homepage":"","size":160,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cisco-sso:master","ref":"master","sha":"597e27fffd9c06eeed1977201a1178368ae9305b","user":{"login":"cisco-sso","id":39065680,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MDY1Njgw","avatar_url":"https://avatars0.githubusercontent.com/u/39065680?v=4","gravatar_id":"","url":"https://api.github.com/users/cisco-sso","html_url":"https://github.com/cisco-sso","followers_url":"https://api.github.com/users/cisco-sso/followers","following_url":"https://api.github.com/users/cisco-sso/following{/other_user}","gists_url":"https://api.github.com/users/cisco-sso/gists{/gist_id}","starred_url":"https://api.github.com/users/cisco-sso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cisco-sso/subscriptions","organizations_url":"https://api.github.com/users/cisco-sso/orgs","repos_url":"https://api.github.com/users/cisco-sso/repos","events_url":"https://api.github.com/users/cisco-sso/events{/privacy}","received_events_url":"https://api.github.com/users/cisco-sso/received_events","type":"Organization","site_admin":false},"repo":{"id":137135977,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcxMzU5Nzc=","name":"kdk","full_name":"cisco-sso/kdk","owner":{"login":"cisco-sso","id":39065680,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MDY1Njgw","avatar_url":"https://avatars0.githubusercontent.com/u/39065680?v=4","gravatar_id":"","url":"https://api.github.com/users/cisco-sso","html_url":"https://github.com/cisco-sso","followers_url":"https://api.github.com/users/cisco-sso/followers","following_url":"https://api.github.com/users/cisco-sso/following{/other_user}","gists_url":"https://api.github.com/users/cisco-sso/gists{/gist_id}","starred_url":"https://api.github.com/users/cisco-sso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cisco-sso/subscriptions","organizations_url":"https://api.github.com/users/cisco-sso/orgs","repos_url":"https://api.github.com/users/cisco-sso/repos","events_url":"https://api.github.com/users/cisco-sso/events{/privacy}","received_events_url":"https://api.github.com/users/cisco-sso/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cisco-sso/kdk","description":"Kubernetes Development Kit (KDK)","fork":false,"url":"https://api.github.com/repos/cisco-sso/kdk","forks_url":"https://api.github.com/repos/cisco-sso/kdk/forks","keys_url":"https://api.github.com/repos/cisco-sso/kdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cisco-sso/kdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cisco-sso/kdk/teams","hooks_url":"https://api.github.com/repos/cisco-sso/kdk/hooks","issue_events_url":"https://api.github.com/repos/cisco-sso/kdk/issues/events{/number}","events_url":"https://api.github.com/repos/cisco-sso/kdk/events","assignees_url":"https://api.github.com/repos/cisco-sso/kdk/assignees{/user}","branches_url":"https://api.github.com/repos/cisco-sso/kdk/branches{/branch}","tags_url":"https://api.github.com/repos/cisco-sso/kdk/tags","blobs_url":"https://api.github.com/repos/cisco-sso/kdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cisco-sso/kdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cisco-sso/kdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/cisco-sso/kdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cisco-sso/kdk/statuses/{sha}","languages_url":"https://api.github.com/repos/cisco-sso/kdk/languages","stargazers_url":"https://api.github.com/repos/cisco-sso/kdk/stargazers","contributors_url":"https://api.github.com/repos/cisco-sso/kdk/contributors","subscribers_url":"https://api.github.com/repos/cisco-sso/kdk/subscribers","subscription_url":"https://api.github.com/repos/cisco-sso/kdk/subscription","commits_url":"https://api.github.com/repos/cisco-sso/kdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/cisco-sso/kdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/cisco-sso/kdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/cisco-sso/kdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/cisco-sso/kdk/contents/{+path}","compare_url":"https://api.github.com/repos/cisco-sso/kdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cisco-sso/kdk/merges","archive_url":"https://api.github.com/repos/cisco-sso/kdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cisco-sso/kdk/downloads","issues_url":"https://api.github.com/repos/cisco-sso/kdk/issues{/number}","pulls_url":"https://api.github.com/repos/cisco-sso/kdk/pulls{/number}","milestones_url":"https://api.github.com/repos/cisco-sso/kdk/milestones{/number}","notifications_url":"https://api.github.com/repos/cisco-sso/kdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cisco-sso/kdk/labels{/name}","releases_url":"https://api.github.com/repos/cisco-sso/kdk/releases{/id}","deployments_url":"https://api.github.com/repos/cisco-sso/kdk/deployments","created_at":"2018-06-12T22:51:56Z","updated_at":"2018-09-07T23:01:17Z","pushed_at":"2018-09-10T21:09:20Z","git_url":"git://github.com/cisco-sso/kdk.git","ssh_url":"git@github.com:cisco-sso/kdk.git","clone_url":"https://github.com/cisco-sso/kdk.git","svn_url":"https://github.com/cisco-sso/kdk","homepage":"","size":157,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":8,"open_issues":3,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cisco-sso/kdk/pulls/60"},"html":{"href":"https://github.com/cisco-sso/kdk/pull/60"},"issue":{"href":"https://api.github.com/repos/cisco-sso/kdk/issues/60"},"comments":{"href":"https://api.github.com/repos/cisco-sso/kdk/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/cisco-sso/kdk/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/cisco-sso/kdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cisco-sso/kdk/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/cisco-sso/kdk/statuses/39c0bfe3cc8b38353e4e18220cd8f6802e1ed113"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dcwangmit01"}}