{"action":"created","comment":{"url":"https://api.github.com/repos/ansible/ansible/pulls/comments/210255238","pull_request_review_id":146429203,"id":210255238,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDI1NTIzOA==","diff_hunk":"@@ -184,6 +185,8 @@\n \n from ansible.module_utils.basic import AnsibleModule\n from ansible.module_utils.cloudstack import AnsibleCloudStack, cs_argument_spec\n+from collections import defaultdict","path":"lib/ansible/modules/cloud/cloudstack/cs_instance_facts.py","position":12,"original_position":12,"commit_id":"94b60c059e8d01167264aade2c288d9b9937e269","original_commit_id":"94b60c059e8d01167264aade2c288d9b9937e269","user":{"login":"webknjaz","id":578543,"node_id":"MDQ6VXNlcjU3ODU0Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/578543?v=4","gravatar_id":"","url":"https://api.github.com/users/webknjaz","html_url":"https://github.com/webknjaz","followers_url":"https://api.github.com/users/webknjaz/followers","following_url":"https://api.github.com/users/webknjaz/following{/other_user}","gists_url":"https://api.github.com/users/webknjaz/gists{/gist_id}","starred_url":"https://api.github.com/users/webknjaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webknjaz/subscriptions","organizations_url":"https://api.github.com/users/webknjaz/orgs","repos_url":"https://api.github.com/users/webknjaz/repos","events_url":"https://api.github.com/users/webknjaz/events{/privacy}","received_events_url":"https://api.github.com/users/webknjaz/received_events","type":"User","site_admin":false},"body":"Please put these *stdlib* imports above project imports separating sections with an empty line.","created_at":"2018-08-15T12:42:47Z","updated_at":"2018-08-15T12:42:47Z","html_url":"https://github.com/ansible/ansible/pull/44112#discussion_r210255238","pull_request_url":"https://api.github.com/repos/ansible/ansible/pulls/44112","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments/210255238"},"html":{"href":"https://github.com/ansible/ansible/pull/44112#discussion_r210255238"},"pull_request":{"href":"https://api.github.com/repos/ansible/ansible/pulls/44112"}}},"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/44112","id":208209002,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MjA5MDAy","html_url":"https://github.com/ansible/ansible/pull/44112","diff_url":"https://github.com/ansible/ansible/pull/44112.diff","patch_url":"https://github.com/ansible/ansible/pull/44112.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/44112","number":44112,"state":"open","locked":false,"title":"add a fact to cs_instance_facts. It contains all instance ip addresses split per network","user":{"login":"fzwart","id":344874,"node_id":"MDQ6VXNlcjM0NDg3NA==","avatar_url":"https://avatars1.githubusercontent.com/u/344874?v=4","gravatar_id":"","url":"https://api.github.com/users/fzwart","html_url":"https://github.com/fzwart","followers_url":"https://api.github.com/users/fzwart/followers","following_url":"https://api.github.com/users/fzwart/following{/other_user}","gists_url":"https://api.github.com/users/fzwart/gists{/gist_id}","starred_url":"https://api.github.com/users/fzwart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzwart/subscriptions","organizations_url":"https://api.github.com/users/fzwart/orgs","repos_url":"https://api.github.com/users/fzwart/repos","events_url":"https://api.github.com/users/fzwart/events{/privacy}","received_events_url":"https://api.github.com/users/fzwart/received_events","type":"User","site_admin":false},"body":"##### SUMMARY\r\nAFAIK there currently is no fact that queries the cloudstack API and returns all\r\nIPs assigned to an instance (split per network). I've added this to cs_instance_facts\r\n\r\nnetwork_ip_addresses:\r\n  <network_name>:\r\n    - <ip1>\r\n    - <ipN>\r\n\r\n<!--- Describe the change, including rationale and design decisions -->\r\nI felt this was the right place to add this functionality as the data is \r\nalready there. It only needed to be added to the result. That's what I did.\r\n\r\n##### ISSUE TYPE\r\n- Feature Pull Request\r\n \r\n##### COMPONENT NAME\r\ncloud/cloudstack\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.6.2\r\n  config file = None\r\n  configured module search path = [u'/Users/frank/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /Library/Python/2.7/site-packages/ansible\r\n  executable location = bin/ansible\r\n  python version = 2.7.10 (default, Feb  7 2017, 00:08:15) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]\r\n```\r\n##### ADDITIONAL INFORMATION\r\n<!--- Include additional information to help people understand the change here.\r\nFor bugs that don't have a linked bug report, a step-by-step reproduction\r\nof the problem is helpful. -->\r\n\r\n<!--- Paste verbatim command output below, e.g. before and after your change -->\r\n```\r\n\r\n```\r\n","created_at":"2018-08-14T08:45:07Z","updated_at":"2018-08-15T12:42:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fef634415216e80a86f7ad6d94b5b8a7d6a84a2a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":947190508,"node_id":"MDU6TGFiZWw5NDcxOTA1MDg=","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.7","name":"affects_2.7","color":"ededed","default":false},{"id":61528803,"node_id":"MDU6TGFiZWw2MTUyODgwMw==","url":"https://api.github.com/repos/ansible/ansible/labels/cloud","name":"cloud","color":"c7def8","default":false},{"id":704378583,"node_id":"MDU6TGFiZWw3MDQzNzg1ODM=","url":"https://api.github.com/repos/ansible/ansible/labels/cloudstack","name":"cloudstack","color":"c5def5","default":false},{"id":501518759,"node_id":"MDU6TGFiZWw1MDE1MTg3NTk=","url":"https://api.github.com/repos/ansible/ansible/labels/community_review","name":"community_review","color":"f9d0c4","default":false},{"id":852590921,"node_id":"MDU6TGFiZWw4NTI1OTA5MjE=","url":"https://api.github.com/repos/ansible/ansible/labels/feature","name":"feature","color":"006b75","default":false},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":723150340,"node_id":"MDU6TGFiZWw3MjMxNTAzNDA=","url":"https://api.github.com/repos/ansible/ansible/labels/new_contributor","name":"new_contributor","color":"c2e0c6","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/44112/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/44112/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/44112/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/94b60c059e8d01167264aade2c288d9b9937e269","head":{"label":"fzwart:cloudstack_instance_ips","ref":"cloudstack_instance_ips","sha":"94b60c059e8d01167264aade2c288d9b9937e269","user":{"login":"fzwart","id":344874,"node_id":"MDQ6VXNlcjM0NDg3NA==","avatar_url":"https://avatars1.githubusercontent.com/u/344874?v=4","gravatar_id":"","url":"https://api.github.com/users/fzwart","html_url":"https://github.com/fzwart","followers_url":"https://api.github.com/users/fzwart/followers","following_url":"https://api.github.com/users/fzwart/following{/other_user}","gists_url":"https://api.github.com/users/fzwart/gists{/gist_id}","starred_url":"https://api.github.com/users/fzwart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzwart/subscriptions","organizations_url":"https://api.github.com/users/fzwart/orgs","repos_url":"https://api.github.com/users/fzwart/repos","events_url":"https://api.github.com/users/fzwart/events{/privacy}","received_events_url":"https://api.github.com/users/fzwart/received_events","type":"User","site_admin":false},"repo":{"id":144132497,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQxMzI0OTc=","name":"ansible","full_name":"fzwart/ansible","owner":{"login":"fzwart","id":344874,"node_id":"MDQ6VXNlcjM0NDg3NA==","avatar_url":"https://avatars1.githubusercontent.com/u/344874?v=4","gravatar_id":"","url":"https://api.github.com/users/fzwart","html_url":"https://github.com/fzwart","followers_url":"https://api.github.com/users/fzwart/followers","following_url":"https://api.github.com/users/fzwart/following{/other_user}","gists_url":"https://api.github.com/users/fzwart/gists{/gist_id}","starred_url":"https://api.github.com/users/fzwart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzwart/subscriptions","organizations_url":"https://api.github.com/users/fzwart/orgs","repos_url":"https://api.github.com/users/fzwart/repos","events_url":"https://api.github.com/users/fzwart/events{/privacy}","received_events_url":"https://api.github.com/users/fzwart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fzwart/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications — automate in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com/ansible/","fork":true,"url":"https://api.github.com/repos/fzwart/ansible","forks_url":"https://api.github.com/repos/fzwart/ansible/forks","keys_url":"https://api.github.com/repos/fzwart/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fzwart/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fzwart/ansible/teams","hooks_url":"https://api.github.com/repos/fzwart/ansible/hooks","issue_events_url":"https://api.github.com/repos/fzwart/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/fzwart/ansible/events","assignees_url":"https://api.github.com/repos/fzwart/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/fzwart/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/fzwart/ansible/tags","blobs_url":"https://api.github.com/repos/fzwart/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fzwart/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fzwart/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/fzwart/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fzwart/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/fzwart/ansible/languages","stargazers_url":"https://api.github.com/repos/fzwart/ansible/stargazers","contributors_url":"https://api.github.com/repos/fzwart/ansible/contributors","subscribers_url":"https://api.github.com/repos/fzwart/ansible/subscribers","subscription_url":"https://api.github.com/repos/fzwart/ansible/subscription","commits_url":"https://api.github.com/repos/fzwart/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/fzwart/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/fzwart/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/fzwart/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/fzwart/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/fzwart/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fzwart/ansible/merges","archive_url":"https://api.github.com/repos/fzwart/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fzwart/ansible/downloads","issues_url":"https://api.github.com/repos/fzwart/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/fzwart/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/fzwart/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/fzwart/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fzwart/ansible/labels{/name}","releases_url":"https://api.github.com/repos/fzwart/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/fzwart/ansible/deployments","created_at":"2018-08-09T09:42:20Z","updated_at":"2018-08-09T09:42:50Z","pushed_at":"2018-08-15T11:01:54Z","git_url":"git://github.com/fzwart/ansible.git","ssh_url":"git@github.com:fzwart/ansible.git","clone_url":"https://github.com/fzwart/ansible.git","svn_url":"https://github.com/fzwart/ansible","homepage":"https://www.ansible.com/","size":127622,"stargazers_count":0,"watchers_count":0,"language":"Python","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":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"615337c3d701f0fb450c2a745b94d251946d72b7","user":{"login":"ansible","id":1507452,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDc0NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":3638964,"node_id":"MDEwOlJlcG9zaXRvcnkzNjM4OTY0","name":"ansible","full_name":"ansible/ansible","owner":{"login":"ansible","id":1507452,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDc0NTI=","avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications — automate in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com/ansible/","fork":false,"url":"https://api.github.com/repos/ansible/ansible","forks_url":"https://api.github.com/repos/ansible/ansible/forks","keys_url":"https://api.github.com/repos/ansible/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible/teams","hooks_url":"https://api.github.com/repos/ansible/ansible/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible/events","assignees_url":"https://api.github.com/repos/ansible/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible/tags","blobs_url":"https://api.github.com/repos/ansible/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible/subscription","commits_url":"https://api.github.com/repos/ansible/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible/merges","archive_url":"https://api.github.com/repos/ansible/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible/downloads","issues_url":"https://api.github.com/repos/ansible/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible/deployments","created_at":"2012-03-06T14:58:02Z","updated_at":"2018-08-15T12:37:24Z","pushed_at":"2018-08-15T12:33:30Z","git_url":"git://github.com/ansible/ansible.git","ssh_url":"git@github.com:ansible/ansible.git","clone_url":"https://github.com/ansible/ansible.git","svn_url":"https://github.com/ansible/ansible","homepage":"https://www.ansible.com/","size":136331,"stargazers_count":31970,"watchers_count":31970,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12409,"mirror_url":null,"archived":false,"open_issues_count":5454,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":12409,"open_issues":5454,"watchers":31970,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/44112"},"html":{"href":"https://github.com/ansible/ansible/pull/44112"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/44112"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/44112/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/44112/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/44112/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/94b60c059e8d01167264aade2c288d9b9937e269"}},"author_association":"NONE"}}
{"actor":{"display_login":"webknjaz"}}