{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/crowbar-client/pulls/comments/153999908","pull_request_review_id":80093826,"id":153999908,"diff_hunk":"@@ -140,6 +150,29 @@ def payload_content\n               from_editor\n             end\n           end\n+\n+          def check_nodes(configuration)\n+            avaliable_nodes = JSON.parse(Request::Node::List.new({}).process)\n+            if avaliable_nodes[\"nodes\"].nil?\n+              say \"Internal error: Invalid node list provided\"\n+              raise\n+            end\n+\n+            avaliable_nodes = avaliable_nodes[\"nodes\"]\n+\n+            configuration[\"deployment\"].each do |service_name, service|\n+              next if service[\"elements\"].nil?\n+\n+              service[\"elements\"].each do |role, nodes|\n+                nodes.each do |node|\n+                  if avaliable_nodes.select { |item| item[\"name\"] == node }.empty?\n+                    say \"ERROR : Node #{node} is not available in the list of possible nodes, \"\\","path":"lib/crowbar/client/command/proposal/edit.rb","position":null,"original_position":54,"commit_id":"7d351ab9d5ae77fbd9b6929197d2c855eb51dd58","original_commit_id":"0995e8c35b0003b563e35957354dabebf6d68a3b","user":{"login":"ilausuch","id":11134265,"avatar_url":"https://avatars2.githubusercontent.com/u/11134265?v=4","gravatar_id":"","url":"https://api.github.com/users/ilausuch","html_url":"https://github.com/ilausuch","followers_url":"https://api.github.com/users/ilausuch/followers","following_url":"https://api.github.com/users/ilausuch/following{/other_user}","gists_url":"https://api.github.com/users/ilausuch/gists{/gist_id}","starred_url":"https://api.github.com/users/ilausuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilausuch/subscriptions","organizations_url":"https://api.github.com/users/ilausuch/orgs","repos_url":"https://api.github.com/users/ilausuch/repos","events_url":"https://api.github.com/users/ilausuch/events{/privacy}","received_events_url":"https://api.github.com/users/ilausuch/received_events","type":"User","site_admin":false},"body":"Thanks @skazi0. They was useful comments","created_at":"2017-11-30T07:15:13Z","updated_at":"2017-11-30T07:15:13Z","html_url":"https://github.com/crowbar/crowbar-client/pull/171#discussion_r153999908","pull_request_url":"https://api.github.com/repos/crowbar/crowbar-client/pulls/171","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-client/pulls/comments/153999908"},"html":{"href":"https://github.com/crowbar/crowbar-client/pull/171#discussion_r153999908"},"pull_request":{"href":"https://api.github.com/repos/crowbar/crowbar-client/pulls/171"}},"in_reply_to_id":153491707},"pull_request":{"url":"https://api.github.com/repos/crowbar/crowbar-client/pulls/171","id":153926814,"html_url":"https://github.com/crowbar/crowbar-client/pull/171","diff_url":"https://github.com/crowbar/crowbar-client/pull/171.diff","patch_url":"https://github.com/crowbar/crowbar-client/pull/171.patch","issue_url":"https://api.github.com/repos/crowbar/crowbar-client/issues/171","number":171,"state":"open","locked":false,"title":"Display invalid nodes when editing proposal","user":{"login":"ilausuch","id":11134265,"avatar_url":"https://avatars2.githubusercontent.com/u/11134265?v=4","gravatar_id":"","url":"https://api.github.com/users/ilausuch","html_url":"https://github.com/ilausuch","followers_url":"https://api.github.com/users/ilausuch/followers","following_url":"https://api.github.com/users/ilausuch/following{/other_user}","gists_url":"https://api.github.com/users/ilausuch/gists{/gist_id}","starred_url":"https://api.github.com/users/ilausuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilausuch/subscriptions","organizations_url":"https://api.github.com/users/ilausuch/orgs","repos_url":"https://api.github.com/users/ilausuch/repos","events_url":"https://api.github.com/users/ilausuch/events{/privacy}","received_events_url":"https://api.github.com/users/ilausuch/received_events","type":"User","site_admin":false},"body":"On crowbarctl proposal edit ... when you refer to non-existent\r\nnodes, you should get an error which lists all the problematic\r\nnodes.\r\n\r\nThis works with --file or --data options too.","created_at":"2017-11-21T15:47:26Z","updated_at":"2017-11-30T07:15:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e45a97c27432996ef1f8cee707c206c2b2665c43","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Itxaka","id":1447686,"avatar_url":"https://avatars3.githubusercontent.com/u/1447686?v=4","gravatar_id":"","url":"https://api.github.com/users/Itxaka","html_url":"https://github.com/Itxaka","followers_url":"https://api.github.com/users/Itxaka/followers","following_url":"https://api.github.com/users/Itxaka/following{/other_user}","gists_url":"https://api.github.com/users/Itxaka/gists{/gist_id}","starred_url":"https://api.github.com/users/Itxaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Itxaka/subscriptions","organizations_url":"https://api.github.com/users/Itxaka/orgs","repos_url":"https://api.github.com/users/Itxaka/repos","events_url":"https://api.github.com/users/Itxaka/events{/privacy}","received_events_url":"https://api.github.com/users/Itxaka/received_events","type":"User","site_admin":false},{"login":"vuntz","id":1758783,"avatar_url":"https://avatars3.githubusercontent.com/u/1758783?v=4","gravatar_id":"","url":"https://api.github.com/users/vuntz","html_url":"https://github.com/vuntz","followers_url":"https://api.github.com/users/vuntz/followers","following_url":"https://api.github.com/users/vuntz/following{/other_user}","gists_url":"https://api.github.com/users/vuntz/gists{/gist_id}","starred_url":"https://api.github.com/users/vuntz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuntz/subscriptions","organizations_url":"https://api.github.com/users/vuntz/orgs","repos_url":"https://api.github.com/users/vuntz/repos","events_url":"https://api.github.com/users/vuntz/events{/privacy}","received_events_url":"https://api.github.com/users/vuntz/received_events","type":"User","site_admin":false},{"login":"scottwulf","id":30256229,"avatar_url":"https://avatars2.githubusercontent.com/u/30256229?v=4","gravatar_id":"","url":"https://api.github.com/users/scottwulf","html_url":"https://github.com/scottwulf","followers_url":"https://api.github.com/users/scottwulf/followers","following_url":"https://api.github.com/users/scottwulf/following{/other_user}","gists_url":"https://api.github.com/users/scottwulf/gists{/gist_id}","starred_url":"https://api.github.com/users/scottwulf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottwulf/subscriptions","organizations_url":"https://api.github.com/users/scottwulf/orgs","repos_url":"https://api.github.com/users/scottwulf/repos","events_url":"https://api.github.com/users/scottwulf/events{/privacy}","received_events_url":"https://api.github.com/users/scottwulf/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/crowbar-client/pulls/171/commits","review_comments_url":"https://api.github.com/repos/crowbar/crowbar-client/pulls/171/comments","review_comment_url":"https://api.github.com/repos/crowbar/crowbar-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/crowbar-client/issues/171/comments","statuses_url":"https://api.github.com/repos/crowbar/crowbar-client/statuses/7d351ab9d5ae77fbd9b6929197d2c855eb51dd58","head":{"label":"ilausuch:display_invalid_nodes_when_editing_proposal","ref":"display_invalid_nodes_when_editing_proposal","sha":"7d351ab9d5ae77fbd9b6929197d2c855eb51dd58","user":{"login":"ilausuch","id":11134265,"avatar_url":"https://avatars2.githubusercontent.com/u/11134265?v=4","gravatar_id":"","url":"https://api.github.com/users/ilausuch","html_url":"https://github.com/ilausuch","followers_url":"https://api.github.com/users/ilausuch/followers","following_url":"https://api.github.com/users/ilausuch/following{/other_user}","gists_url":"https://api.github.com/users/ilausuch/gists{/gist_id}","starred_url":"https://api.github.com/users/ilausuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilausuch/subscriptions","organizations_url":"https://api.github.com/users/ilausuch/orgs","repos_url":"https://api.github.com/users/ilausuch/repos","events_url":"https://api.github.com/users/ilausuch/events{/privacy}","received_events_url":"https://api.github.com/users/ilausuch/received_events","type":"User","site_admin":false},"repo":{"id":111122511,"name":"crowbar-client","full_name":"ilausuch/crowbar-client","owner":{"login":"ilausuch","id":11134265,"avatar_url":"https://avatars2.githubusercontent.com/u/11134265?v=4","gravatar_id":"","url":"https://api.github.com/users/ilausuch","html_url":"https://github.com/ilausuch","followers_url":"https://api.github.com/users/ilausuch/followers","following_url":"https://api.github.com/users/ilausuch/following{/other_user}","gists_url":"https://api.github.com/users/ilausuch/gists{/gist_id}","starred_url":"https://api.github.com/users/ilausuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilausuch/subscriptions","organizations_url":"https://api.github.com/users/ilausuch/orgs","repos_url":"https://api.github.com/users/ilausuch/repos","events_url":"https://api.github.com/users/ilausuch/events{/privacy}","received_events_url":"https://api.github.com/users/ilausuch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ilausuch/crowbar-client","description":"Command line client for Crowbar","fork":true,"url":"https://api.github.com/repos/ilausuch/crowbar-client","forks_url":"https://api.github.com/repos/ilausuch/crowbar-client/forks","keys_url":"https://api.github.com/repos/ilausuch/crowbar-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ilausuch/crowbar-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ilausuch/crowbar-client/teams","hooks_url":"https://api.github.com/repos/ilausuch/crowbar-client/hooks","issue_events_url":"https://api.github.com/repos/ilausuch/crowbar-client/issues/events{/number}","events_url":"https://api.github.com/repos/ilausuch/crowbar-client/events","assignees_url":"https://api.github.com/repos/ilausuch/crowbar-client/assignees{/user}","branches_url":"https://api.github.com/repos/ilausuch/crowbar-client/branches{/branch}","tags_url":"https://api.github.com/repos/ilausuch/crowbar-client/tags","blobs_url":"https://api.github.com/repos/ilausuch/crowbar-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ilausuch/crowbar-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ilausuch/crowbar-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/ilausuch/crowbar-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ilausuch/crowbar-client/statuses/{sha}","languages_url":"https://api.github.com/repos/ilausuch/crowbar-client/languages","stargazers_url":"https://api.github.com/repos/ilausuch/crowbar-client/stargazers","contributors_url":"https://api.github.com/repos/ilausuch/crowbar-client/contributors","subscribers_url":"https://api.github.com/repos/ilausuch/crowbar-client/subscribers","subscription_url":"https://api.github.com/repos/ilausuch/crowbar-client/subscription","commits_url":"https://api.github.com/repos/ilausuch/crowbar-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/ilausuch/crowbar-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/ilausuch/crowbar-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/ilausuch/crowbar-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/ilausuch/crowbar-client/contents/{+path}","compare_url":"https://api.github.com/repos/ilausuch/crowbar-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ilausuch/crowbar-client/merges","archive_url":"https://api.github.com/repos/ilausuch/crowbar-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ilausuch/crowbar-client/downloads","issues_url":"https://api.github.com/repos/ilausuch/crowbar-client/issues{/number}","pulls_url":"https://api.github.com/repos/ilausuch/crowbar-client/pulls{/number}","milestones_url":"https://api.github.com/repos/ilausuch/crowbar-client/milestones{/number}","notifications_url":"https://api.github.com/repos/ilausuch/crowbar-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ilausuch/crowbar-client/labels{/name}","releases_url":"https://api.github.com/repos/ilausuch/crowbar-client/releases{/id}","deployments_url":"https://api.github.com/repos/ilausuch/crowbar-client/deployments","created_at":"2017-11-17T15:59:19Z","updated_at":"2017-11-17T15:59:21Z","pushed_at":"2017-11-30T07:12:22Z","git_url":"git://github.com/ilausuch/crowbar-client.git","ssh_url":"git@github.com:ilausuch/crowbar-client.git","clone_url":"https://github.com/ilausuch/crowbar-client.git","svn_url":"https://github.com/ilausuch/crowbar-client","homepage":"","size":615,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"crowbar:master","ref":"master","sha":"2d496290bc5d085fdf1b732a033c475827a8993c","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars2.githubusercontent.com/u/2910205?v=4","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":39223531,"name":"crowbar-client","full_name":"crowbar/crowbar-client","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars2.githubusercontent.com/u/2910205?v=4","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/crowbar-client","description":"Command line client for Crowbar","fork":false,"url":"https://api.github.com/repos/crowbar/crowbar-client","forks_url":"https://api.github.com/repos/crowbar/crowbar-client/forks","keys_url":"https://api.github.com/repos/crowbar/crowbar-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/crowbar-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/crowbar-client/teams","hooks_url":"https://api.github.com/repos/crowbar/crowbar-client/hooks","issue_events_url":"https://api.github.com/repos/crowbar/crowbar-client/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/crowbar-client/events","assignees_url":"https://api.github.com/repos/crowbar/crowbar-client/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/crowbar-client/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/crowbar-client/tags","blobs_url":"https://api.github.com/repos/crowbar/crowbar-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/crowbar-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/crowbar-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/crowbar-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/crowbar-client/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/crowbar-client/languages","stargazers_url":"https://api.github.com/repos/crowbar/crowbar-client/stargazers","contributors_url":"https://api.github.com/repos/crowbar/crowbar-client/contributors","subscribers_url":"https://api.github.com/repos/crowbar/crowbar-client/subscribers","subscription_url":"https://api.github.com/repos/crowbar/crowbar-client/subscription","commits_url":"https://api.github.com/repos/crowbar/crowbar-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/crowbar-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/crowbar-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/crowbar-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/crowbar-client/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/crowbar-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/crowbar-client/merges","archive_url":"https://api.github.com/repos/crowbar/crowbar-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/crowbar-client/downloads","issues_url":"https://api.github.com/repos/crowbar/crowbar-client/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/crowbar-client/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/crowbar-client/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/crowbar-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/crowbar-client/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/crowbar-client/releases{/id}","deployments_url":"https://api.github.com/repos/crowbar/crowbar-client/deployments","created_at":"2015-07-16T22:29:43Z","updated_at":"2017-05-22T11:24:58Z","pushed_at":"2017-11-30T07:12:23Z","git_url":"git://github.com/crowbar/crowbar-client.git","ssh_url":"git@github.com:crowbar/crowbar-client.git","clone_url":"https://github.com/crowbar/crowbar-client.git","svn_url":"https://github.com/crowbar/crowbar-client","homepage":"","size":613,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":23,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-client/pulls/171"},"html":{"href":"https://github.com/crowbar/crowbar-client/pull/171"},"issue":{"href":"https://api.github.com/repos/crowbar/crowbar-client/issues/171"},"comments":{"href":"https://api.github.com/repos/crowbar/crowbar-client/issues/171/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/crowbar-client/pulls/171/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/crowbar-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/crowbar-client/pulls/171/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/crowbar-client/statuses/7d351ab9d5ae77fbd9b6929197d2c855eb51dd58"}},"author_association":"NONE"}}
{"actor":{"display_login":"ilausuch"}}