From 0fa22540d1b7df650a777596c47f9183f4850b85 Mon Sep 17 00:00:00 2001 From: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com> Date: Wed, 19 Aug 2026 17:36:59 -0400 Subject: [PATCH 1/3] OSAC-4109: wire real fulfillment VolumeClient into OSAC CSI driver Replace the in-memory volume stub with a real gRPC VolumeClient backed by the fulfillment-service private Volumes API, so a PVC on the hub drives a real OSAC Volume record end to end. Generate a scoped copy of the private Volumes gRPC client into the driver module, limited to the Volumes service and its import closure (volume, metadata, storage-common types) rather than the whole private API, since the driver only consumes Volumes. A module cannot import another module's internal/api, so the driver generates its own copy (mirrors the osac-operator buf setup). The client maps CreateVolumeParams to a private Volume (metadata.name set to the PVC ref so a retried create resolves via list, metadata.tenant for server-side scoping, spec tier/size/access-mode), converts CSI access modes to the proto enum, and lists by metadata.name via a CEL filter. Create returns CREATING and the existing controller polls to AVAILABLE; the vendor-side provisioning is performed asynchronously by the operator (OSAC-4138), so this client never dials a vendor. Attach/publish still uses the stub (out of scope). Unit tests cover request/response mapping, the name filter, error propagation, and the byte/access-mode/state/protocol conversions against a fake Volumes gRPC client. Assisted-by: Claude Code Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com> --- osac-csi-driver/buf.gen.yaml | 50 + osac-csi-driver/cmd/osac-csi-driver/main.go | 16 +- osac-csi-driver/go.mod | 4 +- osac-csi-driver/go.sum | 8 +- .../api/osac/private/v1/metadata_type.pb.go | 489 +++++++ .../v1/metadata_type_protoopaque.pb.go | 438 ++++++ .../osac/private/v1/storage_common_type.pb.go | 151 +++ .../v1/storage_common_type_protoopaque.pb.go | 151 +++ .../api/osac/private/v1/volume_type.pb.go | 703 ++++++++++ .../private/v1/volume_type_protoopaque.pb.go | 696 ++++++++++ .../api/osac/private/v1/volumes_service.pb.go | 1174 +++++++++++++++++ .../private/v1/volumes_service_grpc.pb.go | 338 +++++ .../v1/volumes_service_protoopaque.pb.go | 1170 ++++++++++++++++ .../pkg/fulfillment/grpc_client.go | 189 +++ .../pkg/fulfillment/grpc_client_test.go | 280 ++++ 15 files changed, 5848 insertions(+), 9 deletions(-) create mode 100644 osac-csi-driver/buf.gen.yaml create mode 100644 osac-csi-driver/internal/api/osac/private/v1/metadata_type.pb.go create mode 100644 osac-csi-driver/internal/api/osac/private/v1/metadata_type_protoopaque.pb.go create mode 100644 osac-csi-driver/internal/api/osac/private/v1/storage_common_type.pb.go create mode 100644 osac-csi-driver/internal/api/osac/private/v1/storage_common_type_protoopaque.pb.go create mode 100644 osac-csi-driver/internal/api/osac/private/v1/volume_type.pb.go create mode 100644 osac-csi-driver/internal/api/osac/private/v1/volume_type_protoopaque.pb.go create mode 100644 osac-csi-driver/internal/api/osac/private/v1/volumes_service.pb.go create mode 100644 osac-csi-driver/internal/api/osac/private/v1/volumes_service_grpc.pb.go create mode 100644 osac-csi-driver/internal/api/osac/private/v1/volumes_service_protoopaque.pb.go create mode 100644 osac-csi-driver/pkg/fulfillment/grpc_client.go create mode 100644 osac-csi-driver/pkg/fulfillment/grpc_client_test.go diff --git a/osac-csi-driver/buf.gen.yaml b/osac-csi-driver/buf.gen.yaml new file mode 100644 index 0000000000..cb42c1df3f --- /dev/null +++ b/osac-csi-driver/buf.gen.yaml @@ -0,0 +1,50 @@ +# +# Copyright (c) 2025 Red Hat Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +# specific language governing permissions and limitations under the License. +# + +version: v2 + +managed: + enabled: true + override: + - file_option: go_package_prefix + value: github.com/osac-project/osac/osac-csi-driver/internal/api + disable: + - module: buf.build/googleapis/googleapis + - module: buf.build/grpc-ecosystem/grpc-gateway + - module: buf.build/bufbuild/protovalidate + +# The CSI driver only consumes the private Volumes service, so generation is +# scoped to that service and its import closure (volume + metadata + storage +# common types) rather than the whole private API. Keep this list in sync with +# the imports of volumes_service.proto / volume_type.proto if they change. +inputs: + +- directory: ../fulfillment-service/proto/private + paths: + - ../fulfillment-service/proto/private/osac/private/v1/volumes_service.proto + - ../fulfillment-service/proto/private/osac/private/v1/volume_type.proto + - ../fulfillment-service/proto/private/osac/private/v1/metadata_type.proto + - ../fulfillment-service/proto/private/osac/private/v1/storage_common_type.proto + +plugins: + +- remote: buf.build/protocolbuffers/go:v1.36.5 + out: internal/api + opt: + - paths=source_relative + - default_api_level=API_HYBRID + +- remote: buf.build/grpc/go:v1.5.1 + out: internal/api + opt: + - paths=source_relative diff --git a/osac-csi-driver/cmd/osac-csi-driver/main.go b/osac-csi-driver/cmd/osac-csi-driver/main.go index 5cd8382c45..fa4187364b 100644 --- a/osac-csi-driver/cmd/osac-csi-driver/main.go +++ b/osac-csi-driver/cmd/osac-csi-driver/main.go @@ -58,19 +58,23 @@ func main() { var controlPlaneClient fulfillment.ControlPlaneClient if *fulfillmentEndpoint != "" { - // Establish the gRPC connection to the fulfillment-service. - // TODO(OSAC-2872): use the connection to create real VolumeClient - // and ControlPlaneClient once the Volume API is implemented. + // Establish the gRPC connection to the fulfillment-service and back the + // real VolumeClient with it. The connection carries transport + // credentials and the per-RPC bearer token (see dialFulfillment). conn, err := dialFulfillment(*fulfillmentEndpoint, *grpcInsecure, *fulfillmentTokenFile) if err != nil { klog.Fatalf("Failed to connect to fulfillment-service: %v", err) } defer func() { _ = conn.Close() }() - klog.Infof("Fulfillment endpoint: %s (connected, using stubs until Volume API is implemented)", *fulfillmentEndpoint) + klog.Infof("Fulfillment endpoint: %s (connected)", *fulfillmentEndpoint) + volumeClient = fulfillment.NewVolumeClient(conn) } else { - klog.Infof("No fulfillment endpoint configured, using in-memory stubs") + klog.Infof("No fulfillment endpoint configured, using in-memory volume stub") + volumeClient = fulfillment.NewVolumeStub("default-backend", "nfs") } - volumeClient = fulfillment.NewVolumeStub("default-backend", "nfs") + + // Attach/publish still goes through the stub; the control-plane attach API + // is out of scope for OSAC-4109 (tracked separately in OSAC-3278/OSAC-4187). controlPlaneClient = &fulfillment.ControlPlaneStub{} d, err := driver.NewDriver( diff --git a/osac-csi-driver/go.mod b/osac-csi-driver/go.mod index 28eacf3bbc..54255af365 100644 --- a/osac-csi-driver/go.mod +++ b/osac-csi-driver/go.mod @@ -3,11 +3,13 @@ module github.com/osac-project/osac/osac-csi-driver go 1.26.3 require ( + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.12-20260709200747-435963d16310.1 github.com/container-storage-interface/spec v1.12.0 github.com/kubernetes-csi/csi-test/v5 v5.5.0 golang.org/x/oauth2 v0.36.0 + google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa google.golang.org/grpc v1.83.0 - google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af + google.golang.org/protobuf v1.36.12 k8s.io/klog/v2 v2.140.0 ) diff --git a/osac-csi-driver/go.sum b/osac-csi-driver/go.sum index 4202007a1d..6dd1a6d26d 100644 --- a/osac-csi-driver/go.sum +++ b/osac-csi-driver/go.sum @@ -1,3 +1,5 @@ +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.12-20260709200747-435963d16310.1 h1:6nlcxMOui23ZRVAfJM451duu79P1npA5JRdZqMilrrQ= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.12-20260709200747-435963d16310.1/go.mod h1:TCt1lluMFnctISJXvkIQ4x3ABrPuUKCWKyjKdkJNBpw= cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= github.com/Masterminds/semver/v3 v3.5.0 h1:kQceYJfbupGfZOKZQg0kou0DgAKhzDg2NZPAwZ/2OOE= @@ -95,12 +97,14 @@ golang.org/x/tools v0.47.0 h1:7Kn5x/d1svx/PzryTsqeoZN4TZwqeH5pGWjefhLi/1Q= golang.org/x/tools v0.47.0/go.mod h1:dFHnyTvFWY212G+h7ZY4Vsp/K3U4/7W9TyVaAul8uCA= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= +google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa h1:Kjn0N0tCrDgiAFW+lGO4JZ3ck44CehvJQMAwj9QF0G8= +google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:q4lMZS6kskjT5HvCPrnnypcDPVJqT/f4nfxmkE7gryY= google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/grpc v1.83.0 h1:JeNZEKJFbQxArAMl+hiytHauacDNqJUllNfmIMmpqnQ= google.golang.org/grpc v1.83.0/go.mod h1:kDyl6SKsiHKt0uylY5gtn5cEjkrIOhQOGDgIc4JGwzQ= -google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI= -google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/osac-csi-driver/internal/api/osac/private/v1/metadata_type.pb.go b/osac-csi-driver/internal/api/osac/private/v1/metadata_type.pb.go new file mode 100644 index 0000000000..1f8f434e33 --- /dev/null +++ b/osac-csi-driver/internal/api/osac/private/v1/metadata_type.pb.go @@ -0,0 +1,489 @@ +// +// Copyright (c) 2025 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc (unknown) +// source: osac/private/v1/metadata_type.proto + +//go:build !protoopaque + +package privatev1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + 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) +) + +// Metadata common to all kinds of objects. +type Metadata struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Time of creation of the object. + CreationTimestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=creation_timestamp,json=creationTimestamp,proto3" json:"creation_timestamp,omitempty"` + // Time of deletion of the object. + DeletionTimestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=deletion_timestamp,json=deletionTimestamp,proto3" json:"deletion_timestamp,omitempty"` + // Finalizers indicate tasks that need to be completed before the object can be completely deleted. When the object + // has been deleted and this list is empty the system will automatically archive the object. + Finalizers []string `protobuf:"bytes,3,rep,name=finalizers,proto3" json:"finalizers,omitempty"` + // Creator contains the identifier of the user or group that created the object. + Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` + // Tenant contains the identifier of the tenant that the object belongs to. + Tenant string `protobuf:"bytes,5,opt,name=tenant,proto3" json:"tenant,omitempty"` + // Mandatory, immutable, and unique within scope. Must be a valid RFC 1123 DNS label. + // + // Has the same restrictions as DNS labels, as described in RFC 1123: + // + // - Must be between 1 and 63 characters long. + // - Must only contain lowercase letters (a-z), digits (0-9) and hyphens (-). + // - Must start and end with an alphanumeric character. + Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` + // Labels contains key-value pairs for organizing and selecting objects. + // + // Keys consist of an optional prefix and a name separated by '/': + // + // - Prefix is a DNS subdomain (RFC 1035) and must be between 1 and 253 characters long. + // - Name must be between 1 and 63 characters long, start and end with an alphanumeric character, and contain only + // letters (a-z), digits (0-9), '-' '_' or '.'. + // + // Values are optional; when present they must be between 0 and 63 characters long and follow the same character + // rules as names. + // + // Labels are indexed and searchable. + Labels map[string]string `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Annotations contains arbitrary metadata for objects. + // + // Keys follow the same rules as label keys, including the optional DNS subdomain prefix and the 1-63 character name + // restrictions. Values can be any string. + Annotations map[string]string `protobuf:"bytes,8,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Version is a numeric field that is automatically incremented with every change to the object. + Version int32 `protobuf:"varint,9,opt,name=version,proto3" json:"version,omitempty"` + // Full name of the project that the object is assigned to. It can be empty, which means the object belongs to + // the default project of the tenant. + // + // When not empty, the value is a dot-separated path of labels representing a hierarchy of projects. For example, + // `team-a.frontend.staging` represents a project nested three levels deep. + // + // Each label in the path has the same restrictions as DNS labels, as described in RFC 1035: + // + // - Must be between 1 and 63 characters long. + // - Must only contain letters (a-z), digits (0-9) and hyphens (-). + // - It isn't case sensitive. + // + // For project objects this field represents the parent project. For example, if a project named `frontend` has + // this field set to `team-a`, it means that `frontend` is a child of the `team-a` project, and its full name is + // `team-a.frontend`. + // + // For organization objects this field is always empty, as organizations don't belong to a project. + Project string `protobuf:"bytes,10,opt,name=project,proto3" json:"project,omitempty"` + // Human-friendly display name. Optional, not unique, mutable. + // Not constrained to DNS-label format. + DisplayName string `protobuf:"bytes,11,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + // Optional human-friendly description. Opaque string; clients may + // treat content as Markdown. Not unique, mutable. + Description string `protobuf:"bytes,12,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Metadata) Reset() { + *x = Metadata{} + mi := &file_osac_private_v1_metadata_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metadata) ProtoMessage() {} + +func (x *Metadata) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_metadata_type_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) +} + +func (x *Metadata) GetCreationTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.CreationTimestamp + } + return nil +} + +func (x *Metadata) GetDeletionTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.DeletionTimestamp + } + return nil +} + +func (x *Metadata) GetFinalizers() []string { + if x != nil { + return x.Finalizers + } + return nil +} + +func (x *Metadata) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *Metadata) GetTenant() string { + if x != nil { + return x.Tenant + } + return "" +} + +func (x *Metadata) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Metadata) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *Metadata) GetAnnotations() map[string]string { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *Metadata) GetVersion() int32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *Metadata) GetProject() string { + if x != nil { + return x.Project + } + return "" +} + +func (x *Metadata) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Metadata) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Metadata) SetCreationTimestamp(v *timestamppb.Timestamp) { + x.CreationTimestamp = v +} + +func (x *Metadata) SetDeletionTimestamp(v *timestamppb.Timestamp) { + x.DeletionTimestamp = v +} + +func (x *Metadata) SetFinalizers(v []string) { + x.Finalizers = v +} + +func (x *Metadata) SetCreator(v string) { + x.Creator = v +} + +func (x *Metadata) SetTenant(v string) { + x.Tenant = v +} + +func (x *Metadata) SetName(v string) { + x.Name = v +} + +func (x *Metadata) SetLabels(v map[string]string) { + x.Labels = v +} + +func (x *Metadata) SetAnnotations(v map[string]string) { + x.Annotations = v +} + +func (x *Metadata) SetVersion(v int32) { + x.Version = v +} + +func (x *Metadata) SetProject(v string) { + x.Project = v +} + +func (x *Metadata) SetDisplayName(v string) { + x.DisplayName = v +} + +func (x *Metadata) SetDescription(v string) { + x.Description = v +} + +func (x *Metadata) HasCreationTimestamp() bool { + if x == nil { + return false + } + return x.CreationTimestamp != nil +} + +func (x *Metadata) HasDeletionTimestamp() bool { + if x == nil { + return false + } + return x.DeletionTimestamp != nil +} + +func (x *Metadata) ClearCreationTimestamp() { + x.CreationTimestamp = nil +} + +func (x *Metadata) ClearDeletionTimestamp() { + x.DeletionTimestamp = nil +} + +type Metadata_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Time of creation of the object. + CreationTimestamp *timestamppb.Timestamp + // Time of deletion of the object. + DeletionTimestamp *timestamppb.Timestamp + // Finalizers indicate tasks that need to be completed before the object can be completely deleted. When the object + // has been deleted and this list is empty the system will automatically archive the object. + Finalizers []string + // Creator contains the identifier of the user or group that created the object. + Creator string + // Tenant contains the identifier of the tenant that the object belongs to. + Tenant string + // Mandatory, immutable, and unique within scope. Must be a valid RFC 1123 DNS label. + // + // Has the same restrictions as DNS labels, as described in RFC 1123: + // + // - Must be between 1 and 63 characters long. + // - Must only contain lowercase letters (a-z), digits (0-9) and hyphens (-). + // - Must start and end with an alphanumeric character. + Name string + // Labels contains key-value pairs for organizing and selecting objects. + // + // Keys consist of an optional prefix and a name separated by '/': + // + // - Prefix is a DNS subdomain (RFC 1035) and must be between 1 and 253 characters long. + // - Name must be between 1 and 63 characters long, start and end with an alphanumeric character, and contain only + // letters (a-z), digits (0-9), '-' '_' or '.'. + // + // Values are optional; when present they must be between 0 and 63 characters long and follow the same character + // rules as names. + // + // Labels are indexed and searchable. + Labels map[string]string + // Annotations contains arbitrary metadata for objects. + // + // Keys follow the same rules as label keys, including the optional DNS subdomain prefix and the 1-63 character name + // restrictions. Values can be any string. + Annotations map[string]string + // Version is a numeric field that is automatically incremented with every change to the object. + Version int32 + // Full name of the project that the object is assigned to. It can be empty, which means the object belongs to + // the default project of the tenant. + // + // When not empty, the value is a dot-separated path of labels representing a hierarchy of projects. For example, + // `team-a.frontend.staging` represents a project nested three levels deep. + // + // Each label in the path has the same restrictions as DNS labels, as described in RFC 1035: + // + // - Must be between 1 and 63 characters long. + // - Must only contain letters (a-z), digits (0-9) and hyphens (-). + // - It isn't case sensitive. + // + // For project objects this field represents the parent project. For example, if a project named `frontend` has + // this field set to `team-a`, it means that `frontend` is a child of the `team-a` project, and its full name is + // `team-a.frontend`. + // + // For organization objects this field is always empty, as organizations don't belong to a project. + Project string + // Human-friendly display name. Optional, not unique, mutable. + // Not constrained to DNS-label format. + DisplayName string + // Optional human-friendly description. Opaque string; clients may + // treat content as Markdown. Not unique, mutable. + Description string +} + +func (b0 Metadata_builder) Build() *Metadata { + m0 := &Metadata{} + b, x := &b0, m0 + _, _ = b, x + x.CreationTimestamp = b.CreationTimestamp + x.DeletionTimestamp = b.DeletionTimestamp + x.Finalizers = b.Finalizers + x.Creator = b.Creator + x.Tenant = b.Tenant + x.Name = b.Name + x.Labels = b.Labels + x.Annotations = b.Annotations + x.Version = b.Version + x.Project = b.Project + x.DisplayName = b.DisplayName + x.Description = b.Description + return m0 +} + +var File_osac_private_v1_metadata_type_proto protoreflect.FileDescriptor + +var file_osac_private_v1_metadata_type_proto_rawDesc = string([]byte{ + 0x0a, 0x23, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x05, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x49, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x49, 0x0a, 0x12, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xba, 0x48, 0x2c, 0x72, 0x2a, 0x10, 0x01, + 0x18, 0x3f, 0x32, 0x24, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x28, 0x5b, 0x61, + 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, + 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, + 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x4c, 0x0a, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x2a, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x3f, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0x80, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 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, 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, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 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, 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, 0x42, 0xdd, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x73, 0x61, 0x63, + 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x6f, 0x73, + 0x61, 0x63, 0x2d, 0x63, 0x73, 0x69, 0x2d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x50, 0x58, 0xaa, 0x02, 0x0f, 0x4f, 0x73, 0x61, + 0x63, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, + 0x73, 0x61, 0x63, 0x5c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1c, 0x4f, 0x73, 0x61, 0x63, 0x5c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x11, 0x4f, 0x73, 0x61, 0x63, 0x3a, 0x3a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var file_osac_private_v1_metadata_type_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_osac_private_v1_metadata_type_proto_goTypes = []any{ + (*Metadata)(nil), // 0: osac.private.v1.Metadata + nil, // 1: osac.private.v1.Metadata.LabelsEntry + nil, // 2: osac.private.v1.Metadata.AnnotationsEntry + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp +} +var file_osac_private_v1_metadata_type_proto_depIdxs = []int32{ + 3, // 0: osac.private.v1.Metadata.creation_timestamp:type_name -> google.protobuf.Timestamp + 3, // 1: osac.private.v1.Metadata.deletion_timestamp:type_name -> google.protobuf.Timestamp + 1, // 2: osac.private.v1.Metadata.labels:type_name -> osac.private.v1.Metadata.LabelsEntry + 2, // 3: osac.private.v1.Metadata.annotations:type_name -> osac.private.v1.Metadata.AnnotationsEntry + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_osac_private_v1_metadata_type_proto_init() } +func file_osac_private_v1_metadata_type_proto_init() { + if File_osac_private_v1_metadata_type_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_osac_private_v1_metadata_type_proto_rawDesc), len(file_osac_private_v1_metadata_type_proto_rawDesc)), + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_osac_private_v1_metadata_type_proto_goTypes, + DependencyIndexes: file_osac_private_v1_metadata_type_proto_depIdxs, + MessageInfos: file_osac_private_v1_metadata_type_proto_msgTypes, + }.Build() + File_osac_private_v1_metadata_type_proto = out.File + file_osac_private_v1_metadata_type_proto_goTypes = nil + file_osac_private_v1_metadata_type_proto_depIdxs = nil +} diff --git a/osac-csi-driver/internal/api/osac/private/v1/metadata_type_protoopaque.pb.go b/osac-csi-driver/internal/api/osac/private/v1/metadata_type_protoopaque.pb.go new file mode 100644 index 0000000000..09fbc2385b --- /dev/null +++ b/osac-csi-driver/internal/api/osac/private/v1/metadata_type_protoopaque.pb.go @@ -0,0 +1,438 @@ +// +// Copyright (c) 2025 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc (unknown) +// source: osac/private/v1/metadata_type.proto + +//go:build protoopaque + +package privatev1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + 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) +) + +// Metadata common to all kinds of objects. +type Metadata struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_CreationTimestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=creation_timestamp,json=creationTimestamp,proto3"` + xxx_hidden_DeletionTimestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=deletion_timestamp,json=deletionTimestamp,proto3"` + xxx_hidden_Finalizers []string `protobuf:"bytes,3,rep,name=finalizers,proto3"` + xxx_hidden_Creator string `protobuf:"bytes,4,opt,name=creator,proto3"` + xxx_hidden_Tenant string `protobuf:"bytes,5,opt,name=tenant,proto3"` + xxx_hidden_Name string `protobuf:"bytes,6,opt,name=name,proto3"` + xxx_hidden_Labels map[string]string `protobuf:"bytes,7,rep,name=labels,proto3" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_Annotations map[string]string `protobuf:"bytes,8,rep,name=annotations,proto3" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + xxx_hidden_Version int32 `protobuf:"varint,9,opt,name=version,proto3"` + xxx_hidden_Project string `protobuf:"bytes,10,opt,name=project,proto3"` + xxx_hidden_DisplayName string `protobuf:"bytes,11,opt,name=display_name,json=displayName,proto3"` + xxx_hidden_Description string `protobuf:"bytes,12,opt,name=description,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Metadata) Reset() { + *x = Metadata{} + mi := &file_osac_private_v1_metadata_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Metadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Metadata) ProtoMessage() {} + +func (x *Metadata) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_metadata_type_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) +} + +func (x *Metadata) GetCreationTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.xxx_hidden_CreationTimestamp + } + return nil +} + +func (x *Metadata) GetDeletionTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.xxx_hidden_DeletionTimestamp + } + return nil +} + +func (x *Metadata) GetFinalizers() []string { + if x != nil { + return x.xxx_hidden_Finalizers + } + return nil +} + +func (x *Metadata) GetCreator() string { + if x != nil { + return x.xxx_hidden_Creator + } + return "" +} + +func (x *Metadata) GetTenant() string { + if x != nil { + return x.xxx_hidden_Tenant + } + return "" +} + +func (x *Metadata) GetName() string { + if x != nil { + return x.xxx_hidden_Name + } + return "" +} + +func (x *Metadata) GetLabels() map[string]string { + if x != nil { + return x.xxx_hidden_Labels + } + return nil +} + +func (x *Metadata) GetAnnotations() map[string]string { + if x != nil { + return x.xxx_hidden_Annotations + } + return nil +} + +func (x *Metadata) GetVersion() int32 { + if x != nil { + return x.xxx_hidden_Version + } + return 0 +} + +func (x *Metadata) GetProject() string { + if x != nil { + return x.xxx_hidden_Project + } + return "" +} + +func (x *Metadata) GetDisplayName() string { + if x != nil { + return x.xxx_hidden_DisplayName + } + return "" +} + +func (x *Metadata) GetDescription() string { + if x != nil { + return x.xxx_hidden_Description + } + return "" +} + +func (x *Metadata) SetCreationTimestamp(v *timestamppb.Timestamp) { + x.xxx_hidden_CreationTimestamp = v +} + +func (x *Metadata) SetDeletionTimestamp(v *timestamppb.Timestamp) { + x.xxx_hidden_DeletionTimestamp = v +} + +func (x *Metadata) SetFinalizers(v []string) { + x.xxx_hidden_Finalizers = v +} + +func (x *Metadata) SetCreator(v string) { + x.xxx_hidden_Creator = v +} + +func (x *Metadata) SetTenant(v string) { + x.xxx_hidden_Tenant = v +} + +func (x *Metadata) SetName(v string) { + x.xxx_hidden_Name = v +} + +func (x *Metadata) SetLabels(v map[string]string) { + x.xxx_hidden_Labels = v +} + +func (x *Metadata) SetAnnotations(v map[string]string) { + x.xxx_hidden_Annotations = v +} + +func (x *Metadata) SetVersion(v int32) { + x.xxx_hidden_Version = v +} + +func (x *Metadata) SetProject(v string) { + x.xxx_hidden_Project = v +} + +func (x *Metadata) SetDisplayName(v string) { + x.xxx_hidden_DisplayName = v +} + +func (x *Metadata) SetDescription(v string) { + x.xxx_hidden_Description = v +} + +func (x *Metadata) HasCreationTimestamp() bool { + if x == nil { + return false + } + return x.xxx_hidden_CreationTimestamp != nil +} + +func (x *Metadata) HasDeletionTimestamp() bool { + if x == nil { + return false + } + return x.xxx_hidden_DeletionTimestamp != nil +} + +func (x *Metadata) ClearCreationTimestamp() { + x.xxx_hidden_CreationTimestamp = nil +} + +func (x *Metadata) ClearDeletionTimestamp() { + x.xxx_hidden_DeletionTimestamp = nil +} + +type Metadata_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Time of creation of the object. + CreationTimestamp *timestamppb.Timestamp + // Time of deletion of the object. + DeletionTimestamp *timestamppb.Timestamp + // Finalizers indicate tasks that need to be completed before the object can be completely deleted. When the object + // has been deleted and this list is empty the system will automatically archive the object. + Finalizers []string + // Creator contains the identifier of the user or group that created the object. + Creator string + // Tenant contains the identifier of the tenant that the object belongs to. + Tenant string + // Mandatory, immutable, and unique within scope. Must be a valid RFC 1123 DNS label. + // + // Has the same restrictions as DNS labels, as described in RFC 1123: + // + // - Must be between 1 and 63 characters long. + // - Must only contain lowercase letters (a-z), digits (0-9) and hyphens (-). + // - Must start and end with an alphanumeric character. + Name string + // Labels contains key-value pairs for organizing and selecting objects. + // + // Keys consist of an optional prefix and a name separated by '/': + // + // - Prefix is a DNS subdomain (RFC 1035) and must be between 1 and 253 characters long. + // - Name must be between 1 and 63 characters long, start and end with an alphanumeric character, and contain only + // letters (a-z), digits (0-9), '-' '_' or '.'. + // + // Values are optional; when present they must be between 0 and 63 characters long and follow the same character + // rules as names. + // + // Labels are indexed and searchable. + Labels map[string]string + // Annotations contains arbitrary metadata for objects. + // + // Keys follow the same rules as label keys, including the optional DNS subdomain prefix and the 1-63 character name + // restrictions. Values can be any string. + Annotations map[string]string + // Version is a numeric field that is automatically incremented with every change to the object. + Version int32 + // Full name of the project that the object is assigned to. It can be empty, which means the object belongs to + // the default project of the tenant. + // + // When not empty, the value is a dot-separated path of labels representing a hierarchy of projects. For example, + // `team-a.frontend.staging` represents a project nested three levels deep. + // + // Each label in the path has the same restrictions as DNS labels, as described in RFC 1035: + // + // - Must be between 1 and 63 characters long. + // - Must only contain letters (a-z), digits (0-9) and hyphens (-). + // - It isn't case sensitive. + // + // For project objects this field represents the parent project. For example, if a project named `frontend` has + // this field set to `team-a`, it means that `frontend` is a child of the `team-a` project, and its full name is + // `team-a.frontend`. + // + // For organization objects this field is always empty, as organizations don't belong to a project. + Project string + // Human-friendly display name. Optional, not unique, mutable. + // Not constrained to DNS-label format. + DisplayName string + // Optional human-friendly description. Opaque string; clients may + // treat content as Markdown. Not unique, mutable. + Description string +} + +func (b0 Metadata_builder) Build() *Metadata { + m0 := &Metadata{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_CreationTimestamp = b.CreationTimestamp + x.xxx_hidden_DeletionTimestamp = b.DeletionTimestamp + x.xxx_hidden_Finalizers = b.Finalizers + x.xxx_hidden_Creator = b.Creator + x.xxx_hidden_Tenant = b.Tenant + x.xxx_hidden_Name = b.Name + x.xxx_hidden_Labels = b.Labels + x.xxx_hidden_Annotations = b.Annotations + x.xxx_hidden_Version = b.Version + x.xxx_hidden_Project = b.Project + x.xxx_hidden_DisplayName = b.DisplayName + x.xxx_hidden_Description = b.Description + return m0 +} + +var File_osac_private_v1_metadata_type_proto protoreflect.FileDescriptor + +var file_osac_private_v1_metadata_type_proto_rawDesc = string([]byte{ + 0x0a, 0x23, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x05, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x49, 0x0a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x49, 0x0a, 0x12, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xba, 0x48, 0x2c, 0x72, 0x2a, 0x10, 0x01, + 0x18, 0x3f, 0x32, 0x24, 0x5e, 0x5b, 0x61, 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x28, 0x5b, 0x61, + 0x2d, 0x7a, 0x30, 0x2d, 0x39, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, + 0x7a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3d, + 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x4c, 0x0a, + 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x2a, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x18, 0x3f, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x08, 0xba, 0x48, 0x05, 0x72, 0x03, 0x18, 0x80, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 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, 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, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 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, 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, 0x42, 0xdd, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x11, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x73, 0x61, 0x63, + 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x6f, 0x73, + 0x61, 0x63, 0x2d, 0x63, 0x73, 0x69, 0x2d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x50, 0x58, 0xaa, 0x02, 0x0f, 0x4f, 0x73, 0x61, + 0x63, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, + 0x73, 0x61, 0x63, 0x5c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1c, 0x4f, 0x73, 0x61, 0x63, 0x5c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x11, 0x4f, 0x73, 0x61, 0x63, 0x3a, 0x3a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var file_osac_private_v1_metadata_type_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_osac_private_v1_metadata_type_proto_goTypes = []any{ + (*Metadata)(nil), // 0: osac.private.v1.Metadata + nil, // 1: osac.private.v1.Metadata.LabelsEntry + nil, // 2: osac.private.v1.Metadata.AnnotationsEntry + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp +} +var file_osac_private_v1_metadata_type_proto_depIdxs = []int32{ + 3, // 0: osac.private.v1.Metadata.creation_timestamp:type_name -> google.protobuf.Timestamp + 3, // 1: osac.private.v1.Metadata.deletion_timestamp:type_name -> google.protobuf.Timestamp + 1, // 2: osac.private.v1.Metadata.labels:type_name -> osac.private.v1.Metadata.LabelsEntry + 2, // 3: osac.private.v1.Metadata.annotations:type_name -> osac.private.v1.Metadata.AnnotationsEntry + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_osac_private_v1_metadata_type_proto_init() } +func file_osac_private_v1_metadata_type_proto_init() { + if File_osac_private_v1_metadata_type_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_osac_private_v1_metadata_type_proto_rawDesc), len(file_osac_private_v1_metadata_type_proto_rawDesc)), + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_osac_private_v1_metadata_type_proto_goTypes, + DependencyIndexes: file_osac_private_v1_metadata_type_proto_depIdxs, + MessageInfos: file_osac_private_v1_metadata_type_proto_msgTypes, + }.Build() + File_osac_private_v1_metadata_type_proto = out.File + file_osac_private_v1_metadata_type_proto_goTypes = nil + file_osac_private_v1_metadata_type_proto_depIdxs = nil +} diff --git a/osac-csi-driver/internal/api/osac/private/v1/storage_common_type.pb.go b/osac-csi-driver/internal/api/osac/private/v1/storage_common_type.pb.go new file mode 100644 index 0000000000..7c3c32fca5 --- /dev/null +++ b/osac-csi-driver/internal/api/osac/private/v1/storage_common_type.pb.go @@ -0,0 +1,151 @@ +// +// Copyright (c) 2026 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc (unknown) +// source: osac/private/v1/storage_common_type.proto + +//go:build !protoopaque + +package privatev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + 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) +) + +// Identifies the storage protocol used by storage backends and volumes. +type StorageProtocol int32 + +const ( + // Protocol is unknown or has not been specified. + StorageProtocol_STORAGE_PROTOCOL_UNSPECIFIED StorageProtocol = 0 + // NFS (Network File System) protocol for file-based storage access. + StorageProtocol_STORAGE_PROTOCOL_NFS StorageProtocol = 1 + // Block storage protocol for volume-based storage access. + StorageProtocol_STORAGE_PROTOCOL_BLOCK StorageProtocol = 2 +) + +// Enum value maps for StorageProtocol. +var ( + StorageProtocol_name = map[int32]string{ + 0: "STORAGE_PROTOCOL_UNSPECIFIED", + 1: "STORAGE_PROTOCOL_NFS", + 2: "STORAGE_PROTOCOL_BLOCK", + } + StorageProtocol_value = map[string]int32{ + "STORAGE_PROTOCOL_UNSPECIFIED": 0, + "STORAGE_PROTOCOL_NFS": 1, + "STORAGE_PROTOCOL_BLOCK": 2, + } +) + +func (x StorageProtocol) Enum() *StorageProtocol { + p := new(StorageProtocol) + *p = x + return p +} + +func (x StorageProtocol) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StorageProtocol) Descriptor() protoreflect.EnumDescriptor { + return file_osac_private_v1_storage_common_type_proto_enumTypes[0].Descriptor() +} + +func (StorageProtocol) Type() protoreflect.EnumType { + return &file_osac_private_v1_storage_common_type_proto_enumTypes[0] +} + +func (x StorageProtocol) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +var File_osac_private_v1_storage_common_type_proto protoreflect.FileDescriptor + +var file_osac_private_v1_storage_common_type_proto_rawDesc = string([]byte{ + 0x0a, 0x29, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6f, 0x73, 0x61, + 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2a, 0x69, 0x0a, 0x0f, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, + 0x20, 0x0a, 0x1c, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, + 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x4f, + 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x4e, 0x46, 0x53, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x53, + 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, + 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x02, 0x42, 0xe2, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, + 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, + 0x16, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x63, 0x73, 0x69, + 0x2d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x4f, 0x50, 0x58, 0xaa, 0x02, 0x0f, 0x4f, 0x73, 0x61, 0x63, 0x2e, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x73, 0x61, 0x63, 0x5c, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x73, 0x61, 0x63, + 0x5c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4f, 0x73, 0x61, 0x63, 0x3a, + 0x3a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +}) + +var file_osac_private_v1_storage_common_type_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_osac_private_v1_storage_common_type_proto_goTypes = []any{ + (StorageProtocol)(0), // 0: osac.private.v1.StorageProtocol +} +var file_osac_private_v1_storage_common_type_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_osac_private_v1_storage_common_type_proto_init() } +func file_osac_private_v1_storage_common_type_proto_init() { + if File_osac_private_v1_storage_common_type_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_osac_private_v1_storage_common_type_proto_rawDesc), len(file_osac_private_v1_storage_common_type_proto_rawDesc)), + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_osac_private_v1_storage_common_type_proto_goTypes, + DependencyIndexes: file_osac_private_v1_storage_common_type_proto_depIdxs, + EnumInfos: file_osac_private_v1_storage_common_type_proto_enumTypes, + }.Build() + File_osac_private_v1_storage_common_type_proto = out.File + file_osac_private_v1_storage_common_type_proto_goTypes = nil + file_osac_private_v1_storage_common_type_proto_depIdxs = nil +} diff --git a/osac-csi-driver/internal/api/osac/private/v1/storage_common_type_protoopaque.pb.go b/osac-csi-driver/internal/api/osac/private/v1/storage_common_type_protoopaque.pb.go new file mode 100644 index 0000000000..b149fd2bf7 --- /dev/null +++ b/osac-csi-driver/internal/api/osac/private/v1/storage_common_type_protoopaque.pb.go @@ -0,0 +1,151 @@ +// +// Copyright (c) 2026 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc (unknown) +// source: osac/private/v1/storage_common_type.proto + +//go:build protoopaque + +package privatev1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + 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) +) + +// Identifies the storage protocol used by storage backends and volumes. +type StorageProtocol int32 + +const ( + // Protocol is unknown or has not been specified. + StorageProtocol_STORAGE_PROTOCOL_UNSPECIFIED StorageProtocol = 0 + // NFS (Network File System) protocol for file-based storage access. + StorageProtocol_STORAGE_PROTOCOL_NFS StorageProtocol = 1 + // Block storage protocol for volume-based storage access. + StorageProtocol_STORAGE_PROTOCOL_BLOCK StorageProtocol = 2 +) + +// Enum value maps for StorageProtocol. +var ( + StorageProtocol_name = map[int32]string{ + 0: "STORAGE_PROTOCOL_UNSPECIFIED", + 1: "STORAGE_PROTOCOL_NFS", + 2: "STORAGE_PROTOCOL_BLOCK", + } + StorageProtocol_value = map[string]int32{ + "STORAGE_PROTOCOL_UNSPECIFIED": 0, + "STORAGE_PROTOCOL_NFS": 1, + "STORAGE_PROTOCOL_BLOCK": 2, + } +) + +func (x StorageProtocol) Enum() *StorageProtocol { + p := new(StorageProtocol) + *p = x + return p +} + +func (x StorageProtocol) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StorageProtocol) Descriptor() protoreflect.EnumDescriptor { + return file_osac_private_v1_storage_common_type_proto_enumTypes[0].Descriptor() +} + +func (StorageProtocol) Type() protoreflect.EnumType { + return &file_osac_private_v1_storage_common_type_proto_enumTypes[0] +} + +func (x StorageProtocol) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +var File_osac_private_v1_storage_common_type_proto protoreflect.FileDescriptor + +var file_osac_private_v1_storage_common_type_proto_rawDesc = string([]byte{ + 0x0a, 0x29, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6f, 0x73, 0x61, + 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2a, 0x69, 0x0a, 0x0f, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, + 0x20, 0x0a, 0x1c, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, + 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x4f, + 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x4e, 0x46, 0x53, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x53, + 0x54, 0x4f, 0x52, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, + 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x10, 0x02, 0x42, 0xe2, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, + 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x42, + 0x16, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x63, 0x73, 0x69, + 0x2d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x4f, 0x50, 0x58, 0xaa, 0x02, 0x0f, 0x4f, 0x73, 0x61, 0x63, 0x2e, 0x50, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x73, 0x61, 0x63, 0x5c, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x73, 0x61, 0x63, + 0x5c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4f, 0x73, 0x61, 0x63, 0x3a, + 0x3a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +}) + +var file_osac_private_v1_storage_common_type_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_osac_private_v1_storage_common_type_proto_goTypes = []any{ + (StorageProtocol)(0), // 0: osac.private.v1.StorageProtocol +} +var file_osac_private_v1_storage_common_type_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_osac_private_v1_storage_common_type_proto_init() } +func file_osac_private_v1_storage_common_type_proto_init() { + if File_osac_private_v1_storage_common_type_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_osac_private_v1_storage_common_type_proto_rawDesc), len(file_osac_private_v1_storage_common_type_proto_rawDesc)), + NumEnums: 1, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_osac_private_v1_storage_common_type_proto_goTypes, + DependencyIndexes: file_osac_private_v1_storage_common_type_proto_depIdxs, + EnumInfos: file_osac_private_v1_storage_common_type_proto_enumTypes, + }.Build() + File_osac_private_v1_storage_common_type_proto = out.File + file_osac_private_v1_storage_common_type_proto_goTypes = nil + file_osac_private_v1_storage_common_type_proto_depIdxs = nil +} diff --git a/osac-csi-driver/internal/api/osac/private/v1/volume_type.pb.go b/osac-csi-driver/internal/api/osac/private/v1/volume_type.pb.go new file mode 100644 index 0000000000..45dd0fb24d --- /dev/null +++ b/osac-csi-driver/internal/api/osac/private/v1/volume_type.pb.go @@ -0,0 +1,703 @@ +// +// Copyright (c) 2026 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc (unknown) +// source: osac/private/v1/volume_type.proto + +//go:build !protoopaque + +package privatev1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + 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) +) + +// Access modes for Volume resources, matching Kubernetes PersistentVolume access modes. +// https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes +type VolumeAccessMode int32 + +const ( + // Access mode is unknown or has not been specified. + VolumeAccessMode_VOLUME_ACCESS_MODE_UNSPECIFIED VolumeAccessMode = 0 + // The volume can be mounted as read-write by a single node. + VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_ONCE VolumeAccessMode = 1 + // The volume can be mounted as read-only by many nodes. + VolumeAccessMode_VOLUME_ACCESS_MODE_READ_ONLY_MANY VolumeAccessMode = 2 + // The volume can be mounted as read-write by many nodes. + VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_MANY VolumeAccessMode = 3 + // The volume can be mounted as read-write by a single pod (requires CSI 1.5+). + VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_ONCE_POD VolumeAccessMode = 4 +) + +// Enum value maps for VolumeAccessMode. +var ( + VolumeAccessMode_name = map[int32]string{ + 0: "VOLUME_ACCESS_MODE_UNSPECIFIED", + 1: "VOLUME_ACCESS_MODE_READ_WRITE_ONCE", + 2: "VOLUME_ACCESS_MODE_READ_ONLY_MANY", + 3: "VOLUME_ACCESS_MODE_READ_WRITE_MANY", + 4: "VOLUME_ACCESS_MODE_READ_WRITE_ONCE_POD", + } + VolumeAccessMode_value = map[string]int32{ + "VOLUME_ACCESS_MODE_UNSPECIFIED": 0, + "VOLUME_ACCESS_MODE_READ_WRITE_ONCE": 1, + "VOLUME_ACCESS_MODE_READ_ONLY_MANY": 2, + "VOLUME_ACCESS_MODE_READ_WRITE_MANY": 3, + "VOLUME_ACCESS_MODE_READ_WRITE_ONCE_POD": 4, + } +) + +func (x VolumeAccessMode) Enum() *VolumeAccessMode { + p := new(VolumeAccessMode) + *p = x + return p +} + +func (x VolumeAccessMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VolumeAccessMode) Descriptor() protoreflect.EnumDescriptor { + return file_osac_private_v1_volume_type_proto_enumTypes[0].Descriptor() +} + +func (VolumeAccessMode) Type() protoreflect.EnumType { + return &file_osac_private_v1_volume_type_proto_enumTypes[0] +} + +func (x VolumeAccessMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Lifecycle states for Volume resources. +type VolumeState int32 + +const ( + // State is unknown or has not been determined yet. + VolumeState_VOLUME_STATE_UNSPECIFIED VolumeState = 0 + // The volume is being provisioned on the storage backend. + VolumeState_VOLUME_STATE_CREATING VolumeState = 1 + // The volume has been provisioned and is ready for use. + VolumeState_VOLUME_STATE_AVAILABLE VolumeState = 2 + // The volume provisioning has permanently failed after max retries and requires admin intervention. + VolumeState_VOLUME_STATE_FAILED VolumeState = 3 + // The volume is being deprovisioned from the storage backend. + VolumeState_VOLUME_STATE_DELETING VolumeState = 4 + // The volume has been fully deprovisioned and the record is archived. + VolumeState_VOLUME_STATE_DELETED VolumeState = 5 +) + +// Enum value maps for VolumeState. +var ( + VolumeState_name = map[int32]string{ + 0: "VOLUME_STATE_UNSPECIFIED", + 1: "VOLUME_STATE_CREATING", + 2: "VOLUME_STATE_AVAILABLE", + 3: "VOLUME_STATE_FAILED", + 4: "VOLUME_STATE_DELETING", + 5: "VOLUME_STATE_DELETED", + } + VolumeState_value = map[string]int32{ + "VOLUME_STATE_UNSPECIFIED": 0, + "VOLUME_STATE_CREATING": 1, + "VOLUME_STATE_AVAILABLE": 2, + "VOLUME_STATE_FAILED": 3, + "VOLUME_STATE_DELETING": 4, + "VOLUME_STATE_DELETED": 5, + } +) + +func (x VolumeState) Enum() *VolumeState { + p := new(VolumeState) + *p = x + return p +} + +func (x VolumeState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VolumeState) Descriptor() protoreflect.EnumDescriptor { + return file_osac_private_v1_volume_type_proto_enumTypes[1].Descriptor() +} + +func (VolumeState) Type() protoreflect.EnumType { + return &file_osac_private_v1_volume_type_proto_enumTypes[1] +} + +func (x VolumeState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Represents a block storage volume managed by the OSAC storage control plane. +// +// Volumes are tenant-scoped resources that represent storage provisioned on a backend storage array +// through the OSAC CSI driver. The fulfillment-service tracks volume inventory in PostgreSQL and +// reconciles Volume CRs on the hub cluster. The osac-operator Volume controller handles vendor +// provisioning via the backend's CSI controller. +// +// Volumes are created through the private API, typically by the OSAC CSI driver in response to a +// PVC on a tenant cluster. The spec captures the user's requested configuration (tier, size, +// access mode), while the status tracks the system-resolved state (vendor volume ID, backend, +// protocol). +type Volume struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Unique identifier of the volume. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Metadata of the volume. + Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Desired configuration of the volume (immutable after creation). + Spec *VolumeSpec `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` + // Current operational status of the volume. + Status *VolumeStatus `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Volume) Reset() { + *x = Volume{} + mi := &file_osac_private_v1_volume_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Volume) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Volume) ProtoMessage() {} + +func (x *Volume) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volume_type_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) +} + +func (x *Volume) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Volume) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Volume) GetSpec() *VolumeSpec { + if x != nil { + return x.Spec + } + return nil +} + +func (x *Volume) GetStatus() *VolumeStatus { + if x != nil { + return x.Status + } + return nil +} + +func (x *Volume) SetId(v string) { + x.Id = v +} + +func (x *Volume) SetMetadata(v *Metadata) { + x.Metadata = v +} + +func (x *Volume) SetSpec(v *VolumeSpec) { + x.Spec = v +} + +func (x *Volume) SetStatus(v *VolumeStatus) { + x.Status = v +} + +func (x *Volume) HasMetadata() bool { + if x == nil { + return false + } + return x.Metadata != nil +} + +func (x *Volume) HasSpec() bool { + if x == nil { + return false + } + return x.Spec != nil +} + +func (x *Volume) HasStatus() bool { + if x == nil { + return false + } + return x.Status != nil +} + +func (x *Volume) ClearMetadata() { + x.Metadata = nil +} + +func (x *Volume) ClearSpec() { + x.Spec = nil +} + +func (x *Volume) ClearStatus() { + x.Status = nil +} + +type Volume_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Unique identifier of the volume. + Id string + // Metadata of the volume. + Metadata *Metadata + // Desired configuration of the volume (immutable after creation). + Spec *VolumeSpec + // Current operational status of the volume. + Status *VolumeStatus +} + +func (b0 Volume_builder) Build() *Volume { + m0 := &Volume{} + b, x := &b0, m0 + _, _ = b, x + x.Id = b.Id + x.Metadata = b.Metadata + x.Spec = b.Spec + x.Status = b.Status + return m0 +} + +// Defines the desired configuration for a Volume. All fields are immutable after creation. +type VolumeSpec struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Name of the StorageTier that determines which backend and protocol serve this volume. + StorageTier string `protobuf:"bytes,1,opt,name=storage_tier,json=storageTier,proto3" json:"storage_tier,omitempty"` + // Requested storage capacity in gibibytes (GiB). + SizeGib int64 `protobuf:"varint,2,opt,name=size_gib,json=sizeGib,proto3" json:"size_gib,omitempty"` + // Kubernetes access mode for the volume. + AccessMode VolumeAccessMode `protobuf:"varint,3,opt,name=access_mode,json=accessMode,proto3,enum=osac.private.v1.VolumeAccessMode" json:"access_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumeSpec) Reset() { + *x = VolumeSpec{} + mi := &file_osac_private_v1_volume_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumeSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeSpec) ProtoMessage() {} + +func (x *VolumeSpec) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volume_type_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) +} + +func (x *VolumeSpec) GetStorageTier() string { + if x != nil { + return x.StorageTier + } + return "" +} + +func (x *VolumeSpec) GetSizeGib() int64 { + if x != nil { + return x.SizeGib + } + return 0 +} + +func (x *VolumeSpec) GetAccessMode() VolumeAccessMode { + if x != nil { + return x.AccessMode + } + return VolumeAccessMode_VOLUME_ACCESS_MODE_UNSPECIFIED +} + +func (x *VolumeSpec) SetStorageTier(v string) { + x.StorageTier = v +} + +func (x *VolumeSpec) SetSizeGib(v int64) { + x.SizeGib = v +} + +func (x *VolumeSpec) SetAccessMode(v VolumeAccessMode) { + x.AccessMode = v +} + +type VolumeSpec_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Name of the StorageTier that determines which backend and protocol serve this volume. + StorageTier string + // Requested storage capacity in gibibytes (GiB). + SizeGib int64 + // Kubernetes access mode for the volume. + AccessMode VolumeAccessMode +} + +func (b0 VolumeSpec_builder) Build() *VolumeSpec { + m0 := &VolumeSpec{} + b, x := &b0, m0 + _, _ = b, x + x.StorageTier = b.StorageTier + x.SizeGib = b.SizeGib + x.AccessMode = b.AccessMode + return m0 +} + +// Represents the current operational state of a Volume. +type VolumeStatus struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Current lifecycle state of the volume. + State VolumeState `protobuf:"varint,1,opt,name=state,proto3,enum=osac.private.v1.VolumeState" json:"state,omitempty"` + // Human-readable message providing additional details about the current state. + Message *string `protobuf:"bytes,2,opt,name=message,proto3,oneof" json:"message,omitempty"` + // Opaque identifier assigned by the vendor storage array. Set by the osac-operator after vendor + // CSI CreateVolume succeeds. + VendorVolumeId string `protobuf:"bytes,3,opt,name=vendor_volume_id,json=vendorVolumeId,proto3" json:"vendor_volume_id,omitempty"` + // Name of the StorageBackend that serves this volume. Resolved during tier resolution at + // creation time. Visible only through the private API. + Backend string `protobuf:"bytes,4,opt,name=backend,proto3" json:"backend,omitempty"` + // Storage protocol used for this volume. Resolved during tier resolution at creation time. + // Visible only through the private API. + Protocol StorageProtocol `protobuf:"varint,5,opt,name=protocol,proto3,enum=osac.private.v1.StorageProtocol" json:"protocol,omitempty"` + // Identifier of the hub cluster where the Volume CR is created. Set by the fulfillment-service + // reconciler when selecting the hub. Used to look up the hub connection during delete. + Hub string `protobuf:"bytes,6,opt,name=hub,proto3" json:"hub,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumeStatus) Reset() { + *x = VolumeStatus{} + mi := &file_osac_private_v1_volume_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumeStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeStatus) ProtoMessage() {} + +func (x *VolumeStatus) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volume_type_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) +} + +func (x *VolumeStatus) GetState() VolumeState { + if x != nil { + return x.State + } + return VolumeState_VOLUME_STATE_UNSPECIFIED +} + +func (x *VolumeStatus) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +func (x *VolumeStatus) GetVendorVolumeId() string { + if x != nil { + return x.VendorVolumeId + } + return "" +} + +func (x *VolumeStatus) GetBackend() string { + if x != nil { + return x.Backend + } + return "" +} + +func (x *VolumeStatus) GetProtocol() StorageProtocol { + if x != nil { + return x.Protocol + } + return StorageProtocol_STORAGE_PROTOCOL_UNSPECIFIED +} + +func (x *VolumeStatus) GetHub() string { + if x != nil { + return x.Hub + } + return "" +} + +func (x *VolumeStatus) SetState(v VolumeState) { + x.State = v +} + +func (x *VolumeStatus) SetMessage(v string) { + x.Message = &v +} + +func (x *VolumeStatus) SetVendorVolumeId(v string) { + x.VendorVolumeId = v +} + +func (x *VolumeStatus) SetBackend(v string) { + x.Backend = v +} + +func (x *VolumeStatus) SetProtocol(v StorageProtocol) { + x.Protocol = v +} + +func (x *VolumeStatus) SetHub(v string) { + x.Hub = v +} + +func (x *VolumeStatus) HasMessage() bool { + if x == nil { + return false + } + return x.Message != nil +} + +func (x *VolumeStatus) ClearMessage() { + x.Message = nil +} + +type VolumeStatus_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Current lifecycle state of the volume. + State VolumeState + // Human-readable message providing additional details about the current state. + Message *string + // Opaque identifier assigned by the vendor storage array. Set by the osac-operator after vendor + // CSI CreateVolume succeeds. + VendorVolumeId string + // Name of the StorageBackend that serves this volume. Resolved during tier resolution at + // creation time. Visible only through the private API. + Backend string + // Storage protocol used for this volume. Resolved during tier resolution at creation time. + // Visible only through the private API. + Protocol StorageProtocol + // Identifier of the hub cluster where the Volume CR is created. Set by the fulfillment-service + // reconciler when selecting the hub. Used to look up the hub connection during delete. + Hub string +} + +func (b0 VolumeStatus_builder) Build() *VolumeStatus { + m0 := &VolumeStatus{} + b, x := &b0, m0 + _, _ = b, x + x.State = b.State + x.Message = b.Message + x.VendorVolumeId = b.VendorVolumeId + x.Backend = b.Backend + x.Protocol = b.Protocol + x.Hub = b.Hub + return m0 +} + +var File_osac_private_v1_volume_type_proto protoreflect.FileDescriptor + +var file_osac_private_v1_volume_type_proto_rawDesc = string([]byte{ + 0x0a, 0x21, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x23, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xb7, 0x01, 0x0a, 0x06, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x0a, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x54, 0x69, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x08, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, + 0x69, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x20, + 0x00, 0x52, 0x07, 0x73, 0x69, 0x7a, 0x65, 0x47, 0x69, 0x62, 0x12, 0x4c, 0x0a, 0x0b, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x21, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, + 0x64, 0x65, 0x42, 0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x81, 0x02, 0x0a, 0x0c, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x10, + 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x12, 0x3c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x10, + 0x0a, 0x03, 0x68, 0x75, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x68, 0x75, 0x62, + 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0xd9, 0x01, 0x0a, + 0x10, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x22, 0x0a, 0x1e, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45, + 0x53, 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, + 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, + 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x4f, 0x4e, 0x43, 0x45, 0x10, 0x01, 0x12, 0x25, 0x0a, + 0x21, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4d, + 0x4f, 0x44, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x4d, 0x41, + 0x4e, 0x59, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x41, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, + 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x10, 0x03, 0x12, 0x2a, 0x0a, 0x26, + 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4d, 0x4f, + 0x44, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x4f, 0x4e, + 0x43, 0x45, 0x5f, 0x50, 0x4f, 0x44, 0x10, 0x04, 0x2a, 0xb0, 0x01, 0x0a, 0x0b, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x4c, 0x55, + 0x4d, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, + 0x13, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, + 0x04, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x05, 0x42, 0xdb, 0x01, 0x0a, 0x13, + 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, + 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x63, 0x73, 0x69, 0x2d, 0x64, 0x72, + 0x69, 0x76, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x3b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x50, + 0x58, 0xaa, 0x02, 0x0f, 0x4f, 0x73, 0x61, 0x63, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x73, 0x61, 0x63, 0x5c, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x73, 0x61, 0x63, 0x5c, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4f, 0x73, 0x61, 0x63, 0x3a, 0x3a, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +}) + +var file_osac_private_v1_volume_type_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_osac_private_v1_volume_type_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_osac_private_v1_volume_type_proto_goTypes = []any{ + (VolumeAccessMode)(0), // 0: osac.private.v1.VolumeAccessMode + (VolumeState)(0), // 1: osac.private.v1.VolumeState + (*Volume)(nil), // 2: osac.private.v1.Volume + (*VolumeSpec)(nil), // 3: osac.private.v1.VolumeSpec + (*VolumeStatus)(nil), // 4: osac.private.v1.VolumeStatus + (*Metadata)(nil), // 5: osac.private.v1.Metadata + (StorageProtocol)(0), // 6: osac.private.v1.StorageProtocol +} +var file_osac_private_v1_volume_type_proto_depIdxs = []int32{ + 5, // 0: osac.private.v1.Volume.metadata:type_name -> osac.private.v1.Metadata + 3, // 1: osac.private.v1.Volume.spec:type_name -> osac.private.v1.VolumeSpec + 4, // 2: osac.private.v1.Volume.status:type_name -> osac.private.v1.VolumeStatus + 0, // 3: osac.private.v1.VolumeSpec.access_mode:type_name -> osac.private.v1.VolumeAccessMode + 1, // 4: osac.private.v1.VolumeStatus.state:type_name -> osac.private.v1.VolumeState + 6, // 5: osac.private.v1.VolumeStatus.protocol:type_name -> osac.private.v1.StorageProtocol + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_osac_private_v1_volume_type_proto_init() } +func file_osac_private_v1_volume_type_proto_init() { + if File_osac_private_v1_volume_type_proto != nil { + return + } + file_osac_private_v1_metadata_type_proto_init() + file_osac_private_v1_storage_common_type_proto_init() + file_osac_private_v1_volume_type_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_osac_private_v1_volume_type_proto_rawDesc), len(file_osac_private_v1_volume_type_proto_rawDesc)), + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_osac_private_v1_volume_type_proto_goTypes, + DependencyIndexes: file_osac_private_v1_volume_type_proto_depIdxs, + EnumInfos: file_osac_private_v1_volume_type_proto_enumTypes, + MessageInfos: file_osac_private_v1_volume_type_proto_msgTypes, + }.Build() + File_osac_private_v1_volume_type_proto = out.File + file_osac_private_v1_volume_type_proto_goTypes = nil + file_osac_private_v1_volume_type_proto_depIdxs = nil +} diff --git a/osac-csi-driver/internal/api/osac/private/v1/volume_type_protoopaque.pb.go b/osac-csi-driver/internal/api/osac/private/v1/volume_type_protoopaque.pb.go new file mode 100644 index 0000000000..38ce3ad2a6 --- /dev/null +++ b/osac-csi-driver/internal/api/osac/private/v1/volume_type_protoopaque.pb.go @@ -0,0 +1,696 @@ +// +// Copyright (c) 2026 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc (unknown) +// source: osac/private/v1/volume_type.proto + +//go:build protoopaque + +package privatev1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + 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) +) + +// Access modes for Volume resources, matching Kubernetes PersistentVolume access modes. +// https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes +type VolumeAccessMode int32 + +const ( + // Access mode is unknown or has not been specified. + VolumeAccessMode_VOLUME_ACCESS_MODE_UNSPECIFIED VolumeAccessMode = 0 + // The volume can be mounted as read-write by a single node. + VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_ONCE VolumeAccessMode = 1 + // The volume can be mounted as read-only by many nodes. + VolumeAccessMode_VOLUME_ACCESS_MODE_READ_ONLY_MANY VolumeAccessMode = 2 + // The volume can be mounted as read-write by many nodes. + VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_MANY VolumeAccessMode = 3 + // The volume can be mounted as read-write by a single pod (requires CSI 1.5+). + VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_ONCE_POD VolumeAccessMode = 4 +) + +// Enum value maps for VolumeAccessMode. +var ( + VolumeAccessMode_name = map[int32]string{ + 0: "VOLUME_ACCESS_MODE_UNSPECIFIED", + 1: "VOLUME_ACCESS_MODE_READ_WRITE_ONCE", + 2: "VOLUME_ACCESS_MODE_READ_ONLY_MANY", + 3: "VOLUME_ACCESS_MODE_READ_WRITE_MANY", + 4: "VOLUME_ACCESS_MODE_READ_WRITE_ONCE_POD", + } + VolumeAccessMode_value = map[string]int32{ + "VOLUME_ACCESS_MODE_UNSPECIFIED": 0, + "VOLUME_ACCESS_MODE_READ_WRITE_ONCE": 1, + "VOLUME_ACCESS_MODE_READ_ONLY_MANY": 2, + "VOLUME_ACCESS_MODE_READ_WRITE_MANY": 3, + "VOLUME_ACCESS_MODE_READ_WRITE_ONCE_POD": 4, + } +) + +func (x VolumeAccessMode) Enum() *VolumeAccessMode { + p := new(VolumeAccessMode) + *p = x + return p +} + +func (x VolumeAccessMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VolumeAccessMode) Descriptor() protoreflect.EnumDescriptor { + return file_osac_private_v1_volume_type_proto_enumTypes[0].Descriptor() +} + +func (VolumeAccessMode) Type() protoreflect.EnumType { + return &file_osac_private_v1_volume_type_proto_enumTypes[0] +} + +func (x VolumeAccessMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Lifecycle states for Volume resources. +type VolumeState int32 + +const ( + // State is unknown or has not been determined yet. + VolumeState_VOLUME_STATE_UNSPECIFIED VolumeState = 0 + // The volume is being provisioned on the storage backend. + VolumeState_VOLUME_STATE_CREATING VolumeState = 1 + // The volume has been provisioned and is ready for use. + VolumeState_VOLUME_STATE_AVAILABLE VolumeState = 2 + // The volume provisioning has permanently failed after max retries and requires admin intervention. + VolumeState_VOLUME_STATE_FAILED VolumeState = 3 + // The volume is being deprovisioned from the storage backend. + VolumeState_VOLUME_STATE_DELETING VolumeState = 4 + // The volume has been fully deprovisioned and the record is archived. + VolumeState_VOLUME_STATE_DELETED VolumeState = 5 +) + +// Enum value maps for VolumeState. +var ( + VolumeState_name = map[int32]string{ + 0: "VOLUME_STATE_UNSPECIFIED", + 1: "VOLUME_STATE_CREATING", + 2: "VOLUME_STATE_AVAILABLE", + 3: "VOLUME_STATE_FAILED", + 4: "VOLUME_STATE_DELETING", + 5: "VOLUME_STATE_DELETED", + } + VolumeState_value = map[string]int32{ + "VOLUME_STATE_UNSPECIFIED": 0, + "VOLUME_STATE_CREATING": 1, + "VOLUME_STATE_AVAILABLE": 2, + "VOLUME_STATE_FAILED": 3, + "VOLUME_STATE_DELETING": 4, + "VOLUME_STATE_DELETED": 5, + } +) + +func (x VolumeState) Enum() *VolumeState { + p := new(VolumeState) + *p = x + return p +} + +func (x VolumeState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VolumeState) Descriptor() protoreflect.EnumDescriptor { + return file_osac_private_v1_volume_type_proto_enumTypes[1].Descriptor() +} + +func (VolumeState) Type() protoreflect.EnumType { + return &file_osac_private_v1_volume_type_proto_enumTypes[1] +} + +func (x VolumeState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Represents a block storage volume managed by the OSAC storage control plane. +// +// Volumes are tenant-scoped resources that represent storage provisioned on a backend storage array +// through the OSAC CSI driver. The fulfillment-service tracks volume inventory in PostgreSQL and +// reconciles Volume CRs on the hub cluster. The osac-operator Volume controller handles vendor +// provisioning via the backend's CSI controller. +// +// Volumes are created through the private API, typically by the OSAC CSI driver in response to a +// PVC on a tenant cluster. The spec captures the user's requested configuration (tier, size, +// access mode), while the status tracks the system-resolved state (vendor volume ID, backend, +// protocol). +type Volume struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Id string `protobuf:"bytes,1,opt,name=id,proto3"` + xxx_hidden_Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3"` + xxx_hidden_Spec *VolumeSpec `protobuf:"bytes,3,opt,name=spec,proto3"` + xxx_hidden_Status *VolumeStatus `protobuf:"bytes,4,opt,name=status,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Volume) Reset() { + *x = Volume{} + mi := &file_osac_private_v1_volume_type_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Volume) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Volume) ProtoMessage() {} + +func (x *Volume) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volume_type_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) +} + +func (x *Volume) GetId() string { + if x != nil { + return x.xxx_hidden_Id + } + return "" +} + +func (x *Volume) GetMetadata() *Metadata { + if x != nil { + return x.xxx_hidden_Metadata + } + return nil +} + +func (x *Volume) GetSpec() *VolumeSpec { + if x != nil { + return x.xxx_hidden_Spec + } + return nil +} + +func (x *Volume) GetStatus() *VolumeStatus { + if x != nil { + return x.xxx_hidden_Status + } + return nil +} + +func (x *Volume) SetId(v string) { + x.xxx_hidden_Id = v +} + +func (x *Volume) SetMetadata(v *Metadata) { + x.xxx_hidden_Metadata = v +} + +func (x *Volume) SetSpec(v *VolumeSpec) { + x.xxx_hidden_Spec = v +} + +func (x *Volume) SetStatus(v *VolumeStatus) { + x.xxx_hidden_Status = v +} + +func (x *Volume) HasMetadata() bool { + if x == nil { + return false + } + return x.xxx_hidden_Metadata != nil +} + +func (x *Volume) HasSpec() bool { + if x == nil { + return false + } + return x.xxx_hidden_Spec != nil +} + +func (x *Volume) HasStatus() bool { + if x == nil { + return false + } + return x.xxx_hidden_Status != nil +} + +func (x *Volume) ClearMetadata() { + x.xxx_hidden_Metadata = nil +} + +func (x *Volume) ClearSpec() { + x.xxx_hidden_Spec = nil +} + +func (x *Volume) ClearStatus() { + x.xxx_hidden_Status = nil +} + +type Volume_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Unique identifier of the volume. + Id string + // Metadata of the volume. + Metadata *Metadata + // Desired configuration of the volume (immutable after creation). + Spec *VolumeSpec + // Current operational status of the volume. + Status *VolumeStatus +} + +func (b0 Volume_builder) Build() *Volume { + m0 := &Volume{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Id = b.Id + x.xxx_hidden_Metadata = b.Metadata + x.xxx_hidden_Spec = b.Spec + x.xxx_hidden_Status = b.Status + return m0 +} + +// Defines the desired configuration for a Volume. All fields are immutable after creation. +type VolumeSpec struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_StorageTier string `protobuf:"bytes,1,opt,name=storage_tier,json=storageTier,proto3"` + xxx_hidden_SizeGib int64 `protobuf:"varint,2,opt,name=size_gib,json=sizeGib,proto3"` + xxx_hidden_AccessMode VolumeAccessMode `protobuf:"varint,3,opt,name=access_mode,json=accessMode,proto3,enum=osac.private.v1.VolumeAccessMode"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumeSpec) Reset() { + *x = VolumeSpec{} + mi := &file_osac_private_v1_volume_type_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumeSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeSpec) ProtoMessage() {} + +func (x *VolumeSpec) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volume_type_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) +} + +func (x *VolumeSpec) GetStorageTier() string { + if x != nil { + return x.xxx_hidden_StorageTier + } + return "" +} + +func (x *VolumeSpec) GetSizeGib() int64 { + if x != nil { + return x.xxx_hidden_SizeGib + } + return 0 +} + +func (x *VolumeSpec) GetAccessMode() VolumeAccessMode { + if x != nil { + return x.xxx_hidden_AccessMode + } + return VolumeAccessMode_VOLUME_ACCESS_MODE_UNSPECIFIED +} + +func (x *VolumeSpec) SetStorageTier(v string) { + x.xxx_hidden_StorageTier = v +} + +func (x *VolumeSpec) SetSizeGib(v int64) { + x.xxx_hidden_SizeGib = v +} + +func (x *VolumeSpec) SetAccessMode(v VolumeAccessMode) { + x.xxx_hidden_AccessMode = v +} + +type VolumeSpec_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Name of the StorageTier that determines which backend and protocol serve this volume. + StorageTier string + // Requested storage capacity in gibibytes (GiB). + SizeGib int64 + // Kubernetes access mode for the volume. + AccessMode VolumeAccessMode +} + +func (b0 VolumeSpec_builder) Build() *VolumeSpec { + m0 := &VolumeSpec{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_StorageTier = b.StorageTier + x.xxx_hidden_SizeGib = b.SizeGib + x.xxx_hidden_AccessMode = b.AccessMode + return m0 +} + +// Represents the current operational state of a Volume. +type VolumeStatus struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_State VolumeState `protobuf:"varint,1,opt,name=state,proto3,enum=osac.private.v1.VolumeState"` + xxx_hidden_Message *string `protobuf:"bytes,2,opt,name=message,proto3,oneof"` + xxx_hidden_VendorVolumeId string `protobuf:"bytes,3,opt,name=vendor_volume_id,json=vendorVolumeId,proto3"` + xxx_hidden_Backend string `protobuf:"bytes,4,opt,name=backend,proto3"` + xxx_hidden_Protocol StorageProtocol `protobuf:"varint,5,opt,name=protocol,proto3,enum=osac.private.v1.StorageProtocol"` + xxx_hidden_Hub string `protobuf:"bytes,6,opt,name=hub,proto3"` + XXX_raceDetectHookData protoimpl.RaceDetectHookData + XXX_presence [1]uint32 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumeStatus) Reset() { + *x = VolumeStatus{} + mi := &file_osac_private_v1_volume_type_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumeStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumeStatus) ProtoMessage() {} + +func (x *VolumeStatus) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volume_type_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) +} + +func (x *VolumeStatus) GetState() VolumeState { + if x != nil { + return x.xxx_hidden_State + } + return VolumeState_VOLUME_STATE_UNSPECIFIED +} + +func (x *VolumeStatus) GetMessage() string { + if x != nil { + if x.xxx_hidden_Message != nil { + return *x.xxx_hidden_Message + } + return "" + } + return "" +} + +func (x *VolumeStatus) GetVendorVolumeId() string { + if x != nil { + return x.xxx_hidden_VendorVolumeId + } + return "" +} + +func (x *VolumeStatus) GetBackend() string { + if x != nil { + return x.xxx_hidden_Backend + } + return "" +} + +func (x *VolumeStatus) GetProtocol() StorageProtocol { + if x != nil { + return x.xxx_hidden_Protocol + } + return StorageProtocol_STORAGE_PROTOCOL_UNSPECIFIED +} + +func (x *VolumeStatus) GetHub() string { + if x != nil { + return x.xxx_hidden_Hub + } + return "" +} + +func (x *VolumeStatus) SetState(v VolumeState) { + x.xxx_hidden_State = v +} + +func (x *VolumeStatus) SetMessage(v string) { + x.xxx_hidden_Message = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 6) +} + +func (x *VolumeStatus) SetVendorVolumeId(v string) { + x.xxx_hidden_VendorVolumeId = v +} + +func (x *VolumeStatus) SetBackend(v string) { + x.xxx_hidden_Backend = v +} + +func (x *VolumeStatus) SetProtocol(v StorageProtocol) { + x.xxx_hidden_Protocol = v +} + +func (x *VolumeStatus) SetHub(v string) { + x.xxx_hidden_Hub = v +} + +func (x *VolumeStatus) HasMessage() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 1) +} + +func (x *VolumeStatus) ClearMessage() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1) + x.xxx_hidden_Message = nil +} + +type VolumeStatus_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Current lifecycle state of the volume. + State VolumeState + // Human-readable message providing additional details about the current state. + Message *string + // Opaque identifier assigned by the vendor storage array. Set by the osac-operator after vendor + // CSI CreateVolume succeeds. + VendorVolumeId string + // Name of the StorageBackend that serves this volume. Resolved during tier resolution at + // creation time. Visible only through the private API. + Backend string + // Storage protocol used for this volume. Resolved during tier resolution at creation time. + // Visible only through the private API. + Protocol StorageProtocol + // Identifier of the hub cluster where the Volume CR is created. Set by the fulfillment-service + // reconciler when selecting the hub. Used to look up the hub connection during delete. + Hub string +} + +func (b0 VolumeStatus_builder) Build() *VolumeStatus { + m0 := &VolumeStatus{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_State = b.State + if b.Message != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 6) + x.xxx_hidden_Message = b.Message + } + x.xxx_hidden_VendorVolumeId = b.VendorVolumeId + x.xxx_hidden_Backend = b.Backend + x.xxx_hidden_Protocol = b.Protocol + x.xxx_hidden_Hub = b.Hub + return m0 +} + +var File_osac_private_v1_volume_type_proto protoreflect.FileDescriptor + +var file_osac_private_v1_volume_type_proto_rawDesc = string([]byte{ + 0x0a, 0x21, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x23, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xb7, 0x01, 0x0a, 0x06, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, + 0x73, 0x70, 0x65, 0x63, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x0a, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xba, 0x48, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x54, 0x69, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x08, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, + 0x69, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xba, 0x48, 0x04, 0x22, 0x02, 0x20, + 0x00, 0x52, 0x07, 0x73, 0x69, 0x7a, 0x65, 0x47, 0x69, 0x62, 0x12, 0x4c, 0x0a, 0x0b, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x21, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, + 0x64, 0x65, 0x42, 0x08, 0xba, 0x48, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x22, 0x81, 0x02, 0x0a, 0x0c, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x28, 0x0a, 0x10, + 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x12, 0x3c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x10, + 0x0a, 0x03, 0x68, 0x75, 0x62, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x68, 0x75, 0x62, + 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0xd9, 0x01, 0x0a, + 0x10, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x6f, 0x64, + 0x65, 0x12, 0x22, 0x0a, 0x1e, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45, + 0x53, 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, + 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, + 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x4f, 0x4e, 0x43, 0x45, 0x10, 0x01, 0x12, 0x25, 0x0a, + 0x21, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4d, + 0x4f, 0x44, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x4d, 0x41, + 0x4e, 0x59, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x41, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, + 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x59, 0x10, 0x03, 0x12, 0x2a, 0x0a, 0x26, + 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4d, 0x4f, + 0x44, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x4f, 0x4e, + 0x43, 0x45, 0x5f, 0x50, 0x4f, 0x44, 0x10, 0x04, 0x2a, 0xb0, 0x01, 0x0a, 0x0b, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x4c, 0x55, + 0x4d, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, + 0x13, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x49, 0x4e, 0x47, 0x10, + 0x04, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x4f, 0x4c, 0x55, 0x4d, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x05, 0x42, 0xdb, 0x01, 0x0a, 0x13, + 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, + 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x63, 0x73, 0x69, 0x2d, 0x64, 0x72, + 0x69, 0x76, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x3b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x50, + 0x58, 0xaa, 0x02, 0x0f, 0x4f, 0x73, 0x61, 0x63, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x73, 0x61, 0x63, 0x5c, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x73, 0x61, 0x63, 0x5c, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4f, 0x73, 0x61, 0x63, 0x3a, 0x3a, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +}) + +var file_osac_private_v1_volume_type_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_osac_private_v1_volume_type_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_osac_private_v1_volume_type_proto_goTypes = []any{ + (VolumeAccessMode)(0), // 0: osac.private.v1.VolumeAccessMode + (VolumeState)(0), // 1: osac.private.v1.VolumeState + (*Volume)(nil), // 2: osac.private.v1.Volume + (*VolumeSpec)(nil), // 3: osac.private.v1.VolumeSpec + (*VolumeStatus)(nil), // 4: osac.private.v1.VolumeStatus + (*Metadata)(nil), // 5: osac.private.v1.Metadata + (StorageProtocol)(0), // 6: osac.private.v1.StorageProtocol +} +var file_osac_private_v1_volume_type_proto_depIdxs = []int32{ + 5, // 0: osac.private.v1.Volume.metadata:type_name -> osac.private.v1.Metadata + 3, // 1: osac.private.v1.Volume.spec:type_name -> osac.private.v1.VolumeSpec + 4, // 2: osac.private.v1.Volume.status:type_name -> osac.private.v1.VolumeStatus + 0, // 3: osac.private.v1.VolumeSpec.access_mode:type_name -> osac.private.v1.VolumeAccessMode + 1, // 4: osac.private.v1.VolumeStatus.state:type_name -> osac.private.v1.VolumeState + 6, // 5: osac.private.v1.VolumeStatus.protocol:type_name -> osac.private.v1.StorageProtocol + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_osac_private_v1_volume_type_proto_init() } +func file_osac_private_v1_volume_type_proto_init() { + if File_osac_private_v1_volume_type_proto != nil { + return + } + file_osac_private_v1_metadata_type_proto_init() + file_osac_private_v1_storage_common_type_proto_init() + file_osac_private_v1_volume_type_proto_msgTypes[2].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_osac_private_v1_volume_type_proto_rawDesc), len(file_osac_private_v1_volume_type_proto_rawDesc)), + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_osac_private_v1_volume_type_proto_goTypes, + DependencyIndexes: file_osac_private_v1_volume_type_proto_depIdxs, + EnumInfos: file_osac_private_v1_volume_type_proto_enumTypes, + MessageInfos: file_osac_private_v1_volume_type_proto_msgTypes, + }.Build() + File_osac_private_v1_volume_type_proto = out.File + file_osac_private_v1_volume_type_proto_goTypes = nil + file_osac_private_v1_volume_type_proto_depIdxs = nil +} diff --git a/osac-csi-driver/internal/api/osac/private/v1/volumes_service.pb.go b/osac-csi-driver/internal/api/osac/private/v1/volumes_service.pb.go new file mode 100644 index 0000000000..3c3ad204ab --- /dev/null +++ b/osac-csi-driver/internal/api/osac/private/v1/volumes_service.pb.go @@ -0,0 +1,1174 @@ +// +// Copyright (c) 2026 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc (unknown) +// source: osac/private/v1/volumes_service.proto + +//go:build !protoopaque + +package privatev1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + reflect "reflect" + 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 VolumesListRequest struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Index of the first result. If not specified the default value will be zero. + Offset *int32 `protobuf:"varint,1,opt,name=offset,proto3,oneof" json:"offset,omitempty"` + // Maximum number of results to be returned by the server. When not specified all the results will be returned. Note + // that there may not be enough results to return, and that the server may decide, for performance reasons, to return + // less results than requested. + Limit *int32 `protobuf:"varint,2,opt,name=limit,proto3,oneof" json:"limit,omitempty"` + // Filter criteria. + // + // The value of this parameter is a [CEL](https://cel.dev) expression used to select which objects to return. The + // built-in `this` variable refers to the object being tested and `now` refers to the current date and time. If the + // expression evaluates to `true` the object is included in the results. For example, to retrieve all volumes in the + // AVAILABLE state: + // + // this.status.state == 2 + // + // If this isn't provided, or if the value is empty, then all the volumes that the user has permission to see will be + // returned. Not all CEL constructs are currently supported for implementation reasons; see the filter documentation + // (docs/FILTER.md) for the full details. + Filter *string `protobuf:"bytes,3,opt,name=filter,proto3,oneof" json:"filter,omitempty"` + // Order criteria. + // + // The syntax of this parameter is similar to the syntax of the _order by_ clause of a SQL statement, but using the + // names of the attributes of the volume instead of the names of the columns of a table. For example, in order to + // sort the volumes descending by size: + // + // spec.size_gib desc + // + // If the parameter isn't provided, or if the value is empty, then the order of the results is undefined. + Order *string `protobuf:"bytes,4,opt,name=order,proto3,oneof" json:"order,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesListRequest) Reset() { + *x = VolumesListRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesListRequest) ProtoMessage() {} + +func (x *VolumesListRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesListRequest) GetOffset() int32 { + if x != nil && x.Offset != nil { + return *x.Offset + } + return 0 +} + +func (x *VolumesListRequest) GetLimit() int32 { + if x != nil && x.Limit != nil { + return *x.Limit + } + return 0 +} + +func (x *VolumesListRequest) GetFilter() string { + if x != nil && x.Filter != nil { + return *x.Filter + } + return "" +} + +func (x *VolumesListRequest) GetOrder() string { + if x != nil && x.Order != nil { + return *x.Order + } + return "" +} + +func (x *VolumesListRequest) SetOffset(v int32) { + x.Offset = &v +} + +func (x *VolumesListRequest) SetLimit(v int32) { + x.Limit = &v +} + +func (x *VolumesListRequest) SetFilter(v string) { + x.Filter = &v +} + +func (x *VolumesListRequest) SetOrder(v string) { + x.Order = &v +} + +func (x *VolumesListRequest) HasOffset() bool { + if x == nil { + return false + } + return x.Offset != nil +} + +func (x *VolumesListRequest) HasLimit() bool { + if x == nil { + return false + } + return x.Limit != nil +} + +func (x *VolumesListRequest) HasFilter() bool { + if x == nil { + return false + } + return x.Filter != nil +} + +func (x *VolumesListRequest) HasOrder() bool { + if x == nil { + return false + } + return x.Order != nil +} + +func (x *VolumesListRequest) ClearOffset() { + x.Offset = nil +} + +func (x *VolumesListRequest) ClearLimit() { + x.Limit = nil +} + +func (x *VolumesListRequest) ClearFilter() { + x.Filter = nil +} + +func (x *VolumesListRequest) ClearOrder() { + x.Order = nil +} + +type VolumesListRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Index of the first result. If not specified the default value will be zero. + Offset *int32 + // Maximum number of results to be returned by the server. When not specified all the results will be returned. Note + // that there may not be enough results to return, and that the server may decide, for performance reasons, to return + // less results than requested. + Limit *int32 + // Filter criteria. + // + // The value of this parameter is a [CEL](https://cel.dev) expression used to select which objects to return. The + // built-in `this` variable refers to the object being tested and `now` refers to the current date and time. If the + // expression evaluates to `true` the object is included in the results. For example, to retrieve all volumes in the + // AVAILABLE state: + // + // this.status.state == 2 + // + // If this isn't provided, or if the value is empty, then all the volumes that the user has permission to see will be + // returned. Not all CEL constructs are currently supported for implementation reasons; see the filter documentation + // (docs/FILTER.md) for the full details. + Filter *string + // Order criteria. + // + // The syntax of this parameter is similar to the syntax of the _order by_ clause of a SQL statement, but using the + // names of the attributes of the volume instead of the names of the columns of a table. For example, in order to + // sort the volumes descending by size: + // + // spec.size_gib desc + // + // If the parameter isn't provided, or if the value is empty, then the order of the results is undefined. + Order *string +} + +func (b0 VolumesListRequest_builder) Build() *VolumesListRequest { + m0 := &VolumesListRequest{} + b, x := &b0, m0 + _, _ = b, x + x.Offset = b.Offset + x.Limit = b.Limit + x.Filter = b.Filter + x.Order = b.Order + return m0 +} + +type VolumesListResponse struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + // Actual number of items returned. Note that this may be smaller than the value requested in the `limit` parameter + // of the request if there are not enough items, or if the system decides that returning that number of items isn't + // feasible or convenient for performance reasons. + Size int32 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` + // Total number of items of the collection that match the search criteria, regardless of the number of results + // requested with the `limit` parameter. + Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` + // List of results. + Items []*Volume `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesListResponse) Reset() { + *x = VolumesListResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesListResponse) ProtoMessage() {} + +func (x *VolumesListResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesListResponse) GetSize() int32 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *VolumesListResponse) GetTotal() int32 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *VolumesListResponse) GetItems() []*Volume { + if x != nil { + return x.Items + } + return nil +} + +func (x *VolumesListResponse) SetSize(v int32) { + x.Size = v +} + +func (x *VolumesListResponse) SetTotal(v int32) { + x.Total = v +} + +func (x *VolumesListResponse) SetItems(v []*Volume) { + x.Items = v +} + +type VolumesListResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Actual number of items returned. Note that this may be smaller than the value requested in the `limit` parameter + // of the request if there are not enough items, or if the system decides that returning that number of items isn't + // feasible or convenient for performance reasons. + Size int32 + // Total number of items of the collection that match the search criteria, regardless of the number of results + // requested with the `limit` parameter. + Total int32 + // List of results. + Items []*Volume +} + +func (b0 VolumesListResponse_builder) Build() *VolumesListResponse { + m0 := &VolumesListResponse{} + b, x := &b0, m0 + _, _ = b, x + x.Size = b.Size + x.Total = b.Total + x.Items = b.Items + return m0 +} + +type VolumesGetRequest struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesGetRequest) Reset() { + *x = VolumesGetRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesGetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesGetRequest) ProtoMessage() {} + +func (x *VolumesGetRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesGetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *VolumesGetRequest) SetId(v string) { + x.Id = v +} + +type VolumesGetRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Id string +} + +func (b0 VolumesGetRequest_builder) Build() *VolumesGetRequest { + m0 := &VolumesGetRequest{} + b, x := &b0, m0 + _, _ = b, x + x.Id = b.Id + return m0 +} + +type VolumesGetResponse struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Object *Volume `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesGetResponse) Reset() { + *x = VolumesGetResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesGetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesGetResponse) ProtoMessage() {} + +func (x *VolumesGetResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesGetResponse) GetObject() *Volume { + if x != nil { + return x.Object + } + return nil +} + +func (x *VolumesGetResponse) SetObject(v *Volume) { + x.Object = v +} + +func (x *VolumesGetResponse) HasObject() bool { + if x == nil { + return false + } + return x.Object != nil +} + +func (x *VolumesGetResponse) ClearObject() { + x.Object = nil +} + +type VolumesGetResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Object *Volume +} + +func (b0 VolumesGetResponse_builder) Build() *VolumesGetResponse { + m0 := &VolumesGetResponse{} + b, x := &b0, m0 + _, _ = b, x + x.Object = b.Object + return m0 +} + +type VolumesCreateRequest struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Object *Volume `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesCreateRequest) Reset() { + *x = VolumesCreateRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesCreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesCreateRequest) ProtoMessage() {} + +func (x *VolumesCreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesCreateRequest) GetObject() *Volume { + if x != nil { + return x.Object + } + return nil +} + +func (x *VolumesCreateRequest) SetObject(v *Volume) { + x.Object = v +} + +func (x *VolumesCreateRequest) HasObject() bool { + if x == nil { + return false + } + return x.Object != nil +} + +func (x *VolumesCreateRequest) ClearObject() { + x.Object = nil +} + +type VolumesCreateRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Object *Volume +} + +func (b0 VolumesCreateRequest_builder) Build() *VolumesCreateRequest { + m0 := &VolumesCreateRequest{} + b, x := &b0, m0 + _, _ = b, x + x.Object = b.Object + return m0 +} + +type VolumesCreateResponse struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Object *Volume `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesCreateResponse) Reset() { + *x = VolumesCreateResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesCreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesCreateResponse) ProtoMessage() {} + +func (x *VolumesCreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesCreateResponse) GetObject() *Volume { + if x != nil { + return x.Object + } + return nil +} + +func (x *VolumesCreateResponse) SetObject(v *Volume) { + x.Object = v +} + +func (x *VolumesCreateResponse) HasObject() bool { + if x == nil { + return false + } + return x.Object != nil +} + +func (x *VolumesCreateResponse) ClearObject() { + x.Object = nil +} + +type VolumesCreateResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Object *Volume +} + +func (b0 VolumesCreateResponse_builder) Build() *VolumesCreateResponse { + m0 := &VolumesCreateResponse{} + b, x := &b0, m0 + _, _ = b, x + x.Object = b.Object + return m0 +} + +type VolumesUpdateRequest struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Object *Volume `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + // Lock enables optimistic locking. When set to true, the server verifies that the current version of the object + // matches the value of the metadata.version field of the submitted object. If they differ the update will be + // rejected. This is useful to prevent lost updates when multiple clients are modifying the same object concurrently. + Lock bool `protobuf:"varint,3,opt,name=lock,proto3" json:"lock,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesUpdateRequest) Reset() { + *x = VolumesUpdateRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesUpdateRequest) ProtoMessage() {} + +func (x *VolumesUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesUpdateRequest) GetObject() *Volume { + if x != nil { + return x.Object + } + return nil +} + +func (x *VolumesUpdateRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +func (x *VolumesUpdateRequest) GetLock() bool { + if x != nil { + return x.Lock + } + return false +} + +func (x *VolumesUpdateRequest) SetObject(v *Volume) { + x.Object = v +} + +func (x *VolumesUpdateRequest) SetUpdateMask(v *fieldmaskpb.FieldMask) { + x.UpdateMask = v +} + +func (x *VolumesUpdateRequest) SetLock(v bool) { + x.Lock = v +} + +func (x *VolumesUpdateRequest) HasObject() bool { + if x == nil { + return false + } + return x.Object != nil +} + +func (x *VolumesUpdateRequest) HasUpdateMask() bool { + if x == nil { + return false + } + return x.UpdateMask != nil +} + +func (x *VolumesUpdateRequest) ClearObject() { + x.Object = nil +} + +func (x *VolumesUpdateRequest) ClearUpdateMask() { + x.UpdateMask = nil +} + +type VolumesUpdateRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Object *Volume + UpdateMask *fieldmaskpb.FieldMask + // Lock enables optimistic locking. When set to true, the server verifies that the current version of the object + // matches the value of the metadata.version field of the submitted object. If they differ the update will be + // rejected. This is useful to prevent lost updates when multiple clients are modifying the same object concurrently. + Lock bool +} + +func (b0 VolumesUpdateRequest_builder) Build() *VolumesUpdateRequest { + m0 := &VolumesUpdateRequest{} + b, x := &b0, m0 + _, _ = b, x + x.Object = b.Object + x.UpdateMask = b.UpdateMask + x.Lock = b.Lock + return m0 +} + +type VolumesUpdateResponse struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Object *Volume `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesUpdateResponse) Reset() { + *x = VolumesUpdateResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesUpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesUpdateResponse) ProtoMessage() {} + +func (x *VolumesUpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesUpdateResponse) GetObject() *Volume { + if x != nil { + return x.Object + } + return nil +} + +func (x *VolumesUpdateResponse) SetObject(v *Volume) { + x.Object = v +} + +func (x *VolumesUpdateResponse) HasObject() bool { + if x == nil { + return false + } + return x.Object != nil +} + +func (x *VolumesUpdateResponse) ClearObject() { + x.Object = nil +} + +type VolumesUpdateResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Object *Volume +} + +func (b0 VolumesUpdateResponse_builder) Build() *VolumesUpdateResponse { + m0 := &VolumesUpdateResponse{} + b, x := &b0, m0 + _, _ = b, x + x.Object = b.Object + return m0 +} + +type VolumesDeleteRequest struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesDeleteRequest) Reset() { + *x = VolumesDeleteRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesDeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesDeleteRequest) ProtoMessage() {} + +func (x *VolumesDeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesDeleteRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *VolumesDeleteRequest) SetId(v string) { + x.Id = v +} + +type VolumesDeleteRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Id string +} + +func (b0 VolumesDeleteRequest_builder) Build() *VolumesDeleteRequest { + m0 := &VolumesDeleteRequest{} + b, x := &b0, m0 + _, _ = b, x + x.Id = b.Id + return m0 +} + +type VolumesDeleteResponse struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesDeleteResponse) Reset() { + *x = VolumesDeleteResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesDeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesDeleteResponse) ProtoMessage() {} + +func (x *VolumesDeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +type VolumesDeleteResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + +} + +func (b0 VolumesDeleteResponse_builder) Build() *VolumesDeleteResponse { + m0 := &VolumesDeleteResponse{} + b, x := &b0, m0 + _, _ = b, x + return m0 +} + +type VolumesSignalRequest struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesSignalRequest) Reset() { + *x = VolumesSignalRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesSignalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesSignalRequest) ProtoMessage() {} + +func (x *VolumesSignalRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesSignalRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *VolumesSignalRequest) SetId(v string) { + x.Id = v +} + +type VolumesSignalRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Id string +} + +func (b0 VolumesSignalRequest_builder) Build() *VolumesSignalRequest { + m0 := &VolumesSignalRequest{} + b, x := &b0, m0 + _, _ = b, x + x.Id = b.Id + return m0 +} + +type VolumesSignalResponse struct { + state protoimpl.MessageState `protogen:"hybrid.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesSignalResponse) Reset() { + *x = VolumesSignalResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesSignalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesSignalResponse) ProtoMessage() {} + +func (x *VolumesSignalResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +type VolumesSignalResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + +} + +func (b0 VolumesSignalResponse_builder) Build() *VolumesSignalResponse { + m0 := &VolumesSignalResponse{} + b, x := &b0, m0 + _, _ = b, x + return m0 +} + +var File_osac_private_v1_volumes_service_proto protoreflect.FileDescriptor + +var file_osac_private_v1_volumes_service_proto_rawDesc = string([]byte{ + 0x0a, 0x25, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 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, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x01, 0x0a, 0x12, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x88, + 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x6e, 0x0a, 0x13, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2d, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, + 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x23, 0x0a, 0x11, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x45, 0x0a, 0x12, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x47, 0x0a, 0x14, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x22, 0x48, 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x73, 0x61, + 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x14, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x48, 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x22, 0x26, 0x0a, 0x14, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x26, 0x0a, 0x14, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0xf7, 0x05, 0x0a, 0x07, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x72, + 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x73, + 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x73, 0x12, 0x7c, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x6f, 0x73, 0x61, 0x63, + 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x62, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0x88, 0x01, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x6f, 0x73, + 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x29, 0x3a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x62, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x06, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x62, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x23, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x2f, 0x7b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x69, + 0x64, 0x7d, 0x12, 0x7d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x6f, + 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x12, 0x59, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x25, 0x2e, 0x6f, 0x73, + 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xdf, 0x01, 0x0a, + 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x42, 0x13, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x63, + 0x73, 0x69, 0x2d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x4f, 0x50, 0x58, 0xaa, 0x02, 0x0f, 0x4f, 0x73, 0x61, 0x63, 0x2e, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x73, 0x61, 0x63, 0x5c, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x73, + 0x61, 0x63, 0x5c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4f, 0x73, 0x61, + 0x63, 0x3a, 0x3a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var file_osac_private_v1_volumes_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_osac_private_v1_volumes_service_proto_goTypes = []any{ + (*VolumesListRequest)(nil), // 0: osac.private.v1.VolumesListRequest + (*VolumesListResponse)(nil), // 1: osac.private.v1.VolumesListResponse + (*VolumesGetRequest)(nil), // 2: osac.private.v1.VolumesGetRequest + (*VolumesGetResponse)(nil), // 3: osac.private.v1.VolumesGetResponse + (*VolumesCreateRequest)(nil), // 4: osac.private.v1.VolumesCreateRequest + (*VolumesCreateResponse)(nil), // 5: osac.private.v1.VolumesCreateResponse + (*VolumesUpdateRequest)(nil), // 6: osac.private.v1.VolumesUpdateRequest + (*VolumesUpdateResponse)(nil), // 7: osac.private.v1.VolumesUpdateResponse + (*VolumesDeleteRequest)(nil), // 8: osac.private.v1.VolumesDeleteRequest + (*VolumesDeleteResponse)(nil), // 9: osac.private.v1.VolumesDeleteResponse + (*VolumesSignalRequest)(nil), // 10: osac.private.v1.VolumesSignalRequest + (*VolumesSignalResponse)(nil), // 11: osac.private.v1.VolumesSignalResponse + (*Volume)(nil), // 12: osac.private.v1.Volume + (*fieldmaskpb.FieldMask)(nil), // 13: google.protobuf.FieldMask +} +var file_osac_private_v1_volumes_service_proto_depIdxs = []int32{ + 12, // 0: osac.private.v1.VolumesListResponse.items:type_name -> osac.private.v1.Volume + 12, // 1: osac.private.v1.VolumesGetResponse.object:type_name -> osac.private.v1.Volume + 12, // 2: osac.private.v1.VolumesCreateRequest.object:type_name -> osac.private.v1.Volume + 12, // 3: osac.private.v1.VolumesCreateResponse.object:type_name -> osac.private.v1.Volume + 12, // 4: osac.private.v1.VolumesUpdateRequest.object:type_name -> osac.private.v1.Volume + 13, // 5: osac.private.v1.VolumesUpdateRequest.update_mask:type_name -> google.protobuf.FieldMask + 12, // 6: osac.private.v1.VolumesUpdateResponse.object:type_name -> osac.private.v1.Volume + 0, // 7: osac.private.v1.Volumes.List:input_type -> osac.private.v1.VolumesListRequest + 2, // 8: osac.private.v1.Volumes.Get:input_type -> osac.private.v1.VolumesGetRequest + 4, // 9: osac.private.v1.Volumes.Create:input_type -> osac.private.v1.VolumesCreateRequest + 6, // 10: osac.private.v1.Volumes.Update:input_type -> osac.private.v1.VolumesUpdateRequest + 8, // 11: osac.private.v1.Volumes.Delete:input_type -> osac.private.v1.VolumesDeleteRequest + 10, // 12: osac.private.v1.Volumes.Signal:input_type -> osac.private.v1.VolumesSignalRequest + 1, // 13: osac.private.v1.Volumes.List:output_type -> osac.private.v1.VolumesListResponse + 3, // 14: osac.private.v1.Volumes.Get:output_type -> osac.private.v1.VolumesGetResponse + 5, // 15: osac.private.v1.Volumes.Create:output_type -> osac.private.v1.VolumesCreateResponse + 7, // 16: osac.private.v1.Volumes.Update:output_type -> osac.private.v1.VolumesUpdateResponse + 9, // 17: osac.private.v1.Volumes.Delete:output_type -> osac.private.v1.VolumesDeleteResponse + 11, // 18: osac.private.v1.Volumes.Signal:output_type -> osac.private.v1.VolumesSignalResponse + 13, // [13:19] is the sub-list for method output_type + 7, // [7:13] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_osac_private_v1_volumes_service_proto_init() } +func file_osac_private_v1_volumes_service_proto_init() { + if File_osac_private_v1_volumes_service_proto != nil { + return + } + file_osac_private_v1_volume_type_proto_init() + file_osac_private_v1_volumes_service_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_osac_private_v1_volumes_service_proto_rawDesc), len(file_osac_private_v1_volumes_service_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_osac_private_v1_volumes_service_proto_goTypes, + DependencyIndexes: file_osac_private_v1_volumes_service_proto_depIdxs, + MessageInfos: file_osac_private_v1_volumes_service_proto_msgTypes, + }.Build() + File_osac_private_v1_volumes_service_proto = out.File + file_osac_private_v1_volumes_service_proto_goTypes = nil + file_osac_private_v1_volumes_service_proto_depIdxs = nil +} diff --git a/osac-csi-driver/internal/api/osac/private/v1/volumes_service_grpc.pb.go b/osac-csi-driver/internal/api/osac/private/v1/volumes_service_grpc.pb.go new file mode 100644 index 0000000000..87fc0553aa --- /dev/null +++ b/osac-csi-driver/internal/api/osac/private/v1/volumes_service_grpc.pb.go @@ -0,0 +1,338 @@ +// +// Copyright (c) 2026 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. +// + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: osac/private/v1/volumes_service.proto + +package privatev1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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 ( + Volumes_List_FullMethodName = "/osac.private.v1.Volumes/List" + Volumes_Get_FullMethodName = "/osac.private.v1.Volumes/Get" + Volumes_Create_FullMethodName = "/osac.private.v1.Volumes/Create" + Volumes_Update_FullMethodName = "/osac.private.v1.Volumes/Update" + Volumes_Delete_FullMethodName = "/osac.private.v1.Volumes/Delete" + Volumes_Signal_FullMethodName = "/osac.private.v1.Volumes/Signal" +) + +// VolumesClient is the client API for Volumes 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. +type VolumesClient interface { + // Retrieves the list of volumes. + List(ctx context.Context, in *VolumesListRequest, opts ...grpc.CallOption) (*VolumesListResponse, error) + // Retrieves the details of one specific volume. + Get(ctx context.Context, in *VolumesGetRequest, opts ...grpc.CallOption) (*VolumesGetResponse, error) + // Creates a new volume. + Create(ctx context.Context, in *VolumesCreateRequest, opts ...grpc.CallOption) (*VolumesCreateResponse, error) + // Updates an existing volume. + Update(ctx context.Context, in *VolumesUpdateRequest, opts ...grpc.CallOption) (*VolumesUpdateResponse, error) + // Deletes a volume. + Delete(ctx context.Context, in *VolumesDeleteRequest, opts ...grpc.CallOption) (*VolumesDeleteResponse, error) + // Signals the volume for re-reconciliation. Called by the operator feedback controller after + // Volume CR status changes on the hub. + Signal(ctx context.Context, in *VolumesSignalRequest, opts ...grpc.CallOption) (*VolumesSignalResponse, error) +} + +type volumesClient struct { + cc grpc.ClientConnInterface +} + +func NewVolumesClient(cc grpc.ClientConnInterface) VolumesClient { + return &volumesClient{cc} +} + +func (c *volumesClient) List(ctx context.Context, in *VolumesListRequest, opts ...grpc.CallOption) (*VolumesListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VolumesListResponse) + err := c.cc.Invoke(ctx, Volumes_List_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumesClient) Get(ctx context.Context, in *VolumesGetRequest, opts ...grpc.CallOption) (*VolumesGetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VolumesGetResponse) + err := c.cc.Invoke(ctx, Volumes_Get_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumesClient) Create(ctx context.Context, in *VolumesCreateRequest, opts ...grpc.CallOption) (*VolumesCreateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VolumesCreateResponse) + err := c.cc.Invoke(ctx, Volumes_Create_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumesClient) Update(ctx context.Context, in *VolumesUpdateRequest, opts ...grpc.CallOption) (*VolumesUpdateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VolumesUpdateResponse) + err := c.cc.Invoke(ctx, Volumes_Update_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumesClient) Delete(ctx context.Context, in *VolumesDeleteRequest, opts ...grpc.CallOption) (*VolumesDeleteResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VolumesDeleteResponse) + err := c.cc.Invoke(ctx, Volumes_Delete_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumesClient) Signal(ctx context.Context, in *VolumesSignalRequest, opts ...grpc.CallOption) (*VolumesSignalResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VolumesSignalResponse) + err := c.cc.Invoke(ctx, Volumes_Signal_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// VolumesServer is the server API for Volumes service. +// All implementations must embed UnimplementedVolumesServer +// for forward compatibility. +type VolumesServer interface { + // Retrieves the list of volumes. + List(context.Context, *VolumesListRequest) (*VolumesListResponse, error) + // Retrieves the details of one specific volume. + Get(context.Context, *VolumesGetRequest) (*VolumesGetResponse, error) + // Creates a new volume. + Create(context.Context, *VolumesCreateRequest) (*VolumesCreateResponse, error) + // Updates an existing volume. + Update(context.Context, *VolumesUpdateRequest) (*VolumesUpdateResponse, error) + // Deletes a volume. + Delete(context.Context, *VolumesDeleteRequest) (*VolumesDeleteResponse, error) + // Signals the volume for re-reconciliation. Called by the operator feedback controller after + // Volume CR status changes on the hub. + Signal(context.Context, *VolumesSignalRequest) (*VolumesSignalResponse, error) + mustEmbedUnimplementedVolumesServer() +} + +// UnimplementedVolumesServer 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 UnimplementedVolumesServer struct{} + +func (UnimplementedVolumesServer) List(context.Context, *VolumesListRequest) (*VolumesListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (UnimplementedVolumesServer) Get(context.Context, *VolumesGetRequest) (*VolumesGetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedVolumesServer) Create(context.Context, *VolumesCreateRequest) (*VolumesCreateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (UnimplementedVolumesServer) Update(context.Context, *VolumesUpdateRequest) (*VolumesUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (UnimplementedVolumesServer) Delete(context.Context, *VolumesDeleteRequest) (*VolumesDeleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (UnimplementedVolumesServer) Signal(context.Context, *VolumesSignalRequest) (*VolumesSignalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Signal not implemented") +} +func (UnimplementedVolumesServer) mustEmbedUnimplementedVolumesServer() {} +func (UnimplementedVolumesServer) testEmbeddedByValue() {} + +// UnsafeVolumesServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to VolumesServer will +// result in compilation errors. +type UnsafeVolumesServer interface { + mustEmbedUnimplementedVolumesServer() +} + +func RegisterVolumesServer(s grpc.ServiceRegistrar, srv VolumesServer) { + // If the following call pancis, it indicates UnimplementedVolumesServer 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(&Volumes_ServiceDesc, srv) +} + +func _Volumes_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumesListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumesServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Volumes_List_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumesServer).List(ctx, req.(*VolumesListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volumes_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumesGetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumesServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Volumes_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumesServer).Get(ctx, req.(*VolumesGetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volumes_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumesCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumesServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Volumes_Create_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumesServer).Create(ctx, req.(*VolumesCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volumes_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumesUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumesServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Volumes_Update_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumesServer).Update(ctx, req.(*VolumesUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volumes_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumesDeleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumesServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Volumes_Delete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumesServer).Delete(ctx, req.(*VolumesDeleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volumes_Signal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VolumesSignalRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumesServer).Signal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Volumes_Signal_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumesServer).Signal(ctx, req.(*VolumesSignalRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Volumes_ServiceDesc is the grpc.ServiceDesc for Volumes service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Volumes_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "osac.private.v1.Volumes", + HandlerType: (*VolumesServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _Volumes_List_Handler, + }, + { + MethodName: "Get", + Handler: _Volumes_Get_Handler, + }, + { + MethodName: "Create", + Handler: _Volumes_Create_Handler, + }, + { + MethodName: "Update", + Handler: _Volumes_Update_Handler, + }, + { + MethodName: "Delete", + Handler: _Volumes_Delete_Handler, + }, + { + MethodName: "Signal", + Handler: _Volumes_Signal_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "osac/private/v1/volumes_service.proto", +} diff --git a/osac-csi-driver/internal/api/osac/private/v1/volumes_service_protoopaque.pb.go b/osac-csi-driver/internal/api/osac/private/v1/volumes_service_protoopaque.pb.go new file mode 100644 index 0000000000..2fd187fa38 --- /dev/null +++ b/osac-csi-driver/internal/api/osac/private/v1/volumes_service_protoopaque.pb.go @@ -0,0 +1,1170 @@ +// +// Copyright (c) 2026 Red Hat, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +// specific language governing permissions and limitations under the License. +// + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.5 +// protoc (unknown) +// source: osac/private/v1/volumes_service.proto + +//go:build protoopaque + +package privatev1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + reflect "reflect" + 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 VolumesListRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Offset int32 `protobuf:"varint,1,opt,name=offset,proto3,oneof"` + xxx_hidden_Limit int32 `protobuf:"varint,2,opt,name=limit,proto3,oneof"` + xxx_hidden_Filter *string `protobuf:"bytes,3,opt,name=filter,proto3,oneof"` + xxx_hidden_Order *string `protobuf:"bytes,4,opt,name=order,proto3,oneof"` + XXX_raceDetectHookData protoimpl.RaceDetectHookData + XXX_presence [1]uint32 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesListRequest) Reset() { + *x = VolumesListRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesListRequest) ProtoMessage() {} + +func (x *VolumesListRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesListRequest) GetOffset() int32 { + if x != nil { + return x.xxx_hidden_Offset + } + return 0 +} + +func (x *VolumesListRequest) GetLimit() int32 { + if x != nil { + return x.xxx_hidden_Limit + } + return 0 +} + +func (x *VolumesListRequest) GetFilter() string { + if x != nil { + if x.xxx_hidden_Filter != nil { + return *x.xxx_hidden_Filter + } + return "" + } + return "" +} + +func (x *VolumesListRequest) GetOrder() string { + if x != nil { + if x.xxx_hidden_Order != nil { + return *x.xxx_hidden_Order + } + return "" + } + return "" +} + +func (x *VolumesListRequest) SetOffset(v int32) { + x.xxx_hidden_Offset = v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 4) +} + +func (x *VolumesListRequest) SetLimit(v int32) { + x.xxx_hidden_Limit = v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 4) +} + +func (x *VolumesListRequest) SetFilter(v string) { + x.xxx_hidden_Filter = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 2, 4) +} + +func (x *VolumesListRequest) SetOrder(v string) { + x.xxx_hidden_Order = &v + protoimpl.X.SetPresent(&(x.XXX_presence[0]), 3, 4) +} + +func (x *VolumesListRequest) HasOffset() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 0) +} + +func (x *VolumesListRequest) HasLimit() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 1) +} + +func (x *VolumesListRequest) HasFilter() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 2) +} + +func (x *VolumesListRequest) HasOrder() bool { + if x == nil { + return false + } + return protoimpl.X.Present(&(x.XXX_presence[0]), 3) +} + +func (x *VolumesListRequest) ClearOffset() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) + x.xxx_hidden_Offset = 0 +} + +func (x *VolumesListRequest) ClearLimit() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1) + x.xxx_hidden_Limit = 0 +} + +func (x *VolumesListRequest) ClearFilter() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 2) + x.xxx_hidden_Filter = nil +} + +func (x *VolumesListRequest) ClearOrder() { + protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 3) + x.xxx_hidden_Order = nil +} + +type VolumesListRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Index of the first result. If not specified the default value will be zero. + Offset *int32 + // Maximum number of results to be returned by the server. When not specified all the results will be returned. Note + // that there may not be enough results to return, and that the server may decide, for performance reasons, to return + // less results than requested. + Limit *int32 + // Filter criteria. + // + // The value of this parameter is a [CEL](https://cel.dev) expression used to select which objects to return. The + // built-in `this` variable refers to the object being tested and `now` refers to the current date and time. If the + // expression evaluates to `true` the object is included in the results. For example, to retrieve all volumes in the + // AVAILABLE state: + // + // this.status.state == 2 + // + // If this isn't provided, or if the value is empty, then all the volumes that the user has permission to see will be + // returned. Not all CEL constructs are currently supported for implementation reasons; see the filter documentation + // (docs/FILTER.md) for the full details. + Filter *string + // Order criteria. + // + // The syntax of this parameter is similar to the syntax of the _order by_ clause of a SQL statement, but using the + // names of the attributes of the volume instead of the names of the columns of a table. For example, in order to + // sort the volumes descending by size: + // + // spec.size_gib desc + // + // If the parameter isn't provided, or if the value is empty, then the order of the results is undefined. + Order *string +} + +func (b0 VolumesListRequest_builder) Build() *VolumesListRequest { + m0 := &VolumesListRequest{} + b, x := &b0, m0 + _, _ = b, x + if b.Offset != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 4) + x.xxx_hidden_Offset = *b.Offset + } + if b.Limit != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 4) + x.xxx_hidden_Limit = *b.Limit + } + if b.Filter != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 2, 4) + x.xxx_hidden_Filter = b.Filter + } + if b.Order != nil { + protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 3, 4) + x.xxx_hidden_Order = b.Order + } + return m0 +} + +type VolumesListResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Size int32 `protobuf:"varint,1,opt,name=size,proto3"` + xxx_hidden_Total int32 `protobuf:"varint,2,opt,name=total,proto3"` + xxx_hidden_Items *[]*Volume `protobuf:"bytes,3,rep,name=items,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesListResponse) Reset() { + *x = VolumesListResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesListResponse) ProtoMessage() {} + +func (x *VolumesListResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesListResponse) GetSize() int32 { + if x != nil { + return x.xxx_hidden_Size + } + return 0 +} + +func (x *VolumesListResponse) GetTotal() int32 { + if x != nil { + return x.xxx_hidden_Total + } + return 0 +} + +func (x *VolumesListResponse) GetItems() []*Volume { + if x != nil { + if x.xxx_hidden_Items != nil { + return *x.xxx_hidden_Items + } + } + return nil +} + +func (x *VolumesListResponse) SetSize(v int32) { + x.xxx_hidden_Size = v +} + +func (x *VolumesListResponse) SetTotal(v int32) { + x.xxx_hidden_Total = v +} + +func (x *VolumesListResponse) SetItems(v []*Volume) { + x.xxx_hidden_Items = &v +} + +type VolumesListResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + // Actual number of items returned. Note that this may be smaller than the value requested in the `limit` parameter + // of the request if there are not enough items, or if the system decides that returning that number of items isn't + // feasible or convenient for performance reasons. + Size int32 + // Total number of items of the collection that match the search criteria, regardless of the number of results + // requested with the `limit` parameter. + Total int32 + // List of results. + Items []*Volume +} + +func (b0 VolumesListResponse_builder) Build() *VolumesListResponse { + m0 := &VolumesListResponse{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Size = b.Size + x.xxx_hidden_Total = b.Total + x.xxx_hidden_Items = &b.Items + return m0 +} + +type VolumesGetRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Id string `protobuf:"bytes,1,opt,name=id,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesGetRequest) Reset() { + *x = VolumesGetRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesGetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesGetRequest) ProtoMessage() {} + +func (x *VolumesGetRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesGetRequest) GetId() string { + if x != nil { + return x.xxx_hidden_Id + } + return "" +} + +func (x *VolumesGetRequest) SetId(v string) { + x.xxx_hidden_Id = v +} + +type VolumesGetRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Id string +} + +func (b0 VolumesGetRequest_builder) Build() *VolumesGetRequest { + m0 := &VolumesGetRequest{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Id = b.Id + return m0 +} + +type VolumesGetResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Object *Volume `protobuf:"bytes,1,opt,name=object,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesGetResponse) Reset() { + *x = VolumesGetResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesGetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesGetResponse) ProtoMessage() {} + +func (x *VolumesGetResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesGetResponse) GetObject() *Volume { + if x != nil { + return x.xxx_hidden_Object + } + return nil +} + +func (x *VolumesGetResponse) SetObject(v *Volume) { + x.xxx_hidden_Object = v +} + +func (x *VolumesGetResponse) HasObject() bool { + if x == nil { + return false + } + return x.xxx_hidden_Object != nil +} + +func (x *VolumesGetResponse) ClearObject() { + x.xxx_hidden_Object = nil +} + +type VolumesGetResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Object *Volume +} + +func (b0 VolumesGetResponse_builder) Build() *VolumesGetResponse { + m0 := &VolumesGetResponse{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Object = b.Object + return m0 +} + +type VolumesCreateRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Object *Volume `protobuf:"bytes,1,opt,name=object,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesCreateRequest) Reset() { + *x = VolumesCreateRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesCreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesCreateRequest) ProtoMessage() {} + +func (x *VolumesCreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesCreateRequest) GetObject() *Volume { + if x != nil { + return x.xxx_hidden_Object + } + return nil +} + +func (x *VolumesCreateRequest) SetObject(v *Volume) { + x.xxx_hidden_Object = v +} + +func (x *VolumesCreateRequest) HasObject() bool { + if x == nil { + return false + } + return x.xxx_hidden_Object != nil +} + +func (x *VolumesCreateRequest) ClearObject() { + x.xxx_hidden_Object = nil +} + +type VolumesCreateRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Object *Volume +} + +func (b0 VolumesCreateRequest_builder) Build() *VolumesCreateRequest { + m0 := &VolumesCreateRequest{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Object = b.Object + return m0 +} + +type VolumesCreateResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Object *Volume `protobuf:"bytes,1,opt,name=object,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesCreateResponse) Reset() { + *x = VolumesCreateResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesCreateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesCreateResponse) ProtoMessage() {} + +func (x *VolumesCreateResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesCreateResponse) GetObject() *Volume { + if x != nil { + return x.xxx_hidden_Object + } + return nil +} + +func (x *VolumesCreateResponse) SetObject(v *Volume) { + x.xxx_hidden_Object = v +} + +func (x *VolumesCreateResponse) HasObject() bool { + if x == nil { + return false + } + return x.xxx_hidden_Object != nil +} + +func (x *VolumesCreateResponse) ClearObject() { + x.xxx_hidden_Object = nil +} + +type VolumesCreateResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Object *Volume +} + +func (b0 VolumesCreateResponse_builder) Build() *VolumesCreateResponse { + m0 := &VolumesCreateResponse{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Object = b.Object + return m0 +} + +type VolumesUpdateRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Object *Volume `protobuf:"bytes,1,opt,name=object,proto3"` + xxx_hidden_UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3"` + xxx_hidden_Lock bool `protobuf:"varint,3,opt,name=lock,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesUpdateRequest) Reset() { + *x = VolumesUpdateRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesUpdateRequest) ProtoMessage() {} + +func (x *VolumesUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesUpdateRequest) GetObject() *Volume { + if x != nil { + return x.xxx_hidden_Object + } + return nil +} + +func (x *VolumesUpdateRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.xxx_hidden_UpdateMask + } + return nil +} + +func (x *VolumesUpdateRequest) GetLock() bool { + if x != nil { + return x.xxx_hidden_Lock + } + return false +} + +func (x *VolumesUpdateRequest) SetObject(v *Volume) { + x.xxx_hidden_Object = v +} + +func (x *VolumesUpdateRequest) SetUpdateMask(v *fieldmaskpb.FieldMask) { + x.xxx_hidden_UpdateMask = v +} + +func (x *VolumesUpdateRequest) SetLock(v bool) { + x.xxx_hidden_Lock = v +} + +func (x *VolumesUpdateRequest) HasObject() bool { + if x == nil { + return false + } + return x.xxx_hidden_Object != nil +} + +func (x *VolumesUpdateRequest) HasUpdateMask() bool { + if x == nil { + return false + } + return x.xxx_hidden_UpdateMask != nil +} + +func (x *VolumesUpdateRequest) ClearObject() { + x.xxx_hidden_Object = nil +} + +func (x *VolumesUpdateRequest) ClearUpdateMask() { + x.xxx_hidden_UpdateMask = nil +} + +type VolumesUpdateRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Object *Volume + UpdateMask *fieldmaskpb.FieldMask + // Lock enables optimistic locking. When set to true, the server verifies that the current version of the object + // matches the value of the metadata.version field of the submitted object. If they differ the update will be + // rejected. This is useful to prevent lost updates when multiple clients are modifying the same object concurrently. + Lock bool +} + +func (b0 VolumesUpdateRequest_builder) Build() *VolumesUpdateRequest { + m0 := &VolumesUpdateRequest{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Object = b.Object + x.xxx_hidden_UpdateMask = b.UpdateMask + x.xxx_hidden_Lock = b.Lock + return m0 +} + +type VolumesUpdateResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Object *Volume `protobuf:"bytes,1,opt,name=object,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesUpdateResponse) Reset() { + *x = VolumesUpdateResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesUpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesUpdateResponse) ProtoMessage() {} + +func (x *VolumesUpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesUpdateResponse) GetObject() *Volume { + if x != nil { + return x.xxx_hidden_Object + } + return nil +} + +func (x *VolumesUpdateResponse) SetObject(v *Volume) { + x.xxx_hidden_Object = v +} + +func (x *VolumesUpdateResponse) HasObject() bool { + if x == nil { + return false + } + return x.xxx_hidden_Object != nil +} + +func (x *VolumesUpdateResponse) ClearObject() { + x.xxx_hidden_Object = nil +} + +type VolumesUpdateResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Object *Volume +} + +func (b0 VolumesUpdateResponse_builder) Build() *VolumesUpdateResponse { + m0 := &VolumesUpdateResponse{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Object = b.Object + return m0 +} + +type VolumesDeleteRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Id string `protobuf:"bytes,1,opt,name=id,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesDeleteRequest) Reset() { + *x = VolumesDeleteRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesDeleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesDeleteRequest) ProtoMessage() {} + +func (x *VolumesDeleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesDeleteRequest) GetId() string { + if x != nil { + return x.xxx_hidden_Id + } + return "" +} + +func (x *VolumesDeleteRequest) SetId(v string) { + x.xxx_hidden_Id = v +} + +type VolumesDeleteRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Id string +} + +func (b0 VolumesDeleteRequest_builder) Build() *VolumesDeleteRequest { + m0 := &VolumesDeleteRequest{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Id = b.Id + return m0 +} + +type VolumesDeleteResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesDeleteResponse) Reset() { + *x = VolumesDeleteResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesDeleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesDeleteResponse) ProtoMessage() {} + +func (x *VolumesDeleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +type VolumesDeleteResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + +} + +func (b0 VolumesDeleteResponse_builder) Build() *VolumesDeleteResponse { + m0 := &VolumesDeleteResponse{} + b, x := &b0, m0 + _, _ = b, x + return m0 +} + +type VolumesSignalRequest struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + xxx_hidden_Id string `protobuf:"bytes,1,opt,name=id,proto3"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesSignalRequest) Reset() { + *x = VolumesSignalRequest{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesSignalRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesSignalRequest) ProtoMessage() {} + +func (x *VolumesSignalRequest) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +func (x *VolumesSignalRequest) GetId() string { + if x != nil { + return x.xxx_hidden_Id + } + return "" +} + +func (x *VolumesSignalRequest) SetId(v string) { + x.xxx_hidden_Id = v +} + +type VolumesSignalRequest_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + + Id string +} + +func (b0 VolumesSignalRequest_builder) Build() *VolumesSignalRequest { + m0 := &VolumesSignalRequest{} + b, x := &b0, m0 + _, _ = b, x + x.xxx_hidden_Id = b.Id + return m0 +} + +type VolumesSignalResponse struct { + state protoimpl.MessageState `protogen:"opaque.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VolumesSignalResponse) Reset() { + *x = VolumesSignalResponse{} + mi := &file_osac_private_v1_volumes_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VolumesSignalResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VolumesSignalResponse) ProtoMessage() {} + +func (x *VolumesSignalResponse) ProtoReflect() protoreflect.Message { + mi := &file_osac_private_v1_volumes_service_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) +} + +type VolumesSignalResponse_builder struct { + _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. + +} + +func (b0 VolumesSignalResponse_builder) Build() *VolumesSignalResponse { + m0 := &VolumesSignalResponse{} + b, x := &b0, m0 + _, _ = b, x + return m0 +} + +var File_osac_private_v1_volumes_service_proto protoreflect.FileDescriptor + +var file_osac_private_v1_volumes_service_proto_rawDesc = string([]byte{ + 0x0a, 0x25, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 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, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xae, 0x01, 0x0a, 0x12, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x01, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x88, + 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x6e, 0x0a, 0x13, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x2d, 0x0a, + 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, + 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x23, 0x0a, 0x11, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x22, 0x45, 0x0a, 0x12, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, + 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x47, 0x0a, 0x14, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x22, 0x48, 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x73, 0x61, + 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x14, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, + 0x73, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x04, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x48, 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x22, 0x26, 0x0a, 0x14, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x26, 0x0a, 0x14, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x32, 0xf7, 0x05, 0x0a, 0x07, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x72, + 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x73, + 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x73, 0x12, 0x7c, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x22, 0x2e, 0x6f, 0x73, 0x61, 0x63, + 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x62, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0x88, 0x01, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x6f, 0x73, + 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x29, 0x3a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x62, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x06, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x62, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x32, 0x23, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x2f, 0x7b, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x69, + 0x64, 0x7d, 0x12, 0x7d, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x25, 0x2e, 0x6f, + 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x12, 0x59, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x25, 0x2e, 0x6f, 0x73, + 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xdf, 0x01, 0x0a, + 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x73, 0x61, 0x63, 0x2e, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x2e, 0x76, 0x31, 0x42, 0x13, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2d, 0x63, + 0x73, 0x69, 0x2d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x73, 0x61, 0x63, 0x2f, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x4f, 0x50, 0x58, 0xaa, 0x02, 0x0f, 0x4f, 0x73, 0x61, 0x63, 0x2e, 0x50, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x73, 0x61, 0x63, 0x5c, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x73, + 0x61, 0x63, 0x5c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x4f, 0x73, 0x61, + 0x63, 0x3a, 0x3a, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +}) + +var file_osac_private_v1_volumes_service_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_osac_private_v1_volumes_service_proto_goTypes = []any{ + (*VolumesListRequest)(nil), // 0: osac.private.v1.VolumesListRequest + (*VolumesListResponse)(nil), // 1: osac.private.v1.VolumesListResponse + (*VolumesGetRequest)(nil), // 2: osac.private.v1.VolumesGetRequest + (*VolumesGetResponse)(nil), // 3: osac.private.v1.VolumesGetResponse + (*VolumesCreateRequest)(nil), // 4: osac.private.v1.VolumesCreateRequest + (*VolumesCreateResponse)(nil), // 5: osac.private.v1.VolumesCreateResponse + (*VolumesUpdateRequest)(nil), // 6: osac.private.v1.VolumesUpdateRequest + (*VolumesUpdateResponse)(nil), // 7: osac.private.v1.VolumesUpdateResponse + (*VolumesDeleteRequest)(nil), // 8: osac.private.v1.VolumesDeleteRequest + (*VolumesDeleteResponse)(nil), // 9: osac.private.v1.VolumesDeleteResponse + (*VolumesSignalRequest)(nil), // 10: osac.private.v1.VolumesSignalRequest + (*VolumesSignalResponse)(nil), // 11: osac.private.v1.VolumesSignalResponse + (*Volume)(nil), // 12: osac.private.v1.Volume + (*fieldmaskpb.FieldMask)(nil), // 13: google.protobuf.FieldMask +} +var file_osac_private_v1_volumes_service_proto_depIdxs = []int32{ + 12, // 0: osac.private.v1.VolumesListResponse.items:type_name -> osac.private.v1.Volume + 12, // 1: osac.private.v1.VolumesGetResponse.object:type_name -> osac.private.v1.Volume + 12, // 2: osac.private.v1.VolumesCreateRequest.object:type_name -> osac.private.v1.Volume + 12, // 3: osac.private.v1.VolumesCreateResponse.object:type_name -> osac.private.v1.Volume + 12, // 4: osac.private.v1.VolumesUpdateRequest.object:type_name -> osac.private.v1.Volume + 13, // 5: osac.private.v1.VolumesUpdateRequest.update_mask:type_name -> google.protobuf.FieldMask + 12, // 6: osac.private.v1.VolumesUpdateResponse.object:type_name -> osac.private.v1.Volume + 0, // 7: osac.private.v1.Volumes.List:input_type -> osac.private.v1.VolumesListRequest + 2, // 8: osac.private.v1.Volumes.Get:input_type -> osac.private.v1.VolumesGetRequest + 4, // 9: osac.private.v1.Volumes.Create:input_type -> osac.private.v1.VolumesCreateRequest + 6, // 10: osac.private.v1.Volumes.Update:input_type -> osac.private.v1.VolumesUpdateRequest + 8, // 11: osac.private.v1.Volumes.Delete:input_type -> osac.private.v1.VolumesDeleteRequest + 10, // 12: osac.private.v1.Volumes.Signal:input_type -> osac.private.v1.VolumesSignalRequest + 1, // 13: osac.private.v1.Volumes.List:output_type -> osac.private.v1.VolumesListResponse + 3, // 14: osac.private.v1.Volumes.Get:output_type -> osac.private.v1.VolumesGetResponse + 5, // 15: osac.private.v1.Volumes.Create:output_type -> osac.private.v1.VolumesCreateResponse + 7, // 16: osac.private.v1.Volumes.Update:output_type -> osac.private.v1.VolumesUpdateResponse + 9, // 17: osac.private.v1.Volumes.Delete:output_type -> osac.private.v1.VolumesDeleteResponse + 11, // 18: osac.private.v1.Volumes.Signal:output_type -> osac.private.v1.VolumesSignalResponse + 13, // [13:19] is the sub-list for method output_type + 7, // [7:13] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_osac_private_v1_volumes_service_proto_init() } +func file_osac_private_v1_volumes_service_proto_init() { + if File_osac_private_v1_volumes_service_proto != nil { + return + } + file_osac_private_v1_volume_type_proto_init() + file_osac_private_v1_volumes_service_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_osac_private_v1_volumes_service_proto_rawDesc), len(file_osac_private_v1_volumes_service_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_osac_private_v1_volumes_service_proto_goTypes, + DependencyIndexes: file_osac_private_v1_volumes_service_proto_depIdxs, + MessageInfos: file_osac_private_v1_volumes_service_proto_msgTypes, + }.Build() + File_osac_private_v1_volumes_service_proto = out.File + file_osac_private_v1_volumes_service_proto_goTypes = nil + file_osac_private_v1_volumes_service_proto_depIdxs = nil +} diff --git a/osac-csi-driver/pkg/fulfillment/grpc_client.go b/osac-csi-driver/pkg/fulfillment/grpc_client.go new file mode 100644 index 0000000000..bbfdc4ab50 --- /dev/null +++ b/osac-csi-driver/pkg/fulfillment/grpc_client.go @@ -0,0 +1,189 @@ +package fulfillment + +import ( + "context" + "fmt" + + "google.golang.org/grpc" + + privatev1 "github.com/osac-project/osac/osac-csi-driver/internal/api/osac/private/v1" +) + +// bytesPerGiB is the number of bytes in one gibibyte, used to convert CSI +// capacity (bytes) to the fulfillment Volume spec (whole GiB). +const bytesPerGiB = 1024 * 1024 * 1024 + +// grpcVolumeClient is the production VolumeClient. It talks to the +// fulfillment-service private Volumes API over gRPC. The fulfillment-service +// owns volume inventory and tier resolution; the operator drives the actual +// vendor-side provisioning asynchronously, so a freshly created volume starts +// in CREATING and the CSI controller polls until it reaches AVAILABLE. +type grpcVolumeClient struct { + client privatev1.VolumesClient +} + +// NewVolumeClient returns a VolumeClient backed by the fulfillment-service +// private Volumes API on the given gRPC connection. The connection is expected +// to already carry transport credentials and the per-RPC bearer token (see +// dialFulfillment in cmd/osac-csi-driver). +func NewVolumeClient(conn grpc.ClientConnInterface) VolumeClient { + return &grpcVolumeClient{client: privatev1.NewVolumesClient(conn)} +} + +// CreateVolume creates a volume through the fulfillment service. It sets +// metadata.name to the CSI volume name (the PVC ref) so a retried CreateVolume +// for the same PVC can be resolved via ListVolumes, and metadata.tenant so the +// server scopes the volume to the requesting tenant. The server rejects an +// UNSPECIFIED access mode or a non-positive size, so those surface as +// InvalidArgument to the caller. gRPC status codes (notably AlreadyExists) are +// propagated unchanged for the controller's idempotency handling. +func (c *grpcVolumeClient) CreateVolume(ctx context.Context, params CreateVolumeParams) (*VolumeInfo, error) { + md := &privatev1.Metadata{} + md.SetName(params.PVCRef) + md.SetTenant(params.Tenant) + + spec := &privatev1.VolumeSpec{} + spec.SetStorageTier(params.Tier) + spec.SetSizeGib(bytesToGiB(params.SizeBytes)) + spec.SetAccessMode(toProtoAccessMode(params.AccessMode)) + + vol := &privatev1.Volume{} + vol.SetMetadata(md) + vol.SetSpec(spec) + + req := &privatev1.VolumesCreateRequest{} + req.SetObject(vol) + + resp, err := c.client.Create(ctx, req) + if err != nil { + return nil, err + } + return volumeToInfo(resp.GetObject()), nil +} + +// GetVolume fetches a volume by its fulfillment id. +func (c *grpcVolumeClient) GetVolume(ctx context.Context, volumeID string) (*VolumeInfo, error) { + req := &privatev1.VolumesGetRequest{} + req.SetId(volumeID) + + resp, err := c.client.Get(ctx, req) + if err != nil { + return nil, err + } + return volumeToInfo(resp.GetObject()), nil +} + +// ListVolumes lists volumes, optionally filtering by metadata.name. The name +// filter is used by the controller to resolve a volume created by a previous +// (retried) CreateVolume call. +func (c *grpcVolumeClient) ListVolumes(ctx context.Context, params ListVolumesParams) ([]*VolumeInfo, error) { + req := &privatev1.VolumesListRequest{} + if params.NameFilter != "" { + // CEL filter expression evaluated server-side (see fulfillment-service + // generic DAO filter language). + req.SetFilter(fmt.Sprintf("this.metadata.name == %q", params.NameFilter)) + } + + resp, err := c.client.List(ctx, req) + if err != nil { + return nil, err + } + + items := resp.GetItems() + result := make([]*VolumeInfo, 0, len(items)) + for _, v := range items { + result = append(result, volumeToInfo(v)) + } + return result, nil +} + +// DeleteVolume deletes a volume by its fulfillment id. The operator performs the +// vendor-side deprovision asynchronously once the record is removed. +func (c *grpcVolumeClient) DeleteVolume(ctx context.Context, volumeID string) error { + req := &privatev1.VolumesDeleteRequest{} + req.SetId(volumeID) + + _, err := c.client.Delete(ctx, req) + return err +} + +// bytesToGiB converts a byte count to whole GiB, rounding up so the provisioned +// volume is never smaller than requested. A non-positive input yields 0, which +// the server rejects with InvalidArgument. +func bytesToGiB(b int64) int64 { + if b <= 0 { + return 0 + } + return (b + bytesPerGiB - 1) / bytesPerGiB +} + +// toProtoAccessMode maps a CSI access-mode enum string +// (csi.VolumeCapability_AccessMode_Mode.String()) to the fulfillment proto +// VolumeAccessMode. The mapping mirrors the k8s external-provisioner's forward +// mapping (k8s -> CSI), reversed. Unknown values map to UNSPECIFIED, which the +// server rejects. +func toProtoAccessMode(csiMode string) privatev1.VolumeAccessMode { + switch csiMode { + case "SINGLE_NODE_WRITER", "SINGLE_NODE_MULTI_WRITER": + return privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_ONCE + case "SINGLE_NODE_SINGLE_WRITER": + return privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_ONCE_POD + case "SINGLE_NODE_READER_ONLY", "MULTI_NODE_READER_ONLY": + return privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_ONLY_MANY + case "MULTI_NODE_SINGLE_WRITER", "MULTI_NODE_MULTI_WRITER": + return privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_MANY + default: + return privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_UNSPECIFIED + } +} + +// volumeToInfo maps a proto Volume to the driver-internal VolumeInfo. Capacity +// is derived from the (immutable) spec size since the API tracks size in GiB. +func volumeToInfo(v *privatev1.Volume) *VolumeInfo { + if v == nil { + return nil + } + info := &VolumeInfo{ + ID: v.GetId(), + Name: v.GetMetadata().GetName(), + CapacityBytes: v.GetSpec().GetSizeGib() * bytesPerGiB, + } + if st := v.GetStatus(); st != nil { + info.State = fromProtoState(st.GetState()) + info.Backend = st.GetBackend() + info.VendorVolumeID = st.GetVendorVolumeId() + info.Protocol = fromProtoProtocol(st.GetProtocol()) + } + return info +} + +// fromProtoState maps the proto VolumeState to the driver-internal VolumeState. +// DELETED collapses onto DELETING (both mean "gone or going"); UNSPECIFIED maps +// to the empty state, which the controller's poll loop treats as unexpected. +func fromProtoState(s privatev1.VolumeState) VolumeState { + switch s { + case privatev1.VolumeState_VOLUME_STATE_CREATING: + return VolumeStateCreating + case privatev1.VolumeState_VOLUME_STATE_AVAILABLE: + return VolumeStateAvailable + case privatev1.VolumeState_VOLUME_STATE_DELETING, privatev1.VolumeState_VOLUME_STATE_DELETED: + return VolumeStateDeleting + case privatev1.VolumeState_VOLUME_STATE_FAILED: + return VolumeStateError + default: + return "" + } +} + +// fromProtoProtocol maps the proto StorageProtocol to the lowercase protocol +// string carried in the CSI volume context ("osac.protocol"). +func fromProtoProtocol(p privatev1.StorageProtocol) string { + switch p { + case privatev1.StorageProtocol_STORAGE_PROTOCOL_NFS: + return "nfs" + case privatev1.StorageProtocol_STORAGE_PROTOCOL_BLOCK: + return "block" + default: + return "" + } +} diff --git a/osac-csi-driver/pkg/fulfillment/grpc_client_test.go b/osac-csi-driver/pkg/fulfillment/grpc_client_test.go new file mode 100644 index 0000000000..ba0d7377ad --- /dev/null +++ b/osac-csi-driver/pkg/fulfillment/grpc_client_test.go @@ -0,0 +1,280 @@ +package fulfillment + +import ( + "context" + "testing" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + privatev1 "github.com/osac-project/osac/osac-csi-driver/internal/api/osac/private/v1" +) + +// fakeVolumesClient is a test double for the generated privatev1.VolumesClient. +// It records the last request of each type and returns canned responses/errors. +type fakeVolumesClient struct { + createReq *privatev1.VolumesCreateRequest + createResp *privatev1.VolumesCreateResponse + createErr error + + getReq *privatev1.VolumesGetRequest + getResp *privatev1.VolumesGetResponse + getErr error + + listReq *privatev1.VolumesListRequest + listResp *privatev1.VolumesListResponse + listErr error + + deleteReq *privatev1.VolumesDeleteRequest + deleteErr error +} + +func (f *fakeVolumesClient) Create(_ context.Context, in *privatev1.VolumesCreateRequest, _ ...grpc.CallOption) (*privatev1.VolumesCreateResponse, error) { + f.createReq = in + return f.createResp, f.createErr +} + +func (f *fakeVolumesClient) Get(_ context.Context, in *privatev1.VolumesGetRequest, _ ...grpc.CallOption) (*privatev1.VolumesGetResponse, error) { + f.getReq = in + return f.getResp, f.getErr +} + +func (f *fakeVolumesClient) List(_ context.Context, in *privatev1.VolumesListRequest, _ ...grpc.CallOption) (*privatev1.VolumesListResponse, error) { + f.listReq = in + return f.listResp, f.listErr +} + +func (f *fakeVolumesClient) Delete(_ context.Context, in *privatev1.VolumesDeleteRequest, _ ...grpc.CallOption) (*privatev1.VolumesDeleteResponse, error) { + f.deleteReq = in + return &privatev1.VolumesDeleteResponse{}, f.deleteErr +} + +func (f *fakeVolumesClient) Update(_ context.Context, _ *privatev1.VolumesUpdateRequest, _ ...grpc.CallOption) (*privatev1.VolumesUpdateResponse, error) { + return nil, nil +} + +func (f *fakeVolumesClient) Signal(_ context.Context, _ *privatev1.VolumesSignalRequest, _ ...grpc.CallOption) (*privatev1.VolumesSignalResponse, error) { + return nil, nil +} + +// newTestVolume builds a proto Volume with the given fields for response fixtures. +func newTestVolume(id, name string, state privatev1.VolumeState, backend, vendorID string, proto privatev1.StorageProtocol, sizeGiB int64) *privatev1.Volume { + md := &privatev1.Metadata{} + md.SetName(name) + spec := &privatev1.VolumeSpec{} + spec.SetSizeGib(sizeGiB) + st := &privatev1.VolumeStatus{} + st.SetState(state) + st.SetBackend(backend) + st.SetVendorVolumeId(vendorID) + st.SetProtocol(proto) + v := &privatev1.Volume{} + v.SetId(id) + v.SetMetadata(md) + v.SetSpec(spec) + v.SetStatus(st) + return v +} + +func TestCreateVolumeMapsRequestAndResponse(t *testing.T) { + resp := &privatev1.VolumesCreateResponse{} + resp.SetObject(newTestVolume("vol-1", "pvc-abc", privatev1.VolumeState_VOLUME_STATE_CREATING, + "vast-backend", "", privatev1.StorageProtocol_STORAGE_PROTOCOL_NFS, 5)) + fake := &fakeVolumesClient{createResp: resp} + c := &grpcVolumeClient{client: fake} + + info, err := c.CreateVolume(context.Background(), CreateVolumeParams{ + Tenant: "tenant-a", + Tier: "gold", + SizeBytes: 5 * bytesPerGiB, + AccessMode: "SINGLE_NODE_WRITER", + PVCRef: "pvc-abc", + }) + if err != nil { + t.Fatalf("CreateVolume returned error: %v", err) + } + + // Request mapping. + gotObj := fake.createReq.GetObject() + if got := gotObj.GetMetadata().GetName(); got != "pvc-abc" { + t.Errorf("metadata.name = %q, want %q", got, "pvc-abc") + } + if got := gotObj.GetMetadata().GetTenant(); got != "tenant-a" { + t.Errorf("metadata.tenant = %q, want %q", got, "tenant-a") + } + if got := gotObj.GetSpec().GetStorageTier(); got != "gold" { + t.Errorf("spec.storage_tier = %q, want %q", got, "gold") + } + if got := gotObj.GetSpec().GetSizeGib(); got != 5 { + t.Errorf("spec.size_gib = %d, want 5", got) + } + if got := gotObj.GetSpec().GetAccessMode(); got != privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_ONCE { + t.Errorf("spec.access_mode = %v, want READ_WRITE_ONCE", got) + } + + // Response mapping. + if info.ID != "vol-1" || info.Name != "pvc-abc" { + t.Errorf("info id/name = %q/%q, want vol-1/pvc-abc", info.ID, info.Name) + } + if info.State != VolumeStateCreating { + t.Errorf("info.State = %q, want CREATING", info.State) + } + if info.Backend != "vast-backend" { + t.Errorf("info.Backend = %q, want vast-backend", info.Backend) + } + if info.CapacityBytes != 5*bytesPerGiB { + t.Errorf("info.CapacityBytes = %d, want %d", info.CapacityBytes, 5*bytesPerGiB) + } +} + +func TestCreateVolumePropagatesAlreadyExists(t *testing.T) { + fake := &fakeVolumesClient{createErr: status.Error(codes.AlreadyExists, "dup")} + c := &grpcVolumeClient{client: fake} + + _, err := c.CreateVolume(context.Background(), CreateVolumeParams{Tenant: "t", Tier: "gold", SizeBytes: bytesPerGiB, AccessMode: "SINGLE_NODE_WRITER", PVCRef: "pvc-x"}) + if status.Code(err) != codes.AlreadyExists { + t.Fatalf("expected AlreadyExists, got %v", err) + } +} + +func TestListVolumesBuildsNameFilter(t *testing.T) { + resp := &privatev1.VolumesListResponse{} + resp.SetItems([]*privatev1.Volume{ + newTestVolume("vol-1", "pvc-abc", privatev1.VolumeState_VOLUME_STATE_AVAILABLE, + "vast-backend", "vendor-9", privatev1.StorageProtocol_STORAGE_PROTOCOL_BLOCK, 2), + }) + fake := &fakeVolumesClient{listResp: resp} + c := &grpcVolumeClient{client: fake} + + infos, err := c.ListVolumes(context.Background(), ListVolumesParams{NameFilter: "pvc-abc"}) + if err != nil { + t.Fatalf("ListVolumes error: %v", err) + } + if got, want := fake.listReq.GetFilter(), `this.metadata.name == "pvc-abc"`; got != want { + t.Errorf("filter = %q, want %q", got, want) + } + if len(infos) != 1 { + t.Fatalf("expected 1 volume, got %d", len(infos)) + } + if infos[0].VendorVolumeID != "vendor-9" { + t.Errorf("VendorVolumeID = %q, want vendor-9", infos[0].VendorVolumeID) + } + if infos[0].Protocol != "block" { + t.Errorf("Protocol = %q, want block", infos[0].Protocol) + } + if infos[0].State != VolumeStateAvailable { + t.Errorf("State = %q, want AVAILABLE", infos[0].State) + } +} + +func TestListVolumesNoFilterOmitsFilter(t *testing.T) { + fake := &fakeVolumesClient{listResp: &privatev1.VolumesListResponse{}} + c := &grpcVolumeClient{client: fake} + if _, err := c.ListVolumes(context.Background(), ListVolumesParams{}); err != nil { + t.Fatalf("ListVolumes error: %v", err) + } + if got := fake.listReq.GetFilter(); got != "" { + t.Errorf("expected empty filter, got %q", got) + } +} + +func TestGetAndDeleteVolumeMapIDs(t *testing.T) { + getResp := &privatev1.VolumesGetResponse{} + getResp.SetObject(newTestVolume("vol-7", "pvc-z", privatev1.VolumeState_VOLUME_STATE_AVAILABLE, + "b", "vendor-7", privatev1.StorageProtocol_STORAGE_PROTOCOL_NFS, 1)) + fake := &fakeVolumesClient{getResp: getResp} + c := &grpcVolumeClient{client: fake} + + info, err := c.GetVolume(context.Background(), "vol-7") + if err != nil { + t.Fatalf("GetVolume error: %v", err) + } + if fake.getReq.GetId() != "vol-7" { + t.Errorf("get id = %q, want vol-7", fake.getReq.GetId()) + } + if info.ID != "vol-7" { + t.Errorf("info.ID = %q, want vol-7", info.ID) + } + + if err := c.DeleteVolume(context.Background(), "vol-7"); err != nil { + t.Fatalf("DeleteVolume error: %v", err) + } + if fake.deleteReq.GetId() != "vol-7" { + t.Errorf("delete id = %q, want vol-7", fake.deleteReq.GetId()) + } +} + +func TestGetVolumePropagatesNotFound(t *testing.T) { + fake := &fakeVolumesClient{getErr: status.Error(codes.NotFound, "missing")} + c := &grpcVolumeClient{client: fake} + if _, err := c.GetVolume(context.Background(), "nope"); status.Code(err) != codes.NotFound { + t.Fatalf("expected NotFound, got %v", err) + } +} + +func TestBytesToGiB(t *testing.T) { + cases := []struct { + in int64 + want int64 + }{ + {0, 0}, + {-1, 0}, + {1, 1}, + {bytesPerGiB, 1}, + {bytesPerGiB + 1, 2}, + {5 * bytesPerGiB, 5}, + {5*bytesPerGiB - 1, 5}, + } + for _, tc := range cases { + if got := bytesToGiB(tc.in); got != tc.want { + t.Errorf("bytesToGiB(%d) = %d, want %d", tc.in, got, tc.want) + } + } +} + +func TestToProtoAccessMode(t *testing.T) { + cases := map[string]privatev1.VolumeAccessMode{ + "SINGLE_NODE_WRITER": privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_ONCE, + "SINGLE_NODE_MULTI_WRITER": privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_ONCE, + "SINGLE_NODE_SINGLE_WRITER": privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_ONCE_POD, + "SINGLE_NODE_READER_ONLY": privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_ONLY_MANY, + "MULTI_NODE_READER_ONLY": privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_ONLY_MANY, + "MULTI_NODE_SINGLE_WRITER": privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_MANY, + "MULTI_NODE_MULTI_WRITER": privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_READ_WRITE_MANY, + "UNKNOWN": privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_UNSPECIFIED, + "": privatev1.VolumeAccessMode_VOLUME_ACCESS_MODE_UNSPECIFIED, + } + for in, want := range cases { + if got := toProtoAccessMode(in); got != want { + t.Errorf("toProtoAccessMode(%q) = %v, want %v", in, got, want) + } + } +} + +func TestFromProtoStateAndProtocol(t *testing.T) { + states := map[privatev1.VolumeState]VolumeState{ + privatev1.VolumeState_VOLUME_STATE_CREATING: VolumeStateCreating, + privatev1.VolumeState_VOLUME_STATE_AVAILABLE: VolumeStateAvailable, + privatev1.VolumeState_VOLUME_STATE_DELETING: VolumeStateDeleting, + privatev1.VolumeState_VOLUME_STATE_DELETED: VolumeStateDeleting, + privatev1.VolumeState_VOLUME_STATE_FAILED: VolumeStateError, + privatev1.VolumeState_VOLUME_STATE_UNSPECIFIED: VolumeState(""), + } + for in, want := range states { + if got := fromProtoState(in); got != want { + t.Errorf("fromProtoState(%v) = %q, want %q", in, got, want) + } + } + + protocols := map[privatev1.StorageProtocol]string{ + privatev1.StorageProtocol_STORAGE_PROTOCOL_NFS: "nfs", + privatev1.StorageProtocol_STORAGE_PROTOCOL_BLOCK: "block", + privatev1.StorageProtocol_STORAGE_PROTOCOL_UNSPECIFIED: "", + } + for in, want := range protocols { + if got := fromProtoProtocol(in); got != want { + t.Errorf("fromProtoProtocol(%v) = %q, want %q", in, got, want) + } + } +} From 72fa8640170e96aa0153643de890b5def206ea8a Mon Sep 17 00:00:00 2001 From: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com> Date: Wed, 19 Aug 2026 17:37:09 -0400 Subject: [PATCH 2/3] OSAC-4109: rename CSI realm role and grant shared-model tenant scope Rename the CSI driver realm role from "osac-csi" to "osac-csi-driver" so it does not collide with VAST's array-side VMS role "osac-csi-", and to match the per-tenant client naming ("osac-csi-driver-"). Grant the CSI identity universal tenant scope. The driver currently authenticates with a single shared client that has no per-tenant organization claim, so it needs universal scope to manage volumes for any tenant; the tenant is carried on the request (metadata.tenant from the StorageClass parameter). This is temporary: while it is in place fulfillment does not enforce tenant isolation by identity for CSI calls. It is removed when per-tenant clients land, tracked in OSAC-4197. Add "not is_csi" guards to the non-admin tenant-scope rules so the new universal grant does not conflict with them during policy evaluation. Update the authz interceptor tests for the rename and the new universal-scope behavior. Assisted-by: Claude Code Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com> --- .../auth/grpc_authz_interceptor_test.go | 42 +++++++++---------- .../internal/auth/policies/authz.rego | 24 +++++++++-- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/fulfillment-service/internal/auth/grpc_authz_interceptor_test.go b/fulfillment-service/internal/auth/grpc_authz_interceptor_test.go index 23a7f689f6..245c41c458 100644 --- a/fulfillment-service/internal/auth/grpc_authz_interceptor_test.go +++ b/fulfillment-service/internal/auth/grpc_authz_interceptor_test.go @@ -544,18 +544,18 @@ var _ = Describe("Rego authorization interceptor", func() { ), ) - // The CSI driver authenticates as a per-tenant Keycloak client - // 'osac-csi-' whose service account is granted the dedicated - // 'osac-csi' realm role. Authorization keys on that role - assigned only - // by a realm administrator - not on the username, so an ordinary user - // cannot obtain CSI permissions by choosing a matching username - // (OSAC-3279). The token also carries the tenant's organization claim, - // which the application layer uses to scope volumes to that tenant. + // The CSI driver's Keycloak service account is granted the dedicated + // 'osac-csi-driver' realm role. Authorization keys on that role - + // assigned only by a realm administrator - not on the username, so an + // ordinary user cannot obtain CSI permissions by choosing a matching + // username (OSAC-3279). TEMPORARY (OSAC-4109): the driver uses a single + // shared client, so the identity is granted universal tenant scope; the + // tenant is carried on the request. Reverts to per-tenant scope when + // per-tenant 'osac-csi-driver-' clients land (OSAC-4197). createCSIToken := func() *jwt.Token { - return createKeycloakServiceAccountToken("osac-csi-acme", jwt.MapClaims{ - "organization": []any{"acme"}, + return createKeycloakServiceAccountToken("osac-csi-driver", jwt.MapClaims{ "realm_access": map[string]any{ - "roles": []any{"osac-csi"}, + "roles": []any{"osac-csi-driver"}, }, }) } @@ -573,12 +573,12 @@ var _ = Describe("Rego authorization interceptor", func() { }, func(ctx context.Context, req any) (any, error) { subject := SubjectFromContext(ctx) - Expect(subject.User).To(Equal("service-account-osac-csi-acme")) - // The CSI identity is tenant-scoped, never universal: the - // application layer confines volumes to this tenant. - Expect(subject.Tenants.Universal()).To(BeFalse()) - Expect(subject.Tenants.Finite()).To(BeTrue()) - Expect(subject.Tenants.Inclusions()).To(ConsistOf("acme")) + Expect(subject.User).To(Equal("service-account-osac-csi-driver")) + // TEMPORARY (OSAC-4109): the shared CSI client is granted + // universal tenant scope; the tenant is carried on the + // request rather than enforced by identity. Reverts to + // tenant-scoped with per-tenant clients (OSAC-4197). + Expect(subject.Tenants.Universal()).To(BeTrue()) handled = true return nil, nil }, @@ -627,12 +627,12 @@ var _ = Describe("Rego authorization interceptor", func() { Entry("Public Clusters Get", "/osac.public.v1.Clusters/Get"), ) - // Authorization must key on the 'osac-csi' realm role, not the username. - // An identity that merely looks like a CSI service account - whether a - // regular user with a CSI-shaped username or a service account without the - // role - must be denied. + // Authorization must key on the 'osac-csi-driver' realm role, not the + // username. An identity that merely looks like a CSI service account - + // whether a regular user with a CSI-shaped username or a service account + // without the role - must be denied. DescribeTable( - "Denies identities that lack the osac-csi realm role on the Volume API", + "Denies identities that lack the osac-csi-driver realm role on the Volume API", func(ctx context.Context, token *jwt.Token) { ctx = ContextWithToken(ctx, token) handled := false diff --git a/fulfillment-service/internal/auth/policies/authz.rego b/fulfillment-service/internal/auth/policies/authz.rego index 838f410db1..cefa4d8bca 100644 --- a/fulfillment-service/internal/auth/policies/authz.rego +++ b/fulfillment-service/internal/auth/policies/authz.rego @@ -140,13 +140,16 @@ is_tenant_idp_manager if { role in tenant_idp_manager_roles } -# CSI driver realm roles. The OSAC CSI driver authenticates as a per-tenant Keycloak client -# ("osac-csi-") whose service account is granted the "osac-csi" realm role. +# CSI driver realm roles. The OSAC CSI driver's Keycloak service account is granted the +# "osac-csi-driver" realm role. The role name is distinct from VAST's array-side VMS role +# "osac-csi-" to avoid collision. Short term the driver uses a single shared client; +# the end state is a per-tenant client ("osac-csi-driver-") carrying that tenant's +# organization claim. csi_client_roles := { - "osac-csi", + "osac-csi-driver", } -# CSI driver identity. Authorization keys on the "osac-csi" realm role - assigned only by a +# CSI driver identity. Authorization keys on the "osac-csi-driver" realm role - assigned only by a # realm administrator - rather than on the username. Keying on the username would be unsafe: # users and service accounts share the same username field, so an ordinary user could obtain # CSI permissions by choosing a matching username. The CSI driver is a restricted identity - @@ -454,11 +457,24 @@ subject_user = split(input.auth.identity.user.username, ":")[3] if { subject_tenant_result = ["*"] if { is_admin } + +# TEMPORARY (shared CSI model, OSAC-4109): the CSI driver currently authenticates with a +# single shared "osac-csi-driver" client that has no per-tenant organization claim, so it is +# granted universal tenant scope here. The tenant a volume belongs to is carried on the +# request (metadata.tenant, from the StorageClass "tenant" parameter) rather than enforced by +# identity. This is a deliberate short-term shortcut: it means fulfillment does NOT enforce +# tenant isolation by identity for CSI calls. Remove this rule (and the "not is_csi" guards +# below) once per-tenant "osac-csi-driver-" clients land - tracked in OSAC-4197. +subject_tenant_result = ["*"] if { + is_csi +} subject_tenant_result = subject_tenants if { not is_admin + not is_csi input.auth.identity.authnMethod == "jwt" } subject_tenant_result = [split(input.auth.identity.user.username, ":")[2]] if { not is_admin + not is_csi input.auth.identity.authnMethod == "serviceaccount" } From 35c232eb2bc20e60d4064f877edef9aef0446214 Mon Sep 17 00:00:00 2001 From: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com> Date: Wed, 19 Aug 2026 22:20:08 -0400 Subject: [PATCH 3/3] OSAC-4109: address review feedback on the VolumeClient Guard against a nil volume object in CreateVolume and GetVolume: the real gRPC client previously returned (nil, nil) when the server response carried no object, which the controller's poll loop would dereference and panic on (the in-memory stub never did this). Both now return an Internal error instead. Make the byte<->GiB capacity conversions overflow-safe: bytesToGiB divides before adjusting for a remainder (no rounding overflow near math.MaxInt64), and the GiB->bytes conversion clamps at math.MaxInt64 for malformed server sizes. Log the fulfillment-service connection close error instead of discarding it, and document that CreateVolumeParams.ClusterID is intentionally not carried to the private Volume API (which has no corresponding field). Assisted-by: Claude Code Signed-off-by: akshaynadkarni <25892229+akshaynadkarni@users.noreply.github.com> --- osac-csi-driver/cmd/osac-csi-driver/main.go | 6 ++- .../pkg/fulfillment/grpc_client.go | 36 +++++++++++++-- .../pkg/fulfillment/grpc_client_test.go | 45 +++++++++++++++++++ 3 files changed, 83 insertions(+), 4 deletions(-) diff --git a/osac-csi-driver/cmd/osac-csi-driver/main.go b/osac-csi-driver/cmd/osac-csi-driver/main.go index fa4187364b..628fdb4d76 100644 --- a/osac-csi-driver/cmd/osac-csi-driver/main.go +++ b/osac-csi-driver/cmd/osac-csi-driver/main.go @@ -65,7 +65,11 @@ func main() { if err != nil { klog.Fatalf("Failed to connect to fulfillment-service: %v", err) } - defer func() { _ = conn.Close() }() + defer func() { + if cerr := conn.Close(); cerr != nil { + klog.Warningf("error closing fulfillment-service connection: %v", cerr) + } + }() klog.Infof("Fulfillment endpoint: %s (connected)", *fulfillmentEndpoint) volumeClient = fulfillment.NewVolumeClient(conn) } else { diff --git a/osac-csi-driver/pkg/fulfillment/grpc_client.go b/osac-csi-driver/pkg/fulfillment/grpc_client.go index bbfdc4ab50..e546afdeea 100644 --- a/osac-csi-driver/pkg/fulfillment/grpc_client.go +++ b/osac-csi-driver/pkg/fulfillment/grpc_client.go @@ -3,8 +3,11 @@ package fulfillment import ( "context" "fmt" + "math" "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" privatev1 "github.com/osac-project/osac/osac-csi-driver/internal/api/osac/private/v1" ) @@ -47,6 +50,9 @@ func (c *grpcVolumeClient) CreateVolume(ctx context.Context, params CreateVolume spec.SetSizeGib(bytesToGiB(params.SizeBytes)) spec.SetAccessMode(toProtoAccessMode(params.AccessMode)) + // params.ClusterID has no corresponding field on the private Volume API, so + // cluster provenance is intentionally not carried to fulfillment here. + vol := &privatev1.Volume{} vol.SetMetadata(md) vol.SetSpec(spec) @@ -58,6 +64,9 @@ func (c *grpcVolumeClient) CreateVolume(ctx context.Context, params CreateVolume if err != nil { return nil, err } + if resp.GetObject() == nil { + return nil, status.Errorf(codes.Internal, "fulfillment returned no volume object for %q", params.PVCRef) + } return volumeToInfo(resp.GetObject()), nil } @@ -70,6 +79,9 @@ func (c *grpcVolumeClient) GetVolume(ctx context.Context, volumeID string) (*Vol if err != nil { return nil, err } + if resp.GetObject() == nil { + return nil, status.Errorf(codes.Internal, "fulfillment returned no volume object for id %q", volumeID) + } return volumeToInfo(resp.GetObject()), nil } @@ -109,12 +121,30 @@ func (c *grpcVolumeClient) DeleteVolume(ctx context.Context, volumeID string) er // bytesToGiB converts a byte count to whole GiB, rounding up so the provisioned // volume is never smaller than requested. A non-positive input yields 0, which -// the server rejects with InvalidArgument. +// the server rejects with InvalidArgument. It divides before adjusting for a +// remainder so the rounding cannot overflow for byte counts near math.MaxInt64. func bytesToGiB(b int64) int64 { if b <= 0 { return 0 } - return (b + bytesPerGiB - 1) / bytesPerGiB + gib := b / bytesPerGiB + if b%bytesPerGiB != 0 { + gib++ + } + return gib +} + +// gibToBytes converts whole GiB to bytes, clamping at math.MaxInt64 to avoid +// overflow (a negative capacity) on a malformed, excessively large +// server-provided size. +func gibToBytes(gib int64) int64 { + if gib <= 0 { + return 0 + } + if gib > math.MaxInt64/bytesPerGiB { + return math.MaxInt64 + } + return gib * bytesPerGiB } // toProtoAccessMode maps a CSI access-mode enum string @@ -146,7 +176,7 @@ func volumeToInfo(v *privatev1.Volume) *VolumeInfo { info := &VolumeInfo{ ID: v.GetId(), Name: v.GetMetadata().GetName(), - CapacityBytes: v.GetSpec().GetSizeGib() * bytesPerGiB, + CapacityBytes: gibToBytes(v.GetSpec().GetSizeGib()), } if st := v.GetStatus(); st != nil { info.State = fromProtoState(st.GetState()) diff --git a/osac-csi-driver/pkg/fulfillment/grpc_client_test.go b/osac-csi-driver/pkg/fulfillment/grpc_client_test.go index ba0d7377ad..debb7c7bb5 100644 --- a/osac-csi-driver/pkg/fulfillment/grpc_client_test.go +++ b/osac-csi-driver/pkg/fulfillment/grpc_client_test.go @@ -2,6 +2,7 @@ package fulfillment import ( "context" + "math" "testing" "google.golang.org/grpc" @@ -225,12 +226,36 @@ func TestBytesToGiB(t *testing.T) { {bytesPerGiB + 1, 2}, {5 * bytesPerGiB, 5}, {5*bytesPerGiB - 1, 5}, + {1 << 62, 1 << 32}, // exact: 2^62 bytes / 2^30 = 2^32 GiB } for _, tc := range cases { if got := bytesToGiB(tc.in); got != tc.want { t.Errorf("bytesToGiB(%d) = %d, want %d", tc.in, got, tc.want) } } + // Near-max input must not overflow to a negative/zero result. + if got := bytesToGiB(math.MaxInt64); got <= 0 { + t.Errorf("bytesToGiB(MaxInt64) = %d, want a positive value (no overflow)", got) + } +} + +func TestGibToBytes(t *testing.T) { + cases := []struct { + in int64 + want int64 + }{ + {0, 0}, + {-1, 0}, + {1, bytesPerGiB}, + {5, 5 * bytesPerGiB}, + {math.MaxInt64, math.MaxInt64}, // clamped, no overflow + {math.MaxInt64 / bytesPerGiB, (math.MaxInt64 / bytesPerGiB) * bytesPerGiB}, + } + for _, tc := range cases { + if got := gibToBytes(tc.in); got != tc.want { + t.Errorf("gibToBytes(%d) = %d, want %d", tc.in, got, tc.want) + } + } } func TestToProtoAccessMode(t *testing.T) { @@ -278,3 +303,23 @@ func TestFromProtoStateAndProtocol(t *testing.T) { } } } + +func TestCreateVolumeNilObjectErrors(t *testing.T) { + // Server returns a response with no object; the client must surface an error + // rather than (nil, nil), which the controller's poll loop would panic on. + fake := &fakeVolumesClient{createResp: &privatev1.VolumesCreateResponse{}} + c := &grpcVolumeClient{client: fake} + if _, err := c.CreateVolume(context.Background(), CreateVolumeParams{ + Tenant: "t", Tier: "gold", SizeBytes: bytesPerGiB, AccessMode: "SINGLE_NODE_WRITER", PVCRef: "pvc-x", + }); status.Code(err) != codes.Internal { + t.Fatalf("expected Internal error for nil object, got %v", err) + } +} + +func TestGetVolumeNilObjectErrors(t *testing.T) { + fake := &fakeVolumesClient{getResp: &privatev1.VolumesGetResponse{}} + c := &grpcVolumeClient{client: fake} + if _, err := c.GetVolume(context.Background(), "vol-1"); status.Code(err) != codes.Internal { + t.Fatalf("expected Internal error for nil object, got %v", err) + } +}