{"action":"created","comment":{"url":"https://api.github.com/repos/fog/fog/pulls/comments/43127898","id":43127898,"diff_hunk":"@@ -5,27 +5,30 @@ class Real\n         # Get available kernels\n         #\n         # ==== Parameters\n-        # * kernelId<~Integer>: id to limit results to\n+        # * options<~Hash>\n+        #   * isXen<~Boolean> Show or hide Xen compatible kernels\n+        #   * isKVM<~Boolean> Show or hide KVM compatible kernels\n         #\n         # ==== Returns\n         # * response<~Excon::Response>:\n         #   * body<~Array>:\n         # TODO: docs\n-        def avail_kernels(kernel_id=nil)\n-          options = {}\n-          if kernel_id\n-            options.merge!(:kernelId => kernel_id)\n-          end\n+        def avail_kernels(options={})\n+          # avail.kernels used to accept a kernelId parameter (now removed)\n+          raise Fog::Errors::Error.new('avail_kernels no longer accepts a kernelId parameter') unless !options || options.is_a?(Hash)","path":"lib/fog/linode/requests/compute/avail_kernels.rb","position":20,"original_position":20,"commit_id":"491ad474d9f8bae674bf741842786f5ec79fe3ac","original_commit_id":"491ad474d9f8bae674bf741842786f5ec79fe3ac","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":"Yep. Thats right. I always get confused with `unless !`. :grimacing: \r\nMaybe you could use a idiom like `if options.is_a?(Integer)`?","created_at":"2015-10-27T14:27:02Z","updated_at":"2015-10-27T14:27:02Z","html_url":"https://github.com/fog/fog/pull/3733#discussion_r43127898","pull_request_url":"https://api.github.com/repos/fog/fog/pulls/3733","_links":{"self":{"href":"https://api.github.com/repos/fog/fog/pulls/comments/43127898"},"html":{"href":"https://github.com/fog/fog/pull/3733#discussion_r43127898"},"pull_request":{"href":"https://api.github.com/repos/fog/fog/pulls/3733"}}},"pull_request":{"url":"https://api.github.com/repos/fog/fog/pulls/3733","id":48796228,"html_url":"https://github.com/fog/fog/pull/3733","diff_url":"https://github.com/fog/fog/pull/3733.diff","patch_url":"https://github.com/fog/fog/pull/3733.patch","issue_url":"https://api.github.com/repos/fog/fog/issues/3733","number":3733,"state":"open","locked":false,"title":"Update Linode \"avail\" API methods","user":{"login":"philr","id":190067,"avatar_url":"https://avatars.githubusercontent.com/u/190067?v=3","gravatar_id":"","url":"https://api.github.com/users/philr","html_url":"https://github.com/philr","followers_url":"https://api.github.com/users/philr/followers","following_url":"https://api.github.com/users/philr/following{/other_user}","gists_url":"https://api.github.com/users/philr/gists{/gist_id}","starred_url":"https://api.github.com/users/philr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philr/subscriptions","organizations_url":"https://api.github.com/users/philr/orgs","repos_url":"https://api.github.com/users/philr/repos","events_url":"https://api.github.com/users/philr/events{/privacy}","received_events_url":"https://api.github.com/users/philr/received_events","type":"User","site_admin":false},"body":"This pull request updates the wrappers for the Linode \"avail\" API methods to match the currently documented behaviour:\r\n\r\n- Add an `abbr` attribute to the DataCenter model.\r\n- Update the `avail_kernels` request and `Kernel` model to reflect the removed `kernelId` parameter, newly added `isXen` and `isKVM` parameters and additional returned attributes.\r\n- Update the `avail_linodeplans` request and `Flavor` model to add new attributes and change the mocked data center ids to match those currently returned.\r\n- Add support for the `avail.nodebalancers` API call.\r\n- Fix the signature of the `avail_stackscripts` mock method so that it matches the real method.\r\n\r\nThis resolves the specific issue with `avail.kernels` not being up to date raised in #3718.\r\n\r\nThis also modifies the fix made in #3701. The underlying reason for the issue raised in #3701 is that Linode changed the `avail.kernels` API call so that it no longer accepts a `kernelId` parameter. Attempting to pass the parameter now causes all the available kernels to be returned instead of just the one that was requested. This pull request modifies the `avail_kernels` request and `Kernels` collection so that the `kernelId` parameter is no longer included in the request.","created_at":"2015-10-26T20:57:52Z","updated_at":"2015-10-27T14:27:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58514a7741aec98c2c4be679c734fd050c9b4978","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fog/fog/pulls/3733/commits","review_comments_url":"https://api.github.com/repos/fog/fog/pulls/3733/comments","review_comment_url":"https://api.github.com/repos/fog/fog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fog/fog/issues/3733/comments","statuses_url":"https://api.github.com/repos/fog/fog/statuses/491ad474d9f8bae674bf741842786f5ec79fe3ac","head":{"label":"philr:linode_updates","ref":"linode_updates","sha":"491ad474d9f8bae674bf741842786f5ec79fe3ac","user":{"login":"philr","id":190067,"avatar_url":"https://avatars.githubusercontent.com/u/190067?v=3","gravatar_id":"","url":"https://api.github.com/users/philr","html_url":"https://github.com/philr","followers_url":"https://api.github.com/users/philr/followers","following_url":"https://api.github.com/users/philr/following{/other_user}","gists_url":"https://api.github.com/users/philr/gists{/gist_id}","starred_url":"https://api.github.com/users/philr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philr/subscriptions","organizations_url":"https://api.github.com/users/philr/orgs","repos_url":"https://api.github.com/users/philr/repos","events_url":"https://api.github.com/users/philr/events{/privacy}","received_events_url":"https://api.github.com/users/philr/received_events","type":"User","site_admin":false},"repo":{"id":44866837,"name":"fog","full_name":"philr/fog","owner":{"login":"philr","id":190067,"avatar_url":"https://avatars.githubusercontent.com/u/190067?v=3","gravatar_id":"","url":"https://api.github.com/users/philr","html_url":"https://github.com/philr","followers_url":"https://api.github.com/users/philr/followers","following_url":"https://api.github.com/users/philr/following{/other_user}","gists_url":"https://api.github.com/users/philr/gists{/gist_id}","starred_url":"https://api.github.com/users/philr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philr/subscriptions","organizations_url":"https://api.github.com/users/philr/orgs","repos_url":"https://api.github.com/users/philr/repos","events_url":"https://api.github.com/users/philr/events{/privacy}","received_events_url":"https://api.github.com/users/philr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/philr/fog","description":"The Ruby cloud services library.","fork":true,"url":"https://api.github.com/repos/philr/fog","forks_url":"https://api.github.com/repos/philr/fog/forks","keys_url":"https://api.github.com/repos/philr/fog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/philr/fog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/philr/fog/teams","hooks_url":"https://api.github.com/repos/philr/fog/hooks","issue_events_url":"https://api.github.com/repos/philr/fog/issues/events{/number}","events_url":"https://api.github.com/repos/philr/fog/events","assignees_url":"https://api.github.com/repos/philr/fog/assignees{/user}","branches_url":"https://api.github.com/repos/philr/fog/branches{/branch}","tags_url":"https://api.github.com/repos/philr/fog/tags","blobs_url":"https://api.github.com/repos/philr/fog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/philr/fog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/philr/fog/git/refs{/sha}","trees_url":"https://api.github.com/repos/philr/fog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/philr/fog/statuses/{sha}","languages_url":"https://api.github.com/repos/philr/fog/languages","stargazers_url":"https://api.github.com/repos/philr/fog/stargazers","contributors_url":"https://api.github.com/repos/philr/fog/contributors","subscribers_url":"https://api.github.com/repos/philr/fog/subscribers","subscription_url":"https://api.github.com/repos/philr/fog/subscription","commits_url":"https://api.github.com/repos/philr/fog/commits{/sha}","git_commits_url":"https://api.github.com/repos/philr/fog/git/commits{/sha}","comments_url":"https://api.github.com/repos/philr/fog/comments{/number}","issue_comment_url":"https://api.github.com/repos/philr/fog/issues/comments{/number}","contents_url":"https://api.github.com/repos/philr/fog/contents/{+path}","compare_url":"https://api.github.com/repos/philr/fog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/philr/fog/merges","archive_url":"https://api.github.com/repos/philr/fog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/philr/fog/downloads","issues_url":"https://api.github.com/repos/philr/fog/issues{/number}","pulls_url":"https://api.github.com/repos/philr/fog/pulls{/number}","milestones_url":"https://api.github.com/repos/philr/fog/milestones{/number}","notifications_url":"https://api.github.com/repos/philr/fog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/philr/fog/labels{/name}","releases_url":"https://api.github.com/repos/philr/fog/releases{/id}","created_at":"2015-10-24T13:20:54Z","updated_at":"2015-10-24T13:21:01Z","pushed_at":"2015-10-26T20:35:21Z","git_url":"git://github.com/philr/fog.git","ssh_url":"git@github.com:philr/fog.git","clone_url":"https://github.com/philr/fog.git","svn_url":"https://github.com/philr/fog","homepage":"http://fog.io","size":52849,"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":"b211ed2bfb9d8976ec1d24d0bea56ca26ec0805d","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":203666,"name":"fog","full_name":"fog/fog","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","description":"The Ruby cloud services library.","fork":false,"url":"https://api.github.com/repos/fog/fog","forks_url":"https://api.github.com/repos/fog/fog/forks","keys_url":"https://api.github.com/repos/fog/fog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fog/fog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fog/fog/teams","hooks_url":"https://api.github.com/repos/fog/fog/hooks","issue_events_url":"https://api.github.com/repos/fog/fog/issues/events{/number}","events_url":"https://api.github.com/repos/fog/fog/events","assignees_url":"https://api.github.com/repos/fog/fog/assignees{/user}","branches_url":"https://api.github.com/repos/fog/fog/branches{/branch}","tags_url":"https://api.github.com/repos/fog/fog/tags","blobs_url":"https://api.github.com/repos/fog/fog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fog/fog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fog/fog/git/refs{/sha}","trees_url":"https://api.github.com/repos/fog/fog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fog/fog/statuses/{sha}","languages_url":"https://api.github.com/repos/fog/fog/languages","stargazers_url":"https://api.github.com/repos/fog/fog/stargazers","contributors_url":"https://api.github.com/repos/fog/fog/contributors","subscribers_url":"https://api.github.com/repos/fog/fog/subscribers","subscription_url":"https://api.github.com/repos/fog/fog/subscription","commits_url":"https://api.github.com/repos/fog/fog/commits{/sha}","git_commits_url":"https://api.github.com/repos/fog/fog/git/commits{/sha}","comments_url":"https://api.github.com/repos/fog/fog/comments{/number}","issue_comment_url":"https://api.github.com/repos/fog/fog/issues/comments{/number}","contents_url":"https://api.github.com/repos/fog/fog/contents/{+path}","compare_url":"https://api.github.com/repos/fog/fog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fog/fog/merges","archive_url":"https://api.github.com/repos/fog/fog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fog/fog/downloads","issues_url":"https://api.github.com/repos/fog/fog/issues{/number}","pulls_url":"https://api.github.com/repos/fog/fog/pulls{/number}","milestones_url":"https://api.github.com/repos/fog/fog/milestones{/number}","notifications_url":"https://api.github.com/repos/fog/fog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fog/fog/labels{/name}","releases_url":"https://api.github.com/repos/fog/fog/releases{/id}","created_at":"2009-05-18T07:14:04Z","updated_at":"2015-10-25T18:19:23Z","pushed_at":"2015-10-27T13:09:42Z","git_url":"git://github.com/fog/fog.git","ssh_url":"git@github.com:fog/fog.git","clone_url":"https://github.com/fog/fog.git","svn_url":"https://github.com/fog/fog","homepage":"http://fog.io","size":52849,"stargazers_count":3668,"watchers_count":3668,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1496,"mirror_url":null,"open_issues_count":90,"forks":1496,"open_issues":90,"watchers":3668,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fog/fog/pulls/3733"},"html":{"href":"https://github.com/fog/fog/pull/3733"},"issue":{"href":"https://api.github.com/repos/fog/fog/issues/3733"},"comments":{"href":"https://api.github.com/repos/fog/fog/issues/3733/comments"},"review_comments":{"href":"https://api.github.com/repos/fog/fog/pulls/3733/comments"},"review_comment":{"href":"https://api.github.com/repos/fog/fog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fog/fog/pulls/3733/commits"},"statuses":{"href":"https://api.github.com/repos/fog/fog/statuses/491ad474d9f8bae674bf741842786f5ec79fe3ac"}}}}