add qcow2 and vmdk boot images
This commit is contained in:
@ -54,6 +54,13 @@ func (ws wsHost) register(rws *restful.WebService, alterRB func(*restful.RouteBu
|
||||
Produces(mime.DISK + "+lz4").
|
||||
Doc("Get the " + ws.hostDoc + "'s boot disk image (lz4 compressed)"),
|
||||
|
||||
b("boot.qcow2").
|
||||
Produces(mime.DISK + "+qcow2").
|
||||
Doc("Get the " + ws.hostDoc + "'s boot disk image (qcow2)"),
|
||||
b("boot.vmdk").
|
||||
Produces(mime.DISK + "+vmdk").
|
||||
Doc("Get the " + ws.hostDoc + "'s boot disk image (VMDK)"),
|
||||
|
||||
// metal/local HDD upgrades
|
||||
b("boot.tar").
|
||||
Produces(mime.TAR).
|
||||
@ -186,6 +193,10 @@ func renderHost(w http.ResponseWriter, r *http.Request, what string, host *local
|
||||
err = renderCtx(w, r, ctx, what, buildBootImgGZ)
|
||||
case "boot.img.lz4":
|
||||
err = renderCtx(w, r, ctx, what, buildBootImgLZ4)
|
||||
case "boot.qcow2":
|
||||
err = renderCtx(w, r, ctx, what, buildBootQcow2)
|
||||
case "boot.vmdk":
|
||||
err = renderCtx(w, r, ctx, what, buildBootVmdk)
|
||||
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
|
Reference in New Issue
Block a user