From c2cfe513d7cb00255f46b94e2e37c5a5b4bfc45f Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Sat, 21 Mar 2026 21:42:16 -0600 Subject: [PATCH] Remove remaining gRPC references with additional tests Signed-off-by: Jonathon Anderson --- CHANGELOG.md | 8 + LICENSE_DEPENDENCIES.md | 6 - Tools.mk | 29 +- etc/wwapic.conf.in | 9 - etc/wwapid.conf.in | 10 - etc/wwapird.conf.in | 20 - go.mod | 8 +- internal/app/wwclient/root.go | 2 +- internal/app/wwctl/image/copy/main.go | 30 +- internal/app/wwctl/node/delete/main_test.go | 121 + internal/app/wwctl/profile/set/root.go | 1 - internal/app/wwctl/version/main.go | 5 +- internal/pkg/api/routes/v1/routes.proto | 346 --- internal/pkg/api/routes/wwapiv1/routes.pb.go | 2314 ----------------- .../pkg/api/routes/wwapiv1/routes.pb.gw.go | 939 ------- .../pkg/api/routes/wwapiv1/routes_grpc.pb.go | 615 ----- internal/pkg/image/build.go | 2 +- internal/pkg/image/delete.go | 6 +- internal/pkg/node/update_test.go | 184 ++ internal/pkg/version/version.go | 14 +- internal/pkg/warewulfd/api/api.go | 2 +- 21 files changed, 339 insertions(+), 4332 deletions(-) delete mode 100644 etc/wwapic.conf.in delete mode 100644 etc/wwapid.conf.in delete mode 100644 etc/wwapird.conf.in create mode 100644 internal/app/wwctl/node/delete/main_test.go delete mode 100644 internal/pkg/api/routes/v1/routes.proto delete mode 100644 internal/pkg/api/routes/wwapiv1/routes.pb.go delete mode 100644 internal/pkg/api/routes/wwapiv1/routes.pb.gw.go delete mode 100644 internal/pkg/api/routes/wwapiv1/routes_grpc.pb.go create mode 100644 internal/pkg/node/update_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 57e3f48d..14e6a0b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fix path traversal vulnerability (CWE-23) by validating overlay names in `overlay.Get()` and `overlay.Create()` - Upgrade golang version to 1.25 to resolve stdlib CVEs (CVE-2025-4673, CVE-2025-58187, CVE-2025-61723, CVE-2025-58188, CVE-2025-61725, CVE-2025-61726, CVE-2025-47907, CVE-2025-58189, CVE-2025-47906, CVE-2025-58186, CVE-2025-61727, CVE-2025-61724, CVE-2025-58185, CVE-2025-47912, CVE-2025-61729, CVE-2025-0913, CVE-2025-22873, CVE-2024-45336, CVE-2024-45341, CVE-2025-58183, CVE-2025-68121, CVE-2025-61730) - Fix path traversal vulnerability (CWE-23) in overlay cleanup function +- Fix `wwctl image build --all` to build all images +- Fix `wwctl node set --all` to set values on all nodes ### Dependencies @@ -62,8 +64,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Document configuring the arp cache for large clusters - Expand troubleshooting documentation for container runtimes +### Removed + +- Removed gRPC API libraries and protobuf types + ### Changed +- Refactored `wwctl set` to use cobra `cmd.Flags().Changed()` to + apply only explicitly-set fields. - Runtime overlay download failure during dracut/wwinit boot is now non-fatal; the node continues to boot and `wwclient` retries the download at runtime. - `hosts` overlay added to the default system overlay list diff --git a/LICENSE_DEPENDENCIES.md b/LICENSE_DEPENDENCIES.md index 3bfdada6..1b3ee8e9 100644 --- a/LICENSE_DEPENDENCIES.md +++ b/LICENSE_DEPENDENCIES.md @@ -383,12 +383,6 @@ The dependencies and their licenses are as follows: **License URL:** -## github.com/grpc-ecosystem/grpc-gateway/v2 - -**License:** BSD-3-Clause - -**License URL:** - ## github.com/klauspost/compress/internal/snapref **License:** BSD-3-Clause diff --git a/Tools.mk b/Tools.mk index 6cd2130e..61189188 100644 --- a/Tools.mk +++ b/Tools.mk @@ -13,24 +13,11 @@ GOLANG_LICENSES := $(TOOLS_BIN)/go-licenses GOLANG_STATICCHECK := $(TOOLS_BIN)/staticcheck -PROTOC := $(TOOLS_BIN)/protoc -PROTOC_GEN_GO := $(TOOLS_BIN)/protoc-gen-go -PROTOC_GEN_GO_GRPC := $(TOOLS_BIN)/protoc-gen-go-grpc -PROTOC_GEN_GRPC_GATEWAY := $(TOOLS_BIN)/protoc-gen-grpc-gateway - -ifeq ($(ARCH),aarch64) -PROTOC_URL := https://github.com/protocolbuffers/protobuf/releases/download/v24.0/protoc-24.0-linux-aarch_64.zip -PROTOC_GEN_GRPC_GATEWAY_URL := https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.26.0/protoc-gen-grpc-gateway-v2.26.0-linux-arm64 -else -PROTOC_URL := https://github.com/protocolbuffers/protobuf/releases/download/v24.0/protoc-24.0-linux-x86_64.zip -PROTOC_GEN_GRPC_GATEWAY_URL := https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v2.26.0/protoc-gen-grpc-gateway-v2.26.0-linux-x86_64 -endif - $(TOOLS_DIR): mkdir -p $@ .PHONY: tools -tools: $(GO_TOOLS_BIN) $(GOLANGCI_LINT) $(PROTOC_GEN_GO) $(PROTOC_GEN_GO_GRPC) +tools: $(GO_TOOLS_BIN) $(GOLANGCI_LINT) $(GO_TOOLS_BIN): GOBIN="$(PWD)/$(TOOLS_BIN)" go install -mod=vendor $(GO_TOOLS) @@ -41,20 +28,6 @@ $(GOLANGCI_LINT): $(GOLANG_DEADCODE): GOBIN="$(PWD)/$(TOOLS_BIN)" go install golang.org/x/tools/cmd/deadcode@v0.34.0 -$(PROTOC): $(TOOLS_DIR) - cd $(TOOLS_DIR) && curl -LO $(PROTOC_URL) && unzip -o $(notdir $(PROTOC_URL)) - touch --no-create $(PROTOC) # by default the timestamp is preserved from the archive - -$(PROTOC_GEN_GRPC_GATEWAY): - curl -L $(PROTOC_GEN_GRPC_GATEWAY_URL) -o $(PROTOC_GEN_GRPC_GATEWAY) - chmod +x $(PROTOC_GEN_GRPC_GATEWAY) - -$(PROTOC_GEN_GO): - GOBIN="$(PWD)/$(TOOLS_BIN)" go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.5 - -$(PROTOC_GEN_GO_GRPC): - GOBIN="$(PWD)/$(TOOLS_BIN)" go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 - $(GOLANG_LICENSES): GOBIN="$(PWD)/$(TOOLS_BIN)" go install github.com/google/go-licenses@v1.6.0 diff --git a/etc/wwapic.conf.in b/etc/wwapic.conf.in deleted file mode 100644 index 9bf8260d..00000000 --- a/etc/wwapic.conf.in +++ /dev/null @@ -1,9 +0,0 @@ -# Configuration for wwapic, the grpc wwapi client. -api: - server: localhost - port: 9872 -tls: - enabled: true - cert: @SYSCONFDIR@/warewulf/keys/wwapic/client.pem - key: @SYSCONFDIR@/warewulf/keys/wwapic/client.key - cacert: @SYSCONFDIR@/warewulf/keys/wwapic/cacert.pem \ No newline at end of file diff --git a/etc/wwapid.conf.in b/etc/wwapid.conf.in deleted file mode 100644 index 75ca7271..00000000 --- a/etc/wwapid.conf.in +++ /dev/null @@ -1,10 +0,0 @@ -# Configuration for wwapird, the wwapi grpc server. -api: - version: 1.0.0 - prefix: v1 - port: 9872 -tls: - enabled: true - cert: @SYSCONFDIR@/warewulf/keys/wwapid/server.pem - key: @SYSCONFDIR@/warewulf/keys/wwapid/server.key - cacert: @SYSCONFDIR@/warewulf/keys/wwapid/cacert.pem \ No newline at end of file diff --git a/etc/wwapird.conf.in b/etc/wwapird.conf.in deleted file mode 100644 index 1b037cde..00000000 --- a/etc/wwapird.conf.in +++ /dev/null @@ -1,20 +0,0 @@ -# Configuration for wwapird, the grpc / http reverse proxy REST server. -# This server allows one to curl the wwapi. -clientapi: - server: localhost - port: 9872 -serverapi: - version: ignored - prefix: ignored - port: 9871 -clienttls: - enabled: true - cert: @SYSCONFDIR@/warewulf/keys/wwapird/client.pem - key: @SYSCONFDIR@/warewulf/keys/wwapird/client.key - cacert: @SYSCONFDIR@/warewulf/keys/wwapird/cacert.pem -servertls: - enabled: true - cert: ignored - key: @SYSCONFDIR@/warewulf/keys/server.key - cacert: ignored - concatcert: @SYSCONFDIR@/warewulf/keys/serverAndCacert.pem # This is a cat of server.pem and cacert.pem diff --git a/go.mod b/go.mod index 7efb59db..a5053c99 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,6 @@ require ( github.com/fatih/color v1.18.0 github.com/go-chi/chi/v5 v5.2.5 github.com/google/uuid v1.6.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 github.com/hashicorp/go-version v1.8.0 github.com/kinbiko/jsonassert v1.2.0 github.com/manifoldco/promptui v0.9.0 @@ -37,9 +36,6 @@ require ( golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 golang.org/x/sys v0.42.0 golang.org/x/term v0.41.0 - google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 - google.golang.org/grpc v1.79.3 - google.golang.org/protobuf v1.36.11 gopkg.in/yaml.v3 v3.0.1 ) @@ -81,6 +77,7 @@ require ( github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-containerregistry v0.20.3 // indirect github.com/gorilla/mux v1.8.1 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect github.com/huandu/xstrings v1.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -140,6 +137,9 @@ require ( golang.org/x/net v0.51.0 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/text v0.35.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260209200024-4cfbd4190f57 // indirect + google.golang.org/grpc v1.79.3 // indirect + google.golang.org/protobuf v1.36.11 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/internal/app/wwclient/root.go b/internal/app/wwclient/root.go index 3c60fa53..43b62688 100644 --- a/internal/app/wwclient/root.go +++ b/internal/app/wwclient/root.go @@ -89,7 +89,7 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) { } defer cleanUp() - wwlog.Debug("Version: %s", version.GetVersion()) + wwlog.Debug("Version: %s", version.Version()) target := "/" if os.Args[0] == path.Join(conf.Paths.WWClientdir, "wwclient") { diff --git a/internal/app/wwctl/image/copy/main.go b/internal/app/wwctl/image/copy/main.go index 89564fe0..41e19b7a 100644 --- a/internal/app/wwctl/image/copy/main.go +++ b/internal/app/wwctl/image/copy/main.go @@ -4,42 +4,38 @@ import ( "fmt" "github.com/spf13/cobra" - "github.com/warewulf/warewulf/internal/pkg/api/routes/wwapiv1" "github.com/warewulf/warewulf/internal/pkg/image" "github.com/warewulf/warewulf/internal/pkg/wwlog" ) func CobraRunE(cmd *cobra.Command, args []string) (err error) { - cdp := &wwapiv1.ImageCopyParameter{ - ImageSource: args[0], - ImageDestination: args[1], - Build: Build, + imageSource := args[0] + imageDestination := args[1] + + if !image.DoesSourceExist(imageSource) { + return fmt.Errorf("image's source doesn't exists: %s", imageSource) } - if !image.DoesSourceExist(cdp.ImageSource) { - return fmt.Errorf("image's source doesn't exists: %s", cdp.ImageSource) + if !image.ValidName(imageDestination) { + return fmt.Errorf("image name contains illegal characters : %s", imageDestination) } - if !image.ValidName(cdp.ImageDestination) { - return fmt.Errorf("image name contains illegal characters : %s", cdp.ImageDestination) + if image.DoesSourceExist(imageDestination) { + return fmt.Errorf("an other image with name: %s already exists in sources", imageDestination) } - if image.DoesSourceExist(cdp.ImageDestination) { - return fmt.Errorf("an other image with name: %s already exists in sources", cdp.ImageDestination) - } - - err = image.Duplicate(cdp.ImageSource, cdp.ImageDestination) + err = image.Duplicate(imageSource, imageDestination) if err != nil { return fmt.Errorf("could not duplicate image: %s", err.Error()) } - if cdp.Build { - err = image.Build(cdp.ImageDestination, true) + if Build { + err = image.Build(imageDestination, true) if err != nil { return err } } - wwlog.Info("Image %s successfully duplicated as %s", cdp.ImageSource, cdp.ImageDestination) + wwlog.Info("Image %s successfully duplicated as %s", imageSource, imageDestination) return } diff --git a/internal/app/wwctl/node/delete/main_test.go b/internal/app/wwctl/node/delete/main_test.go new file mode 100644 index 00000000..78fc276e --- /dev/null +++ b/internal/app/wwctl/node/delete/main_test.go @@ -0,0 +1,121 @@ +package delete + +import ( + "bytes" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/warewulf/warewulf/internal/pkg/testenv" + "github.com/warewulf/warewulf/internal/pkg/warewulfd" +) + +func Test_Delete(t *testing.T) { + tests := []struct { + name string + args []string + inDB string + outDB string + wantErr bool + }{ + { + name: "delete single node", + args: []string{"--yes", "n01"}, + inDB: ` +nodeprofiles: + default: {} +nodes: + n01: + profiles: + - default + n02: + profiles: + - default`, + outDB: ` +nodeprofiles: + default: {} +nodes: + n02: + profiles: + - default`, + }, + { + name: "delete multiple nodes", + args: []string{"--yes", "n01", "n02"}, + inDB: ` +nodeprofiles: + default: {} +nodes: + n01: + profiles: + - default + n02: + profiles: + - default + n03: + profiles: + - default`, + outDB: ` +nodeprofiles: + default: {} +nodes: + n03: + profiles: + - default`, + }, + { + name: "delete non-existent node", + args: []string{"--yes", "doesnotexist"}, + inDB: ` +nodeprofiles: + default: {} +nodes: + n01: + profiles: + - default`, + outDB: ` +nodeprofiles: + default: {} +nodes: + n01: + profiles: + - default`, + }, + { + name: "delete all nodes", + args: []string{"--yes", "n01", "n02"}, + inDB: ` +nodeprofiles: + default: {} +nodes: + n01: {} + n02: {}`, + outDB: ` +nodeprofiles: + default: {} +nodes: {}`, + }, + } + + warewulfd.SetNoDaemon() + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + env := testenv.New(t) + defer env.RemoveAll() + env.WriteFile("etc/warewulf/nodes.conf", tt.inDB) + + buf := new(bytes.Buffer) + baseCmd := GetCommand() + baseCmd.SetArgs(tt.args) + baseCmd.SetOut(buf) + baseCmd.SetErr(buf) + err := baseCmd.Execute() + if tt.wantErr { + assert.Error(t, err) + } else { + assert.NoError(t, err) + content := env.ReadFile("etc/warewulf/nodes.conf") + assert.YAMLEq(t, tt.outDB, content) + } + }) + } +} diff --git a/internal/app/wwctl/profile/set/root.go b/internal/app/wwctl/profile/set/root.go index 46828a14..34a0693b 100644 --- a/internal/app/wwctl/profile/set/root.go +++ b/internal/app/wwctl/profile/set/root.go @@ -9,7 +9,6 @@ import ( type variables struct { setYes bool - setForce bool profileConf node.Profile profileDel node.NodeConfDel profileAdd node.NodeConfAdd diff --git a/internal/app/wwctl/version/main.go b/internal/app/wwctl/version/main.go index 34ed9bc2..c51115b8 100644 --- a/internal/app/wwctl/version/main.go +++ b/internal/app/wwctl/version/main.go @@ -9,9 +9,6 @@ import ( func CobraRunE(cmd *cobra.Command, args []string) error { - fmt.Println("wwctl version:\t", version.GetVersion()) - - wwVersionResponse := version.Version() - fmt.Println("rpc version:", wwVersionResponse.String()) + fmt.Println("wwctl version:\t", version.Version()) return nil } diff --git a/internal/pkg/api/routes/v1/routes.proto b/internal/pkg/api/routes/v1/routes.proto deleted file mode 100644 index 76ccbd11..00000000 --- a/internal/pkg/api/routes/v1/routes.proto +++ /dev/null @@ -1,346 +0,0 @@ -// Routes for the wwapi (WareWulf API). -// TODO: Try protoc-gen-doc for generating documentation. - -syntax = "proto3"; - -option go_package = "internal/pkg/api/routes/wwapiv1;wwapiv1"; - -package wwapi.v1; - -import "google/protobuf/empty.proto"; -import "google/api/annotations.proto"; - -// Information about the database - -message NodeDBHash { - string hash = 1; -} - -// Image - -// ImageBuildParameter contains input for building zero or more images. -message ImageBuildParameter { - repeated string imageNames = 1; - bool force = 2; - bool all = 3; - // bool default = 4; -} - -// ImageDeleteParameter contains input for removing images from Warewulf -// management. -message ImageDeleteParameter { - repeated string imageNames = 1; -} - -// 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; -} - -// 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; - // bool default = 6; - bool syncUser = 7; - bool ociNoHttps = 8; - string ociUsername = 9; - string ociPassword = 10; - string platform = 11; -} - -// ImageInfo has data on each image. This is emitted in the -// ImageListResponse. -message ImageInfo { - string name = 1; - uint32 nodeCount = 2; - string kernelVersion = 3; - uint64 createDate = 4; // creation date in unix time - uint64 modDate = 5; // date of last modification in unix time - // uint64 size = 6; // size of chroot and images in bytes - uint64 imgSize = 7; - uint64 imgSizeComp = 8; -} - -// ImageListResponse has all information that ImageList provides. -message ImageListResponse { - repeated ImageInfo images = 1; -} - -// ImageShowParameter is the input for ImageShow. -message ImageShowParameter { - string imageName = 1; -} - -// ImageShowResponse has all information emitted on ImageShow. -message ImageShowResponse { - string Name = 1; - string Rootfs = 2; - repeated string Nodes = 3; - string KernelVersion = 4; -} - -// ImageSyncUserParameter is the input for ImageSyncUser. -message ImageSyncUserParameter { - string imageName = 1; -} - -// ImageRenameParameter is the input for ImageRename -message ImageRenameParameter { - string imageName = 1; - string targetName = 2; - bool build = 3; -} - -// Nodes - -// NodeNames is an array of node ids. -message NodeNames { - repeated string nodeNames = 1; -} - -// NodeField contains data output on NodeList. -message NodeField { - string source = 1; - string value = 2; // TODO: Variable name okay? - string print = 3; // Empty values printed as -- in wwctl. -} - -// NetDev is network devices (NICs) on a node. -message NetDev { - map Field = 1; - map Tags = 9; -} - -// NodeInfo contains details about a node managed by Warewulf/ -message NodeInfo { - map Fields = 1; - map NetDevs = 23; - map Tags = 24; - map Keys = 25; // TODO: We may not need this. Tags may be it. Ask Greg. -} - -// NodeListResponse is the output of NodeList. -message NodeListResponse { - repeated NodeInfo nodes = 1; -} - -// Request a node list -message GetNodeList { - enum ListType { - Simple = 0; - Ipmi = 1; - Network = 2; - Long = 3; - All = 4; - YAML = 6; - JSON = 7; - } - ListType type = 8; - repeated string Nodes = 9; -} - -// Get the formated output as string -message NodeList { - repeated string Output = 1; -} - -// Request a profile list view -message GetProfileList { - bool ShowAll = 1; - bool ShowYaml = 3; - bool ShowJson = 4; - repeated string Profiles = 5; -} -// Get the formated output as string -message ProfileList { - repeated string Output = 1; -} - -// NodeAddParameter contains all input for adding a node to be managed by -// Warewulf. Only adds nodes if the hash matches the actual hash of the -// configuration. -message NodeAddParameter { - string nodeConfYaml = 1; - bool force = 2; - string hash = 3; - repeated string nodeNames = 10; -} - -// NodeYaml is just the updated YAML config which will be added -// to nodes.conf (is resused for profile edit) -message NodeYaml { - string nodeConfMapYaml = 1; - string hash = 2; -} - -// NodeDeleteParameter contains input for removing nodes from Warewulf -// management. If the given hash differs with the actual hash of the -// configuration, no node is deleted. The force option allows the deletion -// of nodes with a correct hash. -message NodeDeleteParameter { - bool force = 1; - repeated string nodeNames = 2; - string hash = 3; -} - -// NodeSetParameter contains all fields for updating aspects of nodes managed -// by Warewulf. -message ConfSetParameter { - string nodeConfYaml = 1; - string netdevDelete = 2; - string diskDelete = 3; - string partitionDelete = 4; - string filesystemDelete = 5; - bool allConfs = 6; - bool force = 7; - repeated string confList = 8; - map tagAdd = 9; - map netTagAdd = 10; - map ipmiTagAdd = 11; - repeated string tagDel = 12; - repeated string netTagDel = 13; - repeated string ipmiTagDel = 14; - string netdev = 15; - -} - -// NodeStatus contains information about the imaging status per node. -message NodeStatus { - string nodeName = 1; // Name (Id) of the node. - string stage = 2; // Stage of imaging. - string sent = 3; // Last overlay sent. - string ipaddr = 4; // Node IP address. - int64 lastseen = 5; // Time in seconds since the node was last seen. -} - -// NodeStatusResponse contains NodeStatus for zero or more nodes. -message NodeStatusResponse { - repeated NodeStatus nodeStatus = 1; -} - -// Version - -// VersionReponse contains versions of the software. -message VersionResponse { - string apiPrefix = 1; - string apiVersion = 2; - string warewulfVersion = 3; -} - -// Check if config is writeable -message CanWriteConfig { - bool canWriteConfig = 1; -} - -// WWApi defines the wwapid service web interface. -service WWApi { - - // Images - - // ImageBuild builds zero or more images. - rpc ImageBuild(ImageBuildParameter) returns (ImageListResponse) { - option (google.api.http) = { - post: "/v1/imagebuild" - body: "*" - }; - } - - // ImageDelete removes one or more image from Warewulf management. - rpc ImageDelete(ImageDeleteParameter) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/image" - }; - } - - - rpc ImageCopy(ImageCopyParameter) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/imagecopy" - body: "*" - }; - } - // ImageImport imports an image to Warewulf. - rpc ImageImport(ImageImportParameter) returns (ImageListResponse) { - option(google.api.http) = { - post: "/v1/image" - body: "*" - }; - } - - // ImageList lists ImageInfo for each image. - rpc ImageList(google.protobuf.Empty) returns (ImageListResponse) { - option (google.api.http) = { - get: "/v1/image" - }; - } - - // ImageShow lists ImageShow for each image. - rpc ImageShow(ImageShowParameter) returns (ImageShowResponse) { - option (google.api.http) = { - get: "/v1/imageshow" - }; - } - - // ImageRename renames the image - rpc ImageRename(ImageRenameParameter) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/imagerename" - body: "*" - }; - } - - // Nodes - - // NodeAdd adds one or more nodes for management by Warewulf and returns - // the added nodes. Node fields may be shimmed in per profiles. - rpc NodeAdd(NodeAddParameter) returns (NodeListResponse) { - option (google.api.http) = { - post: "/v1/node" - body: "*" - }; - } - - // NodeDelete removes one or more nodes from Warewulf management. - rpc NodeDelete(NodeDeleteParameter) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/node" - }; - } - - // NodeList lists some or all nodes managed by Warewulf. - rpc NodeList(NodeNames) returns (NodeListResponse) { - option (google.api.http) = { - get: "/v1/node" - }; - } - - // NodeSet updates node fields for one or more nodes. - rpc NodeSet(ConfSetParameter) returns (NodeListResponse) { - option (google.api.http) = { - post: "/v1/nodeset" // TODO: This should be a patch. Had trouble getting patch to work at all. - body: "*" - }; - } - - // NodeStatus returns the imaging state for nodes. - // This requires warewulfd. - rpc NodeStatus(NodeNames) returns (NodeStatusResponse) { - option (google.api.http) = { - get: "/v1/nodestatus" - }; - } - - // Version returns the wwapi version, the api prefix, and the Warewulf - // version. This is also useful for testing if the service is up. - rpc Version(google.protobuf.Empty) returns (VersionResponse) { - option (google.api.http) = { - get: "/version" - }; - } -} diff --git a/internal/pkg/api/routes/wwapiv1/routes.pb.go b/internal/pkg/api/routes/wwapiv1/routes.pb.go deleted file mode 100644 index 6fe8208e..00000000 --- a/internal/pkg/api/routes/wwapiv1/routes.pb.go +++ /dev/null @@ -1,2314 +0,0 @@ -// Routes for the wwapi (WareWulf API). -// TODO: Try protoc-gen-doc for generating documentation. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.5 -// protoc v4.24.0 -// source: routes.proto - -package wwapiv1 - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetNodeList_ListType int32 - -const ( - GetNodeList_Simple GetNodeList_ListType = 0 - GetNodeList_Ipmi GetNodeList_ListType = 1 - GetNodeList_Network GetNodeList_ListType = 2 - GetNodeList_Long GetNodeList_ListType = 3 - GetNodeList_All GetNodeList_ListType = 4 - GetNodeList_YAML GetNodeList_ListType = 6 - GetNodeList_JSON GetNodeList_ListType = 7 -) - -// Enum value maps for GetNodeList_ListType. -var ( - GetNodeList_ListType_name = map[int32]string{ - 0: "Simple", - 1: "Ipmi", - 2: "Network", - 3: "Long", - 4: "All", - 6: "YAML", - 7: "JSON", - } - GetNodeList_ListType_value = map[string]int32{ - "Simple": 0, - "Ipmi": 1, - "Network": 2, - "Long": 3, - "All": 4, - "YAML": 6, - "JSON": 7, - } -) - -func (x GetNodeList_ListType) Enum() *GetNodeList_ListType { - p := new(GetNodeList_ListType) - *p = x - return p -} - -func (x GetNodeList_ListType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GetNodeList_ListType) Descriptor() protoreflect.EnumDescriptor { - return file_routes_proto_enumTypes[0].Descriptor() -} - -func (GetNodeList_ListType) Type() protoreflect.EnumType { - return &file_routes_proto_enumTypes[0] -} - -func (x GetNodeList_ListType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GetNodeList_ListType.Descriptor instead. -func (GetNodeList_ListType) EnumDescriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{16, 0} -} - -type NodeDBHash struct { - state protoimpl.MessageState `protogen:"open.v1"` - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeDBHash) Reset() { - *x = NodeDBHash{} - mi := &file_routes_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeDBHash) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeDBHash) ProtoMessage() {} - -func (x *NodeDBHash) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeDBHash.ProtoReflect.Descriptor instead. -func (*NodeDBHash) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{0} -} - -func (x *NodeDBHash) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -// ImageBuildParameter contains input for building zero or more images. -type ImageBuildParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - ImageNames []string `protobuf:"bytes,1,rep,name=imageNames,proto3" json:"imageNames,omitempty"` - Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` - All bool `protobuf:"varint,3,opt,name=all,proto3" json:"all,omitempty"` // bool default = 4; - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ImageBuildParameter) Reset() { - *x = ImageBuildParameter{} - mi := &file_routes_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ImageBuildParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImageBuildParameter) ProtoMessage() {} - -func (x *ImageBuildParameter) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImageBuildParameter.ProtoReflect.Descriptor instead. -func (*ImageBuildParameter) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{1} -} - -func (x *ImageBuildParameter) GetImageNames() []string { - if x != nil { - return x.ImageNames - } - return nil -} - -func (x *ImageBuildParameter) GetForce() bool { - if x != nil { - return x.Force - } - return false -} - -func (x *ImageBuildParameter) GetAll() bool { - if x != nil { - return x.All - } - return false -} - -// ImageDeleteParameter contains input for removing images from Warewulf -// management. -type ImageDeleteParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - ImageNames []string `protobuf:"bytes,1,rep,name=imageNames,proto3" json:"imageNames,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ImageDeleteParameter) Reset() { - *x = ImageDeleteParameter{} - mi := &file_routes_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ImageDeleteParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImageDeleteParameter) ProtoMessage() {} - -func (x *ImageDeleteParameter) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImageDeleteParameter.ProtoReflect.Descriptor instead. -func (*ImageDeleteParameter) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{2} -} - -func (x *ImageDeleteParameter) GetImageNames() []string { - if x != nil { - return x.ImageNames - } - return nil -} - -// ImageCopyParameter contains 2 inputs : first one for the image source name and second one for the duplicated image name. -type ImageCopyParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - ImageSource string `protobuf:"bytes,1,opt,name=imageSource,proto3" json:"imageSource,omitempty"` - ImageDestination string `protobuf:"bytes,2,opt,name=imageDestination,proto3" json:"imageDestination,omitempty"` - Build bool `protobuf:"varint,3,opt,name=build,proto3" json:"build,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ImageCopyParameter) Reset() { - *x = ImageCopyParameter{} - mi := &file_routes_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ImageCopyParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImageCopyParameter) ProtoMessage() {} - -func (x *ImageCopyParameter) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImageCopyParameter.ProtoReflect.Descriptor instead. -func (*ImageCopyParameter) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{3} -} - -func (x *ImageCopyParameter) GetImageSource() string { - if x != nil { - return x.ImageSource - } - return "" -} - -func (x *ImageCopyParameter) GetImageDestination() string { - if x != nil { - return x.ImageDestination - } - return "" -} - -func (x *ImageCopyParameter) GetBuild() bool { - if x != nil { - return x.Build - } - return false -} - -// ImageImportParameter has all input for importing an image. -type ImageImportParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` // image source uri - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // image name - Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` - Update bool `protobuf:"varint,4,opt,name=update,proto3" json:"update,omitempty"` - Build bool `protobuf:"varint,5,opt,name=build,proto3" json:"build,omitempty"` - // bool default = 6; - SyncUser bool `protobuf:"varint,7,opt,name=syncUser,proto3" json:"syncUser,omitempty"` - OciNoHttps bool `protobuf:"varint,8,opt,name=ociNoHttps,proto3" json:"ociNoHttps,omitempty"` - OciUsername string `protobuf:"bytes,9,opt,name=ociUsername,proto3" json:"ociUsername,omitempty"` - OciPassword string `protobuf:"bytes,10,opt,name=ociPassword,proto3" json:"ociPassword,omitempty"` - Platform string `protobuf:"bytes,11,opt,name=platform,proto3" json:"platform,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ImageImportParameter) Reset() { - *x = ImageImportParameter{} - mi := &file_routes_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ImageImportParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImageImportParameter) ProtoMessage() {} - -func (x *ImageImportParameter) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImageImportParameter.ProtoReflect.Descriptor instead. -func (*ImageImportParameter) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{4} -} - -func (x *ImageImportParameter) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *ImageImportParameter) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ImageImportParameter) GetForce() bool { - if x != nil { - return x.Force - } - return false -} - -func (x *ImageImportParameter) GetUpdate() bool { - if x != nil { - return x.Update - } - return false -} - -func (x *ImageImportParameter) GetBuild() bool { - if x != nil { - return x.Build - } - return false -} - -func (x *ImageImportParameter) GetSyncUser() bool { - if x != nil { - return x.SyncUser - } - return false -} - -func (x *ImageImportParameter) GetOciNoHttps() bool { - if x != nil { - return x.OciNoHttps - } - return false -} - -func (x *ImageImportParameter) GetOciUsername() string { - if x != nil { - return x.OciUsername - } - return "" -} - -func (x *ImageImportParameter) GetOciPassword() string { - if x != nil { - return x.OciPassword - } - return "" -} - -func (x *ImageImportParameter) GetPlatform() string { - if x != nil { - return x.Platform - } - return "" -} - -// ImageInfo has data on each image. This is emitted in the -// ImageListResponse. -type ImageInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - NodeCount uint32 `protobuf:"varint,2,opt,name=nodeCount,proto3" json:"nodeCount,omitempty"` - KernelVersion string `protobuf:"bytes,3,opt,name=kernelVersion,proto3" json:"kernelVersion,omitempty"` - CreateDate uint64 `protobuf:"varint,4,opt,name=createDate,proto3" json:"createDate,omitempty"` // creation date in unix time - ModDate uint64 `protobuf:"varint,5,opt,name=modDate,proto3" json:"modDate,omitempty"` // date of last modification in unix time - // uint64 size = 6; // size of chroot and images in bytes - ImgSize uint64 `protobuf:"varint,7,opt,name=imgSize,proto3" json:"imgSize,omitempty"` - ImgSizeComp uint64 `protobuf:"varint,8,opt,name=imgSizeComp,proto3" json:"imgSizeComp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ImageInfo) Reset() { - *x = ImageInfo{} - mi := &file_routes_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ImageInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImageInfo) ProtoMessage() {} - -func (x *ImageInfo) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImageInfo.ProtoReflect.Descriptor instead. -func (*ImageInfo) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{5} -} - -func (x *ImageInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ImageInfo) GetNodeCount() uint32 { - if x != nil { - return x.NodeCount - } - return 0 -} - -func (x *ImageInfo) GetKernelVersion() string { - if x != nil { - return x.KernelVersion - } - return "" -} - -func (x *ImageInfo) GetCreateDate() uint64 { - if x != nil { - return x.CreateDate - } - return 0 -} - -func (x *ImageInfo) GetModDate() uint64 { - if x != nil { - return x.ModDate - } - return 0 -} - -func (x *ImageInfo) GetImgSize() uint64 { - if x != nil { - return x.ImgSize - } - return 0 -} - -func (x *ImageInfo) GetImgSizeComp() uint64 { - if x != nil { - return x.ImgSizeComp - } - return 0 -} - -// ImageListResponse has all information that ImageList provides. -type ImageListResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Images []*ImageInfo `protobuf:"bytes,1,rep,name=images,proto3" json:"images,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ImageListResponse) Reset() { - *x = ImageListResponse{} - mi := &file_routes_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ImageListResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImageListResponse) ProtoMessage() {} - -func (x *ImageListResponse) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImageListResponse.ProtoReflect.Descriptor instead. -func (*ImageListResponse) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{6} -} - -func (x *ImageListResponse) GetImages() []*ImageInfo { - if x != nil { - return x.Images - } - return nil -} - -// ImageShowParameter is the input for ImageShow. -type ImageShowParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - ImageName string `protobuf:"bytes,1,opt,name=imageName,proto3" json:"imageName,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ImageShowParameter) Reset() { - *x = ImageShowParameter{} - mi := &file_routes_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ImageShowParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImageShowParameter) ProtoMessage() {} - -func (x *ImageShowParameter) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImageShowParameter.ProtoReflect.Descriptor instead. -func (*ImageShowParameter) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{7} -} - -func (x *ImageShowParameter) GetImageName() string { - if x != nil { - return x.ImageName - } - return "" -} - -// ImageShowResponse has all information emitted on ImageShow. -type ImageShowResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` - Rootfs string `protobuf:"bytes,2,opt,name=Rootfs,proto3" json:"Rootfs,omitempty"` - Nodes []string `protobuf:"bytes,3,rep,name=Nodes,proto3" json:"Nodes,omitempty"` - KernelVersion string `protobuf:"bytes,4,opt,name=KernelVersion,proto3" json:"KernelVersion,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ImageShowResponse) Reset() { - *x = ImageShowResponse{} - mi := &file_routes_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ImageShowResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImageShowResponse) ProtoMessage() {} - -func (x *ImageShowResponse) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImageShowResponse.ProtoReflect.Descriptor instead. -func (*ImageShowResponse) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{8} -} - -func (x *ImageShowResponse) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ImageShowResponse) GetRootfs() string { - if x != nil { - return x.Rootfs - } - return "" -} - -func (x *ImageShowResponse) GetNodes() []string { - if x != nil { - return x.Nodes - } - return nil -} - -func (x *ImageShowResponse) GetKernelVersion() string { - if x != nil { - return x.KernelVersion - } - return "" -} - -// ImageSyncUserParameter is the input for ImageSyncUser. -type ImageSyncUserParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - ImageName string `protobuf:"bytes,1,opt,name=imageName,proto3" json:"imageName,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ImageSyncUserParameter) Reset() { - *x = ImageSyncUserParameter{} - mi := &file_routes_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ImageSyncUserParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImageSyncUserParameter) ProtoMessage() {} - -func (x *ImageSyncUserParameter) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImageSyncUserParameter.ProtoReflect.Descriptor instead. -func (*ImageSyncUserParameter) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{9} -} - -func (x *ImageSyncUserParameter) GetImageName() string { - if x != nil { - return x.ImageName - } - return "" -} - -// ImageRenameParameter is the input for ImageRename -type ImageRenameParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - ImageName string `protobuf:"bytes,1,opt,name=imageName,proto3" json:"imageName,omitempty"` - TargetName string `protobuf:"bytes,2,opt,name=targetName,proto3" json:"targetName,omitempty"` - Build bool `protobuf:"varint,3,opt,name=build,proto3" json:"build,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ImageRenameParameter) Reset() { - *x = ImageRenameParameter{} - mi := &file_routes_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ImageRenameParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImageRenameParameter) ProtoMessage() {} - -func (x *ImageRenameParameter) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImageRenameParameter.ProtoReflect.Descriptor instead. -func (*ImageRenameParameter) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{10} -} - -func (x *ImageRenameParameter) GetImageName() string { - if x != nil { - return x.ImageName - } - return "" -} - -func (x *ImageRenameParameter) GetTargetName() string { - if x != nil { - return x.TargetName - } - return "" -} - -func (x *ImageRenameParameter) GetBuild() bool { - if x != nil { - return x.Build - } - return false -} - -// NodeNames is an array of node ids. -type NodeNames struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeNames []string `protobuf:"bytes,1,rep,name=nodeNames,proto3" json:"nodeNames,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeNames) Reset() { - *x = NodeNames{} - mi := &file_routes_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeNames) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeNames) ProtoMessage() {} - -func (x *NodeNames) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeNames.ProtoReflect.Descriptor instead. -func (*NodeNames) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{11} -} - -func (x *NodeNames) GetNodeNames() []string { - if x != nil { - return x.NodeNames - } - return nil -} - -// NodeField contains data output on NodeList. -type NodeField struct { - state protoimpl.MessageState `protogen:"open.v1"` - Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // TODO: Variable name okay? - Print string `protobuf:"bytes,3,opt,name=print,proto3" json:"print,omitempty"` // Empty values printed as -- in wwctl. - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeField) Reset() { - *x = NodeField{} - mi := &file_routes_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeField) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeField) ProtoMessage() {} - -func (x *NodeField) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeField.ProtoReflect.Descriptor instead. -func (*NodeField) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{12} -} - -func (x *NodeField) GetSource() string { - if x != nil { - return x.Source - } - return "" -} - -func (x *NodeField) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *NodeField) GetPrint() string { - if x != nil { - return x.Print - } - return "" -} - -// NetDev is network devices (NICs) on a node. -type NetDev struct { - state protoimpl.MessageState `protogen:"open.v1"` - Field map[string]*NodeField `protobuf:"bytes,1,rep,name=Field,proto3" json:"Field,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Tags map[string]*NodeField `protobuf:"bytes,9,rep,name=Tags,proto3" json:"Tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NetDev) Reset() { - *x = NetDev{} - mi := &file_routes_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NetDev) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NetDev) ProtoMessage() {} - -func (x *NetDev) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NetDev.ProtoReflect.Descriptor instead. -func (*NetDev) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{13} -} - -func (x *NetDev) GetField() map[string]*NodeField { - if x != nil { - return x.Field - } - return nil -} - -func (x *NetDev) GetTags() map[string]*NodeField { - if x != nil { - return x.Tags - } - return nil -} - -// NodeInfo contains details about a node managed by Warewulf/ -type NodeInfo struct { - state protoimpl.MessageState `protogen:"open.v1"` - Fields map[string]*NodeField `protobuf:"bytes,1,rep,name=Fields,proto3" json:"Fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - NetDevs map[string]*NetDev `protobuf:"bytes,23,rep,name=NetDevs,proto3" json:"NetDevs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Tags map[string]*NodeField `protobuf:"bytes,24,rep,name=Tags,proto3" json:"Tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Keys map[string]*NodeField `protobuf:"bytes,25,rep,name=Keys,proto3" json:"Keys,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // TODO: We may not need this. Tags may be it. Ask Greg. - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeInfo) Reset() { - *x = NodeInfo{} - mi := &file_routes_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeInfo) ProtoMessage() {} - -func (x *NodeInfo) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead. -func (*NodeInfo) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{14} -} - -func (x *NodeInfo) GetFields() map[string]*NodeField { - if x != nil { - return x.Fields - } - return nil -} - -func (x *NodeInfo) GetNetDevs() map[string]*NetDev { - if x != nil { - return x.NetDevs - } - return nil -} - -func (x *NodeInfo) GetTags() map[string]*NodeField { - if x != nil { - return x.Tags - } - return nil -} - -func (x *NodeInfo) GetKeys() map[string]*NodeField { - if x != nil { - return x.Keys - } - return nil -} - -// NodeListResponse is the output of NodeList. -type NodeListResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Nodes []*NodeInfo `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeListResponse) Reset() { - *x = NodeListResponse{} - mi := &file_routes_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeListResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeListResponse) ProtoMessage() {} - -func (x *NodeListResponse) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeListResponse.ProtoReflect.Descriptor instead. -func (*NodeListResponse) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{15} -} - -func (x *NodeListResponse) GetNodes() []*NodeInfo { - if x != nil { - return x.Nodes - } - return nil -} - -// Request a node list -type GetNodeList struct { - state protoimpl.MessageState `protogen:"open.v1"` - Type GetNodeList_ListType `protobuf:"varint,8,opt,name=type,proto3,enum=wwapi.v1.GetNodeList_ListType" json:"type,omitempty"` - Nodes []string `protobuf:"bytes,9,rep,name=Nodes,proto3" json:"Nodes,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetNodeList) Reset() { - *x = GetNodeList{} - mi := &file_routes_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetNodeList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeList) ProtoMessage() {} - -func (x *GetNodeList) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNodeList.ProtoReflect.Descriptor instead. -func (*GetNodeList) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{16} -} - -func (x *GetNodeList) GetType() GetNodeList_ListType { - if x != nil { - return x.Type - } - return GetNodeList_Simple -} - -func (x *GetNodeList) GetNodes() []string { - if x != nil { - return x.Nodes - } - return nil -} - -// Get the formated output as string -type NodeList struct { - state protoimpl.MessageState `protogen:"open.v1"` - Output []string `protobuf:"bytes,1,rep,name=Output,proto3" json:"Output,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeList) Reset() { - *x = NodeList{} - mi := &file_routes_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeList) ProtoMessage() {} - -func (x *NodeList) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeList.ProtoReflect.Descriptor instead. -func (*NodeList) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{17} -} - -func (x *NodeList) GetOutput() []string { - if x != nil { - return x.Output - } - return nil -} - -// Request a profile list view -type GetProfileList struct { - state protoimpl.MessageState `protogen:"open.v1"` - ShowAll bool `protobuf:"varint,1,opt,name=ShowAll,proto3" json:"ShowAll,omitempty"` - ShowYaml bool `protobuf:"varint,3,opt,name=ShowYaml,proto3" json:"ShowYaml,omitempty"` - ShowJson bool `protobuf:"varint,4,opt,name=ShowJson,proto3" json:"ShowJson,omitempty"` - Profiles []string `protobuf:"bytes,5,rep,name=Profiles,proto3" json:"Profiles,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetProfileList) Reset() { - *x = GetProfileList{} - mi := &file_routes_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetProfileList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetProfileList) ProtoMessage() {} - -func (x *GetProfileList) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetProfileList.ProtoReflect.Descriptor instead. -func (*GetProfileList) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{18} -} - -func (x *GetProfileList) GetShowAll() bool { - if x != nil { - return x.ShowAll - } - return false -} - -func (x *GetProfileList) GetShowYaml() bool { - if x != nil { - return x.ShowYaml - } - return false -} - -func (x *GetProfileList) GetShowJson() bool { - if x != nil { - return x.ShowJson - } - return false -} - -func (x *GetProfileList) GetProfiles() []string { - if x != nil { - return x.Profiles - } - return nil -} - -// Get the formated output as string -type ProfileList struct { - state protoimpl.MessageState `protogen:"open.v1"` - Output []string `protobuf:"bytes,1,rep,name=Output,proto3" json:"Output,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ProfileList) Reset() { - *x = ProfileList{} - mi := &file_routes_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ProfileList) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ProfileList) ProtoMessage() {} - -func (x *ProfileList) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ProfileList.ProtoReflect.Descriptor instead. -func (*ProfileList) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{19} -} - -func (x *ProfileList) GetOutput() []string { - if x != nil { - return x.Output - } - return nil -} - -// NodeAddParameter contains all input for adding a node to be managed by -// Warewulf. Only adds nodes if the hash matches the actual hash of the -// configuration. -type NodeAddParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeConfYaml string `protobuf:"bytes,1,opt,name=nodeConfYaml,proto3" json:"nodeConfYaml,omitempty"` - Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` - Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` - NodeNames []string `protobuf:"bytes,10,rep,name=nodeNames,proto3" json:"nodeNames,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeAddParameter) Reset() { - *x = NodeAddParameter{} - mi := &file_routes_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeAddParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeAddParameter) ProtoMessage() {} - -func (x *NodeAddParameter) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[20] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeAddParameter.ProtoReflect.Descriptor instead. -func (*NodeAddParameter) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{20} -} - -func (x *NodeAddParameter) GetNodeConfYaml() string { - if x != nil { - return x.NodeConfYaml - } - return "" -} - -func (x *NodeAddParameter) GetForce() bool { - if x != nil { - return x.Force - } - return false -} - -func (x *NodeAddParameter) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -func (x *NodeAddParameter) GetNodeNames() []string { - if x != nil { - return x.NodeNames - } - return nil -} - -// NodeYaml is just the updated YAML config which will be added -// to nodes.conf (is resused for profile edit) -type NodeYaml struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeConfMapYaml string `protobuf:"bytes,1,opt,name=nodeConfMapYaml,proto3" json:"nodeConfMapYaml,omitempty"` - Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeYaml) Reset() { - *x = NodeYaml{} - mi := &file_routes_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeYaml) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeYaml) ProtoMessage() {} - -func (x *NodeYaml) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[21] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeYaml.ProtoReflect.Descriptor instead. -func (*NodeYaml) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{21} -} - -func (x *NodeYaml) GetNodeConfMapYaml() string { - if x != nil { - return x.NodeConfMapYaml - } - return "" -} - -func (x *NodeYaml) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -// NodeDeleteParameter contains input for removing nodes from Warewulf -// management. If the given hash differs with the actual hash of the -// configuration, no node is deleted. The force option allows the deletion -// of nodes with a correct hash. -type NodeDeleteParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - Force bool `protobuf:"varint,1,opt,name=force,proto3" json:"force,omitempty"` - NodeNames []string `protobuf:"bytes,2,rep,name=nodeNames,proto3" json:"nodeNames,omitempty"` - Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeDeleteParameter) Reset() { - *x = NodeDeleteParameter{} - mi := &file_routes_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeDeleteParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeDeleteParameter) ProtoMessage() {} - -func (x *NodeDeleteParameter) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[22] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeDeleteParameter.ProtoReflect.Descriptor instead. -func (*NodeDeleteParameter) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{22} -} - -func (x *NodeDeleteParameter) GetForce() bool { - if x != nil { - return x.Force - } - return false -} - -func (x *NodeDeleteParameter) GetNodeNames() []string { - if x != nil { - return x.NodeNames - } - return nil -} - -func (x *NodeDeleteParameter) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -// NodeSetParameter contains all fields for updating aspects of nodes managed -// by Warewulf. -type ConfSetParameter struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeConfYaml string `protobuf:"bytes,1,opt,name=nodeConfYaml,proto3" json:"nodeConfYaml,omitempty"` - NetdevDelete string `protobuf:"bytes,2,opt,name=netdevDelete,proto3" json:"netdevDelete,omitempty"` - DiskDelete string `protobuf:"bytes,3,opt,name=diskDelete,proto3" json:"diskDelete,omitempty"` - PartitionDelete string `protobuf:"bytes,4,opt,name=partitionDelete,proto3" json:"partitionDelete,omitempty"` - FilesystemDelete string `protobuf:"bytes,5,opt,name=filesystemDelete,proto3" json:"filesystemDelete,omitempty"` - AllConfs bool `protobuf:"varint,6,opt,name=allConfs,proto3" json:"allConfs,omitempty"` - Force bool `protobuf:"varint,7,opt,name=force,proto3" json:"force,omitempty"` - ConfList []string `protobuf:"bytes,8,rep,name=confList,proto3" json:"confList,omitempty"` - TagAdd map[string]string `protobuf:"bytes,9,rep,name=tagAdd,proto3" json:"tagAdd,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - NetTagAdd map[string]string `protobuf:"bytes,10,rep,name=netTagAdd,proto3" json:"netTagAdd,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - IpmiTagAdd map[string]string `protobuf:"bytes,11,rep,name=ipmiTagAdd,proto3" json:"ipmiTagAdd,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - TagDel []string `protobuf:"bytes,12,rep,name=tagDel,proto3" json:"tagDel,omitempty"` - NetTagDel []string `protobuf:"bytes,13,rep,name=netTagDel,proto3" json:"netTagDel,omitempty"` - IpmiTagDel []string `protobuf:"bytes,14,rep,name=ipmiTagDel,proto3" json:"ipmiTagDel,omitempty"` - Netdev string `protobuf:"bytes,15,opt,name=netdev,proto3" json:"netdev,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ConfSetParameter) Reset() { - *x = ConfSetParameter{} - mi := &file_routes_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ConfSetParameter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConfSetParameter) ProtoMessage() {} - -func (x *ConfSetParameter) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[23] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ConfSetParameter.ProtoReflect.Descriptor instead. -func (*ConfSetParameter) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{23} -} - -func (x *ConfSetParameter) GetNodeConfYaml() string { - if x != nil { - return x.NodeConfYaml - } - return "" -} - -func (x *ConfSetParameter) GetNetdevDelete() string { - if x != nil { - return x.NetdevDelete - } - return "" -} - -func (x *ConfSetParameter) GetDiskDelete() string { - if x != nil { - return x.DiskDelete - } - return "" -} - -func (x *ConfSetParameter) GetPartitionDelete() string { - if x != nil { - return x.PartitionDelete - } - return "" -} - -func (x *ConfSetParameter) GetFilesystemDelete() string { - if x != nil { - return x.FilesystemDelete - } - return "" -} - -func (x *ConfSetParameter) GetAllConfs() bool { - if x != nil { - return x.AllConfs - } - return false -} - -func (x *ConfSetParameter) GetForce() bool { - if x != nil { - return x.Force - } - return false -} - -func (x *ConfSetParameter) GetConfList() []string { - if x != nil { - return x.ConfList - } - return nil -} - -func (x *ConfSetParameter) GetTagAdd() map[string]string { - if x != nil { - return x.TagAdd - } - return nil -} - -func (x *ConfSetParameter) GetNetTagAdd() map[string]string { - if x != nil { - return x.NetTagAdd - } - return nil -} - -func (x *ConfSetParameter) GetIpmiTagAdd() map[string]string { - if x != nil { - return x.IpmiTagAdd - } - return nil -} - -func (x *ConfSetParameter) GetTagDel() []string { - if x != nil { - return x.TagDel - } - return nil -} - -func (x *ConfSetParameter) GetNetTagDel() []string { - if x != nil { - return x.NetTagDel - } - return nil -} - -func (x *ConfSetParameter) GetIpmiTagDel() []string { - if x != nil { - return x.IpmiTagDel - } - return nil -} - -func (x *ConfSetParameter) GetNetdev() string { - if x != nil { - return x.Netdev - } - return "" -} - -// NodeStatus contains information about the imaging status per node. -type NodeStatus struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeName string `protobuf:"bytes,1,opt,name=nodeName,proto3" json:"nodeName,omitempty"` // Name (Id) of the node. - Stage string `protobuf:"bytes,2,opt,name=stage,proto3" json:"stage,omitempty"` // Stage of imaging. - Sent string `protobuf:"bytes,3,opt,name=sent,proto3" json:"sent,omitempty"` // Last overlay sent. - Ipaddr string `protobuf:"bytes,4,opt,name=ipaddr,proto3" json:"ipaddr,omitempty"` // Node IP address. - Lastseen int64 `protobuf:"varint,5,opt,name=lastseen,proto3" json:"lastseen,omitempty"` // Time in seconds since the node was last seen. - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeStatus) Reset() { - *x = NodeStatus{} - mi := &file_routes_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeStatus) ProtoMessage() {} - -func (x *NodeStatus) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[24] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeStatus.ProtoReflect.Descriptor instead. -func (*NodeStatus) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{24} -} - -func (x *NodeStatus) GetNodeName() string { - if x != nil { - return x.NodeName - } - return "" -} - -func (x *NodeStatus) GetStage() string { - if x != nil { - return x.Stage - } - return "" -} - -func (x *NodeStatus) GetSent() string { - if x != nil { - return x.Sent - } - return "" -} - -func (x *NodeStatus) GetIpaddr() string { - if x != nil { - return x.Ipaddr - } - return "" -} - -func (x *NodeStatus) GetLastseen() int64 { - if x != nil { - return x.Lastseen - } - return 0 -} - -// NodeStatusResponse contains NodeStatus for zero or more nodes. -type NodeStatusResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - NodeStatus []*NodeStatus `protobuf:"bytes,1,rep,name=nodeStatus,proto3" json:"nodeStatus,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *NodeStatusResponse) Reset() { - *x = NodeStatusResponse{} - mi := &file_routes_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *NodeStatusResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NodeStatusResponse) ProtoMessage() {} - -func (x *NodeStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[25] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NodeStatusResponse.ProtoReflect.Descriptor instead. -func (*NodeStatusResponse) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{25} -} - -func (x *NodeStatusResponse) GetNodeStatus() []*NodeStatus { - if x != nil { - return x.NodeStatus - } - return nil -} - -// VersionReponse contains versions of the software. -type VersionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - ApiPrefix string `protobuf:"bytes,1,opt,name=apiPrefix,proto3" json:"apiPrefix,omitempty"` - ApiVersion string `protobuf:"bytes,2,opt,name=apiVersion,proto3" json:"apiVersion,omitempty"` - WarewulfVersion string `protobuf:"bytes,3,opt,name=warewulfVersion,proto3" json:"warewulfVersion,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *VersionResponse) Reset() { - *x = VersionResponse{} - mi := &file_routes_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *VersionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VersionResponse) ProtoMessage() {} - -func (x *VersionResponse) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[26] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead. -func (*VersionResponse) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{26} -} - -func (x *VersionResponse) GetApiPrefix() string { - if x != nil { - return x.ApiPrefix - } - return "" -} - -func (x *VersionResponse) GetApiVersion() string { - if x != nil { - return x.ApiVersion - } - return "" -} - -func (x *VersionResponse) GetWarewulfVersion() string { - if x != nil { - return x.WarewulfVersion - } - return "" -} - -// Check if config is writeable -type CanWriteConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - CanWriteConfig bool `protobuf:"varint,1,opt,name=canWriteConfig,proto3" json:"canWriteConfig,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CanWriteConfig) Reset() { - *x = CanWriteConfig{} - mi := &file_routes_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CanWriteConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CanWriteConfig) ProtoMessage() {} - -func (x *CanWriteConfig) ProtoReflect() protoreflect.Message { - mi := &file_routes_proto_msgTypes[27] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CanWriteConfig.ProtoReflect.Descriptor instead. -func (*CanWriteConfig) Descriptor() ([]byte, []int) { - return file_routes_proto_rawDescGZIP(), []int{27} -} - -func (x *CanWriteConfig) GetCanWriteConfig() bool { - if x != nil { - return x.CanWriteConfig - } - return false -} - -var File_routes_proto protoreflect.FileDescriptor - -var file_routes_proto_rawDesc = string([]byte{ - 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, - 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x44, 0x42, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x5d, 0x0a, 0x13, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x75, - 0x69, 0x6c, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x03, 0x61, 0x6c, 0x6c, 0x22, 0x36, 0x0a, 0x14, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x78, 0x0a, 0x12, - 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x22, 0xa2, 0x02, 0x0a, 0x14, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, - 0x6f, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, - 0x63, 0x69, 0x4e, 0x6f, 0x48, 0x74, 0x74, 0x70, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0a, 0x6f, 0x63, 0x69, 0x4e, 0x6f, 0x48, 0x74, 0x74, 0x70, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, - 0x63, 0x69, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6f, 0x63, 0x69, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x6f, 0x63, 0x69, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x63, 0x69, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0xd9, 0x01, 0x0a, 0x09, - 0x49, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6b, - 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x69, - 0x6d, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x69, 0x6d, - 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x69, 0x6d, 0x67, 0x53, 0x69, 0x7a, 0x65, - 0x43, 0x6f, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x69, 0x6d, 0x67, 0x53, - 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x22, 0x40, 0x0a, 0x11, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77, - 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x22, 0x32, 0x0a, 0x12, 0x49, 0x6d, 0x61, - 0x67, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, - 0x1c, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x7b, 0x0a, - 0x11, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x6f, 0x6f, 0x74, 0x66, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x6f, 0x6f, 0x74, 0x66, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x4e, - 0x6f, 0x64, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x4b, 0x65, 0x72, - 0x6e, 0x65, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x36, 0x0a, 0x16, 0x49, 0x6d, - 0x61, 0x67, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x22, 0x6a, 0x0a, 0x14, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x6e, 0x61, 0x6d, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x22, 0x29, - 0x0a, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x4f, 0x0a, 0x09, 0x4e, 0x6f, 0x64, - 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x22, 0x88, 0x02, 0x0a, 0x06, 0x4e, - 0x65, 0x74, 0x44, 0x65, 0x76, 0x12, 0x31, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x4e, 0x65, 0x74, 0x44, 0x65, 0x76, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, - 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x04, 0x54, 0x61, 0x67, 0x73, 0x1a, 0x4d, 0x0a, 0x0a, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9b, 0x04, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x06, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, - 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x06, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x39, 0x0a, 0x07, 0x4e, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x77, 0x77, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, - 0x4e, 0x65, 0x74, 0x44, 0x65, 0x76, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x4e, 0x65, - 0x74, 0x44, 0x65, 0x76, 0x73, 0x12, 0x30, 0x0a, 0x04, 0x54, 0x61, 0x67, 0x73, 0x18, 0x18, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, - 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x04, 0x54, 0x61, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x18, - 0x19, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x04, 0x4b, 0x65, 0x79, 0x73, 0x1a, 0x4e, 0x0a, 0x0b, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77, 0x77, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x0c, 0x4e, 0x65, 0x74, - 0x44, 0x65, 0x76, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x77, 0x77, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x44, 0x65, 0x76, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x09, 0x4b, 0x65, 0x79, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, - 0x6f, 0x64, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x3c, 0x0a, 0x10, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x22, 0xad, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1e, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, - 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x09, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x54, 0x0a, 0x08, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x69, 0x6d, 0x70, 0x6c, - 0x65, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x70, 0x6d, 0x69, 0x10, 0x01, 0x12, 0x0b, 0x0a, - 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x6f, - 0x6e, 0x67, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x6c, 0x6c, 0x10, 0x04, 0x12, 0x08, 0x0a, - 0x04, 0x59, 0x41, 0x4d, 0x4c, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, - 0x07, 0x22, 0x22, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x7e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x68, 0x6f, 0x77, 0x41, - 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x53, 0x68, 0x6f, 0x77, 0x41, 0x6c, - 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x77, 0x59, 0x61, 0x6d, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x08, 0x53, 0x68, 0x6f, 0x77, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x1a, 0x0a, - 0x08, 0x53, 0x68, 0x6f, 0x77, 0x4a, 0x73, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x53, 0x68, 0x6f, 0x77, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x25, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x7e, 0x0a, 0x10, - 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x59, 0x61, 0x6d, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x48, 0x0a, 0x08, - 0x4e, 0x6f, 0x64, 0x65, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x6f, 0x64, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x4d, 0x61, 0x70, 0x59, 0x61, 0x6d, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x4d, 0x61, 0x70, 0x59, 0x61, - 0x6d, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x5d, 0x0a, 0x13, 0x4e, 0x6f, 0x64, 0x65, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x99, 0x06, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x53, 0x65, - 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, - 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x59, 0x61, 0x6d, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x22, - 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x64, 0x65, 0x76, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x74, 0x64, 0x65, 0x76, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x10, - 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x6c, 0x43, - 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x6c, 0x6c, 0x43, - 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, - 0x6e, 0x66, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, - 0x6e, 0x66, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x06, 0x74, 0x61, 0x67, 0x41, 0x64, 0x64, - 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x2e, 0x54, 0x61, 0x67, 0x41, 0x64, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, - 0x74, 0x61, 0x67, 0x41, 0x64, 0x64, 0x12, 0x47, 0x0a, 0x09, 0x6e, 0x65, 0x74, 0x54, 0x61, 0x67, - 0x41, 0x64, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x77, 0x77, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x4e, 0x65, 0x74, 0x54, 0x61, 0x67, 0x41, 0x64, 0x64, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x54, 0x61, 0x67, 0x41, 0x64, 0x64, 0x12, - 0x4a, 0x0a, 0x0a, 0x69, 0x70, 0x6d, 0x69, 0x54, 0x61, 0x67, 0x41, 0x64, 0x64, 0x18, 0x0b, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, - 0x49, 0x70, 0x6d, 0x69, 0x54, 0x61, 0x67, 0x41, 0x64, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0a, 0x69, 0x70, 0x6d, 0x69, 0x54, 0x61, 0x67, 0x41, 0x64, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, - 0x61, 0x67, 0x44, 0x65, 0x6c, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x67, - 0x44, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x65, 0x74, 0x54, 0x61, 0x67, 0x44, 0x65, 0x6c, - 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x65, 0x74, 0x54, 0x61, 0x67, 0x44, 0x65, - 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x70, 0x6d, 0x69, 0x54, 0x61, 0x67, 0x44, 0x65, 0x6c, 0x18, - 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x70, 0x6d, 0x69, 0x54, 0x61, 0x67, 0x44, 0x65, - 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x65, 0x74, 0x64, 0x65, 0x76, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6e, 0x65, 0x74, 0x64, 0x65, 0x76, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x61, 0x67, - 0x41, 0x64, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3c, 0x0a, 0x0e, 0x4e, 0x65, 0x74, 0x54, 0x61, 0x67, 0x41, 0x64, - 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x3d, 0x0a, 0x0f, 0x49, 0x70, 0x6d, 0x69, 0x54, 0x61, 0x67, 0x41, 0x64, 0x64, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x86, 0x01, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x73, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x70, 0x61, 0x64, 0x64, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x70, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, - 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x73, 0x65, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x73, 0x65, 0x65, 0x6e, 0x22, 0x4a, 0x0a, 0x12, 0x4e, 0x6f, - 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x34, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0a, 0x6e, 0x6f, 0x64, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x79, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70, 0x69, - 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x70, - 0x69, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x77, 0x61, 0x72, 0x65, 0x77, - 0x75, 0x6c, 0x66, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0f, 0x77, 0x61, 0x72, 0x65, 0x77, 0x75, 0x6c, 0x66, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x22, 0x38, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x61, 0x6e, - 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x9e, 0x09, 0x0a, 0x05, - 0x57, 0x57, 0x41, 0x70, 0x69, 0x12, 0x63, 0x0a, 0x0a, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x75, - 0x69, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x1a, 0x1b, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, - 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x58, 0x0a, 0x0b, 0x49, 0x6d, - 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x77, 0x77, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x2a, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x12, 0x5b, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x70, - 0x79, 0x12, 0x1c, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, - 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x63, 0x6f, 0x70, - 0x79, 0x12, 0x60, 0x0a, 0x0b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x12, 0x1e, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x1a, 0x1b, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, - 0x76, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x5d, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x1c, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x1a, 0x1b, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x73, 0x68, 0x6f, 0x77, 0x12, 0x61, 0x0a, 0x0b, 0x49, 0x6d, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x07, 0x4e, 0x6f, - 0x64, 0x65, 0x41, 0x64, 0x64, 0x12, 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x1a, 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x3a, 0x01, 0x2a, 0x22, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, - 0x64, 0x65, 0x12, 0x55, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x12, 0x1d, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x2a, - 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x4d, 0x0a, 0x08, 0x4e, 0x6f, 0x64, - 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x1a, 0x2e, 0x77, 0x77, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, - 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x59, 0x0a, 0x07, 0x4e, 0x6f, 0x64, 0x65, - 0x53, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x53, 0x65, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x1a, - 0x1a, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, - 0x73, 0x65, 0x74, 0x12, 0x57, 0x0a, 0x0a, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x13, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x1a, 0x1c, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, - 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, 0x0a, 0x07, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x19, 0x2e, 0x77, 0x77, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x5a, 0x27, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x77, 0x77, 0x61, 0x70, 0x69, 0x76, 0x31, 0x3b, - 0x77, 0x77, 0x61, 0x70, 0x69, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -}) - -var ( - file_routes_proto_rawDescOnce sync.Once - file_routes_proto_rawDescData []byte -) - -func file_routes_proto_rawDescGZIP() []byte { - file_routes_proto_rawDescOnce.Do(func() { - file_routes_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_routes_proto_rawDesc), len(file_routes_proto_rawDesc))) - }) - return file_routes_proto_rawDescData -} - -var file_routes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_routes_proto_msgTypes = make([]protoimpl.MessageInfo, 37) -var file_routes_proto_goTypes = []any{ - (GetNodeList_ListType)(0), // 0: wwapi.v1.GetNodeList.ListType - (*NodeDBHash)(nil), // 1: wwapi.v1.NodeDBHash - (*ImageBuildParameter)(nil), // 2: wwapi.v1.ImageBuildParameter - (*ImageDeleteParameter)(nil), // 3: wwapi.v1.ImageDeleteParameter - (*ImageCopyParameter)(nil), // 4: wwapi.v1.ImageCopyParameter - (*ImageImportParameter)(nil), // 5: wwapi.v1.ImageImportParameter - (*ImageInfo)(nil), // 6: wwapi.v1.ImageInfo - (*ImageListResponse)(nil), // 7: wwapi.v1.ImageListResponse - (*ImageShowParameter)(nil), // 8: wwapi.v1.ImageShowParameter - (*ImageShowResponse)(nil), // 9: wwapi.v1.ImageShowResponse - (*ImageSyncUserParameter)(nil), // 10: wwapi.v1.ImageSyncUserParameter - (*ImageRenameParameter)(nil), // 11: wwapi.v1.ImageRenameParameter - (*NodeNames)(nil), // 12: wwapi.v1.NodeNames - (*NodeField)(nil), // 13: wwapi.v1.NodeField - (*NetDev)(nil), // 14: wwapi.v1.NetDev - (*NodeInfo)(nil), // 15: wwapi.v1.NodeInfo - (*NodeListResponse)(nil), // 16: wwapi.v1.NodeListResponse - (*GetNodeList)(nil), // 17: wwapi.v1.GetNodeList - (*NodeList)(nil), // 18: wwapi.v1.NodeList - (*GetProfileList)(nil), // 19: wwapi.v1.GetProfileList - (*ProfileList)(nil), // 20: wwapi.v1.ProfileList - (*NodeAddParameter)(nil), // 21: wwapi.v1.NodeAddParameter - (*NodeYaml)(nil), // 22: wwapi.v1.NodeYaml - (*NodeDeleteParameter)(nil), // 23: wwapi.v1.NodeDeleteParameter - (*ConfSetParameter)(nil), // 24: wwapi.v1.ConfSetParameter - (*NodeStatus)(nil), // 25: wwapi.v1.NodeStatus - (*NodeStatusResponse)(nil), // 26: wwapi.v1.NodeStatusResponse - (*VersionResponse)(nil), // 27: wwapi.v1.VersionResponse - (*CanWriteConfig)(nil), // 28: wwapi.v1.CanWriteConfig - nil, // 29: wwapi.v1.NetDev.FieldEntry - nil, // 30: wwapi.v1.NetDev.TagsEntry - nil, // 31: wwapi.v1.NodeInfo.FieldsEntry - nil, // 32: wwapi.v1.NodeInfo.NetDevsEntry - nil, // 33: wwapi.v1.NodeInfo.TagsEntry - nil, // 34: wwapi.v1.NodeInfo.KeysEntry - nil, // 35: wwapi.v1.ConfSetParameter.TagAddEntry - nil, // 36: wwapi.v1.ConfSetParameter.NetTagAddEntry - nil, // 37: wwapi.v1.ConfSetParameter.IpmiTagAddEntry - (*emptypb.Empty)(nil), // 38: google.protobuf.Empty -} -var file_routes_proto_depIdxs = []int32{ - 6, // 0: wwapi.v1.ImageListResponse.images:type_name -> wwapi.v1.ImageInfo - 29, // 1: wwapi.v1.NetDev.Field:type_name -> wwapi.v1.NetDev.FieldEntry - 30, // 2: wwapi.v1.NetDev.Tags:type_name -> wwapi.v1.NetDev.TagsEntry - 31, // 3: wwapi.v1.NodeInfo.Fields:type_name -> wwapi.v1.NodeInfo.FieldsEntry - 32, // 4: wwapi.v1.NodeInfo.NetDevs:type_name -> wwapi.v1.NodeInfo.NetDevsEntry - 33, // 5: wwapi.v1.NodeInfo.Tags:type_name -> wwapi.v1.NodeInfo.TagsEntry - 34, // 6: wwapi.v1.NodeInfo.Keys:type_name -> wwapi.v1.NodeInfo.KeysEntry - 15, // 7: wwapi.v1.NodeListResponse.nodes:type_name -> wwapi.v1.NodeInfo - 0, // 8: wwapi.v1.GetNodeList.type:type_name -> wwapi.v1.GetNodeList.ListType - 35, // 9: wwapi.v1.ConfSetParameter.tagAdd:type_name -> wwapi.v1.ConfSetParameter.TagAddEntry - 36, // 10: wwapi.v1.ConfSetParameter.netTagAdd:type_name -> wwapi.v1.ConfSetParameter.NetTagAddEntry - 37, // 11: wwapi.v1.ConfSetParameter.ipmiTagAdd:type_name -> wwapi.v1.ConfSetParameter.IpmiTagAddEntry - 25, // 12: wwapi.v1.NodeStatusResponse.nodeStatus:type_name -> wwapi.v1.NodeStatus - 13, // 13: wwapi.v1.NetDev.FieldEntry.value:type_name -> wwapi.v1.NodeField - 13, // 14: wwapi.v1.NetDev.TagsEntry.value:type_name -> wwapi.v1.NodeField - 13, // 15: wwapi.v1.NodeInfo.FieldsEntry.value:type_name -> wwapi.v1.NodeField - 14, // 16: wwapi.v1.NodeInfo.NetDevsEntry.value:type_name -> wwapi.v1.NetDev - 13, // 17: wwapi.v1.NodeInfo.TagsEntry.value:type_name -> wwapi.v1.NodeField - 13, // 18: wwapi.v1.NodeInfo.KeysEntry.value:type_name -> wwapi.v1.NodeField - 2, // 19: wwapi.v1.WWApi.ImageBuild:input_type -> wwapi.v1.ImageBuildParameter - 3, // 20: wwapi.v1.WWApi.ImageDelete:input_type -> wwapi.v1.ImageDeleteParameter - 4, // 21: wwapi.v1.WWApi.ImageCopy:input_type -> wwapi.v1.ImageCopyParameter - 5, // 22: wwapi.v1.WWApi.ImageImport:input_type -> wwapi.v1.ImageImportParameter - 38, // 23: wwapi.v1.WWApi.ImageList:input_type -> google.protobuf.Empty - 8, // 24: wwapi.v1.WWApi.ImageShow:input_type -> wwapi.v1.ImageShowParameter - 11, // 25: wwapi.v1.WWApi.ImageRename:input_type -> wwapi.v1.ImageRenameParameter - 21, // 26: wwapi.v1.WWApi.NodeAdd:input_type -> wwapi.v1.NodeAddParameter - 23, // 27: wwapi.v1.WWApi.NodeDelete:input_type -> wwapi.v1.NodeDeleteParameter - 12, // 28: wwapi.v1.WWApi.NodeList:input_type -> wwapi.v1.NodeNames - 24, // 29: wwapi.v1.WWApi.NodeSet:input_type -> wwapi.v1.ConfSetParameter - 12, // 30: wwapi.v1.WWApi.NodeStatus:input_type -> wwapi.v1.NodeNames - 38, // 31: wwapi.v1.WWApi.Version:input_type -> google.protobuf.Empty - 7, // 32: wwapi.v1.WWApi.ImageBuild:output_type -> wwapi.v1.ImageListResponse - 38, // 33: wwapi.v1.WWApi.ImageDelete:output_type -> google.protobuf.Empty - 38, // 34: wwapi.v1.WWApi.ImageCopy:output_type -> google.protobuf.Empty - 7, // 35: wwapi.v1.WWApi.ImageImport:output_type -> wwapi.v1.ImageListResponse - 7, // 36: wwapi.v1.WWApi.ImageList:output_type -> wwapi.v1.ImageListResponse - 9, // 37: wwapi.v1.WWApi.ImageShow:output_type -> wwapi.v1.ImageShowResponse - 38, // 38: wwapi.v1.WWApi.ImageRename:output_type -> google.protobuf.Empty - 16, // 39: wwapi.v1.WWApi.NodeAdd:output_type -> wwapi.v1.NodeListResponse - 38, // 40: wwapi.v1.WWApi.NodeDelete:output_type -> google.protobuf.Empty - 16, // 41: wwapi.v1.WWApi.NodeList:output_type -> wwapi.v1.NodeListResponse - 16, // 42: wwapi.v1.WWApi.NodeSet:output_type -> wwapi.v1.NodeListResponse - 26, // 43: wwapi.v1.WWApi.NodeStatus:output_type -> wwapi.v1.NodeStatusResponse - 27, // 44: wwapi.v1.WWApi.Version:output_type -> wwapi.v1.VersionResponse - 32, // [32:45] is the sub-list for method output_type - 19, // [19:32] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name -} - -func init() { file_routes_proto_init() } -func file_routes_proto_init() { - if File_routes_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_routes_proto_rawDesc), len(file_routes_proto_rawDesc)), - NumEnums: 1, - NumMessages: 37, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_routes_proto_goTypes, - DependencyIndexes: file_routes_proto_depIdxs, - EnumInfos: file_routes_proto_enumTypes, - MessageInfos: file_routes_proto_msgTypes, - }.Build() - File_routes_proto = out.File - file_routes_proto_goTypes = nil - file_routes_proto_depIdxs = nil -} diff --git a/internal/pkg/api/routes/wwapiv1/routes.pb.gw.go b/internal/pkg/api/routes/wwapiv1/routes.pb.gw.go deleted file mode 100644 index 70abb410..00000000 --- a/internal/pkg/api/routes/wwapiv1/routes.pb.gw.go +++ /dev/null @@ -1,939 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: routes.proto - -/* -Package wwapiv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package wwapiv1 - -import ( - "context" - "errors" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/emptypb" -) - -// Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = errors.New - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) - -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 - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ImageBuild(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -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 - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ImageBuild(ctx, &protoReq) - return msg, metadata, err -} - -var filter_WWApi_ImageDelete_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - -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 - 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_ImageDelete_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ImageDelete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -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 - 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_ImageDelete_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ImageDelete(ctx, &protoReq) - return msg, metadata, err -} - -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 - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ImageCopy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -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 - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ImageCopy(ctx, &protoReq) - return msg, metadata, err -} - -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 - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ImageImport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -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 - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ImageImport(ctx, &protoReq) - return msg, metadata, err -} - -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 - metadata runtime.ServerMetadata - ) - msg, err := client.ImageList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -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 - metadata runtime.ServerMetadata - ) - msg, err := server.ImageList(ctx, &protoReq) - return msg, metadata, err -} - -var filter_WWApi_ImageShow_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - -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 - 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_ImageShow_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ImageShow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -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 - 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_ImageShow_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ImageShow(ctx, &protoReq) - return msg, metadata, err -} - -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 - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ImageRename(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -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 - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ImageRename(ctx, &protoReq) - return msg, metadata, err -} - -func request_WWApi_NodeAdd_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq NodeAddParameter - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.NodeAdd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_WWApi_NodeAdd_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq NodeAddParameter - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.NodeAdd(ctx, &protoReq) - return msg, metadata, err -} - -var filter_WWApi_NodeDelete_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - -func request_WWApi_NodeDelete_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq NodeDeleteParameter - 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_NodeDelete_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.NodeDelete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_WWApi_NodeDelete_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq NodeDeleteParameter - 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_NodeDelete_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.NodeDelete(ctx, &protoReq) - return msg, metadata, err -} - -var filter_WWApi_NodeList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - -func request_WWApi_NodeList_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq NodeNames - 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_NodeList_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.NodeList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_WWApi_NodeList_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq NodeNames - 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_NodeList_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.NodeList(ctx, &protoReq) - return msg, metadata, err -} - -func request_WWApi_NodeSet_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq ConfSetParameter - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.NodeSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_WWApi_NodeSet_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq ConfSetParameter - metadata runtime.ServerMetadata - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.NodeSet(ctx, &protoReq) - return msg, metadata, err -} - -var filter_WWApi_NodeStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - -func request_WWApi_NodeStatus_0(ctx context.Context, marshaler runtime.Marshaler, client WWApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq NodeNames - 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_NodeStatus_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.NodeStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_WWApi_NodeStatus_0(ctx context.Context, marshaler runtime.Marshaler, server WWApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq NodeNames - 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_NodeStatus_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.NodeStatus(ctx, &protoReq) - return msg, metadata, err -} - -func request_WWApi_Version_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 - metadata runtime.ServerMetadata - ) - msg, err := client.Version(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_WWApi_Version_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 - metadata runtime.ServerMetadata - ) - msg, err := server.Version(ctx, &protoReq) - return msg, metadata, err -} - -// RegisterWWApiHandlerServer registers the http handlers for service WWApi to "mux". -// UnaryRPC :call WWApiServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWWApiHandlerFromEndpoint instead. -// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. -func RegisterWWApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WWApiServer) error { - mux.Handle(http.MethodPost, 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 - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - 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_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_ImageBuild_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodDelete, 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 - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - 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_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_ImageDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, 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 - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - 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_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_ImageCopy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, 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 - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - 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_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_ImageImport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodGet, 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 - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - 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_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_ImageList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodGet, 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 - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - 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_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_ImageShow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, 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 - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - 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_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_ImageRename_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, pattern_WWApi_NodeAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeAdd", runtime.WithHTTPPathPattern("/v1/node")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WWApi_NodeAdd_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_NodeAdd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodDelete, pattern_WWApi_NodeDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeDelete", runtime.WithHTTPPathPattern("/v1/node")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WWApi_NodeDelete_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_NodeDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodGet, pattern_WWApi_NodeList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeList", runtime.WithHTTPPathPattern("/v1/node")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WWApi_NodeList_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_NodeList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, pattern_WWApi_NodeSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeSet", runtime.WithHTTPPathPattern("/v1/nodeset")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WWApi_NodeSet_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_NodeSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodGet, pattern_WWApi_NodeStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeStatus", runtime.WithHTTPPathPattern("/v1/nodestatus")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WWApi_NodeStatus_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_NodeStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodGet, pattern_WWApi_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/wwapi.v1.WWApi/Version", runtime.WithHTTPPathPattern("/version")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WWApi_Version_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 { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_WWApi_Version_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -// RegisterWWApiHandlerFromEndpoint is same as RegisterWWApiHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterWWApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - return RegisterWWApiHandler(ctx, mux, conn) -} - -// RegisterWWApiHandler registers the http handlers for service WWApi to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterWWApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterWWApiHandlerClient(ctx, mux, NewWWApiClient(conn)) -} - -// RegisterWWApiHandlerClient registers the http handlers for service WWApi -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WWApiClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WWApiClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "WWApiClient" to call the correct interceptors. This client ignores the HTTP middlewares. -func RegisterWWApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WWApiClient) error { - mux.Handle(http.MethodPost, 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) - 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_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_ImageBuild_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodDelete, 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) - 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_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_ImageDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, 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) - 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_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_ImageCopy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, 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) - 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_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_ImageImport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodGet, 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) - 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_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_ImageList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodGet, 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) - 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_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_ImageShow_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, 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) - 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_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_ImageRename_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, pattern_WWApi_NodeAdd_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) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeAdd", runtime.WithHTTPPathPattern("/v1/node")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WWApi_NodeAdd_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_NodeAdd_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodDelete, pattern_WWApi_NodeDelete_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) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeDelete", runtime.WithHTTPPathPattern("/v1/node")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WWApi_NodeDelete_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_NodeDelete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodGet, pattern_WWApi_NodeList_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) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeList", runtime.WithHTTPPathPattern("/v1/node")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WWApi_NodeList_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_NodeList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, pattern_WWApi_NodeSet_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) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeSet", runtime.WithHTTPPathPattern("/v1/nodeset")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WWApi_NodeSet_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_NodeSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodGet, pattern_WWApi_NodeStatus_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) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/NodeStatus", runtime.WithHTTPPathPattern("/v1/nodestatus")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WWApi_NodeStatus_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_NodeStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodGet, pattern_WWApi_Version_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) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/wwapi.v1.WWApi/Version", runtime.WithHTTPPathPattern("/version")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WWApi_Version_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_Version_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil -} - -var ( - pattern_WWApi_ImageBuild_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "imagebuild"}, "")) - pattern_WWApi_ImageDelete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "image"}, "")) - pattern_WWApi_ImageCopy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "imagecopy"}, "")) - pattern_WWApi_ImageImport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "image"}, "")) - pattern_WWApi_ImageList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "image"}, "")) - pattern_WWApi_ImageShow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "imageshow"}, "")) - 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"}, "")) - pattern_WWApi_NodeDelete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "node"}, "")) - pattern_WWApi_NodeList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "node"}, "")) - pattern_WWApi_NodeSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "nodeset"}, "")) - pattern_WWApi_NodeStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "nodestatus"}, "")) - pattern_WWApi_Version_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"version"}, "")) -) - -var ( - forward_WWApi_ImageBuild_0 = runtime.ForwardResponseMessage - forward_WWApi_ImageDelete_0 = runtime.ForwardResponseMessage - forward_WWApi_ImageCopy_0 = runtime.ForwardResponseMessage - forward_WWApi_ImageImport_0 = runtime.ForwardResponseMessage - forward_WWApi_ImageList_0 = runtime.ForwardResponseMessage - forward_WWApi_ImageShow_0 = runtime.ForwardResponseMessage - forward_WWApi_ImageRename_0 = runtime.ForwardResponseMessage - forward_WWApi_NodeAdd_0 = runtime.ForwardResponseMessage - forward_WWApi_NodeDelete_0 = runtime.ForwardResponseMessage - forward_WWApi_NodeList_0 = runtime.ForwardResponseMessage - forward_WWApi_NodeSet_0 = runtime.ForwardResponseMessage - forward_WWApi_NodeStatus_0 = runtime.ForwardResponseMessage - forward_WWApi_Version_0 = runtime.ForwardResponseMessage -) diff --git a/internal/pkg/api/routes/wwapiv1/routes_grpc.pb.go b/internal/pkg/api/routes/wwapiv1/routes_grpc.pb.go deleted file mode 100644 index 630b5736..00000000 --- a/internal/pkg/api/routes/wwapiv1/routes_grpc.pb.go +++ /dev/null @@ -1,615 +0,0 @@ -// Routes for the wwapi (WareWulf API). -// TODO: Try protoc-gen-doc for generating documentation. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v4.24.0 -// source: routes.proto - -package wwapiv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - WWApi_ImageBuild_FullMethodName = "/wwapi.v1.WWApi/ImageBuild" - WWApi_ImageDelete_FullMethodName = "/wwapi.v1.WWApi/ImageDelete" - WWApi_ImageCopy_FullMethodName = "/wwapi.v1.WWApi/ImageCopy" - WWApi_ImageImport_FullMethodName = "/wwapi.v1.WWApi/ImageImport" - WWApi_ImageList_FullMethodName = "/wwapi.v1.WWApi/ImageList" - WWApi_ImageShow_FullMethodName = "/wwapi.v1.WWApi/ImageShow" - WWApi_ImageRename_FullMethodName = "/wwapi.v1.WWApi/ImageRename" - WWApi_NodeAdd_FullMethodName = "/wwapi.v1.WWApi/NodeAdd" - WWApi_NodeDelete_FullMethodName = "/wwapi.v1.WWApi/NodeDelete" - WWApi_NodeList_FullMethodName = "/wwapi.v1.WWApi/NodeList" - WWApi_NodeSet_FullMethodName = "/wwapi.v1.WWApi/NodeSet" - WWApi_NodeStatus_FullMethodName = "/wwapi.v1.WWApi/NodeStatus" - WWApi_Version_FullMethodName = "/wwapi.v1.WWApi/Version" -) - -// WWApiClient is the client API for WWApi service. -// -// 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. -// -// WWApi defines the wwapid service web interface. -type WWApiClient interface { - // 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) - // NodeDelete removes one or more nodes from Warewulf management. - NodeDelete(ctx context.Context, in *NodeDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) - // NodeList lists some or all nodes managed by Warewulf. - NodeList(ctx context.Context, in *NodeNames, opts ...grpc.CallOption) (*NodeListResponse, error) - // NodeSet updates node fields for one or more nodes. - NodeSet(ctx context.Context, in *ConfSetParameter, opts ...grpc.CallOption) (*NodeListResponse, error) - // NodeStatus returns the imaging state for nodes. - // This requires warewulfd. - NodeStatus(ctx context.Context, in *NodeNames, opts ...grpc.CallOption) (*NodeStatusResponse, error) - // Version returns the wwapi version, the api prefix, and the Warewulf - // version. This is also useful for testing if the service is up. - Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) -} - -type wWApiClient struct { - cc grpc.ClientConnInterface -} - -func NewWWApiClient(cc grpc.ClientConnInterface) WWApiClient { - return &wWApiClient{cc} -} - -func (c *wWApiClient) ImageBuild(ctx context.Context, in *ImageBuildParameter, opts ...grpc.CallOption) (*ImageListResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ImageListResponse) - err := c.cc.Invoke(ctx, WWApi_ImageBuild_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) ImageDelete(ctx context.Context, in *ImageDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, WWApi_ImageDelete_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) ImageCopy(ctx context.Context, in *ImageCopyParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, WWApi_ImageCopy_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) ImageImport(ctx context.Context, in *ImageImportParameter, opts ...grpc.CallOption) (*ImageListResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ImageListResponse) - err := c.cc.Invoke(ctx, WWApi_ImageImport_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) ImageList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ImageListResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ImageListResponse) - err := c.cc.Invoke(ctx, WWApi_ImageList_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) ImageShow(ctx context.Context, in *ImageShowParameter, opts ...grpc.CallOption) (*ImageShowResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(ImageShowResponse) - err := c.cc.Invoke(ctx, WWApi_ImageShow_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) ImageRename(ctx context.Context, in *ImageRenameParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, WWApi_ImageRename_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) NodeAdd(ctx context.Context, in *NodeAddParameter, opts ...grpc.CallOption) (*NodeListResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(NodeListResponse) - err := c.cc.Invoke(ctx, WWApi_NodeAdd_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) NodeDelete(ctx context.Context, in *NodeDeleteParameter, opts ...grpc.CallOption) (*emptypb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, WWApi_NodeDelete_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) NodeList(ctx context.Context, in *NodeNames, opts ...grpc.CallOption) (*NodeListResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(NodeListResponse) - err := c.cc.Invoke(ctx, WWApi_NodeList_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) NodeSet(ctx context.Context, in *ConfSetParameter, opts ...grpc.CallOption) (*NodeListResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(NodeListResponse) - err := c.cc.Invoke(ctx, WWApi_NodeSet_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) NodeStatus(ctx context.Context, in *NodeNames, opts ...grpc.CallOption) (*NodeStatusResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(NodeStatusResponse) - err := c.cc.Invoke(ctx, WWApi_NodeStatus_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *wWApiClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(VersionResponse) - err := c.cc.Invoke(ctx, WWApi_Version_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// WWApiServer is the server API for WWApi service. -// All implementations must embed UnimplementedWWApiServer -// for forward compatibility. -// -// WWApi defines the wwapid service web interface. -type WWApiServer interface { - // 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) - // NodeDelete removes one or more nodes from Warewulf management. - NodeDelete(context.Context, *NodeDeleteParameter) (*emptypb.Empty, error) - // NodeList lists some or all nodes managed by Warewulf. - NodeList(context.Context, *NodeNames) (*NodeListResponse, error) - // NodeSet updates node fields for one or more nodes. - NodeSet(context.Context, *ConfSetParameter) (*NodeListResponse, error) - // NodeStatus returns the imaging state for nodes. - // This requires warewulfd. - NodeStatus(context.Context, *NodeNames) (*NodeStatusResponse, error) - // Version returns the wwapi version, the api prefix, and the Warewulf - // version. This is also useful for testing if the service is up. - Version(context.Context, *emptypb.Empty) (*VersionResponse, error) - mustEmbedUnimplementedWWApiServer() -} - -// UnimplementedWWApiServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedWWApiServer struct{} - -func (UnimplementedWWApiServer) ImageBuild(context.Context, *ImageBuildParameter) (*ImageListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImageBuild not implemented") -} -func (UnimplementedWWApiServer) ImageDelete(context.Context, *ImageDeleteParameter) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImageDelete not implemented") -} -func (UnimplementedWWApiServer) ImageCopy(context.Context, *ImageCopyParameter) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImageCopy not implemented") -} -func (UnimplementedWWApiServer) ImageImport(context.Context, *ImageImportParameter) (*ImageListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImageImport not implemented") -} -func (UnimplementedWWApiServer) ImageList(context.Context, *emptypb.Empty) (*ImageListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImageList not implemented") -} -func (UnimplementedWWApiServer) ImageShow(context.Context, *ImageShowParameter) (*ImageShowResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImageShow 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") -} -func (UnimplementedWWApiServer) NodeDelete(context.Context, *NodeDeleteParameter) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method NodeDelete not implemented") -} -func (UnimplementedWWApiServer) NodeList(context.Context, *NodeNames) (*NodeListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NodeList not implemented") -} -func (UnimplementedWWApiServer) NodeSet(context.Context, *ConfSetParameter) (*NodeListResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NodeSet not implemented") -} -func (UnimplementedWWApiServer) NodeStatus(context.Context, *NodeNames) (*NodeStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NodeStatus not implemented") -} -func (UnimplementedWWApiServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") -} -func (UnimplementedWWApiServer) mustEmbedUnimplementedWWApiServer() {} -func (UnimplementedWWApiServer) testEmbeddedByValue() {} - -// UnsafeWWApiServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to WWApiServer will -// result in compilation errors. -type UnsafeWWApiServer interface { - mustEmbedUnimplementedWWApiServer() -} - -func RegisterWWApiServer(s grpc.ServiceRegistrar, srv WWApiServer) { - // If the following call pancis, it indicates UnimplementedWWApiServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&WWApi_ServiceDesc, srv) -} - -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).ImageBuild(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_ImageBuild_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).ImageBuild(ctx, req.(*ImageBuildParameter)) - } - return interceptor(ctx, in, info, handler) -} - -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).ImageDelete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_ImageDelete_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).ImageDelete(ctx, req.(*ImageDeleteParameter)) - } - return interceptor(ctx, in, info, handler) -} - -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).ImageCopy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_ImageCopy_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).ImageCopy(ctx, req.(*ImageCopyParameter)) - } - return interceptor(ctx, in, info, handler) -} - -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).ImageImport(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_ImageImport_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).ImageImport(ctx, req.(*ImageImportParameter)) - } - return interceptor(ctx, in, info, handler) -} - -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).ImageList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_ImageList_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).ImageList(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -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).ImageShow(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_ImageShow_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).ImageShow(ctx, req.(*ImageShowParameter)) - } - return interceptor(ctx, in, info, handler) -} - -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).ImageRename(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_ImageRename_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).ImageRename(ctx, req.(*ImageRenameParameter)) - } - return interceptor(ctx, in, info, handler) -} - -func _WWApi_NodeAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeAddParameter) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WWApiServer).NodeAdd(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_NodeAdd_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).NodeAdd(ctx, req.(*NodeAddParameter)) - } - return interceptor(ctx, in, info, handler) -} - -func _WWApi_NodeDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeDeleteParameter) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WWApiServer).NodeDelete(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_NodeDelete_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).NodeDelete(ctx, req.(*NodeDeleteParameter)) - } - return interceptor(ctx, in, info, handler) -} - -func _WWApi_NodeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeNames) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WWApiServer).NodeList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_NodeList_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).NodeList(ctx, req.(*NodeNames)) - } - return interceptor(ctx, in, info, handler) -} - -func _WWApi_NodeSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ConfSetParameter) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WWApiServer).NodeSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_NodeSet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).NodeSet(ctx, req.(*ConfSetParameter)) - } - return interceptor(ctx, in, info, handler) -} - -func _WWApi_NodeStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NodeNames) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WWApiServer).NodeStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_NodeStatus_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).NodeStatus(ctx, req.(*NodeNames)) - } - return interceptor(ctx, in, info, handler) -} - -func _WWApi_Version_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).Version(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WWApi_Version_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WWApiServer).Version(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -// WWApi_ServiceDesc is the grpc.ServiceDesc for WWApi service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var WWApi_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "wwapi.v1.WWApi", - HandlerType: (*WWApiServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ImageBuild", - Handler: _WWApi_ImageBuild_Handler, - }, - { - MethodName: "ImageDelete", - Handler: _WWApi_ImageDelete_Handler, - }, - { - MethodName: "ImageCopy", - Handler: _WWApi_ImageCopy_Handler, - }, - { - MethodName: "ImageImport", - Handler: _WWApi_ImageImport_Handler, - }, - { - MethodName: "ImageList", - Handler: _WWApi_ImageList_Handler, - }, - { - MethodName: "ImageShow", - Handler: _WWApi_ImageShow_Handler, - }, - { - MethodName: "ImageRename", - Handler: _WWApi_ImageRename_Handler, - }, - { - MethodName: "NodeAdd", - Handler: _WWApi_NodeAdd_Handler, - }, - { - MethodName: "NodeDelete", - Handler: _WWApi_NodeDelete_Handler, - }, - { - MethodName: "NodeList", - Handler: _WWApi_NodeList_Handler, - }, - { - MethodName: "NodeSet", - Handler: _WWApi_NodeSet_Handler, - }, - { - MethodName: "NodeStatus", - Handler: _WWApi_NodeStatus_Handler, - }, - { - MethodName: "Version", - Handler: _WWApi_Version_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "routes.proto", -} diff --git a/internal/pkg/image/build.go b/internal/pkg/image/build.go index f9203037..cfa378ad 100644 --- a/internal/pkg/image/build.go +++ b/internal/pkg/image/build.go @@ -15,7 +15,7 @@ func Build(name string, buildForce bool) error { imagePath := ImageFile(name) if !ValidSource(name) { - return fmt.Errorf("Image does not exist: %s", name) + return fmt.Errorf("image does not exist: %s", name) } if !buildForce { diff --git a/internal/pkg/image/delete.go b/internal/pkg/image/delete.go index 2a7cb6bf..f32106fc 100644 --- a/internal/pkg/image/delete.go +++ b/internal/pkg/image/delete.go @@ -67,12 +67,12 @@ func DeleteImage(name string) error { wwlog.Verbose("removing %s for image %s", imageFile+".gz", name) errGz := os.Remove(imageFile + ".gz") if errImg != nil { - return fmt.Errorf("Problems delete %s for image %s: %s", imageFile, name, errImg) + return fmt.Errorf("problem deleting %s for image %s: %s", imageFile, name, errImg) } if errGz != nil { - return fmt.Errorf("Problems delete %s for image %s: %s", imageFile+".gz", name, errGz) + return fmt.Errorf("problem deleting %s for image %s: %s", imageFile+".gz", name, errGz) } return nil } - return fmt.Errorf("Image %s of image %s doesn't exist", imageFile, name) + return fmt.Errorf("image %s of image %s doesn't exist", imageFile, name) } diff --git a/internal/pkg/node/update_test.go b/internal/pkg/node/update_test.go new file mode 100644 index 00000000..cbe90adc --- /dev/null +++ b/internal/pkg/node/update_test.go @@ -0,0 +1,184 @@ +package node + +import ( + "net" + "testing" + + "github.com/stretchr/testify/assert" +) + +// changedSet returns a changed function that reports true for the given flag names. +func changedSet(flags ...string) func(string) bool { + set := make(map[string]bool) + for _, f := range flags { + set[f] = true + } + return func(name string) bool { return set[name] } +} + +func TestUpdateFrom_NoChanges(t *testing.T) { + dst := NewNode("test") + dst.Comment = "original" + dst.ImageName = "centos7" + + src := NewNode("") + src.Comment = "new" + src.ImageName = "rocky9" + + dst.UpdateFrom(&src, changedSet()) + + assert.Equal(t, "original", dst.Comment) + assert.Equal(t, "centos7", dst.ImageName) +} + +func TestUpdateFrom_StringField(t *testing.T) { + dst := NewNode("test") + dst.Comment = "original" + dst.ImageName = "centos7" + + src := NewNode("") + src.Comment = "updated" + src.ImageName = "rocky9" + + dst.UpdateFrom(&src, changedSet("comment")) + + assert.Equal(t, "updated", dst.Comment) + assert.Equal(t, "centos7", dst.ImageName, "unchanged field should be preserved") +} + +func TestUpdateFrom_UndefString(t *testing.T) { + dst := NewNode("test") + dst.Comment = "original" + + src := NewNode("") + src.Comment = "UNDEF" + + dst.UpdateFrom(&src, changedSet("comment")) + + assert.Equal(t, "UNDEF", dst.Comment, "UNDEF should pass through; Flatten during Persist cleans it") +} + +func TestUpdateFrom_SliceField(t *testing.T) { + dst := NewNode("test") + dst.Profiles = []string{"default"} + + src := NewNode("") + src.Profiles = []string{"compute", "gpu"} + + dst.UpdateFrom(&src, changedSet("profile")) + + assert.Equal(t, []string{"compute", "gpu"}, dst.Profiles) +} + +func TestUpdateFrom_SliceFieldUnchanged(t *testing.T) { + dst := NewNode("test") + dst.Profiles = []string{"default"} + + src := NewNode("") + src.Profiles = []string{} + + dst.UpdateFrom(&src, changedSet()) + + assert.Equal(t, []string{"default"}, dst.Profiles, "unchanged slice should be preserved") +} + +func TestUpdateFrom_NestedIpmiField(t *testing.T) { + dst := NewNode("test") + dst.Ipmi = &IpmiConf{UserName: "admin", Port: "623"} + + src := NewNode("") + src.Ipmi = &IpmiConf{UserName: "root"} + + dst.UpdateFrom(&src, changedSet("ipmiuser")) + + assert.Equal(t, "root", dst.Ipmi.UserName) + assert.Equal(t, "623", dst.Ipmi.Port, "unchanged ipmi field should be preserved") +} + +func TestUpdateFrom_NilDstIpmiAutoCreated(t *testing.T) { + dst := NewNode("test") + dst.Ipmi = nil + + src := NewNode("") + src.Ipmi = &IpmiConf{UserName: "admin"} + + dst.UpdateFrom(&src, changedSet("ipmiuser")) + + assert.NotNil(t, dst.Ipmi, "nil dst Ipmi should be auto-created") + assert.Equal(t, "admin", dst.Ipmi.UserName) +} + +func TestUpdateFrom_NetDevFieldPreservesOthers(t *testing.T) { + dst := NewNode("test") + dst.NetDevs = map[string]*NetDev{ + "default": { + Ipaddr: net.ParseIP("10.0.0.1"), + Device: "eth0", + }, + } + + src := NewNode("") + src.NetDevs = map[string]*NetDev{ + "default": { + OnBoot: "true", + }, + } + + dst.UpdateFrom(&src, changedSet("onboot")) + + assert.Equal(t, "true", string(dst.NetDevs["default"].OnBoot)) + assert.Equal(t, "10.0.0.1", dst.NetDevs["default"].Ipaddr.String(), "ipaddr should be preserved") + assert.Equal(t, "eth0", dst.NetDevs["default"].Device, "device should be preserved") +} + +func TestUpdateFrom_NetDevNewEntry(t *testing.T) { + dst := NewNode("test") + dst.NetDevs = map[string]*NetDev{ + "default": {Ipaddr: net.ParseIP("10.0.0.1")}, + } + + src := NewNode("") + src.NetDevs = map[string]*NetDev{ + "secondary": { + Device: "eth1", + }, + } + + dst.UpdateFrom(&src, changedSet("netdev")) + + assert.Contains(t, dst.NetDevs, "default", "existing entry should be preserved") + assert.Contains(t, dst.NetDevs, "secondary", "new entry should be created") + assert.Equal(t, "eth1", dst.NetDevs["secondary"].Device) + assert.Equal(t, "10.0.0.1", dst.NetDevs["default"].Ipaddr.String()) +} + +func TestUpdateFrom_MultipleFields(t *testing.T) { + dst := NewNode("test") + dst.Comment = "old" + dst.ImageName = "centos7" + dst.Ipmi = &IpmiConf{UserName: "admin", Port: "623"} + + src := NewNode("") + src.Comment = "new" + src.ImageName = "rocky9" + src.Ipmi = &IpmiConf{UserName: "root"} + + dst.UpdateFrom(&src, changedSet("comment", "image", "ipmiuser")) + + assert.Equal(t, "new", dst.Comment) + assert.Equal(t, "rocky9", dst.ImageName) + assert.Equal(t, "root", dst.Ipmi.UserName) + assert.Equal(t, "623", dst.Ipmi.Port, "unchanged ipmi field should be preserved") +} + +func TestUpdateProfileFrom_BasicField(t *testing.T) { + dst := NewProfile("test") + dst.Comment = "original" + + src := NewProfile("") + src.Comment = "updated" + + dst.UpdateFrom(&src, changedSet("comment")) + + assert.Equal(t, "updated", dst.Comment) +} diff --git a/internal/pkg/version/version.go b/internal/pkg/version/version.go index d38e9aed..c8e00b15 100644 --- a/internal/pkg/version/version.go +++ b/internal/pkg/version/version.go @@ -3,24 +3,12 @@ package version import ( "fmt" - "github.com/warewulf/warewulf/internal/pkg/api/routes/wwapiv1" warewulfconf "github.com/warewulf/warewulf/internal/pkg/config" ) /* Return the version of wwctl */ -func GetVersion() string { +func Version() string { return fmt.Sprintf("%s-%s", warewulfconf.Version, warewulfconf.Release) } - -/* -Returns the version of the api via grpc -*/ -func Version() (versionResponse *wwapiv1.VersionResponse) { - versionResponse = &wwapiv1.VersionResponse{} - versionResponse.ApiPrefix = "rc1" - versionResponse.ApiVersion = "1" - versionResponse.WarewulfVersion = GetVersion() - return -} diff --git a/internal/pkg/warewulfd/api/api.go b/internal/pkg/warewulfd/api/api.go index cc16031d..be73e1e2 100644 --- a/internal/pkg/warewulfd/api/api.go +++ b/internal/pkg/warewulfd/api/api.go @@ -19,7 +19,7 @@ func Handler(auth *config.Authentication, allowedNets []net.IPNet) *web.Service api.OpenAPISchema().SetTitle("Warewulf v4 API") api.OpenAPISchema().SetDescription("This service provides an API to a Warewulf v4 server.") - api.OpenAPISchema().SetVersion(version.GetVersion()) + api.OpenAPISchema().SetVersion(version.Version()) api.Route("/api/nodes", func(r chi.Router) { r.Group(func(r chi.Router) {