Misc api bits

Some miscellaneous unimplemented API bits.
On Tue, Nov 25, 2014 at 09:31:54AM -0800, Stéphane Graber wrote:
> > @@ -88,7 +88,13 @@ func (d *Daemon) isTrustedClient(r *http.Request) bool {
> >  }
> >  
> >  func (d *Daemon) createCmd(version string, c Command) {
> > -	uri := fmt.Sprintf("/%s/%s", version, c.name)
> > +	var uri string
> > +	if c.name == "" {
> > +		uri = fmt.Sprintf("/%s", version)
> > +	} else {
> > +		uri = fmt.Sprintf("/%s/%s", version, c.name)
> > +	}
> > +
> 
> The PUT to create a container should always be against the selection, the only difference is whether the name attribute is set or not. The resulting container URL is then returned alongside the background operation.

Sorry, the function might be poorly named. This is unrelated to
container creation, it is just building the internal bits for the API
(which we call Commands, which is perhaps a bad name).

> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/lxc/lxd/pull/95/files#r20879224