{"action":"created","issue":{"url":"https://api.github.com/repos/snapcore/snapd/issues/2005","repository_url":"https://api.github.com/repos/snapcore/snapd","labels_url":"https://api.github.com/repos/snapcore/snapd/issues/2005/labels{/name}","comments_url":"https://api.github.com/repos/snapcore/snapd/issues/2005/comments","events_url":"https://api.github.com/repos/snapcore/snapd/issues/2005/events","html_url":"https://github.com/snapcore/snapd/pull/2005","id":179467313,"number":2005,"title":"asserts,overlord,snap: add prepare-device hook for device registration","user":{"login":"pedronis","id":975757,"avatar_url":"https://avatars.githubusercontent.com/u/975757?v=3","gravatar_id":"","url":"https://api.github.com/users/pedronis","html_url":"https://github.com/pedronis","followers_url":"https://api.github.com/users/pedronis/followers","following_url":"https://api.github.com/users/pedronis/following{/other_user}","gists_url":"https://api.github.com/users/pedronis/gists{/gist_id}","starred_url":"https://api.github.com/users/pedronis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedronis/subscriptions","organizations_url":"https://api.github.com/users/pedronis/orgs","repos_url":"https://api.github.com/users/pedronis/repos","events_url":"https://api.github.com/users/pedronis/events{/privacy}","received_events_url":"https://api.github.com/users/pedronis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/snapcore/snapd/labels/Critical","name":"Critical","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-27T11:29:05Z","updated_at":"2016-09-27T22:12:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/2005","html_url":"https://github.com/snapcore/snapd/pull/2005","diff_url":"https://github.com/snapcore/snapd/pull/2005.diff","patch_url":"https://github.com/snapcore/snapd/pull/2005.patch"},"body":"This teaches the device inititialisation process to run an optional device-init hook in the gadget snap at the start of each full tentative, atm the hook can optionally configure the registration process and the serial-request by setting the following bits of gadget configuration:\r\n\r\n* registration-service-url   (registration will use /request-id and /serial under this)\r\n* registration-http-headers (optional, extra http headers to set on registration http requests)\r\n* registration-proposed-serial (optional, proposed serial identifier for the device)\r\n* registration-body (optional, the text for the body of the serial-request)\r\n\r\nThis also adds the concept of an optional \"serial\" header in the serial-request to express a proposed serial value.\r\n\r\nSome tweaks to configstate/hookstate to help with unit testing and distinguishing errors."},"comment":{"url":"https://api.github.com/repos/snapcore/snapd/issues/comments/250014751","html_url":"https://github.com/snapcore/snapd/pull/2005#issuecomment-250014751","issue_url":"https://api.github.com/repos/snapcore/snapd/issues/2005","id":250014751,"user":{"login":"pedronis","id":975757,"avatar_url":"https://avatars.githubusercontent.com/u/975757?v=3","gravatar_id":"","url":"https://api.github.com/users/pedronis","html_url":"https://github.com/pedronis","followers_url":"https://api.github.com/users/pedronis/followers","following_url":"https://api.github.com/users/pedronis/following{/other_user}","gists_url":"https://api.github.com/users/pedronis/gists{/gist_id}","starred_url":"https://api.github.com/users/pedronis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedronis/subscriptions","organizations_url":"https://api.github.com/users/pedronis/orgs","repos_url":"https://api.github.com/users/pedronis/repos","events_url":"https://api.github.com/users/pedronis/events{/privacy}","received_events_url":"https://api.github.com/users/pedronis/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T22:12:48Z","updated_at":"2016-09-27T22:12:48Z","body":"last discussion points to the hook being called \"prepare-device\""}}
{"actor":{"display_login":"pedronis"}}