{"action":"created","comment":{"url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/comments/26974406","id":26974406,"diff_hunk":"@@ -12,20 +12,16 @@\n #    License for the specific language governing permissions and limitations\n #    under the License.\n \n-import json\n+import a10_neutron_lbaas.handler_base as base\n+import neutron_ops\n \n \n-class HandlerBase(object):\n+class HandlerBaseV2(base.HandlerBase):\n \n-    def __init__(self, a10_driver):\n-        self.a10_driver = a10_driver\n-        self.hooks = a10_driver.hooks\n-        self.openstack_driver = self.a10_driver.openstack_driver\n-\n-    def meta(self, lbaas_obj, key, default):\n-        m = lbaas_obj.get('a10_meta', '{}')\n-        try:\n-            d = json.loads(m)\n-        except Exception:\n-            return default\n-        return d.get(key, default)\n+    def __init__(self, a10_driver, openstack_manager, neutron=None):\n+        super(HandlerBaseV2, self).__init__(a10_driver)\n+        self.openstack_manager = openstack_manager\n+        if neutron:","path":"a10_neutron_lbaas/v2/handler_base_v2.py","position":27,"original_position":27,"commit_id":"1ab150a82455682f5d4fdeed74522e1d6eee93bb","original_commit_id":"1ab150a82455682f5d4fdeed74522e1d6eee93bb","user":{"login":"mdurrant-b3","id":10053740,"avatar_url":"https://avatars.githubusercontent.com/u/10053740?v=3","gravatar_id":"","url":"https://api.github.com/users/mdurrant-b3","html_url":"https://github.com/mdurrant-b3","followers_url":"https://api.github.com/users/mdurrant-b3/followers","following_url":"https://api.github.com/users/mdurrant-b3/following{/other_user}","gists_url":"https://api.github.com/users/mdurrant-b3/gists{/gist_id}","starred_url":"https://api.github.com/users/mdurrant-b3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdurrant-b3/subscriptions","organizations_url":"https://api.github.com/users/mdurrant-b3/orgs","repos_url":"https://api.github.com/users/mdurrant-b3/repos","events_url":"https://api.github.com/users/mdurrant-b3/events{/privacy}","received_events_url":"https://api.github.com/users/mdurrant-b3/received_events","type":"User","site_admin":false},"body":" I like this DI pattern.  \"Use the one I give you unless I give you none, in which case use the default.\"  Good stuff.","created_at":"2015-03-23T20:10:48Z","updated_at":"2015-03-23T20:10:48Z","html_url":"https://github.com/a10networks/a10-neutron-lbaas/pull/30#discussion_r26974406","pull_request_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/comments/26974406"},"html":{"href":"https://github.com/a10networks/a10-neutron-lbaas/pull/30#discussion_r26974406"},"pull_request":{"href":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/30","id":31756779,"html_url":"https://github.com/a10networks/a10-neutron-lbaas/pull/30","diff_url":"https://github.com/a10networks/a10-neutron-lbaas/pull/30.diff","patch_url":"https://github.com/a10networks/a10-neutron-lbaas/pull/30.patch","issue_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/issues/30","number":30,"state":"closed","locked":false,"title":"V2 refactor","user":{"login":"dougwig","id":603553,"avatar_url":"https://avatars.githubusercontent.com/u/603553?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwig","html_url":"https://github.com/dougwig","followers_url":"https://api.github.com/users/dougwig/followers","following_url":"https://api.github.com/users/dougwig/following{/other_user}","gists_url":"https://api.github.com/users/dougwig/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwig/subscriptions","organizations_url":"https://api.github.com/users/dougwig/orgs","repos_url":"https://api.github.com/users/dougwig/repos","events_url":"https://api.github.com/users/dougwig/events{/privacy}","received_events_url":"https://api.github.com/users/dougwig/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-23T17:49:12Z","updated_at":"2015-03-23T20:10:48Z","closed_at":"2015-03-23T19:43:07Z","merged_at":"2015-03-23T19:43:07Z","merge_commit_sha":"a249ac30d22ddd1b152a620ad86e3fcb4fba88e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/30/commits","review_comments_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/30/comments","review_comment_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/issues/30/comments","statuses_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/statuses/1ab150a82455682f5d4fdeed74522e1d6eee93bb","head":{"label":"dougwig:v2-refactor","ref":"v2-refactor","sha":"1ab150a82455682f5d4fdeed74522e1d6eee93bb","user":{"login":"dougwig","id":603553,"avatar_url":"https://avatars.githubusercontent.com/u/603553?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwig","html_url":"https://github.com/dougwig","followers_url":"https://api.github.com/users/dougwig/followers","following_url":"https://api.github.com/users/dougwig/following{/other_user}","gists_url":"https://api.github.com/users/dougwig/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwig/subscriptions","organizations_url":"https://api.github.com/users/dougwig/orgs","repos_url":"https://api.github.com/users/dougwig/repos","events_url":"https://api.github.com/users/dougwig/events{/privacy}","received_events_url":"https://api.github.com/users/dougwig/received_events","type":"User","site_admin":false},"repo":{"id":30775352,"name":"a10-neutron-lbaas","full_name":"dougwig/a10-neutron-lbaas","owner":{"login":"dougwig","id":603553,"avatar_url":"https://avatars.githubusercontent.com/u/603553?v=3","gravatar_id":"","url":"https://api.github.com/users/dougwig","html_url":"https://github.com/dougwig","followers_url":"https://api.github.com/users/dougwig/followers","following_url":"https://api.github.com/users/dougwig/following{/other_user}","gists_url":"https://api.github.com/users/dougwig/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwig/subscriptions","organizations_url":"https://api.github.com/users/dougwig/orgs","repos_url":"https://api.github.com/users/dougwig/repos","events_url":"https://api.github.com/users/dougwig/events{/privacy}","received_events_url":"https://api.github.com/users/dougwig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dougwig/a10-neutron-lbaas","description":"A10 Networks, Openstack Neutron LBaaS Driver for Juno","fork":true,"url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas","forks_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/forks","keys_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/teams","hooks_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/hooks","issue_events_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/issues/events{/number}","events_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/events","assignees_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/assignees{/user}","branches_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/branches{/branch}","tags_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/tags","blobs_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/git/refs{/sha}","trees_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/statuses/{sha}","languages_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/languages","stargazers_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/stargazers","contributors_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/contributors","subscribers_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/subscribers","subscription_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/subscription","commits_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/commits{/sha}","git_commits_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/git/commits{/sha}","comments_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/comments{/number}","issue_comment_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/issues/comments{/number}","contents_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/contents/{+path}","compare_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/merges","archive_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/downloads","issues_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/issues{/number}","pulls_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/pulls{/number}","milestones_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/milestones{/number}","notifications_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/labels{/name}","releases_url":"https://api.github.com/repos/dougwig/a10-neutron-lbaas/releases{/id}","created_at":"2015-02-13T20:47:49Z","updated_at":"2015-03-23T17:26:18Z","pushed_at":"2015-03-23T17:48:45Z","git_url":"git://github.com/dougwig/a10-neutron-lbaas.git","ssh_url":"git@github.com:dougwig/a10-neutron-lbaas.git","clone_url":"https://github.com/dougwig/a10-neutron-lbaas.git","svn_url":"https://github.com/dougwig/a10-neutron-lbaas","homepage":null,"size":224,"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":"a10networks:master","ref":"master","sha":"6672ec8849db54e99d453086b3c6aa9a6619d4c0","user":{"login":"a10networks","id":5942705,"avatar_url":"https://avatars.githubusercontent.com/u/5942705?v=3","gravatar_id":"","url":"https://api.github.com/users/a10networks","html_url":"https://github.com/a10networks","followers_url":"https://api.github.com/users/a10networks/followers","following_url":"https://api.github.com/users/a10networks/following{/other_user}","gists_url":"https://api.github.com/users/a10networks/gists{/gist_id}","starred_url":"https://api.github.com/users/a10networks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a10networks/subscriptions","organizations_url":"https://api.github.com/users/a10networks/orgs","repos_url":"https://api.github.com/users/a10networks/repos","events_url":"https://api.github.com/users/a10networks/events{/privacy}","received_events_url":"https://api.github.com/users/a10networks/received_events","type":"Organization","site_admin":false},"repo":{"id":21839884,"name":"a10-neutron-lbaas","full_name":"a10networks/a10-neutron-lbaas","owner":{"login":"a10networks","id":5942705,"avatar_url":"https://avatars.githubusercontent.com/u/5942705?v=3","gravatar_id":"","url":"https://api.github.com/users/a10networks","html_url":"https://github.com/a10networks","followers_url":"https://api.github.com/users/a10networks/followers","following_url":"https://api.github.com/users/a10networks/following{/other_user}","gists_url":"https://api.github.com/users/a10networks/gists{/gist_id}","starred_url":"https://api.github.com/users/a10networks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a10networks/subscriptions","organizations_url":"https://api.github.com/users/a10networks/orgs","repos_url":"https://api.github.com/users/a10networks/repos","events_url":"https://api.github.com/users/a10networks/events{/privacy}","received_events_url":"https://api.github.com/users/a10networks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/a10networks/a10-neutron-lbaas","description":"A10 Networks, Openstack Neutron LBaaS Driver for Juno","fork":false,"url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas","forks_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/forks","keys_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/teams","hooks_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/hooks","issue_events_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/issues/events{/number}","events_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/events","assignees_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/assignees{/user}","branches_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/branches{/branch}","tags_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/tags","blobs_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/git/refs{/sha}","trees_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/statuses/{sha}","languages_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/languages","stargazers_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/stargazers","contributors_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/contributors","subscribers_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/subscribers","subscription_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/subscription","commits_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/commits{/sha}","git_commits_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/git/commits{/sha}","comments_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/comments{/number}","issue_comment_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/issues/comments{/number}","contents_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/contents/{+path}","compare_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/merges","archive_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/downloads","issues_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/issues{/number}","pulls_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls{/number}","milestones_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/milestones{/number}","notifications_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/labels{/name}","releases_url":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/releases{/id}","created_at":"2014-07-14T23:50:26Z","updated_at":"2015-03-23T19:43:08Z","pushed_at":"2015-03-23T19:43:07Z","git_url":"git://github.com/a10networks/a10-neutron-lbaas.git","ssh_url":"git@github.com:a10networks/a10-neutron-lbaas.git","clone_url":"https://github.com/a10networks/a10-neutron-lbaas.git","svn_url":"https://github.com/a10networks/a10-neutron-lbaas","homepage":null,"size":430,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/30"},"html":{"href":"https://github.com/a10networks/a10-neutron-lbaas/pull/30"},"issue":{"href":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/issues/30"},"comments":{"href":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/a10networks/a10-neutron-lbaas/statuses/1ab150a82455682f5d4fdeed74522e1d6eee93bb"}}}}