{"action":"created","comment":{"url":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments/30941327","id":30941327,"diff_hunk":"@@ -2,12 +2,139 @@\n * `{\"foo\": <bar>, \"baz\": <quux>}` denotes a JSON object (in the body of \n   the request).\n \n-Full Api spec:\n+# Full Api spec:\n \n-    user_create  <user_label> <password>\n-    user_delete  <user_label>\n-    [PUT]    /user/<user_label> {password=<password>}\n-    [DELETE] /user/<user_label>\n+## Users\n+\n+### user_create\n+\n+`PUT /user/<username>`\n+\n+Request body:\n+\n+    {\n+        \"password\": <plaintext-password>\n+    }\n+\n+Create a new user whose password is `<plaintext-password>`.\n+\n+Possible errors:\n+\n+* 409, if the user already exists\n+\n+### user_delete\n+\n+`DELETE /user/<username>`\n+\n+Delete the user whose username is `<username>`\n+\n+Possible errors:\n+\n+* 404, if the user does not exist\n+\n+## Networks\n+\n+### show_network\n+\n+`GET /network/<network>`\n+\n+View detailed information about `<network>`.\n+\n+The result contains the following information:\n+\n+* The name of the network\n+* A description of legal channel identifiers for this network. This is a list\n+  of channel identifiers, with possible wildcards. The format of these is\n+  driver specific, see below.\n+\n+Response body (on success):\n+\n+    {\n+        \"name\": <network>\n+        \"channels\": <chanel-id-list>\n+    }\n+\n+Possible errors:\n+\n+* 404, if the network does not exist.\n+\n+#### Channel Formats\n+\n+##### 802.1q VLAN based drivers\n+\n+Channel identifiers for the VLAN based drivers are one of:\n+\n+* `vlan/native`, to attach the network as the native (untagged) VLAN\n+* `vlan/<vlan_id>` where `<vlan_id>` is a VLAN id number. This attaches\n+   the network in tagged, mode, with the given VLAN id.\n+\n+Additionally, the `show_networks` api call may return the channel identifier\n+`vlan/*`, which indicates that any VLAN-based channel id may be used.\n+\n+Where documentation specifies that the network driver should choose a\n+default channel, the VLAN drivers choose `vlan/native`.\n+\n+### node_connect_network\n+\n+`POST /node/<node>/nic/<nic>/connect_network`\n+\n+Request body:\n+\n+    {\n+        \"network\": <network>,\n+        \"channel\": <channel> (Optional)\n+    }\n+\n+Connect the network named `<network>` to `<nic>` on `<channel>`.\n+\n+`<channel>` should be a legal channel identifier specified by the output \n+of `show_network`, above. If `<channel>` is omitted, the driver will choose\n+a default, typically some form of \"untagged.\"\n+\n+Networks are connected and detached asynchronously. If successful, this \n+API call returns a status code of 202 Accepted, and queues the network \n+operation to be preformed. Each nic may have no more than one pending \n+network operation; an attempt to queue a second action will result in an \n+error.\n+\n+Possible errors:\n+\n+* 409, if:\n+  * The current project does not control `<node>`.\n+  * The current project does not have access to `<network>`.\n+  * There is already a pending network operation on `<nic>`.\n+  * `<network>` is already attached to `<nic>` (possibly on a different channel).\n+  * The channel identifier is not legal for this network.\n+","path":"docs/rest_api.md","position":112,"original_position":112,"commit_id":"e15cac76c7c72a1f4f9b7945d02f7ac673619d3f","original_commit_id":"e15cac76c7c72a1f4f9b7945d02f7ac673619d3f","user":{"login":"zenhack","id":883774,"avatar_url":"https://avatars.githubusercontent.com/u/883774?v=3","gravatar_id":"","url":"https://api.github.com/users/zenhack","html_url":"https://github.com/zenhack","followers_url":"https://api.github.com/users/zenhack/followers","following_url":"https://api.github.com/users/zenhack/following{/other_user}","gists_url":"https://api.github.com/users/zenhack/gists{/gist_id}","starred_url":"https://api.github.com/users/zenhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenhack/subscriptions","organizations_url":"https://api.github.com/users/zenhack/orgs","repos_url":"https://api.github.com/users/zenhack/repos","events_url":"https://api.github.com/users/zenhack/events{/privacy}","received_events_url":"https://api.github.com/users/zenhack/received_events","type":"User","site_admin":false},"body":"Quoting henn (2015-05-22 17:32:25)\n\n>      * the user does not have access to the project that the node is\n>        assigned to\n\nUsers *are not* part of the core HaaS; they're auth-backend specific (in \ntheory; we need to actually add auth and move the user model into one of \nthe backends). The notion of \"current project\" implies you've already \nsomehow proven you're authorized to access it.\n","created_at":"2015-05-23T02:59:39Z","updated_at":"2015-05-23T02:59:39Z","html_url":"https://github.com/CCI-MOC/haas/pull/408#discussion_r30941327","pull_request_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/408","_links":{"self":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments/30941327"},"html":{"href":"https://github.com/CCI-MOC/haas/pull/408#discussion_r30941327"},"pull_request":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/408"}}},"pull_request":{"url":"https://api.github.com/repos/CCI-MOC/haas/pulls/408","id":32531673,"html_url":"https://github.com/CCI-MOC/haas/pull/408","diff_url":"https://github.com/CCI-MOC/haas/pull/408.diff","patch_url":"https://github.com/CCI-MOC/haas/pull/408.patch","issue_url":"https://api.github.com/repos/CCI-MOC/haas/issues/408","number":408,"state":"open","locked":false,"title":"Vlan trunking","user":{"login":"zenhack","id":883774,"avatar_url":"https://avatars.githubusercontent.com/u/883774?v=3","gravatar_id":"","url":"https://api.github.com/users/zenhack","html_url":"https://github.com/zenhack","followers_url":"https://api.github.com/users/zenhack/followers","following_url":"https://api.github.com/users/zenhack/following{/other_user}","gists_url":"https://api.github.com/users/zenhack/gists{/gist_id}","starred_url":"https://api.github.com/users/zenhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenhack/subscriptions","organizations_url":"https://api.github.com/users/zenhack/orgs","repos_url":"https://api.github.com/users/zenhack/repos","events_url":"https://api.github.com/users/zenhack/events{/privacy}","received_events_url":"https://api.github.com/users/zenhack/received_events","type":"User","site_admin":false},"body":"I'm starting to work on the vlan trunking. It's not ready yet, but the docs are there and I'd like commentary on the design.\r\n\r\n//cc @gsilvis ","created_at":"2015-04-02T17:20:47Z","updated_at":"2015-05-23T02:59:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a57d220ff944f697904aa53bca97f489aabe3d20","assignee":null,"milestone":{"url":"https://api.github.com/repos/CCI-MOC/haas/milestones/5","html_url":"https://github.com/CCI-MOC/haas/milestones/v0.2","labels_url":"https://api.github.com/repos/CCI-MOC/haas/milestones/5/labels","id":855160,"number":5,"title":"v0.2","description":"next release. We may rename this one down the line if we choose another name, but right now I want a place to put bugs that I'm promising to fix in the docs.","creator":{"login":"zenhack","id":883774,"avatar_url":"https://avatars.githubusercontent.com/u/883774?v=3","gravatar_id":"","url":"https://api.github.com/users/zenhack","html_url":"https://github.com/zenhack","followers_url":"https://api.github.com/users/zenhack/followers","following_url":"https://api.github.com/users/zenhack/following{/other_user}","gists_url":"https://api.github.com/users/zenhack/gists{/gist_id}","starred_url":"https://api.github.com/users/zenhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenhack/subscriptions","organizations_url":"https://api.github.com/users/zenhack/orgs","repos_url":"https://api.github.com/users/zenhack/repos","events_url":"https://api.github.com/users/zenhack/events{/privacy}","received_events_url":"https://api.github.com/users/zenhack/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":0,"state":"open","created_at":"2014-11-05T20:45:28Z","updated_at":"2015-04-08T17:00:48Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/408/commits","review_comments_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/408/comments","review_comment_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CCI-MOC/haas/issues/408/comments","statuses_url":"https://api.github.com/repos/CCI-MOC/haas/statuses/e15cac76c7c72a1f4f9b7945d02f7ac673619d3f","head":{"label":"zenhack:vlan-trunking","ref":"vlan-trunking","sha":"e15cac76c7c72a1f4f9b7945d02f7ac673619d3f","user":{"login":"zenhack","id":883774,"avatar_url":"https://avatars.githubusercontent.com/u/883774?v=3","gravatar_id":"","url":"https://api.github.com/users/zenhack","html_url":"https://github.com/zenhack","followers_url":"https://api.github.com/users/zenhack/followers","following_url":"https://api.github.com/users/zenhack/following{/other_user}","gists_url":"https://api.github.com/users/zenhack/gists{/gist_id}","starred_url":"https://api.github.com/users/zenhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenhack/subscriptions","organizations_url":"https://api.github.com/users/zenhack/orgs","repos_url":"https://api.github.com/users/zenhack/repos","events_url":"https://api.github.com/users/zenhack/events{/privacy}","received_events_url":"https://api.github.com/users/zenhack/received_events","type":"User","site_admin":false},"repo":{"id":19796467,"name":"haas","full_name":"zenhack/haas","owner":{"login":"zenhack","id":883774,"avatar_url":"https://avatars.githubusercontent.com/u/883774?v=3","gravatar_id":"","url":"https://api.github.com/users/zenhack","html_url":"https://github.com/zenhack","followers_url":"https://api.github.com/users/zenhack/followers","following_url":"https://api.github.com/users/zenhack/following{/other_user}","gists_url":"https://api.github.com/users/zenhack/gists{/gist_id}","starred_url":"https://api.github.com/users/zenhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenhack/subscriptions","organizations_url":"https://api.github.com/users/zenhack/orgs","repos_url":"https://api.github.com/users/zenhack/repos","events_url":"https://api.github.com/users/zenhack/events{/privacy}","received_events_url":"https://api.github.com/users/zenhack/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zenhack/haas","description":"","fork":true,"url":"https://api.github.com/repos/zenhack/haas","forks_url":"https://api.github.com/repos/zenhack/haas/forks","keys_url":"https://api.github.com/repos/zenhack/haas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zenhack/haas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zenhack/haas/teams","hooks_url":"https://api.github.com/repos/zenhack/haas/hooks","issue_events_url":"https://api.github.com/repos/zenhack/haas/issues/events{/number}","events_url":"https://api.github.com/repos/zenhack/haas/events","assignees_url":"https://api.github.com/repos/zenhack/haas/assignees{/user}","branches_url":"https://api.github.com/repos/zenhack/haas/branches{/branch}","tags_url":"https://api.github.com/repos/zenhack/haas/tags","blobs_url":"https://api.github.com/repos/zenhack/haas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zenhack/haas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zenhack/haas/git/refs{/sha}","trees_url":"https://api.github.com/repos/zenhack/haas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zenhack/haas/statuses/{sha}","languages_url":"https://api.github.com/repos/zenhack/haas/languages","stargazers_url":"https://api.github.com/repos/zenhack/haas/stargazers","contributors_url":"https://api.github.com/repos/zenhack/haas/contributors","subscribers_url":"https://api.github.com/repos/zenhack/haas/subscribers","subscription_url":"https://api.github.com/repos/zenhack/haas/subscription","commits_url":"https://api.github.com/repos/zenhack/haas/commits{/sha}","git_commits_url":"https://api.github.com/repos/zenhack/haas/git/commits{/sha}","comments_url":"https://api.github.com/repos/zenhack/haas/comments{/number}","issue_comment_url":"https://api.github.com/repos/zenhack/haas/issues/comments{/number}","contents_url":"https://api.github.com/repos/zenhack/haas/contents/{+path}","compare_url":"https://api.github.com/repos/zenhack/haas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zenhack/haas/merges","archive_url":"https://api.github.com/repos/zenhack/haas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zenhack/haas/downloads","issues_url":"https://api.github.com/repos/zenhack/haas/issues{/number}","pulls_url":"https://api.github.com/repos/zenhack/haas/pulls{/number}","milestones_url":"https://api.github.com/repos/zenhack/haas/milestones{/number}","notifications_url":"https://api.github.com/repos/zenhack/haas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zenhack/haas/labels{/name}","releases_url":"https://api.github.com/repos/zenhack/haas/releases{/id}","created_at":"2014-05-14T21:13:52Z","updated_at":"2014-06-27T05:22:27Z","pushed_at":"2015-05-19T22:21:13Z","git_url":"git://github.com/zenhack/haas.git","ssh_url":"git@github.com:zenhack/haas.git","clone_url":"https://github.com/zenhack/haas.git","svn_url":"https://github.com/zenhack/haas","homepage":null,"size":2453,"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":"devel"}},"base":{"label":"CCI-MOC:master","ref":"master","sha":"356160c571285019a38553a03de78c0a3632f822","user":{"login":"CCI-MOC","id":3578683,"avatar_url":"https://avatars.githubusercontent.com/u/3578683?v=3","gravatar_id":"","url":"https://api.github.com/users/CCI-MOC","html_url":"https://github.com/CCI-MOC","followers_url":"https://api.github.com/users/CCI-MOC/followers","following_url":"https://api.github.com/users/CCI-MOC/following{/other_user}","gists_url":"https://api.github.com/users/CCI-MOC/gists{/gist_id}","starred_url":"https://api.github.com/users/CCI-MOC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCI-MOC/subscriptions","organizations_url":"https://api.github.com/users/CCI-MOC/orgs","repos_url":"https://api.github.com/users/CCI-MOC/repos","events_url":"https://api.github.com/users/CCI-MOC/events{/privacy}","received_events_url":"https://api.github.com/users/CCI-MOC/received_events","type":"Organization","site_admin":false},"repo":{"id":16487339,"name":"haas","full_name":"CCI-MOC/haas","owner":{"login":"CCI-MOC","id":3578683,"avatar_url":"https://avatars.githubusercontent.com/u/3578683?v=3","gravatar_id":"","url":"https://api.github.com/users/CCI-MOC","html_url":"https://github.com/CCI-MOC","followers_url":"https://api.github.com/users/CCI-MOC/followers","following_url":"https://api.github.com/users/CCI-MOC/following{/other_user}","gists_url":"https://api.github.com/users/CCI-MOC/gists{/gist_id}","starred_url":"https://api.github.com/users/CCI-MOC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCI-MOC/subscriptions","organizations_url":"https://api.github.com/users/CCI-MOC/orgs","repos_url":"https://api.github.com/users/CCI-MOC/repos","events_url":"https://api.github.com/users/CCI-MOC/events{/privacy}","received_events_url":"https://api.github.com/users/CCI-MOC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CCI-MOC/haas","description":"","fork":false,"url":"https://api.github.com/repos/CCI-MOC/haas","forks_url":"https://api.github.com/repos/CCI-MOC/haas/forks","keys_url":"https://api.github.com/repos/CCI-MOC/haas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CCI-MOC/haas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CCI-MOC/haas/teams","hooks_url":"https://api.github.com/repos/CCI-MOC/haas/hooks","issue_events_url":"https://api.github.com/repos/CCI-MOC/haas/issues/events{/number}","events_url":"https://api.github.com/repos/CCI-MOC/haas/events","assignees_url":"https://api.github.com/repos/CCI-MOC/haas/assignees{/user}","branches_url":"https://api.github.com/repos/CCI-MOC/haas/branches{/branch}","tags_url":"https://api.github.com/repos/CCI-MOC/haas/tags","blobs_url":"https://api.github.com/repos/CCI-MOC/haas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CCI-MOC/haas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CCI-MOC/haas/git/refs{/sha}","trees_url":"https://api.github.com/repos/CCI-MOC/haas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CCI-MOC/haas/statuses/{sha}","languages_url":"https://api.github.com/repos/CCI-MOC/haas/languages","stargazers_url":"https://api.github.com/repos/CCI-MOC/haas/stargazers","contributors_url":"https://api.github.com/repos/CCI-MOC/haas/contributors","subscribers_url":"https://api.github.com/repos/CCI-MOC/haas/subscribers","subscription_url":"https://api.github.com/repos/CCI-MOC/haas/subscription","commits_url":"https://api.github.com/repos/CCI-MOC/haas/commits{/sha}","git_commits_url":"https://api.github.com/repos/CCI-MOC/haas/git/commits{/sha}","comments_url":"https://api.github.com/repos/CCI-MOC/haas/comments{/number}","issue_comment_url":"https://api.github.com/repos/CCI-MOC/haas/issues/comments{/number}","contents_url":"https://api.github.com/repos/CCI-MOC/haas/contents/{+path}","compare_url":"https://api.github.com/repos/CCI-MOC/haas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CCI-MOC/haas/merges","archive_url":"https://api.github.com/repos/CCI-MOC/haas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CCI-MOC/haas/downloads","issues_url":"https://api.github.com/repos/CCI-MOC/haas/issues{/number}","pulls_url":"https://api.github.com/repos/CCI-MOC/haas/pulls{/number}","milestones_url":"https://api.github.com/repos/CCI-MOC/haas/milestones{/number}","notifications_url":"https://api.github.com/repos/CCI-MOC/haas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CCI-MOC/haas/labels{/name}","releases_url":"https://api.github.com/repos/CCI-MOC/haas/releases{/id}","created_at":"2014-02-03T17:48:01Z","updated_at":"2015-05-14T22:15:54Z","pushed_at":"2015-05-21T20:26:37Z","git_url":"git://github.com/CCI-MOC/haas.git","ssh_url":"git@github.com:CCI-MOC/haas.git","clone_url":"https://github.com/CCI-MOC/haas.git","svn_url":"https://github.com/CCI-MOC/haas","homepage":null,"size":5461,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":85,"forks":20,"open_issues":85,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/408"},"html":{"href":"https://github.com/CCI-MOC/haas/pull/408"},"issue":{"href":"https://api.github.com/repos/CCI-MOC/haas/issues/408"},"comments":{"href":"https://api.github.com/repos/CCI-MOC/haas/issues/408/comments"},"review_comments":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/408/comments"},"review_comment":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/408/commits"},"statuses":{"href":"https://api.github.com/repos/CCI-MOC/haas/statuses/e15cac76c7c72a1f4f9b7945d02f7ac673619d3f"}}}}