You should POST instead of PUT new certs to /trust

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Merge pull request #125 from tych0/fix-typo

You should POST instead of PUT new certs to /trust
Set the password via the spec's rest API

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Use the real trust REST api

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
add /1.0/trust/<fingerprint> GET support

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Merge pull request #126 from tych0/restificate-trust

Restificate trust
Enforce every code path returning a response

LXD had several code paths which would not return a response (or would return
some bogus response). In addition, the code was often more verbose than it
needed to be, having to pass around the ResponseWriter everywhere that needed
it.

This commit resolves that by introducing our own signature for http handler
types, the Response type. You can still do arbitrary stuff to the
ResponseWriter if you want (see the container file handler code), but this uses
the compiler to enforce that every code path actually returns a response. It is
also significatly less ugly, with no bare returns and not having to pass the
ResponseWriter everywhere.

Closes #101

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Merge pull request #129 from tych0/force-response

Enforce every code path returning a response
Implement `lxc snapshot` and the corresponding API

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Merge pull request #128 from tych0/snapshots

Implement `lxc snapshot` and the corresponding API
Add a description of the websocket protocol to the spec

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Add an initial implementation of exec over websockets

There are still some terminal/buffering issues when running bash directly
(e.g. tab completion doesn't really work, the terminal gets confused), I will
work on those ASAP. The basics are here, though.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Emulate a terminal slightly more accurately

This allows things like top to work when you run bash.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Remove shell command and last vestige of legacy API

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>