{"action":"created","comment":{"url":"https://api.github.com/repos/lxc/pylxd/pulls/comments/184102783","pull_request_review_id":115229521,"id":184102783,"diff_hunk":"@@ -41,14 +50,25 @@ def all(cls, client):\n             networks.append(cls(client, name=name))\n         return networks\n \n+    @classmethod\n+    def create(cls, client, name, description=None, type_=None,\n+               config=None):\n+        \"\"\"Create a network\"\"\"\n+        network = {'name': name}","path":"pylxd/models/network.py","position":40,"original_position":40,"commit_id":"d813170cc0243e2842afad99e29cd3c84deaf307","original_commit_id":"d813170cc0243e2842afad99e29cd3c84deaf307","user":{"login":"ajkavanagh","id":567675,"avatar_url":"https://avatars2.githubusercontent.com/u/567675?v=4","gravatar_id":"","url":"https://api.github.com/users/ajkavanagh","html_url":"https://github.com/ajkavanagh","followers_url":"https://api.github.com/users/ajkavanagh/followers","following_url":"https://api.github.com/users/ajkavanagh/following{/other_user}","gists_url":"https://api.github.com/users/ajkavanagh/gists{/gist_id}","starred_url":"https://api.github.com/users/ajkavanagh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajkavanagh/subscriptions","organizations_url":"https://api.github.com/users/ajkavanagh/orgs","repos_url":"https://api.github.com/users/ajkavanagh/repos","events_url":"https://api.github.com/users/ajkavanagh/events{/privacy}","received_events_url":"https://api.github.com/users/ajkavanagh/received_events","type":"User","site_admin":false},"body":"Yeah, this is a quirk of Python; there isn't a nice way to do this that also keeps readability of the function signature.  I'd just keep what you have to be honest.","created_at":"2018-04-25T15:25:37Z","updated_at":"2018-04-25T15:25:38Z","html_url":"https://github.com/lxc/pylxd/pull/303#discussion_r184102783","pull_request_url":"https://api.github.com/repos/lxc/pylxd/pulls/303","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/lxc/pylxd/pulls/comments/184102783"},"html":{"href":"https://github.com/lxc/pylxd/pull/303#discussion_r184102783"},"pull_request":{"href":"https://api.github.com/repos/lxc/pylxd/pulls/303"}},"in_reply_to_id":184078748},"pull_request":{"url":"https://api.github.com/repos/lxc/pylxd/pulls/303","id":183998826,"html_url":"https://github.com/lxc/pylxd/pull/303","diff_url":"https://github.com/lxc/pylxd/pull/303.diff","patch_url":"https://github.com/lxc/pylxd/pull/303.patch","issue_url":"https://api.github.com/repos/lxc/pylxd/issues/303","number":303,"state":"open","locked":false,"title":"Add network operations","user":{"login":"ppkt","id":477174,"avatar_url":"https://avatars1.githubusercontent.com/u/477174?v=4","gravatar_id":"","url":"https://api.github.com/users/ppkt","html_url":"https://github.com/ppkt","followers_url":"https://api.github.com/users/ppkt/followers","following_url":"https://api.github.com/users/ppkt/following{/other_user}","gists_url":"https://api.github.com/users/ppkt/gists{/gist_id}","starred_url":"https://api.github.com/users/ppkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppkt/subscriptions","organizations_url":"https://api.github.com/users/ppkt/orgs","repos_url":"https://api.github.com/users/ppkt/repos","events_url":"https://api.github.com/users/ppkt/events{/privacy}","received_events_url":"https://api.github.com/users/ppkt/received_events","type":"User","site_admin":false},"body":"I added support for operations on networks. I based my code on Profile model because it was quite similar. However, due to issue #302 it's not possible to test my changes using 'run_integration_tests' script on Ubuntu 16.04 and after switching to 17.10 my tests are passing but few other are failing (due to missing storage pool).","created_at":"2018-04-25T11:04:59Z","updated_at":"2018-04-25T15:25:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d69a0f0dad15db6d0469770d4408772d49659621","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lxc/pylxd/pulls/303/commits","review_comments_url":"https://api.github.com/repos/lxc/pylxd/pulls/303/comments","review_comment_url":"https://api.github.com/repos/lxc/pylxd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lxc/pylxd/issues/303/comments","statuses_url":"https://api.github.com/repos/lxc/pylxd/statuses/d813170cc0243e2842afad99e29cd3c84deaf307","head":{"label":"ppkt:add-network-operations","ref":"add-network-operations","sha":"d813170cc0243e2842afad99e29cd3c84deaf307","user":{"login":"ppkt","id":477174,"avatar_url":"https://avatars1.githubusercontent.com/u/477174?v=4","gravatar_id":"","url":"https://api.github.com/users/ppkt","html_url":"https://github.com/ppkt","followers_url":"https://api.github.com/users/ppkt/followers","following_url":"https://api.github.com/users/ppkt/following{/other_user}","gists_url":"https://api.github.com/users/ppkt/gists{/gist_id}","starred_url":"https://api.github.com/users/ppkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppkt/subscriptions","organizations_url":"https://api.github.com/users/ppkt/orgs","repos_url":"https://api.github.com/users/ppkt/repos","events_url":"https://api.github.com/users/ppkt/events{/privacy}","received_events_url":"https://api.github.com/users/ppkt/received_events","type":"User","site_admin":false},"repo":{"id":129899974,"name":"pylxd","full_name":"ppkt/pylxd","owner":{"login":"ppkt","id":477174,"avatar_url":"https://avatars1.githubusercontent.com/u/477174?v=4","gravatar_id":"","url":"https://api.github.com/users/ppkt","html_url":"https://github.com/ppkt","followers_url":"https://api.github.com/users/ppkt/followers","following_url":"https://api.github.com/users/ppkt/following{/other_user}","gists_url":"https://api.github.com/users/ppkt/gists{/gist_id}","starred_url":"https://api.github.com/users/ppkt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppkt/subscriptions","organizations_url":"https://api.github.com/users/ppkt/orgs","repos_url":"https://api.github.com/users/ppkt/repos","events_url":"https://api.github.com/users/ppkt/events{/privacy}","received_events_url":"https://api.github.com/users/ppkt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ppkt/pylxd","description":"Python module for LXD: API docs ->","fork":true,"url":"https://api.github.com/repos/ppkt/pylxd","forks_url":"https://api.github.com/repos/ppkt/pylxd/forks","keys_url":"https://api.github.com/repos/ppkt/pylxd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ppkt/pylxd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ppkt/pylxd/teams","hooks_url":"https://api.github.com/repos/ppkt/pylxd/hooks","issue_events_url":"https://api.github.com/repos/ppkt/pylxd/issues/events{/number}","events_url":"https://api.github.com/repos/ppkt/pylxd/events","assignees_url":"https://api.github.com/repos/ppkt/pylxd/assignees{/user}","branches_url":"https://api.github.com/repos/ppkt/pylxd/branches{/branch}","tags_url":"https://api.github.com/repos/ppkt/pylxd/tags","blobs_url":"https://api.github.com/repos/ppkt/pylxd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ppkt/pylxd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ppkt/pylxd/git/refs{/sha}","trees_url":"https://api.github.com/repos/ppkt/pylxd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ppkt/pylxd/statuses/{sha}","languages_url":"https://api.github.com/repos/ppkt/pylxd/languages","stargazers_url":"https://api.github.com/repos/ppkt/pylxd/stargazers","contributors_url":"https://api.github.com/repos/ppkt/pylxd/contributors","subscribers_url":"https://api.github.com/repos/ppkt/pylxd/subscribers","subscription_url":"https://api.github.com/repos/ppkt/pylxd/subscription","commits_url":"https://api.github.com/repos/ppkt/pylxd/commits{/sha}","git_commits_url":"https://api.github.com/repos/ppkt/pylxd/git/commits{/sha}","comments_url":"https://api.github.com/repos/ppkt/pylxd/comments{/number}","issue_comment_url":"https://api.github.com/repos/ppkt/pylxd/issues/comments{/number}","contents_url":"https://api.github.com/repos/ppkt/pylxd/contents/{+path}","compare_url":"https://api.github.com/repos/ppkt/pylxd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ppkt/pylxd/merges","archive_url":"https://api.github.com/repos/ppkt/pylxd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ppkt/pylxd/downloads","issues_url":"https://api.github.com/repos/ppkt/pylxd/issues{/number}","pulls_url":"https://api.github.com/repos/ppkt/pylxd/pulls{/number}","milestones_url":"https://api.github.com/repos/ppkt/pylxd/milestones{/number}","notifications_url":"https://api.github.com/repos/ppkt/pylxd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ppkt/pylxd/labels{/name}","releases_url":"https://api.github.com/repos/ppkt/pylxd/releases{/id}","deployments_url":"https://api.github.com/repos/ppkt/pylxd/deployments","created_at":"2018-04-17T12:18:34Z","updated_at":"2018-04-17T12:18:36Z","pushed_at":"2018-04-25T10:51:36Z","git_url":"git://github.com/ppkt/pylxd.git","ssh_url":"git@github.com:ppkt/pylxd.git","clone_url":"https://github.com/ppkt/pylxd.git","svn_url":"https://github.com/ppkt/pylxd","homepage":"https://pylxd.readthedocs.io/en/latest/","size":66878,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lxc:master","ref":"master","sha":"41a42023211e15fcc9cd1db16309286cc2e5dbac","user":{"login":"lxc","id":2301756,"avatar_url":"https://avatars2.githubusercontent.com/u/2301756?v=4","gravatar_id":"","url":"https://api.github.com/users/lxc","html_url":"https://github.com/lxc","followers_url":"https://api.github.com/users/lxc/followers","following_url":"https://api.github.com/users/lxc/following{/other_user}","gists_url":"https://api.github.com/users/lxc/gists{/gist_id}","starred_url":"https://api.github.com/users/lxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxc/subscriptions","organizations_url":"https://api.github.com/users/lxc/orgs","repos_url":"https://api.github.com/users/lxc/repos","events_url":"https://api.github.com/users/lxc/events{/privacy}","received_events_url":"https://api.github.com/users/lxc/received_events","type":"Organization","site_admin":false},"repo":{"id":36316984,"name":"pylxd","full_name":"lxc/pylxd","owner":{"login":"lxc","id":2301756,"avatar_url":"https://avatars2.githubusercontent.com/u/2301756?v=4","gravatar_id":"","url":"https://api.github.com/users/lxc","html_url":"https://github.com/lxc","followers_url":"https://api.github.com/users/lxc/followers","following_url":"https://api.github.com/users/lxc/following{/other_user}","gists_url":"https://api.github.com/users/lxc/gists{/gist_id}","starred_url":"https://api.github.com/users/lxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxc/subscriptions","organizations_url":"https://api.github.com/users/lxc/orgs","repos_url":"https://api.github.com/users/lxc/repos","events_url":"https://api.github.com/users/lxc/events{/privacy}","received_events_url":"https://api.github.com/users/lxc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lxc/pylxd","description":"Python module for LXD: API docs ->","fork":false,"url":"https://api.github.com/repos/lxc/pylxd","forks_url":"https://api.github.com/repos/lxc/pylxd/forks","keys_url":"https://api.github.com/repos/lxc/pylxd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lxc/pylxd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lxc/pylxd/teams","hooks_url":"https://api.github.com/repos/lxc/pylxd/hooks","issue_events_url":"https://api.github.com/repos/lxc/pylxd/issues/events{/number}","events_url":"https://api.github.com/repos/lxc/pylxd/events","assignees_url":"https://api.github.com/repos/lxc/pylxd/assignees{/user}","branches_url":"https://api.github.com/repos/lxc/pylxd/branches{/branch}","tags_url":"https://api.github.com/repos/lxc/pylxd/tags","blobs_url":"https://api.github.com/repos/lxc/pylxd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lxc/pylxd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lxc/pylxd/git/refs{/sha}","trees_url":"https://api.github.com/repos/lxc/pylxd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lxc/pylxd/statuses/{sha}","languages_url":"https://api.github.com/repos/lxc/pylxd/languages","stargazers_url":"https://api.github.com/repos/lxc/pylxd/stargazers","contributors_url":"https://api.github.com/repos/lxc/pylxd/contributors","subscribers_url":"https://api.github.com/repos/lxc/pylxd/subscribers","subscription_url":"https://api.github.com/repos/lxc/pylxd/subscription","commits_url":"https://api.github.com/repos/lxc/pylxd/commits{/sha}","git_commits_url":"https://api.github.com/repos/lxc/pylxd/git/commits{/sha}","comments_url":"https://api.github.com/repos/lxc/pylxd/comments{/number}","issue_comment_url":"https://api.github.com/repos/lxc/pylxd/issues/comments{/number}","contents_url":"https://api.github.com/repos/lxc/pylxd/contents/{+path}","compare_url":"https://api.github.com/repos/lxc/pylxd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lxc/pylxd/merges","archive_url":"https://api.github.com/repos/lxc/pylxd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lxc/pylxd/downloads","issues_url":"https://api.github.com/repos/lxc/pylxd/issues{/number}","pulls_url":"https://api.github.com/repos/lxc/pylxd/pulls{/number}","milestones_url":"https://api.github.com/repos/lxc/pylxd/milestones{/number}","notifications_url":"https://api.github.com/repos/lxc/pylxd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lxc/pylxd/labels{/name}","releases_url":"https://api.github.com/repos/lxc/pylxd/releases{/id}","deployments_url":"https://api.github.com/repos/lxc/pylxd/deployments","created_at":"2015-05-26T18:54:16Z","updated_at":"2018-04-17T22:19:10Z","pushed_at":"2018-04-25T11:05:00Z","git_url":"git://github.com/lxc/pylxd.git","ssh_url":"git@github.com:lxc/pylxd.git","clone_url":"https://github.com/lxc/pylxd.git","svn_url":"https://github.com/lxc/pylxd","homepage":"https://pylxd.readthedocs.io/en/latest/","size":66873,"stargazers_count":121,"watchers_count":121,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":79,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":79,"open_issues":24,"watchers":121,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lxc/pylxd/pulls/303"},"html":{"href":"https://github.com/lxc/pylxd/pull/303"},"issue":{"href":"https://api.github.com/repos/lxc/pylxd/issues/303"},"comments":{"href":"https://api.github.com/repos/lxc/pylxd/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/lxc/pylxd/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/lxc/pylxd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lxc/pylxd/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/lxc/pylxd/statuses/d813170cc0243e2842afad99e29cd3c84deaf307"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ajkavanagh"}}