{"action":"created","comment":{"url":"https://api.github.com/repos/gluster/glusterd2/pulls/comments/174852199","pull_request_review_id":104282901,"id":174852199,"diff_hunk":"@@ -51,3 +52,33 @@ func txnPrepareDevice(c transaction.TxnCtx) error {\n \t}\n \treturn nil\n }\n+\n+func txnEditGroup(c transaction.TxnCtx) error {\n+\tvar peerID string\n+\tvar groupID string\n+\tvar req deviceapi.EditGroupReq\n+\tif err := c.Get(\"peerid\", peerID); err != nil {\n+\t\tc.Logger().WithError(err).Error(\"Failed transaction, cannot find peer-id\")\n+\t\treturn err\n+\t}\n+\tif err := c.Get(\"groupid\", groupID); err != nil {\n+\t\tc.Logger().WithError(err).Error(\"Failed transaction, cannot find group-id\")\n+\t\treturn err\n+\t}\n+\tif err := c.Get(\"req\", req); err != nil {\n+\t\tc.Logger().WithError(err).Error(\"Failed transaction, cannot find group details\")\n+\t\treturn err\n+\t}\n+\tpeerInfo, err := peer.GetPeer(peerID)\n+\tif err != nil {\n+\t\tc.Logger().WithError(err).WithField(\"peerid\", peerID).Error(\"Peer ID not found in store\")\n+\t\treturn err\n+\t}\n+\tpeerInfo.MetaData[\"_group\"] = req.Group\n+\terr = peer.AddOrUpdatePeer(peerInfo)\n+\tif err != nil {\n+\t\tc.Logger().WithError(err).WithField(\"peerid\", peerID).Error(\"Failed to update peer Info\")","path":"plugins/device/transaction.go","position":37,"original_position":37,"commit_id":"3caf951d5714374c0059cc51a33de81b187f5424","original_commit_id":"3caf951d5714374c0059cc51a33de81b187f5424","user":{"login":"aravindavk","id":338230,"avatar_url":"https://avatars3.githubusercontent.com/u/338230?v=4","gravatar_id":"","url":"https://api.github.com/users/aravindavk","html_url":"https://github.com/aravindavk","followers_url":"https://api.github.com/users/aravindavk/followers","following_url":"https://api.github.com/users/aravindavk/following{/other_user}","gists_url":"https://api.github.com/users/aravindavk/gists{/gist_id}","starred_url":"https://api.github.com/users/aravindavk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aravindavk/subscriptions","organizations_url":"https://api.github.com/users/aravindavk/orgs","repos_url":"https://api.github.com/users/aravindavk/repos","events_url":"https://api.github.com/users/aravindavk/events{/privacy}","received_events_url":"https://api.github.com/users/aravindavk/received_events","type":"User","site_admin":false},"body":"also add `WithField` groupID","created_at":"2018-03-15T16:45:13Z","updated_at":"2018-03-15T16:46:07Z","html_url":"https://github.com/gluster/glusterd2/pull/603#discussion_r174852199","pull_request_url":"https://api.github.com/repos/gluster/glusterd2/pulls/603","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gluster/glusterd2/pulls/comments/174852199"},"html":{"href":"https://github.com/gluster/glusterd2/pull/603#discussion_r174852199"},"pull_request":{"href":"https://api.github.com/repos/gluster/glusterd2/pulls/603"}}},"pull_request":{"url":"https://api.github.com/repos/gluster/glusterd2/pulls/603","id":175306769,"html_url":"https://github.com/gluster/glusterd2/pull/603","diff_url":"https://github.com/gluster/glusterd2/pull/603.diff","patch_url":"https://github.com/gluster/glusterd2/pull/603.patch","issue_url":"https://api.github.com/repos/gluster/glusterd2/issues/603","number":603,"state":"open","locked":false,"title":"Edit Group API","user":{"login":"rishubhjain","id":2301827,"avatar_url":"https://avatars3.githubusercontent.com/u/2301827?v=4","gravatar_id":"","url":"https://api.github.com/users/rishubhjain","html_url":"https://github.com/rishubhjain","followers_url":"https://api.github.com/users/rishubhjain/followers","following_url":"https://api.github.com/users/rishubhjain/following{/other_user}","gists_url":"https://api.github.com/users/rishubhjain/gists{/gist_id}","starred_url":"https://api.github.com/users/rishubhjain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rishubhjain/subscriptions","organizations_url":"https://api.github.com/users/rishubhjain/orgs","repos_url":"https://api.github.com/users/rishubhjain/repos","events_url":"https://api.github.com/users/rishubhjain/events{/privacy}","received_events_url":"https://api.github.com/users/rishubhjain/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-15T16:26:51Z","updated_at":"2018-03-15T16:46:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5238c1b8f315307bc9f73238091d8c9b2037c75","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gluster/glusterd2/pulls/603/commits","review_comments_url":"https://api.github.com/repos/gluster/glusterd2/pulls/603/comments","review_comment_url":"https://api.github.com/repos/gluster/glusterd2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gluster/glusterd2/issues/603/comments","statuses_url":"https://api.github.com/repos/gluster/glusterd2/statuses/3caf951d5714374c0059cc51a33de81b187f5424","head":{"label":"rishubhjain:group","ref":"group","sha":"3caf951d5714374c0059cc51a33de81b187f5424","user":{"login":"rishubhjain","id":2301827,"avatar_url":"https://avatars3.githubusercontent.com/u/2301827?v=4","gravatar_id":"","url":"https://api.github.com/users/rishubhjain","html_url":"https://github.com/rishubhjain","followers_url":"https://api.github.com/users/rishubhjain/followers","following_url":"https://api.github.com/users/rishubhjain/following{/other_user}","gists_url":"https://api.github.com/users/rishubhjain/gists{/gist_id}","starred_url":"https://api.github.com/users/rishubhjain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rishubhjain/subscriptions","organizations_url":"https://api.github.com/users/rishubhjain/orgs","repos_url":"https://api.github.com/users/rishubhjain/repos","events_url":"https://api.github.com/users/rishubhjain/events{/privacy}","received_events_url":"https://api.github.com/users/rishubhjain/received_events","type":"User","site_admin":false},"repo":{"id":109232839,"name":"glusterd2","full_name":"rishubhjain/glusterd2","owner":{"login":"rishubhjain","id":2301827,"avatar_url":"https://avatars3.githubusercontent.com/u/2301827?v=4","gravatar_id":"","url":"https://api.github.com/users/rishubhjain","html_url":"https://github.com/rishubhjain","followers_url":"https://api.github.com/users/rishubhjain/followers","following_url":"https://api.github.com/users/rishubhjain/following{/other_user}","gists_url":"https://api.github.com/users/rishubhjain/gists{/gist_id}","starred_url":"https://api.github.com/users/rishubhjain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rishubhjain/subscriptions","organizations_url":"https://api.github.com/users/rishubhjain/orgs","repos_url":"https://api.github.com/users/rishubhjain/repos","events_url":"https://api.github.com/users/rishubhjain/events{/privacy}","received_events_url":"https://api.github.com/users/rishubhjain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rishubhjain/glusterd2","description":"GlusterD-2.0 is the distributed management framework to be used for GlusterFS-4.0","fork":true,"url":"https://api.github.com/repos/rishubhjain/glusterd2","forks_url":"https://api.github.com/repos/rishubhjain/glusterd2/forks","keys_url":"https://api.github.com/repos/rishubhjain/glusterd2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rishubhjain/glusterd2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rishubhjain/glusterd2/teams","hooks_url":"https://api.github.com/repos/rishubhjain/glusterd2/hooks","issue_events_url":"https://api.github.com/repos/rishubhjain/glusterd2/issues/events{/number}","events_url":"https://api.github.com/repos/rishubhjain/glusterd2/events","assignees_url":"https://api.github.com/repos/rishubhjain/glusterd2/assignees{/user}","branches_url":"https://api.github.com/repos/rishubhjain/glusterd2/branches{/branch}","tags_url":"https://api.github.com/repos/rishubhjain/glusterd2/tags","blobs_url":"https://api.github.com/repos/rishubhjain/glusterd2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rishubhjain/glusterd2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rishubhjain/glusterd2/git/refs{/sha}","trees_url":"https://api.github.com/repos/rishubhjain/glusterd2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rishubhjain/glusterd2/statuses/{sha}","languages_url":"https://api.github.com/repos/rishubhjain/glusterd2/languages","stargazers_url":"https://api.github.com/repos/rishubhjain/glusterd2/stargazers","contributors_url":"https://api.github.com/repos/rishubhjain/glusterd2/contributors","subscribers_url":"https://api.github.com/repos/rishubhjain/glusterd2/subscribers","subscription_url":"https://api.github.com/repos/rishubhjain/glusterd2/subscription","commits_url":"https://api.github.com/repos/rishubhjain/glusterd2/commits{/sha}","git_commits_url":"https://api.github.com/repos/rishubhjain/glusterd2/git/commits{/sha}","comments_url":"https://api.github.com/repos/rishubhjain/glusterd2/comments{/number}","issue_comment_url":"https://api.github.com/repos/rishubhjain/glusterd2/issues/comments{/number}","contents_url":"https://api.github.com/repos/rishubhjain/glusterd2/contents/{+path}","compare_url":"https://api.github.com/repos/rishubhjain/glusterd2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rishubhjain/glusterd2/merges","archive_url":"https://api.github.com/repos/rishubhjain/glusterd2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rishubhjain/glusterd2/downloads","issues_url":"https://api.github.com/repos/rishubhjain/glusterd2/issues{/number}","pulls_url":"https://api.github.com/repos/rishubhjain/glusterd2/pulls{/number}","milestones_url":"https://api.github.com/repos/rishubhjain/glusterd2/milestones{/number}","notifications_url":"https://api.github.com/repos/rishubhjain/glusterd2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rishubhjain/glusterd2/labels{/name}","releases_url":"https://api.github.com/repos/rishubhjain/glusterd2/releases{/id}","deployments_url":"https://api.github.com/repos/rishubhjain/glusterd2/deployments","created_at":"2017-11-02T07:39:34Z","updated_at":"2017-11-02T07:39:36Z","pushed_at":"2018-03-15T16:26:13Z","git_url":"git://github.com/rishubhjain/glusterd2.git","ssh_url":"git@github.com:rishubhjain/glusterd2.git","clone_url":"https://github.com/rishubhjain/glusterd2.git","svn_url":"https://github.com/rishubhjain/glusterd2","homepage":"","size":5079,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gluster:master","ref":"master","sha":"f983ca3371dff7f84ab42d26d5b59f61bb64052c","user":{"login":"gluster","id":622644,"avatar_url":"https://avatars3.githubusercontent.com/u/622644?v=4","gravatar_id":"","url":"https://api.github.com/users/gluster","html_url":"https://github.com/gluster","followers_url":"https://api.github.com/users/gluster/followers","following_url":"https://api.github.com/users/gluster/following{/other_user}","gists_url":"https://api.github.com/users/gluster/gists{/gist_id}","starred_url":"https://api.github.com/users/gluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gluster/subscriptions","organizations_url":"https://api.github.com/users/gluster/orgs","repos_url":"https://api.github.com/users/gluster/repos","events_url":"https://api.github.com/users/gluster/events{/privacy}","received_events_url":"https://api.github.com/users/gluster/received_events","type":"Organization","site_admin":false},"repo":{"id":24369600,"name":"glusterd2","full_name":"gluster/glusterd2","owner":{"login":"gluster","id":622644,"avatar_url":"https://avatars3.githubusercontent.com/u/622644?v=4","gravatar_id":"","url":"https://api.github.com/users/gluster","html_url":"https://github.com/gluster","followers_url":"https://api.github.com/users/gluster/followers","following_url":"https://api.github.com/users/gluster/following{/other_user}","gists_url":"https://api.github.com/users/gluster/gists{/gist_id}","starred_url":"https://api.github.com/users/gluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gluster/subscriptions","organizations_url":"https://api.github.com/users/gluster/orgs","repos_url":"https://api.github.com/users/gluster/repos","events_url":"https://api.github.com/users/gluster/events{/privacy}","received_events_url":"https://api.github.com/users/gluster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gluster/glusterd2","description":"GlusterD-2.0 is the distributed management framework to be used for GlusterFS-4.0","fork":false,"url":"https://api.github.com/repos/gluster/glusterd2","forks_url":"https://api.github.com/repos/gluster/glusterd2/forks","keys_url":"https://api.github.com/repos/gluster/glusterd2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gluster/glusterd2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gluster/glusterd2/teams","hooks_url":"https://api.github.com/repos/gluster/glusterd2/hooks","issue_events_url":"https://api.github.com/repos/gluster/glusterd2/issues/events{/number}","events_url":"https://api.github.com/repos/gluster/glusterd2/events","assignees_url":"https://api.github.com/repos/gluster/glusterd2/assignees{/user}","branches_url":"https://api.github.com/repos/gluster/glusterd2/branches{/branch}","tags_url":"https://api.github.com/repos/gluster/glusterd2/tags","blobs_url":"https://api.github.com/repos/gluster/glusterd2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gluster/glusterd2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gluster/glusterd2/git/refs{/sha}","trees_url":"https://api.github.com/repos/gluster/glusterd2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gluster/glusterd2/statuses/{sha}","languages_url":"https://api.github.com/repos/gluster/glusterd2/languages","stargazers_url":"https://api.github.com/repos/gluster/glusterd2/stargazers","contributors_url":"https://api.github.com/repos/gluster/glusterd2/contributors","subscribers_url":"https://api.github.com/repos/gluster/glusterd2/subscribers","subscription_url":"https://api.github.com/repos/gluster/glusterd2/subscription","commits_url":"https://api.github.com/repos/gluster/glusterd2/commits{/sha}","git_commits_url":"https://api.github.com/repos/gluster/glusterd2/git/commits{/sha}","comments_url":"https://api.github.com/repos/gluster/glusterd2/comments{/number}","issue_comment_url":"https://api.github.com/repos/gluster/glusterd2/issues/comments{/number}","contents_url":"https://api.github.com/repos/gluster/glusterd2/contents/{+path}","compare_url":"https://api.github.com/repos/gluster/glusterd2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gluster/glusterd2/merges","archive_url":"https://api.github.com/repos/gluster/glusterd2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gluster/glusterd2/downloads","issues_url":"https://api.github.com/repos/gluster/glusterd2/issues{/number}","pulls_url":"https://api.github.com/repos/gluster/glusterd2/pulls{/number}","milestones_url":"https://api.github.com/repos/gluster/glusterd2/milestones{/number}","notifications_url":"https://api.github.com/repos/gluster/glusterd2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gluster/glusterd2/labels{/name}","releases_url":"https://api.github.com/repos/gluster/glusterd2/releases{/id}","deployments_url":"https://api.github.com/repos/gluster/glusterd2/deployments","created_at":"2014-09-23T12:02:13Z","updated_at":"2018-03-12T19:07:34Z","pushed_at":"2018-03-15T16:26:52Z","git_url":"git://github.com/gluster/glusterd2.git","ssh_url":"git@github.com:gluster/glusterd2.git","clone_url":"https://github.com/gluster/glusterd2.git","svn_url":"https://github.com/gluster/glusterd2","homepage":"","size":5087,"stargazers_count":66,"watchers_count":66,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":96,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":51,"open_issues":96,"watchers":66,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gluster/glusterd2/pulls/603"},"html":{"href":"https://github.com/gluster/glusterd2/pull/603"},"issue":{"href":"https://api.github.com/repos/gluster/glusterd2/issues/603"},"comments":{"href":"https://api.github.com/repos/gluster/glusterd2/issues/603/comments"},"review_comments":{"href":"https://api.github.com/repos/gluster/glusterd2/pulls/603/comments"},"review_comment":{"href":"https://api.github.com/repos/gluster/glusterd2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gluster/glusterd2/pulls/603/commits"},"statuses":{"href":"https://api.github.com/repos/gluster/glusterd2/statuses/3caf951d5714374c0059cc51a33de81b187f5424"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"aravindavk"}}