{"action":"created","comment":{"url":"https://api.github.com/repos/floodlight/pybsn/pulls/comments/30870572","id":30870572,"diff_hunk":"@@ -0,0 +1,86 @@\n+class Switch(object): \n+    \"\"\"Switch based API operations\n+\n+    \"\"\"\n+    def __init__(self, client):\n+        self.client = client\n+\n+        # Default configurable values\n+        self.name = None\n+        self.dpid = None\n+        self.fabric_role = None\n+        self.leaf_group = None\n+\n+    @staticmethod\n+    def get_switches(client, filter=None):\n+\n+        if filter:","path":"pybsn/switch.py","position":17,"original_position":17,"commit_id":"a73a5b10484f13e1c0cfe78ed2acd0d8be12d682","original_commit_id":"be65e210bf16ad811d2373a13af4f2a08a2fbb53","user":{"login":"Sovietaced","id":1274471,"avatar_url":"https://avatars.githubusercontent.com/u/1274471?v=3","gravatar_id":"","url":"https://api.github.com/users/Sovietaced","html_url":"https://github.com/Sovietaced","followers_url":"https://api.github.com/users/Sovietaced/followers","following_url":"https://api.github.com/users/Sovietaced/following{/other_user}","gists_url":"https://api.github.com/users/Sovietaced/gists{/gist_id}","starred_url":"https://api.github.com/users/Sovietaced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sovietaced/subscriptions","organizations_url":"https://api.github.com/users/Sovietaced/orgs","repos_url":"https://api.github.com/users/Sovietaced/repos","events_url":"https://api.github.com/users/Sovietaced/events{/privacy}","received_events_url":"https://api.github.com/users/Sovietaced/received_events","type":"User","site_admin":false},"body":"Hmm. The goal was for the user to be able to dynamically make use the Big DB's predicates. What if the user wants to filter switches by the fabric_role or leaf_group?","created_at":"2015-05-22T05:43:41Z","updated_at":"2015-05-22T05:43:41Z","html_url":"https://github.com/floodlight/pybsn/pull/1#discussion_r30870572","pull_request_url":"https://api.github.com/repos/floodlight/pybsn/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/floodlight/pybsn/pulls/comments/30870572"},"html":{"href":"https://github.com/floodlight/pybsn/pull/1#discussion_r30870572"},"pull_request":{"href":"https://api.github.com/repos/floodlight/pybsn/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/floodlight/pybsn/pulls/1","id":35786734,"html_url":"https://github.com/floodlight/pybsn/pull/1","diff_url":"https://github.com/floodlight/pybsn/pull/1.diff","patch_url":"https://github.com/floodlight/pybsn/pull/1.patch","issue_url":"https://api.github.com/repos/floodlight/pybsn/issues/1","number":1,"state":"open","locked":false,"title":"Switch API base","user":{"login":"Sovietaced","id":1274471,"avatar_url":"https://avatars.githubusercontent.com/u/1274471?v=3","gravatar_id":"","url":"https://api.github.com/users/Sovietaced","html_url":"https://github.com/Sovietaced","followers_url":"https://api.github.com/users/Sovietaced/followers","following_url":"https://api.github.com/users/Sovietaced/following{/other_user}","gists_url":"https://api.github.com/users/Sovietaced/gists{/gist_id}","starred_url":"https://api.github.com/users/Sovietaced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sovietaced/subscriptions","organizations_url":"https://api.github.com/users/Sovietaced/orgs","repos_url":"https://api.github.com/users/Sovietaced/repos","events_url":"https://api.github.com/users/Sovietaced/events{/privacy}","received_events_url":"https://api.github.com/users/Sovietaced/received_events","type":"User","site_admin":false},"body":"Reviewer: @rlane \r\n\r\nFor some values in the json blob we should be parsing them into appropriate data types (date times, inetaddresses). I think we can override setattr to handle these particular values. ","created_at":"2015-05-19T23:53:07Z","updated_at":"2015-05-22T05:43:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c609a9b9160ace07af9bf587917f58a40a346d13","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/floodlight/pybsn/pulls/1/commits","review_comments_url":"https://api.github.com/repos/floodlight/pybsn/pulls/1/comments","review_comment_url":"https://api.github.com/repos/floodlight/pybsn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/floodlight/pybsn/issues/1/comments","statuses_url":"https://api.github.com/repos/floodlight/pybsn/statuses/a73a5b10484f13e1c0cfe78ed2acd0d8be12d682","head":{"label":"Sovietaced:dev","ref":"dev","sha":"a73a5b10484f13e1c0cfe78ed2acd0d8be12d682","user":{"login":"Sovietaced","id":1274471,"avatar_url":"https://avatars.githubusercontent.com/u/1274471?v=3","gravatar_id":"","url":"https://api.github.com/users/Sovietaced","html_url":"https://github.com/Sovietaced","followers_url":"https://api.github.com/users/Sovietaced/followers","following_url":"https://api.github.com/users/Sovietaced/following{/other_user}","gists_url":"https://api.github.com/users/Sovietaced/gists{/gist_id}","starred_url":"https://api.github.com/users/Sovietaced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sovietaced/subscriptions","organizations_url":"https://api.github.com/users/Sovietaced/orgs","repos_url":"https://api.github.com/users/Sovietaced/repos","events_url":"https://api.github.com/users/Sovietaced/events{/privacy}","received_events_url":"https://api.github.com/users/Sovietaced/received_events","type":"User","site_admin":false},"repo":{"id":35244281,"name":"pybsn","full_name":"Sovietaced/pybsn","owner":{"login":"Sovietaced","id":1274471,"avatar_url":"https://avatars.githubusercontent.com/u/1274471?v=3","gravatar_id":"","url":"https://api.github.com/users/Sovietaced","html_url":"https://github.com/Sovietaced","followers_url":"https://api.github.com/users/Sovietaced/followers","following_url":"https://api.github.com/users/Sovietaced/following{/other_user}","gists_url":"https://api.github.com/users/Sovietaced/gists{/gist_id}","starred_url":"https://api.github.com/users/Sovietaced/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sovietaced/subscriptions","organizations_url":"https://api.github.com/users/Sovietaced/orgs","repos_url":"https://api.github.com/users/Sovietaced/repos","events_url":"https://api.github.com/users/Sovietaced/events{/privacy}","received_events_url":"https://api.github.com/users/Sovietaced/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sovietaced/pybsn","description":"","fork":true,"url":"https://api.github.com/repos/Sovietaced/pybsn","forks_url":"https://api.github.com/repos/Sovietaced/pybsn/forks","keys_url":"https://api.github.com/repos/Sovietaced/pybsn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sovietaced/pybsn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sovietaced/pybsn/teams","hooks_url":"https://api.github.com/repos/Sovietaced/pybsn/hooks","issue_events_url":"https://api.github.com/repos/Sovietaced/pybsn/issues/events{/number}","events_url":"https://api.github.com/repos/Sovietaced/pybsn/events","assignees_url":"https://api.github.com/repos/Sovietaced/pybsn/assignees{/user}","branches_url":"https://api.github.com/repos/Sovietaced/pybsn/branches{/branch}","tags_url":"https://api.github.com/repos/Sovietaced/pybsn/tags","blobs_url":"https://api.github.com/repos/Sovietaced/pybsn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sovietaced/pybsn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sovietaced/pybsn/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sovietaced/pybsn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sovietaced/pybsn/statuses/{sha}","languages_url":"https://api.github.com/repos/Sovietaced/pybsn/languages","stargazers_url":"https://api.github.com/repos/Sovietaced/pybsn/stargazers","contributors_url":"https://api.github.com/repos/Sovietaced/pybsn/contributors","subscribers_url":"https://api.github.com/repos/Sovietaced/pybsn/subscribers","subscription_url":"https://api.github.com/repos/Sovietaced/pybsn/subscription","commits_url":"https://api.github.com/repos/Sovietaced/pybsn/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sovietaced/pybsn/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sovietaced/pybsn/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sovietaced/pybsn/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sovietaced/pybsn/contents/{+path}","compare_url":"https://api.github.com/repos/Sovietaced/pybsn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sovietaced/pybsn/merges","archive_url":"https://api.github.com/repos/Sovietaced/pybsn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sovietaced/pybsn/downloads","issues_url":"https://api.github.com/repos/Sovietaced/pybsn/issues{/number}","pulls_url":"https://api.github.com/repos/Sovietaced/pybsn/pulls{/number}","milestones_url":"https://api.github.com/repos/Sovietaced/pybsn/milestones{/number}","notifications_url":"https://api.github.com/repos/Sovietaced/pybsn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sovietaced/pybsn/labels{/name}","releases_url":"https://api.github.com/repos/Sovietaced/pybsn/releases{/id}","created_at":"2015-05-07T21:24:04Z","updated_at":"2015-05-07T21:24:42Z","pushed_at":"2015-05-22T00:30:52Z","git_url":"git://github.com/Sovietaced/pybsn.git","ssh_url":"git@github.com:Sovietaced/pybsn.git","clone_url":"https://github.com/Sovietaced/pybsn.git","svn_url":"https://github.com/Sovietaced/pybsn","homepage":null,"size":194,"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":"floodlight:master","ref":"master","sha":"952a260876b2cbac40d89b0b9e6dd5bd9116168c","user":{"login":"floodlight","id":1198172,"avatar_url":"https://avatars.githubusercontent.com/u/1198172?v=3","gravatar_id":"","url":"https://api.github.com/users/floodlight","html_url":"https://github.com/floodlight","followers_url":"https://api.github.com/users/floodlight/followers","following_url":"https://api.github.com/users/floodlight/following{/other_user}","gists_url":"https://api.github.com/users/floodlight/gists{/gist_id}","starred_url":"https://api.github.com/users/floodlight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floodlight/subscriptions","organizations_url":"https://api.github.com/users/floodlight/orgs","repos_url":"https://api.github.com/users/floodlight/repos","events_url":"https://api.github.com/users/floodlight/events{/privacy}","received_events_url":"https://api.github.com/users/floodlight/received_events","type":"Organization","site_admin":false},"repo":{"id":35244196,"name":"pybsn","full_name":"floodlight/pybsn","owner":{"login":"floodlight","id":1198172,"avatar_url":"https://avatars.githubusercontent.com/u/1198172?v=3","gravatar_id":"","url":"https://api.github.com/users/floodlight","html_url":"https://github.com/floodlight","followers_url":"https://api.github.com/users/floodlight/followers","following_url":"https://api.github.com/users/floodlight/following{/other_user}","gists_url":"https://api.github.com/users/floodlight/gists{/gist_id}","starred_url":"https://api.github.com/users/floodlight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floodlight/subscriptions","organizations_url":"https://api.github.com/users/floodlight/orgs","repos_url":"https://api.github.com/users/floodlight/repos","events_url":"https://api.github.com/users/floodlight/events{/privacy}","received_events_url":"https://api.github.com/users/floodlight/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/floodlight/pybsn","description":"","fork":false,"url":"https://api.github.com/repos/floodlight/pybsn","forks_url":"https://api.github.com/repos/floodlight/pybsn/forks","keys_url":"https://api.github.com/repos/floodlight/pybsn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/floodlight/pybsn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/floodlight/pybsn/teams","hooks_url":"https://api.github.com/repos/floodlight/pybsn/hooks","issue_events_url":"https://api.github.com/repos/floodlight/pybsn/issues/events{/number}","events_url":"https://api.github.com/repos/floodlight/pybsn/events","assignees_url":"https://api.github.com/repos/floodlight/pybsn/assignees{/user}","branches_url":"https://api.github.com/repos/floodlight/pybsn/branches{/branch}","tags_url":"https://api.github.com/repos/floodlight/pybsn/tags","blobs_url":"https://api.github.com/repos/floodlight/pybsn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/floodlight/pybsn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/floodlight/pybsn/git/refs{/sha}","trees_url":"https://api.github.com/repos/floodlight/pybsn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/floodlight/pybsn/statuses/{sha}","languages_url":"https://api.github.com/repos/floodlight/pybsn/languages","stargazers_url":"https://api.github.com/repos/floodlight/pybsn/stargazers","contributors_url":"https://api.github.com/repos/floodlight/pybsn/contributors","subscribers_url":"https://api.github.com/repos/floodlight/pybsn/subscribers","subscription_url":"https://api.github.com/repos/floodlight/pybsn/subscription","commits_url":"https://api.github.com/repos/floodlight/pybsn/commits{/sha}","git_commits_url":"https://api.github.com/repos/floodlight/pybsn/git/commits{/sha}","comments_url":"https://api.github.com/repos/floodlight/pybsn/comments{/number}","issue_comment_url":"https://api.github.com/repos/floodlight/pybsn/issues/comments{/number}","contents_url":"https://api.github.com/repos/floodlight/pybsn/contents/{+path}","compare_url":"https://api.github.com/repos/floodlight/pybsn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/floodlight/pybsn/merges","archive_url":"https://api.github.com/repos/floodlight/pybsn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/floodlight/pybsn/downloads","issues_url":"https://api.github.com/repos/floodlight/pybsn/issues{/number}","pulls_url":"https://api.github.com/repos/floodlight/pybsn/pulls{/number}","milestones_url":"https://api.github.com/repos/floodlight/pybsn/milestones{/number}","notifications_url":"https://api.github.com/repos/floodlight/pybsn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/floodlight/pybsn/labels{/name}","releases_url":"https://api.github.com/repos/floodlight/pybsn/releases{/id}","created_at":"2015-05-07T21:22:23Z","updated_at":"2015-05-07T21:23:04Z","pushed_at":"2015-05-22T00:30:53Z","git_url":"git://github.com/floodlight/pybsn.git","ssh_url":"git@github.com:floodlight/pybsn.git","clone_url":"https://github.com/floodlight/pybsn.git","svn_url":"https://github.com/floodlight/pybsn","homepage":null,"size":491,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/floodlight/pybsn/pulls/1"},"html":{"href":"https://github.com/floodlight/pybsn/pull/1"},"issue":{"href":"https://api.github.com/repos/floodlight/pybsn/issues/1"},"comments":{"href":"https://api.github.com/repos/floodlight/pybsn/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/floodlight/pybsn/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/floodlight/pybsn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/floodlight/pybsn/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/floodlight/pybsn/statuses/a73a5b10484f13e1c0cfe78ed2acd0d8be12d682"}}}}