{"action":"opened","number":126,"pull_request":{"url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/pulls/126","id":46786626,"html_url":"https://github.com/schubergphilis/vagrant-cloudstack/pull/126","diff_url":"https://github.com/schubergphilis/vagrant-cloudstack/pull/126.diff","patch_url":"https://github.com/schubergphilis/vagrant-cloudstack/pull/126.patch","issue_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/issues/126","number":126,"state":"open","locked":false,"title":"Add vpc support","user":{"login":"miguelaferreira","id":4670993,"avatar_url":"https://avatars.githubusercontent.com/u/4670993?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelaferreira","html_url":"https://github.com/miguelaferreira","followers_url":"https://api.github.com/users/miguelaferreira/followers","following_url":"https://api.github.com/users/miguelaferreira/following{/other_user}","gists_url":"https://api.github.com/users/miguelaferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelaferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelaferreira/subscriptions","organizations_url":"https://api.github.com/users/miguelaferreira/orgs","repos_url":"https://api.github.com/users/miguelaferreira/repos","events_url":"https://api.github.com/users/miguelaferreira/events{/privacy}","received_events_url":"https://api.github.com/users/miguelaferreira/received_events","type":"User","site_admin":false},"body":"This PR adds VPC support.\r\n\r\nBefore adding the functionality, the networking configuration and API calls were refactored into a model and service object, respectively.\r\n\r\nThe code was tested with:\r\n```\r\nbundle exec rspec spec/\r\n```\r\n\r\nand\r\n\r\n```\r\ncd functional-tests\r\n./run_tests.sh\r\n```\r\n\r\nFor the functional tests we need to export some new fields. Current full list is:\r\n```\r\nexport CLOUDSTACK_HOST=\"...\"\r\nexport CLOUDSTACK_API_KEY=\"...\"\r\nexport CLOUDSTACK_SECRET_KEY=\"...\"\r\nexport PUBLIC_SOURCE_NAT_IP=\"...\"\r\nexport VPC_PUBLIC_IP=\"...\"\r\nexport PUBLIC_SSH_PORT=\"2222\"\r\nexport PRIVATE_SSH_PORT=\"22\"\r\nexport PUBLIC_WINRM_PORT=\"6010\"\r\nexport PRIVATE_WINRM_PORT=\"5985\"\r\nexport ZONE_NAME=\"...\"\r\nexport NETWORK_NAME=\"...\"\r\nexport VPC_TIER_NAME=\"...\"\r\nexport SERVICE_OFFERING_NAME=\"...\"\r\nexport LINUX_TEMPLATE_NAME=\"...\"\r\nexport WINDOWS_TEMPLATE_NAME=\"...\"\r\nexport OPEN_FIREWALL=\"false\"\r\nexport SOURCE_CIDR=\"...\"\r\nexport SSH_KEY=\"/path/to/key...\"\r\nexport SSH_USER=\"...\"\r\nexport WINDOWS_USER=\"Administrator\"\r\n```\r\nThe functional tests sometimes fail due to time outs.\r\n\r\n\r\nSome of the API calls could be best implemented using FOG's methods instead of the free-for-all `request` method. Also the waiting for Async jobs can be improved by adding a timer, our retry count.\r\nAnd finally, the termination of an instance should iterate over a list of resources that were created when an instance is created, and destroy those. I will create issues for these improvements.","created_at":"2015-10-05T14:22:35Z","updated_at":"2015-10-05T14:22:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/pulls/126/commits","review_comments_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/pulls/126/comments","review_comment_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/issues/126/comments","statuses_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/statuses/78b80169ccb2304039a34df19dd6dd82ca9c047b","head":{"label":"miguelaferreira:add-vpc-support","ref":"add-vpc-support","sha":"78b80169ccb2304039a34df19dd6dd82ca9c047b","user":{"login":"miguelaferreira","id":4670993,"avatar_url":"https://avatars.githubusercontent.com/u/4670993?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelaferreira","html_url":"https://github.com/miguelaferreira","followers_url":"https://api.github.com/users/miguelaferreira/followers","following_url":"https://api.github.com/users/miguelaferreira/following{/other_user}","gists_url":"https://api.github.com/users/miguelaferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelaferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelaferreira/subscriptions","organizations_url":"https://api.github.com/users/miguelaferreira/orgs","repos_url":"https://api.github.com/users/miguelaferreira/repos","events_url":"https://api.github.com/users/miguelaferreira/events{/privacy}","received_events_url":"https://api.github.com/users/miguelaferreira/received_events","type":"User","site_admin":false},"repo":{"id":35025313,"name":"vagrant-cloudstack","full_name":"miguelaferreira/vagrant-cloudstack","owner":{"login":"miguelaferreira","id":4670993,"avatar_url":"https://avatars.githubusercontent.com/u/4670993?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelaferreira","html_url":"https://github.com/miguelaferreira","followers_url":"https://api.github.com/users/miguelaferreira/followers","following_url":"https://api.github.com/users/miguelaferreira/following{/other_user}","gists_url":"https://api.github.com/users/miguelaferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelaferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelaferreira/subscriptions","organizations_url":"https://api.github.com/users/miguelaferreira/orgs","repos_url":"https://api.github.com/users/miguelaferreira/repos","events_url":"https://api.github.com/users/miguelaferreira/events{/privacy}","received_events_url":"https://api.github.com/users/miguelaferreira/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/miguelaferreira/vagrant-cloudstack","description":"Use Vagrant to manage your Cloudstack instances.","fork":true,"url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack","forks_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/forks","keys_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/teams","hooks_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/hooks","issue_events_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/events","assignees_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/tags","blobs_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/languages","stargazers_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/stargazers","contributors_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/contributors","subscribers_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/subscribers","subscription_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/subscription","commits_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/merges","archive_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/downloads","issues_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/miguelaferreira/vagrant-cloudstack/releases{/id}","created_at":"2015-05-04T09:11:49Z","updated_at":"2015-05-04T09:11:49Z","pushed_at":"2015-10-05T14:22:22Z","git_url":"git://github.com/miguelaferreira/vagrant-cloudstack.git","ssh_url":"git@github.com:miguelaferreira/vagrant-cloudstack.git","clone_url":"https://github.com/miguelaferreira/vagrant-cloudstack.git","svn_url":"https://github.com/miguelaferreira/vagrant-cloudstack","homepage":null,"size":676,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"schubergphilis:master","ref":"master","sha":"f19f4fbbf087a739bf00e7a73c25dbf9c71e3a50","user":{"login":"schubergphilis","id":864482,"avatar_url":"https://avatars.githubusercontent.com/u/864482?v=3","gravatar_id":"","url":"https://api.github.com/users/schubergphilis","html_url":"https://github.com/schubergphilis","followers_url":"https://api.github.com/users/schubergphilis/followers","following_url":"https://api.github.com/users/schubergphilis/following{/other_user}","gists_url":"https://api.github.com/users/schubergphilis/gists{/gist_id}","starred_url":"https://api.github.com/users/schubergphilis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schubergphilis/subscriptions","organizations_url":"https://api.github.com/users/schubergphilis/orgs","repos_url":"https://api.github.com/users/schubergphilis/repos","events_url":"https://api.github.com/users/schubergphilis/events{/privacy}","received_events_url":"https://api.github.com/users/schubergphilis/received_events","type":"Organization","site_admin":false},"repo":{"id":9837466,"name":"vagrant-cloudstack","full_name":"schubergphilis/vagrant-cloudstack","owner":{"login":"schubergphilis","id":864482,"avatar_url":"https://avatars.githubusercontent.com/u/864482?v=3","gravatar_id":"","url":"https://api.github.com/users/schubergphilis","html_url":"https://github.com/schubergphilis","followers_url":"https://api.github.com/users/schubergphilis/followers","following_url":"https://api.github.com/users/schubergphilis/following{/other_user}","gists_url":"https://api.github.com/users/schubergphilis/gists{/gist_id}","starred_url":"https://api.github.com/users/schubergphilis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schubergphilis/subscriptions","organizations_url":"https://api.github.com/users/schubergphilis/orgs","repos_url":"https://api.github.com/users/schubergphilis/repos","events_url":"https://api.github.com/users/schubergphilis/events{/privacy}","received_events_url":"https://api.github.com/users/schubergphilis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/schubergphilis/vagrant-cloudstack","description":"Use Vagrant to manage your Cloudstack instances.","fork":false,"url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack","forks_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/forks","keys_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/teams","hooks_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/hooks","issue_events_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/events","assignees_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/tags","blobs_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/languages","stargazers_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/stargazers","contributors_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/contributors","subscribers_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/subscribers","subscription_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/subscription","commits_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/merges","archive_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/downloads","issues_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/releases{/id}","created_at":"2013-05-03T14:22:43Z","updated_at":"2015-08-21T10:28:54Z","pushed_at":"2015-09-30T20:24:10Z","git_url":"git://github.com/schubergphilis/vagrant-cloudstack.git","ssh_url":"git@github.com:schubergphilis/vagrant-cloudstack.git","clone_url":"https://github.com/schubergphilis/vagrant-cloudstack.git","svn_url":"https://github.com/schubergphilis/vagrant-cloudstack","homepage":null,"size":1311,"stargazers_count":53,"watchers_count":53,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":8,"forks":37,"open_issues":8,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/pulls/126"},"html":{"href":"https://github.com/schubergphilis/vagrant-cloudstack/pull/126"},"issue":{"href":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/issues/126"},"comments":{"href":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/schubergphilis/vagrant-cloudstack/statuses/78b80169ccb2304039a34df19dd6dd82ca9c047b"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":1355,"deletions":382,"changed_files":19}}