{"action":"created","comment":{"url":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/comments/72978948","id":72978948,"diff_hunk":"@@ -0,0 +1,374 @@\n+---\n+layout: content\n+menu: learn\n+title: LBaaS\n+nav: network/lbaas-v2\n+---\n+\n+# LBaaS V2 (Load Balancer as a Service)\n+\n+drive the actual load balancing of requests. Thus, an Openstack operator can choose which back-end technology to use. The long-term vision for the project, however, is to provide a single API that allows a user to seamlessly move between different load balancing technologies should the operator choose to do so.\n+\n+LBaaS v2 was introduced in Kilo. LBaaS v1 was deprecated in Liberty.\n+\n+Both implementations use agents. The agents handle the HAProxy configuration and manage the HAProxy daemon. LBaaS v2 adds the concept of listeners to the LBaaS v1 load balancers. LBaaS v2 allows you to configure multiple listener ports on a single load balancer IP address.\n+\n+**LBaaS System Architecture**\n+\n+<img src=\"/assets/img/learn/lbaasv2-diagram.png\" height=\"400px\">\n+<p/>\n+\n+*Source: [http://docs.openstack.org/mitaka/networking-guide/adv-config-lbaas.html](http://docs.openstack.org/mitaka/networking-guide/adv-config-lbaas.html)\n+\n+## Load balancers\n+\n+The load balancer occupies a neutron network port and has an IP address assigned from a subnet.\n+\n+\n+### Querying\n+\n+**List all Load Balancers**\n+\n+{:.prettyprint .lang-java}\n+\tList<? extends LoadBalancerV2> loadbalancers = os.networking().lbaasV2().loadbalancer().list();\n+\n+**Listing all Load Balancers with `filters`**\n+\n+{:.prettyprint .lang-java}\n+\tMap<String,String> filter = new HashMap<String,String>();\n+\tfilter.put(\"name\", \"lb1\");\n+\n+\tList<? extends LoadBalancerV2> loadbalancers = os.networking().lbaasV2().loadbalancer().list(filter);\n+\n+**Finding a Load Balancer by ID**\n+\n+{:.prettyprint .lang-java}\n+\tLoadBalancerV2 loadbalancer = os.networking().lbaasV2().loadbalancer().get(loadbalancerId);\n+\n+### Statistics\n+\n+**Load Balancer Statistics**\n+\n+Provides statistics such as `BytesIn`, `BytesOut`, `ActiveConnections` and `TotalConnections` for a specified load balancer\n+\n+{:.prettyprint .lang-java}\n+\tLoadBalancerV2Stats stats = os.networking().lbaasV2().loadbalancer().stats(loadbalancerId));\n+\n+### Load balancer Status Tree\n+\n+Provides a view of all the objects connected to the loadbalancer, such as `listeners`, `pools`,  `members`, and  `healthmonitor`\n+{:.prettyprint .lang-java}\n+\tLoadBalancerV2StatusTree lbst = os.networking().lbaasV2().loadbalancer().statusTree(loadbalancerId);\n+\n+### Creating / Updating / Deleting\n+\n+**Creating a Load Balancer**\n+\n+{:.prettyprint .lang-java}\n+\tLoadBalancerV2 loadbalancer = os.networking().lbaasV2().loadbalancer()\n+                    .create(Builders.loadbalancerV2()\n+                       .name(\"loadbalancer1\")\n+                       .description(\"my loadbalancer\")\n+                       .tenantId(tenantId)\n+                       .subnetId(subnetId)\n+                       .address(\"10.0.0.4\")\n+                       .build());\n+\n+**Updating a Load Balancer**\n+\n+{:.prettyprint .lang-java}\n+\tLoadBalancerV2 updated = os.networking().lbaasV2().loadbalancer()\n+                    .update(loadbalancerId, Builders.loadBalancerV2Update()\n+                       .description(\"updated loadbalancer\")\n+                       .name(\"loadbalancerUpdate\")\n+                       .adminStateUp(true)\n+                       .build());\n+\n+**Deleting a Load Balancer**\n+\n+{:.prettyprint .lang-java}\n+\tActionResponse resp = os.networking().lbaasV2().loadbalancer().delete(loadbalancerId);\n+\n+## Listeners\n+\n+Load balancers can listen for requests on multiple ports. Each one of those ports is specified by a listener.","path":"learn/network/networks-lbaas-v2.md","position":94,"original_position":94,"commit_id":"befb3228c6e75e13902c3a443985de86ee823e65","original_commit_id":"befb3228c6e75e13902c3a443985de86ee823e65","user":{"login":"ashleykasim","id":2972218,"avatar_url":"https://avatars.githubusercontent.com/u/2972218?v=3","gravatar_id":"","url":"https://api.github.com/users/ashleykasim","html_url":"https://github.com/ashleykasim","followers_url":"https://api.github.com/users/ashleykasim/followers","following_url":"https://api.github.com/users/ashleykasim/following{/other_user}","gists_url":"https://api.github.com/users/ashleykasim/gists{/gist_id}","starred_url":"https://api.github.com/users/ashleykasim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashleykasim/subscriptions","organizations_url":"https://api.github.com/users/ashleykasim/orgs","repos_url":"https://api.github.com/users/ashleykasim/repos","events_url":"https://api.github.com/users/ashleykasim/events{/privacy}","received_events_url":"https://api.github.com/users/ashleykasim/received_events","type":"User","site_admin":false},"body":"again inconsistent capitalization of \"Load balancer\". Also, should \"listener\" be capitalized?","created_at":"2016-08-01T13:40:18Z","updated_at":"2016-08-01T13:40:18Z","html_url":"https://github.com/VeritasOS/openstack4j.com/pull/1#discussion_r72978948","pull_request_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/comments/72978948"},"html":{"href":"https://github.com/VeritasOS/openstack4j.com/pull/1#discussion_r72978948"},"pull_request":{"href":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/1","id":79436929,"html_url":"https://github.com/VeritasOS/openstack4j.com/pull/1","diff_url":"https://github.com/VeritasOS/openstack4j.com/pull/1.diff","patch_url":"https://github.com/VeritasOS/openstack4j.com/pull/1.patch","issue_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/issues/1","number":1,"state":"open","locked":false,"title":"including lbaasv2 in documentation, changing url for lbaasv2","user":{"login":"emjburns","id":8454927,"avatar_url":"https://avatars.githubusercontent.com/u/8454927?v=3","gravatar_id":"","url":"https://api.github.com/users/emjburns","html_url":"https://github.com/emjburns","followers_url":"https://api.github.com/users/emjburns/followers","following_url":"https://api.github.com/users/emjburns/following{/other_user}","gists_url":"https://api.github.com/users/emjburns/gists{/gist_id}","starred_url":"https://api.github.com/users/emjburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emjburns/subscriptions","organizations_url":"https://api.github.com/users/emjburns/orgs","repos_url":"https://api.github.com/users/emjburns/repos","events_url":"https://api.github.com/users/emjburns/events{/privacy}","received_events_url":"https://api.github.com/users/emjburns/received_events","type":"User","site_admin":false},"body":"* For feedback only. Don't merge *\r\n\r\nChanging url of lbaasv1 (formerly networks-lbaas) to networks-lbaas-v1 because liquid templates don't have \"does not contain\" matching. Because of this, if v1 stayed as is, I couldn't figure out how to get the right side menu collapse behavior. Suggestions welcome.","created_at":"2016-07-29T23:08:47Z","updated_at":"2016-08-01T13:40:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a4bfce9ed5adc072909768f69728e8d66ca82cb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/1/commits","review_comments_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/1/comments","review_comment_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/issues/1/comments","statuses_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/statuses/befb3228c6e75e13902c3a443985de86ee823e65","head":{"label":"emjburns:master","ref":"master","sha":"befb3228c6e75e13902c3a443985de86ee823e65","user":{"login":"emjburns","id":8454927,"avatar_url":"https://avatars.githubusercontent.com/u/8454927?v=3","gravatar_id":"","url":"https://api.github.com/users/emjburns","html_url":"https://github.com/emjburns","followers_url":"https://api.github.com/users/emjburns/followers","following_url":"https://api.github.com/users/emjburns/following{/other_user}","gists_url":"https://api.github.com/users/emjburns/gists{/gist_id}","starred_url":"https://api.github.com/users/emjburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emjburns/subscriptions","organizations_url":"https://api.github.com/users/emjburns/orgs","repos_url":"https://api.github.com/users/emjburns/repos","events_url":"https://api.github.com/users/emjburns/events{/privacy}","received_events_url":"https://api.github.com/users/emjburns/received_events","type":"User","site_admin":false},"repo":{"id":64505005,"name":"openstack4j.com","full_name":"emjburns/openstack4j.com","owner":{"login":"emjburns","id":8454927,"avatar_url":"https://avatars.githubusercontent.com/u/8454927?v=3","gravatar_id":"","url":"https://api.github.com/users/emjburns","html_url":"https://github.com/emjburns","followers_url":"https://api.github.com/users/emjburns/followers","following_url":"https://api.github.com/users/emjburns/following{/other_user}","gists_url":"https://api.github.com/users/emjburns/gists{/gist_id}","starred_url":"https://api.github.com/users/emjburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emjburns/subscriptions","organizations_url":"https://api.github.com/users/emjburns/orgs","repos_url":"https://api.github.com/users/emjburns/repos","events_url":"https://api.github.com/users/emjburns/events{/privacy}","received_events_url":"https://api.github.com/users/emjburns/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emjburns/openstack4j.com","description":"OpenStack4j Website Source","fork":true,"url":"https://api.github.com/repos/emjburns/openstack4j.com","forks_url":"https://api.github.com/repos/emjburns/openstack4j.com/forks","keys_url":"https://api.github.com/repos/emjburns/openstack4j.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emjburns/openstack4j.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emjburns/openstack4j.com/teams","hooks_url":"https://api.github.com/repos/emjburns/openstack4j.com/hooks","issue_events_url":"https://api.github.com/repos/emjburns/openstack4j.com/issues/events{/number}","events_url":"https://api.github.com/repos/emjburns/openstack4j.com/events","assignees_url":"https://api.github.com/repos/emjburns/openstack4j.com/assignees{/user}","branches_url":"https://api.github.com/repos/emjburns/openstack4j.com/branches{/branch}","tags_url":"https://api.github.com/repos/emjburns/openstack4j.com/tags","blobs_url":"https://api.github.com/repos/emjburns/openstack4j.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emjburns/openstack4j.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emjburns/openstack4j.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/emjburns/openstack4j.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emjburns/openstack4j.com/statuses/{sha}","languages_url":"https://api.github.com/repos/emjburns/openstack4j.com/languages","stargazers_url":"https://api.github.com/repos/emjburns/openstack4j.com/stargazers","contributors_url":"https://api.github.com/repos/emjburns/openstack4j.com/contributors","subscribers_url":"https://api.github.com/repos/emjburns/openstack4j.com/subscribers","subscription_url":"https://api.github.com/repos/emjburns/openstack4j.com/subscription","commits_url":"https://api.github.com/repos/emjburns/openstack4j.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/emjburns/openstack4j.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/emjburns/openstack4j.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/emjburns/openstack4j.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/emjburns/openstack4j.com/contents/{+path}","compare_url":"https://api.github.com/repos/emjburns/openstack4j.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emjburns/openstack4j.com/merges","archive_url":"https://api.github.com/repos/emjburns/openstack4j.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emjburns/openstack4j.com/downloads","issues_url":"https://api.github.com/repos/emjburns/openstack4j.com/issues{/number}","pulls_url":"https://api.github.com/repos/emjburns/openstack4j.com/pulls{/number}","milestones_url":"https://api.github.com/repos/emjburns/openstack4j.com/milestones{/number}","notifications_url":"https://api.github.com/repos/emjburns/openstack4j.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emjburns/openstack4j.com/labels{/name}","releases_url":"https://api.github.com/repos/emjburns/openstack4j.com/releases{/id}","deployments_url":"https://api.github.com/repos/emjburns/openstack4j.com/deployments","created_at":"2016-07-29T19:19:12Z","updated_at":"2016-07-29T19:19:14Z","pushed_at":"2016-07-29T23:06:59Z","git_url":"git://github.com/emjburns/openstack4j.com.git","ssh_url":"git@github.com:emjburns/openstack4j.com.git","clone_url":"https://github.com/emjburns/openstack4j.com.git","svn_url":"https://github.com/emjburns/openstack4j.com","homepage":null,"size":17095,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"VeritasOS:master","ref":"master","sha":"72c2e56210999eefe6a222ab2e8e63eae541c9c4","user":{"login":"VeritasOS","id":19485521,"avatar_url":"https://avatars.githubusercontent.com/u/19485521?v=3","gravatar_id":"","url":"https://api.github.com/users/VeritasOS","html_url":"https://github.com/VeritasOS","followers_url":"https://api.github.com/users/VeritasOS/followers","following_url":"https://api.github.com/users/VeritasOS/following{/other_user}","gists_url":"https://api.github.com/users/VeritasOS/gists{/gist_id}","starred_url":"https://api.github.com/users/VeritasOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VeritasOS/subscriptions","organizations_url":"https://api.github.com/users/VeritasOS/orgs","repos_url":"https://api.github.com/users/VeritasOS/repos","events_url":"https://api.github.com/users/VeritasOS/events{/privacy}","received_events_url":"https://api.github.com/users/VeritasOS/received_events","type":"Organization","site_admin":false},"repo":{"id":64514748,"name":"openstack4j.com","full_name":"VeritasOS/openstack4j.com","owner":{"login":"VeritasOS","id":19485521,"avatar_url":"https://avatars.githubusercontent.com/u/19485521?v=3","gravatar_id":"","url":"https://api.github.com/users/VeritasOS","html_url":"https://github.com/VeritasOS","followers_url":"https://api.github.com/users/VeritasOS/followers","following_url":"https://api.github.com/users/VeritasOS/following{/other_user}","gists_url":"https://api.github.com/users/VeritasOS/gists{/gist_id}","starred_url":"https://api.github.com/users/VeritasOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VeritasOS/subscriptions","organizations_url":"https://api.github.com/users/VeritasOS/orgs","repos_url":"https://api.github.com/users/VeritasOS/repos","events_url":"https://api.github.com/users/VeritasOS/events{/privacy}","received_events_url":"https://api.github.com/users/VeritasOS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VeritasOS/openstack4j.com","description":"OpenStack4j Website Source","fork":true,"url":"https://api.github.com/repos/VeritasOS/openstack4j.com","forks_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/forks","keys_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/teams","hooks_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/hooks","issue_events_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/issues/events{/number}","events_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/events","assignees_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/assignees{/user}","branches_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/branches{/branch}","tags_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/tags","blobs_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/statuses/{sha}","languages_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/languages","stargazers_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/stargazers","contributors_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/contributors","subscribers_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/subscribers","subscription_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/subscription","commits_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/contents/{+path}","compare_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/merges","archive_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/downloads","issues_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/issues{/number}","pulls_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls{/number}","milestones_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/milestones{/number}","notifications_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/labels{/name}","releases_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/releases{/id}","deployments_url":"https://api.github.com/repos/VeritasOS/openstack4j.com/deployments","created_at":"2016-07-29T22:53:14Z","updated_at":"2016-07-29T22:53:16Z","pushed_at":"2016-07-29T23:08:47Z","git_url":"git://github.com/VeritasOS/openstack4j.com.git","ssh_url":"git@github.com:VeritasOS/openstack4j.com.git","clone_url":"https://github.com/VeritasOS/openstack4j.com.git","svn_url":"https://github.com/VeritasOS/openstack4j.com","homepage":null,"size":17070,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/1"},"html":{"href":"https://github.com/VeritasOS/openstack4j.com/pull/1"},"issue":{"href":"https://api.github.com/repos/VeritasOS/openstack4j.com/issues/1"},"comments":{"href":"https://api.github.com/repos/VeritasOS/openstack4j.com/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/VeritasOS/openstack4j.com/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/VeritasOS/openstack4j.com/statuses/befb3228c6e75e13902c3a443985de86ee823e65"}}}}
{"actor":{"display_login":"ashleykasim"}}