{"action":"created","comment":{"url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments/66852096","id":66852096,"diff_hunk":"@@ -0,0 +1,55 @@\n+/*\n+ * Copyright 2016 Target, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ *\n+ */\n+\n+package com.netflix.spinnaker.clouddriver.openstack.deploy.ops.securitygroup\n+\n+import com.netflix.spinnaker.clouddriver.data.task.Task\n+import com.netflix.spinnaker.clouddriver.data.task.TaskRepository\n+import com.netflix.spinnaker.clouddriver.openstack.deploy.description.securitygroup.DeleteOpenstackSecurityGroupDescription\n+import com.netflix.spinnaker.clouddriver.orchestration.AtomicOperation\n+\n+/**\n+ * Deletes an Openstack security group\n+ */\n+class DeleteOpenstackSecurityGroupAtomicOperation implements AtomicOperation<Void> {\n+\n+  private final String BASE_PHASE = \"DELETE_SECURITY_GROUP\"\n+  DeleteOpenstackSecurityGroupDescription description\n+\n+  DeleteOpenstackSecurityGroupAtomicOperation(DeleteOpenstackSecurityGroupDescription description) {\n+    this.description = description\n+  }\n+\n+  protected static Task getTask() {\n+    TaskRepository.threadLocalTask.get()\n+  }\n+\n+  /*\n+   * Delete:\n+   * curl -X POST -H \"Content-Type: application/json\" -d '[ { \"deleteSecurityGroup\": { \"account\": \"test\", \"region\": \"west\", \"id\": \"ee411748-88b5-4825-a9d4-ec549d1a1276\" } } ]' localhost:7002/openstack/ops\n+   * Task status:\n+   * curl -X GET -H \"Accept: application/json\" localhost:7002/task/1\n+   */\n+  @Override\n+  Void operate(List priorOutputs) {\n+    task.updateStatus(BASE_PHASE, \"Deleting security group ${description.id}\")\n+\n+    description.credentials.provider.deleteSecurityGroup(description.region, description.id)","path":"clouddriver-openstack/src/main/groovy/com/netflix/spinnaker/clouddriver/openstack/deploy/ops/securitygroup/DeleteOpenstackSecurityGroupAtomicOperation.groovy","position":51,"original_position":51,"commit_id":"c837b714cbe3e23fbc5159d58d2bf20eaf908ccb","original_commit_id":"c837b714cbe3e23fbc5159d58d2bf20eaf908ccb","user":{"login":"lwander","id":4874941,"avatar_url":"https://avatars.githubusercontent.com/u/4874941?v=3","gravatar_id":"","url":"https://api.github.com/users/lwander","html_url":"https://github.com/lwander","followers_url":"https://api.github.com/users/lwander/followers","following_url":"https://api.github.com/users/lwander/following{/other_user}","gists_url":"https://api.github.com/users/lwander/gists{/gist_id}","starred_url":"https://api.github.com/users/lwander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwander/subscriptions","organizations_url":"https://api.github.com/users/lwander/orgs","repos_url":"https://api.github.com/users/lwander/repos","events_url":"https://api.github.com/users/lwander/events{/privacy}","received_events_url":"https://api.github.com/users/lwander/received_events","type":"User","site_admin":false},"body":"What happens to instances/server groups associated with this security group after deletion?","created_at":"2016-06-13T19:29:36Z","updated_at":"2016-06-13T19:29:36Z","html_url":"https://github.com/spinnaker/clouddriver/pull/672#discussion_r66852096","pull_request_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/672","_links":{"self":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments/66852096"},"html":{"href":"https://github.com/spinnaker/clouddriver/pull/672#discussion_r66852096"},"pull_request":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/672"}}},"pull_request":{"url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/672","id":73378591,"html_url":"https://github.com/spinnaker/clouddriver/pull/672","diff_url":"https://github.com/spinnaker/clouddriver/pull/672.diff","patch_url":"https://github.com/spinnaker/clouddriver/pull/672.patch","issue_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/672","number":672,"state":"open","locked":false,"title":"Feature securitygroup delete","user":{"login":"varikin","id":14263,"avatar_url":"https://avatars.githubusercontent.com/u/14263?v=3","gravatar_id":"","url":"https://api.github.com/users/varikin","html_url":"https://github.com/varikin","followers_url":"https://api.github.com/users/varikin/followers","following_url":"https://api.github.com/users/varikin/following{/other_user}","gists_url":"https://api.github.com/users/varikin/gists{/gist_id}","starred_url":"https://api.github.com/users/varikin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varikin/subscriptions","organizations_url":"https://api.github.com/users/varikin/orgs","repos_url":"https://api.github.com/users/varikin/repos","events_url":"https://api.github.com/users/varikin/events{/privacy}","received_events_url":"https://api.github.com/users/varikin/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-10T14:04:00Z","updated_at":"2016-06-13T19:29:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b75d32216f3000867f398254e7d1d1c69804817b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/672/commits","review_comments_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/672/comments","review_comment_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/672/comments","statuses_url":"https://api.github.com/repos/spinnaker/clouddriver/statuses/c837b714cbe3e23fbc5159d58d2bf20eaf908ccb","head":{"label":"target:feature_securitygroup_delete_2","ref":"feature_securitygroup_delete_2","sha":"c837b714cbe3e23fbc5159d58d2bf20eaf908ccb","user":{"login":"target","id":932489,"avatar_url":"https://avatars.githubusercontent.com/u/932489?v=3","gravatar_id":"","url":"https://api.github.com/users/target","html_url":"https://github.com/target","followers_url":"https://api.github.com/users/target/followers","following_url":"https://api.github.com/users/target/following{/other_user}","gists_url":"https://api.github.com/users/target/gists{/gist_id}","starred_url":"https://api.github.com/users/target/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/target/subscriptions","organizations_url":"https://api.github.com/users/target/orgs","repos_url":"https://api.github.com/users/target/repos","events_url":"https://api.github.com/users/target/events{/privacy}","received_events_url":"https://api.github.com/users/target/received_events","type":"Organization","site_admin":false},"repo":{"id":58946721,"name":"clouddriver","full_name":"target/clouddriver","owner":{"login":"target","id":932489,"avatar_url":"https://avatars.githubusercontent.com/u/932489?v=3","gravatar_id":"","url":"https://api.github.com/users/target","html_url":"https://github.com/target","followers_url":"https://api.github.com/users/target/followers","following_url":"https://api.github.com/users/target/following{/other_user}","gists_url":"https://api.github.com/users/target/gists{/gist_id}","starred_url":"https://api.github.com/users/target/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/target/subscriptions","organizations_url":"https://api.github.com/users/target/orgs","repos_url":"https://api.github.com/users/target/repos","events_url":"https://api.github.com/users/target/events{/privacy}","received_events_url":"https://api.github.com/users/target/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/target/clouddriver","description":"read and write operations across cloud providers","fork":true,"url":"https://api.github.com/repos/target/clouddriver","forks_url":"https://api.github.com/repos/target/clouddriver/forks","keys_url":"https://api.github.com/repos/target/clouddriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/target/clouddriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/target/clouddriver/teams","hooks_url":"https://api.github.com/repos/target/clouddriver/hooks","issue_events_url":"https://api.github.com/repos/target/clouddriver/issues/events{/number}","events_url":"https://api.github.com/repos/target/clouddriver/events","assignees_url":"https://api.github.com/repos/target/clouddriver/assignees{/user}","branches_url":"https://api.github.com/repos/target/clouddriver/branches{/branch}","tags_url":"https://api.github.com/repos/target/clouddriver/tags","blobs_url":"https://api.github.com/repos/target/clouddriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/target/clouddriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/target/clouddriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/target/clouddriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/target/clouddriver/statuses/{sha}","languages_url":"https://api.github.com/repos/target/clouddriver/languages","stargazers_url":"https://api.github.com/repos/target/clouddriver/stargazers","contributors_url":"https://api.github.com/repos/target/clouddriver/contributors","subscribers_url":"https://api.github.com/repos/target/clouddriver/subscribers","subscription_url":"https://api.github.com/repos/target/clouddriver/subscription","commits_url":"https://api.github.com/repos/target/clouddriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/target/clouddriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/target/clouddriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/target/clouddriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/target/clouddriver/contents/{+path}","compare_url":"https://api.github.com/repos/target/clouddriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/target/clouddriver/merges","archive_url":"https://api.github.com/repos/target/clouddriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/target/clouddriver/downloads","issues_url":"https://api.github.com/repos/target/clouddriver/issues{/number}","pulls_url":"https://api.github.com/repos/target/clouddriver/pulls{/number}","milestones_url":"https://api.github.com/repos/target/clouddriver/milestones{/number}","notifications_url":"https://api.github.com/repos/target/clouddriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/target/clouddriver/labels{/name}","releases_url":"https://api.github.com/repos/target/clouddriver/releases{/id}","deployments_url":"https://api.github.com/repos/target/clouddriver/deployments","created_at":"2016-05-16T16:06:08Z","updated_at":"2016-05-16T16:06:14Z","pushed_at":"2016-06-13T18:54:15Z","git_url":"git://github.com/target/clouddriver.git","ssh_url":"git@github.com:target/clouddriver.git","clone_url":"https://github.com/target/clouddriver.git","svn_url":"https://github.com/target/clouddriver","homepage":null,"size":26743,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"spinnaker:master","ref":"master","sha":"cee8edbd8a15df6ceacbbb18437cd5ece4598adb","user":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":37556951,"name":"clouddriver","full_name":"spinnaker/clouddriver","owner":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spinnaker/clouddriver","description":"read and write operations across cloud providers","fork":false,"url":"https://api.github.com/repos/spinnaker/clouddriver","forks_url":"https://api.github.com/repos/spinnaker/clouddriver/forks","keys_url":"https://api.github.com/repos/spinnaker/clouddriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/clouddriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/clouddriver/teams","hooks_url":"https://api.github.com/repos/spinnaker/clouddriver/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/clouddriver/events","assignees_url":"https://api.github.com/repos/spinnaker/clouddriver/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/clouddriver/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/clouddriver/tags","blobs_url":"https://api.github.com/repos/spinnaker/clouddriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/clouddriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/clouddriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/clouddriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/clouddriver/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/clouddriver/languages","stargazers_url":"https://api.github.com/repos/spinnaker/clouddriver/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/clouddriver/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/clouddriver/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/clouddriver/subscription","commits_url":"https://api.github.com/repos/spinnaker/clouddriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/clouddriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/clouddriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/clouddriver/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/clouddriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/clouddriver/merges","archive_url":"https://api.github.com/repos/spinnaker/clouddriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/clouddriver/downloads","issues_url":"https://api.github.com/repos/spinnaker/clouddriver/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/clouddriver/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/clouddriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/clouddriver/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/clouddriver/releases{/id}","deployments_url":"https://api.github.com/repos/spinnaker/clouddriver/deployments","created_at":"2015-06-16T21:26:02Z","updated_at":"2016-06-12T22:38:05Z","pushed_at":"2016-06-13T18:54:16Z","git_url":"git://github.com/spinnaker/clouddriver.git","ssh_url":"git@github.com:spinnaker/clouddriver.git","clone_url":"https://github.com/spinnaker/clouddriver.git","svn_url":"https://github.com/spinnaker/clouddriver","homepage":null,"size":28734,"stargazers_count":53,"watchers_count":53,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":76,"mirror_url":null,"open_issues_count":11,"forks":76,"open_issues":11,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/672"},"html":{"href":"https://github.com/spinnaker/clouddriver/pull/672"},"issue":{"href":"https://api.github.com/repos/spinnaker/clouddriver/issues/672"},"comments":{"href":"https://api.github.com/repos/spinnaker/clouddriver/issues/672/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/672/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/672/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/clouddriver/statuses/c837b714cbe3e23fbc5159d58d2bf20eaf908ccb"}}}}
{"actor":{"display_login":"lwander"}}