{"action":"created","comment":{"url":"https://api.github.com/repos/fog/fog-ecloud/pulls/comments/32644885","id":32644885,"diff_hunk":"@@ -0,0 +1,43 @@\n+module Fog\n+  module Compute\n+    class Ecloud\n+      class Real\n+        include Shared\n+\n+        def ssh_key_edit(data)\n+          request(\n+            :body => generate_ssh_key_edit_request(data),\n+            :expects => 200,\n+            :method => \"PUT\",\n+            :headers => {},\n+            :uri => data[:uri],\n+            :parse => true\n+          ).body\n+        end\n+\n+        private\n+\n+        def generate_ssh_key_edit_request(data)\n+          xml = Builder::XmlMarkup.new\n+          xml.SshKey(:name => data[:Name]) do\n+            xml.Default data[:Default]\n+          end\n+        end\n+      end\n+\n+      class Mock\n+        def ssh_key_edit(options)\n+          ssh_key_id = id_from_uri(options[:uri]).to_i\n+          if self.data[:ssh_keys][ssh_key_id]\n+            self.data[:ssh_keys][ssh_key_id][:Name] = options[:Name]\n+            self.data[:ssh_keys][ssh_key_id][:Default] = options[:Default]\n+            ssh_key = self.data[:ssh_keys][ssh_key_id]","path":"lib/fog/compute/ecloud/requests/ssh_key_edit.rb","position":34,"original_position":34,"commit_id":"3d4ec20c082e9f1967c1de43fca354e1ad4e3b8b","original_commit_id":"3d4ec20c082e9f1967c1de43fca354e1ad4e3b8b","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Redundant `self` detected.","created_at":"2015-06-17T16:20:46Z","updated_at":"2015-06-17T16:20:46Z","html_url":"https://github.com/fog/fog-ecloud/pull/13#discussion_r32644885","pull_request_url":"https://api.github.com/repos/fog/fog-ecloud/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/fog/fog-ecloud/pulls/comments/32644885"},"html":{"href":"https://github.com/fog/fog-ecloud/pull/13#discussion_r32644885"},"pull_request":{"href":"https://api.github.com/repos/fog/fog-ecloud/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/fog/fog-ecloud/pulls/13","id":37832141,"html_url":"https://github.com/fog/fog-ecloud/pull/13","diff_url":"https://github.com/fog/fog-ecloud/pull/13.diff","patch_url":"https://github.com/fog/fog-ecloud/pull/13.patch","issue_url":"https://api.github.com/repos/fog/fog-ecloud/issues/13","number":13,"state":"open","locked":false,"title":"Added support for creating, editing, and deleting ssh keys","user":{"login":"stjeanp","id":8938659,"avatar_url":"https://avatars.githubusercontent.com/u/8938659?v=3","gravatar_id":"","url":"https://api.github.com/users/stjeanp","html_url":"https://github.com/stjeanp","followers_url":"https://api.github.com/users/stjeanp/followers","following_url":"https://api.github.com/users/stjeanp/following{/other_user}","gists_url":"https://api.github.com/users/stjeanp/gists{/gist_id}","starred_url":"https://api.github.com/users/stjeanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stjeanp/subscriptions","organizations_url":"https://api.github.com/users/stjeanp/orgs","repos_url":"https://api.github.com/users/stjeanp/repos","events_url":"https://api.github.com/users/stjeanp/events{/privacy}","received_events_url":"https://api.github.com/users/stjeanp/received_events","type":"User","site_admin":false},"body":"I've added support for creating, editing, and deleting ssh keys. I've also added the mock support and created new tests for this functionality. Everything's passing my tests, both in the mock data as well as using the spec interface and real keys in my cloud environment.","created_at":"2015-06-16T19:31:19Z","updated_at":"2015-06-17T16:20:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e7fdd729247fa3de3634c76b3f9609cb1d15276","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fog/fog-ecloud/pulls/13/commits","review_comments_url":"https://api.github.com/repos/fog/fog-ecloud/pulls/13/comments","review_comment_url":"https://api.github.com/repos/fog/fog-ecloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fog/fog-ecloud/issues/13/comments","statuses_url":"https://api.github.com/repos/fog/fog-ecloud/statuses/3d4ec20c082e9f1967c1de43fca354e1ad4e3b8b","head":{"label":"stjeanp:ssh_keys","ref":"ssh_keys","sha":"3d4ec20c082e9f1967c1de43fca354e1ad4e3b8b","user":{"login":"stjeanp","id":8938659,"avatar_url":"https://avatars.githubusercontent.com/u/8938659?v=3","gravatar_id":"","url":"https://api.github.com/users/stjeanp","html_url":"https://github.com/stjeanp","followers_url":"https://api.github.com/users/stjeanp/followers","following_url":"https://api.github.com/users/stjeanp/following{/other_user}","gists_url":"https://api.github.com/users/stjeanp/gists{/gist_id}","starred_url":"https://api.github.com/users/stjeanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stjeanp/subscriptions","organizations_url":"https://api.github.com/users/stjeanp/orgs","repos_url":"https://api.github.com/users/stjeanp/repos","events_url":"https://api.github.com/users/stjeanp/events{/privacy}","received_events_url":"https://api.github.com/users/stjeanp/received_events","type":"User","site_admin":false},"repo":{"id":37340169,"name":"fog-ecloud","full_name":"stjeanp/fog-ecloud","owner":{"login":"stjeanp","id":8938659,"avatar_url":"https://avatars.githubusercontent.com/u/8938659?v=3","gravatar_id":"","url":"https://api.github.com/users/stjeanp","html_url":"https://github.com/stjeanp","followers_url":"https://api.github.com/users/stjeanp/followers","following_url":"https://api.github.com/users/stjeanp/following{/other_user}","gists_url":"https://api.github.com/users/stjeanp/gists{/gist_id}","starred_url":"https://api.github.com/users/stjeanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stjeanp/subscriptions","organizations_url":"https://api.github.com/users/stjeanp/orgs","repos_url":"https://api.github.com/users/stjeanp/repos","events_url":"https://api.github.com/users/stjeanp/events{/privacy}","received_events_url":"https://api.github.com/users/stjeanp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stjeanp/fog-ecloud","description":"Module for the 'fog' gem to support Terremark Enterprise Cloud","fork":true,"url":"https://api.github.com/repos/stjeanp/fog-ecloud","forks_url":"https://api.github.com/repos/stjeanp/fog-ecloud/forks","keys_url":"https://api.github.com/repos/stjeanp/fog-ecloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stjeanp/fog-ecloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stjeanp/fog-ecloud/teams","hooks_url":"https://api.github.com/repos/stjeanp/fog-ecloud/hooks","issue_events_url":"https://api.github.com/repos/stjeanp/fog-ecloud/issues/events{/number}","events_url":"https://api.github.com/repos/stjeanp/fog-ecloud/events","assignees_url":"https://api.github.com/repos/stjeanp/fog-ecloud/assignees{/user}","branches_url":"https://api.github.com/repos/stjeanp/fog-ecloud/branches{/branch}","tags_url":"https://api.github.com/repos/stjeanp/fog-ecloud/tags","blobs_url":"https://api.github.com/repos/stjeanp/fog-ecloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stjeanp/fog-ecloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stjeanp/fog-ecloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/stjeanp/fog-ecloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stjeanp/fog-ecloud/statuses/{sha}","languages_url":"https://api.github.com/repos/stjeanp/fog-ecloud/languages","stargazers_url":"https://api.github.com/repos/stjeanp/fog-ecloud/stargazers","contributors_url":"https://api.github.com/repos/stjeanp/fog-ecloud/contributors","subscribers_url":"https://api.github.com/repos/stjeanp/fog-ecloud/subscribers","subscription_url":"https://api.github.com/repos/stjeanp/fog-ecloud/subscription","commits_url":"https://api.github.com/repos/stjeanp/fog-ecloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/stjeanp/fog-ecloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/stjeanp/fog-ecloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/stjeanp/fog-ecloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/stjeanp/fog-ecloud/contents/{+path}","compare_url":"https://api.github.com/repos/stjeanp/fog-ecloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stjeanp/fog-ecloud/merges","archive_url":"https://api.github.com/repos/stjeanp/fog-ecloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stjeanp/fog-ecloud/downloads","issues_url":"https://api.github.com/repos/stjeanp/fog-ecloud/issues{/number}","pulls_url":"https://api.github.com/repos/stjeanp/fog-ecloud/pulls{/number}","milestones_url":"https://api.github.com/repos/stjeanp/fog-ecloud/milestones{/number}","notifications_url":"https://api.github.com/repos/stjeanp/fog-ecloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stjeanp/fog-ecloud/labels{/name}","releases_url":"https://api.github.com/repos/stjeanp/fog-ecloud/releases{/id}","created_at":"2015-06-12T19:19:31Z","updated_at":"2015-06-12T19:19:31Z","pushed_at":"2015-06-17T16:20:43Z","git_url":"git://github.com/stjeanp/fog-ecloud.git","ssh_url":"git@github.com:stjeanp/fog-ecloud.git","clone_url":"https://github.com/stjeanp/fog-ecloud.git","svn_url":"https://github.com/stjeanp/fog-ecloud","homepage":"https://services.enterprisecloud.terremark.com","size":291,"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":"ea926e6b37c81e228c33af05780020647ad895b6","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":26643020,"name":"fog-ecloud","full_name":"fog/fog-ecloud","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-ecloud","description":"Module for the 'fog' gem to support Terremark Enterprise Cloud","fork":false,"url":"https://api.github.com/repos/fog/fog-ecloud","forks_url":"https://api.github.com/repos/fog/fog-ecloud/forks","keys_url":"https://api.github.com/repos/fog/fog-ecloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fog/fog-ecloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fog/fog-ecloud/teams","hooks_url":"https://api.github.com/repos/fog/fog-ecloud/hooks","issue_events_url":"https://api.github.com/repos/fog/fog-ecloud/issues/events{/number}","events_url":"https://api.github.com/repos/fog/fog-ecloud/events","assignees_url":"https://api.github.com/repos/fog/fog-ecloud/assignees{/user}","branches_url":"https://api.github.com/repos/fog/fog-ecloud/branches{/branch}","tags_url":"https://api.github.com/repos/fog/fog-ecloud/tags","blobs_url":"https://api.github.com/repos/fog/fog-ecloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fog/fog-ecloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fog/fog-ecloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/fog/fog-ecloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fog/fog-ecloud/statuses/{sha}","languages_url":"https://api.github.com/repos/fog/fog-ecloud/languages","stargazers_url":"https://api.github.com/repos/fog/fog-ecloud/stargazers","contributors_url":"https://api.github.com/repos/fog/fog-ecloud/contributors","subscribers_url":"https://api.github.com/repos/fog/fog-ecloud/subscribers","subscription_url":"https://api.github.com/repos/fog/fog-ecloud/subscription","commits_url":"https://api.github.com/repos/fog/fog-ecloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/fog/fog-ecloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/fog/fog-ecloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/fog/fog-ecloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/fog/fog-ecloud/contents/{+path}","compare_url":"https://api.github.com/repos/fog/fog-ecloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fog/fog-ecloud/merges","archive_url":"https://api.github.com/repos/fog/fog-ecloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fog/fog-ecloud/downloads","issues_url":"https://api.github.com/repos/fog/fog-ecloud/issues{/number}","pulls_url":"https://api.github.com/repos/fog/fog-ecloud/pulls{/number}","milestones_url":"https://api.github.com/repos/fog/fog-ecloud/milestones{/number}","notifications_url":"https://api.github.com/repos/fog/fog-ecloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fog/fog-ecloud/labels{/name}","releases_url":"https://api.github.com/repos/fog/fog-ecloud/releases{/id}","created_at":"2014-11-14T14:53:39Z","updated_at":"2015-04-06T19:33:55Z","pushed_at":"2015-06-17T16:20:44Z","git_url":"git://github.com/fog/fog-ecloud.git","ssh_url":"git@github.com:fog/fog-ecloud.git","clone_url":"https://github.com/fog/fog-ecloud.git","svn_url":"https://github.com/fog/fog-ecloud","homepage":"https://services.enterprisecloud.terremark.com","size":591,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fog/fog-ecloud/pulls/13"},"html":{"href":"https://github.com/fog/fog-ecloud/pull/13"},"issue":{"href":"https://api.github.com/repos/fog/fog-ecloud/issues/13"},"comments":{"href":"https://api.github.com/repos/fog/fog-ecloud/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/fog/fog-ecloud/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/fog/fog-ecloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fog/fog-ecloud/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/fog/fog-ecloud/statuses/3d4ec20c082e9f1967c1de43fca354e1ad4e3b8b"}}}}