{"action":"created","comment":{"url":"https://api.github.com/repos/fog/fog-vsphere/pulls/comments/44938754","id":44938754,"diff_hunk":"@@ -26,7 +26,12 @@ def create_vm attributes = { }\n                             get_raw_cluster(attributes[:cluster], attributes[:datacenter]).resourcePool\n                           end\n           vmFolder      = get_raw_vmfolder(attributes[:path], attributes[:datacenter])\n-          vm            = vmFolder.CreateVM_Task(:config => vm_cfg, :pool => resource_pool).wait_for_completion\n+          # if any volume has a storage_pod set, we deploy the vm on a storage pod instead of the defined datastores\n+          if pool = get_storage_pod(attributes)","path":"lib/fog/vsphere/requests/compute/create_vm.rb","position":6,"original_position":6,"commit_id":"01fd936155732ce7b6e631d00a3507db51513dc4","original_commit_id":"01fd936155732ce7b6e631d00a3507db51513dc4","user":{"login":"plribeiro3000","id":672952,"avatar_url":"https://avatars.githubusercontent.com/u/672952?v=3","gravatar_id":"","url":"https://api.github.com/users/plribeiro3000","html_url":"https://github.com/plribeiro3000","followers_url":"https://api.github.com/users/plribeiro3000/followers","following_url":"https://api.github.com/users/plribeiro3000/following{/other_user}","gists_url":"https://api.github.com/users/plribeiro3000/gists{/gist_id}","starred_url":"https://api.github.com/users/plribeiro3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plribeiro3000/subscriptions","organizations_url":"https://api.github.com/users/plribeiro3000/orgs","repos_url":"https://api.github.com/users/plribeiro3000/repos","events_url":"https://api.github.com/users/plribeiro3000/events{/privacy}","received_events_url":"https://api.github.com/users/plribeiro3000/received_events","type":"User","site_admin":false},"body":"Could you do the assign and then check if the variable is `nil` in the conditional?","created_at":"2015-11-16T15:46:10Z","updated_at":"2015-11-16T15:46:10Z","html_url":"https://github.com/fog/fog-vsphere/pull/6#discussion_r44938754","pull_request_url":"https://api.github.com/repos/fog/fog-vsphere/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/fog/fog-vsphere/pulls/comments/44938754"},"html":{"href":"https://github.com/fog/fog-vsphere/pull/6#discussion_r44938754"},"pull_request":{"href":"https://api.github.com/repos/fog/fog-vsphere/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/fog/fog-vsphere/pulls/6","id":50824535,"html_url":"https://github.com/fog/fog-vsphere/pull/6","diff_url":"https://github.com/fog/fog-vsphere/pull/6.diff","patch_url":"https://github.com/fog/fog-vsphere/pull/6.patch","issue_url":"https://api.github.com/repos/fog/fog-vsphere/issues/6","number":6,"state":"open","locked":false,"title":"implement storage pods","user":{"login":"timogoebel","id":4107560,"avatar_url":"https://avatars.githubusercontent.com/u/4107560?v=3","gravatar_id":"","url":"https://api.github.com/users/timogoebel","html_url":"https://github.com/timogoebel","followers_url":"https://api.github.com/users/timogoebel/followers","following_url":"https://api.github.com/users/timogoebel/following{/other_user}","gists_url":"https://api.github.com/users/timogoebel/gists{/gist_id}","starred_url":"https://api.github.com/users/timogoebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timogoebel/subscriptions","organizations_url":"https://api.github.com/users/timogoebel/orgs","repos_url":"https://api.github.com/users/timogoebel/repos","events_url":"https://api.github.com/users/timogoebel/events{/privacy}","received_events_url":"https://api.github.com/users/timogoebel/received_events","type":"User","site_admin":false},"body":"This PR adds storage pods (datastore clusters) to fog. You can create a new vm or clone an existing one.","created_at":"2015-11-16T15:34:12Z","updated_at":"2015-11-16T15:46:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f55337d3f8e19f417daa56a734fecc2cbedb9c86","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fog/fog-vsphere/pulls/6/commits","review_comments_url":"https://api.github.com/repos/fog/fog-vsphere/pulls/6/comments","review_comment_url":"https://api.github.com/repos/fog/fog-vsphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fog/fog-vsphere/issues/6/comments","statuses_url":"https://api.github.com/repos/fog/fog-vsphere/statuses/01fd936155732ce7b6e631d00a3507db51513dc4","head":{"label":"timogoebel:feature_storage_pods","ref":"feature_storage_pods","sha":"01fd936155732ce7b6e631d00a3507db51513dc4","user":{"login":"timogoebel","id":4107560,"avatar_url":"https://avatars.githubusercontent.com/u/4107560?v=3","gravatar_id":"","url":"https://api.github.com/users/timogoebel","html_url":"https://github.com/timogoebel","followers_url":"https://api.github.com/users/timogoebel/followers","following_url":"https://api.github.com/users/timogoebel/following{/other_user}","gists_url":"https://api.github.com/users/timogoebel/gists{/gist_id}","starred_url":"https://api.github.com/users/timogoebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timogoebel/subscriptions","organizations_url":"https://api.github.com/users/timogoebel/orgs","repos_url":"https://api.github.com/users/timogoebel/repos","events_url":"https://api.github.com/users/timogoebel/events{/privacy}","received_events_url":"https://api.github.com/users/timogoebel/received_events","type":"User","site_admin":false},"repo":{"id":46260681,"name":"fog-vsphere","full_name":"timogoebel/fog-vsphere","owner":{"login":"timogoebel","id":4107560,"avatar_url":"https://avatars.githubusercontent.com/u/4107560?v=3","gravatar_id":"","url":"https://api.github.com/users/timogoebel","html_url":"https://github.com/timogoebel","followers_url":"https://api.github.com/users/timogoebel/followers","following_url":"https://api.github.com/users/timogoebel/following{/other_user}","gists_url":"https://api.github.com/users/timogoebel/gists{/gist_id}","starred_url":"https://api.github.com/users/timogoebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timogoebel/subscriptions","organizations_url":"https://api.github.com/users/timogoebel/orgs","repos_url":"https://api.github.com/users/timogoebel/repos","events_url":"https://api.github.com/users/timogoebel/events{/privacy}","received_events_url":"https://api.github.com/users/timogoebel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timogoebel/fog-vsphere","description":"Fog for vSphere","fork":true,"url":"https://api.github.com/repos/timogoebel/fog-vsphere","forks_url":"https://api.github.com/repos/timogoebel/fog-vsphere/forks","keys_url":"https://api.github.com/repos/timogoebel/fog-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timogoebel/fog-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timogoebel/fog-vsphere/teams","hooks_url":"https://api.github.com/repos/timogoebel/fog-vsphere/hooks","issue_events_url":"https://api.github.com/repos/timogoebel/fog-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/timogoebel/fog-vsphere/events","assignees_url":"https://api.github.com/repos/timogoebel/fog-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/timogoebel/fog-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/timogoebel/fog-vsphere/tags","blobs_url":"https://api.github.com/repos/timogoebel/fog-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timogoebel/fog-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timogoebel/fog-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/timogoebel/fog-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timogoebel/fog-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/timogoebel/fog-vsphere/languages","stargazers_url":"https://api.github.com/repos/timogoebel/fog-vsphere/stargazers","contributors_url":"https://api.github.com/repos/timogoebel/fog-vsphere/contributors","subscribers_url":"https://api.github.com/repos/timogoebel/fog-vsphere/subscribers","subscription_url":"https://api.github.com/repos/timogoebel/fog-vsphere/subscription","commits_url":"https://api.github.com/repos/timogoebel/fog-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/timogoebel/fog-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/timogoebel/fog-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/timogoebel/fog-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/timogoebel/fog-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/timogoebel/fog-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timogoebel/fog-vsphere/merges","archive_url":"https://api.github.com/repos/timogoebel/fog-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timogoebel/fog-vsphere/downloads","issues_url":"https://api.github.com/repos/timogoebel/fog-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/timogoebel/fog-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/timogoebel/fog-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/timogoebel/fog-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timogoebel/fog-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/timogoebel/fog-vsphere/releases{/id}","created_at":"2015-11-16T08:08:05Z","updated_at":"2015-11-16T08:08:06Z","pushed_at":"2015-11-16T15:35:32Z","git_url":"git://github.com/timogoebel/fog-vsphere.git","ssh_url":"git@github.com:timogoebel/fog-vsphere.git","clone_url":"https://github.com/timogoebel/fog-vsphere.git","svn_url":"https://github.com/timogoebel/fog-vsphere","homepage":null,"size":192,"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":"fog:master","ref":"master","sha":"76cff0c7b970a15e7b5609840c9106e73ea40fe6","user":{"login":"fog","id":991149,"avatar_url":"https://avatars.githubusercontent.com/u/991149?v=3","gravatar_id":"","url":"https://api.github.com/users/fog","html_url":"https://github.com/fog","followers_url":"https://api.github.com/users/fog/followers","following_url":"https://api.github.com/users/fog/following{/other_user}","gists_url":"https://api.github.com/users/fog/gists{/gist_id}","starred_url":"https://api.github.com/users/fog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fog/subscriptions","organizations_url":"https://api.github.com/users/fog/orgs","repos_url":"https://api.github.com/users/fog/repos","events_url":"https://api.github.com/users/fog/events{/privacy}","received_events_url":"https://api.github.com/users/fog/received_events","type":"Organization","site_admin":false},"repo":{"id":45206013,"name":"fog-vsphere","full_name":"fog/fog-vsphere","owner":{"login":"fog","id":991149,"avatar_url":"https://avatars.githubusercontent.com/u/991149?v=3","gravatar_id":"","url":"https://api.github.com/users/fog","html_url":"https://github.com/fog","followers_url":"https://api.github.com/users/fog/followers","following_url":"https://api.github.com/users/fog/following{/other_user}","gists_url":"https://api.github.com/users/fog/gists{/gist_id}","starred_url":"https://api.github.com/users/fog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fog/subscriptions","organizations_url":"https://api.github.com/users/fog/orgs","repos_url":"https://api.github.com/users/fog/repos","events_url":"https://api.github.com/users/fog/events{/privacy}","received_events_url":"https://api.github.com/users/fog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fog/fog-vsphere","description":"Fog for vSphere","fork":false,"url":"https://api.github.com/repos/fog/fog-vsphere","forks_url":"https://api.github.com/repos/fog/fog-vsphere/forks","keys_url":"https://api.github.com/repos/fog/fog-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fog/fog-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fog/fog-vsphere/teams","hooks_url":"https://api.github.com/repos/fog/fog-vsphere/hooks","issue_events_url":"https://api.github.com/repos/fog/fog-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/fog/fog-vsphere/events","assignees_url":"https://api.github.com/repos/fog/fog-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/fog/fog-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/fog/fog-vsphere/tags","blobs_url":"https://api.github.com/repos/fog/fog-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fog/fog-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fog/fog-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/fog/fog-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fog/fog-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/fog/fog-vsphere/languages","stargazers_url":"https://api.github.com/repos/fog/fog-vsphere/stargazers","contributors_url":"https://api.github.com/repos/fog/fog-vsphere/contributors","subscribers_url":"https://api.github.com/repos/fog/fog-vsphere/subscribers","subscription_url":"https://api.github.com/repos/fog/fog-vsphere/subscription","commits_url":"https://api.github.com/repos/fog/fog-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/fog/fog-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/fog/fog-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/fog/fog-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/fog/fog-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/fog/fog-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fog/fog-vsphere/merges","archive_url":"https://api.github.com/repos/fog/fog-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fog/fog-vsphere/downloads","issues_url":"https://api.github.com/repos/fog/fog-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/fog/fog-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/fog/fog-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/fog/fog-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fog/fog-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/fog/fog-vsphere/releases{/id}","created_at":"2015-10-29T19:35:37Z","updated_at":"2015-11-06T07:41:41Z","pushed_at":"2015-11-16T15:35:32Z","git_url":"git://github.com/fog/fog-vsphere.git","ssh_url":"git@github.com:fog/fog-vsphere.git","clone_url":"https://github.com/fog/fog-vsphere.git","svn_url":"https://github.com/fog/fog-vsphere","homepage":null,"size":192,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fog/fog-vsphere/pulls/6"},"html":{"href":"https://github.com/fog/fog-vsphere/pull/6"},"issue":{"href":"https://api.github.com/repos/fog/fog-vsphere/issues/6"},"comments":{"href":"https://api.github.com/repos/fog/fog-vsphere/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/fog/fog-vsphere/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/fog/fog-vsphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fog/fog-vsphere/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/fog/fog-vsphere/statuses/01fd936155732ce7b6e631d00a3507db51513dc4"}}}}