{"action":"created","comment":{"url":"https://api.github.com/repos/rackspace/gophercloud/pulls/comments/24549847","id":24549847,"diff_hunk":"@@ -0,0 +1,169 @@\n+package firewalls\n+\n+import (\n+\t\"github.com/racker/perigee\"\n+\t\"github.com/rackspace/gophercloud\"\n+\t\"github.com/rackspace/gophercloud/pagination\"\n+)\n+\n+type ListOpts struct {\n+\tTenantID     string `q:\"tenant_id\"`\n+\tName         string `q:\"name\"`\n+\tDescription  string `q:\"description\"`\n+\tAdminStateUp bool   `q:\"admin_state_up\"`\n+\tShared       bool   `q:\"shared\"`\n+\tPolicyID     string `q:\"firewall_policy_id\"`\n+\tID           string `q:\"id\"`\n+\tLimit        int    `q:\"limit\"`\n+\tMarker       string `q:\"marker\"`\n+\tSortKey      string `q:\"sort_key\"`\n+\tSortDir      string `q:\"sort_dir\"`\n+}\n+\n+// List returns a Pager which allows you to iterate over a collection of\n+// firewalls. It accepts a ListOpts struct, which allows you to filter\n+// and sort the returned collection for greater efficiency.\n+//\n+// Default policy settings return only those firewalls that are owned by the\n+// tenant who submits the request, unless an admin user submits the request.\n+func List(c *gophercloud.ServiceClient, opts ListOpts) pagination.Pager {\n+\tq, err := gophercloud.BuildQueryString(&opts)\n+\tif err != nil {\n+\t\treturn pagination.Pager{Err: err}\n+\t}\n+\tu := rootURL(c) + q.String()\n+\treturn pagination.NewPager(c, u, func(r pagination.PageResult) pagination.Page {\n+\t\treturn FirewallPage{pagination.LinkedPageBase{PageResult: r}}\n+\t})\n+}\n+\n+// CreateOpts contains all the values needed to create a new firewall.\n+type CreateOpts struct {\n+\t// Only required if the caller has an admin role and wants to create a firewall\n+\t// for another tenant.\n+\tTenantID     string\n+\tName         string\n+\tDescription  string\n+\tAdminStateUp *bool","path":"openstack/networking/v2/extensions/fwaas/firewalls/requests.go","position":65,"original_position":47,"commit_id":"dca32b629442bed69429c8ab8a16fc14ee40cb50","original_commit_id":"10f1c58a708ab2da4740d4cf9248860b79e334b6","user":{"login":"ggiamarchi","id":1434745,"avatar_url":"https://avatars.githubusercontent.com/u/1434745?v=3","gravatar_id":"","url":"https://api.github.com/users/ggiamarchi","html_url":"https://github.com/ggiamarchi","followers_url":"https://api.github.com/users/ggiamarchi/followers","following_url":"https://api.github.com/users/ggiamarchi/following{/other_user}","gists_url":"https://api.github.com/users/ggiamarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/ggiamarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggiamarchi/subscriptions","organizations_url":"https://api.github.com/users/ggiamarchi/orgs","repos_url":"https://api.github.com/users/ggiamarchi/repos","events_url":"https://api.github.com/users/ggiamarchi/events{/privacy}","received_events_url":"https://api.github.com/users/ggiamarchi/received_events","type":"User","site_admin":false},"body":"Done in b2a5a9f","created_at":"2015-02-12T00:53:58Z","updated_at":"2015-02-12T00:53:58Z","html_url":"https://github.com/rackspace/gophercloud/pull/342#discussion_r24549847","pull_request_url":"https://api.github.com/repos/rackspace/gophercloud/pulls/342","_links":{"self":{"href":"https://api.github.com/repos/rackspace/gophercloud/pulls/comments/24549847"},"html":{"href":"https://github.com/rackspace/gophercloud/pull/342#discussion_r24549847"},"pull_request":{"href":"https://api.github.com/repos/rackspace/gophercloud/pulls/342"}}},"pull_request":{"url":"https://api.github.com/repos/rackspace/gophercloud/pulls/342","id":28075405,"html_url":"https://github.com/rackspace/gophercloud/pull/342","diff_url":"https://github.com/rackspace/gophercloud/pull/342.diff","patch_url":"https://github.com/rackspace/gophercloud/pull/342.patch","issue_url":"https://api.github.com/repos/rackspace/gophercloud/issues/342","number":342,"state":"open","locked":false,"title":"OpenStack Firewall as a Service","user":{"login":"ggiamarchi","id":1434745,"avatar_url":"https://avatars.githubusercontent.com/u/1434745?v=3","gravatar_id":"","url":"https://api.github.com/users/ggiamarchi","html_url":"https://github.com/ggiamarchi","followers_url":"https://api.github.com/users/ggiamarchi/followers","following_url":"https://api.github.com/users/ggiamarchi/following{/other_user}","gists_url":"https://api.github.com/users/ggiamarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/ggiamarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggiamarchi/subscriptions","organizations_url":"https://api.github.com/users/ggiamarchi/orgs","repos_url":"https://api.github.com/users/ggiamarchi/repos","events_url":"https://api.github.com/users/ggiamarchi/events{/privacy}","received_events_url":"https://api.github.com/users/ggiamarchi/received_events","type":"User","site_admin":false},"body":"__To-do list__\r\n\r\n* Firewall rules\r\n  * [x] CRUD implementation\r\n  * [x] Unit tests\r\n  * [x] Acceptance tests\r\n* Firewall policies\r\n  * [x] CRUD implementation\r\n  * [x] Insert and remove rules implementation\r\n  * [x] Unit tests\r\n  * [x] Acceptance tests\r\n* Firewalls\r\n  * [x] CRUD implementation\r\n  * [x] Unit tests\r\n  * [x] Acceptance tests\r\n","created_at":"2015-01-27T01:05:49Z","updated_at":"2015-02-12T00:53:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"031493ffa4e773214042188bf9486a11d3ee23ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackspace/gophercloud/pulls/342/commits","review_comments_url":"https://api.github.com/repos/rackspace/gophercloud/pulls/342/comments","review_comment_url":"https://api.github.com/repos/rackspace/gophercloud/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rackspace/gophercloud/issues/342/comments","statuses_url":"https://api.github.com/repos/rackspace/gophercloud/statuses/dca32b629442bed69429c8ab8a16fc14ee40cb50","head":{"label":"ggiamarchi:fwaas","ref":"fwaas","sha":"dca32b629442bed69429c8ab8a16fc14ee40cb50","user":{"login":"ggiamarchi","id":1434745,"avatar_url":"https://avatars.githubusercontent.com/u/1434745?v=3","gravatar_id":"","url":"https://api.github.com/users/ggiamarchi","html_url":"https://github.com/ggiamarchi","followers_url":"https://api.github.com/users/ggiamarchi/followers","following_url":"https://api.github.com/users/ggiamarchi/following{/other_user}","gists_url":"https://api.github.com/users/ggiamarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/ggiamarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggiamarchi/subscriptions","organizations_url":"https://api.github.com/users/ggiamarchi/orgs","repos_url":"https://api.github.com/users/ggiamarchi/repos","events_url":"https://api.github.com/users/ggiamarchi/events{/privacy}","received_events_url":"https://api.github.com/users/ggiamarchi/received_events","type":"User","site_admin":false},"repo":{"id":29889757,"name":"gophercloud","full_name":"ggiamarchi/gophercloud","owner":{"login":"ggiamarchi","id":1434745,"avatar_url":"https://avatars.githubusercontent.com/u/1434745?v=3","gravatar_id":"","url":"https://api.github.com/users/ggiamarchi","html_url":"https://github.com/ggiamarchi","followers_url":"https://api.github.com/users/ggiamarchi/followers","following_url":"https://api.github.com/users/ggiamarchi/following{/other_user}","gists_url":"https://api.github.com/users/ggiamarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/ggiamarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggiamarchi/subscriptions","organizations_url":"https://api.github.com/users/ggiamarchi/orgs","repos_url":"https://api.github.com/users/ggiamarchi/repos","events_url":"https://api.github.com/users/ggiamarchi/events{/privacy}","received_events_url":"https://api.github.com/users/ggiamarchi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ggiamarchi/gophercloud","description":"The Go SDK for Openstack.","fork":true,"url":"https://api.github.com/repos/ggiamarchi/gophercloud","forks_url":"https://api.github.com/repos/ggiamarchi/gophercloud/forks","keys_url":"https://api.github.com/repos/ggiamarchi/gophercloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ggiamarchi/gophercloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ggiamarchi/gophercloud/teams","hooks_url":"https://api.github.com/repos/ggiamarchi/gophercloud/hooks","issue_events_url":"https://api.github.com/repos/ggiamarchi/gophercloud/issues/events{/number}","events_url":"https://api.github.com/repos/ggiamarchi/gophercloud/events","assignees_url":"https://api.github.com/repos/ggiamarchi/gophercloud/assignees{/user}","branches_url":"https://api.github.com/repos/ggiamarchi/gophercloud/branches{/branch}","tags_url":"https://api.github.com/repos/ggiamarchi/gophercloud/tags","blobs_url":"https://api.github.com/repos/ggiamarchi/gophercloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ggiamarchi/gophercloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ggiamarchi/gophercloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/ggiamarchi/gophercloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ggiamarchi/gophercloud/statuses/{sha}","languages_url":"https://api.github.com/repos/ggiamarchi/gophercloud/languages","stargazers_url":"https://api.github.com/repos/ggiamarchi/gophercloud/stargazers","contributors_url":"https://api.github.com/repos/ggiamarchi/gophercloud/contributors","subscribers_url":"https://api.github.com/repos/ggiamarchi/gophercloud/subscribers","subscription_url":"https://api.github.com/repos/ggiamarchi/gophercloud/subscription","commits_url":"https://api.github.com/repos/ggiamarchi/gophercloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/ggiamarchi/gophercloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/ggiamarchi/gophercloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/ggiamarchi/gophercloud/issues/comments/{number}","contents_url":"https://api.github.com/repos/ggiamarchi/gophercloud/contents/{+path}","compare_url":"https://api.github.com/repos/ggiamarchi/gophercloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ggiamarchi/gophercloud/merges","archive_url":"https://api.github.com/repos/ggiamarchi/gophercloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ggiamarchi/gophercloud/downloads","issues_url":"https://api.github.com/repos/ggiamarchi/gophercloud/issues{/number}","pulls_url":"https://api.github.com/repos/ggiamarchi/gophercloud/pulls{/number}","milestones_url":"https://api.github.com/repos/ggiamarchi/gophercloud/milestones{/number}","notifications_url":"https://api.github.com/repos/ggiamarchi/gophercloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ggiamarchi/gophercloud/labels{/name}","releases_url":"https://api.github.com/repos/ggiamarchi/gophercloud/releases{/id}","created_at":"2015-01-27T00:39:31Z","updated_at":"2015-02-04T01:47:50Z","pushed_at":"2015-02-12T00:53:06Z","git_url":"git://github.com/ggiamarchi/gophercloud.git","ssh_url":"git@github.com:ggiamarchi/gophercloud.git","clone_url":"https://github.com/ggiamarchi/gophercloud.git","svn_url":"https://github.com/ggiamarchi/gophercloud","homepage":"gophercloud.io","size":8965,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rackspace:master","ref":"master","sha":"47d5c97e0a71b42cb4bb7130dc5dfab7d0ec2ddf","user":{"login":"rackspace","id":3949923,"avatar_url":"https://avatars.githubusercontent.com/u/3949923?v=3","gravatar_id":"","url":"https://api.github.com/users/rackspace","html_url":"https://github.com/rackspace","followers_url":"https://api.github.com/users/rackspace/followers","following_url":"https://api.github.com/users/rackspace/following{/other_user}","gists_url":"https://api.github.com/users/rackspace/gists{/gist_id}","starred_url":"https://api.github.com/users/rackspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackspace/subscriptions","organizations_url":"https://api.github.com/users/rackspace/orgs","repos_url":"https://api.github.com/users/rackspace/repos","events_url":"https://api.github.com/users/rackspace/events{/privacy}","received_events_url":"https://api.github.com/users/rackspace/received_events","type":"Organization","site_admin":false},"repo":{"id":10826219,"name":"gophercloud","full_name":"rackspace/gophercloud","owner":{"login":"rackspace","id":3949923,"avatar_url":"https://avatars.githubusercontent.com/u/3949923?v=3","gravatar_id":"","url":"https://api.github.com/users/rackspace","html_url":"https://github.com/rackspace","followers_url":"https://api.github.com/users/rackspace/followers","following_url":"https://api.github.com/users/rackspace/following{/other_user}","gists_url":"https://api.github.com/users/rackspace/gists{/gist_id}","starred_url":"https://api.github.com/users/rackspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackspace/subscriptions","organizations_url":"https://api.github.com/users/rackspace/orgs","repos_url":"https://api.github.com/users/rackspace/repos","events_url":"https://api.github.com/users/rackspace/events{/privacy}","received_events_url":"https://api.github.com/users/rackspace/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackspace/gophercloud","description":"The Go SDK for Openstack.","fork":false,"url":"https://api.github.com/repos/rackspace/gophercloud","forks_url":"https://api.github.com/repos/rackspace/gophercloud/forks","keys_url":"https://api.github.com/repos/rackspace/gophercloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackspace/gophercloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackspace/gophercloud/teams","hooks_url":"https://api.github.com/repos/rackspace/gophercloud/hooks","issue_events_url":"https://api.github.com/repos/rackspace/gophercloud/issues/events{/number}","events_url":"https://api.github.com/repos/rackspace/gophercloud/events","assignees_url":"https://api.github.com/repos/rackspace/gophercloud/assignees{/user}","branches_url":"https://api.github.com/repos/rackspace/gophercloud/branches{/branch}","tags_url":"https://api.github.com/repos/rackspace/gophercloud/tags","blobs_url":"https://api.github.com/repos/rackspace/gophercloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackspace/gophercloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackspace/gophercloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackspace/gophercloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackspace/gophercloud/statuses/{sha}","languages_url":"https://api.github.com/repos/rackspace/gophercloud/languages","stargazers_url":"https://api.github.com/repos/rackspace/gophercloud/stargazers","contributors_url":"https://api.github.com/repos/rackspace/gophercloud/contributors","subscribers_url":"https://api.github.com/repos/rackspace/gophercloud/subscribers","subscription_url":"https://api.github.com/repos/rackspace/gophercloud/subscription","commits_url":"https://api.github.com/repos/rackspace/gophercloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackspace/gophercloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackspace/gophercloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackspace/gophercloud/issues/comments/{number}","contents_url":"https://api.github.com/repos/rackspace/gophercloud/contents/{+path}","compare_url":"https://api.github.com/repos/rackspace/gophercloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackspace/gophercloud/merges","archive_url":"https://api.github.com/repos/rackspace/gophercloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackspace/gophercloud/downloads","issues_url":"https://api.github.com/repos/rackspace/gophercloud/issues{/number}","pulls_url":"https://api.github.com/repos/rackspace/gophercloud/pulls{/number}","milestones_url":"https://api.github.com/repos/rackspace/gophercloud/milestones{/number}","notifications_url":"https://api.github.com/repos/rackspace/gophercloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackspace/gophercloud/labels{/name}","releases_url":"https://api.github.com/repos/rackspace/gophercloud/releases{/id}","created_at":"2013-06-20T18:10:46Z","updated_at":"2015-02-11T12:23:49Z","pushed_at":"2015-02-11T04:03:21Z","git_url":"git://github.com/rackspace/gophercloud.git","ssh_url":"git@github.com:rackspace/gophercloud.git","clone_url":"https://github.com/rackspace/gophercloud.git","svn_url":"https://github.com/rackspace/gophercloud","homepage":"gophercloud.io","size":10970,"stargazers_count":256,"watchers_count":256,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":48,"mirror_url":null,"open_issues_count":23,"forks":48,"open_issues":23,"watchers":256,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackspace/gophercloud/pulls/342"},"html":{"href":"https://github.com/rackspace/gophercloud/pull/342"},"issue":{"href":"https://api.github.com/repos/rackspace/gophercloud/issues/342"},"comments":{"href":"https://api.github.com/repos/rackspace/gophercloud/issues/342/comments"},"review_comments":{"href":"https://api.github.com/repos/rackspace/gophercloud/pulls/342/comments"},"review_comment":{"href":"https://api.github.com/repos/rackspace/gophercloud/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rackspace/gophercloud/pulls/342/commits"},"statuses":{"href":"https://api.github.com/repos/rackspace/gophercloud/statuses/dca32b629442bed69429c8ab8a16fc14ee40cb50"}}}}