{"action":"opened","number":379,"pull_request":{"url":"https://api.github.com/repos/spulec/moto/pulls/379","id":40185393,"html_url":"https://github.com/spulec/moto/pull/379","diff_url":"https://github.com/spulec/moto/pull/379.diff","patch_url":"https://github.com/spulec/moto/pull/379.patch","issue_url":"https://api.github.com/repos/spulec/moto/issues/379","number":379,"state":"open","locked":false,"title":"implement load balancer policies mocking","user":{"login":"devmage","id":1923665,"avatar_url":"https://avatars.githubusercontent.com/u/1923665?v=3","gravatar_id":"","url":"https://api.github.com/users/devmage","html_url":"https://github.com/devmage","followers_url":"https://api.github.com/users/devmage/followers","following_url":"https://api.github.com/users/devmage/following{/other_user}","gists_url":"https://api.github.com/users/devmage/gists{/gist_id}","starred_url":"https://api.github.com/users/devmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devmage/subscriptions","organizations_url":"https://api.github.com/users/devmage/orgs","repos_url":"https://api.github.com/users/devmage/repos","events_url":"https://api.github.com/users/devmage/events{/privacy}","received_events_url":"https://api.github.com/users/devmage/received_events","type":"User","site_admin":false},"body":"Hey @spulec ! I'm doing some test work involving setting load balancer policies. My colleague and I found that these weren't implemented in moto, so we tried to accomplish that here.\r\n\r\nFor reference, the methods we sought to implement were:\r\n\r\n* `create_app_cookie_stickiness_policy` [doc](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_CreateAppCookieStickinessPolicy.html)\r\n* `create_cookie_stickiness_policy` [doc](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_CreateLBCookieStickinessPolicy.html)\r\n* **`create_lb_policy`** [doc](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_CreateLoadBalancerPolicy.html)\r\n* `set_policies_of_listener` [doc](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_SetLoadBalancerPoliciesOfListener.html)\r\n* **`set_policies_of_backend_server`** [doc](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_SetLoadBalancerPoliciesForBackendServer.html)\r\n\r\nThe two methods in bold are those we actually needed for our tests. We felt it made sense to implement the remaining three, since they appeared to be tightly related. All five are also described in [boto's elb documentation](http://boto.readthedocs.org/en/latest/ref/elb.html).\r\n\r\nSome use-cases for these methods include [configuring sticky sessions](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-sticky-sessions.html), [enabling proxy protocol support](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/enable-proxy-protocol.html), and [setting SSL security policies](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-create-https-ssl-load-balancer.html).\r\n\r\nWe were not sure as to the best way to mock the backend server description portion, so that may not reflect AWS reality very well. There also are arguments to be made for implementing `delete_load_balancer_policy` and `describe_load_balancer_policies` as part of this work, but we felt these methods were a good start for supporting policies (and they satisfy our needs for the moment).","created_at":"2015-07-16T22:59:54Z","updated_at":"2015-07-16T22:59:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7ca225a9541059acc30d8efc7c995e4f44e6843","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spulec/moto/pulls/379/commits","review_comments_url":"https://api.github.com/repos/spulec/moto/pulls/379/comments","review_comment_url":"https://api.github.com/repos/spulec/moto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spulec/moto/issues/379/comments","statuses_url":"https://api.github.com/repos/spulec/moto/statuses/a611010f864d0792b0839470b50dda18d8c5282f","head":{"label":"devmage:feature/lb-policies","ref":"feature/lb-policies","sha":"a611010f864d0792b0839470b50dda18d8c5282f","user":{"login":"devmage","id":1923665,"avatar_url":"https://avatars.githubusercontent.com/u/1923665?v=3","gravatar_id":"","url":"https://api.github.com/users/devmage","html_url":"https://github.com/devmage","followers_url":"https://api.github.com/users/devmage/followers","following_url":"https://api.github.com/users/devmage/following{/other_user}","gists_url":"https://api.github.com/users/devmage/gists{/gist_id}","starred_url":"https://api.github.com/users/devmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devmage/subscriptions","organizations_url":"https://api.github.com/users/devmage/orgs","repos_url":"https://api.github.com/users/devmage/repos","events_url":"https://api.github.com/users/devmage/events{/privacy}","received_events_url":"https://api.github.com/users/devmage/received_events","type":"User","site_admin":false},"repo":{"id":39214076,"name":"moto","full_name":"devmage/moto","owner":{"login":"devmage","id":1923665,"avatar_url":"https://avatars.githubusercontent.com/u/1923665?v=3","gravatar_id":"","url":"https://api.github.com/users/devmage","html_url":"https://github.com/devmage","followers_url":"https://api.github.com/users/devmage/followers","following_url":"https://api.github.com/users/devmage/following{/other_user}","gists_url":"https://api.github.com/users/devmage/gists{/gist_id}","starred_url":"https://api.github.com/users/devmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devmage/subscriptions","organizations_url":"https://api.github.com/users/devmage/orgs","repos_url":"https://api.github.com/users/devmage/repos","events_url":"https://api.github.com/users/devmage/events{/privacy}","received_events_url":"https://api.github.com/users/devmage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/devmage/moto","description":"Moto is a library that allows your python tests to easily mock out the boto library","fork":true,"url":"https://api.github.com/repos/devmage/moto","forks_url":"https://api.github.com/repos/devmage/moto/forks","keys_url":"https://api.github.com/repos/devmage/moto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devmage/moto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devmage/moto/teams","hooks_url":"https://api.github.com/repos/devmage/moto/hooks","issue_events_url":"https://api.github.com/repos/devmage/moto/issues/events{/number}","events_url":"https://api.github.com/repos/devmage/moto/events","assignees_url":"https://api.github.com/repos/devmage/moto/assignees{/user}","branches_url":"https://api.github.com/repos/devmage/moto/branches{/branch}","tags_url":"https://api.github.com/repos/devmage/moto/tags","blobs_url":"https://api.github.com/repos/devmage/moto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devmage/moto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devmage/moto/git/refs{/sha}","trees_url":"https://api.github.com/repos/devmage/moto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devmage/moto/statuses/{sha}","languages_url":"https://api.github.com/repos/devmage/moto/languages","stargazers_url":"https://api.github.com/repos/devmage/moto/stargazers","contributors_url":"https://api.github.com/repos/devmage/moto/contributors","subscribers_url":"https://api.github.com/repos/devmage/moto/subscribers","subscription_url":"https://api.github.com/repos/devmage/moto/subscription","commits_url":"https://api.github.com/repos/devmage/moto/commits{/sha}","git_commits_url":"https://api.github.com/repos/devmage/moto/git/commits{/sha}","comments_url":"https://api.github.com/repos/devmage/moto/comments{/number}","issue_comment_url":"https://api.github.com/repos/devmage/moto/issues/comments{/number}","contents_url":"https://api.github.com/repos/devmage/moto/contents/{+path}","compare_url":"https://api.github.com/repos/devmage/moto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devmage/moto/merges","archive_url":"https://api.github.com/repos/devmage/moto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devmage/moto/downloads","issues_url":"https://api.github.com/repos/devmage/moto/issues{/number}","pulls_url":"https://api.github.com/repos/devmage/moto/pulls{/number}","milestones_url":"https://api.github.com/repos/devmage/moto/milestones{/number}","notifications_url":"https://api.github.com/repos/devmage/moto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devmage/moto/labels{/name}","releases_url":"https://api.github.com/repos/devmage/moto/releases{/id}","created_at":"2015-07-16T18:41:16Z","updated_at":"2015-07-16T18:41:17Z","pushed_at":"2015-07-16T22:39:32Z","git_url":"git://github.com/devmage/moto.git","ssh_url":"git@github.com:devmage/moto.git","clone_url":"https://github.com/devmage/moto.git","svn_url":"https://github.com/devmage/moto","homepage":null,"size":4239,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"spulec:master","ref":"master","sha":"a63d7486173f3b717d35310ede5acfa87809deb2","user":{"login":"spulec","id":292606,"avatar_url":"https://avatars.githubusercontent.com/u/292606?v=3","gravatar_id":"","url":"https://api.github.com/users/spulec","html_url":"https://github.com/spulec","followers_url":"https://api.github.com/users/spulec/followers","following_url":"https://api.github.com/users/spulec/following{/other_user}","gists_url":"https://api.github.com/users/spulec/gists{/gist_id}","starred_url":"https://api.github.com/users/spulec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spulec/subscriptions","organizations_url":"https://api.github.com/users/spulec/orgs","repos_url":"https://api.github.com/users/spulec/repos","events_url":"https://api.github.com/users/spulec/events{/privacy}","received_events_url":"https://api.github.com/users/spulec/received_events","type":"User","site_admin":false},"repo":{"id":8277372,"name":"moto","full_name":"spulec/moto","owner":{"login":"spulec","id":292606,"avatar_url":"https://avatars.githubusercontent.com/u/292606?v=3","gravatar_id":"","url":"https://api.github.com/users/spulec","html_url":"https://github.com/spulec","followers_url":"https://api.github.com/users/spulec/followers","following_url":"https://api.github.com/users/spulec/following{/other_user}","gists_url":"https://api.github.com/users/spulec/gists{/gist_id}","starred_url":"https://api.github.com/users/spulec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spulec/subscriptions","organizations_url":"https://api.github.com/users/spulec/orgs","repos_url":"https://api.github.com/users/spulec/repos","events_url":"https://api.github.com/users/spulec/events{/privacy}","received_events_url":"https://api.github.com/users/spulec/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spulec/moto","description":"Moto is a library that allows your python tests to easily mock out the boto library","fork":false,"url":"https://api.github.com/repos/spulec/moto","forks_url":"https://api.github.com/repos/spulec/moto/forks","keys_url":"https://api.github.com/repos/spulec/moto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spulec/moto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spulec/moto/teams","hooks_url":"https://api.github.com/repos/spulec/moto/hooks","issue_events_url":"https://api.github.com/repos/spulec/moto/issues/events{/number}","events_url":"https://api.github.com/repos/spulec/moto/events","assignees_url":"https://api.github.com/repos/spulec/moto/assignees{/user}","branches_url":"https://api.github.com/repos/spulec/moto/branches{/branch}","tags_url":"https://api.github.com/repos/spulec/moto/tags","blobs_url":"https://api.github.com/repos/spulec/moto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spulec/moto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spulec/moto/git/refs{/sha}","trees_url":"https://api.github.com/repos/spulec/moto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spulec/moto/statuses/{sha}","languages_url":"https://api.github.com/repos/spulec/moto/languages","stargazers_url":"https://api.github.com/repos/spulec/moto/stargazers","contributors_url":"https://api.github.com/repos/spulec/moto/contributors","subscribers_url":"https://api.github.com/repos/spulec/moto/subscribers","subscription_url":"https://api.github.com/repos/spulec/moto/subscription","commits_url":"https://api.github.com/repos/spulec/moto/commits{/sha}","git_commits_url":"https://api.github.com/repos/spulec/moto/git/commits{/sha}","comments_url":"https://api.github.com/repos/spulec/moto/comments{/number}","issue_comment_url":"https://api.github.com/repos/spulec/moto/issues/comments{/number}","contents_url":"https://api.github.com/repos/spulec/moto/contents/{+path}","compare_url":"https://api.github.com/repos/spulec/moto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spulec/moto/merges","archive_url":"https://api.github.com/repos/spulec/moto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spulec/moto/downloads","issues_url":"https://api.github.com/repos/spulec/moto/issues{/number}","pulls_url":"https://api.github.com/repos/spulec/moto/pulls{/number}","milestones_url":"https://api.github.com/repos/spulec/moto/milestones{/number}","notifications_url":"https://api.github.com/repos/spulec/moto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spulec/moto/labels{/name}","releases_url":"https://api.github.com/repos/spulec/moto/releases{/id}","created_at":"2013-02-18T21:10:59Z","updated_at":"2015-07-16T18:24:50Z","pushed_at":"2015-07-16T22:59:54Z","git_url":"git://github.com/spulec/moto.git","ssh_url":"git@github.com:spulec/moto.git","clone_url":"https://github.com/spulec/moto.git","svn_url":"https://github.com/spulec/moto","homepage":null,"size":4239,"stargazers_count":509,"watchers_count":509,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":139,"mirror_url":null,"open_issues_count":26,"forks":139,"open_issues":26,"watchers":509,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spulec/moto/pulls/379"},"html":{"href":"https://github.com/spulec/moto/pull/379"},"issue":{"href":"https://api.github.com/repos/spulec/moto/issues/379"},"comments":{"href":"https://api.github.com/repos/spulec/moto/issues/379/comments"},"review_comments":{"href":"https://api.github.com/repos/spulec/moto/pulls/379/comments"},"review_comment":{"href":"https://api.github.com/repos/spulec/moto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spulec/moto/pulls/379/commits"},"statuses":{"href":"https://api.github.com/repos/spulec/moto/statuses/a611010f864d0792b0839470b50dda18d8c5282f"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":6,"additions":354,"deletions":14,"changed_files":6}}