Rename "container" to "image"
- Updated `wwctl upgrade` to handle updates - Maintained `.Container` and `.ContainerName` in tstruct - Added `ContainerName()` methods to node and profile objects - Added `--container`, `-C` aliases to wwctl commands (`<node|profile> <add|set>`) - Added `wwctl container` alias - Added support for `container_exit.sh` if `image_exit.sh` is not found Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package container
|
||||
package image
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/warewulf/warewulf/internal/pkg/api/routes/wwapiv1"
|
||||
"github.com/warewulf/warewulf/internal/pkg/container"
|
||||
"github.com/warewulf/warewulf/internal/pkg/image"
|
||||
"github.com/warewulf/warewulf/internal/pkg/kernel"
|
||||
"github.com/warewulf/warewulf/internal/pkg/node"
|
||||
"github.com/warewulf/warewulf/internal/pkg/util"
|
||||
@@ -18,71 +18,71 @@ import (
|
||||
"github.com/warewulf/warewulf/internal/pkg/wwlog"
|
||||
)
|
||||
|
||||
func ContainerCopy(cbp *wwapiv1.ContainerCopyParameter) (err error) {
|
||||
func ImageCopy(cbp *wwapiv1.ImageCopyParameter) (err error) {
|
||||
if cbp == nil {
|
||||
return fmt.Errorf("containerCopyParameter is nil")
|
||||
return fmt.Errorf("imageCopyParameter is nil")
|
||||
}
|
||||
|
||||
if !container.DoesSourceExist(cbp.ContainerSource) {
|
||||
return fmt.Errorf("container %s does not exists.", cbp.ContainerSource)
|
||||
if !image.DoesSourceExist(cbp.ImageSource) {
|
||||
return fmt.Errorf("image %s does not exists.", cbp.ImageSource)
|
||||
}
|
||||
|
||||
if !container.ValidName(cbp.ContainerDestination) {
|
||||
return fmt.Errorf("container name contains illegal characters : %s", cbp.ContainerDestination)
|
||||
if !image.ValidName(cbp.ImageDestination) {
|
||||
return fmt.Errorf("image name contains illegal characters : %s", cbp.ImageDestination)
|
||||
}
|
||||
|
||||
if container.DoesSourceExist(cbp.ContainerDestination) {
|
||||
return fmt.Errorf("An other container with the name %s already exists", cbp.ContainerDestination)
|
||||
if image.DoesSourceExist(cbp.ImageDestination) {
|
||||
return fmt.Errorf("An other image with the name %s already exists", cbp.ImageDestination)
|
||||
}
|
||||
|
||||
err = container.Duplicate(cbp.ContainerSource, cbp.ContainerDestination)
|
||||
err = image.Duplicate(cbp.ImageSource, cbp.ImageDestination)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not duplicate image: %s", err.Error())
|
||||
}
|
||||
|
||||
if cbp.Build {
|
||||
err = container.Build(cbp.ContainerDestination, true)
|
||||
err = image.Build(cbp.ImageDestination, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("Container %s has been succesfully duplicated as %s", cbp.ContainerSource, cbp.ContainerDestination)
|
||||
return fmt.Errorf("Image %s has been succesfully duplicated as %s", cbp.ImageSource, cbp.ImageDestination)
|
||||
}
|
||||
|
||||
func ContainerBuild(cbp *wwapiv1.ContainerBuildParameter) (err error) {
|
||||
func ImageBuild(cbp *wwapiv1.ImageBuildParameter) (err error) {
|
||||
if cbp == nil {
|
||||
return fmt.Errorf("ContainerBuildParameter is nil")
|
||||
return fmt.Errorf("ImageBuildParameter is nil")
|
||||
}
|
||||
|
||||
var containers []string
|
||||
var images []string
|
||||
|
||||
if cbp.All {
|
||||
containers, err = container.ListSources()
|
||||
images, err = image.ListSources()
|
||||
} else {
|
||||
containers = cbp.ContainerNames
|
||||
images = cbp.ImageNames
|
||||
}
|
||||
|
||||
if len(containers) == 0 {
|
||||
if len(images) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
for _, c := range containers {
|
||||
if !container.ValidSource(c) {
|
||||
return fmt.Errorf("VNFS name does not exist: %s", c)
|
||||
for _, c := range images {
|
||||
if !image.ValidSource(c) {
|
||||
return fmt.Errorf("Image name does not exist: %s", c)
|
||||
}
|
||||
|
||||
err = container.Build(c, cbp.Force)
|
||||
err = image.Build(c, cbp.Force)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not build container %s: %s", c, err)
|
||||
return fmt.Errorf("could not build image %s: %s", c, err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func ContainerDelete(cdp *wwapiv1.ContainerDeleteParameter) (err error) {
|
||||
func ImageDelete(cdp *wwapiv1.ImageDeleteParameter) (err error) {
|
||||
if cdp == nil {
|
||||
return fmt.Errorf("ContainerDeleteParameter is nil")
|
||||
return fmt.Errorf("ImageDeleteParameter is nil")
|
||||
}
|
||||
|
||||
nodeDB, err := node.New()
|
||||
@@ -96,36 +96,36 @@ func ContainerDelete(cdp *wwapiv1.ContainerDeleteParameter) (err error) {
|
||||
}
|
||||
|
||||
ARG_LOOP:
|
||||
for i := 0; i < len(cdp.ContainerNames); i++ {
|
||||
for i := 0; i < len(cdp.ImageNames); i++ {
|
||||
//_, arg := range args {
|
||||
containerName := cdp.ContainerNames[i]
|
||||
imageName := cdp.ImageNames[i]
|
||||
for _, n := range nodes {
|
||||
if n.ContainerName == containerName {
|
||||
wwlog.Error("Container is configured for nodes, skipping: %s", containerName)
|
||||
if n.ImageName == imageName {
|
||||
wwlog.Error("Image is configured for nodes, skipping: %s", imageName)
|
||||
continue ARG_LOOP
|
||||
}
|
||||
}
|
||||
|
||||
if !container.ValidSource(containerName) {
|
||||
wwlog.Error("Container name is not a valid source: %s", containerName)
|
||||
if !image.ValidSource(imageName) {
|
||||
wwlog.Error("Image name is not a valid source: %s", imageName)
|
||||
continue
|
||||
}
|
||||
err := container.DeleteSource(containerName)
|
||||
err := image.DeleteSource(imageName)
|
||||
if err != nil {
|
||||
wwlog.Error("Could not remove source: %s", containerName)
|
||||
wwlog.Error("Could not remove source: %s", imageName)
|
||||
}
|
||||
err = container.DeleteImage(containerName)
|
||||
err = image.DeleteImage(imageName)
|
||||
if err != nil {
|
||||
wwlog.Error("Could not remove image files %s", containerName)
|
||||
wwlog.Error("Could not remove image files %s", imageName)
|
||||
}
|
||||
|
||||
fmt.Printf("Container has been deleted: %s\n", containerName)
|
||||
fmt.Printf("Image has been deleted: %s\n", imageName)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func ContainerImport(cip *wwapiv1.ContainerImportParameter) (containerName string, err error) {
|
||||
func ImageImport(cip *wwapiv1.ImageImportParameter) (imageName string, err error) {
|
||||
if cip == nil {
|
||||
err = fmt.Errorf("NodeAddParameter is nil")
|
||||
return
|
||||
@@ -133,20 +133,20 @@ func ContainerImport(cip *wwapiv1.ContainerImportParameter) (containerName strin
|
||||
|
||||
if cip.Name == "" {
|
||||
name := path.Base(cip.Source)
|
||||
wwlog.Info("Setting VNFS name: %s", name)
|
||||
wwlog.Info("Setting image name: %s", name)
|
||||
cip.Name = name
|
||||
}
|
||||
if !container.ValidName(cip.Name) {
|
||||
err = fmt.Errorf("VNFS name contains illegal characters: %s", cip.Name)
|
||||
if !image.ValidName(cip.Name) {
|
||||
err = fmt.Errorf("Image name contains illegal characters: %s", cip.Name)
|
||||
return
|
||||
}
|
||||
|
||||
containerName = cip.Name
|
||||
fullPath := container.SourceDir(cip.Name)
|
||||
imageName = cip.Name
|
||||
fullPath := image.SourceDir(cip.Name)
|
||||
|
||||
// container already exists and should be removed first
|
||||
// image already exists and should be removed first
|
||||
if util.IsDir(fullPath) && cip.Force {
|
||||
wwlog.Info("Overwriting existing VNFS")
|
||||
wwlog.Info("Overwriting existing image")
|
||||
err = os.RemoveAll(fullPath)
|
||||
if err != nil {
|
||||
return
|
||||
@@ -155,10 +155,10 @@ func ContainerImport(cip *wwapiv1.ContainerImportParameter) (containerName strin
|
||||
|
||||
if util.IsDir(fullPath) {
|
||||
if !cip.Update {
|
||||
err = fmt.Errorf("VNFS Name exists, specify --force, --update, or choose a different name: %s", cip.Name)
|
||||
err = fmt.Errorf("Image name exists, specify --force, --update, or choose a different name: %s", cip.Name)
|
||||
return
|
||||
}
|
||||
wwlog.Info("Updating existing VNFS")
|
||||
wwlog.Info("Updating existing image")
|
||||
} else if strings.HasPrefix(cip.Source, "docker://") || strings.HasPrefix(cip.Source, "docker-daemon://") ||
|
||||
strings.HasPrefix(cip.Source, "file://") || util.IsFile(cip.Source) {
|
||||
var sCtx *types.SystemContext
|
||||
@@ -174,17 +174,17 @@ func ContainerImport(cip *wwapiv1.ContainerImportParameter) (containerName strin
|
||||
return
|
||||
}
|
||||
}
|
||||
err = container.ImportDocker(cip.Source, cip.Name, sCtx)
|
||||
err = image.ImportDocker(cip.Source, cip.Name, sCtx)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("could not import image: %s", err.Error())
|
||||
_ = container.DeleteSource(cip.Name)
|
||||
_ = image.DeleteSource(cip.Name)
|
||||
return
|
||||
}
|
||||
} else if util.IsDir(cip.Source) {
|
||||
err = container.ImportDirectory(cip.Source, cip.Name)
|
||||
err = image.ImportDirectory(cip.Source, cip.Name)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("could not import image: %s", err.Error())
|
||||
_ = container.DeleteSource(cip.Name)
|
||||
_ = image.DeleteSource(cip.Name)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
@@ -193,7 +193,7 @@ func ContainerImport(cip *wwapiv1.ContainerImportParameter) (containerName strin
|
||||
}
|
||||
|
||||
if cip.SyncUser {
|
||||
err = container.SyncUids(cip.Name, true)
|
||||
err = image.SyncUids(cip.Name, true)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("error in user sync, fix error and run 'syncuser' manually: %s", err)
|
||||
return
|
||||
@@ -201,20 +201,20 @@ func ContainerImport(cip *wwapiv1.ContainerImportParameter) (containerName strin
|
||||
}
|
||||
|
||||
if cip.Build {
|
||||
wwlog.Info("Building container: %s", cip.Name)
|
||||
err = container.Build(cip.Name, true)
|
||||
wwlog.Info("Building image: %s", cip.Name)
|
||||
err = image.Build(cip.Name, true)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("could not build container %s: %s", cip.Name, err.Error())
|
||||
err = fmt.Errorf("could not build image %s: %s", cip.Name, err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func ContainerList() (containerInfo []*wwapiv1.ContainerInfo, err error) {
|
||||
func ImageList() (imageInfo []*wwapiv1.ImageInfo, err error) {
|
||||
var sources []string
|
||||
|
||||
sources, err = container.ListSources()
|
||||
sources, err = image.ListSources()
|
||||
if err != nil {
|
||||
wwlog.Error("%s", err)
|
||||
return
|
||||
@@ -234,7 +234,7 @@ func ContainerList() (containerInfo []*wwapiv1.ContainerInfo, err error) {
|
||||
|
||||
nodemap := make(map[string]int)
|
||||
for _, n := range nodes {
|
||||
nodemap[n.ContainerName]++
|
||||
nodemap[n.ImageName]++
|
||||
}
|
||||
|
||||
for _, source := range sources {
|
||||
@@ -249,31 +249,31 @@ func ContainerList() (containerInfo []*wwapiv1.ContainerInfo, err error) {
|
||||
kernelVersion = kernel.Version()
|
||||
}
|
||||
var creationTime uint64
|
||||
sourceStat, err := os.Stat(container.SourceDir(source))
|
||||
wwlog.Debug("Checking creation time for: %s,%v", container.SourceDir(source), sourceStat.ModTime())
|
||||
sourceStat, err := os.Stat(image.SourceDir(source))
|
||||
wwlog.Debug("Checking creation time for: %s,%v", image.SourceDir(source), sourceStat.ModTime())
|
||||
if err != nil {
|
||||
wwlog.Error("%s\n", err)
|
||||
} else {
|
||||
creationTime = uint64(sourceStat.ModTime().Unix())
|
||||
}
|
||||
var modTime uint64
|
||||
imageStat, err := os.Stat(container.ImageFile(source))
|
||||
imageStat, err := os.Stat(image.ImageFile(source))
|
||||
if err == nil {
|
||||
modTime = uint64(imageStat.ModTime().Unix())
|
||||
}
|
||||
size, err := util.DirSize(container.SourceDir(source))
|
||||
size, err := util.DirSize(image.SourceDir(source))
|
||||
if err != nil {
|
||||
wwlog.Error("%s\n", err)
|
||||
}
|
||||
imgSize := 0
|
||||
if imgF, err := os.Stat(container.ImageFile(source)); err == nil {
|
||||
if imgF, err := os.Stat(image.ImageFile(source)); err == nil {
|
||||
imgSize = int(imgF.Size())
|
||||
}
|
||||
imgCSize := 0
|
||||
if imgFC, err := os.Stat(container.ImageFile(source) + ".gz"); err == nil {
|
||||
if imgFC, err := os.Stat(image.ImageFile(source) + ".gz"); err == nil {
|
||||
imgCSize = int(imgFC.Size())
|
||||
}
|
||||
containerInfo = append(containerInfo, &wwapiv1.ContainerInfo{
|
||||
imageInfo = append(imageInfo, &wwapiv1.ImageInfo{
|
||||
Name: source,
|
||||
NodeCount: uint32(nodemap[source]),
|
||||
KernelVersion: kernelVersion,
|
||||
@@ -288,20 +288,20 @@ func ContainerList() (containerInfo []*wwapiv1.ContainerInfo, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func ContainerShow(csp *wwapiv1.ContainerShowParameter) (response *wwapiv1.ContainerShowResponse, err error) {
|
||||
containerName := csp.ContainerName
|
||||
func ImageShow(csp *wwapiv1.ImageShowParameter) (response *wwapiv1.ImageShowResponse, err error) {
|
||||
imageName := csp.ImageName
|
||||
|
||||
if !container.ValidName(containerName) {
|
||||
err = fmt.Errorf("%s is not a valid container name", containerName)
|
||||
if !image.ValidName(imageName) {
|
||||
err = fmt.Errorf("%s is not a valid image name", imageName)
|
||||
return
|
||||
}
|
||||
|
||||
rootFsDir := container.RootFsDir(containerName)
|
||||
rootFsDir := image.RootFsDir(imageName)
|
||||
if !util.IsDir(rootFsDir) {
|
||||
err = fmt.Errorf("%s is not a valid container", containerName)
|
||||
err = fmt.Errorf("%s is not a valid image", imageName)
|
||||
return
|
||||
}
|
||||
kernel := kernel.FindKernels(containerName).Default()
|
||||
kernel := kernel.FindKernels(imageName).Default()
|
||||
kernelVersion := ""
|
||||
if kernel != nil {
|
||||
kernelVersion = kernel.Version()
|
||||
@@ -319,13 +319,13 @@ func ContainerShow(csp *wwapiv1.ContainerShowParameter) (response *wwapiv1.Conta
|
||||
|
||||
var nodeList []string
|
||||
for _, n := range nodes {
|
||||
if n.ContainerName == containerName {
|
||||
if n.ImageName == imageName {
|
||||
nodeList = append(nodeList, n.Id())
|
||||
}
|
||||
}
|
||||
|
||||
response = &wwapiv1.ContainerShowResponse{
|
||||
Name: containerName,
|
||||
response = &wwapiv1.ImageShowResponse{
|
||||
Name: imageName,
|
||||
Rootfs: rootFsDir,
|
||||
Nodes: nodeList,
|
||||
KernelVersion: kernelVersion,
|
||||
@@ -333,28 +333,28 @@ func ContainerShow(csp *wwapiv1.ContainerShowParameter) (response *wwapiv1.Conta
|
||||
return
|
||||
}
|
||||
|
||||
func ContainerRename(crp *wwapiv1.ContainerRenameParameter) (err error) {
|
||||
// rename the container source folder
|
||||
sourceDir := container.SourceDir(crp.ContainerName)
|
||||
destDir := container.SourceDir(crp.TargetName)
|
||||
func ImageRename(crp *wwapiv1.ImageRenameParameter) (err error) {
|
||||
// rename the image source folder
|
||||
sourceDir := image.SourceDir(crp.ImageName)
|
||||
destDir := image.SourceDir(crp.TargetName)
|
||||
err = os.Rename(sourceDir, destDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = container.DeleteImage(crp.ContainerName)
|
||||
err = image.DeleteImage(crp.ImageName)
|
||||
if err != nil {
|
||||
wwlog.Warn("Could not remove image files for %s: %s", crp.ContainerName, err)
|
||||
wwlog.Warn("Could not remove image files for %s: %s", crp.ImageName, err)
|
||||
}
|
||||
|
||||
if crp.Build {
|
||||
err = container.Build(crp.TargetName, true)
|
||||
err = image.Build(crp.TargetName, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// update the nodes profiles container name
|
||||
// update the nodes profiles image name
|
||||
nodeDB, err := node.New()
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -365,8 +365,8 @@ func ContainerRename(crp *wwapiv1.ContainerRenameParameter) (err error) {
|
||||
return err
|
||||
}
|
||||
for _, node := range nodes {
|
||||
if node.ContainerName == crp.ContainerName {
|
||||
node.ContainerName = crp.TargetName
|
||||
if node.ImageName == crp.ImageName {
|
||||
node.ImageName = crp.TargetName
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,8 +375,8 @@ func ContainerRename(crp *wwapiv1.ContainerRenameParameter) (err error) {
|
||||
return err
|
||||
}
|
||||
for _, profile := range profiles {
|
||||
if profile.ContainerName == crp.ContainerName {
|
||||
profile.ContainerName = crp.TargetName
|
||||
if profile.ImageName == crp.ImageName {
|
||||
profile.ImageName = crp.TargetName
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ func NodeList(nodeGet *wwapiv1.GetNodeList) (nodeList wwapiv1.NodeList, err erro
|
||||
}
|
||||
} else if nodeGet.Type == wwapiv1.GetNodeList_Long {
|
||||
nodeList.Output = append(nodeList.Output,
|
||||
fmt.Sprintf("%s:=:%s:=:%s:=:%s", "NODE NAME", "KERNEL VERSION", "CONTAINER", "OVERLAYS (S/R)"))
|
||||
fmt.Sprintf("%s:=:%s:=:%s:=:%s", "NODE NAME", "KERNEL VERSION", "IMAGE", "OVERLAYS (S/R)"))
|
||||
for _, n := range node.FilterNodeListByName(nodes, nodeGet.Nodes) {
|
||||
kernelVersion := ""
|
||||
if n.Kernel != nil {
|
||||
@@ -83,7 +83,7 @@ func NodeList(nodeGet *wwapiv1.GetNodeList) (nodeList wwapiv1.NodeList, err erro
|
||||
nodeList.Output = append(nodeList.Output,
|
||||
fmt.Sprintf("%s:=:%s:=:%s:=:%s", n.Id(),
|
||||
kernelVersion,
|
||||
n.ContainerName,
|
||||
n.ImageName,
|
||||
strings.Join(n.SystemOverlay, ",")+"/"+strings.Join(n.RuntimeOverlay, ",")))
|
||||
}
|
||||
} else if nodeGet.Type == wwapiv1.GetNodeList_All {
|
||||
|
||||
@@ -16,33 +16,33 @@ message NodeDBHash {
|
||||
string hash = 1;
|
||||
}
|
||||
|
||||
// Container
|
||||
// Image
|
||||
|
||||
// ContainerBuildParameter contains input for building zero or more containers.
|
||||
message ContainerBuildParameter {
|
||||
repeated string containerNames = 1;
|
||||
// ImageBuildParameter contains input for building zero or more images.
|
||||
message ImageBuildParameter {
|
||||
repeated string imageNames = 1;
|
||||
bool force = 2;
|
||||
bool all = 3;
|
||||
// bool default = 4;
|
||||
}
|
||||
|
||||
// ContainerDeleteParameter contains input for removing containers from Warewulf
|
||||
// ImageDeleteParameter contains input for removing images from Warewulf
|
||||
// management.
|
||||
message ContainerDeleteParameter {
|
||||
repeated string containerNames = 1;
|
||||
message ImageDeleteParameter {
|
||||
repeated string imageNames = 1;
|
||||
}
|
||||
|
||||
// ContainerCopyParameter contains 2 inputs : first one for the source container name and second one for the duplicated container name.
|
||||
message ContainerCopyParameter {
|
||||
string containerSource = 1;
|
||||
string containerDestination = 2;
|
||||
// ImageCopyParameter contains 2 inputs : first one for the image source name and second one for the duplicated image name.
|
||||
message ImageCopyParameter {
|
||||
string imageSource = 1;
|
||||
string imageDestination = 2;
|
||||
bool build = 3;
|
||||
}
|
||||
|
||||
// ContainerImportParameter has all input for importing a container.
|
||||
message ContainerImportParameter{
|
||||
string source = 1; // container source uri
|
||||
string name = 2; // container name
|
||||
// ImageImportParameter has all input for importing an image.
|
||||
message ImageImportParameter{
|
||||
string source = 1; // image source uri
|
||||
string name = 2; // image name
|
||||
bool force = 3;
|
||||
bool update = 4;
|
||||
bool build = 5;
|
||||
@@ -54,9 +54,9 @@ message ContainerImportParameter{
|
||||
string platform = 11;
|
||||
}
|
||||
|
||||
// ContainerInfo has data on each container. This is emitted in the
|
||||
// ContainerListResponse.
|
||||
message ContainerInfo {
|
||||
// ImageInfo has data on each image. This is emitted in the
|
||||
// ImageListResponse.
|
||||
message ImageInfo {
|
||||
string name = 1;
|
||||
uint32 nodeCount = 2;
|
||||
string kernelVersion = 3;
|
||||
@@ -67,32 +67,32 @@ message ContainerInfo {
|
||||
uint64 imgSizeComp = 8;
|
||||
}
|
||||
|
||||
// ContainerListResponse has all information that ContainerList provides.
|
||||
message ContainerListResponse {
|
||||
repeated ContainerInfo containers = 1;
|
||||
// ImageListResponse has all information that ImageList provides.
|
||||
message ImageListResponse {
|
||||
repeated ImageInfo images = 1;
|
||||
}
|
||||
|
||||
// ContainerShowParameter is the input for ContainerShow.
|
||||
message ContainerShowParameter {
|
||||
string containerName = 1;
|
||||
// ImageShowParameter is the input for ImageShow.
|
||||
message ImageShowParameter {
|
||||
string imageName = 1;
|
||||
}
|
||||
|
||||
// ContainerShowResponse has all information emitted on ContainerShow.
|
||||
message ContainerShowResponse {
|
||||
// ImageShowResponse has all information emitted on ImageShow.
|
||||
message ImageShowResponse {
|
||||
string Name = 1;
|
||||
string Rootfs = 2;
|
||||
repeated string Nodes = 3;
|
||||
string KernelVersion = 4;
|
||||
}
|
||||
|
||||
// ContainerSyncUserParameter is the input for ContainerSyncUser.
|
||||
message ContainerSyncUserParameter {
|
||||
string containerName = 1;
|
||||
// ImageSyncUserParameter is the input for ImageSyncUser.
|
||||
message ImageSyncUserParameter {
|
||||
string imageName = 1;
|
||||
}
|
||||
|
||||
// ContainerRenameParameter is the input for ContainerRename
|
||||
message ContainerRenameParameter {
|
||||
string containerName = 1;
|
||||
// ImageRenameParameter is the input for ImageRename
|
||||
message ImageRenameParameter {
|
||||
string imageName = 1;
|
||||
string targetName = 2;
|
||||
bool build = 3;
|
||||
}
|
||||
@@ -241,56 +241,56 @@ message CanWriteConfig {
|
||||
// WWApi defines the wwapid service web interface.
|
||||
service WWApi {
|
||||
|
||||
// Containers
|
||||
// Images
|
||||
|
||||
// ContainerBuild builds zero or more containers.
|
||||
rpc ContainerBuild(ContainerBuildParameter) returns (ContainerListResponse) {
|
||||
// ImageBuild builds zero or more images.
|
||||
rpc ImageBuild(ImageBuildParameter) returns (ImageListResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/containerbuild"
|
||||
post: "/v1/imagebuild"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// ContainerDelete removes one or more container from Warewulf management.
|
||||
rpc ContainerDelete(ContainerDeleteParameter) returns (google.protobuf.Empty) {
|
||||
// ImageDelete removes one or more image from Warewulf management.
|
||||
rpc ImageDelete(ImageDeleteParameter) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v1/container"
|
||||
delete: "/v1/image"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
rpc ContainerCopy(ContainerCopyParameter) returns (google.protobuf.Empty) {
|
||||
rpc ImageCopy(ImageCopyParameter) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/containercopy"
|
||||
post: "/v1/imagecopy"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// ContainerImport imports a container to Warewulf.
|
||||
rpc ContainerImport(ContainerImportParameter) returns (ContainerListResponse) {
|
||||
// ImageImport imports an image to Warewulf.
|
||||
rpc ImageImport(ImageImportParameter) returns (ImageListResponse) {
|
||||
option(google.api.http) = {
|
||||
post: "/v1/container"
|
||||
post: "/v1/image"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// ContainerList lists ContainerInfo for each container.
|
||||
rpc ContainerList(google.protobuf.Empty) returns (ContainerListResponse) {
|
||||
// ImageList lists ImageInfo for each image.
|
||||
rpc ImageList(google.protobuf.Empty) returns (ImageListResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/container"
|
||||
get: "/v1/image"
|
||||
};
|
||||
}
|
||||
|
||||
// ContainerShow lists ContainerShow for each container.
|
||||
rpc ContainerShow(ContainerShowParameter) returns (ContainerShowResponse) {
|
||||
// ImageShow lists ImageShow for each image.
|
||||
rpc ImageShow(ImageShowParameter) returns (ImageShowResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/containershow"
|
||||
get: "/v1/imageshow"
|
||||
};
|
||||
}
|
||||
|
||||
// ContainerRename renames the container
|
||||
rpc ContainerRename(ContainerRenameParameter) returns (google.protobuf.Empty) {
|
||||
// ImageRename renames the image
|
||||
rpc ImageRename(ImageRenameParameter) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/containerrename"
|
||||
post: "/v1/imagerename"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -32,8 +32,8 @@ var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_WWApi_ContainerBuild_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerBuildParameter
|
||||
func request_WWApi_ImageBuild_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageBuildParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
@@ -44,13 +44,13 @@ func request_WWApi_ContainerBuild_0(ctx context.Context, marshaler runtime.Marsh
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ContainerBuild(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := client.ImageBuild(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_WWApi_ContainerBuild_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerBuildParameter
|
||||
func local_request_WWApi_ImageBuild_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageBuildParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
@@ -61,49 +61,49 @@ func local_request_WWApi_ContainerBuild_0(ctx context.Context, marshaler runtime
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ContainerBuild(ctx, &protoReq)
|
||||
msg, err := server.ImageBuild(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_WWApi_ContainerDelete_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
filter_WWApi_ImageDelete_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_WWApi_ContainerDelete_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerDeleteParameter
|
||||
func request_WWApi_ImageDelete_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageDeleteParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WWApi_ContainerDelete_0); err != nil {
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WWApi_ImageDelete_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ContainerDelete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := client.ImageDelete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_WWApi_ContainerDelete_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerDeleteParameter
|
||||
func local_request_WWApi_ImageDelete_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageDeleteParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WWApi_ContainerDelete_0); err != nil {
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WWApi_ImageDelete_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ContainerDelete(ctx, &protoReq)
|
||||
msg, err := server.ImageDelete(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_WWApi_ContainerCopy_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerCopyParameter
|
||||
func request_WWApi_ImageCopy_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageCopyParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
@@ -114,13 +114,13 @@ func request_WWApi_ContainerCopy_0(ctx context.Context, marshaler runtime.Marsha
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ContainerCopy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := client.ImageCopy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_WWApi_ContainerCopy_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerCopyParameter
|
||||
func local_request_WWApi_ImageCopy_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageCopyParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
@@ -131,13 +131,13 @@ func local_request_WWApi_ContainerCopy_0(ctx context.Context, marshaler runtime.
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ContainerCopy(ctx, &protoReq)
|
||||
msg, err := server.ImageCopy(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_WWApi_ContainerImport_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerImportParameter
|
||||
func request_WWApi_ImageImport_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageImportParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
@@ -148,13 +148,13 @@ func request_WWApi_ContainerImport_0(ctx context.Context, marshaler runtime.Mars
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ContainerImport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := client.ImageImport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_WWApi_ContainerImport_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerImportParameter
|
||||
func local_request_WWApi_ImageImport_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageImportParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
@@ -165,67 +165,67 @@ func local_request_WWApi_ContainerImport_0(ctx context.Context, marshaler runtim
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ContainerImport(ctx, &protoReq)
|
||||
msg, err := server.ImageImport(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_WWApi_ContainerList_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
func request_WWApi_ImageList_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.ContainerList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := client.ImageList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_WWApi_ContainerList_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
func local_request_WWApi_ImageList_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.ContainerList(ctx, &protoReq)
|
||||
msg, err := server.ImageList(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_WWApi_ContainerShow_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
filter_WWApi_ImageShow_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_WWApi_ContainerShow_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerShowParameter
|
||||
func request_WWApi_ImageShow_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageShowParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WWApi_ContainerShow_0); err != nil {
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WWApi_ImageShow_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ContainerShow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := client.ImageShow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_WWApi_ContainerShow_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerShowParameter
|
||||
func local_request_WWApi_ImageShow_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageShowParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WWApi_ContainerShow_0); err != nil {
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WWApi_ImageShow_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ContainerShow(ctx, &protoReq)
|
||||
msg, err := server.ImageShow(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_WWApi_ContainerRename_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerRenameParameter
|
||||
func request_WWApi_ImageRename_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageRenameParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
@@ -236,13 +236,13 @@ func request_WWApi_ContainerRename_0(ctx context.Context, marshaler runtime.Mars
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ContainerRename(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
msg, err := client.ImageRename(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_WWApi_ContainerRename_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ContainerRenameParameter
|
||||
func local_request_WWApi_ImageRename_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ImageRenameParameter
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
@@ -253,7 +253,7 @@ func local_request_WWApi_ContainerRename_0(ctx context.Context, marshaler runtim
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ContainerRename(ctx, &protoReq)
|
||||
msg, err := server.ImageRename(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
@@ -458,7 +458,7 @@ func local_request_WWApi_Version_0(ctx context.Context, marshaler runtime.Marsha
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWWApiHandlerFromEndpoint instead.
|
||||
func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WWApiServer) error {
|
||||
|
||||
mux.Handle("POST", pattern_WWApi_ContainerBuild_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("POST", pattern_WWApi_ImageBuild_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
@@ -466,12 +466,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerBuild", runtime.WithHTTPPathPattern("/v1/containerbuild"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageBuild", runtime.WithHTTPPathPattern("/v1/imagebuild"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerBuild_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ImageBuild_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
@@ -479,11 +479,11 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerBuild_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageBuild_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("DELETE", pattern_WWApi_ContainerDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("DELETE", pattern_WWApi_ImageDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
@@ -491,12 +491,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerDelete", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageDelete", runtime.WithHTTPPathPattern("/v1/image"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerDelete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ImageDelete_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
@@ -504,11 +504,11 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_WWApi_ContainerCopy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("POST", pattern_WWApi_ImageCopy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
@@ -516,12 +516,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerCopy", runtime.WithHTTPPathPattern("/v1/containercopy"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageCopy", runtime.WithHTTPPathPattern("/v1/imagecopy"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerCopy_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ImageCopy_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
@@ -529,11 +529,11 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerCopy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageCopy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_WWApi_ContainerImport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("POST", pattern_WWApi_ImageImport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
@@ -541,12 +541,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerImport", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageImport", runtime.WithHTTPPathPattern("/v1/image"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerImport_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ImageImport_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
@@ -554,11 +554,11 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerImport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageImport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WWApi_ContainerList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("GET", pattern_WWApi_ImageList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
@@ -566,12 +566,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerList", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageList", runtime.WithHTTPPathPattern("/v1/image"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerList_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ImageList_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
@@ -579,11 +579,11 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WWApi_ContainerShow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("GET", pattern_WWApi_ImageShow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
@@ -591,12 +591,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerShow", runtime.WithHTTPPathPattern("/v1/containershow"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageShow", runtime.WithHTTPPathPattern("/v1/imageshow"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerShow_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ImageShow_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
@@ -604,11 +604,11 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerShow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageShow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_WWApi_ContainerRename_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("POST", pattern_WWApi_ImageRename_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
@@ -616,12 +616,12 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerRename", runtime.WithHTTPPathPattern("/v1/containerrename"))
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageRename", runtime.WithHTTPPathPattern("/v1/imagerename"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_WWApi_ContainerRename_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
resp, md, err := local_request_WWApi_ImageRename_0(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
@@ -629,7 +629,7 @@ func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerRename_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageRename_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@@ -824,157 +824,157 @@ func RegisterWWApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc
|
||||
// "WWApiClient" to call the correct interceptors.
|
||||
func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WWApiClient) error {
|
||||
|
||||
mux.Handle("POST", pattern_WWApi_ContainerBuild_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("POST", pattern_WWApi_ImageBuild_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerBuild", runtime.WithHTTPPathPattern("/v1/containerbuild"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageBuild", runtime.WithHTTPPathPattern("/v1/imagebuild"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerBuild_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ImageBuild_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerBuild_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageBuild_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("DELETE", pattern_WWApi_ContainerDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("DELETE", pattern_WWApi_ImageDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerDelete", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageDelete", runtime.WithHTTPPathPattern("/v1/image"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerDelete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ImageDelete_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_WWApi_ContainerCopy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("POST", pattern_WWApi_ImageCopy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerCopy", runtime.WithHTTPPathPattern("/v1/containercopy"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageCopy", runtime.WithHTTPPathPattern("/v1/imagecopy"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerCopy_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ImageCopy_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerCopy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageCopy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_WWApi_ContainerImport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("POST", pattern_WWApi_ImageImport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerImport", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageImport", runtime.WithHTTPPathPattern("/v1/image"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerImport_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ImageImport_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerImport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageImport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WWApi_ContainerList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("GET", pattern_WWApi_ImageList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerList", runtime.WithHTTPPathPattern("/v1/container"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageList", runtime.WithHTTPPathPattern("/v1/image"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerList_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ImageList_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WWApi_ContainerShow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("GET", pattern_WWApi_ImageShow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerShow", runtime.WithHTTPPathPattern("/v1/containershow"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageShow", runtime.WithHTTPPathPattern("/v1/imageshow"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerShow_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ImageShow_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerShow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageShow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_WWApi_ContainerRename_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
mux.Handle("POST", pattern_WWApi_ImageRename_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ContainerRename", runtime.WithHTTPPathPattern("/v1/containerrename"))
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/ImageRename", runtime.WithHTTPPathPattern("/v1/imagerename"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_WWApi_ContainerRename_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
resp, md, err := request_WWApi_ImageRename_0(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_WWApi_ContainerRename_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
forward_WWApi_ImageRename_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
@@ -1114,19 +1114,19 @@ func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_WWApi_ContainerBuild_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "containerbuild"}, ""))
|
||||
pattern_WWApi_ImageBuild_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "imagebuild"}, ""))
|
||||
|
||||
pattern_WWApi_ContainerDelete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "container"}, ""))
|
||||
pattern_WWApi_ImageDelete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "image"}, ""))
|
||||
|
||||
pattern_WWApi_ContainerCopy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "containercopy"}, ""))
|
||||
pattern_WWApi_ImageCopy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "imagecopy"}, ""))
|
||||
|
||||
pattern_WWApi_ContainerImport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "container"}, ""))
|
||||
pattern_WWApi_ImageImport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "image"}, ""))
|
||||
|
||||
pattern_WWApi_ContainerList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "container"}, ""))
|
||||
pattern_WWApi_ImageList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "image"}, ""))
|
||||
|
||||
pattern_WWApi_ContainerShow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "containershow"}, ""))
|
||||
pattern_WWApi_ImageShow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "imageshow"}, ""))
|
||||
|
||||
pattern_WWApi_ContainerRename_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "containerrename"}, ""))
|
||||
pattern_WWApi_ImageRename_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "imagerename"}, ""))
|
||||
|
||||
pattern_WWApi_NodeAdd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "node"}, ""))
|
||||
|
||||
@@ -1142,19 +1142,19 @@ var (
|
||||
)
|
||||
|
||||
var (
|
||||
forward_WWApi_ContainerBuild_0 = runtime.ForwardResponseMessage
|
||||
forward_WWApi_ImageBuild_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WWApi_ContainerDelete_0 = runtime.ForwardResponseMessage
|
||||
forward_WWApi_ImageDelete_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WWApi_ContainerCopy_0 = runtime.ForwardResponseMessage
|
||||
forward_WWApi_ImageCopy_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WWApi_ContainerImport_0 = runtime.ForwardResponseMessage
|
||||
forward_WWApi_ImageImport_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WWApi_ContainerList_0 = runtime.ForwardResponseMessage
|
||||
forward_WWApi_ImageList_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WWApi_ContainerShow_0 = runtime.ForwardResponseMessage
|
||||
forward_WWApi_ImageShow_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WWApi_ContainerRename_0 = runtime.ForwardResponseMessage
|
||||
forward_WWApi_ImageRename_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WWApi_NodeAdd_0 = runtime.ForwardResponseMessage
|
||||
|
||||
|
||||
@@ -23,19 +23,19 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type WWApiClient interface {
|
||||
// ContainerBuild builds zero or more containers.
|
||||
ContainerBuild(ctx context.Context, in *ContainerBuildParameter, opts ...grpc.CallOption) (*ContainerListResponse, error)
|
||||
// ContainerDelete removes one or more container from Warewulf management.
|
||||
ContainerDelete(ctx context.Context, in *ContainerDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
ContainerCopy(ctx context.Context, in *ContainerCopyParameter, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// ContainerImport imports a container to Warewulf.
|
||||
ContainerImport(ctx context.Context, in *ContainerImportParameter, opts ...grpc.CallOption) (*ContainerListResponse, error)
|
||||
// ContainerList lists ContainerInfo for each container.
|
||||
ContainerList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ContainerListResponse, error)
|
||||
// ContainerShow lists ContainerShow for each container.
|
||||
ContainerShow(ctx context.Context, in *ContainerShowParameter, opts ...grpc.CallOption) (*ContainerShowResponse, error)
|
||||
// ContainerRename renames the container
|
||||
ContainerRename(ctx context.Context, in *ContainerRenameParameter, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// ImageBuild builds zero or more images.
|
||||
ImageBuild(ctx context.Context, in *ImageBuildParameter, opts ...grpc.CallOption) (*ImageListResponse, error)
|
||||
// ImageDelete removes one or more image from Warewulf management.
|
||||
ImageDelete(ctx context.Context, in *ImageDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
ImageCopy(ctx context.Context, in *ImageCopyParameter, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// ImageImport imports an image to Warewulf.
|
||||
ImageImport(ctx context.Context, in *ImageImportParameter, opts ...grpc.CallOption) (*ImageListResponse, error)
|
||||
// ImageList lists ImageInfo for each image.
|
||||
ImageList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ImageListResponse, error)
|
||||
// ImageShow lists ImageShow for each image.
|
||||
ImageShow(ctx context.Context, in *ImageShowParameter, opts ...grpc.CallOption) (*ImageShowResponse, error)
|
||||
// ImageRename renames the image
|
||||
ImageRename(ctx context.Context, in *ImageRenameParameter, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// NodeAdd adds one or more nodes for management by Warewulf and returns
|
||||
// the added nodes. Node fields may be shimmed in per profiles.
|
||||
NodeAdd(ctx context.Context, in *NodeAddParameter, opts ...grpc.CallOption) (*NodeListResponse, error)
|
||||
@@ -61,63 +61,63 @@ func NewWWApiClient(cc grpc.ClientConnInterface) WWApiClient {
|
||||
return &wWApiClient{cc}
|
||||
}
|
||||
|
||||
func (c *wWApiClient) ContainerBuild(ctx context.Context, in *ContainerBuildParameter, opts ...grpc.CallOption) (*ContainerListResponse, error) {
|
||||
out := new(ContainerListResponse)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ContainerBuild", in, out, opts...)
|
||||
func (c *wWApiClient) ImageBuild(ctx context.Context, in *ImageBuildParameter, opts ...grpc.CallOption) (*ImageListResponse, error) {
|
||||
out := new(ImageListResponse)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ImageBuild", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *wWApiClient) ContainerDelete(ctx context.Context, in *ContainerDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (c *wWApiClient) ImageDelete(ctx context.Context, in *ImageDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ContainerDelete", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ImageDelete", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *wWApiClient) ContainerCopy(ctx context.Context, in *ContainerCopyParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (c *wWApiClient) ImageCopy(ctx context.Context, in *ImageCopyParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ContainerCopy", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ImageCopy", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *wWApiClient) ContainerImport(ctx context.Context, in *ContainerImportParameter, opts ...grpc.CallOption) (*ContainerListResponse, error) {
|
||||
out := new(ContainerListResponse)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ContainerImport", in, out, opts...)
|
||||
func (c *wWApiClient) ImageImport(ctx context.Context, in *ImageImportParameter, opts ...grpc.CallOption) (*ImageListResponse, error) {
|
||||
out := new(ImageListResponse)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ImageImport", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *wWApiClient) ContainerList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ContainerListResponse, error) {
|
||||
out := new(ContainerListResponse)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ContainerList", in, out, opts...)
|
||||
func (c *wWApiClient) ImageList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ImageListResponse, error) {
|
||||
out := new(ImageListResponse)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ImageList", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *wWApiClient) ContainerShow(ctx context.Context, in *ContainerShowParameter, opts ...grpc.CallOption) (*ContainerShowResponse, error) {
|
||||
out := new(ContainerShowResponse)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ContainerShow", in, out, opts...)
|
||||
func (c *wWApiClient) ImageShow(ctx context.Context, in *ImageShowParameter, opts ...grpc.CallOption) (*ImageShowResponse, error) {
|
||||
out := new(ImageShowResponse)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ImageShow", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *wWApiClient) ContainerRename(ctx context.Context, in *ContainerRenameParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
func (c *wWApiClient) ImageRename(ctx context.Context, in *ImageRenameParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ContainerRename", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/wwapi.v1.WWApi/ImageRename", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -182,19 +182,19 @@ func (c *wWApiClient) Version(ctx context.Context, in *emptypb.Empty, opts ...gr
|
||||
// All implementations must embed UnimplementedWWApiServer
|
||||
// for forward compatibility
|
||||
type WWApiServer interface {
|
||||
// ContainerBuild builds zero or more containers.
|
||||
ContainerBuild(context.Context, *ContainerBuildParameter) (*ContainerListResponse, error)
|
||||
// ContainerDelete removes one or more container from Warewulf management.
|
||||
ContainerDelete(context.Context, *ContainerDeleteParameter) (*emptypb.Empty, error)
|
||||
ContainerCopy(context.Context, *ContainerCopyParameter) (*emptypb.Empty, error)
|
||||
// ContainerImport imports a container to Warewulf.
|
||||
ContainerImport(context.Context, *ContainerImportParameter) (*ContainerListResponse, error)
|
||||
// ContainerList lists ContainerInfo for each container.
|
||||
ContainerList(context.Context, *emptypb.Empty) (*ContainerListResponse, error)
|
||||
// ContainerShow lists ContainerShow for each container.
|
||||
ContainerShow(context.Context, *ContainerShowParameter) (*ContainerShowResponse, error)
|
||||
// ContainerRename renames the container
|
||||
ContainerRename(context.Context, *ContainerRenameParameter) (*emptypb.Empty, error)
|
||||
// ImageBuild builds zero or more images.
|
||||
ImageBuild(context.Context, *ImageBuildParameter) (*ImageListResponse, error)
|
||||
// ImageDelete removes one or more image from Warewulf management.
|
||||
ImageDelete(context.Context, *ImageDeleteParameter) (*emptypb.Empty, error)
|
||||
ImageCopy(context.Context, *ImageCopyParameter) (*emptypb.Empty, error)
|
||||
// ImageImport imports an image to Warewulf.
|
||||
ImageImport(context.Context, *ImageImportParameter) (*ImageListResponse, error)
|
||||
// ImageList lists ImageInfo for each image.
|
||||
ImageList(context.Context, *emptypb.Empty) (*ImageListResponse, error)
|
||||
// ImageShow lists ImageShow for each image.
|
||||
ImageShow(context.Context, *ImageShowParameter) (*ImageShowResponse, error)
|
||||
// ImageRename renames the image
|
||||
ImageRename(context.Context, *ImageRenameParameter) (*emptypb.Empty, error)
|
||||
// NodeAdd adds one or more nodes for management by Warewulf and returns
|
||||
// the added nodes. Node fields may be shimmed in per profiles.
|
||||
NodeAdd(context.Context, *NodeAddParameter) (*NodeListResponse, error)
|
||||
@@ -217,26 +217,26 @@ type WWApiServer interface {
|
||||
type UnimplementedWWApiServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedWWApiServer) ContainerBuild(context.Context, *ContainerBuildParameter) (*ContainerListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerBuild not implemented")
|
||||
func (UnimplementedWWApiServer) ImageBuild(context.Context, *ImageBuildParameter) (*ImageListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ImageBuild not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) ContainerDelete(context.Context, *ContainerDeleteParameter) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerDelete not implemented")
|
||||
func (UnimplementedWWApiServer) ImageDelete(context.Context, *ImageDeleteParameter) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ImageDelete not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) ContainerCopy(context.Context, *ContainerCopyParameter) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerCopy not implemented")
|
||||
func (UnimplementedWWApiServer) ImageCopy(context.Context, *ImageCopyParameter) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ImageCopy not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) ContainerImport(context.Context, *ContainerImportParameter) (*ContainerListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerImport not implemented")
|
||||
func (UnimplementedWWApiServer) ImageImport(context.Context, *ImageImportParameter) (*ImageListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ImageImport not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) ContainerList(context.Context, *emptypb.Empty) (*ContainerListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerList not implemented")
|
||||
func (UnimplementedWWApiServer) ImageList(context.Context, *emptypb.Empty) (*ImageListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ImageList not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) ContainerShow(context.Context, *ContainerShowParameter) (*ContainerShowResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerShow not implemented")
|
||||
func (UnimplementedWWApiServer) ImageShow(context.Context, *ImageShowParameter) (*ImageShowResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ImageShow not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) ContainerRename(context.Context, *ContainerRenameParameter) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ContainerRename not implemented")
|
||||
func (UnimplementedWWApiServer) ImageRename(context.Context, *ImageRenameParameter) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ImageRename not implemented")
|
||||
}
|
||||
func (UnimplementedWWApiServer) NodeAdd(context.Context, *NodeAddParameter) (*NodeListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method NodeAdd not implemented")
|
||||
@@ -269,128 +269,128 @@ func RegisterWWApiServer(s grpc.ServiceRegistrar, srv WWApiServer) {
|
||||
s.RegisterService(&WWApi_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _WWApi_ContainerBuild_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ContainerBuildParameter)
|
||||
func _WWApi_ImageBuild_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ImageBuildParameter)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WWApiServer).ContainerBuild(ctx, in)
|
||||
return srv.(WWApiServer).ImageBuild(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/wwapi.v1.WWApi/ContainerBuild",
|
||||
FullMethod: "/wwapi.v1.WWApi/ImageBuild",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WWApiServer).ContainerBuild(ctx, req.(*ContainerBuildParameter))
|
||||
return srv.(WWApiServer).ImageBuild(ctx, req.(*ImageBuildParameter))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WWApi_ContainerDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ContainerDeleteParameter)
|
||||
func _WWApi_ImageDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ImageDeleteParameter)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WWApiServer).ContainerDelete(ctx, in)
|
||||
return srv.(WWApiServer).ImageDelete(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/wwapi.v1.WWApi/ContainerDelete",
|
||||
FullMethod: "/wwapi.v1.WWApi/ImageDelete",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WWApiServer).ContainerDelete(ctx, req.(*ContainerDeleteParameter))
|
||||
return srv.(WWApiServer).ImageDelete(ctx, req.(*ImageDeleteParameter))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WWApi_ContainerCopy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ContainerCopyParameter)
|
||||
func _WWApi_ImageCopy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ImageCopyParameter)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WWApiServer).ContainerCopy(ctx, in)
|
||||
return srv.(WWApiServer).ImageCopy(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/wwapi.v1.WWApi/ContainerCopy",
|
||||
FullMethod: "/wwapi.v1.WWApi/ImageCopy",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WWApiServer).ContainerCopy(ctx, req.(*ContainerCopyParameter))
|
||||
return srv.(WWApiServer).ImageCopy(ctx, req.(*ImageCopyParameter))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WWApi_ContainerImport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ContainerImportParameter)
|
||||
func _WWApi_ImageImport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ImageImportParameter)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WWApiServer).ContainerImport(ctx, in)
|
||||
return srv.(WWApiServer).ImageImport(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/wwapi.v1.WWApi/ContainerImport",
|
||||
FullMethod: "/wwapi.v1.WWApi/ImageImport",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WWApiServer).ContainerImport(ctx, req.(*ContainerImportParameter))
|
||||
return srv.(WWApiServer).ImageImport(ctx, req.(*ImageImportParameter))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WWApi_ContainerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _WWApi_ImageList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WWApiServer).ContainerList(ctx, in)
|
||||
return srv.(WWApiServer).ImageList(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/wwapi.v1.WWApi/ContainerList",
|
||||
FullMethod: "/wwapi.v1.WWApi/ImageList",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WWApiServer).ContainerList(ctx, req.(*emptypb.Empty))
|
||||
return srv.(WWApiServer).ImageList(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WWApi_ContainerShow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ContainerShowParameter)
|
||||
func _WWApi_ImageShow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ImageShowParameter)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WWApiServer).ContainerShow(ctx, in)
|
||||
return srv.(WWApiServer).ImageShow(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/wwapi.v1.WWApi/ContainerShow",
|
||||
FullMethod: "/wwapi.v1.WWApi/ImageShow",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WWApiServer).ContainerShow(ctx, req.(*ContainerShowParameter))
|
||||
return srv.(WWApiServer).ImageShow(ctx, req.(*ImageShowParameter))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _WWApi_ContainerRename_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ContainerRenameParameter)
|
||||
func _WWApi_ImageRename_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ImageRenameParameter)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WWApiServer).ContainerRename(ctx, in)
|
||||
return srv.(WWApiServer).ImageRename(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/wwapi.v1.WWApi/ContainerRename",
|
||||
FullMethod: "/wwapi.v1.WWApi/ImageRename",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WWApiServer).ContainerRename(ctx, req.(*ContainerRenameParameter))
|
||||
return srv.(WWApiServer).ImageRename(ctx, req.(*ImageRenameParameter))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@@ -511,32 +511,32 @@ var WWApi_ServiceDesc = grpc.ServiceDesc{
|
||||
HandlerType: (*WWApiServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ContainerBuild",
|
||||
Handler: _WWApi_ContainerBuild_Handler,
|
||||
MethodName: "ImageBuild",
|
||||
Handler: _WWApi_ImageBuild_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ContainerDelete",
|
||||
Handler: _WWApi_ContainerDelete_Handler,
|
||||
MethodName: "ImageDelete",
|
||||
Handler: _WWApi_ImageDelete_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ContainerCopy",
|
||||
Handler: _WWApi_ContainerCopy_Handler,
|
||||
MethodName: "ImageCopy",
|
||||
Handler: _WWApi_ImageCopy_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ContainerImport",
|
||||
Handler: _WWApi_ContainerImport_Handler,
|
||||
MethodName: "ImageImport",
|
||||
Handler: _WWApi_ImageImport_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ContainerList",
|
||||
Handler: _WWApi_ContainerList_Handler,
|
||||
MethodName: "ImageList",
|
||||
Handler: _WWApi_ImageList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ContainerShow",
|
||||
Handler: _WWApi_ContainerShow_Handler,
|
||||
MethodName: "ImageShow",
|
||||
Handler: _WWApi_ImageShow_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ContainerRename",
|
||||
Handler: _WWApi_ContainerRename_Handler,
|
||||
MethodName: "ImageRename",
|
||||
Handler: _WWApi_ImageRename_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NodeAdd",
|
||||
|
||||
Reference in New Issue
Block a user