From 3ef551a5c4415a72a6bffd1617014c5f2d8ed06c Mon Sep 17 00:00:00 2001 From: Dhananjay Nagargoje Date: Fri, 19 Jan 2024 17:20:03 +0530 Subject: [PATCH 01/22] Added wait in volume expansion for volume to become available --- pkg/csi/driver/bv_controller.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/csi/driver/bv_controller.go b/pkg/csi/driver/bv_controller.go index 3f2bfc08a..8ea33b392 100644 --- a/pkg/csi/driver/bv_controller.go +++ b/pkg/csi/driver/bv_controller.go @@ -1253,6 +1253,16 @@ func (d *BlockVolumeControllerDriver) ControllerExpandVolume(ctx context.Context metrics.SendMetricData(d.metricPusher, metrics.PVExpand, time.Since(startTime).Seconds(), dimensionsMap) return nil, status.Error(codes.Internal, message) } + _, err = d.client.BlockStorage().AwaitVolumeAvailableORTimeout(ctx, volumeId) + if err != nil { + log.With("service", "blockstorage", "verb", "get", "resource", "volume", "statusCode", util.GetHttpStatusCode(err)). + Error("Volume Expansion failed with time out") + errorType = util.GetError(err) + csiMetricDimension = util.GetMetricDimensionForComponent(errorType, util.CSIStorageType) + dimensionsMap[metrics.ComponentDimension] = csiMetricDimension + metrics.SendMetricData(d.metricPusher, metrics.PVExpand, time.Since(startTime).Seconds(), dimensionsMap) + return nil, status.Errorf(codes.DeadlineExceeded, "ControllerExpand failed with time out %v", err.Error()) + } log.Info("Volume is expanded.") csiMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.CSIStorageType) From 8193d8e2091f072644c5877bd0e302610cea463d Mon Sep 17 00:00:00 2001 From: Pranav Sriram Date: Mon, 12 Feb 2024 15:07:38 +0530 Subject: [PATCH 02/22] fix security list rule clean up flow for OCI loadbalancer delete calls --- .../providers/oci/load_balancer.go | 1 + .../oci/load_balancer_security_lists.go | 21 ++++++++----- .../providers/oci/load_balancer_spec.go | 14 +++++++-- .../providers/oci/load_balancer_spec_test.go | 31 +++++++++++++++++-- 4 files changed, 53 insertions(+), 14 deletions(-) diff --git a/pkg/cloudprovider/providers/oci/load_balancer.go b/pkg/cloudprovider/providers/oci/load_balancer.go index 9fad45916..52e9945c3 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer.go +++ b/pkg/cloudprovider/providers/oci/load_balancer.go @@ -1422,6 +1422,7 @@ func (cp *CloudProvider) cleanupSecurityRulesForLoadBalancerDelete(lb *client.Ge return errors.Wrapf(err, "delete security rules for listener %q on load balancer %q", listenerName, name) } + logger.Infof("Security rule management mode %s", securityRuleManagerMode) if securityRuleManagerMode == ManagementModeAll || securityRuleManagerMode == ManagementModeFrontend { if err = securityListManager.Delete(ctx, lbSubnets, nodeSubnets, ports, sourceCIDRs, isPreserveSource); err != nil { logger.With(zap.Error(err)).Errorf("Failed to delete security rules for listener %q on load balancer %q", listenerName, name) diff --git a/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go b/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go index 42a8af2a8..8bcb584b0 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go @@ -382,7 +382,7 @@ func getNodeIngressRules( "source", *rule.Source, "destinationPortRangeMin", *rule.TcpOptions.DestinationPortRange.Min, "destinationPortRangeMax", *rule.TcpOptions.DestinationPortRange.Max, - ).Debug("Deleting load balancer ingres security rule") + ).Debug("Deleting node ingress security rule") continue } } @@ -512,7 +512,7 @@ func getLoadBalancerIngressRules( "source", *rule.Source, "destinationPortRangeMin", *rule.TcpOptions.DestinationPortRange.Min, "destinationPortRangeMax", *rule.TcpOptions.DestinationPortRange.Max, - ).Debug("Deleting load balancer ingres security rule") + ).Debug("Deleting load balancer ingress security rule") } if desired.Len() == 0 { @@ -558,7 +558,7 @@ func getLoadBalancerEgressRules( "destination", *rule.Destination, "destinationPortRangeMin", *rule.TcpOptions.DestinationPortRange.Min, "destinationPortRangeMax", *rule.TcpOptions.DestinationPortRange.Max, - ).Debug("Deleting load balancer ingres security rule") + ).Debug("Deleting load balancer egress security rule") continue } @@ -655,15 +655,20 @@ func makeIngressSecurityRule(cidrBlock string, port int) core.IngressSecurityRul func portInUse(serviceLister listersv1.ServiceLister, port int32) (bool, error) { serviceList, err := serviceLister.List(labels.Everything()) + if err != nil { return false, err } for _, service := range serviceList { - if service.Spec.Type == api.ServiceTypeLoadBalancer { - for _, p := range service.Spec.Ports { - if p.Port == port { - return true, nil - } + if service.DeletionTimestamp != nil { + continue + } + if service.Spec.Type != api.ServiceTypeLoadBalancer { + continue + } + for _, p := range service.Spec.Ports { + if p.Port == port { + return true, nil } } } diff --git a/pkg/cloudprovider/providers/oci/load_balancer_spec.go b/pkg/cloudprovider/providers/oci/load_balancer_spec.go index 20061cba2..58bb5e051 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_spec.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_spec.go @@ -421,17 +421,17 @@ func NewLBSpec(logger *zap.SugaredLogger, svc *v1.Service, nodes []*v1.Node, sub func getSecurityListManagementMode(svc *v1.Service) (string, error) { lbType := getLoadBalancerType(svc) + logger := *zap.L().Sugar() knownSecListModes := map[string]struct{}{ ManagementModeAll: struct{}{}, ManagementModeNone: struct{}{}, ManagementModeFrontend: struct{}{}, } - + annotationExists := false + var annotationValue string switch lbType { case NLB: { - annotationExists := false - var annotationValue string annotationValue, annotationExists = svc.Annotations[ServiceAnnotationNetworkLoadBalancerSecurityListManagementMode] if !annotationExists { return ManagementModeNone, nil @@ -442,6 +442,14 @@ func getSecurityListManagementMode(svc *v1.Service) (string, error) { return svc.Annotations[ServiceAnnotationNetworkLoadBalancerSecurityListManagementMode], nil } default: + annotationValue, annotationExists = svc.Annotations[ServiceAnnotationLoadBalancerSecurityListManagementMode] + if !annotationExists { + return ManagementModeAll, nil + } + if _, ok := knownSecListModes[annotationValue]; !ok { + logger.Infof("invalid value: %s provided for annotation: %s; using default All", annotationValue, ServiceAnnotationLoadBalancerSecurityListManagementMode) + return ManagementModeAll, nil + } return svc.Annotations[ServiceAnnotationLoadBalancerSecurityListManagementMode], nil } } diff --git a/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go b/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go index 209d2462e..36d9bce59 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go @@ -4007,13 +4007,23 @@ func Test_getSecurityListManagementMode(t *testing.T) { service *v1.Service expected string }{ - "defaults": { + "defaults - lb": { service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, }, - expected: "", + expected: "All", + }, + "defaults - nlb": { + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + ServiceAnnotationLoadBalancerType: "nlb", + }, + }, + }, + expected: "None", }, "lb mode None": { service: &v1.Service{ @@ -4115,7 +4125,22 @@ func Test_getRuleManagementMode(t *testing.T) { Annotations: map[string]string{}, }, }, - expected: "", + expected: "All", + nsg: &ManagedNetworkSecurityGroup{ + nsgRuleManagementMode: ManagementModeNone, + frontendNsgId: "", + backendNsgId: []string{}, + }, + }, + "defaults - nlb": { + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: map[string]string{ + ServiceAnnotationLoadBalancerType: "nlb", + }, + }, + }, + expected: "None", nsg: &ManagedNetworkSecurityGroup{ nsgRuleManagementMode: ManagementModeNone, frontendNsgId: "", From 3841ff511e6bcd500252bbeea111053e19706b2c Mon Sep 17 00:00:00 2001 From: Pranav Sriram Date: Wed, 7 Feb 2024 12:09:51 +0530 Subject: [PATCH 03/22] for externalTrafficPolicy local the healthcheck port security rule should be retained --- .../oci/load_balancer_security_lists.go | 32 ++-- .../oci/load_balancer_security_lists_test.go | 166 +++++++++++++++++- 2 files changed, 173 insertions(+), 25 deletions(-) diff --git a/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go b/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go index 8bcb584b0..e7c943297 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go @@ -30,7 +30,6 @@ import ( sets "k8s.io/apimachinery/pkg/util/sets" informersv1 "k8s.io/client-go/informers/core/v1" listersv1 "k8s.io/client-go/listers/core/v1" - helper "k8s.io/cloud-provider/service/helpers" ) const ( @@ -429,7 +428,7 @@ func getNodeIngressRules( "source", *rule.Source, "destinationPortRangeMin", *rule.TcpOptions.DestinationPortRange.Min, "destinationPortRangeMax", *rule.TcpOptions.DestinationPortRange.Max, - ).Debug("Deleting node ingres security rule") + ).Debug("Deleting node ingress security rule") } if desiredBackend.Len() == 0 && desiredHealthChecker.Len() == 0 { @@ -676,25 +675,26 @@ func portInUse(serviceLister listersv1.ServiceLister, port int32) (bool, error) } func healthCheckPortInUse(serviceLister listersv1.ServiceLister, port int32) (bool, error) { - if port != lbNodesHealthCheckPort { - // This service is using a custom healthcheck port (enabled through setting - // extenalTrafficPolicy=Local on the service). As this port is unique - // per service, we know no other service will be using this port too. - return false, nil - } - - // This service is using the default healthcheck port, so we must check if - // any other service is also using this default healthcheck port. serviceList, err := serviceLister.List(labels.Everything()) if err != nil { return false, err } for _, service := range serviceList { - if service.Spec.Type == api.ServiceTypeLoadBalancer { - healthCheckPath, _ := helper.GetServiceHealthCheckPathPort(service) - if healthCheckPath == "" { - // We have found another service using the default port. - return true, nil + if service.DeletionTimestamp == nil || service.Spec.Type == api.ServiceTypeLoadBalancer { + if service.Spec.ExternalTrafficPolicy == api.ServiceExternalTrafficPolicyCluster { + // This service is using the default healthcheck port, so we must check if + // any other service is also using this default healthcheck port. + if port == lbNodesHealthCheckPort { + return true, nil + } + } else if service.Spec.ExternalTrafficPolicy == api.ServiceExternalTrafficPolicyLocal { + // This service is using a custom healthcheck port (enabled through setting + // externalTrafficPolicy=Local on the service). As this port is unique + // per service, we know no other service will be using this port too. + if port == service.Spec.HealthCheckNodePort { + // Service with this healthCheckerPort is still not deleted (this would be a "delete listener" call in that case) + return true, nil + } } } } diff --git a/pkg/cloudprovider/providers/oci/load_balancer_security_lists_test.go b/pkg/cloudprovider/providers/oci/load_balancer_security_lists_test.go index a772e0029..c5468cf0f 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_security_lists_test.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_security_lists_test.go @@ -26,6 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1listers "k8s.io/client-go/listers/core/v1" "k8s.io/client-go/tools/cache" + api "k8s.io/kubernetes/pkg/apis/core" k8sports "k8s.io/kubernetes/pkg/cluster/ports" ) @@ -126,7 +127,8 @@ func TestGetNodeIngressRules(t *testing.T) { makeIngressSecurityRule("3", 80), makeIngressSecurityRule("3", k8sports.ProxyHealthzPort), }, - }, { + }, + { name: "remove lb subnets", securityList: &core.SecurityList{ IngressSecurityRules: []core.IngressSecurityRule{ @@ -150,7 +152,8 @@ func TestGetNodeIngressRules(t *testing.T) { makeIngressSecurityRule("existing", 9000), makeIngressSecurityRule("existing", 9001), }, - }, { + }, + { name: "do not delete health check rules that are used by other services", securityList: &core.SecurityList{ IngressSecurityRules: []core.IngressSecurityRule{ @@ -167,8 +170,9 @@ func TestGetNodeIngressRules(t *testing.T) { { ObjectMeta: metav1.ObjectMeta{Namespace: "namespace", Name: "using-default-health-check-port"}, Spec: v1.ServiceSpec{ - Type: v1.ServiceTypeLoadBalancer, - Ports: []v1.ServicePort{{Port: 443}}, + Type: v1.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicy(api.ServiceExternalTrafficPolicyCluster), + Ports: []v1.ServicePort{{Port: 443}}, }, }, }, @@ -177,7 +181,48 @@ func TestGetNodeIngressRules(t *testing.T) { expected: []core.IngressSecurityRule{ makeIngressSecurityRule("0.0.0.0/0", lbNodesHealthCheckPort), }, - }, { + }, + { + name: "multiple services for same cluster; one uses default healthcheck and other uses HealthcheckNodeport", + securityList: &core.SecurityList{ + IngressSecurityRules: []core.IngressSecurityRule{ + makeIngressSecurityRule("0.0.0.0/0", lbNodesHealthCheckPort), + makeIngressSecurityRule("0.0.0.0/0", 80), + makeIngressSecurityRule("1.1.1.1/1", 32000), + }, + }, + lbSubnets: []*core.Subnet{}, + desiredPorts: portSpec{ + BackendPort: 80, + HealthCheckerPort: k8sports.ProxyHealthzPort, + }, + services: []*v1.Service{ + { + ObjectMeta: metav1.ObjectMeta{Namespace: "namespace", Name: "using-default-health-check-port"}, + Spec: v1.ServiceSpec{ + Type: v1.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicy(api.ServiceExternalTrafficPolicyCluster), + Ports: []v1.ServicePort{{Port: 443}}, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{Namespace: "namespace", Name: "using-NodePort-health-check-port"}, + Spec: v1.ServiceSpec{ + Type: v1.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicy(api.ServiceExternalTrafficPolicyLocal), + Ports: []v1.ServicePort{{Port: 8081}}, + HealthCheckNodePort: 32000, + }, + }, + }, + isPreserveSource: false, + sourceCIDRs: []string{"0.0.0.0/0"}, + expected: []core.IngressSecurityRule{ + makeIngressSecurityRule("0.0.0.0/0", lbNodesHealthCheckPort), + makeIngressSecurityRule("1.1.1.1/1", 32000), + }, + }, + { name: "update service port", securityList: &core.SecurityList{ IngressSecurityRules: []core.IngressSecurityRule{ @@ -243,6 +288,48 @@ func TestGetNodeIngressRules(t *testing.T) { makeIngressSecurityRule("10.0.50.0/24", k8sports.ProxyHealthzPort+1), makeIngressSecurityRule("10.0.51.0/24", k8sports.ProxyHealthzPort+1), }, + }, { + name: "external traffic policy local service health check port", + securityList: &core.SecurityList{ + IngressSecurityRules: []core.IngressSecurityRule{ + core.IngressSecurityRule{Source: common.String("0.0.0.0/0")}, + makeIngressSecurityRule("10.0.50.0/24", 8081), + makeIngressSecurityRule("10.0.51.0/24", 8081), + makeIngressSecurityRule("10.0.50.0/24", k8sports.ProxyHealthzPort), + makeIngressSecurityRule("10.0.51.0/24", k8sports.ProxyHealthzPort), + }, + }, + lbSubnets: []*core.Subnet{ + {CidrBlock: common.String("10.0.50.0/24")}, + {CidrBlock: common.String("10.0.51.0/24")}, + }, + actualPorts: &portSpec{ + BackendPort: 8081, + HealthCheckerPort: k8sports.ProxyHealthzPort, + }, + desiredPorts: portSpec{ + BackendPort: 8081, + HealthCheckerPort: 30000, + }, + services: []*v1.Service{ + { + ObjectMeta: metav1.ObjectMeta{Namespace: "namespace", Name: "using-non-default-health-check-port"}, + Spec: v1.ServiceSpec{ + Type: v1.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicy(api.ServiceExternalTrafficPolicyLocal), + Ports: []v1.ServicePort{{Port: 8081}}, + }, + }, + }, + isPreserveSource: false, + sourceCIDRs: []string{"0.0.0.0/0"}, + expected: []core.IngressSecurityRule{ + core.IngressSecurityRule{Source: common.String("0.0.0.0/0")}, + makeIngressSecurityRule("10.0.50.0/24", 8081), + makeIngressSecurityRule("10.0.51.0/24", 8081), + makeIngressSecurityRule("10.0.50.0/24", 30000), + makeIngressSecurityRule("10.0.51.0/24", 30000), + }, }, } @@ -407,8 +494,9 @@ func TestGetNodeIngressRules_NLB(t *testing.T) { { ObjectMeta: metav1.ObjectMeta{Namespace: "namespace", Name: "using-default-health-check-port"}, Spec: v1.ServiceSpec{ - Type: v1.ServiceTypeLoadBalancer, - Ports: []v1.ServicePort{{Port: 443}}, + Type: v1.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicy(api.ServiceExternalTrafficPolicyCluster), + Ports: []v1.ServicePort{{Port: 443}}, }, }, }, @@ -907,12 +995,72 @@ func TestGetLoadBalancerEgressRules(t *testing.T) { { ObjectMeta: metav1.ObjectMeta{Namespace: "namespace", Name: "using-default-health-check-port"}, Spec: v1.ServiceSpec{ - Type: v1.ServiceTypeLoadBalancer, - Ports: []v1.ServicePort{{Port: 80}}, + Type: v1.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicy(api.ServiceExternalTrafficPolicyCluster), + Ports: []v1.ServicePort{{Port: 80}}, + }, + }, + }, + expected: []core.EgressSecurityRule{ + makeEgressSecurityRule("0.0.0.0/0", lbNodesHealthCheckPort), + }, + }, + { + name: "do not delete a port rule during listener deletes", + securityList: &core.SecurityList{ + EgressSecurityRules: []core.EgressSecurityRule{ + makeEgressSecurityRule("0.0.0.0/0", 30000), + }, + }, + subnets: []*core.Subnet{}, + actualPort: 30000, + desiredPort: 30000, + services: []*v1.Service{ + { + ObjectMeta: metav1.ObjectMeta{Namespace: "namespace", Name: "using-default-health-check-port"}, + Spec: v1.ServiceSpec{ + Type: v1.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicy(api.ServiceExternalTrafficPolicyLocal), + HealthCheckNodePort: 30000, + }, + }, + }, + expected: []core.EgressSecurityRule{ + makeEgressSecurityRule("0.0.0.0/0", 30000), + }, + }, + { + name: "multiple services in the same cluster; one using default healthcheck and other using healthcheck Nodeport", + securityList: &core.SecurityList{ + EgressSecurityRules: []core.EgressSecurityRule{ + makeEgressSecurityRule("0.0.0.0/0", 30000), + makeEgressSecurityRule("0.0.0.0/0", lbNodesHealthCheckPort), + }, + }, + subnets: []*core.Subnet{}, + actualPort: 31000, + desiredPort: 31000, + services: []*v1.Service{ + { + ObjectMeta: metav1.ObjectMeta{Namespace: "namespace", Name: "using-Nodeport-health-check-port"}, + Spec: v1.ServiceSpec{ + Type: v1.ServiceTypeLoadBalancer, + ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicy(api.ServiceExternalTrafficPolicyLocal), + Ports: []v1.ServicePort{{Port: 80}}, + HealthCheckNodePort: 30000, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{Namespace: "namespace", Name: "using-default-health-check-port"}, + Spec: v1.ServiceSpec{ + Type: v1.ServiceTypeLoadBalancer, + Ports: []v1.ServicePort{{Port: 8080}}, + ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicy(api.ServiceExternalTrafficPolicyCluster), }, }, }, expected: []core.EgressSecurityRule{ + makeEgressSecurityRule("0.0.0.0/0", 30000), makeEgressSecurityRule("0.0.0.0/0", lbNodesHealthCheckPort), }, }, From c544a6247938e600ca915ef74f0301d506aa1483 Mon Sep 17 00:00:00 2001 From: Pranav Sriram Date: Thu, 15 Feb 2024 22:21:35 +0530 Subject: [PATCH 04/22] skip healthcheck port in use for services that are deleted or not of type loadbalancer --- .../oci/load_balancer_security_lists.go | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go b/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go index e7c943297..64a12e1a9 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_security_lists.go @@ -680,21 +680,22 @@ func healthCheckPortInUse(serviceLister listersv1.ServiceLister, port int32) (bo return false, err } for _, service := range serviceList { - if service.DeletionTimestamp == nil || service.Spec.Type == api.ServiceTypeLoadBalancer { - if service.Spec.ExternalTrafficPolicy == api.ServiceExternalTrafficPolicyCluster { - // This service is using the default healthcheck port, so we must check if - // any other service is also using this default healthcheck port. - if port == lbNodesHealthCheckPort { - return true, nil - } - } else if service.Spec.ExternalTrafficPolicy == api.ServiceExternalTrafficPolicyLocal { - // This service is using a custom healthcheck port (enabled through setting - // externalTrafficPolicy=Local on the service). As this port is unique - // per service, we know no other service will be using this port too. - if port == service.Spec.HealthCheckNodePort { - // Service with this healthCheckerPort is still not deleted (this would be a "delete listener" call in that case) - return true, nil - } + if service.DeletionTimestamp != nil || service.Spec.Type != api.ServiceTypeLoadBalancer { + continue + } + if service.Spec.ExternalTrafficPolicy == api.ServiceExternalTrafficPolicyCluster { + // This service is using the default healthcheck port, so we must check if + // any other service is also using this default healthcheck port. + if port == lbNodesHealthCheckPort { + return true, nil + } + } else if service.Spec.ExternalTrafficPolicy == api.ServiceExternalTrafficPolicyLocal { + // This service is using a custom healthcheck port (enabled through setting + // externalTrafficPolicy=Local on the service). As this port is unique + // per service, we know no other service will be using this port too. + if port == service.Spec.HealthCheckNodePort { + // Service with this healthCheckerPort is still not deleted (this would be a "delete listener" call in that case) + return true, nil } } } From 3ce430017200b6c209dd6c48efcbe9e64ee79d9c Mon Sep 17 00:00:00 2001 From: Dhananjay Nagargoje Date: Mon, 26 Feb 2024 16:17:35 +0530 Subject: [PATCH 05/22] Added fix to check length of consistent device paths available before attempting read --- pkg/oci/client/client_test.go | 16 ++++++++ pkg/oci/client/volume_attachment.go | 11 +++++- pkg/oci/client/volume_attachment_test.go | 49 ++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 pkg/oci/client/volume_attachment_test.go diff --git a/pkg/oci/client/client_test.go b/pkg/oci/client/client_test.go index 6128e4c23..ff8e9937a 100644 --- a/pkg/oci/client/client_test.go +++ b/pkg/oci/client/client_test.go @@ -173,6 +173,22 @@ func (c *mockComputeClient) DetachVolume(ctx context.Context, request core.Detac } func (c *mockComputeClient) ListInstanceDevices(ctx context.Context, request core.ListInstanceDevicesRequest) (response core.ListInstanceDevicesResponse, err error) { + devicePath := "/dev/oracleoci/oraclevdac" + + if *request.InstanceId == "ocid1.device-path-returns-error" { + return core.ListInstanceDevicesResponse{}, errNotFound + } else if *request.InstanceId == "ocid1.device-path-not-available" { + return core.ListInstanceDevicesResponse{ + Items: []core.Device{}, + }, nil + } else if *request.InstanceId == "ocid1.one-device-path-available" { + return core.ListInstanceDevicesResponse{ + Items: []core.Device{{ + Name: &devicePath, + }, + }, + }, nil + } return core.ListInstanceDevicesResponse{}, nil } diff --git a/pkg/oci/client/volume_attachment.go b/pkg/oci/client/volume_attachment.go index f447d811e..8fd2c61b6 100644 --- a/pkg/oci/client/volume_attachment.go +++ b/pkg/oci/client/volume_attachment.go @@ -16,6 +16,8 @@ package client import ( "context" + "fmt" + "math/rand" "time" "github.com/oracle/oci-cloud-controller-manager/pkg/util" @@ -181,7 +183,14 @@ func (c *client) getDevicePath(ctx context.Context, instanceID string) (*string, return nil, errors.WithStack(err) } - device := listInstanceDevicesResp.Items[0].Name + //When more than 32 pods get scheduled at same time on same node, some attach operations will reach this condition where no device is left + if len(listInstanceDevicesResp.Items) == 0 { + c.logger.With("service", "compute", "verb", listVerb, "resource", instanceResource). + With("instanceID", instanceID).Warn("No consistent device paths available for worker node.") + return nil, fmt.Errorf("Max number of volumes are already attached to instance %s. Please schedule workload on different node.", instanceID) + } + //Picks device path from available path randomly so that 2 volume attachments don't get same path when operations happen concurrently resulting in failure of one of them. + device := listInstanceDevicesResp.Items[rand.Intn(len(listInstanceDevicesResp.Items))].Name return device, nil } diff --git a/pkg/oci/client/volume_attachment_test.go b/pkg/oci/client/volume_attachment_test.go new file mode 100644 index 000000000..2c7739b73 --- /dev/null +++ b/pkg/oci/client/volume_attachment_test.go @@ -0,0 +1,49 @@ +package client + +import ( + "context" + "fmt" + "strings" + "testing" + + "go.uber.org/zap" +) + +func Test_getDevicePath(t *testing.T) { + var tests = map[string]struct { + instanceID string + want string + wantErr error + }{ + "getDevicePathNoDeviceAvailable": { + instanceID: "ocid1.device-path-not-available", + wantErr: fmt.Errorf("Max number of volumes are already attached to instance %s. Please schedule workload on different node.", "ocid1.device-path-not-available"), + + }, + "getDevicePathOneDeviceAvailable": { + instanceID: "ocid1.one-device-path-available", + want: "/dev/oracleoci/oraclevdac", + }, + "getDevicePathReturnsError": { + instanceID: "ocid1.device-path-returns-error", + wantErr: errNotFound, + }, + } + + vaClient := &client{ + compute: &mockComputeClient{}, + logger: zap.S(), + } + + for name, tc := range tests { + t.Run(name, func(t *testing.T) { + result, err := vaClient.getDevicePath(context.Background(), tc.instanceID) + if tc.wantErr != nil && !strings.EqualFold(tc.wantErr.Error(), err.Error()) { + t.Errorf("getDevicePath() = %v, want %v", err.Error(), tc.wantErr.Error()) + } + if tc.want != "" && !strings.EqualFold(tc.want, *result) { + t.Errorf("getDevicePath() = %v, want %v", *result, tc.want) + } + }) + } +} From 71a63b23becce9e62794f6357020ca67f0d4deba Mon Sep 17 00:00:00 2001 From: Pranav Sriram Date: Mon, 11 Mar 2024 15:22:50 +0530 Subject: [PATCH 06/22] process updateLoadbalancer if NLB is in failed state --- pkg/cloudprovider/providers/oci/load_balancer.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkg/cloudprovider/providers/oci/load_balancer.go b/pkg/cloudprovider/providers/oci/load_balancer.go index 52e9945c3..1948c40a3 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer.go +++ b/pkg/cloudprovider/providers/oci/load_balancer.go @@ -756,8 +756,20 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str } if lb.LifecycleState == nil || *lb.LifecycleState != lbLifecycleStateActive { - logger.With("lifecycleState", lb.LifecycleState).Infof("LB is not in %s state, will retry EnsureLoadBalancer", lbLifecycleStateActive) - return nil, errors.Errorf("rejecting request to update LB which is not in %s state", lbLifecycleStateActive) + logger := logger.With("lifecycleState", lb.LifecycleState) + switch loadBalancerType { + case NLB: + // This check is added here since NLBs are marked as failed in case nlb work-requests fail NLB-26239 + if *lb.LifecycleState == string(networkloadbalancer.LifecycleStateFailed) { + logger.Infof("NLB is in %s state, process the Loadbalancer", *lb.LifecycleState) + } else { + return nil, errors.Errorf("NLB is in %s state, wait for NLB to move to %s", *lb.LifecycleState, lbLifecycleStateActive) + } + break + default: + logger.Infof("LB is not in %s state, will retry EnsureLoadBalancer", lbLifecycleStateActive) + return nil, errors.Errorf("rejecting request to update LB which is not in %s state", lbLifecycleStateActive) + } } // Existing load balancers cannot change subnets. This ensures that the spec matches From c13ca6be964db5e072050c56520f3621012a2884 Mon Sep 17 00:00:00 2001 From: ypgohoka Date: Mon, 1 Apr 2024 00:51:08 +0530 Subject: [PATCH 07/22] Fix CVEs identified in non-os packages in CPO image --- go.mod | 50 +- go.sum | 94 +- .../golang/protobuf/jsonpb/decode.go | 1 + .../golang/protobuf/jsonpb/encode.go | 1 + .../protoc-gen-go/descriptor/descriptor.pb.go | 128 +- .../github.com/golang/protobuf/ptypes/any.go | 7 +- vendor/github.com/google/uuid/CHANGELOG.md | 20 + vendor/github.com/google/uuid/hash.go | 6 + vendor/github.com/google/uuid/time.go | 21 +- vendor/github.com/google/uuid/uuid.go | 53 + vendor/github.com/google/uuid/version6.go | 56 + vendor/github.com/google/uuid/version7.go | 104 ++ .../go.etcd.io/etcd/api/v3/version/version.go | 2 +- .../etcd/client/pkg/v3/logutil/zap.go | 24 +- .../etcd/client/pkg/v3/tlsutil/versions.go | 47 - .../etcd/client/pkg/v3/transport/listener.go | 33 +- vendor/go.etcd.io/etcd/client/v3/doc.go | 4 +- .../client/v3/internal/endpoint/endpoint.go | 13 +- vendor/go.etcd.io/etcd/client/v3/txn.go | 17 +- vendor/go.etcd.io/etcd/client/v3/watch.go | 2 +- .../google.golang.org/grpc/otelgrpc/config.go | 16 - .../grpc/otelgrpc/interceptor.go | 97 +- .../grpc/otelgrpc/stats_handler.go | 89 +- .../grpc/otelgrpc/version.go | 2 +- .../net/http/otelhttp/common.go | 8 - .../net/http/otelhttp/handler.go | 4 +- .../otelhttp/internal/semconvutil/httpconv.go | 25 +- .../net/http/otelhttp/transport.go | 2 +- .../net/http/otelhttp/version.go | 2 +- .../instrumentation/net/http/otelhttp/wrap.go | 5 +- .../go.opentelemetry.io/otel/.codespellignore | 2 + vendor/go.opentelemetry.io/otel/CHANGELOG.md | 36 +- vendor/go.opentelemetry.io/otel/Makefile | 4 +- vendor/go.opentelemetry.io/otel/README.md | 20 +- .../otlp/otlptrace/otlptracegrpc/options.go | 4 +- .../otel/exporters/otlp/otlptrace/version.go | 2 +- .../otel/internal/global/meter.go | 4 +- .../otel/internal/global/state.go | 6 +- .../otel/metric/noop/noop.go | 264 ---- .../go.opentelemetry.io/otel/sdk/version.go | 2 +- vendor/go.opentelemetry.io/otel/version.go | 2 +- vendor/go.opentelemetry.io/otel/versions.yaml | 8 +- vendor/go.uber.org/multierr/.travis.yml | 23 + vendor/go.uber.org/multierr/CHANGELOG.md | 35 - vendor/go.uber.org/multierr/LICENSE.txt | 2 +- vendor/go.uber.org/multierr/Makefile | 6 +- vendor/go.uber.org/multierr/README.md | 30 +- vendor/go.uber.org/multierr/error.go | 415 ++---- .../go.uber.org/multierr/error_post_go120.go | 48 - vendor/go.uber.org/multierr/glide.yaml | 8 + .../multierr/{error_pre_go120.go => go113.go} | 31 +- .../x/crypto/internal/poly1305/sum_ppc64le.s | 14 +- vendor/golang.org/x/net/html/token.go | 12 +- vendor/golang.org/x/net/http2/frame.go | 11 +- vendor/golang.org/x/sys/unix/aliases.go | 2 +- vendor/golang.org/x/sys/unix/mkerrors.sh | 2 +- .../x/sys/unix/syscall_darwin_libSystem.go | 2 +- .../golang.org/x/sys/unix/syscall_freebsd.go | 12 +- vendor/golang.org/x/sys/unix/syscall_linux.go | 99 ++ vendor/golang.org/x/sys/unix/zerrors_linux.go | 36 +- .../x/sys/unix/zerrors_linux_386.go | 3 + .../x/sys/unix/zerrors_linux_amd64.go | 3 + .../x/sys/unix/zerrors_linux_arm.go | 3 + .../x/sys/unix/zerrors_linux_arm64.go | 3 + .../x/sys/unix/zerrors_linux_loong64.go | 3 + .../x/sys/unix/zerrors_linux_mips.go | 3 + .../x/sys/unix/zerrors_linux_mips64.go | 3 + .../x/sys/unix/zerrors_linux_mips64le.go | 3 + .../x/sys/unix/zerrors_linux_mipsle.go | 3 + .../x/sys/unix/zerrors_linux_ppc.go | 3 + .../x/sys/unix/zerrors_linux_ppc64.go | 3 + .../x/sys/unix/zerrors_linux_ppc64le.go | 3 + .../x/sys/unix/zerrors_linux_riscv64.go | 3 + .../x/sys/unix/zerrors_linux_s390x.go | 3 + .../x/sys/unix/zerrors_linux_sparc64.go | 3 + .../golang.org/x/sys/unix/zsyscall_linux.go | 10 + .../x/sys/unix/zsysnum_linux_386.go | 4 + .../x/sys/unix/zsysnum_linux_amd64.go | 3 + .../x/sys/unix/zsysnum_linux_arm.go | 4 + .../x/sys/unix/zsysnum_linux_arm64.go | 4 + .../x/sys/unix/zsysnum_linux_loong64.go | 4 + .../x/sys/unix/zsysnum_linux_mips.go | 4 + .../x/sys/unix/zsysnum_linux_mips64.go | 4 + .../x/sys/unix/zsysnum_linux_mips64le.go | 4 + .../x/sys/unix/zsysnum_linux_mipsle.go | 4 + .../x/sys/unix/zsysnum_linux_ppc.go | 4 + .../x/sys/unix/zsysnum_linux_ppc64.go | 4 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 4 + .../x/sys/unix/zsysnum_linux_riscv64.go | 4 + .../x/sys/unix/zsysnum_linux_s390x.go | 4 + .../x/sys/unix/zsysnum_linux_sparc64.go | 4 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 185 ++- .../golang.org/x/sys/windows/env_windows.go | 17 +- .../x/sys/windows/syscall_windows.go | 3 +- .../googleapis/api/annotations/client.pb.go | 139 +- .../encoding/protojson/well_known_types.go | 4 + .../internal/editiondefaults/defaults.go | 12 + .../editiondefaults}/editions_defaults.binpb | 2 +- .../protobuf/internal/encoding/json/decode.go | 2 +- .../protobuf/internal/filedesc/desc.go | 67 +- .../protobuf/internal/filedesc/desc_init.go | 52 + .../protobuf/internal/filedesc/desc_lazy.go | 28 + .../protobuf/internal/filedesc/editions.go | 142 ++ .../protobuf/internal/genid/descriptor_gen.go | 152 +- .../internal/genid/go_features_gen.go | 31 + .../protobuf/internal/genid/struct_gen.go | 5 + .../protobuf/internal/genid/type_gen.go | 38 + .../protobuf/internal/impl/codec_extension.go | 22 +- .../protobuf/internal/impl/codec_tables.go | 2 +- .../internal/impl/message_reflect_field.go | 2 +- .../protobuf/internal/strs/strings.go | 2 +- .../protobuf/internal/version/version.go | 2 +- .../protobuf/reflect/protodesc/desc_init.go | 42 +- .../reflect/protodesc/desc_resolve.go | 4 +- .../reflect/protodesc/desc_validate.go | 6 +- .../protobuf/reflect/protodesc/editions.go | 131 +- .../protobuf/reflect/protoreflect/proto.go | 2 + .../reflect/protoreflect/source_gen.go | 2 - .../types/descriptorpb/descriptor.pb.go | 1254 ++++++++--------- .../protobuf/types/dynamicpb/dynamic.go | 2 +- .../types/gofeaturespb/go_features.pb.go | 177 +++ .../types/gofeaturespb/go_features.proto | 28 + vendor/modules.txt | 63 +- 123 files changed, 2836 insertions(+), 1973 deletions(-) create mode 100644 vendor/github.com/google/uuid/version6.go create mode 100644 vendor/github.com/google/uuid/version7.go delete mode 100644 vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/versions.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/noop/noop.go create mode 100644 vendor/go.uber.org/multierr/.travis.yml delete mode 100644 vendor/go.uber.org/multierr/error_post_go120.go create mode 100644 vendor/go.uber.org/multierr/glide.yaml rename vendor/go.uber.org/multierr/{error_pre_go120.go => go113.go} (66%) create mode 100644 vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go rename vendor/google.golang.org/protobuf/{reflect/protodesc => internal/editiondefaults}/editions_defaults.binpb (69%) create mode 100644 vendor/google.golang.org/protobuf/internal/filedesc/editions.go create mode 100644 vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go create mode 100644 vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go create mode 100644 vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto diff --git a/go.mod b/go.mod index c7647ec63..85dd89b37 100644 --- a/go.mod +++ b/go.mod @@ -39,7 +39,7 @@ replace ( require ( github.com/container-storage-interface/spec v1.8.0 github.com/go-logr/zapr v1.2.4 // indirect - github.com/golang/protobuf v1.5.3 + github.com/golang/protobuf v1.5.4 github.com/kubernetes-csi/csi-lib-utils v0.13.0 github.com/kubernetes-csi/external-snapshotter/client/v6 v6.2.0 github.com/onsi/ginkgo v1.16.5 @@ -51,9 +51,9 @@ require ( github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.8.1 go.uber.org/zap v1.24.0 - golang.org/x/net v0.20.0 - golang.org/x/sys v0.16.0 // indirect - google.golang.org/grpc v1.61.0 + golang.org/x/net v0.21.0 + golang.org/x/sys v0.18.0 // indirect + google.golang.org/grpc v1.62.1 gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.27.10 @@ -75,8 +75,8 @@ require ( ) require ( - golang.org/x/sync v0.5.0 - google.golang.org/protobuf v1.32.0 + golang.org/x/sync v0.6.0 + google.golang.org/protobuf v1.33.0 k8s.io/apiextensions-apiserver v0.27.10 ) @@ -111,7 +111,7 @@ require ( github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -143,31 +143,31 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.9 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect - go.etcd.io/etcd/client/v3 v3.5.9 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 // indirect - go.opentelemetry.io/otel v1.23.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.0 // indirect - go.opentelemetry.io/otel/metric v1.23.0 // indirect - go.opentelemetry.io/otel/sdk v1.23.0 // indirect - go.opentelemetry.io/otel/trace v1.23.0 // indirect + go.etcd.io/etcd/api/v3 v3.5.7 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect + go.etcd.io/etcd/client/v3 v3.5.7 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.24.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/atomic v1.7.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.18.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + golang.org/x/crypto v0.21.0 // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/term v0.16.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.16.1 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect + google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.62.0 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect diff --git a/go.sum b/go.sum index bba20f035..53ff4e17f 100644 --- a/go.sum +++ b/go.sum @@ -42,7 +42,7 @@ cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5x cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= -cloud.google.com/go v0.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= @@ -1315,8 +1315,9 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -1378,8 +1379,9 @@ github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8 github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= @@ -1641,15 +1643,15 @@ github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= -go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= +go.etcd.io/etcd/api/v3 v3.5.7 h1:sbcmosSVesNrWOJ58ZQFitHMdncusIifYcrBfwrlJSY= +go.etcd.io/etcd/api/v3 v3.5.7/go.mod h1:9qew1gCdDDLu+VwmeG+iFpL+QlpHTo7iubavdVDgCAA= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= -go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= +go.etcd.io/etcd/client/pkg/v3 v3.5.7 h1:y3kf5Gbp4e4q7egZdn5T7W9TSHUvkClN6u+Rq9mEOmg= +go.etcd.io/etcd/client/pkg/v3 v3.5.7/go.mod h1:o0Abi1MK86iad3YrWhgUsbGx1pmTS+hrORWc2CamuhY= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.7 h1:AELPkjNR3/igjbO7CjyF1fPuVPjrblliiKj+Y6xSGOU= -go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= -go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= +go.etcd.io/etcd/client/v3 v3.5.7 h1:u/OhpiuCgYY8awOHlhIhmGIGpxfBU/GZBUP3m/3/Iz4= +go.etcd.io/etcd/client/v3 v3.5.7/go.mod h1:sOWmj9DZUMyAngS7QQwCyAXXAL6WhgTOPLNS/NabQgw= go.etcd.io/etcd/pkg/v3 v3.5.7 h1:obOzeVwerFwZ9trMWapU/VjDcYUJb5OfgC1zqEGWO/0= go.etcd.io/etcd/raft/v3 v3.5.7 h1:aN79qxLmV3SvIq84aNTliYGmjwsW6NqJSnqmI1HLJKc= go.etcd.io/etcd/server/v3 v3.5.7 h1:BTBD8IJUV7YFgsczZMHhMTS67XuA4KpRquL0MFOJGRk= @@ -1661,22 +1663,22 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 h1:P+/g8GpuJGYbOp2tAdKrIPUX9JO02q8Q0YNlHolpibA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0/go.mod h1:tIKj3DbO8N9Y2xo52og3irLsPI4GW02DSMtrVgNMgxg= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 h1:doUP+ExOpH3spVTLS0FcWGLnQrPct/hD/bCPbDRUEAU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0/go.mod h1:rdENBZMT2OE6Ne/KLwpiXudnAsbdrdBaqBvTN8M8BgA= -go.opentelemetry.io/otel v1.23.0 h1:Df0pqjqExIywbMCMTxkAwzjLZtRf+bBKLbUcpxO2C9E= -go.opentelemetry.io/otel v1.23.0/go.mod h1:YCycw9ZeKhcJFrb34iVSkyT0iczq/zYDtZYFufObyB0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.0 h1:D/cXD+03/UOphyyT87NX6h+DlU+BnplN6/P6KJwsgGc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.0/go.mod h1:L669qRGbPBwLcftXLFnTVFO6ES/GyMAvITLdvRjEAIM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.0 h1:VZrBiTXzP3FErizsdF1JQj0qf0yA8Ktt6LAcjUhZqbc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.0/go.mod h1:xkkwo777b9MEfsyD1yUZa4g+7MCqqWAP3r2tTSZePRc= -go.opentelemetry.io/otel/metric v1.23.0 h1:pazkx7ss4LFVVYSxYew7L5I6qvLXHA0Ap2pwV+9Cnpo= -go.opentelemetry.io/otel/metric v1.23.0/go.mod h1:MqUW2X2a6Q8RN96E2/nqNoT+z9BSms20Jb7Bbp+HiTo= -go.opentelemetry.io/otel/sdk v1.23.0 h1:0KM9Zl2esnl+WSukEmlaAEjVY5HDZANOHferLq36BPc= -go.opentelemetry.io/otel/sdk v1.23.0/go.mod h1:wUscup7byToqyKJSilEtMf34FgdCAsFpFOjXnAwFfO0= -go.opentelemetry.io/otel/trace v1.23.0 h1:37Ik5Ib7xfYVb4V1UtnT97T1jI+AoIYkJyPkuL4iJgI= -go.opentelemetry.io/otel/trace v1.23.0/go.mod h1:GSGTbIClEsuZrGIzoEHqsVfxgn5UkggkflQwDScNUsk= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 h1:t6wl9SPayj+c7lEIFgm4ooDBZVb01IhLB4InpomhRw8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0/go.mod h1:iSDOcsnSA5INXzZtwaBPrKp/lWu/V14Dd+llD0oI2EA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 h1:Mw5xcxMwlqoJd97vwPxA8isEaIoxsta9/Q51+TTJLGE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0/go.mod h1:CQNu9bj7o7mC6U7+CA/schKEYakYXWr79ucDHTMGhCM= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= +go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucgoDw= +go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= @@ -1686,9 +1688,8 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= @@ -1711,8 +1712,8 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1842,8 +1843,8 @@ golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1876,8 +1877,8 @@ golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1897,8 +1898,9 @@ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1991,8 +1993,8 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2007,8 +2009,8 @@ golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2346,8 +2348,8 @@ google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= -google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos= -google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= +google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= @@ -2364,8 +2366,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go. google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405/go.mod h1:oT32Z4o8Zv2xPQTg0pbVaPr0MPOH6f14RgXt7zfIpwg= google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= -google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= -google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= +google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= google.golang.org/genproto/googleapis/bytestream v0.0.0-20231030173426-d783a09b4405/go.mod h1:GRUCuLdzVqZte8+Dl/D4N25yLzcGqqWaYkeVOwulFqw= @@ -2385,8 +2387,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -2408,8 +2410,8 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/vendor/github.com/golang/protobuf/jsonpb/decode.go b/vendor/github.com/golang/protobuf/jsonpb/decode.go index 6c16c255f..c6f66f103 100644 --- a/vendor/github.com/golang/protobuf/jsonpb/decode.go +++ b/vendor/github.com/golang/protobuf/jsonpb/decode.go @@ -56,6 +56,7 @@ type Unmarshaler struct { // implement JSONPBMarshaler so that the custom format can be produced. // // The JSON unmarshaling must follow the JSON to proto specification: +// // https://developers.google.com/protocol-buffers/docs/proto3#json // // Deprecated: Custom types should implement protobuf reflection instead. diff --git a/vendor/github.com/golang/protobuf/jsonpb/encode.go b/vendor/github.com/golang/protobuf/jsonpb/encode.go index 685c80a62..e9438a93f 100644 --- a/vendor/github.com/golang/protobuf/jsonpb/encode.go +++ b/vendor/github.com/golang/protobuf/jsonpb/encode.go @@ -55,6 +55,7 @@ type Marshaler struct { // implement JSONPBUnmarshaler so that the custom format can be parsed. // // The JSON marshaling must follow the proto to JSON specification: +// // https://developers.google.com/protocol-buffers/docs/proto3#json // // Deprecated: Custom types should implement protobuf reflection instead. diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go index 63dc05785..a5a138613 100644 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go +++ b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go @@ -12,6 +12,31 @@ import ( // Symbols defined in public import of google/protobuf/descriptor.proto. +type Edition = descriptorpb.Edition + +const Edition_EDITION_UNKNOWN = descriptorpb.Edition_EDITION_UNKNOWN +const Edition_EDITION_PROTO2 = descriptorpb.Edition_EDITION_PROTO2 +const Edition_EDITION_PROTO3 = descriptorpb.Edition_EDITION_PROTO3 +const Edition_EDITION_2023 = descriptorpb.Edition_EDITION_2023 +const Edition_EDITION_2024 = descriptorpb.Edition_EDITION_2024 +const Edition_EDITION_1_TEST_ONLY = descriptorpb.Edition_EDITION_1_TEST_ONLY +const Edition_EDITION_2_TEST_ONLY = descriptorpb.Edition_EDITION_2_TEST_ONLY +const Edition_EDITION_99997_TEST_ONLY = descriptorpb.Edition_EDITION_99997_TEST_ONLY +const Edition_EDITION_99998_TEST_ONLY = descriptorpb.Edition_EDITION_99998_TEST_ONLY +const Edition_EDITION_99999_TEST_ONLY = descriptorpb.Edition_EDITION_99999_TEST_ONLY +const Edition_EDITION_MAX = descriptorpb.Edition_EDITION_MAX + +var Edition_name = descriptorpb.Edition_name +var Edition_value = descriptorpb.Edition_value + +type ExtensionRangeOptions_VerificationState = descriptorpb.ExtensionRangeOptions_VerificationState + +const ExtensionRangeOptions_DECLARATION = descriptorpb.ExtensionRangeOptions_DECLARATION +const ExtensionRangeOptions_UNVERIFIED = descriptorpb.ExtensionRangeOptions_UNVERIFIED + +var ExtensionRangeOptions_VerificationState_name = descriptorpb.ExtensionRangeOptions_VerificationState_name +var ExtensionRangeOptions_VerificationState_value = descriptorpb.ExtensionRangeOptions_VerificationState_value + type FieldDescriptorProto_Type = descriptorpb.FieldDescriptorProto_Type const FieldDescriptorProto_TYPE_DOUBLE = descriptorpb.FieldDescriptorProto_TYPE_DOUBLE @@ -39,8 +64,8 @@ var FieldDescriptorProto_Type_value = descriptorpb.FieldDescriptorProto_Type_val type FieldDescriptorProto_Label = descriptorpb.FieldDescriptorProto_Label const FieldDescriptorProto_LABEL_OPTIONAL = descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL -const FieldDescriptorProto_LABEL_REQUIRED = descriptorpb.FieldDescriptorProto_LABEL_REQUIRED const FieldDescriptorProto_LABEL_REPEATED = descriptorpb.FieldDescriptorProto_LABEL_REPEATED +const FieldDescriptorProto_LABEL_REQUIRED = descriptorpb.FieldDescriptorProto_LABEL_REQUIRED var FieldDescriptorProto_Label_name = descriptorpb.FieldDescriptorProto_Label_name var FieldDescriptorProto_Label_value = descriptorpb.FieldDescriptorProto_Label_value @@ -72,6 +97,31 @@ const FieldOptions_JS_NUMBER = descriptorpb.FieldOptions_JS_NUMBER var FieldOptions_JSType_name = descriptorpb.FieldOptions_JSType_name var FieldOptions_JSType_value = descriptorpb.FieldOptions_JSType_value +type FieldOptions_OptionRetention = descriptorpb.FieldOptions_OptionRetention + +const FieldOptions_RETENTION_UNKNOWN = descriptorpb.FieldOptions_RETENTION_UNKNOWN +const FieldOptions_RETENTION_RUNTIME = descriptorpb.FieldOptions_RETENTION_RUNTIME +const FieldOptions_RETENTION_SOURCE = descriptorpb.FieldOptions_RETENTION_SOURCE + +var FieldOptions_OptionRetention_name = descriptorpb.FieldOptions_OptionRetention_name +var FieldOptions_OptionRetention_value = descriptorpb.FieldOptions_OptionRetention_value + +type FieldOptions_OptionTargetType = descriptorpb.FieldOptions_OptionTargetType + +const FieldOptions_TARGET_TYPE_UNKNOWN = descriptorpb.FieldOptions_TARGET_TYPE_UNKNOWN +const FieldOptions_TARGET_TYPE_FILE = descriptorpb.FieldOptions_TARGET_TYPE_FILE +const FieldOptions_TARGET_TYPE_EXTENSION_RANGE = descriptorpb.FieldOptions_TARGET_TYPE_EXTENSION_RANGE +const FieldOptions_TARGET_TYPE_MESSAGE = descriptorpb.FieldOptions_TARGET_TYPE_MESSAGE +const FieldOptions_TARGET_TYPE_FIELD = descriptorpb.FieldOptions_TARGET_TYPE_FIELD +const FieldOptions_TARGET_TYPE_ONEOF = descriptorpb.FieldOptions_TARGET_TYPE_ONEOF +const FieldOptions_TARGET_TYPE_ENUM = descriptorpb.FieldOptions_TARGET_TYPE_ENUM +const FieldOptions_TARGET_TYPE_ENUM_ENTRY = descriptorpb.FieldOptions_TARGET_TYPE_ENUM_ENTRY +const FieldOptions_TARGET_TYPE_SERVICE = descriptorpb.FieldOptions_TARGET_TYPE_SERVICE +const FieldOptions_TARGET_TYPE_METHOD = descriptorpb.FieldOptions_TARGET_TYPE_METHOD + +var FieldOptions_OptionTargetType_name = descriptorpb.FieldOptions_OptionTargetType_name +var FieldOptions_OptionTargetType_value = descriptorpb.FieldOptions_OptionTargetType_value + type MethodOptions_IdempotencyLevel = descriptorpb.MethodOptions_IdempotencyLevel const MethodOptions_IDEMPOTENCY_UNKNOWN = descriptorpb.MethodOptions_IDEMPOTENCY_UNKNOWN @@ -81,10 +131,77 @@ const MethodOptions_IDEMPOTENT = descriptorpb.MethodOptions_IDEMPOTENT var MethodOptions_IdempotencyLevel_name = descriptorpb.MethodOptions_IdempotencyLevel_name var MethodOptions_IdempotencyLevel_value = descriptorpb.MethodOptions_IdempotencyLevel_value +type FeatureSet_FieldPresence = descriptorpb.FeatureSet_FieldPresence + +const FeatureSet_FIELD_PRESENCE_UNKNOWN = descriptorpb.FeatureSet_FIELD_PRESENCE_UNKNOWN +const FeatureSet_EXPLICIT = descriptorpb.FeatureSet_EXPLICIT +const FeatureSet_IMPLICIT = descriptorpb.FeatureSet_IMPLICIT +const FeatureSet_LEGACY_REQUIRED = descriptorpb.FeatureSet_LEGACY_REQUIRED + +var FeatureSet_FieldPresence_name = descriptorpb.FeatureSet_FieldPresence_name +var FeatureSet_FieldPresence_value = descriptorpb.FeatureSet_FieldPresence_value + +type FeatureSet_EnumType = descriptorpb.FeatureSet_EnumType + +const FeatureSet_ENUM_TYPE_UNKNOWN = descriptorpb.FeatureSet_ENUM_TYPE_UNKNOWN +const FeatureSet_OPEN = descriptorpb.FeatureSet_OPEN +const FeatureSet_CLOSED = descriptorpb.FeatureSet_CLOSED + +var FeatureSet_EnumType_name = descriptorpb.FeatureSet_EnumType_name +var FeatureSet_EnumType_value = descriptorpb.FeatureSet_EnumType_value + +type FeatureSet_RepeatedFieldEncoding = descriptorpb.FeatureSet_RepeatedFieldEncoding + +const FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN = descriptorpb.FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN +const FeatureSet_PACKED = descriptorpb.FeatureSet_PACKED +const FeatureSet_EXPANDED = descriptorpb.FeatureSet_EXPANDED + +var FeatureSet_RepeatedFieldEncoding_name = descriptorpb.FeatureSet_RepeatedFieldEncoding_name +var FeatureSet_RepeatedFieldEncoding_value = descriptorpb.FeatureSet_RepeatedFieldEncoding_value + +type FeatureSet_Utf8Validation = descriptorpb.FeatureSet_Utf8Validation + +const FeatureSet_UTF8_VALIDATION_UNKNOWN = descriptorpb.FeatureSet_UTF8_VALIDATION_UNKNOWN +const FeatureSet_VERIFY = descriptorpb.FeatureSet_VERIFY +const FeatureSet_NONE = descriptorpb.FeatureSet_NONE + +var FeatureSet_Utf8Validation_name = descriptorpb.FeatureSet_Utf8Validation_name +var FeatureSet_Utf8Validation_value = descriptorpb.FeatureSet_Utf8Validation_value + +type FeatureSet_MessageEncoding = descriptorpb.FeatureSet_MessageEncoding + +const FeatureSet_MESSAGE_ENCODING_UNKNOWN = descriptorpb.FeatureSet_MESSAGE_ENCODING_UNKNOWN +const FeatureSet_LENGTH_PREFIXED = descriptorpb.FeatureSet_LENGTH_PREFIXED +const FeatureSet_DELIMITED = descriptorpb.FeatureSet_DELIMITED + +var FeatureSet_MessageEncoding_name = descriptorpb.FeatureSet_MessageEncoding_name +var FeatureSet_MessageEncoding_value = descriptorpb.FeatureSet_MessageEncoding_value + +type FeatureSet_JsonFormat = descriptorpb.FeatureSet_JsonFormat + +const FeatureSet_JSON_FORMAT_UNKNOWN = descriptorpb.FeatureSet_JSON_FORMAT_UNKNOWN +const FeatureSet_ALLOW = descriptorpb.FeatureSet_ALLOW +const FeatureSet_LEGACY_BEST_EFFORT = descriptorpb.FeatureSet_LEGACY_BEST_EFFORT + +var FeatureSet_JsonFormat_name = descriptorpb.FeatureSet_JsonFormat_name +var FeatureSet_JsonFormat_value = descriptorpb.FeatureSet_JsonFormat_value + +type GeneratedCodeInfo_Annotation_Semantic = descriptorpb.GeneratedCodeInfo_Annotation_Semantic + +const GeneratedCodeInfo_Annotation_NONE = descriptorpb.GeneratedCodeInfo_Annotation_NONE +const GeneratedCodeInfo_Annotation_SET = descriptorpb.GeneratedCodeInfo_Annotation_SET +const GeneratedCodeInfo_Annotation_ALIAS = descriptorpb.GeneratedCodeInfo_Annotation_ALIAS + +var GeneratedCodeInfo_Annotation_Semantic_name = descriptorpb.GeneratedCodeInfo_Annotation_Semantic_name +var GeneratedCodeInfo_Annotation_Semantic_value = descriptorpb.GeneratedCodeInfo_Annotation_Semantic_value + type FileDescriptorSet = descriptorpb.FileDescriptorSet type FileDescriptorProto = descriptorpb.FileDescriptorProto type DescriptorProto = descriptorpb.DescriptorProto type ExtensionRangeOptions = descriptorpb.ExtensionRangeOptions + +const Default_ExtensionRangeOptions_Verification = descriptorpb.Default_ExtensionRangeOptions_Verification + type FieldDescriptorProto = descriptorpb.FieldDescriptorProto type OneofDescriptorProto = descriptorpb.OneofDescriptorProto type EnumDescriptorProto = descriptorpb.EnumDescriptorProto @@ -103,7 +220,6 @@ const Default_FileOptions_OptimizeFor = descriptorpb.Default_FileOptions_Optimiz const Default_FileOptions_CcGenericServices = descriptorpb.Default_FileOptions_CcGenericServices const Default_FileOptions_JavaGenericServices = descriptorpb.Default_FileOptions_JavaGenericServices const Default_FileOptions_PyGenericServices = descriptorpb.Default_FileOptions_PyGenericServices -const Default_FileOptions_PhpGenericServices = descriptorpb.Default_FileOptions_PhpGenericServices const Default_FileOptions_Deprecated = descriptorpb.Default_FileOptions_Deprecated const Default_FileOptions_CcEnableArenas = descriptorpb.Default_FileOptions_CcEnableArenas @@ -118,8 +234,10 @@ type FieldOptions = descriptorpb.FieldOptions const Default_FieldOptions_Ctype = descriptorpb.Default_FieldOptions_Ctype const Default_FieldOptions_Jstype = descriptorpb.Default_FieldOptions_Jstype const Default_FieldOptions_Lazy = descriptorpb.Default_FieldOptions_Lazy +const Default_FieldOptions_UnverifiedLazy = descriptorpb.Default_FieldOptions_UnverifiedLazy const Default_FieldOptions_Deprecated = descriptorpb.Default_FieldOptions_Deprecated const Default_FieldOptions_Weak = descriptorpb.Default_FieldOptions_Weak +const Default_FieldOptions_DebugRedact = descriptorpb.Default_FieldOptions_DebugRedact type OneofOptions = descriptorpb.OneofOptions type EnumOptions = descriptorpb.EnumOptions @@ -129,6 +247,7 @@ const Default_EnumOptions_Deprecated = descriptorpb.Default_EnumOptions_Deprecat type EnumValueOptions = descriptorpb.EnumValueOptions const Default_EnumValueOptions_Deprecated = descriptorpb.Default_EnumValueOptions_Deprecated +const Default_EnumValueOptions_DebugRedact = descriptorpb.Default_EnumValueOptions_DebugRedact type ServiceOptions = descriptorpb.ServiceOptions @@ -140,12 +259,17 @@ const Default_MethodOptions_Deprecated = descriptorpb.Default_MethodOptions_Depr const Default_MethodOptions_IdempotencyLevel = descriptorpb.Default_MethodOptions_IdempotencyLevel type UninterpretedOption = descriptorpb.UninterpretedOption +type FeatureSet = descriptorpb.FeatureSet +type FeatureSetDefaults = descriptorpb.FeatureSetDefaults type SourceCodeInfo = descriptorpb.SourceCodeInfo type GeneratedCodeInfo = descriptorpb.GeneratedCodeInfo type DescriptorProto_ExtensionRange = descriptorpb.DescriptorProto_ExtensionRange type DescriptorProto_ReservedRange = descriptorpb.DescriptorProto_ReservedRange +type ExtensionRangeOptions_Declaration = descriptorpb.ExtensionRangeOptions_Declaration type EnumDescriptorProto_EnumReservedRange = descriptorpb.EnumDescriptorProto_EnumReservedRange +type FieldOptions_EditionDefault = descriptorpb.FieldOptions_EditionDefault type UninterpretedOption_NamePart = descriptorpb.UninterpretedOption_NamePart +type FeatureSetDefaults_FeatureSetEditionDefault = descriptorpb.FeatureSetDefaults_FeatureSetEditionDefault type SourceCodeInfo_Location = descriptorpb.SourceCodeInfo_Location type GeneratedCodeInfo_Annotation = descriptorpb.GeneratedCodeInfo_Annotation diff --git a/vendor/github.com/golang/protobuf/ptypes/any.go b/vendor/github.com/golang/protobuf/ptypes/any.go index 85f9f5736..fdff3fdb4 100644 --- a/vendor/github.com/golang/protobuf/ptypes/any.go +++ b/vendor/github.com/golang/protobuf/ptypes/any.go @@ -127,9 +127,10 @@ func Is(any *anypb.Any, m proto.Message) bool { // The allocated message is stored in the embedded proto.Message. // // Example: -// var x ptypes.DynamicAny -// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } -// fmt.Printf("unmarshaled message: %v", x.Message) +// +// var x ptypes.DynamicAny +// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } +// fmt.Printf("unmarshaled message: %v", x.Message) // // Deprecated: Use the any.UnmarshalNew method instead to unmarshal // the any message contents into a new instance of the underlying message. diff --git a/vendor/github.com/google/uuid/CHANGELOG.md b/vendor/github.com/google/uuid/CHANGELOG.md index 7ed347d3a..7ec5ac7ea 100644 --- a/vendor/github.com/google/uuid/CHANGELOG.md +++ b/vendor/github.com/google/uuid/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [1.6.0](https://github.com/google/uuid/compare/v1.5.0...v1.6.0) (2024-01-16) + + +### Features + +* add Max UUID constant ([#149](https://github.com/google/uuid/issues/149)) ([c58770e](https://github.com/google/uuid/commit/c58770eb495f55fe2ced6284f93c5158a62e53e3)) + + +### Bug Fixes + +* fix typo in version 7 uuid documentation ([#153](https://github.com/google/uuid/issues/153)) ([016b199](https://github.com/google/uuid/commit/016b199544692f745ffc8867b914129ecb47ef06)) +* Monotonicity in UUIDv7 ([#150](https://github.com/google/uuid/issues/150)) ([a2b2b32](https://github.com/google/uuid/commit/a2b2b32373ff0b1a312b7fdf6d38a977099698a6)) + +## [1.5.0](https://github.com/google/uuid/compare/v1.4.0...v1.5.0) (2023-12-12) + + +### Features + +* Validate UUID without creating new UUID ([#141](https://github.com/google/uuid/issues/141)) ([9ee7366](https://github.com/google/uuid/commit/9ee7366e66c9ad96bab89139418a713dc584ae29)) + ## [1.4.0](https://github.com/google/uuid/compare/v1.3.1...v1.4.0) (2023-10-26) diff --git a/vendor/github.com/google/uuid/hash.go b/vendor/github.com/google/uuid/hash.go index b404f4bec..dc60082d3 100644 --- a/vendor/github.com/google/uuid/hash.go +++ b/vendor/github.com/google/uuid/hash.go @@ -17,6 +17,12 @@ var ( NameSpaceOID = Must(Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8")) NameSpaceX500 = Must(Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8")) Nil UUID // empty UUID, all zeros + + // The Max UUID is special form of UUID that is specified to have all 128 bits set to 1. + Max = UUID{ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + } ) // NewHash returns a new UUID derived from the hash of space concatenated with diff --git a/vendor/github.com/google/uuid/time.go b/vendor/github.com/google/uuid/time.go index e6ef06cdc..c35112927 100644 --- a/vendor/github.com/google/uuid/time.go +++ b/vendor/github.com/google/uuid/time.go @@ -108,12 +108,23 @@ func setClockSequence(seq int) { } // Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in -// uuid. The time is only defined for version 1 and 2 UUIDs. +// uuid. The time is only defined for version 1, 2, 6 and 7 UUIDs. func (uuid UUID) Time() Time { - time := int64(binary.BigEndian.Uint32(uuid[0:4])) - time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32 - time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48 - return Time(time) + var t Time + switch uuid.Version() { + case 6: + time := binary.BigEndian.Uint64(uuid[:8]) // Ignore uuid[6] version b0110 + t = Time(time) + case 7: + time := binary.BigEndian.Uint64(uuid[:8]) + t = Time((time>>16)*10000 + g1582ns100) + default: // forward compatible + time := int64(binary.BigEndian.Uint32(uuid[0:4])) + time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32 + time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48 + t = Time(time) + } + return t } // ClockSequence returns the clock sequence encoded in uuid. diff --git a/vendor/github.com/google/uuid/uuid.go b/vendor/github.com/google/uuid/uuid.go index dc75f7d99..5232b4867 100644 --- a/vendor/github.com/google/uuid/uuid.go +++ b/vendor/github.com/google/uuid/uuid.go @@ -186,6 +186,59 @@ func Must(uuid UUID, err error) UUID { return uuid } +// Validate returns an error if s is not a properly formatted UUID in one of the following formats: +// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// It returns an error if the format is invalid, otherwise nil. +func Validate(s string) error { + switch len(s) { + // Standard UUID format + case 36: + + // UUID with "urn:uuid:" prefix + case 36 + 9: + if !strings.EqualFold(s[:9], "urn:uuid:") { + return fmt.Errorf("invalid urn prefix: %q", s[:9]) + } + s = s[9:] + + // UUID enclosed in braces + case 36 + 2: + if s[0] != '{' || s[len(s)-1] != '}' { + return fmt.Errorf("invalid bracketed UUID format") + } + s = s[1 : len(s)-1] + + // UUID without hyphens + case 32: + for i := 0; i < len(s); i += 2 { + _, ok := xtob(s[i], s[i+1]) + if !ok { + return errors.New("invalid UUID format") + } + } + + default: + return invalidLengthError{len(s)} + } + + // Check for standard UUID format + if len(s) == 36 { + if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' { + return errors.New("invalid UUID format") + } + for _, x := range []int{0, 2, 4, 6, 9, 11, 14, 16, 19, 21, 24, 26, 28, 30, 32, 34} { + if _, ok := xtob(s[x], s[x+1]); !ok { + return errors.New("invalid UUID format") + } + } + } + + return nil +} + // String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // , or "" if uuid is invalid. func (uuid UUID) String() string { diff --git a/vendor/github.com/google/uuid/version6.go b/vendor/github.com/google/uuid/version6.go new file mode 100644 index 000000000..339a959a7 --- /dev/null +++ b/vendor/github.com/google/uuid/version6.go @@ -0,0 +1,56 @@ +// Copyright 2023 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import "encoding/binary" + +// UUID version 6 is a field-compatible version of UUIDv1, reordered for improved DB locality. +// It is expected that UUIDv6 will primarily be used in contexts where there are existing v1 UUIDs. +// Systems that do not involve legacy UUIDv1 SHOULD consider using UUIDv7 instead. +// +// see https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03#uuidv6 +// +// NewV6 returns a Version 6 UUID based on the current NodeID and clock +// sequence, and the current time. If the NodeID has not been set by SetNodeID +// or SetNodeInterface then it will be set automatically. If the NodeID cannot +// be set NewV6 set NodeID is random bits automatically . If clock sequence has not been set by +// SetClockSequence then it will be set automatically. If GetTime fails to +// return the current NewV6 returns Nil and an error. +func NewV6() (UUID, error) { + var uuid UUID + now, seq, err := GetTime() + if err != nil { + return uuid, err + } + + /* + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | time_high | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | time_mid | time_low_and_version | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + |clk_seq_hi_res | clk_seq_low | node (0-1) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | node (2-5) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + + binary.BigEndian.PutUint64(uuid[0:], uint64(now)) + binary.BigEndian.PutUint16(uuid[8:], seq) + + uuid[6] = 0x60 | (uuid[6] & 0x0F) + uuid[8] = 0x80 | (uuid[8] & 0x3F) + + nodeMu.Lock() + if nodeID == zeroID { + setNodeInterface("") + } + copy(uuid[10:], nodeID[:]) + nodeMu.Unlock() + + return uuid, nil +} diff --git a/vendor/github.com/google/uuid/version7.go b/vendor/github.com/google/uuid/version7.go new file mode 100644 index 000000000..3167b643d --- /dev/null +++ b/vendor/github.com/google/uuid/version7.go @@ -0,0 +1,104 @@ +// Copyright 2023 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package uuid + +import ( + "io" +) + +// UUID version 7 features a time-ordered value field derived from the widely +// implemented and well known Unix Epoch timestamp source, +// the number of milliseconds seconds since midnight 1 Jan 1970 UTC, leap seconds excluded. +// As well as improved entropy characteristics over versions 1 or 6. +// +// see https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-03#name-uuid-version-7 +// +// Implementations SHOULD utilize UUID version 7 over UUID version 1 and 6 if possible. +// +// NewV7 returns a Version 7 UUID based on the current time(Unix Epoch). +// Uses the randomness pool if it was enabled with EnableRandPool. +// On error, NewV7 returns Nil and an error +func NewV7() (UUID, error) { + uuid, err := NewRandom() + if err != nil { + return uuid, err + } + makeV7(uuid[:]) + return uuid, nil +} + +// NewV7FromReader returns a Version 7 UUID based on the current time(Unix Epoch). +// it use NewRandomFromReader fill random bits. +// On error, NewV7FromReader returns Nil and an error. +func NewV7FromReader(r io.Reader) (UUID, error) { + uuid, err := NewRandomFromReader(r) + if err != nil { + return uuid, err + } + + makeV7(uuid[:]) + return uuid, nil +} + +// makeV7 fill 48 bits time (uuid[0] - uuid[5]), set version b0111 (uuid[6]) +// uuid[8] already has the right version number (Variant is 10) +// see function NewV7 and NewV7FromReader +func makeV7(uuid []byte) { + /* + 0 1 2 3 + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | unix_ts_ms | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | unix_ts_ms | ver | rand_a (12 bit seq) | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + |var| rand_b | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | rand_b | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ + _ = uuid[15] // bounds check + + t, s := getV7Time() + + uuid[0] = byte(t >> 40) + uuid[1] = byte(t >> 32) + uuid[2] = byte(t >> 24) + uuid[3] = byte(t >> 16) + uuid[4] = byte(t >> 8) + uuid[5] = byte(t) + + uuid[6] = 0x70 | (0x0F & byte(s>>8)) + uuid[7] = byte(s) +} + +// lastV7time is the last time we returned stored as: +// +// 52 bits of time in milliseconds since epoch +// 12 bits of (fractional nanoseconds) >> 8 +var lastV7time int64 + +const nanoPerMilli = 1000000 + +// getV7Time returns the time in milliseconds and nanoseconds / 256. +// The returned (milli << 12 + seq) is guarenteed to be greater than +// (milli << 12 + seq) returned by any previous call to getV7Time. +func getV7Time() (milli, seq int64) { + timeMu.Lock() + defer timeMu.Unlock() + + nano := timeNow().UnixNano() + milli = nano / nanoPerMilli + // Sequence number is between 0 and 3906 (nanoPerMilli>>8) + seq = (nano - milli*nanoPerMilli) >> 8 + now := milli<<12 + seq + if now <= lastV7time { + now = lastV7time + 1 + milli = now >> 12 + seq = now & 0xfff + } + lastV7time = now + return milli, seq +} diff --git a/vendor/go.etcd.io/etcd/api/v3/version/version.go b/vendor/go.etcd.io/etcd/api/v3/version/version.go index d62f6474d..f3b389421 100644 --- a/vendor/go.etcd.io/etcd/api/v3/version/version.go +++ b/vendor/go.etcd.io/etcd/api/v3/version/version.go @@ -26,7 +26,7 @@ import ( var ( // MinClusterVersion is the min cluster version this etcd binary is compatible with. MinClusterVersion = "3.0.0" - Version = "3.5.9" + Version = "3.5.7" APIVersion = "unknown" // Git SHA Value will be set during build diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go index 34f35b9f2..d7fd0d90d 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/logutil/zap.go @@ -16,7 +16,6 @@ package logutil import ( "sort" - "time" "go.uber.org/zap" "go.uber.org/zap/zapcore" @@ -47,20 +46,15 @@ var DefaultZapLoggerConfig = zap.Config{ // copied from "zap.NewProductionEncoderConfig" with some updates EncoderConfig: zapcore.EncoderConfig{ - TimeKey: "ts", - LevelKey: "level", - NameKey: "logger", - CallerKey: "caller", - MessageKey: "msg", - StacktraceKey: "stacktrace", - LineEnding: zapcore.DefaultLineEnding, - EncodeLevel: zapcore.LowercaseLevelEncoder, - - // Custom EncodeTime function to ensure we match format and precision of historic capnslog timestamps - EncodeTime: func(t time.Time, enc zapcore.PrimitiveArrayEncoder) { - enc.AppendString(t.Format("2006-01-02T15:04:05.999999Z0700")) - }, - + TimeKey: "ts", + LevelKey: "level", + NameKey: "logger", + CallerKey: "caller", + MessageKey: "msg", + StacktraceKey: "stacktrace", + LineEnding: zapcore.DefaultLineEnding, + EncodeLevel: zapcore.LowercaseLevelEncoder, + EncodeTime: zapcore.ISO8601TimeEncoder, EncodeDuration: zapcore.StringDurationEncoder, EncodeCaller: zapcore.ShortCallerEncoder, }, diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/versions.go b/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/versions.go deleted file mode 100644 index ffcecd8c6..000000000 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/tlsutil/versions.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2023 The etcd Authors -// -// 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. - -package tlsutil - -import ( - "crypto/tls" - "fmt" -) - -type TLSVersion string - -// Constants for TLS versions. -const ( - TLSVersionDefault TLSVersion = "" - TLSVersion12 TLSVersion = "TLS1.2" - TLSVersion13 TLSVersion = "TLS1.3" -) - -// GetTLSVersion returns the corresponding tls.Version or error. -func GetTLSVersion(version string) (uint16, error) { - var v uint16 - - switch version { - case string(TLSVersionDefault): - v = 0 // 0 means let Go decide. - case string(TLSVersion12): - v = tls.VersionTLS12 - case string(TLSVersion13): - v = tls.VersionTLS13 - default: - return 0, fmt.Errorf("unexpected TLS version %q (must be one of: TLS1.2, TLS1.3)", version) - } - - return v, nil -} diff --git a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener.go b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener.go index 150545d08..c3bc56a65 100644 --- a/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener.go +++ b/vendor/go.etcd.io/etcd/client/pkg/v3/transport/listener.go @@ -165,14 +165,6 @@ type TLSInfo struct { // Note that cipher suites are prioritized in the given order. CipherSuites []uint16 - // MinVersion is the minimum TLS version that is acceptable. - // If not set, the minimum version is TLS 1.2. - MinVersion uint16 - - // MaxVersion is the maximum TLS version that is acceptable. - // If not set, the default used by Go is selected (see tls.Config.MaxVersion). - MaxVersion uint16 - selfCert bool // parseFunc exists to simplify testing. Typically, parseFunc @@ -347,8 +339,8 @@ func SelfCert(lg *zap.Logger, dirpath string, hosts []string, selfSignedCertVali // Previously, // 1. Server has non-empty (*tls.Config).Certificates on client hello // 2. Server calls (*tls.Config).GetCertificate iff: -// - Server's (*tls.Config).Certificates is not empty, or -// - Client supplies SNI; non-empty (*tls.ClientHelloInfo).ServerName +// - Server's (*tls.Config).Certificates is not empty, or +// - Client supplies SNI; non-empty (*tls.ClientHelloInfo).ServerName // // When (*tls.Config).Certificates is always populated on initial handshake, // client is expected to provide a valid matching SNI to pass the TLS @@ -386,17 +378,8 @@ func (info TLSInfo) baseConfig() (*tls.Config, error) { } } - var minVersion uint16 - if info.MinVersion != 0 { - minVersion = info.MinVersion - } else { - // Default minimum version is TLS 1.2, previous versions are insecure and deprecated. - minVersion = tls.VersionTLS12 - } - cfg := &tls.Config{ - MinVersion: minVersion, - MaxVersion: info.MaxVersion, + MinVersion: tls.VersionTLS12, ServerName: info.ServerName, } @@ -527,6 +510,11 @@ func (info TLSInfo) ServerConfig() (*tls.Config, error) { // "h2" NextProtos is necessary for enabling HTTP2 for go's HTTP server cfg.NextProtos = []string{"h2"} + // go1.13 enables TLS 1.3 by default + // and in TLS 1.3, cipher suites are not configurable + // setting Max TLS version to TLS 1.2 for go 1.13 + cfg.MaxVersion = tls.VersionTLS12 + return cfg, nil } @@ -581,6 +569,11 @@ func (info TLSInfo) ClientConfig() (*tls.Config, error) { } } + // go1.13 enables TLS 1.3 by default + // and in TLS 1.3, cipher suites are not configurable + // setting Max TLS version to TLS 1.2 for go 1.13 + cfg.MaxVersion = tls.VersionTLS12 + return cfg, nil } diff --git a/vendor/go.etcd.io/etcd/client/v3/doc.go b/vendor/go.etcd.io/etcd/client/v3/doc.go index fd61aff11..645d744a5 100644 --- a/vendor/go.etcd.io/etcd/client/v3/doc.go +++ b/vendor/go.etcd.io/etcd/client/v3/doc.go @@ -61,8 +61,7 @@ // // 1. context error: canceled or deadline exceeded. // 2. gRPC error: e.g. when clock drifts in server-side before client's context deadline exceeded. -// -// See https://github.com/etcd-io/etcd/blob/main/api/v3rpc/rpctypes/error.go +// See https://github.com/etcd-io/etcd/blob/main/api/v3rpc/rpctypes/error.go // // Here is the example code to handle client errors: // @@ -103,4 +102,5 @@ // The grpc load balancer is registered statically and is shared across etcd clients. // To enable detailed load balancer logging, set the ETCD_CLIENT_DEBUG environment // variable. E.g. "ETCD_CLIENT_DEBUG=1". +// package clientv3 diff --git a/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go b/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go index f6674235c..1d3f1a7a2 100644 --- a/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go +++ b/vendor/go.etcd.io/etcd/client/v3/internal/endpoint/endpoint.go @@ -45,8 +45,8 @@ func extractHostFromPath(pathStr string) string { return extractHostFromHostPort(path.Base(pathStr)) } -// mustSplit2 returns the values from strings.SplitN(s, sep, 2). -// If sep is not found, it returns ("", "", false) instead. +//mustSplit2 returns the values from strings.SplitN(s, sep, 2). +//If sep is not found, it returns ("", "", false) instead. func mustSplit2(s, sep string) (string, string) { spl := strings.SplitN(s, sep, 2) if len(spl) < 2 { @@ -81,12 +81,11 @@ func schemeToCredsRequirement(schema string) CredsRequirement { // The main differences: // - etcd supports unixs & https names as opposed to unix & http to // distinguish need to configure certificates. -// - etcd support http(s) names as opposed to tcp supported by grpc/dial method. -// - etcd supports unix(s)://local-file naming schema +// - etcd support http(s) names as opposed to tcp supported by grpc/dial method. +// - etcd supports unix(s)://local-file naming schema // (as opposed to unix:local-file canonical name used by grpc for current dir files). -// - Within the unix(s) schemas, the last segment (filename) without 'port' (content after colon) -// is considered serverName - to allow local testing of cert-protected communication. -// +// - Within the unix(s) schemas, the last segment (filename) without 'port' (content after colon) +// is considered serverName - to allow local testing of cert-protected communication. // See more: // - https://github.com/grpc/grpc-go/blob/26c143bd5f59344a4b8a1e491e0f5e18aa97abc7/internal/grpcutil/target.go#L47 // - https://golang.org/pkg/net/#Dial diff --git a/vendor/go.etcd.io/etcd/client/v3/txn.go b/vendor/go.etcd.io/etcd/client/v3/txn.go index 3f6a953cf..22301fba6 100644 --- a/vendor/go.etcd.io/etcd/client/v3/txn.go +++ b/vendor/go.etcd.io/etcd/client/v3/txn.go @@ -25,14 +25,15 @@ import ( // Txn is the interface that wraps mini-transactions. // -// Txn(context.TODO()).If( -// Compare(Value(k1), ">", v1), -// Compare(Version(k1), "=", 2) -// ).Then( -// OpPut(k2,v2), OpPut(k3,v3) -// ).Else( -// OpPut(k4,v4), OpPut(k5,v5) -// ).Commit() +// Txn(context.TODO()).If( +// Compare(Value(k1), ">", v1), +// Compare(Version(k1), "=", 2) +// ).Then( +// OpPut(k2,v2), OpPut(k3,v3) +// ).Else( +// OpPut(k4,v4), OpPut(k5,v5) +// ).Commit() +// type Txn interface { // If takes a list of comparison. If all comparisons passed in succeed, // the operations passed into Then() will be executed. Or the operations diff --git a/vendor/go.etcd.io/etcd/client/v3/watch.go b/vendor/go.etcd.io/etcd/client/v3/watch.go index 41a6ec976..bc886936c 100644 --- a/vendor/go.etcd.io/etcd/client/v3/watch.go +++ b/vendor/go.etcd.io/etcd/client/v3/watch.go @@ -848,7 +848,7 @@ func (w *watchGrpcStream) serveSubstream(ws *watcherStream, resumec chan struct{ } } else { // current progress of watch; <= store revision - nextRev = wr.Header.Revision + 1 + nextRev = wr.Header.Revision } if len(wr.Events) > 0 { diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go index 06282ce79..67f8d7339 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/config.go @@ -18,7 +18,6 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/propagation" semconv "go.opentelemetry.io/otel/semconv/v1.17.0" "go.opentelemetry.io/otel/trace" @@ -90,9 +89,6 @@ func newConfig(opts []Option, role string) *config { metric.WithUnit("ms")) if err != nil { otel.Handle(err) - if c.rpcDuration == nil { - c.rpcDuration = noop.Float64Histogram{} - } } c.rpcRequestSize, err = c.meter.Int64Histogram("rpc."+role+".request.size", @@ -100,9 +96,6 @@ func newConfig(opts []Option, role string) *config { metric.WithUnit("By")) if err != nil { otel.Handle(err) - if c.rpcRequestSize == nil { - c.rpcRequestSize = noop.Int64Histogram{} - } } c.rpcResponseSize, err = c.meter.Int64Histogram("rpc."+role+".response.size", @@ -110,9 +103,6 @@ func newConfig(opts []Option, role string) *config { metric.WithUnit("By")) if err != nil { otel.Handle(err) - if c.rpcResponseSize == nil { - c.rpcResponseSize = noop.Int64Histogram{} - } } c.rpcRequestsPerRPC, err = c.meter.Int64Histogram("rpc."+role+".requests_per_rpc", @@ -120,9 +110,6 @@ func newConfig(opts []Option, role string) *config { metric.WithUnit("{count}")) if err != nil { otel.Handle(err) - if c.rpcRequestsPerRPC == nil { - c.rpcRequestsPerRPC = noop.Int64Histogram{} - } } c.rpcResponsesPerRPC, err = c.meter.Int64Histogram("rpc."+role+".responses_per_rpc", @@ -130,9 +117,6 @@ func newConfig(opts []Option, role string) *config { metric.WithUnit("{count}")) if err != nil { otel.Handle(err) - if c.rpcResponsesPerRPC == nil { - c.rpcResponsesPerRPC = noop.Int64Histogram{} - } } return c diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go index 3b487a936..fa015e9ac 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go @@ -125,13 +125,27 @@ func UnaryClientInterceptor(opts ...Option) grpc.UnaryClientInterceptor { } } +type streamEventType int + +type streamEvent struct { + Type streamEventType + Err error +} + +const ( + receiveEndEvent streamEventType = iota + errorEvent +) + // clientStream wraps around the embedded grpc.ClientStream, and intercepts the RecvMsg and // SendMsg method call. type clientStream struct { grpc.ClientStream - desc *grpc.StreamDesc - span trace.Span + desc *grpc.StreamDesc + events chan streamEvent + eventsDone chan struct{} + finished chan error receivedEvent bool sentEvent bool @@ -146,11 +160,11 @@ func (w *clientStream) RecvMsg(m interface{}) error { err := w.ClientStream.RecvMsg(m) if err == nil && !w.desc.ServerStreams { - w.endSpan(nil) + w.sendStreamEvent(receiveEndEvent, nil) } else if err == io.EOF { - w.endSpan(nil) + w.sendStreamEvent(receiveEndEvent, nil) } else if err != nil { - w.endSpan(err) + w.sendStreamEvent(errorEvent, err) } else { w.receivedMessageID++ @@ -172,7 +186,7 @@ func (w *clientStream) SendMsg(m interface{}) error { } if err != nil { - w.endSpan(err) + w.sendStreamEvent(errorEvent, err) } return err @@ -181,7 +195,7 @@ func (w *clientStream) SendMsg(m interface{}) error { func (w *clientStream) Header() (metadata.MD, error) { md, err := w.ClientStream.Header() if err != nil { - w.endSpan(err) + w.sendStreamEvent(errorEvent, err) } return md, err @@ -190,32 +204,54 @@ func (w *clientStream) Header() (metadata.MD, error) { func (w *clientStream) CloseSend() error { err := w.ClientStream.CloseSend() if err != nil { - w.endSpan(err) + w.sendStreamEvent(errorEvent, err) } return err } -func wrapClientStream(ctx context.Context, s grpc.ClientStream, desc *grpc.StreamDesc, span trace.Span, cfg *config) *clientStream { +func wrapClientStream(ctx context.Context, s grpc.ClientStream, desc *grpc.StreamDesc, cfg *config) *clientStream { + events := make(chan streamEvent) + eventsDone := make(chan struct{}) + finished := make(chan error) + + go func() { + defer close(eventsDone) + + for { + select { + case event := <-events: + switch event.Type { + case receiveEndEvent: + finished <- nil + return + case errorEvent: + finished <- event.Err + return + } + case <-ctx.Done(): + finished <- ctx.Err() + return + } + } + }() + return &clientStream{ ClientStream: s, - span: span, desc: desc, + events: events, + eventsDone: eventsDone, + finished: finished, receivedEvent: cfg.ReceivedEvent, sentEvent: cfg.SentEvent, } } -func (w *clientStream) endSpan(err error) { - if err != nil { - s, _ := status.FromError(err) - w.span.SetStatus(codes.Error, s.Message()) - w.span.SetAttributes(statusCodeAttr(s.Code())) - } else { - w.span.SetAttributes(statusCodeAttr(grpc_codes.OK)) +func (w *clientStream) sendStreamEvent(eventType streamEventType, err error) { + select { + case <-w.eventsDone: + case w.events <- streamEvent{Type: eventType, Err: err}: } - - w.span.End() } // StreamClientInterceptor returns a grpc.StreamClientInterceptor suitable @@ -270,7 +306,22 @@ func StreamClientInterceptor(opts ...Option) grpc.StreamClientInterceptor { span.End() return s, err } - stream := wrapClientStream(ctx, s, desc, span, cfg) + stream := wrapClientStream(ctx, s, desc, cfg) + + go func() { + err := <-stream.finished + + if err != nil { + s, _ := status.FromError(err) + span.SetStatus(codes.Error, s.Message()) + span.SetAttributes(statusCodeAttr(s.Code())) + } else { + span.SetAttributes(statusCodeAttr(grpc_codes.OK)) + } + + span.End() + }() + return stream, nil } } @@ -340,11 +391,9 @@ func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor { grpcStatusCodeAttr := statusCodeAttr(s.Code()) span.SetAttributes(grpcStatusCodeAttr) - // Use floating point division here for higher precision (instead of Millisecond method). - elapsedTime := float64(time.Since(before)) / float64(time.Millisecond) - + elapsedTime := time.Since(before).Milliseconds() metricAttrs = append(metricAttrs, grpcStatusCodeAttr) - cfg.rpcDuration.Record(ctx, elapsedTime, metric.WithAttributes(metricAttrs...)) + cfg.rpcDuration.Record(ctx, float64(elapsedTime), metric.WithAttributes(metricAttrs...)) return resp, err } diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go index 73d2b8b6b..0211e55e0 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go @@ -20,7 +20,6 @@ import ( "time" grpc_codes "google.golang.org/grpc/codes" - "google.golang.org/grpc/peer" "google.golang.org/grpc/stats" "google.golang.org/grpc/status" @@ -44,7 +43,7 @@ type serverHandler struct { *config } -// NewServerHandler creates a stats.Handler for a gRPC server. +// NewServerHandler creates a stats.Handler for gRPC server. func NewServerHandler(opts ...Option) stats.Handler { h := &serverHandler{ config: newConfig(opts, "server"), @@ -55,6 +54,9 @@ func NewServerHandler(opts ...Option) stats.Handler { // TagConn can attach some information to the given context. func (h *serverHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context { + span := trace.SpanFromContext(ctx) + attrs := peerAttr(peerFromCtx(ctx)) + span.SetAttributes(attrs...) return ctx } @@ -83,15 +85,14 @@ func (h *serverHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont // HandleRPC processes the RPC stats. func (h *serverHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) { - isServer := true - h.handleRPC(ctx, rs, isServer) + h.handleRPC(ctx, rs) } type clientHandler struct { *config } -// NewClientHandler creates a stats.Handler for a gRPC client. +// NewClientHandler creates a stats.Handler for gRPC client. func NewClientHandler(opts ...Option) stats.Handler { h := &clientHandler{ config: newConfig(opts, "client"), @@ -120,12 +121,14 @@ func (h *clientHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) cont // HandleRPC processes the RPC stats. func (h *clientHandler) HandleRPC(ctx context.Context, rs stats.RPCStats) { - isServer := false - h.handleRPC(ctx, rs, isServer) + h.handleRPC(ctx, rs) } // TagConn can attach some information to the given context. -func (h *clientHandler) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context { +func (h *clientHandler) TagConn(ctx context.Context, cti *stats.ConnTagInfo) context.Context { + span := trace.SpanFromContext(ctx) + attrs := peerAttr(cti.RemoteAddr.String()) + span.SetAttributes(attrs...) return ctx } @@ -134,23 +137,20 @@ func (h *clientHandler) HandleConn(context.Context, stats.ConnStats) { // no-op } -func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool) { // nolint: revive // isServer is not a control flag. +func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats) { span := trace.SpanFromContext(ctx) - var metricAttrs []attribute.KeyValue - var messageId int64 - gctx, _ := ctx.Value(gRPCContextKey{}).(*gRPCContext) - if gctx != nil { - metricAttrs = make([]attribute.KeyValue, 0, len(gctx.metricAttrs)+1) - metricAttrs = append(metricAttrs, gctx.metricAttrs...) - } + var messageId int64 + metricAttrs := make([]attribute.KeyValue, 0, len(gctx.metricAttrs)+1) + metricAttrs = append(metricAttrs, gctx.metricAttrs...) + wctx := withoutCancel(ctx) switch rs := rs.(type) { case *stats.Begin: case *stats.InPayload: if gctx != nil { messageId = atomic.AddInt64(&gctx.messagesReceived, 1) - c.rpcRequestSize.Record(ctx, int64(rs.Length), metric.WithAttributes(metricAttrs...)) + c.rpcRequestSize.Record(wctx, int64(rs.Length), metric.WithAttributes(metricAttrs...)) } if c.ReceivedEvent { @@ -166,7 +166,7 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool case *stats.OutPayload: if gctx != nil { messageId = atomic.AddInt64(&gctx.messagesSent, 1) - c.rpcResponseSize.Record(ctx, int64(rs.Length), metric.WithAttributes(metricAttrs...)) + c.rpcResponseSize.Record(wctx, int64(rs.Length), metric.WithAttributes(metricAttrs...)) } if c.SentEvent { @@ -180,21 +180,12 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool ) } case *stats.OutTrailer: - case *stats.OutHeader: - if p, ok := peer.FromContext(ctx); ok { - span.SetAttributes(peerAttr(p.Addr.String())...) - } case *stats.End: var rpcStatusAttr attribute.KeyValue if rs.Error != nil { s, _ := status.FromError(rs.Error) - if isServer { - statusCode, msg := serverStatus(s) - span.SetStatus(statusCode, msg) - } else { - span.SetStatus(codes.Error, s.Message()) - } + span.SetStatus(codes.Error, s.Message()) rpcStatusAttr = semconv.RPCGRPCStatusCodeKey.Int(int(s.Code())) } else { rpcStatusAttr = semconv.RPCGRPCStatusCodeKey.Int(int(grpc_codes.OK)) @@ -203,16 +194,42 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool span.End() metricAttrs = append(metricAttrs, rpcStatusAttr) + c.rpcDuration.Record(wctx, float64(rs.EndTime.Sub(rs.BeginTime)), metric.WithAttributes(metricAttrs...)) + c.rpcRequestsPerRPC.Record(wctx, gctx.messagesReceived, metric.WithAttributes(metricAttrs...)) + c.rpcResponsesPerRPC.Record(wctx, gctx.messagesSent, metric.WithAttributes(metricAttrs...)) - // Use floating point division here for higher precision (instead of Millisecond method). - elapsedTime := float64(rs.EndTime.Sub(rs.BeginTime)) / float64(time.Millisecond) - - c.rpcDuration.Record(ctx, elapsedTime, metric.WithAttributes(metricAttrs...)) - if gctx != nil { - c.rpcRequestsPerRPC.Record(ctx, atomic.LoadInt64(&gctx.messagesReceived), metric.WithAttributes(metricAttrs...)) - c.rpcResponsesPerRPC.Record(ctx, atomic.LoadInt64(&gctx.messagesSent), metric.WithAttributes(metricAttrs...)) - } default: return } } + +func withoutCancel(parent context.Context) context.Context { + if parent == nil { + panic("cannot create context from nil parent") + } + return withoutCancelCtx{parent} +} + +type withoutCancelCtx struct { + c context.Context +} + +func (withoutCancelCtx) Deadline() (deadline time.Time, ok bool) { + return +} + +func (withoutCancelCtx) Done() <-chan struct{} { + return nil +} + +func (withoutCancelCtx) Err() error { + return nil +} + +func (w withoutCancelCtx) Value(key any) any { + return w.c.Value(key) +} + +func (w withoutCancelCtx) String() string { + return "withoutCancel" +} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go index 001b2fb41..5c13a7cea 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/version.go @@ -16,7 +16,7 @@ package otelgrpc // import "go.opentelemetry.io/contrib/instrumentation/google.g // Version is the current release version of the gRPC instrumentation. func Version() string { - return "0.48.0" + return "0.46.0" // This string is updated by the pre_release.sh script during release } diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go index c6f438774..cabf645a5 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go @@ -31,14 +31,6 @@ const ( // Server HTTP metrics. const ( - // Deprecated: This field is unused. - RequestCount = "http.server.request_count" // Incoming request count total - // Deprecated: Use of this field has been migrated to serverRequestSize. It will be removed in a future version. - RequestContentLength = "http.server.request_content_length" // Incoming request bytes total - // Deprecated: Use of this field has been migrated to serverResponseSize. It will be removed in a future version. - ResponseContentLength = "http.server.response_content_length" // Incoming response bytes total - // Deprecated: Use of this field has been migrated to serverDuration. It will be removed in a future version. - ServerLatency = "http.server.duration" // Incoming end to end duration, milliseconds serverRequestSize = "http.server.request.size" // Incoming request bytes total serverResponseSize = "http.server.response.size" // Incoming response bytes total serverDuration = "http.server.duration" // Incoming end to end duration, milliseconds diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go index 3d292dab6..1fc15019e 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go @@ -224,7 +224,7 @@ func (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http next.ServeHTTP(w, r.WithContext(ctx)) - setAfterServeAttributes(span, bw.read, rww.written, rww.statusCode, bw.err, rww.err) + setAfterServeAttributes(span, bw.read.Load(), rww.written, rww.statusCode, bw.err, rww.err) // Add metrics attributes := append(labeler.Get(), semconvutil.HTTPServerRequestMetrics(h.server, r)...) @@ -232,7 +232,7 @@ func (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http attributes = append(attributes, semconv.HTTPStatusCode(rww.statusCode)) } o := metric.WithAttributes(attributes...) - h.requestBytesCounter.Add(ctx, bw.read, o) + h.requestBytesCounter.Add(ctx, bw.read.Load(), o) h.responseBytesCounter.Add(ctx, rww.written, o) // Use floating point division here for higher precision (instead of Millisecond method). diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go index 495d700cf..0efd5261f 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go @@ -43,10 +43,10 @@ func HTTPClientResponse(resp *http.Response) []attribute.KeyValue { } // HTTPClientRequest returns trace attributes for an HTTP request made by a client. -// The following attributes are always returned: "http.url", "http.flavor", -// "http.method", "net.peer.name". The following attributes are returned if the -// related values are defined in req: "net.peer.port", "http.user_agent", -// "http.request_content_length", "enduser.id". +// The following attributes are always returned: "http.url", "http.method", +// "net.peer.name". The following attributes are returned if the related values +// are defined in req: "net.peer.port", "user_agent.original", +// "http.request_content_length". func HTTPClientRequest(req *http.Request) []attribute.KeyValue { return hc.ClientRequest(req) } @@ -83,10 +83,9 @@ func HTTPClientStatus(code int) (codes.Code, string) { // The req Host will be used to determine the server instead. // // The following attributes are always returned: "http.method", "http.scheme", -// "http.flavor", "http.target", "net.host.name". The following attributes are -// returned if they related values are defined in req: "net.host.port", -// "net.sock.peer.addr", "net.sock.peer.port", "http.user_agent", "enduser.id", -// "http.client_ip". +// "http.target", "net.host.name". The following attributes are returned if +// they related values are defined in req: "net.host.port", "net.sock.peer.addr", +// "net.sock.peer.port", "user_agent.original", "http.client_ip". func HTTPServerRequest(server string, req *http.Request) []attribute.KeyValue { return hc.ServerRequest(server, req) } @@ -109,8 +108,8 @@ func HTTPServerRequest(server string, req *http.Request) []attribute.KeyValue { // The req Host will be used to determine the server instead. // // The following attributes are always returned: "http.method", "http.scheme", -// "http.flavor", "net.host.name". The following attributes are -// returned if they related values are defined in req: "net.host.port". +// "net.host.name". The following attributes are returned if they related +// values are defined in req: "net.host.port". func HTTPServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { return hc.ServerRequestMetrics(server, req) } @@ -192,7 +191,7 @@ func (c *httpConv) ClientResponse(resp *http.Response) []attribute.KeyValue { // ClientRequest returns attributes for an HTTP request made by a client. The // following attributes are always returned: "http.url", "http.method", // "net.peer.name". The following attributes are returned if the related values -// are defined in req: "net.peer.port", "http.user_agent", +// are defined in req: "net.peer.port", "user_agent.original", // "http.request_content_length", "user_agent.original". func (c *httpConv) ClientRequest(req *http.Request) []attribute.KeyValue { /* The following semantic conventions are returned if present: @@ -449,8 +448,8 @@ func (c *httpConv) ServerRequest(server string, req *http.Request) []attribute.K // The req Host will be used to determine the server instead. // // The following attributes are always returned: "http.method", "http.scheme", -// "http.flavor", "net.host.name". The following attributes are -// returned if they related values are defined in req: "net.host.port". +// "net.host.name". The following attributes are returned if they related +// values are defined in req: "net.host.port". func (c *httpConv) ServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { /* The following semantic conventions are returned if present: http.scheme string diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go index 8d850df3b..43e937a67 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go @@ -182,7 +182,7 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { metricAttrs = append(metricAttrs, semconv.HTTPStatusCode(res.StatusCode)) } o := metric.WithAttributes(metricAttrs...) - t.requestBytesCounter.Add(ctx, bw.read, o) + t.requestBytesCounter.Add(ctx, bw.read.Load(), o) // For handling response bytes we leverage a callback when the client reads the http response readRecordFunc := func(n int64) { t.responseBytesCounter.Add(ctx, n, o) diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go index 7499f688b..35254e888 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go @@ -16,7 +16,7 @@ package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http // Version is the current release version of the otelhttp instrumentation. func Version() string { - return "0.48.0" + return "0.49.0" // This string is updated by the pre_release.sh script during release } diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/wrap.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/wrap.go index 11a35ed16..2852ec971 100644 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/wrap.go +++ b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/wrap.go @@ -18,6 +18,7 @@ import ( "context" "io" "net/http" + "sync/atomic" "go.opentelemetry.io/otel/propagation" ) @@ -30,14 +31,14 @@ type bodyWrapper struct { io.ReadCloser record func(n int64) // must not be nil - read int64 + read atomic.Int64 err error } func (w *bodyWrapper) Read(b []byte) (int, error) { n, err := w.ReadCloser.Read(b) n1 := int64(n) - w.read += n1 + w.read.Add(n1) w.err = err w.record(n1) return n, err diff --git a/vendor/go.opentelemetry.io/otel/.codespellignore b/vendor/go.opentelemetry.io/otel/.codespellignore index ae6a3bcf1..120b63a9c 100644 --- a/vendor/go.opentelemetry.io/otel/.codespellignore +++ b/vendor/go.opentelemetry.io/otel/.codespellignore @@ -3,3 +3,5 @@ fo te collison consequentially +ans +nam diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md index ea1f723e2..98f2d2043 100644 --- a/vendor/go.opentelemetry.io/otel/CHANGELOG.md +++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md @@ -8,6 +8,32 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [1.24.0/0.46.0/0.0.1-alpha] 2024-02-23 + +This release is the last to support [Go 1.20]. +The next release will require at least [Go 1.21]. + +### Added + +- Support [Go 1.22]. (#4890) +- Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4900) +- Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4900) +- The `go.opentelemetry.io/otel/log` module is added. + This module includes OpenTelemetry Go's implementation of the Logs Bridge API. + This module is in an alpha state, it is subject to breaking changes. + See our [versioning policy](./VERSIONING.md) for more info. (#4961) + +### Fixed + +- Fix registration of multiple callbacks when using the global meter provider from `go.opentelemetry.io/otel`. (#4945) +- Fix negative buckets in output of exponential histograms. (#4956) + +## [1.23.1] 2024-02-07 + +### Fixed + +- Register all callbacks passed during observable instrument creation instead of just the last one multiple times in `go.opentelemetry.io/otel/sdk/metric`. (#4888) + ## [1.23.0] 2024-02-06 This release contains the first stable, `v1`, release of the following modules: @@ -25,7 +51,7 @@ See our [versioning policy](VERSIONING.md) for more information about these stab - Add `WithEndpointURL` option to the `exporters/otlp/otlpmetric/otlpmetricgrpc`, `exporters/otlp/otlpmetric/otlpmetrichttp`, `exporters/otlp/otlptrace/otlptracegrpc` and `exporters/otlp/otlptrace/otlptracehttp` packages. (#4808) - Experimental exemplar exporting is added to the metric SDK. - See [metric documentation](./sdk/metric/EXPERIMENTAL.md#exemplars) for more information about this feature and how to enable it. (#4871) + See [metric documentation](./sdk/metric/internal/x/README.md#exemplars) for more information about this feature and how to enable it. (#4871) - `ErrSchemaURLConflict` is added to `go.opentelemetry.io/otel/sdk/resource`. This error is returned when a merge of two `Resource`s with different (non-empty) schema URL is attempted. (#4876) @@ -70,7 +96,7 @@ See our [versioning policy](VERSIONING.md) for more information about these stab The package contains semantic conventions from the `v1.24.0` version of the OpenTelemetry Semantic Conventions. (#4770) - Add `WithResourceAsConstantLabels` option to apply resource attributes for every metric emitted by the Prometheus exporter. (#4733) - Experimental cardinality limiting is added to the metric SDK. - See [metric documentation](./sdk/metric/EXPERIMENTAL.md#cardinality-limit) for more information about this feature and how to enable it. (#4457) + See [metric documentation](./sdk/metric/internal/x/README.md#cardinality-limit) for more information about this feature and how to enable it. (#4457) - Add `NewMemberRaw` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage`. (#4804) ### Changed @@ -2823,7 +2849,9 @@ It contains api and sdk for trace and meter. - CircleCI build CI manifest files. - CODEOWNERS file to track owners of this project. -[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.23.0...HEAD +[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.24.0...HEAD +[1.24.0/0.46.0/0.0.1-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.24.0 +[1.23.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.1 [1.23.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0 [1.23.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0-rc.1 [1.22.0/0.45.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.22.0 @@ -2900,6 +2928,8 @@ It contains api and sdk for trace and meter. [0.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.1 [0.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.0 +[Go 1.22]: https://go.dev/doc/go1.22 +[Go 1.21]: https://go.dev/doc/go1.21 [Go 1.20]: https://go.dev/doc/go1.20 [Go 1.19]: https://go.dev/doc/go1.19 [Go 1.18]: https://go.dev/doc/go1.18 diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile index 35fc18996..6de95219b 100644 --- a/vendor/go.opentelemetry.io/otel/Makefile +++ b/vendor/go.opentelemetry.io/otel/Makefile @@ -192,7 +192,7 @@ test-coverage: | $(GOCOVMERGE) done; \ $(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt -# Adding a directory will include all benchmarks in that direcotry if a filter is not specified. +# Adding a directory will include all benchmarks in that directory if a filter is not specified. BENCHMARK_TARGETS := sdk/trace .PHONY: benchmark benchmark: $(BENCHMARK_TARGETS:%=benchmark/%) @@ -315,4 +315,4 @@ add-tags: | $(MULTIMOD) .PHONY: lint-markdown lint-markdown: - docker run -v "$(CURDIR):$(WORKDIR)" docker://avtodev/markdown-lint:v1 -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md + docker run -v "$(CURDIR):$(WORKDIR)" avtodev/markdown-lint:v1 -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md diff --git a/vendor/go.opentelemetry.io/otel/README.md b/vendor/go.opentelemetry.io/otel/README.md index 44e1bfc9b..7766259a5 100644 --- a/vendor/go.opentelemetry.io/otel/README.md +++ b/vendor/go.opentelemetry.io/otel/README.md @@ -11,14 +11,11 @@ It provides a set of APIs to directly measure performance and behavior of your s ## Project Status -| Signal | Status | -|---------|------------| -| Traces | Stable | -| Metrics | Stable | -| Logs | Design [1] | - -- [1]: Currently the logs signal development is in a design phase ([#4696](https://github.com/open-telemetry/opentelemetry-go/issues/4696)). - No Logs Pull Requests are currently being accepted. +| Signal | Status | +|---------|--------------------| +| Traces | Stable | +| Metrics | Stable | +| Logs | In development[^1] | Progress and status specific to this repository is tracked in our [project boards](https://github.com/open-telemetry/opentelemetry-go/projects) @@ -28,6 +25,8 @@ and Project versioning information and stability guarantees can be found in the [versioning documentation](VERSIONING.md). +[^1]: https://github.com/orgs/open-telemetry/projects/43 + ### Compatibility OpenTelemetry-Go ensures compatibility with the current supported versions of @@ -50,14 +49,19 @@ Currently, this project supports the following environments. | OS | Go Version | Architecture | |---------|------------|--------------| +| Ubuntu | 1.22 | amd64 | | Ubuntu | 1.21 | amd64 | | Ubuntu | 1.20 | amd64 | +| Ubuntu | 1.22 | 386 | | Ubuntu | 1.21 | 386 | | Ubuntu | 1.20 | 386 | +| MacOS | 1.22 | amd64 | | MacOS | 1.21 | amd64 | | MacOS | 1.20 | amd64 | +| Windows | 1.22 | amd64 | | Windows | 1.21 | amd64 | | Windows | 1.20 | amd64 | +| Windows | 1.22 | 386 | | Windows | 1.21 | 386 | | Windows | 1.20 | 386 | diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go index 0fddac758..461610c6b 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go @@ -64,7 +64,7 @@ func WithInsecure() Option { return wrappedOption{otlpconfig.WithInsecure()} } -// WithEndpointURL sets the target endpoint URL the Exporter will connect to. +// WithEndpoint sets the target endpoint the Exporter will connect to. // // If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_METRICS_ENDPOINT // environment variable is set, and this option is not passed, that variable @@ -82,7 +82,7 @@ func WithEndpoint(endpoint string) Option { return wrappedOption{otlpconfig.WithEndpoint(endpoint)} } -// WithEndpoint sets the target endpoint URL the Exporter will connect to. +// WithEndpointURL sets the target endpoint URL the Exporter will connect to. // // If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_METRICS_ENDPOINT // environment variable is set, and this option is not passed, that variable diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go index 1d00766c6..afc89644e 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go @@ -16,5 +16,5 @@ package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace" // Version is the current release version of the OpenTelemetry OTLP trace exporter in use. func Version() string { - return "1.23.0" + return "1.24.0" } diff --git a/vendor/go.opentelemetry.io/otel/internal/global/meter.go b/vendor/go.opentelemetry.io/otel/internal/global/meter.go index 0097db478..7ed61c0e2 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/meter.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/meter.go @@ -130,9 +130,11 @@ func (m *meter) setDelegate(provider metric.MeterProvider) { inst.setDelegate(meter) } - for e := m.registry.Front(); e != nil; e = e.Next() { + var n *list.Element + for e := m.registry.Front(); e != nil; e = n { r := e.Value.(*registration) r.setDelegate(meter) + n = e.Next() m.registry.Remove(e) } diff --git a/vendor/go.opentelemetry.io/otel/internal/global/state.go b/vendor/go.opentelemetry.io/otel/internal/global/state.go index 7985005bc..386c8bfdc 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/state.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/state.go @@ -63,7 +63,7 @@ func SetTracerProvider(tp trace.TracerProvider) { // to itself. Error( errors.New("no delegate configured in tracer provider"), - "Setting tracer provider to it's current value. No delegate will be configured", + "Setting tracer provider to its current value. No delegate will be configured", ) return } @@ -92,7 +92,7 @@ func SetTextMapPropagator(p propagation.TextMapPropagator) { // delegate to itself. Error( errors.New("no delegate configured in text map propagator"), - "Setting text map propagator to it's current value. No delegate will be configured", + "Setting text map propagator to its current value. No delegate will be configured", ) return } @@ -123,7 +123,7 @@ func SetMeterProvider(mp metric.MeterProvider) { // to itself. Error( errors.New("no delegate configured in meter provider"), - "Setting meter provider to it's current value. No delegate will be configured", + "Setting meter provider to its current value. No delegate will be configured", ) return } diff --git a/vendor/go.opentelemetry.io/otel/metric/noop/noop.go b/vendor/go.opentelemetry.io/otel/metric/noop/noop.go deleted file mode 100644 index acc9a670b..000000000 --- a/vendor/go.opentelemetry.io/otel/metric/noop/noop.go +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright The OpenTelemetry Authors -// -// 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. - -// Package noop provides an implementation of the OpenTelemetry metric API that -// produces no telemetry and minimizes used computation resources. -// -// Using this package to implement the OpenTelemetry metric API will -// effectively disable OpenTelemetry. -// -// This implementation can be embedded in other implementations of the -// OpenTelemetry metric API. Doing so will mean the implementation defaults to -// no operation for methods it does not implement. -package noop // import "go.opentelemetry.io/otel/metric/noop" - -import ( - "context" - - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/embedded" -) - -var ( - // Compile-time check this implements the OpenTelemetry API. - - _ metric.MeterProvider = MeterProvider{} - _ metric.Meter = Meter{} - _ metric.Observer = Observer{} - _ metric.Registration = Registration{} - _ metric.Int64Counter = Int64Counter{} - _ metric.Float64Counter = Float64Counter{} - _ metric.Int64UpDownCounter = Int64UpDownCounter{} - _ metric.Float64UpDownCounter = Float64UpDownCounter{} - _ metric.Int64Histogram = Int64Histogram{} - _ metric.Float64Histogram = Float64Histogram{} - _ metric.Int64ObservableCounter = Int64ObservableCounter{} - _ metric.Float64ObservableCounter = Float64ObservableCounter{} - _ metric.Int64ObservableGauge = Int64ObservableGauge{} - _ metric.Float64ObservableGauge = Float64ObservableGauge{} - _ metric.Int64ObservableUpDownCounter = Int64ObservableUpDownCounter{} - _ metric.Float64ObservableUpDownCounter = Float64ObservableUpDownCounter{} - _ metric.Int64Observer = Int64Observer{} - _ metric.Float64Observer = Float64Observer{} -) - -// MeterProvider is an OpenTelemetry No-Op MeterProvider. -type MeterProvider struct{ embedded.MeterProvider } - -// NewMeterProvider returns a MeterProvider that does not record any telemetry. -func NewMeterProvider() MeterProvider { - return MeterProvider{} -} - -// Meter returns an OpenTelemetry Meter that does not record any telemetry. -func (MeterProvider) Meter(string, ...metric.MeterOption) metric.Meter { - return Meter{} -} - -// Meter is an OpenTelemetry No-Op Meter. -type Meter struct{ embedded.Meter } - -// Int64Counter returns a Counter used to record int64 measurements that -// produces no telemetry. -func (Meter) Int64Counter(string, ...metric.Int64CounterOption) (metric.Int64Counter, error) { - return Int64Counter{}, nil -} - -// Int64UpDownCounter returns an UpDownCounter used to record int64 -// measurements that produces no telemetry. -func (Meter) Int64UpDownCounter(string, ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error) { - return Int64UpDownCounter{}, nil -} - -// Int64Histogram returns a Histogram used to record int64 measurements that -// produces no telemetry. -func (Meter) Int64Histogram(string, ...metric.Int64HistogramOption) (metric.Int64Histogram, error) { - return Int64Histogram{}, nil -} - -// Int64ObservableCounter returns an ObservableCounter used to record int64 -// measurements that produces no telemetry. -func (Meter) Int64ObservableCounter(string, ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error) { - return Int64ObservableCounter{}, nil -} - -// Int64ObservableUpDownCounter returns an ObservableUpDownCounter used to -// record int64 measurements that produces no telemetry. -func (Meter) Int64ObservableUpDownCounter(string, ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error) { - return Int64ObservableUpDownCounter{}, nil -} - -// Int64ObservableGauge returns an ObservableGauge used to record int64 -// measurements that produces no telemetry. -func (Meter) Int64ObservableGauge(string, ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error) { - return Int64ObservableGauge{}, nil -} - -// Float64Counter returns a Counter used to record int64 measurements that -// produces no telemetry. -func (Meter) Float64Counter(string, ...metric.Float64CounterOption) (metric.Float64Counter, error) { - return Float64Counter{}, nil -} - -// Float64UpDownCounter returns an UpDownCounter used to record int64 -// measurements that produces no telemetry. -func (Meter) Float64UpDownCounter(string, ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error) { - return Float64UpDownCounter{}, nil -} - -// Float64Histogram returns a Histogram used to record int64 measurements that -// produces no telemetry. -func (Meter) Float64Histogram(string, ...metric.Float64HistogramOption) (metric.Float64Histogram, error) { - return Float64Histogram{}, nil -} - -// Float64ObservableCounter returns an ObservableCounter used to record int64 -// measurements that produces no telemetry. -func (Meter) Float64ObservableCounter(string, ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error) { - return Float64ObservableCounter{}, nil -} - -// Float64ObservableUpDownCounter returns an ObservableUpDownCounter used to -// record int64 measurements that produces no telemetry. -func (Meter) Float64ObservableUpDownCounter(string, ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error) { - return Float64ObservableUpDownCounter{}, nil -} - -// Float64ObservableGauge returns an ObservableGauge used to record int64 -// measurements that produces no telemetry. -func (Meter) Float64ObservableGauge(string, ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error) { - return Float64ObservableGauge{}, nil -} - -// RegisterCallback performs no operation. -func (Meter) RegisterCallback(metric.Callback, ...metric.Observable) (metric.Registration, error) { - return Registration{}, nil -} - -// Observer acts as a recorder of measurements for multiple instruments in a -// Callback, it performing no operation. -type Observer struct{ embedded.Observer } - -// ObserveFloat64 performs no operation. -func (Observer) ObserveFloat64(metric.Float64Observable, float64, ...metric.ObserveOption) { -} - -// ObserveInt64 performs no operation. -func (Observer) ObserveInt64(metric.Int64Observable, int64, ...metric.ObserveOption) { -} - -// Registration is the registration of a Callback with a No-Op Meter. -type Registration struct{ embedded.Registration } - -// Unregister unregisters the Callback the Registration represents with the -// No-Op Meter. This will always return nil because the No-Op Meter performs no -// operation, including hold any record of registrations. -func (Registration) Unregister() error { return nil } - -// Int64Counter is an OpenTelemetry Counter used to record int64 measurements. -// It produces no telemetry. -type Int64Counter struct{ embedded.Int64Counter } - -// Add performs no operation. -func (Int64Counter) Add(context.Context, int64, ...metric.AddOption) {} - -// Float64Counter is an OpenTelemetry Counter used to record float64 -// measurements. It produces no telemetry. -type Float64Counter struct{ embedded.Float64Counter } - -// Add performs no operation. -func (Float64Counter) Add(context.Context, float64, ...metric.AddOption) {} - -// Int64UpDownCounter is an OpenTelemetry UpDownCounter used to record int64 -// measurements. It produces no telemetry. -type Int64UpDownCounter struct{ embedded.Int64UpDownCounter } - -// Add performs no operation. -func (Int64UpDownCounter) Add(context.Context, int64, ...metric.AddOption) {} - -// Float64UpDownCounter is an OpenTelemetry UpDownCounter used to record -// float64 measurements. It produces no telemetry. -type Float64UpDownCounter struct{ embedded.Float64UpDownCounter } - -// Add performs no operation. -func (Float64UpDownCounter) Add(context.Context, float64, ...metric.AddOption) {} - -// Int64Histogram is an OpenTelemetry Histogram used to record int64 -// measurements. It produces no telemetry. -type Int64Histogram struct{ embedded.Int64Histogram } - -// Record performs no operation. -func (Int64Histogram) Record(context.Context, int64, ...metric.RecordOption) {} - -// Float64Histogram is an OpenTelemetry Histogram used to record float64 -// measurements. It produces no telemetry. -type Float64Histogram struct{ embedded.Float64Histogram } - -// Record performs no operation. -func (Float64Histogram) Record(context.Context, float64, ...metric.RecordOption) {} - -// Int64ObservableCounter is an OpenTelemetry ObservableCounter used to record -// int64 measurements. It produces no telemetry. -type Int64ObservableCounter struct { - metric.Int64Observable - embedded.Int64ObservableCounter -} - -// Float64ObservableCounter is an OpenTelemetry ObservableCounter used to record -// float64 measurements. It produces no telemetry. -type Float64ObservableCounter struct { - metric.Float64Observable - embedded.Float64ObservableCounter -} - -// Int64ObservableGauge is an OpenTelemetry ObservableGauge used to record -// int64 measurements. It produces no telemetry. -type Int64ObservableGauge struct { - metric.Int64Observable - embedded.Int64ObservableGauge -} - -// Float64ObservableGauge is an OpenTelemetry ObservableGauge used to record -// float64 measurements. It produces no telemetry. -type Float64ObservableGauge struct { - metric.Float64Observable - embedded.Float64ObservableGauge -} - -// Int64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter -// used to record int64 measurements. It produces no telemetry. -type Int64ObservableUpDownCounter struct { - metric.Int64Observable - embedded.Int64ObservableUpDownCounter -} - -// Float64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter -// used to record float64 measurements. It produces no telemetry. -type Float64ObservableUpDownCounter struct { - metric.Float64Observable - embedded.Float64ObservableUpDownCounter -} - -// Int64Observer is a recorder of int64 measurements that performs no operation. -type Int64Observer struct{ embedded.Int64Observer } - -// Observe performs no operation. -func (Int64Observer) Observe(int64, ...metric.ObserveOption) {} - -// Float64Observer is a recorder of float64 measurements that performs no -// operation. -type Float64Observer struct{ embedded.Float64Observer } - -// Observe performs no operation. -func (Float64Observer) Observe(float64, ...metric.ObserveOption) {} diff --git a/vendor/go.opentelemetry.io/otel/sdk/version.go b/vendor/go.opentelemetry.io/otel/sdk/version.go index c340d2690..42de0b9a7 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/version.go +++ b/vendor/go.opentelemetry.io/otel/sdk/version.go @@ -16,5 +16,5 @@ package sdk // import "go.opentelemetry.io/otel/sdk" // Version is the current release version of the OpenTelemetry SDK in use. func Version() string { - return "1.23.0" + return "1.24.0" } diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go index 38ba951ed..7b2993a1f 100644 --- a/vendor/go.opentelemetry.io/otel/version.go +++ b/vendor/go.opentelemetry.io/otel/version.go @@ -16,5 +16,5 @@ package otel // import "go.opentelemetry.io/otel" // Version is the current release version of OpenTelemetry in use. func Version() string { - return "1.23.0" + return "1.24.0" } diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml index 028393f07..1b556e678 100644 --- a/vendor/go.opentelemetry.io/otel/versions.yaml +++ b/vendor/go.opentelemetry.io/otel/versions.yaml @@ -14,7 +14,7 @@ module-sets: stable-v1: - version: v1.23.0 + version: v1.24.0 modules: - go.opentelemetry.io/otel - go.opentelemetry.io/otel/bridge/opencensus @@ -40,10 +40,14 @@ module-sets: - go.opentelemetry.io/otel/sdk/metric - go.opentelemetry.io/otel/trace experimental-metrics: - version: v0.45.1 + version: v0.46.0 modules: - go.opentelemetry.io/otel/example/prometheus - go.opentelemetry.io/otel/exporters/prometheus + experimental-logs: + version: v0.0.1-alpha + modules: + - go.opentelemetry.io/otel/log experimental-schema: version: v0.0.7 modules: diff --git a/vendor/go.uber.org/multierr/.travis.yml b/vendor/go.uber.org/multierr/.travis.yml new file mode 100644 index 000000000..8636ab42a --- /dev/null +++ b/vendor/go.uber.org/multierr/.travis.yml @@ -0,0 +1,23 @@ +sudo: false +language: go +go_import_path: go.uber.org/multierr + +env: + global: + - GO111MODULE=on + +go: + - oldstable + - stable + +before_install: +- go version + +script: +- | + set -e + make lint + make cover + +after_success: +- bash <(curl -s https://codecov.io/bash) diff --git a/vendor/go.uber.org/multierr/CHANGELOG.md b/vendor/go.uber.org/multierr/CHANGELOG.md index f8177b978..6f1db9ef4 100644 --- a/vendor/go.uber.org/multierr/CHANGELOG.md +++ b/vendor/go.uber.org/multierr/CHANGELOG.md @@ -1,41 +1,6 @@ Releases ======== -v1.11.0 (2023-03-28) -==================== -- `Errors` now supports any error that implements multiple-error - interface. -- Add `Every` function to allow checking if all errors in the chain - satisfies `errors.Is` against the target error. - -v1.10.0 (2023-03-08) -==================== - -- Comply with Go 1.20's multiple-error interface. -- Drop Go 1.18 support. - Per the support policy, only Go 1.19 and 1.20 are supported now. -- Drop all non-test external dependencies. - -v1.9.0 (2022-12-12) -=================== - -- Add `AppendFunc` that allow passsing functions to similar to - `AppendInvoke`. - -- Bump up yaml.v3 dependency to 3.0.1. - -v1.8.0 (2022-02-28) -=================== - -- `Combine`: perform zero allocations when there are no errors. - - -v1.7.0 (2021-05-06) -=================== - -- Add `AppendInvoke` to append into errors from `defer` blocks. - - v1.6.0 (2020-09-14) =================== diff --git a/vendor/go.uber.org/multierr/LICENSE.txt b/vendor/go.uber.org/multierr/LICENSE.txt index 413e30f7c..858e02475 100644 --- a/vendor/go.uber.org/multierr/LICENSE.txt +++ b/vendor/go.uber.org/multierr/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2017-2021 Uber Technologies, Inc. +Copyright (c) 2017 Uber Technologies, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/go.uber.org/multierr/Makefile b/vendor/go.uber.org/multierr/Makefile index dcb6fe723..316004400 100644 --- a/vendor/go.uber.org/multierr/Makefile +++ b/vendor/go.uber.org/multierr/Makefile @@ -34,5 +34,9 @@ lint: gofmt golint staticcheck .PHONY: cover cover: - go test -race -coverprofile=cover.out -coverpkg=./... -v ./... + go test -coverprofile=cover.out -coverpkg=./... -v ./... go tool cover -html=cover.out -o cover.html + +update-license: + @cd tools && go install go.uber.org/tools/update-license + @$(GOBIN)/update-license $(GO_FILES) diff --git a/vendor/go.uber.org/multierr/README.md b/vendor/go.uber.org/multierr/README.md index 5ab6ac40f..751bd65e5 100644 --- a/vendor/go.uber.org/multierr/README.md +++ b/vendor/go.uber.org/multierr/README.md @@ -2,29 +2,9 @@ `multierr` allows combining one or more Go `error`s together. -## Features - -- **Idiomatic**: - multierr follows best practices in Go, and keeps your code idiomatic. - - It keeps the underlying error type hidden, - allowing you to deal in `error` values exclusively. - - It provides APIs to safely append into an error from a `defer` statement. -- **Performant**: - multierr is optimized for performance: - - It avoids allocations where possible. - - It utilizes slice resizing semantics to optimize common cases - like appending into the same error object from a loop. -- **Interoperable**: - multierr interoperates with the Go standard library's error APIs seamlessly: - - The `errors.Is` and `errors.As` functions *just work*. -- **Lightweight**: - multierr comes with virtually no dependencies. - ## Installation -```bash -go get -u go.uber.org/multierr@latest -``` + go get -u go.uber.org/multierr ## Status @@ -35,9 +15,9 @@ Stable: No breaking changes will be made before 2.0. Released under the [MIT License]. [MIT License]: LICENSE.txt -[doc-img]: https://pkg.go.dev/badge/go.uber.org/multierr -[doc]: https://pkg.go.dev/go.uber.org/multierr -[ci-img]: https://github.com/uber-go/multierr/actions/workflows/go.yml/badge.svg +[doc-img]: https://godoc.org/go.uber.org/multierr?status.svg +[doc]: https://godoc.org/go.uber.org/multierr +[ci-img]: https://travis-ci.com/uber-go/multierr.svg?branch=master [cov-img]: https://codecov.io/gh/uber-go/multierr/branch/master/graph/badge.svg -[ci]: https://github.com/uber-go/multierr/actions/workflows/go.yml +[ci]: https://travis-ci.com/uber-go/multierr [cov]: https://codecov.io/gh/uber-go/multierr diff --git a/vendor/go.uber.org/multierr/error.go b/vendor/go.uber.org/multierr/error.go index 3a828b2df..5c9b67d53 100644 --- a/vendor/go.uber.org/multierr/error.go +++ b/vendor/go.uber.org/multierr/error.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2023 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -20,109 +20,54 @@ // Package multierr allows combining one or more errors together. // -// # Overview +// Overview // // Errors can be combined with the use of the Combine function. // -// multierr.Combine( -// reader.Close(), -// writer.Close(), -// conn.Close(), -// ) +// multierr.Combine( +// reader.Close(), +// writer.Close(), +// conn.Close(), +// ) // // If only two errors are being combined, the Append function may be used // instead. // -// err = multierr.Append(reader.Close(), writer.Close()) +// err = multierr.Append(reader.Close(), writer.Close()) // -// The underlying list of errors for a returned error object may be retrieved -// with the Errors function. -// -// errors := multierr.Errors(err) -// if len(errors) > 0 { -// fmt.Println("The following errors occurred:", errors) -// } -// -// # Appending from a loop -// -// You sometimes need to append into an error from a loop. -// -// var err error -// for _, item := range items { -// err = multierr.Append(err, process(item)) -// } -// -// Cases like this may require knowledge of whether an individual instance -// failed. This usually requires introduction of a new variable. -// -// var err error -// for _, item := range items { -// if perr := process(item); perr != nil { -// log.Warn("skipping item", item) -// err = multierr.Append(err, perr) -// } -// } -// -// multierr includes AppendInto to simplify cases like this. -// -// var err error -// for _, item := range items { -// if multierr.AppendInto(&err, process(item)) { -// log.Warn("skipping item", item) -// } -// } +// This makes it possible to record resource cleanup failures from deferred +// blocks with the help of named return values. // -// This will append the error into the err variable, and return true if that -// individual error was non-nil. +// func sendRequest(req Request) (err error) { +// conn, err := openConnection() +// if err != nil { +// return err +// } +// defer func() { +// err = multierr.Append(err, conn.Close()) +// }() +// // ... +// } // -// See [AppendInto] for more information. -// -// # Deferred Functions -// -// Go makes it possible to modify the return value of a function in a defer -// block if the function was using named returns. This makes it possible to -// record resource cleanup failures from deferred blocks. -// -// func sendRequest(req Request) (err error) { -// conn, err := openConnection() -// if err != nil { -// return err -// } -// defer func() { -// err = multierr.Append(err, conn.Close()) -// }() -// // ... -// } -// -// multierr provides the Invoker type and AppendInvoke function to make cases -// like the above simpler and obviate the need for a closure. The following is -// roughly equivalent to the example above. -// -// func sendRequest(req Request) (err error) { -// conn, err := openConnection() -// if err != nil { -// return err -// } -// defer multierr.AppendInvoke(&err, multierr.Close(conn)) -// // ... -// } -// -// See [AppendInvoke] and [Invoker] for more information. +// The underlying list of errors for a returned error object may be retrieved +// with the Errors function. // -// NOTE: If you're modifying an error from inside a defer, you MUST use a named -// return value for that function. +// errors := multierr.Errors(err) +// if len(errors) > 0 { +// fmt.Println("The following errors occurred:", errors) +// } // -// # Advanced Usage +// Advanced Usage // // Errors returned by Combine and Append MAY implement the following // interface. // -// type errorGroup interface { -// // Returns a slice containing the underlying list of errors. -// // -// // This slice MUST NOT be modified by the caller. -// Errors() []error -// } +// type errorGroup interface { +// // Returns a slice containing the underlying list of errors. +// // +// // This slice MUST NOT be modified by the caller. +// Errors() []error +// } // // Note that if you need access to list of errors behind a multierr error, you // should prefer using the Errors function. That said, if you need cheap @@ -131,23 +76,23 @@ // because errors returned by Combine and Append are not guaranteed to // implement this interface. // -// var errors []error -// group, ok := err.(errorGroup) -// if ok { -// errors = group.Errors() -// } else { -// errors = []error{err} -// } +// var errors []error +// group, ok := err.(errorGroup) +// if ok { +// errors = group.Errors() +// } else { +// errors = []error{err} +// } package multierr // import "go.uber.org/multierr" import ( "bytes" - "errors" "fmt" "io" "strings" "sync" - "sync/atomic" + + "go.uber.org/atomic" ) var ( @@ -187,15 +132,34 @@ type errorGroup interface { // Errors returns a slice containing zero or more errors that the supplied // error is composed of. If the error is nil, a nil slice is returned. // -// err := multierr.Append(r.Close(), w.Close()) -// errors := multierr.Errors(err) +// err := multierr.Append(r.Close(), w.Close()) +// errors := multierr.Errors(err) // // If the error is not composed of other errors, the returned slice contains // just the error that was passed in. // // Callers of this function are free to modify the returned slice. func Errors(err error) []error { - return extractErrors(err) + if err == nil { + return nil + } + + // Note that we're casting to multiError, not errorGroup. Our contract is + // that returned errors MAY implement errorGroup. Errors, however, only + // has special behavior for multierr-specific error objects. + // + // This behavior can be expanded in the future but I think it's prudent to + // start with as little as possible in terms of contract and possibility + // of misuse. + eg, ok := err.(*multiError) + if !ok { + return []error{err} + } + + errors := eg.Errors() + result := make([]error, len(errors)) + copy(result, errors) + return result } // multiError is an error that holds one or more errors. @@ -210,6 +174,8 @@ type multiError struct { errors []error } +var _ errorGroup = (*multiError)(nil) + // Errors returns the list of underlying errors. // // This slice MUST NOT be modified. @@ -235,17 +201,6 @@ func (merr *multiError) Error() string { return result } -// Every compares every error in the given err against the given target error -// using [errors.Is], and returns true only if every comparison returned true. -func Every(err error, target error) bool { - for _, e := range extractErrors(err) { - if !errors.Is(e, target) { - return false - } - } - return true -} - func (merr *multiError) Format(f fmt.State, c rune) { if c == 'v' && f.Flag('+') { merr.writeMultiline(f) @@ -337,14 +292,6 @@ func inspect(errors []error) (res inspectResult) { // fromSlice converts the given list of errors into a single error. func fromSlice(errors []error) error { - // Don't pay to inspect small slices. - switch len(errors) { - case 0: - return nil - case 1: - return errors[0] - } - res := inspect(errors) switch res.Count { case 0: @@ -354,12 +301,8 @@ func fromSlice(errors []error) error { return errors[res.FirstErrorIdx] case len(errors): if !res.ContainsMultiError { - // Error list is flat. Make a copy of it - // Otherwise "errors" escapes to the heap - // unconditionally for all other cases. - // This lets us optimize for the "no errors" case. - out := append(([]error)(nil), errors...) - return &multiError{errors: out} + // already flat + return &multiError{errors: errors} } } @@ -384,32 +327,32 @@ func fromSlice(errors []error) error { // If zero arguments were passed or if all items are nil, a nil error is // returned. // -// Combine(nil, nil) // == nil +// Combine(nil, nil) // == nil // // If only a single error was passed, it is returned as-is. // -// Combine(err) // == err +// Combine(err) // == err // // Combine skips over nil arguments so this function may be used to combine // together errors from operations that fail independently of each other. // -// multierr.Combine( -// reader.Close(), -// writer.Close(), -// pipe.Close(), -// ) +// multierr.Combine( +// reader.Close(), +// writer.Close(), +// pipe.Close(), +// ) // // If any of the passed errors is a multierr error, it will be flattened along // with the other errors. // -// multierr.Combine(multierr.Combine(err1, err2), err3) -// // is the same as -// multierr.Combine(err1, err2, err3) +// multierr.Combine(multierr.Combine(err1, err2), err3) +// // is the same as +// multierr.Combine(err1, err2, err3) // // The returned error formats into a readable multi-line error message if // formatted with %+v. // -// fmt.Sprintf("%+v", multierr.Combine(err1, err2)) +// fmt.Sprintf("%+v", multierr.Combine(err1, err2)) func Combine(errors ...error) error { return fromSlice(errors) } @@ -419,19 +362,16 @@ func Combine(errors ...error) error { // This function is a specialization of Combine for the common case where // there are only two errors. // -// err = multierr.Append(reader.Close(), writer.Close()) +// err = multierr.Append(reader.Close(), writer.Close()) // // The following pattern may also be used to record failure of deferred // operations without losing information about the original error. // -// func doSomething(..) (err error) { -// f := acquireResource() -// defer func() { -// err = multierr.Append(err, f.Close()) -// }() -// -// Note that the variable MUST be a named return to append an error to it from -// the defer statement. See also [AppendInvoke]. +// func doSomething(..) (err error) { +// f := acquireResource() +// defer func() { +// err = multierr.Append(err, f.Close()) +// }() func Append(left error, right error) error { switch { case left == nil: @@ -461,37 +401,37 @@ func Append(left error, right error) error { // AppendInto appends an error into the destination of an error pointer and // returns whether the error being appended was non-nil. // -// var err error -// multierr.AppendInto(&err, r.Close()) -// multierr.AppendInto(&err, w.Close()) +// var err error +// multierr.AppendInto(&err, r.Close()) +// multierr.AppendInto(&err, w.Close()) // // The above is equivalent to, // -// err := multierr.Append(r.Close(), w.Close()) +// err := multierr.Append(r.Close(), w.Close()) // // As AppendInto reports whether the provided error was non-nil, it may be // used to build a multierr error in a loop more ergonomically. For example: // -// var err error -// for line := range lines { -// var item Item -// if multierr.AppendInto(&err, parse(line, &item)) { -// continue -// } -// items = append(items, item) -// } -// -// Compare this with a version that relies solely on Append: -// -// var err error -// for line := range lines { -// var item Item -// if parseErr := parse(line, &item); parseErr != nil { -// err = multierr.Append(err, parseErr) -// continue -// } -// items = append(items, item) -// } +// var err error +// for line := range lines { +// var item Item +// if multierr.AppendInto(&err, parse(line, &item)) { +// continue +// } +// items = append(items, item) +// } +// +// Compare this with a verison that relies solely on Append: +// +// var err error +// for line := range lines { +// var item Item +// if parseErr := parse(line, &item); parseErr != nil { +// err = multierr.Append(err, parseErr) +// continue +// } +// items = append(items, item) +// } func AppendInto(into *error, err error) (errored bool) { if into == nil { // We panic if 'into' is nil. This is not documented above @@ -507,140 +447,3 @@ func AppendInto(into *error, err error) (errored bool) { *into = Append(*into, err) return true } - -// Invoker is an operation that may fail with an error. Use it with -// AppendInvoke to append the result of calling the function into an error. -// This allows you to conveniently defer capture of failing operations. -// -// See also, [Close] and [Invoke]. -type Invoker interface { - Invoke() error -} - -// Invoke wraps a function which may fail with an error to match the Invoker -// interface. Use it to supply functions matching this signature to -// AppendInvoke. -// -// For example, -// -// func processReader(r io.Reader) (err error) { -// scanner := bufio.NewScanner(r) -// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err)) -// for scanner.Scan() { -// // ... -// } -// // ... -// } -// -// In this example, the following line will construct the Invoker right away, -// but defer the invocation of scanner.Err() until the function returns. -// -// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err)) -// -// Note that the error you're appending to from the defer statement MUST be a -// named return. -type Invoke func() error - -// Invoke calls the supplied function and returns its result. -func (i Invoke) Invoke() error { return i() } - -// Close builds an Invoker that closes the provided io.Closer. Use it with -// AppendInvoke to close io.Closers and append their results into an error. -// -// For example, -// -// func processFile(path string) (err error) { -// f, err := os.Open(path) -// if err != nil { -// return err -// } -// defer multierr.AppendInvoke(&err, multierr.Close(f)) -// return processReader(f) -// } -// -// In this example, multierr.Close will construct the Invoker right away, but -// defer the invocation of f.Close until the function returns. -// -// defer multierr.AppendInvoke(&err, multierr.Close(f)) -// -// Note that the error you're appending to from the defer statement MUST be a -// named return. -func Close(closer io.Closer) Invoker { - return Invoke(closer.Close) -} - -// AppendInvoke appends the result of calling the given Invoker into the -// provided error pointer. Use it with named returns to safely defer -// invocation of fallible operations until a function returns, and capture the -// resulting errors. -// -// func doSomething(...) (err error) { -// // ... -// f, err := openFile(..) -// if err != nil { -// return err -// } -// -// // multierr will call f.Close() when this function returns and -// // if the operation fails, its append its error into the -// // returned error. -// defer multierr.AppendInvoke(&err, multierr.Close(f)) -// -// scanner := bufio.NewScanner(f) -// // Similarly, this scheduled scanner.Err to be called and -// // inspected when the function returns and append its error -// // into the returned error. -// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err)) -// -// // ... -// } -// -// NOTE: If used with a defer, the error variable MUST be a named return. -// -// Without defer, AppendInvoke behaves exactly like AppendInto. -// -// err := // ... -// multierr.AppendInvoke(&err, mutltierr.Invoke(foo)) -// -// // ...is roughly equivalent to... -// -// err := // ... -// multierr.AppendInto(&err, foo()) -// -// The advantage of the indirection introduced by Invoker is to make it easy -// to defer the invocation of a function. Without this indirection, the -// invoked function will be evaluated at the time of the defer block rather -// than when the function returns. -// -// // BAD: This is likely not what the caller intended. This will evaluate -// // foo() right away and append its result into the error when the -// // function returns. -// defer multierr.AppendInto(&err, foo()) -// -// // GOOD: This will defer invocation of foo unutil the function returns. -// defer multierr.AppendInvoke(&err, multierr.Invoke(foo)) -// -// multierr provides a few Invoker implementations out of the box for -// convenience. See [Invoker] for more information. -func AppendInvoke(into *error, invoker Invoker) { - AppendInto(into, invoker.Invoke()) -} - -// AppendFunc is a shorthand for [AppendInvoke]. -// It allows using function or method value directly -// without having to wrap it into an [Invoker] interface. -// -// func doSomething(...) (err error) { -// w, err := startWorker(...) -// if err != nil { -// return err -// } -// -// // multierr will call w.Stop() when this function returns and -// // if the operation fails, it appends its error into the -// // returned error. -// defer multierr.AppendFunc(&err, w.Stop) -// } -func AppendFunc(into *error, fn func() error) { - AppendInvoke(into, Invoke(fn)) -} diff --git a/vendor/go.uber.org/multierr/error_post_go120.go b/vendor/go.uber.org/multierr/error_post_go120.go deleted file mode 100644 index a173f9c25..000000000 --- a/vendor/go.uber.org/multierr/error_post_go120.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2017-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -//go:build go1.20 -// +build go1.20 - -package multierr - -// Unwrap returns a list of errors wrapped by this multierr. -func (merr *multiError) Unwrap() []error { - return merr.Errors() -} - -type multipleErrors interface { - Unwrap() []error -} - -func extractErrors(err error) []error { - if err == nil { - return nil - } - - // check if the given err is an Unwrapable error that - // implements multipleErrors interface. - eg, ok := err.(multipleErrors) - if !ok { - return []error{err} - } - - return append(([]error)(nil), eg.Unwrap()...) -} diff --git a/vendor/go.uber.org/multierr/glide.yaml b/vendor/go.uber.org/multierr/glide.yaml new file mode 100644 index 000000000..6ef084ec2 --- /dev/null +++ b/vendor/go.uber.org/multierr/glide.yaml @@ -0,0 +1,8 @@ +package: go.uber.org/multierr +import: +- package: go.uber.org/atomic + version: ^1 +testImport: +- package: github.com/stretchr/testify + subpackages: + - assert diff --git a/vendor/go.uber.org/multierr/error_pre_go120.go b/vendor/go.uber.org/multierr/go113.go similarity index 66% rename from vendor/go.uber.org/multierr/error_pre_go120.go rename to vendor/go.uber.org/multierr/go113.go index 93872a3fc..264b0eac0 100644 --- a/vendor/go.uber.org/multierr/error_pre_go120.go +++ b/vendor/go.uber.org/multierr/go113.go @@ -1,4 +1,4 @@ -// Copyright (c) 2017-2023 Uber Technologies, Inc. +// Copyright (c) 2019 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -18,19 +18,12 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -//go:build !go1.20 -// +build !go1.20 +// +build go1.13 package multierr import "errors" -// Versions of Go before 1.20 did not support the Unwrap() []error method. -// This provides a similar behavior by implementing the Is(..) and As(..) -// methods. -// See the errors.Join proposal for details: -// https://github.com/golang/go/issues/53435 - // As attempts to find the first error in the error list that matches the type // of the value that target points to. // @@ -57,23 +50,3 @@ func (merr *multiError) Is(target error) bool { } return false } - -func extractErrors(err error) []error { - if err == nil { - return nil - } - - // Note that we're casting to multiError, not errorGroup. Our contract is - // that returned errors MAY implement errorGroup. Errors, however, only - // has special behavior for multierr-specific error objects. - // - // This behavior can be expanded in the future but I think it's prudent to - // start with as little as possible in terms of contract and possibility - // of misuse. - eg, ok := err.(*multiError) - if !ok { - return []error{err} - } - - return append(([]error)(nil), eg.Errors()...) -} diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s index d2ca5deeb..b3c1699bf 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_ppc64le.s @@ -19,15 +19,14 @@ #define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3, t4, t5) \ MULLD r0, h0, t0; \ - MULLD r0, h1, t4; \ MULHDU r0, h0, t1; \ + MULLD r0, h1, t4; \ MULHDU r0, h1, t5; \ ADDC t4, t1, t1; \ MULLD r0, h2, t2; \ - ADDZE t5; \ MULHDU r1, h0, t4; \ MULLD r1, h0, h0; \ - ADD t5, t2, t2; \ + ADDE t5, t2, t2; \ ADDC h0, t1, t1; \ MULLD h2, r1, t3; \ ADDZE t4, h0; \ @@ -37,13 +36,11 @@ ADDE t5, t3, t3; \ ADDC h0, t2, t2; \ MOVD $-4, t4; \ - MOVD t0, h0; \ - MOVD t1, h1; \ ADDZE t3; \ - ANDCC $3, t2, h2; \ - AND t2, t4, t0; \ + RLDICL $0, t2, $62, h2; \ + AND t2, t4, h0; \ ADDC t0, h0, h0; \ - ADDE t3, h1, h1; \ + ADDE t3, t1, h1; \ SLD $62, t3, t4; \ SRD $2, t2; \ ADDZE h2; \ @@ -75,6 +72,7 @@ TEXT ·update(SB), $0-32 loop: POLY1305_ADD(R4, R8, R9, R10, R20, R21, R22) + PCALIGN $16 multiply: POLY1305_MUL(R8, R9, R10, R11, R12, R16, R17, R18, R14, R20, R21) ADD $-16, R5 diff --git a/vendor/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go index de67f938a..3c57880d6 100644 --- a/vendor/golang.org/x/net/html/token.go +++ b/vendor/golang.org/x/net/html/token.go @@ -910,9 +910,6 @@ func (z *Tokenizer) readTagAttrKey() { return } switch c { - case ' ', '\n', '\r', '\t', '\f', '/': - z.pendingAttr[0].end = z.raw.end - 1 - return case '=': if z.pendingAttr[0].start+1 == z.raw.end { // WHATWG 13.2.5.32, if we see an equals sign before the attribute name @@ -920,7 +917,9 @@ func (z *Tokenizer) readTagAttrKey() { continue } fallthrough - case '>': + case ' ', '\n', '\r', '\t', '\f', '/', '>': + // WHATWG 13.2.5.33 Attribute name state + // We need to reconsume the char in the after attribute name state to support the / character z.raw.end-- z.pendingAttr[0].end = z.raw.end return @@ -939,6 +938,11 @@ func (z *Tokenizer) readTagAttrVal() { if z.err != nil { return } + if c == '/' { + // WHATWG 13.2.5.34 After attribute name state + // U+002F SOLIDUS (/) - Switch to the self-closing start tag state. + return + } if c != '=' { z.raw.end-- return diff --git a/vendor/golang.org/x/net/http2/frame.go b/vendor/golang.org/x/net/http2/frame.go index c1f6b90dc..e2b298d85 100644 --- a/vendor/golang.org/x/net/http2/frame.go +++ b/vendor/golang.org/x/net/http2/frame.go @@ -1510,13 +1510,12 @@ func (mh *MetaHeadersFrame) checkPseudos() error { } func (fr *Framer) maxHeaderStringLen() int { - v := fr.maxHeaderListSize() - if uint32(int(v)) == v { - return int(v) + v := int(fr.maxHeaderListSize()) + if v < 0 { + // If maxHeaderListSize overflows an int, use no limit (0). + return 0 } - // They had a crazy big number for MaxHeaderBytes anyway, - // so give them unlimited header lengths: - return 0 + return v } // readMetaFrame returns 0 or more CONTINUATION frames from fr and diff --git a/vendor/golang.org/x/sys/unix/aliases.go b/vendor/golang.org/x/sys/unix/aliases.go index e7d3df4bd..b0e419857 100644 --- a/vendor/golang.org/x/sys/unix/aliases.go +++ b/vendor/golang.org/x/sys/unix/aliases.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9 +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos package unix diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index c6492020e..fdcaa974d 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -584,7 +584,7 @@ ccflags="$@" $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ || $2 ~ /^KEYCTL_/ || $2 ~ /^PERF_/ || - $2 ~ /^SECCOMP_MODE_/ || + $2 ~ /^SECCOMP_/ || $2 ~ /^SEEK_/ || $2 ~ /^SCHED_/ || $2 ~ /^SPLICE_/ || diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go index 16dc69937..2f0fa76e4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build darwin && go1.12 +//go:build darwin package unix diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go index 64d1bb4db..2b57e0f73 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -13,6 +13,7 @@ package unix import ( + "errors" "sync" "unsafe" ) @@ -169,25 +170,26 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) - if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { + // Suppress ENOMEM errors to be compatible with the C library __xuname() implementation. + if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } mib = []_C_int{CTL_KERN, KERN_HOSTNAME} n = unsafe.Sizeof(uname.Nodename) - if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { + if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } mib = []_C_int{CTL_KERN, KERN_OSRELEASE} n = unsafe.Sizeof(uname.Release) - if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { + if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } mib = []_C_int{CTL_KERN, KERN_VERSION} n = unsafe.Sizeof(uname.Version) - if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { + if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } @@ -205,7 +207,7 @@ func Uname(uname *Utsname) error { mib = []_C_int{CTL_HW, HW_MACHINE} n = unsafe.Sizeof(uname.Machine) - if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { + if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 0f85e29e6..5682e2628 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -1849,6 +1849,105 @@ func Dup2(oldfd, newfd int) error { //sys Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) //sys Fsopen(fsName string, flags int) (fd int, err error) //sys Fspick(dirfd int, pathName string, flags int) (fd int, err error) + +//sys fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error) + +func fsconfigCommon(fd int, cmd uint, key string, value *byte, aux int) (err error) { + var keyp *byte + if keyp, err = BytePtrFromString(key); err != nil { + return + } + return fsconfig(fd, cmd, keyp, value, aux) +} + +// FsconfigSetFlag is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_FLAG. +// +// fd is the filesystem context to act upon. +// key the parameter key to set. +func FsconfigSetFlag(fd int, key string) (err error) { + return fsconfigCommon(fd, FSCONFIG_SET_FLAG, key, nil, 0) +} + +// FsconfigSetString is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_STRING. +// +// fd is the filesystem context to act upon. +// key the parameter key to set. +// value is the parameter value to set. +func FsconfigSetString(fd int, key string, value string) (err error) { + var valuep *byte + if valuep, err = BytePtrFromString(value); err != nil { + return + } + return fsconfigCommon(fd, FSCONFIG_SET_STRING, key, valuep, 0) +} + +// FsconfigSetBinary is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_BINARY. +// +// fd is the filesystem context to act upon. +// key the parameter key to set. +// value is the parameter value to set. +func FsconfigSetBinary(fd int, key string, value []byte) (err error) { + if len(value) == 0 { + return EINVAL + } + return fsconfigCommon(fd, FSCONFIG_SET_BINARY, key, &value[0], len(value)) +} + +// FsconfigSetPath is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_PATH. +// +// fd is the filesystem context to act upon. +// key the parameter key to set. +// path is a non-empty path for specified key. +// atfd is a file descriptor at which to start lookup from or AT_FDCWD. +func FsconfigSetPath(fd int, key string, path string, atfd int) (err error) { + var valuep *byte + if valuep, err = BytePtrFromString(path); err != nil { + return + } + return fsconfigCommon(fd, FSCONFIG_SET_PATH, key, valuep, atfd) +} + +// FsconfigSetPathEmpty is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_PATH_EMPTY. The same as +// FconfigSetPath but with AT_PATH_EMPTY implied. +func FsconfigSetPathEmpty(fd int, key string, path string, atfd int) (err error) { + var valuep *byte + if valuep, err = BytePtrFromString(path); err != nil { + return + } + return fsconfigCommon(fd, FSCONFIG_SET_PATH_EMPTY, key, valuep, atfd) +} + +// FsconfigSetFd is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_SET_FD. +// +// fd is the filesystem context to act upon. +// key the parameter key to set. +// value is a file descriptor to be assigned to specified key. +func FsconfigSetFd(fd int, key string, value int) (err error) { + return fsconfigCommon(fd, FSCONFIG_SET_FD, key, nil, value) +} + +// FsconfigCreate is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_CMD_CREATE. +// +// fd is the filesystem context to act upon. +func FsconfigCreate(fd int) (err error) { + return fsconfig(fd, FSCONFIG_CMD_CREATE, nil, nil, 0) +} + +// FsconfigReconfigure is equivalent to fsconfig(2) called +// with cmd == FSCONFIG_CMD_RECONFIGURE. +// +// fd is the filesystem context to act upon. +func FsconfigReconfigure(fd int) (err error) { + return fsconfig(fd, FSCONFIG_CMD_RECONFIGURE, nil, nil, 0) +} + //sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64 //sysnb Getpgid(pid int) (pgid int, err error) diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index a5d3ff8df..36bf8399f 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -1785,6 +1785,8 @@ const ( LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20 LANDLOCK_ACCESS_FS_TRUNCATE = 0x4000 LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2 + LANDLOCK_ACCESS_NET_BIND_TCP = 0x1 + LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2 LANDLOCK_CREATE_RULESET_VERSION = 0x1 LINUX_REBOOT_CMD_CAD_OFF = 0x0 LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef @@ -2465,6 +2467,7 @@ const ( PR_MCE_KILL_GET = 0x22 PR_MCE_KILL_LATE = 0x0 PR_MCE_KILL_SET = 0x1 + PR_MDWE_NO_INHERIT = 0x2 PR_MDWE_REFUSE_EXEC_GAIN = 0x1 PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_ENABLE_MANAGEMENT = 0x2b @@ -2669,8 +2672,9 @@ const ( RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 - RTAX_FEATURE_MASK = 0xf + RTAX_FEATURE_MASK = 0x1f RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TCP_USEC_TS = 0x10 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb @@ -2913,9 +2917,38 @@ const ( SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x1d SC_LOG_FLUSH = 0x100000 + SECCOMP_ADDFD_FLAG_SEND = 0x2 + SECCOMP_ADDFD_FLAG_SETFD = 0x1 + SECCOMP_FILTER_FLAG_LOG = 0x2 + SECCOMP_FILTER_FLAG_NEW_LISTENER = 0x8 + SECCOMP_FILTER_FLAG_SPEC_ALLOW = 0x4 + SECCOMP_FILTER_FLAG_TSYNC = 0x1 + SECCOMP_FILTER_FLAG_TSYNC_ESRCH = 0x10 + SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV = 0x20 + SECCOMP_GET_ACTION_AVAIL = 0x2 + SECCOMP_GET_NOTIF_SIZES = 0x3 + SECCOMP_IOCTL_NOTIF_RECV = 0xc0502100 + SECCOMP_IOCTL_NOTIF_SEND = 0xc0182101 + SECCOMP_IOC_MAGIC = '!' SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 + SECCOMP_RET_ACTION = 0x7fff0000 + SECCOMP_RET_ACTION_FULL = 0xffff0000 + SECCOMP_RET_ALLOW = 0x7fff0000 + SECCOMP_RET_DATA = 0xffff + SECCOMP_RET_ERRNO = 0x50000 + SECCOMP_RET_KILL = 0x0 + SECCOMP_RET_KILL_PROCESS = 0x80000000 + SECCOMP_RET_KILL_THREAD = 0x0 + SECCOMP_RET_LOG = 0x7ffc0000 + SECCOMP_RET_TRACE = 0x7ff00000 + SECCOMP_RET_TRAP = 0x30000 + SECCOMP_RET_USER_NOTIF = 0x7fc00000 + SECCOMP_SET_MODE_FILTER = 0x1 + SECCOMP_SET_MODE_STRICT = 0x0 + SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP = 0x1 + SECCOMP_USER_NOTIF_FLAG_CONTINUE = 0x1 SECRETMEM_MAGIC = 0x5345434d SECURITYFS_MAGIC = 0x73636673 SEEK_CUR = 0x1 @@ -3075,6 +3108,7 @@ const ( SOL_TIPC = 0x10f SOL_TLS = 0x11a SOL_UDP = 0x11 + SOL_VSOCK = 0x11f SOL_X25 = 0x106 SOL_XDP = 0x11b SOMAXCONN = 0x1000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 4920821cf..42ff8c3c1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -281,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index a0c1e4112..dca436004 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -282,6 +282,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index c63985560..5cca668ac 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -288,6 +288,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 47cc62e25..d8cae6d15 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -278,6 +278,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index 27ac4a09e..28e39afdc 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -275,6 +275,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 54694642a..cd66e92cb 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -281,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 3adb81d75..c1595eba7 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -281,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 2dfe98f0d..ee9456b0d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -281,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index f5398f84f..8cfca81e1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -281,6 +281,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index c54f152d6..60b0deb3a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -336,6 +336,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 76057dc72..f90aa7281 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -340,6 +340,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index e0c3725e2..ba9e01503 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -340,6 +340,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 18f2813ed..07cdfd6e9 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -272,6 +272,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 11619d4ec..2f1dd214a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -344,6 +344,9 @@ const ( SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index 396d994da..f40519d90 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -335,6 +335,9 @@ const ( SCM_TIMESTAMPNS = 0x21 SCM_TXTIME = 0x3f SCM_WIFI_STATUS = 0x25 + SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 + SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 + SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x400000 SFD_NONBLOCK = 0x4000 SF_FP = 0x38 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 1488d2712..87d8612a1 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -906,6 +906,16 @@ func Fspick(dirfd int, pathName string, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error) { + _, _, e1 := Syscall6(SYS_FSCONFIG, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(value)), uintptr(aux), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getdents(fd int, buf []byte) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index fcf3ecbdd..0cc3ce496 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -448,4 +448,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index f56dc2504..856d92d69 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -371,4 +371,7 @@ const ( SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index 974bf2467..8d467094c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -412,4 +412,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index 39a2739e2..edc173244 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -315,4 +315,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go index cf9c9d77e..445eba206 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go @@ -309,4 +309,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index 10b7362ef..adba01bca 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -432,4 +432,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 4450 SYS_CACHESTAT = 4451 SYS_FCHMODAT2 = 4452 + SYS_MAP_SHADOW_STACK = 4453 + SYS_FUTEX_WAKE = 4454 + SYS_FUTEX_WAIT = 4455 + SYS_FUTEX_REQUEUE = 4456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index cd4d8b4fd..014c4e9c7 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -362,4 +362,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 5450 SYS_CACHESTAT = 5451 SYS_FCHMODAT2 = 5452 + SYS_MAP_SHADOW_STACK = 5453 + SYS_FUTEX_WAKE = 5454 + SYS_FUTEX_WAIT = 5455 + SYS_FUTEX_REQUEUE = 5456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index 2c0efca81..ccc97d74d 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -362,4 +362,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 5450 SYS_CACHESTAT = 5451 SYS_FCHMODAT2 = 5452 + SYS_MAP_SHADOW_STACK = 5453 + SYS_FUTEX_WAKE = 5454 + SYS_FUTEX_WAIT = 5455 + SYS_FUTEX_REQUEUE = 5456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index a72e31d39..ec2b64a95 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -432,4 +432,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 4450 SYS_CACHESTAT = 4451 SYS_FCHMODAT2 = 4452 + SYS_MAP_SHADOW_STACK = 4453 + SYS_FUTEX_WAKE = 4454 + SYS_FUTEX_WAIT = 4455 + SYS_FUTEX_REQUEUE = 4456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go index c7d1e3747..21a839e33 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go @@ -439,4 +439,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index f4d4838c8..c11121ec3 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -411,4 +411,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index b64f0e591..909b631fc 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -411,4 +411,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 95711195a..e49bed16e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -316,4 +316,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index f94e943bc..66017d2d3 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -377,4 +377,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index ba0c2bc51..47bab18dc 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -390,4 +390,8 @@ const ( SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 + SYS_MAP_SHADOW_STACK = 453 + SYS_FUTEX_WAKE = 454 + SYS_FUTEX_WAIT = 455 + SYS_FUTEX_REQUEUE = 456 ) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index bbf8399ff..eff6bcdef 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -174,7 +174,8 @@ type FscryptPolicyV2 struct { Contents_encryption_mode uint8 Filenames_encryption_mode uint8 Flags uint8 - _ [4]uint8 + Log2_data_unit_size uint8 + _ [3]uint8 Master_key_identifier [16]uint8 } @@ -455,60 +456,63 @@ type Ucred struct { } type TCPInfo struct { - State uint8 - Ca_state uint8 - Retransmits uint8 - Probes uint8 - Backoff uint8 - Options uint8 - Rto uint32 - Ato uint32 - Snd_mss uint32 - Rcv_mss uint32 - Unacked uint32 - Sacked uint32 - Lost uint32 - Retrans uint32 - Fackets uint32 - Last_data_sent uint32 - Last_ack_sent uint32 - Last_data_recv uint32 - Last_ack_recv uint32 - Pmtu uint32 - Rcv_ssthresh uint32 - Rtt uint32 - Rttvar uint32 - Snd_ssthresh uint32 - Snd_cwnd uint32 - Advmss uint32 - Reordering uint32 - Rcv_rtt uint32 - Rcv_space uint32 - Total_retrans uint32 - Pacing_rate uint64 - Max_pacing_rate uint64 - Bytes_acked uint64 - Bytes_received uint64 - Segs_out uint32 - Segs_in uint32 - Notsent_bytes uint32 - Min_rtt uint32 - Data_segs_in uint32 - Data_segs_out uint32 - Delivery_rate uint64 - Busy_time uint64 - Rwnd_limited uint64 - Sndbuf_limited uint64 - Delivered uint32 - Delivered_ce uint32 - Bytes_sent uint64 - Bytes_retrans uint64 - Dsack_dups uint32 - Reord_seen uint32 - Rcv_ooopack uint32 - Snd_wnd uint32 - Rcv_wnd uint32 - Rehash uint32 + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 + Pacing_rate uint64 + Max_pacing_rate uint64 + Bytes_acked uint64 + Bytes_received uint64 + Segs_out uint32 + Segs_in uint32 + Notsent_bytes uint32 + Min_rtt uint32 + Data_segs_in uint32 + Data_segs_out uint32 + Delivery_rate uint64 + Busy_time uint64 + Rwnd_limited uint64 + Sndbuf_limited uint64 + Delivered uint32 + Delivered_ce uint32 + Bytes_sent uint64 + Bytes_retrans uint64 + Dsack_dups uint32 + Reord_seen uint32 + Rcv_ooopack uint32 + Snd_wnd uint32 + Rcv_wnd uint32 + Rehash uint32 + Total_rto uint16 + Total_rto_recoveries uint16 + Total_rto_time uint32 } type CanFilter struct { @@ -551,7 +555,7 @@ const ( SizeofIPv6MTUInfo = 0x20 SizeofICMPv6Filter = 0x20 SizeofUcred = 0xc - SizeofTCPInfo = 0xf0 + SizeofTCPInfo = 0xf8 SizeofCanFilter = 0x8 SizeofTCPRepairOpt = 0x8 ) @@ -832,6 +836,15 @@ const ( FSPICK_EMPTY_PATH = 0x8 FSMOUNT_CLOEXEC = 0x1 + + FSCONFIG_SET_FLAG = 0x0 + FSCONFIG_SET_STRING = 0x1 + FSCONFIG_SET_BINARY = 0x2 + FSCONFIG_SET_PATH = 0x3 + FSCONFIG_SET_PATH_EMPTY = 0x4 + FSCONFIG_SET_FD = 0x5 + FSCONFIG_CMD_CREATE = 0x6 + FSCONFIG_CMD_RECONFIGURE = 0x7 ) type OpenHow struct { @@ -1546,6 +1559,7 @@ const ( IFLA_DEVLINK_PORT = 0x3e IFLA_GSO_IPV4_MAX_SIZE = 0x3f IFLA_GRO_IPV4_MAX_SIZE = 0x40 + IFLA_DPLL_PIN = 0x41 IFLA_PROTO_DOWN_REASON_UNSPEC = 0x0 IFLA_PROTO_DOWN_REASON_MASK = 0x1 IFLA_PROTO_DOWN_REASON_VALUE = 0x2 @@ -1561,6 +1575,7 @@ const ( IFLA_INET6_ICMP6STATS = 0x6 IFLA_INET6_TOKEN = 0x7 IFLA_INET6_ADDR_GEN_MODE = 0x8 + IFLA_INET6_RA_MTU = 0x9 IFLA_BR_UNSPEC = 0x0 IFLA_BR_FORWARD_DELAY = 0x1 IFLA_BR_HELLO_TIME = 0x2 @@ -1608,6 +1623,9 @@ const ( IFLA_BR_MCAST_MLD_VERSION = 0x2c IFLA_BR_VLAN_STATS_PER_PORT = 0x2d IFLA_BR_MULTI_BOOLOPT = 0x2e + IFLA_BR_MCAST_QUERIER_STATE = 0x2f + IFLA_BR_FDB_N_LEARNED = 0x30 + IFLA_BR_FDB_MAX_LEARNED = 0x31 IFLA_BRPORT_UNSPEC = 0x0 IFLA_BRPORT_STATE = 0x1 IFLA_BRPORT_PRIORITY = 0x2 @@ -1645,6 +1663,14 @@ const ( IFLA_BRPORT_BACKUP_PORT = 0x22 IFLA_BRPORT_MRP_RING_OPEN = 0x23 IFLA_BRPORT_MRP_IN_OPEN = 0x24 + IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT = 0x25 + IFLA_BRPORT_MCAST_EHT_HOSTS_CNT = 0x26 + IFLA_BRPORT_LOCKED = 0x27 + IFLA_BRPORT_MAB = 0x28 + IFLA_BRPORT_MCAST_N_GROUPS = 0x29 + IFLA_BRPORT_MCAST_MAX_GROUPS = 0x2a + IFLA_BRPORT_NEIGH_VLAN_SUPPRESS = 0x2b + IFLA_BRPORT_BACKUP_NHID = 0x2c IFLA_INFO_UNSPEC = 0x0 IFLA_INFO_KIND = 0x1 IFLA_INFO_DATA = 0x2 @@ -1666,6 +1692,9 @@ const ( IFLA_MACVLAN_MACADDR = 0x4 IFLA_MACVLAN_MACADDR_DATA = 0x5 IFLA_MACVLAN_MACADDR_COUNT = 0x6 + IFLA_MACVLAN_BC_QUEUE_LEN = 0x7 + IFLA_MACVLAN_BC_QUEUE_LEN_USED = 0x8 + IFLA_MACVLAN_BC_CUTOFF = 0x9 IFLA_VRF_UNSPEC = 0x0 IFLA_VRF_TABLE = 0x1 IFLA_VRF_PORT_UNSPEC = 0x0 @@ -1689,9 +1718,22 @@ const ( IFLA_XFRM_UNSPEC = 0x0 IFLA_XFRM_LINK = 0x1 IFLA_XFRM_IF_ID = 0x2 + IFLA_XFRM_COLLECT_METADATA = 0x3 IFLA_IPVLAN_UNSPEC = 0x0 IFLA_IPVLAN_MODE = 0x1 IFLA_IPVLAN_FLAGS = 0x2 + NETKIT_NEXT = -0x1 + NETKIT_PASS = 0x0 + NETKIT_DROP = 0x2 + NETKIT_REDIRECT = 0x7 + NETKIT_L2 = 0x0 + NETKIT_L3 = 0x1 + IFLA_NETKIT_UNSPEC = 0x0 + IFLA_NETKIT_PEER_INFO = 0x1 + IFLA_NETKIT_PRIMARY = 0x2 + IFLA_NETKIT_POLICY = 0x3 + IFLA_NETKIT_PEER_POLICY = 0x4 + IFLA_NETKIT_MODE = 0x5 IFLA_VXLAN_UNSPEC = 0x0 IFLA_VXLAN_ID = 0x1 IFLA_VXLAN_GROUP = 0x2 @@ -1722,6 +1764,8 @@ const ( IFLA_VXLAN_GPE = 0x1b IFLA_VXLAN_TTL_INHERIT = 0x1c IFLA_VXLAN_DF = 0x1d + IFLA_VXLAN_VNIFILTER = 0x1e + IFLA_VXLAN_LOCALBYPASS = 0x1f IFLA_GENEVE_UNSPEC = 0x0 IFLA_GENEVE_ID = 0x1 IFLA_GENEVE_REMOTE = 0x2 @@ -1736,6 +1780,7 @@ const ( IFLA_GENEVE_LABEL = 0xb IFLA_GENEVE_TTL_INHERIT = 0xc IFLA_GENEVE_DF = 0xd + IFLA_GENEVE_INNER_PROTO_INHERIT = 0xe IFLA_BAREUDP_UNSPEC = 0x0 IFLA_BAREUDP_PORT = 0x1 IFLA_BAREUDP_ETHERTYPE = 0x2 @@ -1748,6 +1793,8 @@ const ( IFLA_GTP_FD1 = 0x2 IFLA_GTP_PDP_HASHSIZE = 0x3 IFLA_GTP_ROLE = 0x4 + IFLA_GTP_CREATE_SOCKETS = 0x5 + IFLA_GTP_RESTART_COUNT = 0x6 IFLA_BOND_UNSPEC = 0x0 IFLA_BOND_MODE = 0x1 IFLA_BOND_ACTIVE_SLAVE = 0x2 @@ -1777,6 +1824,9 @@ const ( IFLA_BOND_AD_ACTOR_SYSTEM = 0x1a IFLA_BOND_TLB_DYNAMIC_LB = 0x1b IFLA_BOND_PEER_NOTIF_DELAY = 0x1c + IFLA_BOND_AD_LACP_ACTIVE = 0x1d + IFLA_BOND_MISSED_MAX = 0x1e + IFLA_BOND_NS_IP6_TARGET = 0x1f IFLA_BOND_AD_INFO_UNSPEC = 0x0 IFLA_BOND_AD_INFO_AGGREGATOR = 0x1 IFLA_BOND_AD_INFO_NUM_PORTS = 0x2 @@ -1792,6 +1842,7 @@ const ( IFLA_BOND_SLAVE_AD_AGGREGATOR_ID = 0x6 IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE = 0x7 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE = 0x8 + IFLA_BOND_SLAVE_PRIO = 0x9 IFLA_VF_INFO_UNSPEC = 0x0 IFLA_VF_INFO = 0x1 IFLA_VF_UNSPEC = 0x0 @@ -1850,8 +1901,16 @@ const ( IFLA_STATS_LINK_XSTATS_SLAVE = 0x3 IFLA_STATS_LINK_OFFLOAD_XSTATS = 0x4 IFLA_STATS_AF_SPEC = 0x5 + IFLA_STATS_GETSET_UNSPEC = 0x0 + IFLA_STATS_GET_FILTERS = 0x1 + IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS = 0x2 IFLA_OFFLOAD_XSTATS_UNSPEC = 0x0 IFLA_OFFLOAD_XSTATS_CPU_HIT = 0x1 + IFLA_OFFLOAD_XSTATS_HW_S_INFO = 0x2 + IFLA_OFFLOAD_XSTATS_L3_STATS = 0x3 + IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC = 0x0 + IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST = 0x1 + IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED = 0x2 IFLA_XDP_UNSPEC = 0x0 IFLA_XDP_FD = 0x1 IFLA_XDP_ATTACHED = 0x2 @@ -1881,6 +1940,11 @@ const ( IFLA_RMNET_UNSPEC = 0x0 IFLA_RMNET_MUX_ID = 0x1 IFLA_RMNET_FLAGS = 0x2 + IFLA_MCTP_UNSPEC = 0x0 + IFLA_MCTP_NET = 0x1 + IFLA_DSA_UNSPEC = 0x0 + IFLA_DSA_CONDUIT = 0x1 + IFLA_DSA_MASTER = 0x1 ) const ( @@ -3399,7 +3463,7 @@ const ( DEVLINK_PORT_FN_ATTR_STATE = 0x2 DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3 DEVLINK_PORT_FN_ATTR_CAPS = 0x4 - DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x4 + DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x5 ) type FsverityDigest struct { @@ -4183,7 +4247,8 @@ const ( ) type LandlockRulesetAttr struct { - Access_fs uint64 + Access_fs uint64 + Access_net uint64 } type LandlockPathBeneathAttr struct { @@ -5134,7 +5199,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x1b + NL80211_FREQUENCY_ATTR_MAX = 0x1c NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc @@ -5547,7 +5612,7 @@ const ( NL80211_REGDOM_TYPE_CUSTOM_WORLD = 0x2 NL80211_REGDOM_TYPE_INTERSECTION = 0x3 NL80211_REGDOM_TYPE_WORLD = 0x1 - NL80211_REG_RULE_ATTR_MAX = 0x7 + NL80211_REG_RULE_ATTR_MAX = 0x8 NL80211_REKEY_DATA_AKM = 0x4 NL80211_REKEY_DATA_KCK = 0x2 NL80211_REKEY_DATA_KEK = 0x1 diff --git a/vendor/golang.org/x/sys/windows/env_windows.go b/vendor/golang.org/x/sys/windows/env_windows.go index b8ad19250..d4577a423 100644 --- a/vendor/golang.org/x/sys/windows/env_windows.go +++ b/vendor/golang.org/x/sys/windows/env_windows.go @@ -37,14 +37,17 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) { return nil, err } defer DestroyEnvironmentBlock(block) - blockp := unsafe.Pointer(block) - for { - entry := UTF16PtrToString((*uint16)(blockp)) - if len(entry) == 0 { - break + size := unsafe.Sizeof(*block) + for *block != 0 { + // find NUL terminator + end := unsafe.Pointer(block) + for *(*uint16)(end) != 0 { + end = unsafe.Add(end, size) } - env = append(env, entry) - blockp = unsafe.Add(blockp, 2*(len(entry)+1)) + + entry := unsafe.Slice(block, (uintptr(end)-uintptr(unsafe.Pointer(block)))/size) + env = append(env, UTF16ToString(entry)) + block = (*uint16)(unsafe.Add(end, size)) } return env, nil } diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index ffb8708cc..6395a031d 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -125,8 +125,7 @@ func UTF16PtrToString(p *uint16) string { for ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ { ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p)) } - - return string(utf16.Decode(unsafe.Slice(p, n))) + return UTF16ToString(unsafe.Slice(p, n)) } func Getpagesize() int { return 4096 } diff --git a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go index 83774fbcb..d5dccb933 100644 --- a/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go +++ b/vendor/google.golang.org/genproto/googleapis/api/annotations/client.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.21.12 +// protoc v4.24.4 // source: google/api/client.proto package annotations @@ -1033,6 +1033,18 @@ type MethodSettings struct { // total_poll_timeout: // seconds: 54000 # 90 minutes LongRunning *MethodSettings_LongRunning `protobuf:"bytes,2,opt,name=long_running,json=longRunning,proto3" json:"long_running,omitempty"` + // List of top-level fields of the request message, that should be + // automatically populated by the client libraries based on their + // (google.api.field_info).format. Currently supported format: UUID4. + // + // Example of a YAML configuration: + // + // publishing: + // method_settings: + // - selector: google.example.v1.ExampleService.CreateExample + // auto_populated_fields: + // - request_id + AutoPopulatedFields []string `protobuf:"bytes,3,rep,name=auto_populated_fields,json=autoPopulatedFields,proto3" json:"auto_populated_fields,omitempty"` } func (x *MethodSettings) Reset() { @@ -1081,6 +1093,13 @@ func (x *MethodSettings) GetLongRunning() *MethodSettings_LongRunning { return nil } +func (x *MethodSettings) GetAutoPopulatedFields() []string { + if x != nil { + return x.AutoPopulatedFields + } + return nil +} + // Describes settings to use when generating API methods that use the // long-running operation pattern. // All default values below are from those used in the client library @@ -1452,69 +1471,73 @@ var file_google_api_client_proto_rawDesc = []byte{ 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x06, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x8e, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xc2, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x0c, 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, - 0x6e, 0x67, 0x52, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x1a, - 0x94, 0x02, 0x0a, 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, - 0x47, 0x0a, 0x12, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, - 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x50, - 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x6f, 0x6c, 0x6c, - 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x70, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, - 0x61, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x0e, - 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x6d, 0x61, 0x78, 0x50, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x47, 0x0a, - 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x54, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2a, 0xa3, 0x01, 0x0a, 0x19, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4c, - 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, - 0x41, 0x44, 0x53, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x48, 0x4f, 0x54, 0x4f, 0x53, 0x10, - 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x45, 0x45, 0x54, 0x5f, 0x56, 0x49, 0x45, 0x57, - 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x4f, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x05, - 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x4f, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x47, 0x45, 0x4e, - 0x45, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x41, 0x49, 0x10, 0x07, 0x2a, 0x67, 0x0a, 0x18, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x44, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x26, 0x43, 0x4c, 0x49, 0x45, - 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x54, 0x49, - 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x10, 0x0a, - 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x4d, 0x41, 0x4e, 0x41, - 0x47, 0x45, 0x52, 0x10, 0x14, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x3a, 0x43, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, 0x6f, 0x73, - 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x42, 0x69, 0x0a, 0x0e, 0x63, - 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0b, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, - 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, - 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, - 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x67, 0x52, 0x0b, 0x6c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, + 0x32, 0x0a, 0x15, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, + 0x61, 0x75, 0x74, 0x6f, 0x50, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x73, 0x1a, 0x94, 0x02, 0x0a, 0x0b, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x12, 0x47, 0x0a, 0x12, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x70, + 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x50, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x12, 0x32, 0x0a, 0x15, + 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x6c, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x13, 0x70, 0x6f, 0x6c, + 0x6c, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x69, 0x65, 0x72, + 0x12, 0x3f, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, 0x64, 0x65, 0x6c, + 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x50, 0x6f, 0x6c, 0x6c, 0x44, 0x65, 0x6c, 0x61, + 0x79, 0x12, 0x47, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x6c, 0x6c, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, + 0x6f, 0x6c, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x2a, 0xa3, 0x01, 0x0a, 0x19, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4c, 0x49, 0x45, + 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, + 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x4f, 0x55, 0x44, 0x10, 0x01, + 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x53, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x48, 0x4f, + 0x54, 0x4f, 0x53, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x52, 0x45, 0x45, 0x54, 0x5f, + 0x56, 0x49, 0x45, 0x57, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x4f, 0x50, 0x50, 0x49, + 0x4e, 0x47, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x45, 0x4f, 0x10, 0x06, 0x12, 0x11, 0x0a, + 0x0d, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x41, 0x49, 0x10, 0x07, + 0x2a, 0x67, 0x0a, 0x18, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, + 0x79, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x26, + 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x42, 0x52, 0x41, 0x52, 0x59, 0x5f, 0x44, + 0x45, 0x53, 0x54, 0x49, 0x4e, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, + 0x55, 0x42, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, + 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x52, 0x10, 0x14, 0x3a, 0x4a, 0x0a, 0x10, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9b, 0x08, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x43, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, + 0x75, 0x74, 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x42, + 0x69, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x42, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go index 25329b769..4b177c820 100644 --- a/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go +++ b/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go @@ -322,6 +322,10 @@ func (d decoder) skipJSONValue() error { if open > d.opts.RecursionLimit { return errors.New("exceeded max recursion depth") } + case json.EOF: + // This can only happen if there's a bug in Decoder.Read. + // Avoid an infinite loop if this does happen. + return errors.New("unexpected EOF") } if open == 0 { return nil diff --git a/vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go b/vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go new file mode 100644 index 000000000..14656b65a --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/editiondefaults/defaults.go @@ -0,0 +1,12 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package editiondefaults contains the binary representation of the editions +// defaults. +package editiondefaults + +import _ "embed" + +//go:embed editions_defaults.binpb +var Defaults []byte diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb similarity index 69% rename from vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb rename to vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb index 1a8610a84..18f075687 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions_defaults.binpb +++ b/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb @@ -1,4 +1,4 @@ -  (0æ +  (0æ   (0ç   (0è æ(è \ No newline at end of file diff --git a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go index d043a6ebe..d2b3ac031 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go @@ -121,7 +121,7 @@ func (d *Decoder) Read() (Token, error) { case ObjectClose: if len(d.openStack) == 0 || - d.lastToken.kind == comma || + d.lastToken.kind&(Name|comma) != 0 || d.openStack[len(d.openStack)-1] != ObjectOpen { return Token{}, d.newSyntaxError(tok.pos, unexpectedFmt, tok.RawString()) } diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index 193c68e8f..8826bcf40 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -68,7 +68,7 @@ type ( Extensions Extensions Services Services - EditionFeatures FileEditionFeatures + EditionFeatures EditionFeatures } FileL2 struct { Options func() protoreflect.ProtoMessage @@ -76,10 +76,13 @@ type ( Locations SourceLocations } - FileEditionFeatures struct { + EditionFeatures struct { // IsFieldPresence is true if field_presence is EXPLICIT // https://protobuf.dev/editions/features/#field_presence IsFieldPresence bool + // IsFieldPresence is true if field_presence is LEGACY_REQUIRED + // https://protobuf.dev/editions/features/#field_presence + IsLegacyRequired bool // IsOpenEnum is true if enum_type is OPEN // https://protobuf.dev/editions/features/#enum_type IsOpenEnum bool @@ -95,6 +98,9 @@ type ( // IsJSONCompliant is true if json_format is ALLOW // https://protobuf.dev/editions/features/#json_format IsJSONCompliant bool + // GenerateLegacyUnmarshalJSON determines if the plugin generates the + // UnmarshalJSON([]byte) error method for enums. + GenerateLegacyUnmarshalJSON bool } ) @@ -156,6 +162,8 @@ type ( } EnumL1 struct { eagerValues bool // controls whether EnumL2.Values is already populated + + EditionFeatures EditionFeatures } EnumL2 struct { Options func() protoreflect.ProtoMessage @@ -217,6 +225,8 @@ type ( Extensions Extensions IsMapEntry bool // promoted from google.protobuf.MessageOptions IsMessageSet bool // promoted from google.protobuf.MessageOptions + + EditionFeatures EditionFeatures } MessageL2 struct { Options func() protoreflect.ProtoMessage @@ -250,8 +260,7 @@ type ( Enum protoreflect.EnumDescriptor Message protoreflect.MessageDescriptor - // Edition features. - Presence bool + EditionFeatures EditionFeatures } Oneof struct { @@ -261,6 +270,8 @@ type ( OneofL1 struct { Options func() protoreflect.ProtoMessage Fields OneofFields // must be consistent with Message.Fields.ContainingOneof + + EditionFeatures EditionFeatures } ) @@ -310,26 +321,36 @@ func (fd *Field) Options() protoreflect.ProtoMessage { } func (fd *Field) Number() protoreflect.FieldNumber { return fd.L1.Number } func (fd *Field) Cardinality() protoreflect.Cardinality { return fd.L1.Cardinality } -func (fd *Field) Kind() protoreflect.Kind { return fd.L1.Kind } -func (fd *Field) HasJSONName() bool { return fd.L1.StringName.hasJSON } -func (fd *Field) JSONName() string { return fd.L1.StringName.getJSON(fd) } -func (fd *Field) TextName() string { return fd.L1.StringName.getText(fd) } +func (fd *Field) Kind() protoreflect.Kind { + return fd.L1.Kind +} +func (fd *Field) HasJSONName() bool { return fd.L1.StringName.hasJSON } +func (fd *Field) JSONName() string { return fd.L1.StringName.getJSON(fd) } +func (fd *Field) TextName() string { return fd.L1.StringName.getText(fd) } func (fd *Field) HasPresence() bool { - if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions { - return fd.L1.Presence || fd.L1.Message != nil || fd.L1.ContainingOneof != nil + if fd.L1.Cardinality == protoreflect.Repeated { + return false } - return fd.L1.Cardinality != protoreflect.Repeated && (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 || fd.L1.Message != nil || fd.L1.ContainingOneof != nil) + explicitFieldPresence := fd.Syntax() == protoreflect.Editions && fd.L1.EditionFeatures.IsFieldPresence + return fd.Syntax() == protoreflect.Proto2 || explicitFieldPresence || fd.L1.Message != nil || fd.L1.ContainingOneof != nil } func (fd *Field) HasOptionalKeyword() bool { return (fd.L0.ParentFile.L1.Syntax == protoreflect.Proto2 && fd.L1.Cardinality == protoreflect.Optional && fd.L1.ContainingOneof == nil) || fd.L1.IsProto3Optional } func (fd *Field) IsPacked() bool { - if !fd.L1.HasPacked && fd.L0.ParentFile.L1.Syntax != protoreflect.Proto2 && fd.L1.Cardinality == protoreflect.Repeated { - switch fd.L1.Kind { - case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: - default: - return true - } + if fd.L1.Cardinality != protoreflect.Repeated { + return false + } + switch fd.L1.Kind { + case protoreflect.StringKind, protoreflect.BytesKind, protoreflect.MessageKind, protoreflect.GroupKind: + return false + } + if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions { + return fd.L1.EditionFeatures.IsPacked + } + if fd.L0.ParentFile.L1.Syntax == protoreflect.Proto3 { + // proto3 repeated fields are packed by default. + return !fd.L1.HasPacked || fd.L1.IsPacked } return fd.L1.IsPacked } @@ -378,6 +399,9 @@ func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {} // WARNING: This method is exempt from the compatibility promise and may be // removed in the future without warning. func (fd *Field) EnforceUTF8() bool { + if fd.L0.ParentFile.L1.Syntax == protoreflect.Editions { + return fd.L1.EditionFeatures.IsUTF8Validated + } if fd.L1.HasEnforceUTF8 { return fd.L1.EnforceUTF8 } @@ -404,10 +428,11 @@ type ( L2 *ExtensionL2 // protected by fileDesc.once } ExtensionL1 struct { - Number protoreflect.FieldNumber - Extendee protoreflect.MessageDescriptor - Cardinality protoreflect.Cardinality - Kind protoreflect.Kind + Number protoreflect.FieldNumber + Extendee protoreflect.MessageDescriptor + Cardinality protoreflect.Cardinality + Kind protoreflect.Kind + EditionFeatures EditionFeatures } ExtensionL2 struct { Options func() protoreflect.ProtoMessage diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go index 4a1584c9d..237e64fd2 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go @@ -5,6 +5,7 @@ package filedesc import ( + "fmt" "sync" "google.golang.org/protobuf/encoding/protowire" @@ -98,6 +99,7 @@ func (fd *File) unmarshalSeed(b []byte) { var prevField protoreflect.FieldNumber var numEnums, numMessages, numExtensions, numServices int var posEnums, posMessages, posExtensions, posServices int + var options []byte b0 := b for len(b) > 0 { num, typ, n := protowire.ConsumeTag(b) @@ -113,6 +115,8 @@ func (fd *File) unmarshalSeed(b []byte) { fd.L1.Syntax = protoreflect.Proto2 case "proto3": fd.L1.Syntax = protoreflect.Proto3 + case "editions": + fd.L1.Syntax = protoreflect.Editions default: panic("invalid syntax") } @@ -120,6 +124,8 @@ func (fd *File) unmarshalSeed(b []byte) { fd.L1.Path = sb.MakeString(v) case genid.FileDescriptorProto_Package_field_number: fd.L1.Package = protoreflect.FullName(sb.MakeString(v)) + case genid.FileDescriptorProto_Options_field_number: + options = v case genid.FileDescriptorProto_EnumType_field_number: if prevField != genid.FileDescriptorProto_EnumType_field_number { if numEnums > 0 { @@ -154,6 +160,13 @@ func (fd *File) unmarshalSeed(b []byte) { numServices++ } prevField = num + case protowire.VarintType: + v, m := protowire.ConsumeVarint(b) + b = b[m:] + switch num { + case genid.FileDescriptorProto_Edition_field_number: + fd.L1.Edition = Edition(v) + } default: m := protowire.ConsumeFieldValue(num, typ, b) b = b[m:] @@ -166,6 +179,15 @@ func (fd *File) unmarshalSeed(b []byte) { fd.L1.Syntax = protoreflect.Proto2 } + if fd.L1.Syntax == protoreflect.Editions { + fd.L1.EditionFeatures = getFeaturesFor(fd.L1.Edition) + } + + // Parse editions features from options if any + if options != nil { + fd.unmarshalSeedOptions(options) + } + // Must allocate all declarations before parsing each descriptor type // to ensure we handled all descriptors in "flattened ordering". if numEnums > 0 { @@ -219,6 +241,28 @@ func (fd *File) unmarshalSeed(b []byte) { } } +func (fd *File) unmarshalSeedOptions(b []byte) { + for b := b; len(b) > 0; { + num, typ, n := protowire.ConsumeTag(b) + b = b[n:] + switch typ { + case protowire.BytesType: + v, m := protowire.ConsumeBytes(b) + b = b[m:] + switch num { + case genid.FileOptions_Features_field_number: + if fd.Syntax() != protoreflect.Editions { + panic(fmt.Sprintf("invalid descriptor: using edition features in a proto with syntax %s", fd.Syntax())) + } + fd.L1.EditionFeatures = unmarshalFeatureSet(v, fd.L1.EditionFeatures) + } + default: + m := protowire.ConsumeFieldValue(num, typ, b) + b = b[m:] + } + } +} + func (ed *Enum) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protoreflect.Descriptor, i int) { ed.L0.ParentFile = pf ed.L0.Parent = pd @@ -275,6 +319,7 @@ func (md *Message) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor md.L0.ParentFile = pf md.L0.Parent = pd md.L0.Index = i + md.L1.EditionFeatures = featuresFromParentDesc(md.Parent()) var prevField protoreflect.FieldNumber var numEnums, numMessages, numExtensions int @@ -380,6 +425,13 @@ func (md *Message) unmarshalSeedOptions(b []byte) { case genid.MessageOptions_MessageSetWireFormat_field_number: md.L1.IsMessageSet = protowire.DecodeBool(v) } + case protowire.BytesType: + v, m := protowire.ConsumeBytes(b) + b = b[m:] + switch num { + case genid.MessageOptions_Features_field_number: + md.L1.EditionFeatures = unmarshalFeatureSet(v, md.L1.EditionFeatures) + } default: m := protowire.ConsumeFieldValue(num, typ, b) b = b[m:] diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go index 736a19a75..482a61cc1 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go @@ -414,6 +414,7 @@ func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoref fd.L0.ParentFile = pf fd.L0.Parent = pd fd.L0.Index = i + fd.L1.EditionFeatures = featuresFromParentDesc(fd.Parent()) var rawTypeName []byte var rawOptions []byte @@ -465,6 +466,12 @@ func (fd *Field) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoref b = b[m:] } } + if fd.Syntax() == protoreflect.Editions && fd.L1.Kind == protoreflect.MessageKind && fd.L1.EditionFeatures.IsDelimitedEncoded { + fd.L1.Kind = protoreflect.GroupKind + } + if fd.Syntax() == protoreflect.Editions && fd.L1.EditionFeatures.IsLegacyRequired { + fd.L1.Cardinality = protoreflect.Required + } if rawTypeName != nil { name := makeFullName(sb, rawTypeName) switch fd.L1.Kind { @@ -497,6 +504,13 @@ func (fd *Field) unmarshalOptions(b []byte) { fd.L1.HasEnforceUTF8 = true fd.L1.EnforceUTF8 = protowire.DecodeBool(v) } + case protowire.BytesType: + v, m := protowire.ConsumeBytes(b) + b = b[m:] + switch num { + case genid.FieldOptions_Features_field_number: + fd.L1.EditionFeatures = unmarshalFeatureSet(v, fd.L1.EditionFeatures) + } default: m := protowire.ConsumeFieldValue(num, typ, b) b = b[m:] @@ -534,6 +548,7 @@ func (od *Oneof) unmarshalFull(b []byte, sb *strs.Builder, pf *File, pd protoref func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { var rawTypeName []byte var rawOptions []byte + xd.L1.EditionFeatures = featuresFromParentDesc(xd.L1.Extendee) xd.L2 = new(ExtensionL2) for len(b) > 0 { num, typ, n := protowire.ConsumeTag(b) @@ -565,6 +580,12 @@ func (xd *Extension) unmarshalFull(b []byte, sb *strs.Builder) { b = b[m:] } } + if xd.Syntax() == protoreflect.Editions && xd.L1.Kind == protoreflect.MessageKind && xd.L1.EditionFeatures.IsDelimitedEncoded { + xd.L1.Kind = protoreflect.GroupKind + } + if xd.Syntax() == protoreflect.Editions && xd.L1.EditionFeatures.IsLegacyRequired { + xd.L1.Cardinality = protoreflect.Required + } if rawTypeName != nil { name := makeFullName(sb, rawTypeName) switch xd.L1.Kind { @@ -589,6 +610,13 @@ func (xd *Extension) unmarshalOptions(b []byte) { case genid.FieldOptions_Packed_field_number: xd.L2.IsPacked = protowire.DecodeBool(v) } + case protowire.BytesType: + v, m := protowire.ConsumeBytes(b) + b = b[m:] + switch num { + case genid.FieldOptions_Features_field_number: + xd.L1.EditionFeatures = unmarshalFeatureSet(v, xd.L1.EditionFeatures) + } default: m := protowire.ConsumeFieldValue(num, typ, b) b = b[m:] diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/editions.go b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go new file mode 100644 index 000000000..0375a49d4 --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/filedesc/editions.go @@ -0,0 +1,142 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package filedesc + +import ( + "fmt" + + "google.golang.org/protobuf/encoding/protowire" + "google.golang.org/protobuf/internal/editiondefaults" + "google.golang.org/protobuf/internal/genid" + "google.golang.org/protobuf/reflect/protoreflect" +) + +var defaultsCache = make(map[Edition]EditionFeatures) + +func init() { + unmarshalEditionDefaults(editiondefaults.Defaults) +} + +func unmarshalGoFeature(b []byte, parent EditionFeatures) EditionFeatures { + for len(b) > 0 { + num, _, n := protowire.ConsumeTag(b) + b = b[n:] + switch num { + case genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number: + v, m := protowire.ConsumeVarint(b) + b = b[m:] + parent.GenerateLegacyUnmarshalJSON = protowire.DecodeBool(v) + default: + panic(fmt.Sprintf("unkown field number %d while unmarshalling GoFeatures", num)) + } + } + return parent +} + +func unmarshalFeatureSet(b []byte, parent EditionFeatures) EditionFeatures { + for len(b) > 0 { + num, typ, n := protowire.ConsumeTag(b) + b = b[n:] + switch typ { + case protowire.VarintType: + v, m := protowire.ConsumeVarint(b) + b = b[m:] + switch num { + case genid.FeatureSet_FieldPresence_field_number: + parent.IsFieldPresence = v == genid.FeatureSet_EXPLICIT_enum_value || v == genid.FeatureSet_LEGACY_REQUIRED_enum_value + parent.IsLegacyRequired = v == genid.FeatureSet_LEGACY_REQUIRED_enum_value + case genid.FeatureSet_EnumType_field_number: + parent.IsOpenEnum = v == genid.FeatureSet_OPEN_enum_value + case genid.FeatureSet_RepeatedFieldEncoding_field_number: + parent.IsPacked = v == genid.FeatureSet_PACKED_enum_value + case genid.FeatureSet_Utf8Validation_field_number: + parent.IsUTF8Validated = v == genid.FeatureSet_VERIFY_enum_value + case genid.FeatureSet_MessageEncoding_field_number: + parent.IsDelimitedEncoded = v == genid.FeatureSet_DELIMITED_enum_value + case genid.FeatureSet_JsonFormat_field_number: + parent.IsJSONCompliant = v == genid.FeatureSet_ALLOW_enum_value + default: + panic(fmt.Sprintf("unkown field number %d while unmarshalling FeatureSet", num)) + } + case protowire.BytesType: + v, m := protowire.ConsumeBytes(b) + b = b[m:] + switch num { + case genid.GoFeatures_LegacyUnmarshalJsonEnum_field_number: + parent = unmarshalGoFeature(v, parent) + } + } + } + + return parent +} + +func featuresFromParentDesc(parentDesc protoreflect.Descriptor) EditionFeatures { + var parentFS EditionFeatures + switch p := parentDesc.(type) { + case *File: + parentFS = p.L1.EditionFeatures + case *Message: + parentFS = p.L1.EditionFeatures + default: + panic(fmt.Sprintf("unknown parent type %T", parentDesc)) + } + return parentFS +} + +func unmarshalEditionDefault(b []byte) { + var ed Edition + var fs EditionFeatures + for len(b) > 0 { + num, typ, n := protowire.ConsumeTag(b) + b = b[n:] + switch typ { + case protowire.VarintType: + v, m := protowire.ConsumeVarint(b) + b = b[m:] + switch num { + case genid.FeatureSetDefaults_FeatureSetEditionDefault_Edition_field_number: + ed = Edition(v) + } + case protowire.BytesType: + v, m := protowire.ConsumeBytes(b) + b = b[m:] + switch num { + case genid.FeatureSetDefaults_FeatureSetEditionDefault_Features_field_number: + fs = unmarshalFeatureSet(v, fs) + } + } + } + defaultsCache[ed] = fs +} + +func unmarshalEditionDefaults(b []byte) { + for len(b) > 0 { + num, _, n := protowire.ConsumeTag(b) + b = b[n:] + switch num { + case genid.FeatureSetDefaults_Defaults_field_number: + def, m := protowire.ConsumeBytes(b) + b = b[m:] + unmarshalEditionDefault(def) + case genid.FeatureSetDefaults_MinimumEdition_field_number, + genid.FeatureSetDefaults_MaximumEdition_field_number: + // We don't care about the minimum and maximum editions. If the + // edition we are looking for later on is not in the cache we know + // it is outside of the range between minimum and maximum edition. + _, m := protowire.ConsumeVarint(b) + b = b[m:] + default: + panic(fmt.Sprintf("unkown field number %d while unmarshalling EditionDefault", num)) + } + } +} + +func getFeaturesFor(ed Edition) EditionFeatures { + if def, ok := defaultsCache[ed]; ok { + return def + } + panic(fmt.Sprintf("unsupported edition: %v", ed)) +} diff --git a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go index 8f94230ea..40272c893 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go @@ -18,6 +18,21 @@ const ( Edition_enum_name = "Edition" ) +// Enum values for google.protobuf.Edition. +const ( + Edition_EDITION_UNKNOWN_enum_value = 0 + Edition_EDITION_PROTO2_enum_value = 998 + Edition_EDITION_PROTO3_enum_value = 999 + Edition_EDITION_2023_enum_value = 1000 + Edition_EDITION_2024_enum_value = 1001 + Edition_EDITION_1_TEST_ONLY_enum_value = 1 + Edition_EDITION_2_TEST_ONLY_enum_value = 2 + Edition_EDITION_99997_TEST_ONLY_enum_value = 99997 + Edition_EDITION_99998_TEST_ONLY_enum_value = 99998 + Edition_EDITION_99999_TEST_ONLY_enum_value = 99999 + Edition_EDITION_MAX_enum_value = 2147483647 +) + // Names for google.protobuf.FileDescriptorSet. const ( FileDescriptorSet_message_name protoreflect.Name = "FileDescriptorSet" @@ -213,6 +228,12 @@ const ( ExtensionRangeOptions_VerificationState_enum_name = "VerificationState" ) +// Enum values for google.protobuf.ExtensionRangeOptions.VerificationState. +const ( + ExtensionRangeOptions_DECLARATION_enum_value = 0 + ExtensionRangeOptions_UNVERIFIED_enum_value = 1 +) + // Names for google.protobuf.ExtensionRangeOptions.Declaration. const ( ExtensionRangeOptions_Declaration_message_name protoreflect.Name = "Declaration" @@ -297,12 +318,41 @@ const ( FieldDescriptorProto_Type_enum_name = "Type" ) +// Enum values for google.protobuf.FieldDescriptorProto.Type. +const ( + FieldDescriptorProto_TYPE_DOUBLE_enum_value = 1 + FieldDescriptorProto_TYPE_FLOAT_enum_value = 2 + FieldDescriptorProto_TYPE_INT64_enum_value = 3 + FieldDescriptorProto_TYPE_UINT64_enum_value = 4 + FieldDescriptorProto_TYPE_INT32_enum_value = 5 + FieldDescriptorProto_TYPE_FIXED64_enum_value = 6 + FieldDescriptorProto_TYPE_FIXED32_enum_value = 7 + FieldDescriptorProto_TYPE_BOOL_enum_value = 8 + FieldDescriptorProto_TYPE_STRING_enum_value = 9 + FieldDescriptorProto_TYPE_GROUP_enum_value = 10 + FieldDescriptorProto_TYPE_MESSAGE_enum_value = 11 + FieldDescriptorProto_TYPE_BYTES_enum_value = 12 + FieldDescriptorProto_TYPE_UINT32_enum_value = 13 + FieldDescriptorProto_TYPE_ENUM_enum_value = 14 + FieldDescriptorProto_TYPE_SFIXED32_enum_value = 15 + FieldDescriptorProto_TYPE_SFIXED64_enum_value = 16 + FieldDescriptorProto_TYPE_SINT32_enum_value = 17 + FieldDescriptorProto_TYPE_SINT64_enum_value = 18 +) + // Full and short names for google.protobuf.FieldDescriptorProto.Label. const ( FieldDescriptorProto_Label_enum_fullname = "google.protobuf.FieldDescriptorProto.Label" FieldDescriptorProto_Label_enum_name = "Label" ) +// Enum values for google.protobuf.FieldDescriptorProto.Label. +const ( + FieldDescriptorProto_LABEL_OPTIONAL_enum_value = 1 + FieldDescriptorProto_LABEL_REPEATED_enum_value = 3 + FieldDescriptorProto_LABEL_REQUIRED_enum_value = 2 +) + // Names for google.protobuf.OneofDescriptorProto. const ( OneofDescriptorProto_message_name protoreflect.Name = "OneofDescriptorProto" @@ -474,7 +524,6 @@ const ( FileOptions_CcGenericServices_field_name protoreflect.Name = "cc_generic_services" FileOptions_JavaGenericServices_field_name protoreflect.Name = "java_generic_services" FileOptions_PyGenericServices_field_name protoreflect.Name = "py_generic_services" - FileOptions_PhpGenericServices_field_name protoreflect.Name = "php_generic_services" FileOptions_Deprecated_field_name protoreflect.Name = "deprecated" FileOptions_CcEnableArenas_field_name protoreflect.Name = "cc_enable_arenas" FileOptions_ObjcClassPrefix_field_name protoreflect.Name = "objc_class_prefix" @@ -497,7 +546,6 @@ const ( FileOptions_CcGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.cc_generic_services" FileOptions_JavaGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.java_generic_services" FileOptions_PyGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.py_generic_services" - FileOptions_PhpGenericServices_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.php_generic_services" FileOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.deprecated" FileOptions_CcEnableArenas_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.cc_enable_arenas" FileOptions_ObjcClassPrefix_field_fullname protoreflect.FullName = "google.protobuf.FileOptions.objc_class_prefix" @@ -523,7 +571,6 @@ const ( FileOptions_CcGenericServices_field_number protoreflect.FieldNumber = 16 FileOptions_JavaGenericServices_field_number protoreflect.FieldNumber = 17 FileOptions_PyGenericServices_field_number protoreflect.FieldNumber = 18 - FileOptions_PhpGenericServices_field_number protoreflect.FieldNumber = 42 FileOptions_Deprecated_field_number protoreflect.FieldNumber = 23 FileOptions_CcEnableArenas_field_number protoreflect.FieldNumber = 31 FileOptions_ObjcClassPrefix_field_number protoreflect.FieldNumber = 36 @@ -543,6 +590,13 @@ const ( FileOptions_OptimizeMode_enum_name = "OptimizeMode" ) +// Enum values for google.protobuf.FileOptions.OptimizeMode. +const ( + FileOptions_SPEED_enum_value = 1 + FileOptions_CODE_SIZE_enum_value = 2 + FileOptions_LITE_RUNTIME_enum_value = 3 +) + // Names for google.protobuf.MessageOptions. const ( MessageOptions_message_name protoreflect.Name = "MessageOptions" @@ -639,24 +693,59 @@ const ( FieldOptions_CType_enum_name = "CType" ) +// Enum values for google.protobuf.FieldOptions.CType. +const ( + FieldOptions_STRING_enum_value = 0 + FieldOptions_CORD_enum_value = 1 + FieldOptions_STRING_PIECE_enum_value = 2 +) + // Full and short names for google.protobuf.FieldOptions.JSType. const ( FieldOptions_JSType_enum_fullname = "google.protobuf.FieldOptions.JSType" FieldOptions_JSType_enum_name = "JSType" ) +// Enum values for google.protobuf.FieldOptions.JSType. +const ( + FieldOptions_JS_NORMAL_enum_value = 0 + FieldOptions_JS_STRING_enum_value = 1 + FieldOptions_JS_NUMBER_enum_value = 2 +) + // Full and short names for google.protobuf.FieldOptions.OptionRetention. const ( FieldOptions_OptionRetention_enum_fullname = "google.protobuf.FieldOptions.OptionRetention" FieldOptions_OptionRetention_enum_name = "OptionRetention" ) +// Enum values for google.protobuf.FieldOptions.OptionRetention. +const ( + FieldOptions_RETENTION_UNKNOWN_enum_value = 0 + FieldOptions_RETENTION_RUNTIME_enum_value = 1 + FieldOptions_RETENTION_SOURCE_enum_value = 2 +) + // Full and short names for google.protobuf.FieldOptions.OptionTargetType. const ( FieldOptions_OptionTargetType_enum_fullname = "google.protobuf.FieldOptions.OptionTargetType" FieldOptions_OptionTargetType_enum_name = "OptionTargetType" ) +// Enum values for google.protobuf.FieldOptions.OptionTargetType. +const ( + FieldOptions_TARGET_TYPE_UNKNOWN_enum_value = 0 + FieldOptions_TARGET_TYPE_FILE_enum_value = 1 + FieldOptions_TARGET_TYPE_EXTENSION_RANGE_enum_value = 2 + FieldOptions_TARGET_TYPE_MESSAGE_enum_value = 3 + FieldOptions_TARGET_TYPE_FIELD_enum_value = 4 + FieldOptions_TARGET_TYPE_ONEOF_enum_value = 5 + FieldOptions_TARGET_TYPE_ENUM_enum_value = 6 + FieldOptions_TARGET_TYPE_ENUM_ENTRY_enum_value = 7 + FieldOptions_TARGET_TYPE_SERVICE_enum_value = 8 + FieldOptions_TARGET_TYPE_METHOD_enum_value = 9 +) + // Names for google.protobuf.FieldOptions.EditionDefault. const ( FieldOptions_EditionDefault_message_name protoreflect.Name = "EditionDefault" @@ -813,6 +902,13 @@ const ( MethodOptions_IdempotencyLevel_enum_name = "IdempotencyLevel" ) +// Enum values for google.protobuf.MethodOptions.IdempotencyLevel. +const ( + MethodOptions_IDEMPOTENCY_UNKNOWN_enum_value = 0 + MethodOptions_NO_SIDE_EFFECTS_enum_value = 1 + MethodOptions_IDEMPOTENT_enum_value = 2 +) + // Names for google.protobuf.UninterpretedOption. const ( UninterpretedOption_message_name protoreflect.Name = "UninterpretedOption" @@ -909,36 +1005,79 @@ const ( FeatureSet_FieldPresence_enum_name = "FieldPresence" ) +// Enum values for google.protobuf.FeatureSet.FieldPresence. +const ( + FeatureSet_FIELD_PRESENCE_UNKNOWN_enum_value = 0 + FeatureSet_EXPLICIT_enum_value = 1 + FeatureSet_IMPLICIT_enum_value = 2 + FeatureSet_LEGACY_REQUIRED_enum_value = 3 +) + // Full and short names for google.protobuf.FeatureSet.EnumType. const ( FeatureSet_EnumType_enum_fullname = "google.protobuf.FeatureSet.EnumType" FeatureSet_EnumType_enum_name = "EnumType" ) +// Enum values for google.protobuf.FeatureSet.EnumType. +const ( + FeatureSet_ENUM_TYPE_UNKNOWN_enum_value = 0 + FeatureSet_OPEN_enum_value = 1 + FeatureSet_CLOSED_enum_value = 2 +) + // Full and short names for google.protobuf.FeatureSet.RepeatedFieldEncoding. const ( FeatureSet_RepeatedFieldEncoding_enum_fullname = "google.protobuf.FeatureSet.RepeatedFieldEncoding" FeatureSet_RepeatedFieldEncoding_enum_name = "RepeatedFieldEncoding" ) +// Enum values for google.protobuf.FeatureSet.RepeatedFieldEncoding. +const ( + FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN_enum_value = 0 + FeatureSet_PACKED_enum_value = 1 + FeatureSet_EXPANDED_enum_value = 2 +) + // Full and short names for google.protobuf.FeatureSet.Utf8Validation. const ( FeatureSet_Utf8Validation_enum_fullname = "google.protobuf.FeatureSet.Utf8Validation" FeatureSet_Utf8Validation_enum_name = "Utf8Validation" ) +// Enum values for google.protobuf.FeatureSet.Utf8Validation. +const ( + FeatureSet_UTF8_VALIDATION_UNKNOWN_enum_value = 0 + FeatureSet_VERIFY_enum_value = 2 + FeatureSet_NONE_enum_value = 3 +) + // Full and short names for google.protobuf.FeatureSet.MessageEncoding. const ( FeatureSet_MessageEncoding_enum_fullname = "google.protobuf.FeatureSet.MessageEncoding" FeatureSet_MessageEncoding_enum_name = "MessageEncoding" ) +// Enum values for google.protobuf.FeatureSet.MessageEncoding. +const ( + FeatureSet_MESSAGE_ENCODING_UNKNOWN_enum_value = 0 + FeatureSet_LENGTH_PREFIXED_enum_value = 1 + FeatureSet_DELIMITED_enum_value = 2 +) + // Full and short names for google.protobuf.FeatureSet.JsonFormat. const ( FeatureSet_JsonFormat_enum_fullname = "google.protobuf.FeatureSet.JsonFormat" FeatureSet_JsonFormat_enum_name = "JsonFormat" ) +// Enum values for google.protobuf.FeatureSet.JsonFormat. +const ( + FeatureSet_JSON_FORMAT_UNKNOWN_enum_value = 0 + FeatureSet_ALLOW_enum_value = 1 + FeatureSet_LEGACY_BEST_EFFORT_enum_value = 2 +) + // Names for google.protobuf.FeatureSetDefaults. const ( FeatureSetDefaults_message_name protoreflect.Name = "FeatureSetDefaults" @@ -1085,3 +1224,10 @@ const ( GeneratedCodeInfo_Annotation_Semantic_enum_fullname = "google.protobuf.GeneratedCodeInfo.Annotation.Semantic" GeneratedCodeInfo_Annotation_Semantic_enum_name = "Semantic" ) + +// Enum values for google.protobuf.GeneratedCodeInfo.Annotation.Semantic. +const ( + GeneratedCodeInfo_Annotation_NONE_enum_value = 0 + GeneratedCodeInfo_Annotation_SET_enum_value = 1 + GeneratedCodeInfo_Annotation_ALIAS_enum_value = 2 +) diff --git a/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go new file mode 100644 index 000000000..fd9015e8e --- /dev/null +++ b/vendor/google.golang.org/protobuf/internal/genid/go_features_gen.go @@ -0,0 +1,31 @@ +// Copyright 2019 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated by generate-protos. DO NOT EDIT. + +package genid + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" +) + +const File_reflect_protodesc_proto_go_features_proto = "reflect/protodesc/proto/go_features.proto" + +// Names for google.protobuf.GoFeatures. +const ( + GoFeatures_message_name protoreflect.Name = "GoFeatures" + GoFeatures_message_fullname protoreflect.FullName = "google.protobuf.GoFeatures" +) + +// Field names for google.protobuf.GoFeatures. +const ( + GoFeatures_LegacyUnmarshalJsonEnum_field_name protoreflect.Name = "legacy_unmarshal_json_enum" + + GoFeatures_LegacyUnmarshalJsonEnum_field_fullname protoreflect.FullName = "google.protobuf.GoFeatures.legacy_unmarshal_json_enum" +) + +// Field numbers for google.protobuf.GoFeatures. +const ( + GoFeatures_LegacyUnmarshalJsonEnum_field_number protoreflect.FieldNumber = 1 +) diff --git a/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go b/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go index 1a38944b2..ad6f80c46 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/struct_gen.go @@ -18,6 +18,11 @@ const ( NullValue_enum_name = "NullValue" ) +// Enum values for google.protobuf.NullValue. +const ( + NullValue_NULL_VALUE_enum_value = 0 +) + // Names for google.protobuf.Struct. const ( Struct_message_name protoreflect.Name = "Struct" diff --git a/vendor/google.golang.org/protobuf/internal/genid/type_gen.go b/vendor/google.golang.org/protobuf/internal/genid/type_gen.go index e0f75fea0..49bc73e25 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/type_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/type_gen.go @@ -18,6 +18,13 @@ const ( Syntax_enum_name = "Syntax" ) +// Enum values for google.protobuf.Syntax. +const ( + Syntax_SYNTAX_PROTO2_enum_value = 0 + Syntax_SYNTAX_PROTO3_enum_value = 1 + Syntax_SYNTAX_EDITIONS_enum_value = 2 +) + // Names for google.protobuf.Type. const ( Type_message_name protoreflect.Name = "Type" @@ -105,12 +112,43 @@ const ( Field_Kind_enum_name = "Kind" ) +// Enum values for google.protobuf.Field.Kind. +const ( + Field_TYPE_UNKNOWN_enum_value = 0 + Field_TYPE_DOUBLE_enum_value = 1 + Field_TYPE_FLOAT_enum_value = 2 + Field_TYPE_INT64_enum_value = 3 + Field_TYPE_UINT64_enum_value = 4 + Field_TYPE_INT32_enum_value = 5 + Field_TYPE_FIXED64_enum_value = 6 + Field_TYPE_FIXED32_enum_value = 7 + Field_TYPE_BOOL_enum_value = 8 + Field_TYPE_STRING_enum_value = 9 + Field_TYPE_GROUP_enum_value = 10 + Field_TYPE_MESSAGE_enum_value = 11 + Field_TYPE_BYTES_enum_value = 12 + Field_TYPE_UINT32_enum_value = 13 + Field_TYPE_ENUM_enum_value = 14 + Field_TYPE_SFIXED32_enum_value = 15 + Field_TYPE_SFIXED64_enum_value = 16 + Field_TYPE_SINT32_enum_value = 17 + Field_TYPE_SINT64_enum_value = 18 +) + // Full and short names for google.protobuf.Field.Cardinality. const ( Field_Cardinality_enum_fullname = "google.protobuf.Field.Cardinality" Field_Cardinality_enum_name = "Cardinality" ) +// Enum values for google.protobuf.Field.Cardinality. +const ( + Field_CARDINALITY_UNKNOWN_enum_value = 0 + Field_CARDINALITY_OPTIONAL_enum_value = 1 + Field_CARDINALITY_REQUIRED_enum_value = 2 + Field_CARDINALITY_REPEATED_enum_value = 3 +) + // Names for google.protobuf.Enum. const ( Enum_message_name protoreflect.Name = "Enum" diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go index e74cefdc5..2b8f122c2 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go @@ -21,26 +21,18 @@ type extensionFieldInfo struct { validation validationInfo } -var legacyExtensionFieldInfoCache sync.Map // map[protoreflect.ExtensionType]*extensionFieldInfo - func getExtensionFieldInfo(xt protoreflect.ExtensionType) *extensionFieldInfo { if xi, ok := xt.(*ExtensionInfo); ok { xi.lazyInit() return xi.info } - return legacyLoadExtensionFieldInfo(xt) -} - -// legacyLoadExtensionFieldInfo dynamically loads a *ExtensionInfo for xt. -func legacyLoadExtensionFieldInfo(xt protoreflect.ExtensionType) *extensionFieldInfo { - if xi, ok := legacyExtensionFieldInfoCache.Load(xt); ok { - return xi.(*extensionFieldInfo) - } - e := makeExtensionFieldInfo(xt.TypeDescriptor()) - if e, ok := legacyMessageTypeCache.LoadOrStore(xt, e); ok { - return e.(*extensionFieldInfo) - } - return e + // Ideally we'd cache the resulting *extensionFieldInfo so we don't have to + // recompute this metadata repeatedly. But without support for something like + // weak references, such a cache would pin temporary values (like dynamic + // extension types, constructed for the duration of a user request) to the + // heap forever, causing memory usage of the cache to grow unbounded. + // See discussion in https://github.com/golang/protobuf/issues/1521. + return makeExtensionFieldInfo(xt.TypeDescriptor()) } func makeExtensionFieldInfo(xd protoreflect.ExtensionDescriptor) *extensionFieldInfo { diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go b/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go index 576dcf3aa..13077751e 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_tables.go @@ -197,7 +197,7 @@ func fieldCoder(fd protoreflect.FieldDescriptor, ft reflect.Type) (*MessageInfo, return getMessageInfo(ft), makeMessageFieldCoder(fd, ft) case fd.Kind() == protoreflect.GroupKind: return getMessageInfo(ft), makeGroupFieldCoder(fd, ft) - case fd.Syntax() == protoreflect.Proto3 && fd.ContainingOneof() == nil: + case !fd.HasPresence() && fd.ContainingOneof() == nil: // Populated oneof fields always encode even if set to the zero value, // which normally are not encoded in proto3. switch fd.Kind() { diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go index 5e736c60e..986322b19 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_field.go @@ -538,6 +538,6 @@ func isZero(v reflect.Value) bool { } return true default: - panic(&reflect.ValueError{"reflect.Value.IsZero", v.Kind()}) + panic(&reflect.ValueError{Method: "reflect.Value.IsZero", Kind: v.Kind()}) } } diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings.go b/vendor/google.golang.org/protobuf/internal/strs/strings.go index 0b74e7658..a6e7df244 100644 --- a/vendor/google.golang.org/protobuf/internal/strs/strings.go +++ b/vendor/google.golang.org/protobuf/internal/strs/strings.go @@ -17,7 +17,7 @@ import ( // EnforceUTF8 reports whether to enforce strict UTF-8 validation. func EnforceUTF8(fd protoreflect.FieldDescriptor) bool { - if flags.ProtoLegacy { + if flags.ProtoLegacy || fd.Syntax() == protoreflect.Editions { if fd, ok := fd.(interface{ EnforceUTF8() bool }); ok { return fd.EnforceUTF8() } diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index d8f48faff..a50fcfb49 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -51,7 +51,7 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 32 + Minor = 33 Patch = 0 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go index aff6fd490..b3278163c 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_init.go @@ -28,6 +28,7 @@ func (r descsByName) initEnumDeclarations(eds []*descriptorpb.EnumDescriptorProt opts = proto.Clone(opts).(*descriptorpb.EnumOptions) e.L2.Options = func() protoreflect.ProtoMessage { return opts } } + e.L1.EditionFeatures = mergeEditionFeatures(parent, ed.GetOptions().GetFeatures()) for _, s := range ed.GetReservedName() { e.L2.ReservedNames.List = append(e.L2.ReservedNames.List, protoreflect.Name(s)) } @@ -68,6 +69,9 @@ func (r descsByName) initMessagesDeclarations(mds []*descriptorpb.DescriptorProt if m.L0, err = r.makeBase(m, parent, md.GetName(), i, sb); err != nil { return nil, err } + if m.Base.L0.ParentFile.Syntax() == protoreflect.Editions { + m.L1.EditionFeatures = mergeEditionFeatures(parent, md.GetOptions().GetFeatures()) + } if opts := md.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.MessageOptions) m.L2.Options = func() protoreflect.ProtoMessage { return opts } @@ -114,6 +118,27 @@ func (r descsByName) initMessagesDeclarations(mds []*descriptorpb.DescriptorProt return ms, nil } +// canBePacked returns whether the field can use packed encoding: +// https://protobuf.dev/programming-guides/encoding/#packed +func canBePacked(fd *descriptorpb.FieldDescriptorProto) bool { + if fd.GetLabel() != descriptorpb.FieldDescriptorProto_LABEL_REPEATED { + return false // not a repeated field + } + + switch protoreflect.Kind(fd.GetType()) { + case protoreflect.MessageKind, protoreflect.GroupKind: + return false // not a scalar type field + + case protoreflect.StringKind, protoreflect.BytesKind: + // string and bytes can explicitly not be declared as packed, + // see https://protobuf.dev/programming-guides/encoding/#packed + return false + + default: + return true + } +} + func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, sb *strs.Builder) (fs []filedesc.Field, err error) { fs = make([]filedesc.Field, len(fds)) // allocate up-front to ensure stable pointers for i, fd := range fds { @@ -139,12 +164,16 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc } if f.Base.L0.ParentFile.Syntax() == protoreflect.Editions { - f.L1.Presence = resolveFeatureHasFieldPresence(f.Base.L0.ParentFile, fd) + f.L1.EditionFeatures = mergeEditionFeatures(parent, fd.GetOptions().GetFeatures()) + + if f.L1.EditionFeatures.IsLegacyRequired { + f.L1.Cardinality = protoreflect.Required + } // We reuse the existing field because the old option `[packed = // true]` is mutually exclusive with the editions feature. - if fd.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED { + if canBePacked(fd) { f.L1.HasPacked = true - f.L1.IsPacked = resolveFeatureRepeatedFieldEncodingPacked(f.Base.L0.ParentFile, fd) + f.L1.IsPacked = f.L1.EditionFeatures.IsPacked } // We pretend this option is always explicitly set because the only @@ -155,9 +184,9 @@ func (r descsByName) initFieldsFromDescriptorProto(fds []*descriptorpb.FieldDesc // requested from the descriptor). // In proto2/proto3 syntax HasEnforceUTF8 might be false. f.L1.HasEnforceUTF8 = true - f.L1.EnforceUTF8 = resolveFeatureEnforceUTF8(f.Base.L0.ParentFile, fd) + f.L1.EnforceUTF8 = f.L1.EditionFeatures.IsUTF8Validated - if f.L1.Kind == protoreflect.MessageKind && resolveFeatureDelimitedEncoding(f.Base.L0.ParentFile, fd) { + if f.L1.Kind == protoreflect.MessageKind && f.L1.EditionFeatures.IsDelimitedEncoded { f.L1.Kind = protoreflect.GroupKind } } @@ -175,6 +204,9 @@ func (r descsByName) initOneofsFromDescriptorProto(ods []*descriptorpb.OneofDesc if opts := od.GetOptions(); opts != nil { opts = proto.Clone(opts).(*descriptorpb.OneofOptions) o.L1.Options = func() protoreflect.ProtoMessage { return opts } + if parent.Syntax() == protoreflect.Editions { + o.L1.EditionFeatures = mergeEditionFeatures(parent, opts.GetFeatures()) + } } } return os, nil diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go index 27d7e3501..254ca5854 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go @@ -276,8 +276,8 @@ func unmarshalDefault(s string, fd protoreflect.FieldDescriptor, allowUnresolvab } else if err != nil { return v, ev, err } - if fd.Syntax() == protoreflect.Proto3 { - return v, ev, errors.New("cannot be specified under proto3 semantics") + if !fd.HasPresence() { + return v, ev, errors.New("cannot be specified with implicit field presence") } if fd.Kind() == protoreflect.MessageKind || fd.Kind() == protoreflect.GroupKind || fd.Cardinality() == protoreflect.Repeated { return v, ev, errors.New("cannot be specified on composite types") diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go index 9af1d5648..e4dcaf876 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go @@ -107,7 +107,7 @@ func validateMessageDeclarations(ms []filedesc.Message, mds []*descriptorpb.Desc if isMessageSet && !flags.ProtoLegacy { return errors.New("message %q is a MessageSet, which is a legacy proto1 feature that is no longer supported", m.FullName()) } - if isMessageSet && (m.Syntax() != protoreflect.Proto2 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) { + if isMessageSet && (m.Syntax() == protoreflect.Proto3 || m.Fields().Len() > 0 || m.ExtensionRanges().Len() == 0) { return errors.New("message %q is an invalid proto1 MessageSet", m.FullName()) } if m.Syntax() == protoreflect.Proto3 { @@ -314,8 +314,8 @@ func checkValidGroup(fd protoreflect.FieldDescriptor) error { switch { case fd.Kind() != protoreflect.GroupKind: return nil - case fd.Syntax() != protoreflect.Proto2: - return errors.New("invalid under proto2 semantics") + case fd.Syntax() == protoreflect.Proto3: + return errors.New("invalid under proto3 semantics") case md == nil || md.IsPlaceholder(): return errors.New("message must be resolvable") case fd.FullName().Parent() != md.FullName().Parent(): diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go index 7352926ca..2a6b29d17 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/editions.go @@ -5,14 +5,16 @@ package protodesc import ( - _ "embed" "fmt" "os" "sync" + "google.golang.org/protobuf/internal/editiondefaults" "google.golang.org/protobuf/internal/filedesc" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/descriptorpb" + gofeaturespb "google.golang.org/protobuf/types/gofeaturespb" ) const ( @@ -20,14 +22,12 @@ const ( SupportedEditionsMaximum = descriptorpb.Edition_EDITION_2023 ) -//go:embed editions_defaults.binpb -var binaryEditionDefaults []byte var defaults = &descriptorpb.FeatureSetDefaults{} var defaultsCacheMu sync.Mutex var defaultsCache = make(map[filedesc.Edition]*descriptorpb.FeatureSet) func init() { - err := proto.Unmarshal(binaryEditionDefaults, defaults) + err := proto.Unmarshal(editiondefaults.Defaults, defaults) if err != nil { fmt.Fprintf(os.Stderr, "unmarshal editions defaults: %v\n", err) os.Exit(1) @@ -83,95 +83,66 @@ func getFeatureSetFor(ed filedesc.Edition) *descriptorpb.FeatureSet { return fs } -func resolveFeatureHasFieldPresence(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { - fs := fieldDesc.GetOptions().GetFeatures() - if fs == nil || fs.FieldPresence == nil { - return fileDesc.L1.EditionFeatures.IsFieldPresence +// mergeEditionFeatures merges the parent and child feature sets. This function +// should be used when initializing Go descriptors from descriptor protos which +// is why the parent is a filedesc.EditionsFeatures (Go representation) while +// the child is a descriptorproto.FeatureSet (protoc representation). +// Any feature set by the child overwrites what is set by the parent. +func mergeEditionFeatures(parentDesc protoreflect.Descriptor, child *descriptorpb.FeatureSet) filedesc.EditionFeatures { + var parentFS filedesc.EditionFeatures + switch p := parentDesc.(type) { + case *filedesc.File: + parentFS = p.L1.EditionFeatures + case *filedesc.Message: + parentFS = p.L1.EditionFeatures + default: + panic(fmt.Sprintf("unknown parent type %T", parentDesc)) } - return fs.GetFieldPresence() == descriptorpb.FeatureSet_LEGACY_REQUIRED || - fs.GetFieldPresence() == descriptorpb.FeatureSet_EXPLICIT -} - -func resolveFeatureRepeatedFieldEncodingPacked(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { - fs := fieldDesc.GetOptions().GetFeatures() - if fs == nil || fs.RepeatedFieldEncoding == nil { - return fileDesc.L1.EditionFeatures.IsPacked + if child == nil { + return parentFS } - return fs.GetRepeatedFieldEncoding() == descriptorpb.FeatureSet_PACKED -} - -func resolveFeatureEnforceUTF8(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { - fs := fieldDesc.GetOptions().GetFeatures() - if fs == nil || fs.Utf8Validation == nil { - return fileDesc.L1.EditionFeatures.IsUTF8Validated + if fp := child.FieldPresence; fp != nil { + parentFS.IsFieldPresence = *fp == descriptorpb.FeatureSet_LEGACY_REQUIRED || + *fp == descriptorpb.FeatureSet_EXPLICIT + parentFS.IsLegacyRequired = *fp == descriptorpb.FeatureSet_LEGACY_REQUIRED } - return fs.GetUtf8Validation() == descriptorpb.FeatureSet_VERIFY -} - -func resolveFeatureDelimitedEncoding(fileDesc *filedesc.File, fieldDesc *descriptorpb.FieldDescriptorProto) bool { - fs := fieldDesc.GetOptions().GetFeatures() - if fs == nil || fs.MessageEncoding == nil { - return fileDesc.L1.EditionFeatures.IsDelimitedEncoded + if et := child.EnumType; et != nil { + parentFS.IsOpenEnum = *et == descriptorpb.FeatureSet_OPEN } - return fs.GetMessageEncoding() == descriptorpb.FeatureSet_DELIMITED -} -// initFileDescFromFeatureSet initializes editions related fields in fd based -// on fs. If fs is nil it is assumed to be an empty featureset and all fields -// will be initialized with the appropriate default. fd.L1.Edition must be set -// before calling this function. -func initFileDescFromFeatureSet(fd *filedesc.File, fs *descriptorpb.FeatureSet) { - dfs := getFeatureSetFor(fd.L1.Edition) - if fs == nil { - fs = &descriptorpb.FeatureSet{} + if rfe := child.RepeatedFieldEncoding; rfe != nil { + parentFS.IsPacked = *rfe == descriptorpb.FeatureSet_PACKED } - var fieldPresence descriptorpb.FeatureSet_FieldPresence - if fp := fs.FieldPresence; fp != nil { - fieldPresence = *fp - } else { - fieldPresence = *dfs.FieldPresence - } - fd.L1.EditionFeatures.IsFieldPresence = fieldPresence == descriptorpb.FeatureSet_LEGACY_REQUIRED || - fieldPresence == descriptorpb.FeatureSet_EXPLICIT - - var enumType descriptorpb.FeatureSet_EnumType - if et := fs.EnumType; et != nil { - enumType = *et - } else { - enumType = *dfs.EnumType + if utf8val := child.Utf8Validation; utf8val != nil { + parentFS.IsUTF8Validated = *utf8val == descriptorpb.FeatureSet_VERIFY } - fd.L1.EditionFeatures.IsOpenEnum = enumType == descriptorpb.FeatureSet_OPEN - var respeatedFieldEncoding descriptorpb.FeatureSet_RepeatedFieldEncoding - if rfe := fs.RepeatedFieldEncoding; rfe != nil { - respeatedFieldEncoding = *rfe - } else { - respeatedFieldEncoding = *dfs.RepeatedFieldEncoding + if me := child.MessageEncoding; me != nil { + parentFS.IsDelimitedEncoded = *me == descriptorpb.FeatureSet_DELIMITED } - fd.L1.EditionFeatures.IsPacked = respeatedFieldEncoding == descriptorpb.FeatureSet_PACKED - var isUTF8Validated descriptorpb.FeatureSet_Utf8Validation - if utf8val := fs.Utf8Validation; utf8val != nil { - isUTF8Validated = *utf8val - } else { - isUTF8Validated = *dfs.Utf8Validation + if jf := child.JsonFormat; jf != nil { + parentFS.IsJSONCompliant = *jf == descriptorpb.FeatureSet_ALLOW } - fd.L1.EditionFeatures.IsUTF8Validated = isUTF8Validated == descriptorpb.FeatureSet_VERIFY - var messageEncoding descriptorpb.FeatureSet_MessageEncoding - if me := fs.MessageEncoding; me != nil { - messageEncoding = *me - } else { - messageEncoding = *dfs.MessageEncoding + if goFeatures, ok := proto.GetExtension(child, gofeaturespb.E_Go).(*gofeaturespb.GoFeatures); ok && goFeatures != nil { + if luje := goFeatures.LegacyUnmarshalJsonEnum; luje != nil { + parentFS.GenerateLegacyUnmarshalJSON = *luje + } } - fd.L1.EditionFeatures.IsDelimitedEncoded = messageEncoding == descriptorpb.FeatureSet_DELIMITED - var jsonFormat descriptorpb.FeatureSet_JsonFormat - if jf := fs.JsonFormat; jf != nil { - jsonFormat = *jf - } else { - jsonFormat = *dfs.JsonFormat - } - fd.L1.EditionFeatures.IsJSONCompliant = jsonFormat == descriptorpb.FeatureSet_ALLOW + return parentFS +} + +// initFileDescFromFeatureSet initializes editions related fields in fd based +// on fs. If fs is nil it is assumed to be an empty featureset and all fields +// will be initialized with the appropriate default. fd.L1.Edition must be set +// before calling this function. +func initFileDescFromFeatureSet(fd *filedesc.File, fs *descriptorpb.FeatureSet) { + dfs := getFeatureSetFor(fd.L1.Edition) + // initialize the featureset with the defaults + fd.L1.EditionFeatures = mergeEditionFeatures(fd, dfs) + // overwrite any options explicitly specified + fd.L1.EditionFeatures = mergeEditionFeatures(fd, fs) } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go index ec6572dfd..00b01fbd8 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/proto.go @@ -175,6 +175,8 @@ func (s Syntax) String() string { return "proto2" case Proto3: return "proto3" + case Editions: + return "editions" default: return fmt.Sprintf("", s) } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go index 0c045db6a..7dcc2ff09 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go @@ -160,8 +160,6 @@ func (p *SourcePath) appendFileOptions(b []byte) []byte { b = p.appendSingularField(b, "java_generic_services", nil) case 18: b = p.appendSingularField(b, "py_generic_services", nil) - case 42: - b = p.appendSingularField(b, "php_generic_services", nil) case 23: b = p.appendSingularField(b, "deprecated", nil) case 31: diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index 38daa858d..78624cf60 100644 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -64,6 +64,7 @@ const ( // should not be depended on, but they will always be time-ordered for easy // comparison. Edition_EDITION_2023 Edition = 1000 + Edition_EDITION_2024 Edition = 1001 // Placeholder editions for testing feature resolution. These should not be // used or relyed on outside of tests. Edition_EDITION_1_TEST_ONLY Edition = 1 @@ -71,31 +72,39 @@ const ( Edition_EDITION_99997_TEST_ONLY Edition = 99997 Edition_EDITION_99998_TEST_ONLY Edition = 99998 Edition_EDITION_99999_TEST_ONLY Edition = 99999 + // Placeholder for specifying unbounded edition support. This should only + // ever be used by plugins that can expect to never require any changes to + // support a new edition. + Edition_EDITION_MAX Edition = 2147483647 ) // Enum value maps for Edition. var ( Edition_name = map[int32]string{ - 0: "EDITION_UNKNOWN", - 998: "EDITION_PROTO2", - 999: "EDITION_PROTO3", - 1000: "EDITION_2023", - 1: "EDITION_1_TEST_ONLY", - 2: "EDITION_2_TEST_ONLY", - 99997: "EDITION_99997_TEST_ONLY", - 99998: "EDITION_99998_TEST_ONLY", - 99999: "EDITION_99999_TEST_ONLY", + 0: "EDITION_UNKNOWN", + 998: "EDITION_PROTO2", + 999: "EDITION_PROTO3", + 1000: "EDITION_2023", + 1001: "EDITION_2024", + 1: "EDITION_1_TEST_ONLY", + 2: "EDITION_2_TEST_ONLY", + 99997: "EDITION_99997_TEST_ONLY", + 99998: "EDITION_99998_TEST_ONLY", + 99999: "EDITION_99999_TEST_ONLY", + 2147483647: "EDITION_MAX", } Edition_value = map[string]int32{ "EDITION_UNKNOWN": 0, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, + "EDITION_2024": 1001, "EDITION_1_TEST_ONLY": 1, "EDITION_2_TEST_ONLY": 2, "EDITION_99997_TEST_ONLY": 99997, "EDITION_99998_TEST_ONLY": 99998, "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647, } ) @@ -954,21 +963,21 @@ type FeatureSet_Utf8Validation int32 const ( FeatureSet_UTF8_VALIDATION_UNKNOWN FeatureSet_Utf8Validation = 0 - FeatureSet_NONE FeatureSet_Utf8Validation = 1 FeatureSet_VERIFY FeatureSet_Utf8Validation = 2 + FeatureSet_NONE FeatureSet_Utf8Validation = 3 ) // Enum value maps for FeatureSet_Utf8Validation. var ( FeatureSet_Utf8Validation_name = map[int32]string{ 0: "UTF8_VALIDATION_UNKNOWN", - 1: "NONE", 2: "VERIFY", + 3: "NONE", } FeatureSet_Utf8Validation_value = map[string]int32{ "UTF8_VALIDATION_UNKNOWN": 0, - "NONE": 1, "VERIFY": 2, + "NONE": 3, } ) @@ -1643,12 +1652,12 @@ type FieldDescriptorProto struct { // If true, this is a proto3 "optional". When a proto3 field is optional, it // tracks presence regardless of field type. // - // When proto3_optional is true, this field must be belong to a oneof to - // signal to old proto3 clients that presence is tracked for this field. This - // oneof is known as a "synthetic" oneof, and this field must be its sole - // member (each proto3 optional field gets its own synthetic oneof). Synthetic - // oneofs exist in the descriptor only, and do not generate any API. Synthetic - // oneofs must be ordered after all "real" oneofs. + // When proto3_optional is true, this field must belong to a oneof to signal + // to old proto3 clients that presence is tracked for this field. This oneof + // is known as a "synthetic" oneof, and this field must be its sole member + // (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs + // exist in the descriptor only, and do not generate any API. Synthetic oneofs + // must be ordered after all "real" oneofs. // // For message fields, proto3_optional doesn't create any semantic change, // since non-repeated message fields always track presence. However it still @@ -2195,7 +2204,6 @@ type FileOptions struct { CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` - PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"` // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations // for everything in the file, or it will be completely ignored; in the very @@ -2244,7 +2252,6 @@ const ( Default_FileOptions_CcGenericServices = bool(false) Default_FileOptions_JavaGenericServices = bool(false) Default_FileOptions_PyGenericServices = bool(false) - Default_FileOptions_PhpGenericServices = bool(false) Default_FileOptions_Deprecated = bool(false) Default_FileOptions_CcEnableArenas = bool(true) ) @@ -2352,13 +2359,6 @@ func (x *FileOptions) GetPyGenericServices() bool { return Default_FileOptions_PyGenericServices } -func (x *FileOptions) GetPhpGenericServices() bool { - if x != nil && x.PhpGenericServices != nil { - return *x.PhpGenericServices - } - return Default_FileOptions_PhpGenericServices -} - func (x *FileOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated @@ -2472,10 +2472,6 @@ type MessageOptions struct { // for the message, or it will be completely ignored; in the very least, // this is a formalization for deprecating messages. Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` - // NOTE: Do not set the option in .proto files. Always use the maps syntax - // instead. The option should only be implicitly set by the proto compiler - // parser. - // // Whether the message is an automatically generated map entry type for the // maps field. // @@ -2496,6 +2492,10 @@ type MessageOptions struct { // use a native map in the target language to hold the keys and values. // The reflection APIs in such implementations still need to work as // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` // Enable the legacy handling of JSON field name conflicts. This lowercases // and strips underscored from the fields before comparison in proto3 only. @@ -2655,19 +2655,11 @@ type FieldOptions struct { // call from multiple threads concurrently, while non-const methods continue // to require exclusive access. // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outer message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - // - // As of May 2022, lazy verifies the contents of the byte stream during - // parsing. An invalid byte stream will cause the overall parsing to fail. + // Note that lazy message fields are still eagerly verified to check + // ill-formed wireformat or missing required fields. Calling IsInitialized() + // on the outer message would fail if the inner message has missing required + // fields. Failed verification would result in parsing failure (except when + // uninitialized messages are acceptable). Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` // unverified_lazy does no correctness checks on the byte stream. This should // only be used where lazy with verification is prohibitive for performance @@ -4104,7 +4096,7 @@ type SourceCodeInfo_Location struct { // location. // // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition occurs. + // the root FileDescriptorProto to the place where the definition appears. // For example, this path: // // [ 4, 3, 2, 7, 1 ] @@ -4451,7 +4443,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x1a, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xc7, 0x04, 0x0a, 0x15, 0x45, 0x78, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, @@ -4468,337 +4460,355 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x12, 0x68, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x73, 0x12, 0x6d, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x3a, 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x52, 0x0c, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x94, 0x01, 0x0a, 0x0b, - 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x04, - 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, 0x43, 0x4c, 0x41, - 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x4e, 0x56, 0x45, - 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3e, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, - 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, - 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, - 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, - 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, - 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41, - 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36, - 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, - 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, - 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, - 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, - 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, 0x12, 0x11, 0x0a, - 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x10, - 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, - 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, - 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x0e, 0x4c, - 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, - 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, - 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, - 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, 0x65, 0x6f, 0x66, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe3, 0x02, 0x0a, - 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x65, 0x3a, 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x42, 0x03, 0x88, + 0x01, 0x02, 0x52, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0x94, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, + 0x44, 0x45, 0x43, 0x4c, 0x41, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, + 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, + 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, + 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x1b, 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, + 0x02, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, + 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, + 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, + 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, + 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, + 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, + 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, + 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, + 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, + 0x44, 0x36, 0x34, 0x10, 0x10, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, + 0x4e, 0x54, 0x33, 0x32, 0x10, 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, + 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, + 0x41, 0x4c, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, + 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, + 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, + 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, - 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, - 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, + 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0xe3, 0x02, 0x0a, 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, - 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x10, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x10, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0xca, - 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, - 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, - 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, 0x76, 0x61, 0x4d, 0x75, 0x6c, - 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x1d, 0x6a, 0x61, - 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x71, 0x75, 0x61, - 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, - 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, 0x38, 0x12, 0x53, 0x0a, 0x0c, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x05, 0x53, - 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, - 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, 0x6a, 0x61, 0x76, 0x61, 0x5f, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, - 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, - 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x14, 0x70, 0x68, 0x70, - 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x12, - 0x70, 0x68, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, - 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, - 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, - 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, - 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, - 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, - 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, - 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, - 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, - 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, - 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, - 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, - 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xf4, 0x03, 0x0a, 0x0e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, - 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, - 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, - 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, - 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, - 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, - 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, - 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, - 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, - 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, - 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, + 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, + 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, - 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, - 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, - 0x10, 0x0a, 0x22, 0xad, 0x0a, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, - 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, - 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, + 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, + 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, + 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x30, 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, + 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x22, 0x97, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, + 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, + 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, + 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, + 0x76, 0x61, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, + 0x44, 0x0a, 0x1d, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, + 0x64, 0x48, 0x61, 0x73, 0x68, 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, + 0x1b, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, + 0x76, 0x61, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, + 0x38, 0x12, 0x53, 0x0a, 0x0c, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, + 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, + 0x64, 0x65, 0x3a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, + 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, + 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, + 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x17, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, + 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, + 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x73, 0x68, + 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x27, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, + 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x68, 0x70, 0x43, 0x6c, + 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x68, 0x70, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, + 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, + 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x75, 0x62, 0x79, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, + 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, + 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x50, + 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, + 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, + 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, + 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xf4, 0x03, + 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, + 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, + 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, + 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, + 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, + 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, + 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, + 0x08, 0x09, 0x10, 0x0a, 0x22, 0xad, 0x0a, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, + 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, + 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, + 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, + 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, + 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, + 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, + 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, + 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, + 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, + 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, + 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, - 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, - 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, - 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, - 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, - 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, - 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, - 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, - 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, - 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, - 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2f, 0x0a, - 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, - 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, - 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, - 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, - 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, - 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, - 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, - 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, - 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, - 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, - 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, - 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, - 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, - 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, - 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, - 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, - 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, - 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, - 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, - 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, + 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, + 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, + 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, + 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, + 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, + 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, + 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, + 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, + 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, + 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, + 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, + 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, + 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, + 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, + 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, + 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, + 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, + 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, + 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, + 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, + 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, + 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, + 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, + 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, + 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, + 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, + 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, + 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, + 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, + 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, + 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, + 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, @@ -4807,276 +4817,258 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, - 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, - 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, - 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, - 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, - 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, - 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, - 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, - 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, - 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, - 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, - 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, - 0x64, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, - 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, - 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, - 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, - 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, - 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, - 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, - 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, - 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, + 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, - 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, - 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, - 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, - 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, - 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, - 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, - 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, - 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, - 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, - 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, - 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfc, 0x09, 0x0a, 0x0a, 0x46, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x8b, 0x01, 0x0a, 0x0e, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x39, 0x88, - 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, - 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, - 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, - 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, - 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0b, 0x12, 0x06, - 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4f, 0x50, - 0x45, 0x4e, 0x18, 0xe7, 0x07, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x92, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x42, 0x27, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, - 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, - 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0x52, 0x15, 0x72, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x12, 0x78, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, - 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, 0x07, - 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0x52, 0x0e, - 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x78, - 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, - 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x20, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, - 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, - 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7c, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, - 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, + 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, + 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, + 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x33, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, - 0x98, 0x01, 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, - 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, - 0x12, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, - 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, 0x4c, 0x44, - 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, - 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x02, 0x12, - 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, - 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22, 0x56, 0x0a, - 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, - 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, - 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, - 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, - 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x43, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46, 0x38, 0x5f, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0a, - 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x02, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, - 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, - 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, - 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, - 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, - 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, - 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, - 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0xe9, - 0x07, 0x2a, 0x06, 0x08, 0xe9, 0x07, 0x10, 0xea, 0x07, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, - 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, 0x07, 0x22, 0xfe, 0x02, 0x0a, 0x12, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, - 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, - 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, - 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, - 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x1a, 0x87, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, - 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, + 0x80, 0x80, 0x02, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, + 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, + 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, + 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, + 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, + 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, + 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, + 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, + 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, + 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, + 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, + 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, + 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, + 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, + 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x8c, 0x0a, 0x0a, + 0x0a, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x8b, 0x01, 0x0a, 0x0e, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, + 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, + 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, + 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, + 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, + 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x65, 0x6e, 0x75, + 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, + 0x70, 0x65, 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0b, + 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x09, 0x12, 0x04, + 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x92, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, - 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, - 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, - 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, - 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, - 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, - 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, - 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, - 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, - 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, - 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, - 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, - 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, - 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, - 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, - 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0xea, 0x01, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, - 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, - 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, - 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x17, - 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, 0x45, 0x53, 0x54, - 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, - 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, - 0x10, 0x9f, 0x8d, 0x06, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, - 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, - 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, - 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x27, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, + 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, + 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0x52, + 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x78, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, + 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x23, 0x88, 0x01, 0x01, + 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, + 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, + 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x78, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x20, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, + 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, + 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7c, 0x0a, 0x0b, 0x6a, 0x73, + 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, + 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x33, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, + 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, + 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, + 0x01, 0x0a, 0x12, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0x52, 0x0a, 0x6a, 0x73, + 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, + 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, + 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, + 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, + 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, + 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22, + 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45, + 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, + 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x43, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46, + 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, + 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x0f, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, + 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, + 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, + 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, + 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, + 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, + 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, + 0x10, 0xe9, 0x07, 0x2a, 0x06, 0x08, 0xe9, 0x07, 0x10, 0xea, 0x07, 0x2a, 0x06, 0x08, 0xea, 0x07, + 0x10, 0xeb, 0x07, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, + 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, 0x07, 0x22, 0xfe, 0x02, 0x0a, 0x12, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, + 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, + 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x1a, 0x87, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, + 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, + 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, + 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, + 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, + 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, + 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, + 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, + 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, + 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, + 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, + 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, + 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, + 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, + 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0x92, 0x02, 0x0a, 0x07, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, + 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, + 0x33, 0x10, 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x32, 0x30, 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, + 0x59, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, + 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, + 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, + 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, + 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, + 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, + 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, + 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, + 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, } var ( diff --git a/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go b/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go index 54ae1ab87..39b024b46 100644 --- a/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go +++ b/vendor/google.golang.org/protobuf/types/dynamicpb/dynamic.go @@ -499,7 +499,7 @@ func isSet(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { return v.List().Len() > 0 case fd.ContainingOneof() != nil: return true - case fd.Syntax() == protoreflect.Proto3 && !fd.IsExtension(): + case !fd.HasPresence() && !fd.IsExtension(): switch fd.Kind() { case protoreflect.BoolKind: return v.Bool() diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go new file mode 100644 index 000000000..25de5ae00 --- /dev/null +++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go @@ -0,0 +1,177 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2023 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd + +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: reflect/protodesc/proto/go_features.proto + +package proto + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +type GoFeatures struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Whether or not to generate the deprecated UnmarshalJSON method for enums. + LegacyUnmarshalJsonEnum *bool `protobuf:"varint,1,opt,name=legacy_unmarshal_json_enum,json=legacyUnmarshalJsonEnum" json:"legacy_unmarshal_json_enum,omitempty"` +} + +func (x *GoFeatures) Reset() { + *x = GoFeatures{} + if protoimpl.UnsafeEnabled { + mi := &file_reflect_protodesc_proto_go_features_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GoFeatures) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GoFeatures) ProtoMessage() {} + +func (x *GoFeatures) ProtoReflect() protoreflect.Message { + mi := &file_reflect_protodesc_proto_go_features_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GoFeatures.ProtoReflect.Descriptor instead. +func (*GoFeatures) Descriptor() ([]byte, []int) { + return file_reflect_protodesc_proto_go_features_proto_rawDescGZIP(), []int{0} +} + +func (x *GoFeatures) GetLegacyUnmarshalJsonEnum() bool { + if x != nil && x.LegacyUnmarshalJsonEnum != nil { + return *x.LegacyUnmarshalJsonEnum + } + return false +} + +var file_reflect_protodesc_proto_go_features_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FeatureSet)(nil), + ExtensionType: (*GoFeatures)(nil), + Field: 1002, + Name: "google.protobuf.go", + Tag: "bytes,1002,opt,name=go", + Filename: "reflect/protodesc/proto/go_features.proto", + }, +} + +// Extension fields to descriptorpb.FeatureSet. +var ( + // optional google.protobuf.GoFeatures go = 1002; + E_Go = &file_reflect_protodesc_proto_go_features_proto_extTypes[0] +) + +var File_reflect_protodesc_proto_go_features_proto protoreflect.FileDescriptor + +var file_reflect_protodesc_proto_go_features_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x64, + 0x65, 0x73, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x20, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, + 0x0a, 0x0a, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x1a, + 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, + 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x1f, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, 0x75, + 0x65, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0xe7, + 0x07, 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, + 0x61, 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x49, 0x0a, 0x02, 0x67, 0x6f, + 0x12, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x64, 0x65, 0x73, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, +} + +var ( + file_reflect_protodesc_proto_go_features_proto_rawDescOnce sync.Once + file_reflect_protodesc_proto_go_features_proto_rawDescData = file_reflect_protodesc_proto_go_features_proto_rawDesc +) + +func file_reflect_protodesc_proto_go_features_proto_rawDescGZIP() []byte { + file_reflect_protodesc_proto_go_features_proto_rawDescOnce.Do(func() { + file_reflect_protodesc_proto_go_features_proto_rawDescData = protoimpl.X.CompressGZIP(file_reflect_protodesc_proto_go_features_proto_rawDescData) + }) + return file_reflect_protodesc_proto_go_features_proto_rawDescData +} + +var file_reflect_protodesc_proto_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_reflect_protodesc_proto_go_features_proto_goTypes = []interface{}{ + (*GoFeatures)(nil), // 0: google.protobuf.GoFeatures + (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet +} +var file_reflect_protodesc_proto_go_features_proto_depIdxs = []int32{ + 1, // 0: google.protobuf.go:extendee -> google.protobuf.FeatureSet + 0, // 1: google.protobuf.go:type_name -> google.protobuf.GoFeatures + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 1, // [1:2] is the sub-list for extension type_name + 0, // [0:1] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_reflect_protodesc_proto_go_features_proto_init() } +func file_reflect_protodesc_proto_go_features_proto_init() { + if File_reflect_protodesc_proto_go_features_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_reflect_protodesc_proto_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GoFeatures); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_reflect_protodesc_proto_go_features_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 1, + NumServices: 0, + }, + GoTypes: file_reflect_protodesc_proto_go_features_proto_goTypes, + DependencyIndexes: file_reflect_protodesc_proto_go_features_proto_depIdxs, + MessageInfos: file_reflect_protodesc_proto_go_features_proto_msgTypes, + ExtensionInfos: file_reflect_protodesc_proto_go_features_proto_extTypes, + }.Build() + File_reflect_protodesc_proto_go_features_proto = out.File + file_reflect_protodesc_proto_go_features_proto_rawDesc = nil + file_reflect_protodesc_proto_go_features_proto_goTypes = nil + file_reflect_protodesc_proto_go_features_proto_depIdxs = nil +} diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto new file mode 100644 index 000000000..d24657129 --- /dev/null +++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.proto @@ -0,0 +1,28 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2023 Google Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd + +syntax = "proto2"; + +package google.protobuf; + +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/protobuf/types/gofeaturespb"; + +extend google.protobuf.FeatureSet { + optional GoFeatures go = 1002; +} + +message GoFeatures { + // Whether or not to generate the deprecated UnmarshalJSON method for enums. + optional bool legacy_unmarshal_json_enum = 1 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_ENUM, + edition_defaults = { edition: EDITION_PROTO2, value: "true" }, + edition_defaults = { edition: EDITION_PROTO3, value: "false" } + ]; +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 1c66190a2..1e5b63c29 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -89,8 +89,8 @@ github.com/gogo/protobuf/sortkeys # github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da ## explicit github.com/golang/groupcache/lru -# github.com/golang/protobuf v1.5.3 -## explicit; go 1.9 +# github.com/golang/protobuf v1.5.4 +## explicit; go 1.17 github.com/golang/protobuf/descriptor github.com/golang/protobuf/jsonpb github.com/golang/protobuf/proto @@ -139,7 +139,7 @@ github.com/google/go-cmp/cmp/internal/value ## explicit; go 1.12 github.com/google/gofuzz github.com/google/gofuzz/bytesource -# github.com/google/uuid v1.4.0 +# github.com/google/uuid v1.6.0 ## explicit github.com/google/uuid # github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 @@ -337,37 +337,37 @@ github.com/stoewer/go-strcase # github.com/subosito/gotenv v1.2.0 ## explicit github.com/subosito/gotenv -# go.etcd.io/etcd/api/v3 v3.5.9 -## explicit; go 1.19 +# go.etcd.io/etcd/api/v3 v3.5.7 +## explicit; go 1.17 go.etcd.io/etcd/api/v3/authpb go.etcd.io/etcd/api/v3/etcdserverpb go.etcd.io/etcd/api/v3/membershippb go.etcd.io/etcd/api/v3/mvccpb go.etcd.io/etcd/api/v3/v3rpc/rpctypes go.etcd.io/etcd/api/v3/version -# go.etcd.io/etcd/client/pkg/v3 v3.5.9 -## explicit; go 1.19 +# go.etcd.io/etcd/client/pkg/v3 v3.5.7 +## explicit; go 1.17 go.etcd.io/etcd/client/pkg/v3/fileutil go.etcd.io/etcd/client/pkg/v3/logutil go.etcd.io/etcd/client/pkg/v3/systemd go.etcd.io/etcd/client/pkg/v3/tlsutil go.etcd.io/etcd/client/pkg/v3/transport go.etcd.io/etcd/client/pkg/v3/types -# go.etcd.io/etcd/client/v3 v3.5.9 -## explicit; go 1.19 +# go.etcd.io/etcd/client/v3 v3.5.7 +## explicit; go 1.17 go.etcd.io/etcd/client/v3 go.etcd.io/etcd/client/v3/credentials go.etcd.io/etcd/client/v3/internal/endpoint go.etcd.io/etcd/client/v3/internal/resolver -# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.48.0 +# go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 ## explicit; go 1.20 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/internal -# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.48.0 +# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 ## explicit; go 1.20 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil -# go.opentelemetry.io/otel v1.23.0 +# go.opentelemetry.io/otel v1.24.0 ## explicit; go 1.20 go.opentelemetry.io/otel go.opentelemetry.io/otel/attribute @@ -383,23 +383,22 @@ go.opentelemetry.io/otel/semconv/v1.12.0 go.opentelemetry.io/otel/semconv/v1.17.0 go.opentelemetry.io/otel/semconv/v1.20.0 go.opentelemetry.io/otel/semconv/v1.24.0 -# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.23.0 +# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 ## explicit; go 1.20 go.opentelemetry.io/otel/exporters/otlp/otlptrace go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform -# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.23.0 +# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.24.0 ## explicit; go 1.20 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry -# go.opentelemetry.io/otel/metric v1.23.0 +# go.opentelemetry.io/otel/metric v1.24.0 ## explicit; go 1.20 go.opentelemetry.io/otel/metric go.opentelemetry.io/otel/metric/embedded -go.opentelemetry.io/otel/metric/noop -# go.opentelemetry.io/otel/sdk v1.23.0 +# go.opentelemetry.io/otel/sdk v1.24.0 ## explicit; go 1.20 go.opentelemetry.io/otel/sdk go.opentelemetry.io/otel/sdk/instrumentation @@ -407,7 +406,7 @@ go.opentelemetry.io/otel/sdk/internal go.opentelemetry.io/otel/sdk/internal/env go.opentelemetry.io/otel/sdk/resource go.opentelemetry.io/otel/sdk/trace -# go.opentelemetry.io/otel/trace v1.23.0 +# go.opentelemetry.io/otel/trace v1.24.0 ## explicit; go 1.20 go.opentelemetry.io/otel/trace go.opentelemetry.io/otel/trace/embedded @@ -421,8 +420,8 @@ go.opentelemetry.io/proto/otlp/trace/v1 # go.uber.org/atomic v1.7.0 ## explicit; go 1.13 go.uber.org/atomic -# go.uber.org/multierr v1.11.0 -## explicit; go 1.19 +# go.uber.org/multierr v1.6.0 +## explicit; go 1.12 go.uber.org/multierr # go.uber.org/zap v1.24.0 ## explicit; go 1.19 @@ -436,7 +435,7 @@ go.uber.org/zap/internal/ztest go.uber.org/zap/zapcore go.uber.org/zap/zapgrpc go.uber.org/zap/zaptest -# golang.org/x/crypto v0.18.0 +# golang.org/x/crypto v0.21.0 ## explicit; go 1.18 golang.org/x/crypto/cryptobyte golang.org/x/crypto/cryptobyte/asn1 @@ -447,7 +446,7 @@ golang.org/x/crypto/salsa20/salsa # golang.org/x/mod v0.14.0 ## explicit; go 1.18 golang.org/x/mod/semver -# golang.org/x/net v0.20.0 +# golang.org/x/net v0.21.0 ## explicit; go 1.18 golang.org/x/net/bpf golang.org/x/net/context @@ -467,22 +466,22 @@ golang.org/x/net/ipv6 golang.org/x/net/proxy golang.org/x/net/trace golang.org/x/net/websocket -# golang.org/x/oauth2 v0.15.0 +# golang.org/x/oauth2 v0.16.0 ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/internal -# golang.org/x/sync v0.5.0 +# golang.org/x/sync v0.6.0 ## explicit; go 1.18 golang.org/x/sync/semaphore golang.org/x/sync/singleflight -# golang.org/x/sys v0.16.0 +# golang.org/x/sys v0.18.0 ## explicit; go 1.18 golang.org/x/sys/cpu golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/term v0.16.0 +# golang.org/x/term v0.18.0 ## explicit; go 1.18 golang.org/x/term # golang.org/x/text v0.14.0 @@ -539,20 +538,20 @@ google.golang.org/appengine/internal/log google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 +# google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 ## explicit; go 1.19 google.golang.org/genproto/internal -# google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 +# google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 ## explicit; go 1.19 google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations google.golang.org/genproto/googleapis/api/expr/v1alpha1 google.golang.org/genproto/googleapis/api/httpbody -# google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 ## explicit; go 1.19 google.golang.org/genproto/googleapis/rpc/errdetails google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.61.0 => google.golang.org/grpc v1.61.0 +# google.golang.org/grpc v1.62.1 => google.golang.org/grpc v1.61.0 ## explicit; go 1.19 google.golang.org/grpc google.golang.org/grpc/attributes @@ -608,7 +607,7 @@ google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status google.golang.org/grpc/tap -# google.golang.org/protobuf v1.32.0 +# google.golang.org/protobuf v1.33.0 ## explicit; go 1.17 google.golang.org/protobuf/encoding/protojson google.golang.org/protobuf/encoding/prototext @@ -616,6 +615,7 @@ google.golang.org/protobuf/encoding/protowire google.golang.org/protobuf/internal/descfmt google.golang.org/protobuf/internal/descopts google.golang.org/protobuf/internal/detrand +google.golang.org/protobuf/internal/editiondefaults google.golang.org/protobuf/internal/encoding/defval google.golang.org/protobuf/internal/encoding/json google.golang.org/protobuf/internal/encoding/messageset @@ -640,6 +640,7 @@ google.golang.org/protobuf/runtime/protoiface google.golang.org/protobuf/runtime/protoimpl google.golang.org/protobuf/types/descriptorpb google.golang.org/protobuf/types/dynamicpb +google.golang.org/protobuf/types/gofeaturespb google.golang.org/protobuf/types/known/anypb google.golang.org/protobuf/types/known/durationpb google.golang.org/protobuf/types/known/emptypb From f8e9327c4995ae16f53868eb24f338051f818db7 Mon Sep 17 00:00:00 2001 From: l-technicore Date: Fri, 22 Mar 2024 11:55:27 +0530 Subject: [PATCH 08/22] Separating UpdateLoadBalancer flow for Backends from Ensure Load Balancer flow in CCM Moved listener and backendset updates before shape change & other customer error prone operations --- .../providers/oci/load_balancer.go | 358 ++++++++++++++---- 1 file changed, 277 insertions(+), 81 deletions(-) diff --git a/pkg/cloudprovider/providers/oci/load_balancer.go b/pkg/cloudprovider/providers/oci/load_balancer.go index 1948c40a3..16d59625e 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer.go +++ b/pkg/cloudprovider/providers/oci/load_balancer.go @@ -477,7 +477,7 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str loadBalancerType := getLoadBalancerType(service) logger := cp.logger.With("loadBalancerName", lbName, "serviceName", service.Name, "loadBalancerType", loadBalancerType, "serviceUid", service.UID) if sa, useWI := service.Annotations[ServiceAnnotationServiceAccountName]; useWI { // When using Workload Identity - logger = logger.With("serviceAccount", sa, "nameSpace", service.Namespace) + logger = logger.With("serviceAccount", sa, "namespace", service.Namespace) } if deleted, err := cp.serviceDeletedOrDoesNotExist(ctx, service); deleted { @@ -521,7 +521,6 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str dimensionsMap[metrics.ComponentDimension] = lbMetricDimension dimensionsMap[metrics.ResourceOCIDDimension] = lbName metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), time.Since(startTime).Seconds(), dimensionsMap) - return nil, err } lbExists := !client.IsNotFound(err) lbOCID := "" @@ -530,43 +529,19 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str } else { // if the LB does not exist already use the k8s service UID for reference // in logs and metrics - lbOCID = GetLoadBalancerName(service) + lbOCID = lbName } logger = logger.With("loadBalancerID", lbOCID, "loadBalancerType", getLoadBalancerType(service)) dimensionsMap[metrics.ResourceOCIDDimension] = lbOCID - // This code block checks if we have pending work requests before processing the LoadBalancer further + // Checks if we have pending work requests before processing the LoadBalancer further // Will error out if any in-progress work request are present for the LB if lb != nil && lb.Id != nil { - listWorkRequestTime := time.Now() - lbInProgressWorkRequests, err := lbProvider.lbClient.ListWorkRequests(ctx, *lb.CompartmentId, *lb.Id) - logger.With("loadBalancerID", *lb.Id).Infof("time (in seconds) to list work-requests for LB %f", time.Since(listWorkRequestTime).Seconds()) + err = cp.checkPendingLBWorkRequests(ctx, logger, lbProvider, lb, service, startTime) if err != nil { - logger.With(zap.Error(err)).Error("Failed to list work-requests in-progress") - errorType = util.GetError(err) - lbMetricDimension = util.GetMetricDimensionForComponent(errorType, util.LoadBalancerType) - dimensionsMap[metrics.ComponentDimension] = lbMetricDimension - dimensionsMap[metrics.ResourceOCIDDimension] = lbName - metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, List), time.Since(startTime).Seconds(), dimensionsMap) return nil, err } - - for _, wr := range lbInProgressWorkRequests { - lbType := getLoadBalancerType(service) - switch lbType { - case NLB: - if wr.Status == string(networkloadbalancer.OperationStatusInProgress) || wr.Status == string(networkloadbalancer.OperationStatusAccepted) { - logger.With("loadBalancerID", *lb.Id).Infof("current in-progress work requests for Network Load Balancer %s", *wr.Id) - return nil, errors.New("Network Load Balancer has work requests in progress, will wait and retry") - } - default: - if *wr.LifecycleState == string(loadbalancer.WorkRequestLifecycleStateInProgress) || *wr.LifecycleState == string(loadbalancer.WorkRequestLifecycleStateAccepted) { - logger.With("loadBalancerID", *lb.Id).Infof("current in-progress work requests for Load Balancer %s", *wr.Id) - return nil, errors.New("Load Balancer has work requests in progress, will wait and retry") - } - } - } } var sslConfig *SSLConfig @@ -795,26 +770,12 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str } } - // Service controller provided empty nodes list - // TODO: Revisit this condition when clusters with mixed node pools are introduced, possibly add len(virtualPods) == 0 check - if len(nodes) == 0 { - // List all nodes in the cluster - nodeList, err := cp.NodeLister.List(labels.Everything()) - if err != nil { - logger.With(zap.Error(err)).Error("Failed to check if all backend nodes are not ready, error listing nodes") - return nil, err - } - - if len(nodeList) == 0 { - logger.Info("Cluster has zero nodes, continue reconciling") - } else if allNodesNotReady := cp.checkAllBackendNodesNotReady(nodeList); allNodesNotReady { - logger.Info("Not removing backends since all nodes are Not Ready") - return loadBalancerToStatus(lb) - } else { - err = errors.Errorf("backend node status is inconsistent, will retry") - logger.With(zap.Error(err)).Error("Not removing backends since backend node status is inconsistent with what was observed by service controller") - return nil, err - } + // If network partition, do not proceed + isNetworkPartition, err := cp.checkForNetworkPartition(logger, clusterNodes) + if err != nil { + return nil, err + } else if isNetworkPartition { + return nil, nil } if err := lbProvider.updateLoadBalancer(ctx, lb, spec); err != nil { @@ -922,7 +883,7 @@ func (cp *CloudProvider) getLoadBalancerSubnets(ctx context.Context, logger *zap func (clb *CloudLoadBalancerProvider) updateLoadBalancer(ctx context.Context, lb *client.GenericLoadBalancer, spec *LBSpec) error { lbID := *lb.Id - logger := clb.logger.With("loadBalancerID", lbID, "compartmentID", clb.config.CompartmentID, "loadBalancerType", getLoadBalancerType(spec.service)) + logger := clb.logger.With("loadBalancerID", lbID, "compartmentID", clb.config.CompartmentID, "loadBalancerType", getLoadBalancerType(spec.service), "serviceName", spec.service.Name) var actualPublicReservedIP *string @@ -937,13 +898,6 @@ func (clb *CloudLoadBalancerProvider) updateLoadBalancer(ctx context.Context, lb } } - //check if the reservedIP has changed in spec - if spec.LoadBalancerIP != "" || actualPublicReservedIP != nil { - if actualPublicReservedIP == nil || *actualPublicReservedIP != spec.LoadBalancerIP { - return errors.Errorf("The Load Balancer service reserved IP cannot be updated after the Load Balancer is created.") - } - } - actualBackendSets := lb.BackendSets desiredBackendSets := spec.BackendSets backendSetActions := getBackendSetChanges(logger, actualBackendSets, desiredBackendSets) @@ -961,26 +915,6 @@ func (clb *CloudLoadBalancerProvider) updateLoadBalancer(ctx context.Context, lb return errors.Wrap(err, "get subnets for nodes") } - // Only LB supports fixed shapes which can be changed - if spec.Type == LB { - shapeChanged := hasLoadbalancerShapeChanged(ctx, spec, lb) - - if shapeChanged { - err = clb.updateLoadbalancerShape(ctx, lb, spec) - if err != nil { - return err - } - } - } - - nsgChanged := hasLoadBalancerNetworkSecurityGroupsChanged(ctx, lb.NetworkSecurityGroupIds, spec.NetworkSecurityGroupIds) - if nsgChanged { - err = clb.updateLoadBalancerNetworkSecurityGroups(ctx, lb, spec) - if err != nil { - return err - } - } - if len(backendSetActions) == 0 && len(listenerActions) == 0 { // If there are no backendSetActions or Listener actions // this function must have been called because of a failed @@ -1019,6 +953,67 @@ func (clb *CloudLoadBalancerProvider) updateLoadBalancer(ctx context.Context, lb } } } + + // Check if the customer managed LB NSGs have changed + nsgChanged := hasLoadBalancerNetworkSecurityGroupsChanged(ctx, lb.NetworkSecurityGroupIds, spec.NetworkSecurityGroupIds) + if nsgChanged { + err = clb.updateLoadBalancerNetworkSecurityGroups(ctx, lb, spec) + if err != nil { + return err + } + } + + // Only LB supports fixed/flexible shapes which can be changed + if spec.Type == LB { + shapeChanged := hasLoadbalancerShapeChanged(ctx, spec, lb) + + if shapeChanged { + err = clb.updateLoadbalancerShape(ctx, lb, spec) + if err != nil { + return err + } + } + } + + // Check if the reservedIP has changed in spec + if spec.LoadBalancerIP != "" || actualPublicReservedIP != nil { + if actualPublicReservedIP == nil || *actualPublicReservedIP != spec.LoadBalancerIP { + return errors.Errorf("The Load Balancer service reserved IP cannot be updated after the Load Balancer is created.") + } + } + return nil +} + +func (clb *CloudLoadBalancerProvider) updateLoadBalancerBackends(ctx context.Context, lb *client.GenericLoadBalancer, spec *LBSpec) error { + lbID := *lb.Id + + logger := clb.logger.With("loadBalancerID", lbID, "compartmentID", clb.config.CompartmentID, "loadBalancerType", getLoadBalancerType(spec.service), "serviceName", spec.service.Name) + + actualBackendSets := lb.BackendSets + desiredBackendSets := spec.BackendSets + backendSetActions := getBackendSetChanges(logger, actualBackendSets, desiredBackendSets) + + lbSubnets, err := getSubnets(ctx, spec.Subnets, clb.client.Networking()) + if err != nil { + return errors.Wrapf(err, "getting load balancer subnets") + } + nodeSubnets, err := getSubnetsForNodes(ctx, spec.nodes, clb.client) + if err != nil { + return errors.Wrap(err, "get subnets for nodes") + } + + for _, action := range backendSetActions { + switch a := action.(type) { + case *BackendSetAction: + switch a.Type() { + case Update: + err := clb.updateBackendSet(ctx, lbID, a, lbSubnets, nodeSubnets, spec.securityListManager, spec) + if err != nil { + return errors.Wrap(err, "updating BackendSet") + } + } + } + } return nil } @@ -1135,11 +1130,150 @@ func (clb *CloudLoadBalancerProvider) updateListener(ctx context.Context, lbID s // UpdateLoadBalancer updates an existing loadbalancer func (cp *CloudProvider) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error { - name := cp.GetLoadBalancerName(ctx, clusterName, service) - cp.logger.With("loadBalancerName", name, "loadBalancerType", getLoadBalancerType(service)).Info("Updating load balancer") + startTime := time.Now() + lbName := GetLoadBalancerName(service) + loadBalancerType := getLoadBalancerType(service) + logger := cp.logger.With("loadBalancerName", lbName, "serviceName", service.Name, "loadBalancerType", loadBalancerType, "serviceUid", service.UID) + if sa, useWI := service.Annotations[ServiceAnnotationServiceAccountName]; useWI { // When using Workload Identity + logger = logger.With("serviceAccount", sa, "namespace", service.Namespace) + } + + if deleted, err := cp.serviceDeletedOrDoesNotExist(ctx, service); deleted { + if err != nil { + logger.With(zap.Error(err)).Error("Failed to check if service exists") + return errors.Wrap(err, "Failed to check service status") + } + logger.Info("Service already deleted or no more exists") + return errors.New("Service already deleted or no more exists") + } + loadBalancerService := fmt.Sprintf("%s/%s", service.Namespace, service.Name) + if acquired := cp.lbLocks.TryAcquire(loadBalancerService); !acquired { + logger.Error("Could not acquire lock for Updating Load Balancer") + return errors.Errorf(LbOperationAlreadyExistsFmt, loadBalancerType, loadBalancerService) + } + defer cp.lbLocks.Release(loadBalancerService) + + nodes, err := filterNodes(service, nodes) + if err != nil { + logger.With(zap.Error(err)).Error("Failed to filter nodes with label selector") + return err + } + + logger.With("nodes", len(nodes)).Info("Ensuring load balancer") - _, err := cp.EnsureLoadBalancer(ctx, clusterName, service, nodes) - return err + // If network partition, do not proceed + isNetworkPartition, err := cp.checkForNetworkPartition(logger, nodes) + if err != nil { + return err + } else if isNetworkPartition { + return nil + } + + dimensionsMap := make(map[string]string) + + var errorType string + var lbMetricDimension string + + lbProvider, err := cp.getLoadBalancerProvider(ctx, service) + if err != nil { + return errors.Wrap(err, "Unable to get Load Balancer Client.") + } + lb, err := lbProvider.lbClient.GetLoadBalancerByName(ctx, cp.config.CompartmentID, lbName) + if err != nil && !client.IsNotFound(err) { + logger.With(zap.Error(err)).Error("Failed to get loadbalancer by name") + errorType = util.GetError(err) + lbMetricDimension = util.GetMetricDimensionForComponent(errorType, util.LoadBalancerType) + dimensionsMap[metrics.ComponentDimension] = lbMetricDimension + dimensionsMap[metrics.ResourceOCIDDimension] = lbName + metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), time.Since(startTime).Seconds(), dimensionsMap) + return err + } else if client.IsNotFound(err) { + logger.Infof("Could not find load balancer, will not retry UpdateLoadBalancer.") + return nil + } + + if lb.LifecycleState == nil || *lb.LifecycleState != lbLifecycleStateActive { + logger := logger.With("lifecycleState", lb.LifecycleState) + switch loadBalancerType { + case NLB: + // This check is added here since NLBs are marked as failed in case nlb work-requests fail NLB-26239 + if *lb.LifecycleState == string(networkloadbalancer.LifecycleStateFailed) { + logger.Infof("NLB is in %s state, process the Loadbalancer", *lb.LifecycleState) + } else { + return errors.Errorf("NLB is in %s state, wait for NLB to move to %s", *lb.LifecycleState, lbLifecycleStateActive) + } + break + default: + logger.Infof("LB is not in %s state, will retry UpdateLoadBalancer", lbLifecycleStateActive) + return errors.Errorf("rejecting request to update LB which is not in %s state", lbLifecycleStateActive) + } + } + + lbOCID := "" + if lb != nil && lb.Id != nil { + lbOCID = *lb.Id + } else { + // if the LB does not exist already use the k8s service UID for reference + // in logs and metrics + logger.Error("Load Balancer Id is empty, will retry UpdateLoadBalancer.") + return errors.New("Load Balancer service returned empty Id, will wait and retry") + } + + logger = logger.With("loadBalancerID", lbOCID) + dimensionsMap[metrics.ResourceOCIDDimension] = lbOCID + + err = cp.checkPendingLBWorkRequests(ctx, logger, lbProvider, lb, service, startTime) + if err != nil { + return err + } + + subnets, err := cp.getLoadBalancerSubnets(ctx, logger, service) + if err != nil { + logger.With(zap.Error(err)).Error("Failed to get Load balancer Subnets.") + errorType = util.GetError(err) + lbMetricDimension = util.GetMetricDimensionForComponent(errorType, util.LoadBalancerType) + dimensionsMap[metrics.ComponentDimension] = lbMetricDimension + metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), time.Since(startTime).Seconds(), dimensionsMap) + return err + } + + spec, err := NewLBSpec(logger, service, nodes, subnets, nil, cp.securityListManagerFactory, cp.config.Tags, lb) + if err != nil { + logger.With(zap.Error(err)).Error("Failed to derive LBSpec") + errorType = util.GetError(err) + lbMetricDimension = util.GetMetricDimensionForComponent(errorType, util.LoadBalancerType) + dimensionsMap[metrics.ComponentDimension] = lbMetricDimension + metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), time.Since(startTime).Seconds(), dimensionsMap) + + return err + } + + // Existing load balancers cannot change subnets. This ensures that the spec matches + // what the actual load balancer has listed as the subnet ids. If the load balancer + // was just created then these values would be equal; however, if the load balancer + // already existed and the default subnet ids changed, then this would ensure + // we are setting the security rules on the correct subnets. + spec, err = updateSpecWithLbSubnets(spec, lb.SubnetIds) + if err != nil { + return err + } + + if err := lbProvider.updateLoadBalancerBackends(ctx, lb, spec); err != nil { + errorType = util.GetError(err) + lbMetricDimension = util.GetMetricDimensionForComponent(errorType, util.LoadBalancerType) + logger.With(zap.Error(err)).Error("Failed to update LoadBalancer backends") + dimensionsMap[metrics.ComponentDimension] = lbMetricDimension + metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), time.Since(startTime).Seconds(), dimensionsMap) + return err + } + + syncTime := time.Since(startTime).Seconds() + logger.Info("Successfully updated loadbalancer backends") + lbMetricDimension = util.GetMetricDimensionForComponent(util.Success, util.LoadBalancerType) + dimensionsMap[metrics.ComponentDimension] = lbMetricDimension + dimensionsMap[metrics.BackendSetsCountDimension] = strconv.Itoa(len(lb.BackendSets)) + metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), syncTime, dimensionsMap) + return nil } // getNodesByIPs returns a slice of Nodes corresponding to the given IP addresses. @@ -1571,3 +1705,65 @@ func (cp *CloudProvider) getFrontendNsgByName(ctx context.Context, logger *zap.S } return "", nil, nil } + +// checkPendingLBWorkRequests checks if we have pending work requests before processing the LoadBalancer further +// Will error out if any in-progress work request are present for the LB +func (cp *CloudProvider) checkPendingLBWorkRequests(ctx context.Context, logger *zap.SugaredLogger, lbProvider CloudLoadBalancerProvider, lb *client.GenericLoadBalancer, service *v1.Service, startTime time.Time) (err error) { + listWorkRequestTime := time.Now() + loadBalancerType := getLoadBalancerType(service) + lbName := GetLoadBalancerName(service) + dimensionsMap := make(map[string]string) + dimensionsMap[metrics.ResourceOCIDDimension] = *lb.Id + + lbInProgressWorkRequests, err := lbProvider.lbClient.ListWorkRequests(ctx, *lb.CompartmentId, *lb.Id) + logger.With("loadBalancerID", *lb.Id).Infof("time (in seconds) to list work-requests for LB %f", time.Since(listWorkRequestTime).Seconds()) + if err != nil { + logger.With(zap.Error(err)).Error("Failed to list work-requests in-progress") + errorType := util.GetError(err) + lbMetricDimension := util.GetMetricDimensionForComponent(errorType, util.LoadBalancerType) + dimensionsMap[metrics.ComponentDimension] = lbMetricDimension + dimensionsMap[metrics.ResourceOCIDDimension] = lbName + metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, List), time.Since(startTime).Seconds(), dimensionsMap) + return err + } + for _, wr := range lbInProgressWorkRequests { + switch loadBalancerType { + case NLB: + if wr.Status == string(networkloadbalancer.OperationStatusInProgress) || wr.Status == string(networkloadbalancer.OperationStatusAccepted) { + logger.With("loadBalancerID", *lb.Id).Infof("current in-progress work requests for Network Load Balancer %s", *wr.Id) + return errors.New("Network Load Balancer has work requests in progress, will wait and retry") + } + default: + if *wr.LifecycleState == string(loadbalancer.WorkRequestLifecycleStateInProgress) || *wr.LifecycleState == string(loadbalancer.WorkRequestLifecycleStateAccepted) { + logger.With("loadBalancerID", *lb.Id).Infof("current in-progress work requests for Load Balancer %s", *wr.Id) + return errors.New("Load Balancer has work requests in progress, will wait and retry") + } + } + } + return +} + +// checkForNetworkPartition return true if network partition is present (all nodes are not ready) else throws an error if any +func (cp *CloudProvider) checkForNetworkPartition(logger *zap.SugaredLogger, nodes []*v1.Node) (isNetworkPartition bool, err error) { + // Service controller provided empty provisioned nodes list + if len(nodes) == 0 { + // List all nodes in the cluster + nodeList, err := cp.NodeLister.List(labels.Everything()) + if err != nil { + logger.With(zap.Error(err)).Error("Failed to check if all backend nodes are not ready, error listing nodes") + return false, err + } + + if len(nodeList) == 0 { + logger.Info("Cluster has zero nodes, continue reconciling") + } else if allNodesNotReady := cp.checkAllBackendNodesNotReady(nodeList); allNodesNotReady { + logger.Info("Not removing backends since all nodes are Not Ready") + return true, nil + } else { + err = errors.Errorf("backend node status is inconsistent, will retry") + logger.With(zap.Error(err)).Error("Not removing backends since backend node status is inconsistent with what was observed by service controller") + return false, err + } + } + return +} From 8250621f06a46c24c21bf27fbabe439a3cf28378 Mon Sep 17 00:00:00 2001 From: yashg Date: Thu, 23 Nov 2023 13:04:02 +0530 Subject: [PATCH 09/22] Changes to parallelise e2e test runs --- hack/run_e2e_test.sh | 2 + .../block_volume_creation.go | 4 +- .../csi_snapshot_restore.go | 58 +- .../cloud-provider-oci/csi_volume_cloning.go | 27 +- .../cloud-provider-oci/csi_volume_creation.go | 267 +- test/e2e/cloud-provider-oci/fss_dynamic.go | 243 +- test/e2e/cloud-provider-oci/load_balancer.go | 17 +- test/e2e/cloud-provider-oci/setup.go | 27 +- test/e2e/framework/framework.go | 17 +- test/e2e/framework/pod_util.go | 3 +- test/e2e/framework/pvc_util.go | 11 +- .../v65/containerengine/add_on_options.go | 44 + .../oci-go-sdk/v65/containerengine/addon.go | 62 + .../containerengine/addon_configuration.go | 44 + .../v65/containerengine/addon_error.go | 47 + .../containerengine/addon_lifecycle_state.go | 78 + .../containerengine/addon_option_summary.go | 121 + .../v65/containerengine/addon_summary.go | 59 + .../addon_version_configuration.go | 53 + .../v65/containerengine/addon_versions.go | 106 + .../admission_controller_options.go | 41 + .../oci-go-sdk/v65/containerengine/cluster.go | 187 ++ .../containerengine/cluster_create_options.go | 54 + .../cluster_endpoint_config.go | 47 + .../v65/containerengine/cluster_endpoints.go | 51 + .../cluster_lifecycle_state.go | 74 + .../v65/containerengine/cluster_metadata.go | 68 + .../cluster_migrate_to_native_vcn_details.go | 44 + ..._migrate_to_native_vcn_request_response.go | 98 + .../cluster_migrate_to_native_vcn_status.go | 101 + .../v65/containerengine/cluster_options.go | 74 + .../cluster_pod_network_option_details.go | 125 + .../v65/containerengine/cluster_summary.go | 202 ++ .../v65/containerengine/cluster_type.go | 58 + ...te_credential_rotation_request_response.go | 99 + .../containerengine/containerengine_client.go | 2680 +++++++++++++++++ .../containerengine/create_cluster_details.go | 144 + .../create_cluster_endpoint_config_details.go | 47 + ...eate_cluster_kubeconfig_content_details.go | 100 + .../create_cluster_request_response.go | 94 + .../create_image_policy_config_details.go | 44 + .../create_kubeconfig_request_response.go | 95 + .../create_node_pool_details.go | 176 ++ .../create_node_pool_node_config_details.go | 116 + .../create_node_pool_request_response.go | 94 + .../create_node_shape_config_details.go | 45 + .../create_virtual_node_pool_details.go | 77 + ...eate_virtual_node_pool_request_response.go | 94 + .../create_workload_mapping_details.go | 54 + ...reate_workload_mapping_request_response.go | 101 + .../credential_rotation_status.go | 156 + .../delete_cluster_request_response.go | 95 + .../delete_node_pool_request_response.go | 102 + .../delete_node_request_response.go | 108 + ...lete_virtual_node_pool_request_response.go | 102 + .../delete_work_request_request_response.go | 93 + ...elete_workload_mapping_request_response.go | 96 + .../disable_addon_request_response.go | 101 + ...rlay_cluster_pod_network_option_details.go | 53 + ...ay_node_pool_pod_network_option_details.go | 53 + .../get_addon_request_response.go | 97 + ...e_to_native_vcn_status_request_response.go | 94 + .../get_cluster_options_request_response.go | 94 + .../get_cluster_request_response.go | 94 + ...ential_rotation_status_request_response.go | 94 + .../get_node_pool_options_request_response.go | 94 + .../get_node_pool_request_response.go | 94 + .../get_virtual_node_pool_request_response.go | 94 + .../get_virtual_node_request_response.go | 97 + .../get_work_request_request_response.go | 97 + .../get_workload_mapping_request_response.go | 97 + .../containerengine/image_policy_config.go | 44 + .../initial_virtual_node_label.go | 44 + .../containerengine/install_addon_details.go | 47 + .../install_addon_request_response.go | 102 + .../v65/containerengine/key_details.go | 41 + .../v65/containerengine/key_value.go | 44 + .../kubernetes_network_config.go | 44 + .../kubernetes_versions_filters.go | 47 + .../list_addon_options_request_response.go | 203 ++ .../list_addons_request_response.go | 200 ++ .../list_clusters_request_response.go | 216 ++ .../list_node_pools_request_response.go | 219 ++ .../list_pod_shapes_request_response.go | 210 ++ ...ist_virtual_node_pools_request_response.go | 219 ++ .../list_virtual_nodes_request_response.go | 207 ++ ...st_work_request_errors_request_response.go | 94 + ...list_work_request_logs_request_response.go | 94 + .../list_work_requests_request_response.go | 273 ++ ...list_workload_mappings_request_response.go | 200 ++ .../oci-go-sdk/v65/containerengine/node.go | 153 + .../v65/containerengine/node_error.go | 50 + .../node_eviction_node_pool_settings.go | 45 + .../v65/containerengine/node_pool.go | 224 ++ .../node_pool_cycling_details.go | 51 + .../node_pool_lifecycle_state.go | 82 + .../node_pool_node_config_details.go | 116 + .../v65/containerengine/node_pool_options.go | 88 + .../node_pool_placement_config_details.go | 53 + .../node_pool_pod_network_option_details.go | 125 + .../v65/containerengine/node_pool_summary.go | 212 ++ .../v65/containerengine/node_shape_config.go | 45 + .../containerengine/node_source_details.go | 79 + .../v65/containerengine/node_source_option.go | 89 + .../v65/containerengine/node_source_type.go | 54 + .../node_source_via_image_details.go | 59 + .../node_source_via_image_option.go | 64 + ...tive_cluster_pod_network_option_details.go | 53 + ...ve_node_pool_pod_network_option_details.go | 62 + .../persistent_volume_config_details.go | 48 + .../placement_configuration.go | 48 + .../v65/containerengine/pod_configuration.go | 47 + .../v65/containerengine/pod_shape.go | 53 + .../v65/containerengine/pod_shape_summary.go | 53 + .../preemptible_node_config_details.go | 64 + .../v65/containerengine/preemption_action.go | 117 + .../service_lb_config_details.go | 48 + .../containerengine/shape_memory_options.go | 53 + .../shape_network_bandwidth_options.go | 47 + .../v65/containerengine/shape_ocpu_options.go | 44 + .../v65/containerengine/sort_order.go | 58 + .../start_credential_rotation_details.go | 41 + ...rt_credential_rotation_request_response.go | 102 + .../oci-go-sdk/v65/containerengine/taint.go | 47 + .../terminate_preemption_action.go | 56 + .../containerengine/update_addon_details.go | 44 + .../update_addon_request_response.go | 101 + .../containerengine/update_cluster_details.go | 67 + .../update_cluster_endpoint_config_details.go | 44 + ...luster_endpoint_config_request_response.go | 98 + .../update_cluster_options_details.go | 45 + .../update_cluster_request_response.go | 98 + .../update_image_policy_config_details.go | 44 + .../update_node_pool_details.go | 161 + .../update_node_pool_node_config_details.go | 116 + .../update_node_pool_request_response.go | 105 + .../update_node_shape_config_details.go | 45 + .../update_virtual_node_pool_details.go | 71 + ...date_virtual_node_pool_request_response.go | 98 + .../update_workload_mapping_details.go | 51 + ...pdate_workload_mapping_request_response.go | 105 + .../v65/containerengine/virtual_node.go | 94 + .../virtual_node_lifecycle_state.go | 78 + .../v65/containerengine/virtual_node_pool.go | 102 + .../virtual_node_pool_lifecycle_state.go | 78 + .../virtual_node_pool_summary.go | 102 + .../containerengine/virtual_node_summary.go | 94 + .../v65/containerengine/virtual_node_tags.go | 48 + .../v65/containerengine/work_request.go | 68 + .../v65/containerengine/work_request_error.go | 47 + .../containerengine/work_request_log_entry.go | 44 + .../work_request_operation_type.go | 118 + .../containerengine/work_request_resource.go | 123 + .../containerengine/work_request_status.go | 74 + .../containerengine/work_request_summary.go | 121 + .../v65/containerengine/workload_mapping.go | 72 + .../workload_mapping_lifecycle_state.go | 74 + .../workload_mapping_summary.go | 72 + vendor/modules.txt | 1 + 159 files changed, 16156 insertions(+), 304 deletions(-) create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/add_on_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_configuration.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_error.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_lifecycle_state.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_option_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_version_configuration.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_versions.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/admission_controller_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_create_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_endpoint_config.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_endpoints.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_lifecycle_state.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_metadata.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_status.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_pod_network_option_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_type.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/complete_credential_rotation_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/containerengine_client.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_endpoint_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_kubeconfig_content_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_image_policy_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_kubeconfig_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_node_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_shape_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_virtual_node_pool_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_virtual_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_workload_mapping_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_workload_mapping_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/credential_rotation_status.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_cluster_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_node_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_virtual_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_work_request_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_workload_mapping_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/disable_addon_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/flannel_overlay_cluster_pod_network_option_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/flannel_overlay_node_pool_pod_network_option_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_addon_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_migrate_to_native_vcn_status_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_options_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_credential_rotation_status_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_node_pool_options_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_virtual_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_virtual_node_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_work_request_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_workload_mapping_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/image_policy_config.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/initial_virtual_node_label.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/install_addon_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/install_addon_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/key_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/key_value.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/kubernetes_network_config.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/kubernetes_versions_filters.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_addon_options_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_addons_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_clusters_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_node_pools_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_pod_shapes_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_virtual_node_pools_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_virtual_nodes_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_request_errors_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_request_logs_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_requests_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_workload_mappings_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_error.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_eviction_node_pool_settings.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_cycling_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_lifecycle_state.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_node_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_placement_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_pod_network_option_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_shape_config.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_option.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_type.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_via_image_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_via_image_option.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/oci_vcn_ip_native_cluster_pod_network_option_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/oci_vcn_ip_native_node_pool_pod_network_option_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/persistent_volume_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/placement_configuration.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_configuration.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_shape.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_shape_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/preemptible_node_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/preemption_action.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/service_lb_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_memory_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_network_bandwidth_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_ocpu_options.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/sort_order.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/start_credential_rotation_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/start_credential_rotation_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/taint.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/terminate_preemption_action.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_addon_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_addon_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_endpoint_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_endpoint_config_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_options_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_image_policy_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_node_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_shape_config_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_virtual_node_pool_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_virtual_node_pool_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_workload_mapping_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_workload_mapping_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_lifecycle_state.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool_lifecycle_state.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_tags.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_error.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_log_entry.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_operation_type.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_resource.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_status.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping_lifecycle_state.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping_summary.go diff --git a/hack/run_e2e_test.sh b/hack/run_e2e_test.sh index 9485d7b3e..eccc06f07 100755 --- a/hack/run_e2e_test.sh +++ b/hack/run_e2e_test.sh @@ -30,6 +30,7 @@ check-env "FSS_VOLUME_HANDLE" $FSS_VOLUME_HANDLE check-env "MNT_TARGET_ID" $MNT_TARGET_ID check-env "MNT_TARGET_SUBNET_ID" $MNT_TARGET_SUBNET_ID check-env "MNT_TARGET_COMPARTMENT_ID" $MNT_TARGET_COMPARTMENT_ID +check-env "ENABLE_PARALLEL_RUN" $ENABLE_PARALLEL_RUN check-env "RUN_UHP_E2E" $RUN_UHP_E2E @@ -59,6 +60,7 @@ function run_e2e_tests_existing_cluster() { --architecture=${ARCHITECTURE} \ --volume-handle=${FSS_VOLUME_HANDLE} \ --static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \ + --enable-parallel-run=${ENABLE_PARALLEL_RUN} \ --run-uhp-e2e=${RUN_UHP_E2E} retval=$? return $retval diff --git a/test/e2e/cloud-provider-oci/block_volume_creation.go b/test/e2e/cloud-provider-oci/block_volume_creation.go index 3e2302b7f..38efa6e1d 100644 --- a/test/e2e/cloud-provider-oci/block_volume_creation.go +++ b/test/e2e/cloud-provider-oci/block_volume_creation.go @@ -35,11 +35,11 @@ var _ = Describe("Block Volume Creation", func() { It("Should be possible to create a persistent volume claim (PVC) for a block storage of Ext3 file system ", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "volume-provisioner-e2e-tests-pvc") - scName := f.CreateStorageClassOrFail(framework.ClassOCIExt3, core.ProvisionerNameDefault, map[string]string{block.FSType: "ext3"}, pvcJig.Labels, "", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, core.ProvisionerNameDefault, map[string]string{block.FSType: "ext3"}, pvcJig.Labels, "", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFail(f.Namespace.Name, framework.MinVolumeBlock, scName, setupF.AdLabel, nil) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIExt3) + _ = f.DeleteStorageClass(f.Namespace.Name) }) It("Should be possible to create a persistent volume claim (PVC) for a block storage with no AD specified ", func() { diff --git a/test/e2e/cloud-provider-oci/csi_snapshot_restore.go b/test/e2e/cloud-provider-oci/csi_snapshot_restore.go index 46d8eb045..241832f39 100644 --- a/test/e2e/cloud-provider-oci/csi_snapshot_restore.go +++ b/test/e2e/cloud-provider-oci/csi_snapshot_restore.go @@ -70,14 +70,14 @@ var _ = Describe("Snapshot Creation and Restore", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") pvcJig.InitialiseSnapClient(f.SnapClientSet) - scName := f.CreateStorageClassOrFail(framework.ClassSnapshot, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) _ = pvcJig.NewPodForCSI("pod-original", f.Namespace.Name, pvc.Name, setupF.AdLabel) time.Sleep(60 * time.Second) //waiting for pod to up and running - vscName := f.CreateVolumeSnapshotClassOrFail(framework.VSClassDefault, BVDriverName, vscParams, ReclaimPolicyDelete) + vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MaxVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) @@ -88,8 +88,8 @@ var _ = Describe("Snapshot Creation and Restore", func() { pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podRestoreName, "99G") f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteVolumeSnapshotClass(framework.VSClassDefault) - _ = f.DeleteStorageClass(framework.ClassSnapshot) + _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + _ = f.DeleteStorageClass(f.Namespace.Name) }) It("FS should get expanded when a PVC is restored with a lesser size backup (paravirtualized)", func() { checkOrInstallCRDs(f) @@ -98,14 +98,14 @@ var _ = Describe("Snapshot Creation and Restore", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") pvcJig.InitialiseSnapClient(f.SnapClientSet) - scName := f.CreateStorageClassOrFail(framework.ClassSnapshot, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) _ = pvcJig.NewPodForCSI("pod-original", f.Namespace.Name, pvc.Name, setupF.AdLabel) time.Sleep(60 * time.Second) //waiting for pod to up and running - vscName := f.CreateVolumeSnapshotClassOrFail(framework.VSClassDefault, BVDriverName, vscParams, ReclaimPolicyDelete) + vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MaxVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) @@ -116,8 +116,8 @@ var _ = Describe("Snapshot Creation and Restore", func() { pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podRestoreName, "99G") f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteVolumeSnapshotClass(framework.VSClassDefault) - _ = f.DeleteStorageClass(framework.ClassSnapshot) + _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + _ = f.DeleteStorageClass(f.Namespace.Name) }) It("Should be able to create and restore a snapshot from a backup(static case)", func() { checkOrInstallCRDs(f) @@ -127,10 +127,10 @@ var _ = Describe("Snapshot Creation and Restore", func() { pvcJig.InitialiseSnapClient(f.SnapClientSet) //creating a snapshot dynamically - scName := f.CreateStorageClassOrFail(framework.ClassSnapshot, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) _ = pvcJig.CreateAndAwaitNginxPodOrFail(f.Namespace.Name, pvc, WriteCommand) - vscName := f.CreateVolumeSnapshotClassOrFail(framework.VSClassDefault, BVDriverName, vscParams, ReclaimPolicyDelete) + vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) //Waiting for volume snapshot content to be created and status field to be populated @@ -142,7 +142,7 @@ var _ = Describe("Snapshot Creation and Restore", func() { //creating a snapshot statically using the backup provisioned dynamically restoreVsName := "e2e-restore-vs" - vscontentName := pvcJig.CreateVolumeSnapshotContentOrFail("e2e-snapshot-vsc", BVDriverName, backupOCID, ReclaimPolicyDelete, restoreVsName, f.Namespace.Name) + vscontentName := pvcJig.CreateVolumeSnapshotContentOrFail(f.Namespace.Name + "-e2e-snapshot-vsc", BVDriverName, backupOCID, ReclaimPolicyDelete, restoreVsName, f.Namespace.Name) pvcJig.CreateAndAwaitVolumeSnapshotStaticOrFail(restoreVsName, f.Namespace.Name, vscontentName) @@ -152,8 +152,8 @@ var _ = Describe("Snapshot Creation and Restore", func() { pvcJig.CheckFileExists(f.Namespace.Name, podRestoreName, "/usr/share/nginx/html", "testdata.txt") f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteVolumeSnapshotClass(framework.VSClassDefault) - _ = f.DeleteStorageClass(framework.ClassSnapshot) + _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + _ = f.DeleteStorageClass(f.Namespace.Name) }) It("Should be able to create a snapshot and restore from a backup in another compartment", func() { checkOrInstallCRDs(f) @@ -167,11 +167,11 @@ var _ = Describe("Snapshot Creation and Restore", func() { backupOCID := pvcJig.CreateVolumeBackup(f.BlockStorageClient, setupF.AdLabel, setupF.StaticSnapshotCompartmentOcid, *volId, "test-backup") - scName := f.CreateStorageClassOrFail(framework.ClassSnapshot, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) //creating a snapshot statically using the backup provisioned dynamically restoreVsName := "e2e-restore-vs" - vscontentName := pvcJig.CreateVolumeSnapshotContentOrFail("e2e-snapshot-vsc", BVDriverName, *backupOCID, ReclaimPolicyDelete, restoreVsName, f.Namespace.Name) + vscontentName := pvcJig.CreateVolumeSnapshotContentOrFail(f.Namespace.Name + "-e2e-snapshot-vsc", BVDriverName, *backupOCID, ReclaimPolicyDelete, restoreVsName, f.Namespace.Name) pvcJig.CreateAndAwaitVolumeSnapshotStaticOrFail(restoreVsName, f.Namespace.Name, vscontentName) @@ -186,8 +186,8 @@ var _ = Describe("Snapshot Creation and Restore", func() { pvcJig.DeleteVolumeBackup(f.BlockStorageClient, *backupOCID) f.VolumeIds = append(f.VolumeIds, *volId) - _ = f.DeleteVolumeSnapshotClass(framework.VSClassDefault) - _ = f.DeleteStorageClass(framework.ClassSnapshot) + _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) }) @@ -204,12 +204,12 @@ var _ = Describe("Volume Snapshot Deletion Tests", func() { scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI} vscParams := map[string]string{framework.BackupType: framework.BackupTypeFull} - scName := f.CreateStorageClassOrFail(framework.ClassSnapshot, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) _ = pvcJig.CreateAndAwaitNginxPodOrFail(f.Namespace.Name, pvc, WriteCommand) - vscName := f.CreateVolumeSnapshotClassOrFail(framework.VSClassDefault, BVDriverName, vscParams, ReclaimPolicyDelete) + vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) //Waiting for volume snapshot content to be created and status field to be populated @@ -230,8 +230,8 @@ var _ = Describe("Volume Snapshot Deletion Tests", func() { } f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteVolumeSnapshotClass(framework.VSClassDefault) - _ = f.DeleteStorageClass(framework.ClassSnapshot) + _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + _ = f.DeleteStorageClass(f.Namespace.Name) }) It("Test VSContent not deleted when reclaim policy is Retain", func() { checkOrInstallCRDs(f) @@ -241,12 +241,12 @@ var _ = Describe("Volume Snapshot Deletion Tests", func() { scParams := map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI} vscParams := map[string]string{framework.BackupType: framework.BackupTypeFull} - scName := f.CreateStorageClassOrFail(framework.ClassSnapshot, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) _ = pvcJig.CreateAndAwaitNginxPodOrFail(f.Namespace.Name, pvc, WriteCommand) - vscName := f.CreateVolumeSnapshotClassOrFail(framework.VSClassDefault, BVDriverName, vscParams, ReclaimPolicyRetain) + vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyRetain) vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) //Waiting for volume snapshot content to be created and status field to be populated @@ -278,8 +278,8 @@ var _ = Describe("Volume Snapshot Deletion Tests", func() { pvcJig.DeleteVolumeBackup(f.BlockStorageClient, backupId) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteVolumeSnapshotClass(framework.VSClassDefault) - _ = f.DeleteStorageClass(framework.ClassSnapshot) + _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) }) @@ -289,7 +289,7 @@ func testSnapshotAndRestore(f *framework.CloudProviderFramework, scParams map[st pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-snapshot-restore-e2e-tests") pvcJig.InitialiseSnapClient(f.SnapClientSet) - scName := f.CreateStorageClassOrFail(framework.ClassSnapshot, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, BVDriverName, scParams, pvcJig.Labels, BindingModeWaitForFirstConsumer, true, ReclaimPolicyDelete, nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) _ = pvcJig.CreateAndAwaitNginxPodOrFail(f.Namespace.Name, pvc, WriteCommand) @@ -297,7 +297,7 @@ func testSnapshotAndRestore(f *framework.CloudProviderFramework, scParams map[st // Waiting to be sure write command runs time.Sleep(30 * time.Second) - vscName := f.CreateVolumeSnapshotClassOrFail(framework.VSClassDefault, BVDriverName, vscParams, ReclaimPolicyDelete) + vscName := f.CreateVolumeSnapshotClassOrFail(f.Namespace.Name, BVDriverName, vscParams, ReclaimPolicyDelete) vs := pvcJig.CreateAndAwaitVolumeSnapshotOrFail(f.Namespace.Name, vscName, pvc.Name, nil) pvcRestore := pvcJig.CreateAndAwaitPVCOrFailSnapshotSource(f.Namespace.Name, framework.MinVolumeBlock, scName, vs.Name, v1.ClaimPending, nil) @@ -306,8 +306,8 @@ func testSnapshotAndRestore(f *framework.CloudProviderFramework, scParams map[st pvcJig.CheckFileExists(f.Namespace.Name, podRestoreName, "/usr/share/nginx/html", "testdata.txt") f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteVolumeSnapshotClass(framework.VSClassDefault) - _ = f.DeleteStorageClass(framework.ClassSnapshot) + _ = f.DeleteVolumeSnapshotClass(f.Namespace.Name) + _ = f.DeleteStorageClass(f.Namespace.Name) } func checkOrInstallCRDs(f *framework.CloudProviderFramework) { diff --git a/test/e2e/cloud-provider-oci/csi_volume_cloning.go b/test/e2e/cloud-provider-oci/csi_volume_cloning.go index 1e0ef125c..abddf539e 100644 --- a/test/e2e/cloud-provider-oci/csi_volume_cloning.go +++ b/test/e2e/cloud-provider-oci/csi_volume_cloning.go @@ -16,7 +16,7 @@ var _ = Describe("CSI Volume Creation with PVC datasource", func() { It("Create PVC with source PVC name specified in dataSource", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-cloning-basic") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) srcPod := pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) @@ -38,7 +38,7 @@ var _ = Describe("CSI Volume Creation with PVC datasource", func() { It("Create Clone PVC with size greater than the source PVC", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-volume-size-test") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) @@ -63,7 +63,7 @@ var _ = Describe("CSI Volume Creation with PVC datasource", func() { framework.KmsKey: setupF.CMEKKMSKey, framework.AttachmentType: framework.AttachmentTypeParavirtualized, } - scName := f.CreateStorageClassOrFail(framework.ClassOCIKMS, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) srcPod := pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) pvcJig.CheckCMEKKey(f.Client.BlockStorage(), srcPvc.Name, f.Namespace.Name, setupF.CMEKKMSKey) @@ -80,7 +80,7 @@ var _ = Describe("CSI Volume Creation with PVC datasource", func() { pvcJig.CheckAttachmentTypeAndEncryptionType(f.Client.Compute(), clonePvc.Name, f.Namespace.Name, clonePod, framework.AttachmentTypeParavirtualized) f.VolumeIds = append(f.VolumeIds, srcPvc.Spec.VolumeName, clonePvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIKMS) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) @@ -92,7 +92,7 @@ var _ = Describe("CSI Volume Creation with PVC datasource", func() { framework.KmsKey: setupF.CMEKKMSKey, framework.AttachmentType: framework.AttachmentTypeISCSI, } - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) @@ -114,7 +114,7 @@ var _ = Describe("CSI Volume Creation with PVC datasource", func() { framework.KmsKey: setupF.CMEKKMSKey, framework.AttachmentType: framework.AttachmentTypeParavirtualized, } - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) @@ -139,7 +139,7 @@ var _ = Describe("CSI Volume Cloning with different storage classes", func() { framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "20", } - scName1 := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", scParameters1, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName1 := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", scParameters1, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName1, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) pvcJig.NewPodForCSI("app1", f.Namespace.Name, srcPvc.Name, setupF.AdLabel) @@ -149,7 +149,7 @@ var _ = Describe("CSI Volume Cloning with different storage classes", func() { framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "0", } - scName2 := f.CreateStorageClassOrFail(framework.ClassOCILowCost, "blockvolume.csi.oraclecloud.com", scParameters2, pvcJig.Labels, "Immediate", true, "Delete", nil) + scName2 := f.CreateStorageClassOrFail(f.Namespace.Name+"-2", "blockvolume.csi.oraclecloud.com", scParameters2, pvcJig.Labels, "Immediate", true, "Delete", nil) clonePvc := pvcJig.CreateAndAwaitClonePVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName2, srcPvc.Name, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) clonePod := pvcJig.NewPodForCSIClone("app2", f.Namespace.Name, clonePvc.Name, setupF.AdLabel) @@ -157,6 +157,8 @@ var _ = Describe("CSI Volume Cloning with different storage classes", func() { pvcJig.CheckFileCorruption(f.Namespace.Name, clonePod, "/data", "testdata.txt") pvcJig.CheckAttachmentTypeAndEncryptionType(f.Client.Compute(), clonePvc.Name, f.Namespace.Name, clonePod, framework.AttachmentTypeISCSI) pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, clonePvc.Namespace, clonePvc.Name, csi_util.LowCostPerformanceOption) + _ = f.DeleteStorageClass(f.Namespace.Name) + _ = f.DeleteStorageClass(f.Namespace.Name+"-2") }) }) }) @@ -167,7 +169,7 @@ var _ = Describe("CSI Volume Cloning with static source Volume", func() { It("Create Clone PVC from a statically created source volume", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-static-cloning-test") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) compartmentId := "" @@ -203,7 +205,7 @@ var _ = Describe("CSI Volume Cloning Performance Level", func() { It("Create high performance clone from a low performance source volume", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-cloning-perf-test") - scName1 := f.CreateStorageClassOrFail(framework.ClassOCILowCost, "blockvolume.csi.oraclecloud.com", + scName1 := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "0"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) srcPvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName1, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -213,7 +215,7 @@ var _ = Describe("CSI Volume Cloning Performance Level", func() { pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, srcPvc.Namespace, srcPvc.Name, csi_util.LowCostPerformanceOption) - scName2 := f.CreateStorageClassOrFail(framework.ClassOCIHigh, "blockvolume.csi.oraclecloud.com", + scName2 := f.CreateStorageClassOrFail(f.Namespace.Name+"-2", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "20"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) clonePvc := pvcJig.CreateAndAwaitClonePVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName2, srcPvc.Name, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -226,7 +228,8 @@ var _ = Describe("CSI Volume Cloning Performance Level", func() { pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, clonePvc.Namespace, clonePvc.Name, csi_util.HigherPerformanceOption) f.VolumeIds = append(f.VolumeIds, srcPvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCILowCost) + _ = f.DeleteStorageClass(f.Namespace.Name) + _ = f.DeleteStorageClass(f.Namespace.Name+"-2") }) }) }) diff --git a/test/e2e/cloud-provider-oci/csi_volume_creation.go b/test/e2e/cloud-provider-oci/csi_volume_creation.go index ce7f6ee41..f95b0b532 100644 --- a/test/e2e/cloud-provider-oci/csi_volume_creation.go +++ b/test/e2e/cloud-provider-oci/csi_volume_creation.go @@ -33,7 +33,7 @@ var _ = Describe("CSI Volume Creation", func() { It("Create PVC and POD for CSI.", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) pvcJig.NewPodForCSI("app1", f.Namespace.Name, pvc.Name, setupF.AdLabel) @@ -42,7 +42,7 @@ var _ = Describe("CSI Volume Creation", func() { It("Create PVC with VolumeSize 1Gi but should use default 50Gi", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests-pvc-with-1gi") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.VolumeFss, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) pvcJig.NewPodForCSI("app2", f.Namespace.Name, pvc.Name, setupF.AdLabel) @@ -55,7 +55,7 @@ var _ = Describe("CSI Volume Creation", func() { It("Create PVC with VolumeSize 100Gi should use 100Gi", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests-pvc-with-100gi") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MaxVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) pvcJig.NewPodForCSI("app3", f.Namespace.Name, pvc.Name, setupF.AdLabel) @@ -68,7 +68,7 @@ var _ = Describe("CSI Volume Creation", func() { It("Data should persist on CSI volume on pod restart", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-pod-restart-data-persistence") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) pvcJig.CheckDataPersistenceWithDeployment(pvc.Name, f.Namespace.Name) @@ -77,7 +77,7 @@ var _ = Describe("CSI Volume Creation", func() { It("FsGroup test for CSI", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-pod-nginx") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) pvcJig.CheckVolumeDirectoryOwnership(f.Namespace.Name, pvc) @@ -92,7 +92,7 @@ var _ = Describe("CSI Volume Creation with different fstypes", func() { It("Create PVC with fstype as XFS", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests-fstype-xfs") - scName := f.CreateStorageClassOrFail(framework.ClassOCIXfs, "blockvolume.csi.oraclecloud.com", map[string]string{framework.FstypeKey: "xfs"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.FstypeKey: "xfs"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MaxVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) podName := pvcJig.NewPodForCSI("app-xfs", f.Namespace.Name, pvc.Name, setupF.AdLabel) @@ -100,12 +100,12 @@ var _ = Describe("CSI Volume Creation with different fstypes", func() { time.Sleep(60 * time.Second) //waiting for pod to up and running pvcJig.CheckFilesystemTypeOfVolumeInsidePod(f.Namespace.Name, podName, "xfs") - _ = f.DeleteStorageClass(framework.ClassOCIXfs) + _ = f.DeleteStorageClass(f.Namespace.Name) }) It("Create PVC with fstype as EXT3", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests-fstype-ext3") - scName := f.CreateStorageClassOrFail(framework.ClassOCIExt3, "blockvolume.csi.oraclecloud.com", map[string]string{framework.FstypeKey: "ext3"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.FstypeKey: "ext3"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MaxVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) podName := pvcJig.NewPodForCSI("app-ext3", f.Namespace.Name, pvc.Name, setupF.AdLabel) @@ -113,14 +113,14 @@ var _ = Describe("CSI Volume Creation with different fstypes", func() { time.Sleep(60 * time.Second) //waiting for pod to up and running pvcJig.CheckFilesystemTypeOfVolumeInsidePod(f.Namespace.Name, podName, "ext3") - _ = f.DeleteStorageClass(framework.ClassOCIExt3) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) Context("[cloudprovider][storage][csi][fstypes][paravirtualized]", func() { It("Create PVC with fstype as XFS with paravirtualized attachment type", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests-fstype-xfs") - scName := f.CreateStorageClassOrFail(framework.ClassOCIXfs, "blockvolume.csi.oraclecloud.com", map[string]string{framework.FstypeKey: "xfs", framework.KmsKey: setupF.CMEKKMSKey, framework.AttachmentType: framework.AttachmentTypeParavirtualized}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.FstypeKey: "xfs", framework.KmsKey: setupF.CMEKKMSKey, framework.AttachmentType: framework.AttachmentTypeParavirtualized}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MaxVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) podName := pvcJig.NewPodForCSI("app-xfs", f.Namespace.Name, pvc.Name, setupF.AdLabel) @@ -129,7 +129,7 @@ var _ = Describe("CSI Volume Creation with different fstypes", func() { time.Sleep(60 * time.Second) //waiting for pod to up and running pvcJig.CheckFilesystemTypeOfVolumeInsidePod(f.Namespace.Name, podName, "xfs") - _ = f.DeleteStorageClass(framework.ClassOCIXfs) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) Context("[cloudprovider][storage][csi][expand][fstypes][iSCSI]", func() { @@ -137,7 +137,7 @@ var _ = Describe("CSI Volume Creation with different fstypes", func() { var size = "100Gi" pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-pvc-expand-to-100gi-iscsi-xfs") - scName := f.CreateStorageClassOrFail(framework.ClassOCIXfs, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, framework.FstypeKey: "xfs"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -156,13 +156,13 @@ var _ = Describe("CSI Volume Creation with different fstypes", func() { pvcJig.CheckExpandedVolumeReadWrite(f.Namespace.Name, podName) pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podName, "100G") f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIXfs) + _ = f.DeleteStorageClass(f.Namespace.Name) }) It("Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for iSCSI volumes with ext3 filesystem type", func() { var size = "100Gi" pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-pvc-expand-to-100gi-iscsi-ext3") - scName := f.CreateStorageClassOrFail(framework.ClassOCIExt3, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, framework.FstypeKey: "ext3"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -181,7 +181,7 @@ var _ = Describe("CSI Volume Creation with different fstypes", func() { pvcJig.CheckExpandedVolumeReadWrite(f.Namespace.Name, podName) pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podName, "99G") f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIExt3) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) }) @@ -193,7 +193,7 @@ var _ = Describe("CSI Volume Expansion iSCSI", func() { var size = "100Gi" pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-resizer-pvc-expand-to-100gi-iscsi") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -222,7 +222,7 @@ var _ = Describe("CSI Volume Expansion iSCSI", func() { var size = "100Gi" pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-resizer-pvc-expand-to-100gi-iscsi") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSIExpand, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -240,7 +240,7 @@ var _ = Describe("CSI Volume Expansion iSCSI", func() { pvcJig.CheckExpandedVolumeReadWrite(f.Namespace.Name, podName) pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podName, "99G") f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCICSIExpand) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) }) @@ -251,7 +251,7 @@ var _ = Describe("CSI Volume Performance Level", func() { It("Create CSI block volume with Performance Level as Low Cost", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-perf-iscsi-lowcost") - scName := f.CreateStorageClassOrFail(framework.ClassOCILowCost, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "0"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -261,12 +261,12 @@ var _ = Describe("CSI Volume Performance Level", func() { pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, pvc.Namespace, pvc.Name, csi_util.LowCostPerformanceOption) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCILowCost) + _ = f.DeleteStorageClass(f.Namespace.Name) }) It("Create CSI block volume with no Performance Level and verify default", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-perf-iscsi-default") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) pvcJig.NewPodForCSI("default-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) @@ -278,7 +278,7 @@ var _ = Describe("CSI Volume Performance Level", func() { It("Create CSI block volume with Performance Level as High", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-perf-iscsi-high") - scName := f.CreateStorageClassOrFail(framework.ClassOCIHigh, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "20"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -288,14 +288,14 @@ var _ = Describe("CSI Volume Performance Level", func() { pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, pvc.Namespace, pvc.Name, csi_util.HigherPerformanceOption) pvcJig.CheckISCSIQueueDepthOnNode(f.Namespace.Name, podName) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIHigh) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) Context("[cloudprovider][storage][csi][perf][paravirtualized]", func() { It("Create CSI block volume with Performance Level as Low Cost", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-perf-paravirtual-lowcost") - scName := f.CreateStorageClassOrFail(framework.ClassOCILowCost, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized, csi_util.VpusPerGB: "0"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -305,12 +305,12 @@ var _ = Describe("CSI Volume Performance Level", func() { pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, pvc.Namespace, pvc.Name, csi_util.LowCostPerformanceOption) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCILowCost) + _ = f.DeleteStorageClass(f.Namespace.Name) }) It("Create CSI block volume with no Performance Level and verify default", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-perf-paravirtual-balanced") - scName := f.CreateStorageClassOrFail(framework.ClassOCIBalanced, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized, csi_util.VpusPerGB: "10"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -320,13 +320,13 @@ var _ = Describe("CSI Volume Performance Level", func() { pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, pvc.Namespace, pvc.Name, csi_util.BalancedPerformanceOption) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIBalanced) + _ = f.DeleteStorageClass(f.Namespace.Name) }) It("Create CSI block volume with Performance Level as High", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-perf-paravirtual-high") - scName := f.CreateStorageClassOrFail(framework.ClassOCIHigh, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized, csi_util.VpusPerGB: "20"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -335,7 +335,7 @@ var _ = Describe("CSI Volume Performance Level", func() { time.Sleep(60 * time.Second) //waiting for pod to up and running pvcJig.CheckVolumePerformanceLevel(f.BlockStorageClient, pvc.Namespace, pvc.Name, csi_util.HigherPerformanceOption) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIHigh) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) @@ -343,7 +343,7 @@ var _ = Describe("CSI Volume Performance Level", func() { It("High Performance Static Provisioning CSI", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-perf-static-high") - scName := f.CreateStorageClassOrFail(framework.ClassOCIHigh, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "20"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) @@ -366,7 +366,7 @@ var _ = Describe("CSI Volume Performance Level", func() { pvcJig.CheckVolumeCapacity("50Gi", pvc.Name, f.Namespace.Name) pvcJig.CheckISCSIQueueDepthOnNode(pvc.Namespace, podName) f.VolumeIds = append(f.VolumeIds, volumeId) - _ = f.DeleteStorageClass(framework.ClassOCIHigh) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) }) @@ -380,102 +380,78 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { if compartmentId == "" { framework.Failf("Compartment Id undefined.") } + pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-uhp") + ctx := context.Background() - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-iscsi-uhp") - - scName := f.CreateStorageClassOrFail(framework.ClassOCIUHP, "blockvolume.csi.oraclecloud.com", + By("Running test: Create ISCSI CSI block volume with UHP Performance Level") + scName := f.CreateStorageClassOrFail(framework.ClassOCIUHP+"-1", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "30"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - pvcJig.NewPodForCSI("uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) - - ctx := context.Background() + podName := pvcJig.NewPodForCSI("uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIUHP) - }) - It("Create Paravirtualized CSI block volume with UHP Performance Level", func() { - checkUhpPrerequisites(f) - compartmentId := f.GetCompartmentId(*setupF) - if compartmentId == "" { - framework.Failf("Compartment Id undefined.") + err := pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName); if err != nil { + framework.Failf("Error deleting pod: %v", err) } + _ = f.DeleteStorageClass(scName) + By("Completed test: Create ISCSI CSI block volume with UHP Performance Level") - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-paravirtualized-uhp") - - scName := f.CreateStorageClassOrFail(framework.ClassOCIUHP, "blockvolume.csi.oraclecloud.com", + By("Running test: Create Paravirtualized CSI block volume with UHP Performance Level") + scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP+"-2", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized, csi_util.VpusPerGB: "30"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) - pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - pvcJig.NewPodForCSI("uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) - - ctx := context.Background() + pvc = pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + podName = pvcJig.NewPodForCSI("uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIUHP) - }) - It("Create CSI block volume with UHP Performance Level and xfs file system", func() { - checkUhpPrerequisites(f) - compartmentId := f.GetCompartmentId(*setupF) - if compartmentId == "" { - framework.Failf("Compartment Id undefined.") + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName); if err != nil { + framework.Failf("Error deleting pod: %v", err) } + _ = f.DeleteStorageClass(scName) + By("Completed test: Create Paravirtualized CSI block volume with UHP Performance Level") - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-uhp-xfs") - - scName := f.CreateStorageClassOrFail(framework.ClassOCIUHP, "blockvolume.csi.oraclecloud.com", + By("Running test: Create CSI block volume with UHP Performance Level and xfs file system") + scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP+"-3", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized, csi_util.VpusPerGB: "30", framework.FstypeKey: "xfs"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) - pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - pvcJig.NewPodForCSI("uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) - - ctx := context.Background() + pvc = pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + podName = pvcJig.NewPodForCSI("uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIUHP) - }) - It("Static Provisioning CSI UHP", func() { - checkUhpPrerequisites(f) - compartmentId := f.GetCompartmentId(*setupF) - if compartmentId == "" { - framework.Failf("Compartment Id undefined.") + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName); if err != nil { + framework.Failf("Error deleting pod: %v", err) } + _ = f.DeleteStorageClass(scName) + By("Completed test: Create CSI block volume with UHP Performance Level and xfs file system") - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests-pvc-with-static-uhp") - - scName := f.CreateStorageClassOrFail(framework.ClassOCIUHP, "blockvolume.csi.oraclecloud.com", + By("Running test: Static Provisioning CSI UHP") + scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP + "-4", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized, csi_util.VpusPerGB: "30"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc, volumeId := pvcJig.CreateAndAwaitStaticPVCOrFailCSI(f.BlockStorageClient, f.Namespace.Name, framework.MinVolumeBlock, 30, scName, setupF.AdLocation, compartmentId, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - pvcJig.NewPodForCSI("app4", f.Namespace.Name, pvc.Name, setupF.AdLabel) - - ctx := context.Background() + podName = pvcJig.NewPodForCSI("app4", f.Namespace.Name, pvc.Name, setupF.AdLabel) pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) pvcJig.CheckVolumeCapacity("50Gi", pvc.Name, f.Namespace.Name) - f.VolumeIds = append(f.VolumeIds, volumeId) - }) - It("Basic Pod Delete UHP", func() { - checkUhpPrerequisites(f) - compartmentId := f.GetCompartmentId(*setupF) - if compartmentId == "" { - framework.Failf("Compartment Id undefined.") + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName); if err != nil { + framework.Failf("Error deleting pod: %v", err) } + f.VolumeIds = append(f.VolumeIds, volumeId) + _ = f.DeleteStorageClass(scName) + By("Completed test: Static Provisioning CSI UHP") - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-iscsi-uhp") - - scName := f.CreateStorageClassOrFail(framework.ClassOCIUHP, "blockvolume.csi.oraclecloud.com", + By("Running test: Basic Pod Delete UHP") + scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP + "-5", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "30"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) - pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - podName := pvcJig.NewPodForCSI("uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) - - ctx := context.Background() + pvc = pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + podName = pvcJig.NewPodForCSI("uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) volumeName := pvcJig.GetVolumeNameFromPVC(pvc.Name, f.Namespace.Name) @@ -483,7 +459,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { framework.Logf("Persistent volume name : %s", volumeName) pvcJig.DeleteAndAwaitPodOrFail(f.Namespace.Name, podName) - err := pvcJig.DeletePersistentVolumeClaim(f.Namespace.Name, pvc.Name) + err = pvcJig.DeletePersistentVolumeClaim(f.Namespace.Name, pvc.Name) if err != nil { framework.Failf("Failed to delete persistent volume claim: %s", err.Error()) } @@ -491,35 +467,27 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { if err != nil { framework.Failf("Persistent volume did not terminate : %s", err.Error()) } + _ = f.DeleteStorageClass(scName) + By("Completed test: Basic Pod Delete UHP") - _ = f.DeleteStorageClass(framework.ClassOCIUHP) - }) - It("Create UHP PVC and POD for CSI with CMEK and in-transit encryption", func() { - checkUhpPrerequisites(f) - compartmentId := f.GetCompartmentId(*setupF) - if compartmentId == "" { - framework.Failf("Compartment Id undefined.") - } - - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-cmek-iscsi-in-transit-e2e-tests-uhp") + By("Running test: Create UHP PVC and POD for CSI with CMEK and in-transit encryption") scParameter := map[string]string{ framework.KmsKey: setupF.CMEKKMSKey, framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "30", } - scName := f.CreateStorageClassOrFail(framework.ClassOCIKMS, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) - pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - podName := pvcJig.NewPodForCSI("app1", f.Namespace.Name, pvc.Name, setupF.AdLabel) - - ctx := context.Background() + scName = f.CreateStorageClassOrFail(framework.ClassOCIKMS + "-1", "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + pvc = pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + podName = pvcJig.NewPodForCSI("app1", f.Namespace.Name, pvc.Name, setupF.AdLabel) pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) pvcJig.CheckCMEKKey(f.Client.BlockStorage(), pvc.Name, f.Namespace.Name, setupF.CMEKKMSKey) pvcJig.CheckAttachmentTypeAndEncryptionType(f.Client.Compute(), pvc.Name, f.Namespace.Name, podName, framework.AttachmentTypeISCSI) + pvcJig.DeleteAndAwaitPodOrFail(f.Namespace.Name, podName) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIKMS) - }) - It("Create UHP and lower performance block volumes on same node", func() { - checkUhpPrerequisites(f) + _ = f.DeleteStorageClass(scName) + By("Completed test: Create UHP PVC and POD for CSI with CMEK and in-transit encryption") + + By("Running test: Create UHP and lower performance block volumes on same node") sc1params := map[string]string{ framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "30", @@ -528,47 +496,36 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { framework.AttachmentType: framework.AttachmentTypeISCSI, } testTwoPVCSetup(f, sc1params, sc2params) - }) - It("Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for iSCSI UHP volume", func() { - checkUhpPrerequisites(f) - var size = "100Gi" - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-pvc-expand-to-100gi-iscsi-uhp") + By("Completed test: Create UHP and lower performance block volumes on same node") - scName := f.CreateStorageClassOrFail(framework.ClassOCIUHP, "blockvolume.csi.oraclecloud.com", + By("Running test: Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for iSCSI UHP volume") + pvcJig.Name = "csi-uhp-pvc-expand-to-100gi" + var size = "100Gi" + scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP + "-6", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "30"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) - pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - podName := pvcJig.NewPodForCSI("expanded-uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) - + pvc = pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + podName = pvcJig.NewPodForCSI("expanded-uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) time.Sleep(60 * time.Second) //waiting for pod to up and running - expandedPvc := pvcJig.UpdateAndAwaitPVCOrFailCSI(pvc, pvc.Namespace, size, nil) - - time.Sleep(120 * time.Second) //waiting for expanded pvc to be functional - pvcJig.CheckVolumeCapacity("100Gi", expandedPvc.Name, f.Namespace.Name) pvcJig.CheckFileExists(f.Namespace.Name, podName, "/data", "testdata.txt") pvcJig.CheckFileCorruption(f.Namespace.Name, podName, "/data", "testdata.txt") pvcJig.CheckExpandedVolumeReadWrite(f.Namespace.Name, podName) pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podName, "99G") + pvcJig.DeleteAndAwaitPodOrFail(f.Namespace.Name, podName) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIUHP) - }) - It("Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for Paravirtualized UHP volume", func() { - checkUhpPrerequisites(f) - var size = "100Gi" - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-pvc-expand-to-100gi-iscsi-uhp") + _ = f.DeleteStorageClass(scName) + By("Completed test: Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for iSCSI UHP volume") - scName := f.CreateStorageClassOrFail(framework.ClassOCIUHP, "blockvolume.csi.oraclecloud.com", + By("Running test: Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for Paravirtualized UHP volume") + scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP + "-7", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized, csi_util.VpusPerGB: "30"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) - pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - podName := pvcJig.NewPodForCSI("expanded-uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) - + pvc = pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) + podName = pvcJig.NewPodForCSI("expanded-uhp-pvc-app", f.Namespace.Name, pvc.Name, setupF.AdLabel) time.Sleep(60 * time.Second) //waiting for pod to up and running - - expandedPvc := pvcJig.UpdateAndAwaitPVCOrFailCSI(pvc, pvc.Namespace, size, nil) - + expandedPvc = pvcJig.UpdateAndAwaitPVCOrFailCSI(pvc, pvc.Namespace, size, nil) time.Sleep(120 * time.Second) //waiting for expanded pvc to be functional pvcJig.CheckVolumeCapacity("100Gi", expandedPvc.Name, f.Namespace.Name) @@ -577,12 +534,13 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { pvcJig.CheckExpandedVolumeReadWrite(f.Namespace.Name, podName) pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podName, "99G") f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIUHP) + _ = f.DeleteStorageClass(scName) + By("Completed test: Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for Paravirtualized UHP volume") }) }) }) -var _ = Describe("CSI UHP Volumes addition e2es", func() { +var _ = Describe("CSI UHP Volumes additional e2es", func() { f := framework.NewBackupFramework("csi-uhp-additional") Context("[uhp]", func() { It("Create UHP paravirtual volume and lower performance ISCSI block volumes on same node", func() { @@ -633,7 +591,7 @@ var _ = Describe("CSI Volume Expansion Paravirtualized", func() { framework.KmsKey: setupF.CMEKKMSKey, framework.AttachmentType: framework.AttachmentTypeParavirtualized, } - scName := f.CreateStorageClassOrFail(framework.ClassOCICSIExpand, + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -651,7 +609,7 @@ var _ = Describe("CSI Volume Expansion Paravirtualized", func() { pvcJig.CheckExpandedVolumeReadWrite(f.Namespace.Name, podName) pvcJig.CheckUsableVolumeSizeInsidePod(f.Namespace.Name, podName, "99G") f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCICSIExpand) + _ = f.DeleteStorageClass(f.Namespace.Name) }) }) }) @@ -662,7 +620,7 @@ var _ = Describe("CSI Static Volume Creation", func() { It("Static Provisioning CSI", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests-pvc-with-static") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) compartmentId := "" @@ -709,13 +667,13 @@ func TestCMEKAttachmentTypeAndEncryptionType(f *framework.CloudProviderFramework framework.KmsKey: setupF.CMEKKMSKey, framework.AttachmentType: expectedAttachmentType, } - scName := f.CreateStorageClassOrFail(framework.ClassOCIKMS, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) podName := pvcJig.NewPodForCSI("app1", f.Namespace.Name, pvc.Name, setupF.AdLabel) pvcJig.CheckCMEKKey(f.Client.BlockStorage(), pvc.Name, f.Namespace.Name, setupF.CMEKKMSKey) pvcJig.CheckAttachmentTypeAndEncryptionType(f.Client.Compute(), pvc.Name, f.Namespace.Name, podName, expectedAttachmentType) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - _ = f.DeleteStorageClass(framework.ClassOCIKMS) + _ = f.DeleteStorageClass(f.Namespace.Name) } var _ = Describe("CSI Volume Capabilites", func() { @@ -724,12 +682,12 @@ var _ = Describe("CSI Volume Capabilites", func() { It("Create volume fails with volumeMode set to block", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeBlock, v1.ReadWriteOnce, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) pvcJig.NewPodForCSIWithoutWait("app1", f.Namespace.Name, pvc.Name, setupF.AdLabel) pvcObject := pvcJig.GetPVCByName(pvc.Name, f.Namespace.Name) - err := pvcJig.WaitTimeoutForPVCBound(pvcObject.Name, f.Namespace.Name, 10*time.Minute) + err := pvcJig.WaitTimeoutForPVCBound(pvcObject.Name, f.Namespace.Name, 8*time.Minute) if err == nil { framework.Failf("PVC volume mode is not in pending status") } @@ -741,12 +699,12 @@ var _ = Describe("CSI Volume Capabilites", func() { It("Create volume fails with accessMode set to ReadWriteMany", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests") - scName := f.CreateStorageClassOrFail(framework.ClassOCICSI, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteMany, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) pvcJig.NewPodForCSIWithoutWait("app1", f.Namespace.Name, pvc.Name, setupF.AdLabel) pvcObject := pvcJig.GetPVCByName(pvc.Name, f.Namespace.Name) - err := pvcJig.WaitTimeoutForPVCBound(pvcObject.Name, f.Namespace.Name, 10*time.Minute) + err := pvcJig.WaitTimeoutForPVCBound(pvcObject.Name, f.Namespace.Name, 8*time.Minute) if err == nil { framework.Failf("PVC volume mode is not in pending status") } @@ -763,11 +721,11 @@ var _ = Describe("CSI Volume Creation - Immediate Volume Binding", func() { It("Create PVC without pod and wait to be bound.", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-immediate-bind") - scName := f.CreateStorageClassOrFail(framework.ClassCustom, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "Immediate", true, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "Immediate", true, "Delete", nil) pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimBound) - err := f.DeleteStorageClass(framework.ClassCustom) + err := f.DeleteStorageClass(f.Namespace.Name) if err != nil { - Fail(fmt.Sprintf("deleting storage class failed %s", framework.ClassCustom)) + Fail(fmt.Sprintf("deleting storage class failed %s", f.Namespace.Name)) } }) }) @@ -801,8 +759,11 @@ func testTwoPVCSetup(f *framework.CloudProviderFramework, storageclass1params ma storageclass2params, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvcTwo := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, lowPerfScName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) - pvcJig.NewPodWithLabels("pvc-two-app", f.Namespace.Name, pvcTwo.Name, nodeLabels) + podName2 := pvcJig.NewPodWithLabels("pvc-two-app", f.Namespace.Name, pvcTwo.Name, nodeLabels) + + pvcJig.DeleteAndAwaitPodOrFail(f.Namespace.Name, podName) + pvcJig.DeleteAndAwaitPodOrFail(f.Namespace.Name, podName2) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) f.VolumeIds = append(f.VolumeIds, pvcTwo.Spec.VolumeName) _ = f.DeleteStorageClass("storage-class-one") diff --git a/test/e2e/cloud-provider-oci/fss_dynamic.go b/test/e2e/cloud-provider-oci/fss_dynamic.go index da2c922c3..0396d7383 100644 --- a/test/e2e/cloud-provider-oci/fss_dynamic.go +++ b/test/e2e/cloud-provider-oci/fss_dynamic.go @@ -36,7 +36,7 @@ var _ = Describe("Dynamic FSS test in cluster compartment", func() { It("Basic Create PVC and POD for CSI-FSS", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) @@ -45,7 +45,7 @@ var _ = Describe("Dynamic FSS test in cluster compartment", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["exportPath"] = "/csi-fss-e2e-export-path-mt-exist-in-compartment" - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) @@ -55,7 +55,7 @@ var _ = Describe("Dynamic FSS test in cluster compartment", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["exportPath"] = "/csi-fss-e2e-export-path-export-options-mt-exist-in-compartment" scParameters["exportOptions"] = defaultExportOptionsJsonString - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) @@ -64,7 +64,7 @@ var _ = Describe("Dynamic FSS test in cluster compartment", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["kmsKey"] = setupF.CMEKKMSKey - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) @@ -74,55 +74,95 @@ var _ = Describe("Dynamic FSS test in cluster compartment", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["encryptInTransit"] = "true" - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, true, []string{}) }) }) Context("[cloudprovider][storage][csi][fss][mtcreate]", func() { - It("Basic Create PVC and POD for CSI-FSS with new mount-target creation", func() { - scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid} - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) - f.StorageClasses = append(f.StorageClasses, scName) - pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) - pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) - }) - It("Create PVC and POD for CSI-FSS with exportPath and with new mount-target creation", func() { - scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid} + It("Dynamic FSS Mount Target Creation tests", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scParameters["exportPath"] = "/csi-fss-e2e-export-path-mt-create-in-compartment" - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) - f.StorageClasses = append(f.StorageClasses, scName) - pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) - pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) - }) - It("Create PVC and POD for CSI-FSS with exportPath and exportOptions and with new mount-target creation", func() { - scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid} - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scParameters["exportPath"] = "/csi-fss-e2e-export-path-export-options-mt-create-in-compartment" - scParameters["exportOptions"] = defaultExportOptionsJsonString - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) - f.StorageClasses = append(f.StorageClasses, scName) - pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) - pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) - }) - It("Create PVC and POD for CSI-FSS with kmsKey and with new mount-target creation", func() { + + By("Running test: Basic Create PVC and POD for CSI-FSS with new mount-target creation") scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid} - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scParameters["kmsKey"] = setupF.CMEKKMSKey - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) - pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) + writePod, readPod := pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) + err := pvcJig.DeleteAndAwaitPod(f.Namespace.Name, writePod); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, readPod); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPVC(f.Namespace.Name, pvc.Name); if err != nil { + framework.Failf("Error deleting PVC: %v", err) + } + By("Completed test: Basic Create PVC and POD for CSI-FSS with new mount-target creation") + + By("Running test: Create PVC and POD for CSI-FSS with exportPath and with new mount-target creation") + scParameters2 := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid} + scParameters2["exportPath"] = "/csi-fss-e2e-export-path-mt-create-in-compartment" + scName2 := f.CreateStorageClassOrFail(f.Namespace.Name+"-2", framework.FssProvisionerType, scParameters2, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + f.StorageClasses = append(f.StorageClasses, scName2) + pvc2 := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName2, v1.ClaimPending, nil) + writePod2, readPod2 := pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc2.Name, false, []string{}) + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, writePod2); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, readPod2); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPVC(f.Namespace.Name, pvc2.Name); if err != nil { + framework.Failf("Error deleting PVC: %v", err) + } + By("Completed test: Create PVC and POD for CSI-FSS with exportPath and with new mount-target creation") + + By("Running test: Create PVC and POD for CSI-FSS with exportPath and exportOptions and with new mount-target creation") + scParameters3 := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid} + scParameters3["exportPath"] = "/csi-fss-e2e-export-path-export-options-mt-create-in-compartment" + scParameters3["exportOptions"] = defaultExportOptionsJsonString + scName3 := f.CreateStorageClassOrFail(f.Namespace.Name + "-3", framework.FssProvisionerType, scParameters3, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + f.StorageClasses = append(f.StorageClasses, scName3) + pvc3 := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName3, v1.ClaimPending, nil) + writePod3, readPod3 := pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc3.Name, false, []string{}) + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, writePod3); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, readPod3); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPVC(f.Namespace.Name, pvc3.Name); if err != nil { + framework.Failf("Error deleting PVC: %v", err) + } + By("Completed test: Create PVC and POD for CSI-FSS with exportPath and exportOptions and with new mount-target creation") + + By("Running test: Create PVC and POD for CSI-FSS with kmsKey and with new mount-target creation") + scParameters4 := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid} + scParameters4["kmsKey"] = setupF.CMEKKMSKey + scName4 := f.CreateStorageClassOrFail(f.Namespace.Name + "-4", framework.FssProvisionerType, scParameters4, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + f.StorageClasses = append(f.StorageClasses, scName4) + pvc4 := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName4, v1.ClaimPending, nil) + writePod4, readPod4 := pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc4.Name, false, []string{}) + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, writePod4); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, readPod4); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPVC(f.Namespace.Name, pvc4.Name); if err != nil { + framework.Failf("Error deleting PVC: %v", err) + } + By("Completed test: Create PVC and POD for CSI-FSS with kmsKey and with new mount-target creation") }) + // TODO: Think of parallelising this test when there is a way to label the nodes as part of the test suite to run this test It("Create PVC and POD for CSI-FSS with in-transit encryption and with new mount-target creation", func() { checkNodeAvailability(f) scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["encryptInTransit"] = "true" - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, true, []string{}) @@ -131,13 +171,14 @@ var _ = Describe("Dynamic FSS test in cluster compartment", func() { }) var _ = Describe("Dynamic FSS test in different compartment", func() { + f := framework.NewDefaultFramework("fss-dynamic") Context("[cloudprovider][storage][csi][fss][mtexist]", func() { It("Basic Create PVC and POD for CSI-FSS with file-system compartment set", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) @@ -146,7 +187,7 @@ var _ = Describe("Dynamic FSS test in different compartment", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["exportPath"] = "/csi-fss-e2e-export-path-mt-exist-diff-compartment" - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) @@ -156,7 +197,7 @@ var _ = Describe("Dynamic FSS test in different compartment", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["exportPath"] = "/csi-fss-e2e-export-path-export-options-mt-exist-diff-compartment" scParameters["exportOptions"] = defaultExportOptionsJsonString - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) @@ -165,7 +206,7 @@ var _ = Describe("Dynamic FSS test in different compartment", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["kmsKey"] = setupF.CMEKKMSKey - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) @@ -175,55 +216,95 @@ var _ = Describe("Dynamic FSS test in different compartment", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["encryptInTransit"] = "true" - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, true, []string{}) }) }) Context("[cloudprovider][storage][csi][fss][mtcreate]", func() { - It("Basic Create PVC and POD for CSI-FSS with file-system compartment set and with new mount-target creation", func() { - scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) - f.StorageClasses = append(f.StorageClasses, scName) - pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) - pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) - }) - It("Create PVC and POD for CSI-FSS with exportPath and with file-system compartment set and with new mount-target creation", func() { - scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} + It("Dynamic FSS Mount Target Creation tests", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scParameters["exportPath"] = "/csi-fss-e2e-export-path-mt-create-diff-compartment" - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) - f.StorageClasses = append(f.StorageClasses, scName) - pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) - pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) - }) - It("Create PVC and POD for CSI-FSS with exportPath and exportOptions and with file-system compartment set and with new mount-target creation", func() { + + By("Running test: Basic Create PVC and POD for CSI-FSS with file-system compartment set and with new mount-target creation") scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scParameters["exportPath"] = "/csi-fss-e2e-export-path-export-options-mt-create-diff-compartment" - scParameters["exportOptions"] = defaultExportOptionsJsonString - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) - pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) - }) - It("Create PVC and POD for CSI-FSS with kmsKey and with file-system compartment set and with new mount-target creation", func() { - scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} - pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scParameters["kmsKey"] = setupF.CMEKKMSKey - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) - f.StorageClasses = append(f.StorageClasses, scName) - pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) - pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) + writePod, readPod := pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, false, []string{}) + err := pvcJig.DeleteAndAwaitPod(f.Namespace.Name, writePod); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, readPod); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPVC(f.Namespace.Name, pvc.Name); if err != nil { + framework.Failf("Error deleting PVC: %v", err) + } + By("Completed test: Basic Create PVC and POD for CSI-FSS with file-system compartment set and with new mount-target creation") + + By("Running test: Create PVC and POD for CSI-FSS with exportPath and with file-system compartment set and with new mount-target creation") + scParameters2 := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} + scParameters2["exportPath"] = "/csi-fss-e2e-export-path-mt-create-diff-compartment" + scName2 := f.CreateStorageClassOrFail(f.Namespace.Name + "-2", framework.FssProvisionerType, scParameters2, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + f.StorageClasses = append(f.StorageClasses, scName2) + pvc2 := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName2, v1.ClaimPending, nil) + writePod2, readPod2 := pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc2.Name, false, []string{}) + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, writePod2); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, readPod2); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPVC(f.Namespace.Name, pvc2.Name); if err != nil { + framework.Failf("Error deleting PVC: %v", err) + } + By("Completed test: Create PVC and POD for CSI-FSS with exportPath and with file-system compartment set and with new mount-target creation") + + By("Running test: Create PVC and POD for CSI-FSS with exportPath and exportOptions and with file-system compartment set and with new mount-target creation") + scParameters3 := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} + scParameters3["exportPath"] = "/csi-fss-e2e-export-path-export-options-mt-create-diff-compartment" + scParameters3["exportOptions"] = defaultExportOptionsJsonString + scName3 := f.CreateStorageClassOrFail(f.Namespace.Name + "-3", framework.FssProvisionerType, scParameters3, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + f.StorageClasses = append(f.StorageClasses, scName3) + pvc3 := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName3, v1.ClaimPending, nil) + writePod3, readPod3 := pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc3.Name, false, []string{}) + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, writePod3); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, readPod3); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPVC(f.Namespace.Name, pvc3.Name); if err != nil { + framework.Failf("Error deleting PVC: %v", err) + } + By("Completed test: Create PVC and POD for CSI-FSS with exportPath and exportOptions and with file-system compartment set and with new mount-target creation") + + By("Running test: Create PVC and POD for CSI-FSS with kmsKey and with file-system compartment set and with new mount-target creation") + scParameters4 := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} + scParameters4["kmsKey"] = setupF.CMEKKMSKey + scName4 := f.CreateStorageClassOrFail(f.Namespace.Name + "-4", framework.FssProvisionerType, scParameters4, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + f.StorageClasses = append(f.StorageClasses, scName4) + pvc4 := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName4, v1.ClaimPending, nil) + writePod4, readPod4 := pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc4.Name, false, []string{}) + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, writePod4); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, readPod4); if err != nil { + framework.Failf("Error deleting pod: %v", err) + } + err = pvcJig.DeleteAndAwaitPVC(f.Namespace.Name, pvc4.Name); if err != nil { + framework.Failf("Error deleting PVC: %v", err) + } + By("Completed test: Create PVC and POD for CSI-FSS with kmsKey and with file-system compartment set and with new mount-target creation") }) + // TODO: Think of parallelising this test when there is a way to label the nodes as part of the test suite to run this test It("Create PVC and POD for CSI-FSS with in-transit encryption", func() { checkNodeAvailability(f) scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetSubnetOcid": setupF.MntTargetSubnetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["encryptInTransit"] = "true" - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvc := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvc.Name, true, []string{}) @@ -238,7 +319,7 @@ var _ = Describe("Dynamic FSS deletion test", func() { It("Basic Delete POD and PVC for CSI-FSS", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvcObject := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) By("Creating Pod that can create and write to the file") @@ -263,7 +344,7 @@ var _ = Describe("Dynamic FSS deletion test", func() { It("Test PV not deleted when reclaim policy is Retain", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Retain", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Retain", nil) f.StorageClasses = append(f.StorageClasses, scName) pvcObject := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) By("Creating Pod that can create and write to the file") @@ -294,7 +375,7 @@ var _ = Describe("Dynamic FSS deletion test", func() { It("Test export is deleted in cluster compartment when export path is not set", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvcObject := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) By("Creating Pod that can create and write to the file") @@ -335,7 +416,7 @@ var _ = Describe("Dynamic FSS deletion test", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["exportPath"] = "/csi-fss-e2e-delete-export-mt-exist-in-compartment" - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvcObject := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) By("Creating Pod that can create and write to the file") @@ -375,7 +456,7 @@ var _ = Describe("Dynamic FSS deletion test", func() { It("Test export is deleted in different compartment when export path is not set", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvcObject := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) By("Creating Pod that can create and write to the file") @@ -416,7 +497,7 @@ var _ = Describe("Dynamic FSS deletion test", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid, "compartmentOcid": setupF.MntTargetCompartmentOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") scParameters["exportPath"] = "/csi-fss-e2e-delete-export-mt-exist-diff-compartment" - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvcObject := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimPending, nil) By("Creating Pod that can create and write to the file") @@ -479,7 +560,7 @@ var _ = Describe("Dynamic FSS test with immediate binding mode", func() { It("Basic Dynamic FSS test with immediate binding mode", func() { scParameters := map[string]string{"availabilityDomain": setupF.AdLabel, "mountTargetOcid": setupF.MntTargetOcid} pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-fss-dyn-e2e-test") - scName := f.CreateStorageClassOrFail(framework.ClassFssDynamic, framework.FssProvisionerType, scParameters, pvcJig.Labels, "Immediate", false, "Delete", nil) + scName := f.CreateStorageClassOrFail(f.Namespace.Name, framework.FssProvisionerType, scParameters, pvcJig.Labels, "Immediate", false, "Delete", nil) f.StorageClasses = append(f.StorageClasses, scName) pvcObject := pvcJig.CreateAndAwaitPVCOrFailDynamicFSS(f.Namespace.Name, "50Gi", scName, v1.ClaimBound, nil) pvcJig.CheckSinglePodReadWrite(f.Namespace.Name, pvcObject.Name, false, []string{}) diff --git a/test/e2e/cloud-provider-oci/load_balancer.go b/test/e2e/cloud-provider-oci/load_balancer.go index 07bedd71c..556da9836 100644 --- a/test/e2e/cloud-provider-oci/load_balancer.go +++ b/test/e2e/cloud-provider-oci/load_balancer.go @@ -16,9 +16,10 @@ package e2e import ( "context" + "encoding/json" "fmt" - "github.com/oracle/oci-go-sdk/v65/core" "net" + "reflect" "strconv" "strings" @@ -26,6 +27,8 @@ import ( . "github.com/onsi/gomega" cloudprovider "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci" sharedfw "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" + "github.com/oracle/oci-go-sdk/v65/containerengine" + "github.com/oracle/oci-go-sdk/v65/core" "go.uber.org/zap" v1 "k8s.io/api/core/v1" @@ -1357,7 +1360,9 @@ var _ = Describe("LB Properties", func() { "lb", map[string]string{ cloudprovider.ServiceAnnotationLoadBalancerInternal: "true", - cloudprovider.ServiceAnnotationLoadBalancerShape: "10Mbps", + cloudprovider.ServiceAnnotationLoadBalancerShape: "flexible", + cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMin: "10", + cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMax: "10", }, cloudprovider.ServiceAnnotationLoadBalancerNetworkSecurityGroups, }, @@ -1485,7 +1490,9 @@ var _ = Describe("LB Properties", func() { { "lb", map[string]string{ - cloudprovider.ServiceAnnotationLoadBalancerShape: "10Mbps", + cloudprovider.ServiceAnnotationLoadBalancerShape: "flexible", + cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMin: "10", + cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMax: "10", cloudprovider.ServiceAnnotationLoadBalancerPolicy: cloudprovider.IPHashLoadBalancerPolicy, }, map[string]string{ @@ -1595,7 +1602,9 @@ var _ = Describe("LB Properties", func() { { "lb", map[string]string{ - cloudprovider.ServiceAnnotationLoadBalancerShape: "10Mbps", + cloudprovider.ServiceAnnotationLoadBalancerShape: "flexible", + cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMin: "10", + cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMax: "10", }, }, { diff --git a/test/e2e/cloud-provider-oci/setup.go b/test/e2e/cloud-provider-oci/setup.go index 07b074f8f..a12060e35 100644 --- a/test/e2e/cloud-provider-oci/setup.go +++ b/test/e2e/cloud-provider-oci/setup.go @@ -1,22 +1,12 @@ -// Copyright 2020 Oracle and/or its affiliates. All rights reserved. -// -// 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. - package e2e import ( + "time" + "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" sharedfw "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" + oke "github.com/oracle/oci-go-sdk/v65/containerengine" ) var setupF *sharedfw.Framework @@ -28,9 +18,12 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte { sharedfw.Logf("CloudProviderFramework Setup") sharedfw.Logf("Running tests with existing cluster.") return nil -}, func(data []byte) {}) + }, func(data []byte) { + setupF = sharedfw.New() + }, +) -var _ = ginkgo.SynchronizedAfterSuite(func() { +var _ = ginkgo.SynchronizedAfterSuite(func() {}, func() { sharedfw.Logf("Running AfterSuite actions on all node") sharedfw.RunCleanupActions() -}, func() {}) +}) diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index b99087304..984885517 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -15,13 +15,26 @@ package framework import ( + "context" "flag" "fmt" + "io/ioutil" "math/rand" + "os" + "strconv" "strings" "time" imageutils "k8s.io/kubernetes/test/utils/image" + + "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" + + . "github.com/onsi/gomega" + "github.com/oracle/oci-go-sdk/v65/common" + oke "github.com/oracle/oci-go-sdk/v65/containerengine" + "github.com/oracle/oci-go-sdk/v65/core" + "github.com/oracle/oci-go-sdk/v65/identity" + "gopkg.in/yaml.v2" ) const ( @@ -81,7 +94,7 @@ var ( busyBoxImage string // Image for busyBoxImage centos string // Image for centos imagePullRepo string // Repo to pull images from. Will pull public images if not specified. - cmekKMSKey string //KMS key for CMEK testing + cmekKMSKey string // KMS key for CMEK testing nsgOCIDS string // Testing CCM NSG feature backendNsgIds string // Testing Rule management Backend NSG feature reservedIP string // Testing public reserved IP feature @@ -89,6 +102,7 @@ var ( volumeHandle string // The FSS mount volume handle staticSnapshotCompartmentOCID string // Compartment ID for cross compartment snapshot test runUhpE2E bool // Whether to run UHP E2Es, requires Volume Management Plugin enabled on the node and 16+ cores (check blockvolumeperformance public doc for the exact requirements) + enableParallelRun bool ) func init() { @@ -119,6 +133,7 @@ func init() { flag.StringVar(&staticSnapshotCompartmentOCID, "static-snapshot-compartment-id", "", "Compartment ID for cross compartment snapshot test") flag.BoolVar(&runUhpE2E, "run-uhp-e2e", false, "Run UHP E2Es as well") + flag.BoolVar(&enableParallelRun, "enable-parallel-run", true, "Enables parallel running of test suite") } // Framework is the context of the text execution. diff --git a/test/e2e/framework/pod_util.go b/test/e2e/framework/pod_util.go index f37f75a49..0fa5c0820 100644 --- a/test/e2e/framework/pod_util.go +++ b/test/e2e/framework/pod_util.go @@ -211,12 +211,13 @@ func (j *PVCTestJig) CheckUsableVolumeSizeInsidePod(namespace string, podName st return false, nil } if strings.Fields(strings.TrimSpace(stdout))[1] != capacity { + Logf("Expected capacity: %v, got capacity: %v", capacity, strings.Fields(strings.TrimSpace(stdout))[1]) return false, nil } else { return true, nil } }); pollErr != nil { - Failf("Write Test failed in pod '%v' after expanding pvc", podName) + Failf("Check Usable Volume Size Inside Pod Test failed in pod '%v' after expanding pvc", podName) } } diff --git a/test/e2e/framework/pvc_util.go b/test/e2e/framework/pvc_util.go index d703ffe83..41b7b229b 100644 --- a/test/e2e/framework/pvc_util.go +++ b/test/e2e/framework/pvc_util.go @@ -907,7 +907,7 @@ func (j *PVCTestJig) NewPodForCSIFSSWrite(name string, namespace string, claimNa // NewPodForCSIFSSRead returns the CSI Fss read pod template for this jig, // creates the Pod. Attaches PVC to the Pod which is created by CSI Fss. It does not have a node selector unlike the default pod template. // It does a grep on the file with string matchString and goes to completion with an exit code either 0 or 1. -func (j *PVCTestJig) NewPodForCSIFSSRead(matchString string, namespace string, claimName string, fileName string, encryptionEnabled bool) { +func (j *PVCTestJig) NewPodForCSIFSSRead(matchString string, namespace string, claimName string, fileName string, encryptionEnabled bool) string { By("Creating a pod with the claiming PVC created by CSI") nodeSelectorMap := make(map[string]string) @@ -963,6 +963,8 @@ func (j *PVCTestJig) NewPodForCSIFSSRead(matchString string, namespace string, c Failf("Pod %q failed: %v", pod.Name, err) } zap.S().With(pod.Namespace).With(pod.Name).Info("CSI Fss read POD is created.") + + return pod.Name } // WaitForPVCPhase waits for a PersistentVolumeClaim to be in a specific phase or until timeout occurs, whichever comes first. @@ -1275,7 +1277,7 @@ func (j *PVCTestJig) CheckEncryptionType(namespace, podName string) { } } -func (j *PVCTestJig) CheckSinglePodReadWrite(namespace string, pvcName string, checkEncryption bool, expectedMountOptions []string) { +func (j *PVCTestJig) CheckSinglePodReadWrite(namespace string, pvcName string, checkEncryption bool, expectedMountOptions []string) (string, string) { By("Creating Pod that can create and write to the file") uid := uuid.NewUUID() @@ -1295,8 +1297,9 @@ func (j *PVCTestJig) CheckSinglePodReadWrite(namespace string, pvcName string, c j.CheckMountOptions(namespace, podName, "/data", expectedMountOptions) By("Creating Pod that can read contents of existing file") - j.NewPodForCSIFSSRead(string(uid), namespace, pvcName, fileName, checkEncryption) + readPodName := j.NewPodForCSIFSSRead(string(uid), namespace, pvcName, fileName, checkEncryption) + return podName, readPodName } func (j *PVCTestJig) CheckMultiplePodReadWrite(namespace string, pvcName string, checkEncryption bool) { @@ -1614,7 +1617,7 @@ func (j *PVCTestJig) VerifyMultipathEnabled(ctx context.Context, client ocicore. isMultipath := vaList.Items[0].GetIsMultipath() - if *isMultipath { + if isMultipath != nil && *isMultipath { Logf("Verified that the given volume is attached with multipath enabled") } else { Failf("No volume attachments found for volume %v", volumeId) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/add_on_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/add_on_options.go new file mode 100644 index 000000000..f21717d80 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/add_on_options.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddOnOptions The properties that define options for supported add-ons. +type AddOnOptions struct { + + // Whether or not to enable the Kubernetes Dashboard add-on. + IsKubernetesDashboardEnabled *bool `mandatory:"false" json:"isKubernetesDashboardEnabled"` + + // Whether or not to enable the Tiller add-on. + IsTillerEnabled *bool `mandatory:"false" json:"isTillerEnabled"` +} + +func (m AddOnOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddOnOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon.go new file mode 100644 index 000000000..a181fe9b2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Addon The properties that define an addon. +type Addon struct { + + // The name of the addon. + Name *string `mandatory:"true" json:"name"` + + // The state of the addon. + LifecycleState AddonLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // selected addon version, or null indicates autoUpdate + Version *string `mandatory:"false" json:"version"` + + // current installed version of the addon + CurrentInstalledVersion *string `mandatory:"false" json:"currentInstalledVersion"` + + // The time the cluster was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Addon configuration details. + Configurations []AddonConfiguration `mandatory:"false" json:"configurations"` + + // The error info of the addon. + AddonError *AddonError `mandatory:"false" json:"addonError"` +} + +func (m Addon) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Addon) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAddonLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAddonLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_configuration.go new file mode 100644 index 000000000..18e45e98c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_configuration.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddonConfiguration Defines the configuration of available addons for a cluster +type AddonConfiguration struct { + + // configuration key name + Key *string `mandatory:"false" json:"key"` + + // configuration value name + Value *string `mandatory:"false" json:"value"` +} + +func (m AddonConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddonConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_error.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_error.go new file mode 100644 index 000000000..76a0c6249 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_error.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddonError The error info of the addon. +type AddonError struct { + + // A short error code that defines the upstream error, meant for programmatic parsing. See API Errors (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm). + Code *string `mandatory:"false" json:"code"` + + // A human-readable error string of the upstream error. + Message *string `mandatory:"false" json:"message"` + + // The status of the HTTP response encountered in the upstream error. + Status *string `mandatory:"false" json:"status"` +} + +func (m AddonError) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddonError) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_lifecycle_state.go new file mode 100644 index 000000000..37347a6fb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_lifecycle_state.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// AddonLifecycleStateEnum Enum with underlying type: string +type AddonLifecycleStateEnum string + +// Set of constants representing the allowable values for AddonLifecycleStateEnum +const ( + AddonLifecycleStateCreating AddonLifecycleStateEnum = "CREATING" + AddonLifecycleStateActive AddonLifecycleStateEnum = "ACTIVE" + AddonLifecycleStateDeleting AddonLifecycleStateEnum = "DELETING" + AddonLifecycleStateDeleted AddonLifecycleStateEnum = "DELETED" + AddonLifecycleStateUpdating AddonLifecycleStateEnum = "UPDATING" + AddonLifecycleStateNeedsAttention AddonLifecycleStateEnum = "NEEDS_ATTENTION" + AddonLifecycleStateFailed AddonLifecycleStateEnum = "FAILED" +) + +var mappingAddonLifecycleStateEnum = map[string]AddonLifecycleStateEnum{ + "CREATING": AddonLifecycleStateCreating, + "ACTIVE": AddonLifecycleStateActive, + "DELETING": AddonLifecycleStateDeleting, + "DELETED": AddonLifecycleStateDeleted, + "UPDATING": AddonLifecycleStateUpdating, + "NEEDS_ATTENTION": AddonLifecycleStateNeedsAttention, + "FAILED": AddonLifecycleStateFailed, +} + +var mappingAddonLifecycleStateEnumLowerCase = map[string]AddonLifecycleStateEnum{ + "creating": AddonLifecycleStateCreating, + "active": AddonLifecycleStateActive, + "deleting": AddonLifecycleStateDeleting, + "deleted": AddonLifecycleStateDeleted, + "updating": AddonLifecycleStateUpdating, + "needs_attention": AddonLifecycleStateNeedsAttention, + "failed": AddonLifecycleStateFailed, +} + +// GetAddonLifecycleStateEnumValues Enumerates the set of values for AddonLifecycleStateEnum +func GetAddonLifecycleStateEnumValues() []AddonLifecycleStateEnum { + values := make([]AddonLifecycleStateEnum, 0) + for _, v := range mappingAddonLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetAddonLifecycleStateEnumStringValues Enumerates the set of values in String for AddonLifecycleStateEnum +func GetAddonLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "DELETING", + "DELETED", + "UPDATING", + "NEEDS_ATTENTION", + "FAILED", + } +} + +// GetMappingAddonLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddonLifecycleStateEnum(val string) (AddonLifecycleStateEnum, bool) { + enum, ok := mappingAddonLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_option_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_option_summary.go new file mode 100644 index 000000000..a8d46800c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_option_summary.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddonOptionSummary The properties that define addon summary. +type AddonOptionSummary struct { + + // Name of the addon and it would be unique. + Name *string `mandatory:"true" json:"name"` + + // The life cycle state of the addon. + LifecycleState AddonOptionSummaryLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Is it an essential addon for cluster operation or not. + IsEssential *bool `mandatory:"true" json:"isEssential"` + + // The resources this work request affects. + Versions []AddonVersions `mandatory:"true" json:"versions"` + + // Addon definition schema version to validate addon. + AddonSchemaVersion *string `mandatory:"false" json:"addonSchemaVersion"` + + // Addon group info, a namespace concept that groups addons with similar functionalities. + AddonGroup *string `mandatory:"false" json:"addonGroup"` + + // Description on the addon. + Description *string `mandatory:"false" json:"description"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The time the work request was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m AddonOptionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddonOptionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAddonOptionSummaryLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAddonOptionSummaryLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddonOptionSummaryLifecycleStateEnum Enum with underlying type: string +type AddonOptionSummaryLifecycleStateEnum string + +// Set of constants representing the allowable values for AddonOptionSummaryLifecycleStateEnum +const ( + AddonOptionSummaryLifecycleStateActive AddonOptionSummaryLifecycleStateEnum = "ACTIVE" + AddonOptionSummaryLifecycleStateInactive AddonOptionSummaryLifecycleStateEnum = "INACTIVE" +) + +var mappingAddonOptionSummaryLifecycleStateEnum = map[string]AddonOptionSummaryLifecycleStateEnum{ + "ACTIVE": AddonOptionSummaryLifecycleStateActive, + "INACTIVE": AddonOptionSummaryLifecycleStateInactive, +} + +var mappingAddonOptionSummaryLifecycleStateEnumLowerCase = map[string]AddonOptionSummaryLifecycleStateEnum{ + "active": AddonOptionSummaryLifecycleStateActive, + "inactive": AddonOptionSummaryLifecycleStateInactive, +} + +// GetAddonOptionSummaryLifecycleStateEnumValues Enumerates the set of values for AddonOptionSummaryLifecycleStateEnum +func GetAddonOptionSummaryLifecycleStateEnumValues() []AddonOptionSummaryLifecycleStateEnum { + values := make([]AddonOptionSummaryLifecycleStateEnum, 0) + for _, v := range mappingAddonOptionSummaryLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetAddonOptionSummaryLifecycleStateEnumStringValues Enumerates the set of values in String for AddonOptionSummaryLifecycleStateEnum +func GetAddonOptionSummaryLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingAddonOptionSummaryLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddonOptionSummaryLifecycleStateEnum(val string) (AddonOptionSummaryLifecycleStateEnum, bool) { + enum, ok := mappingAddonOptionSummaryLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_summary.go new file mode 100644 index 000000000..b4bf81ebb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_summary.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddonSummary The properties that define an addon summary. +type AddonSummary struct { + + // The name of the addon. + Name *string `mandatory:"true" json:"name"` + + // The state of the addon. + LifecycleState AddonLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // selected addon version, or null indicates autoUpdate + Version *string `mandatory:"false" json:"version"` + + // current installed version of the addon + CurrentInstalledVersion *string `mandatory:"false" json:"currentInstalledVersion"` + + // The time the cluster was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The error info of the addon. + AddonError *AddonError `mandatory:"false" json:"addonError"` +} + +func (m AddonSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddonSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAddonLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAddonLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_version_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_version_configuration.go new file mode 100644 index 000000000..fec500f1f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_version_configuration.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddonVersionConfiguration Addon version configuration details. +type AddonVersionConfiguration struct { + + // If the the configuration is required or not. + IsRequired *bool `mandatory:"false" json:"isRequired"` + + // Addon configuration key + Key *string `mandatory:"false" json:"key"` + + // Addon configuration value + Value *string `mandatory:"false" json:"value"` + + // Display name of addon version. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Information about the addon version configuration. + Description *string `mandatory:"false" json:"description"` +} + +func (m AddonVersionConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddonVersionConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_versions.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_versions.go new file mode 100644 index 000000000..01a61fab5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/addon_versions.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AddonVersions The properties that define a work request resource. +type AddonVersions struct { + + // Current state of the addon, only active will be visible to customer, visibility of versions in other status will be filtered based on limits property. + Status AddonVersionsStatusEnum `mandatory:"false" json:"status,omitempty"` + + // Version number, need be comparable within an addon. + VersionNumber *string `mandatory:"false" json:"versionNumber"` + + // Information about the addon version. + Description *string `mandatory:"false" json:"description"` + + // The range of kubernetes versions an addon can be configured. + KubernetesVersionFilters *KubernetesVersionsFilters `mandatory:"false" json:"kubernetesVersionFilters"` + + // Addon version configuration details. + Configurations []AddonVersionConfiguration `mandatory:"false" json:"configurations"` +} + +func (m AddonVersions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AddonVersions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAddonVersionsStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetAddonVersionsStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddonVersionsStatusEnum Enum with underlying type: string +type AddonVersionsStatusEnum string + +// Set of constants representing the allowable values for AddonVersionsStatusEnum +const ( + AddonVersionsStatusActive AddonVersionsStatusEnum = "ACTIVE" + AddonVersionsStatusDeprecated AddonVersionsStatusEnum = "DEPRECATED" + AddonVersionsStatusPreview AddonVersionsStatusEnum = "PREVIEW" + AddonVersionsStatusRecalled AddonVersionsStatusEnum = "RECALLED" +) + +var mappingAddonVersionsStatusEnum = map[string]AddonVersionsStatusEnum{ + "ACTIVE": AddonVersionsStatusActive, + "DEPRECATED": AddonVersionsStatusDeprecated, + "PREVIEW": AddonVersionsStatusPreview, + "RECALLED": AddonVersionsStatusRecalled, +} + +var mappingAddonVersionsStatusEnumLowerCase = map[string]AddonVersionsStatusEnum{ + "active": AddonVersionsStatusActive, + "deprecated": AddonVersionsStatusDeprecated, + "preview": AddonVersionsStatusPreview, + "recalled": AddonVersionsStatusRecalled, +} + +// GetAddonVersionsStatusEnumValues Enumerates the set of values for AddonVersionsStatusEnum +func GetAddonVersionsStatusEnumValues() []AddonVersionsStatusEnum { + values := make([]AddonVersionsStatusEnum, 0) + for _, v := range mappingAddonVersionsStatusEnum { + values = append(values, v) + } + return values +} + +// GetAddonVersionsStatusEnumStringValues Enumerates the set of values in String for AddonVersionsStatusEnum +func GetAddonVersionsStatusEnumStringValues() []string { + return []string{ + "ACTIVE", + "DEPRECATED", + "PREVIEW", + "RECALLED", + } +} + +// GetMappingAddonVersionsStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAddonVersionsStatusEnum(val string) (AddonVersionsStatusEnum, bool) { + enum, ok := mappingAddonVersionsStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/admission_controller_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/admission_controller_options.go new file mode 100644 index 000000000..36a22ba20 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/admission_controller_options.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AdmissionControllerOptions The properties that define supported admission controllers. +type AdmissionControllerOptions struct { + + // Whether or not to enable the Pod Security Policy admission controller. + IsPodSecurityPolicyEnabled *bool `mandatory:"false" json:"isPodSecurityPolicyEnabled"` +} + +func (m AdmissionControllerOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AdmissionControllerOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster.go new file mode 100644 index 000000000..0df24041d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster.go @@ -0,0 +1,187 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Cluster A Kubernetes cluster. Avoid entering confidential information. +type Cluster struct { + + // The OCID of the cluster. + Id *string `mandatory:"false" json:"id"` + + // The name of the cluster. + Name *string `mandatory:"false" json:"name"` + + // The OCID of the compartment in which the cluster exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The network configuration for access to the Cluster control plane. + EndpointConfig *ClusterEndpointConfig `mandatory:"false" json:"endpointConfig"` + + // The OCID of the virtual cloud network (VCN) in which the cluster exists. + VcnId *string `mandatory:"false" json:"vcnId"` + + // The version of Kubernetes running on the cluster masters. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // The OCID of the KMS key to be used as the master encryption key for Kubernetes secret encryption. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Optional attributes for the cluster. + Options *ClusterCreateOptions `mandatory:"false" json:"options"` + + // Metadata about the cluster. + Metadata *ClusterMetadata `mandatory:"false" json:"metadata"` + + // The state of the cluster masters. + LifecycleState ClusterLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the cluster masters. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Endpoints served up by the cluster masters. + Endpoints *ClusterEndpoints `mandatory:"false" json:"endpoints"` + + // Available Kubernetes versions to which the clusters masters may be upgraded. + AvailableKubernetesUpgrades []string `mandatory:"false" json:"availableKubernetesUpgrades"` + + // The image verification policy for signature validation. + ImagePolicyConfig *ImagePolicyConfig `mandatory:"false" json:"imagePolicyConfig"` + + // Available CNIs and network options for existing and new node pools of the cluster + ClusterPodNetworkOptions []ClusterPodNetworkOptionDetails `mandatory:"false" json:"clusterPodNetworkOptions"` + + // Type of cluster + Type ClusterTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m Cluster) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Cluster) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingClusterLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetClusterLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingClusterTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetClusterTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *Cluster) UnmarshalJSON(data []byte) (e error) { + model := struct { + Id *string `json:"id"` + Name *string `json:"name"` + CompartmentId *string `json:"compartmentId"` + EndpointConfig *ClusterEndpointConfig `json:"endpointConfig"` + VcnId *string `json:"vcnId"` + KubernetesVersion *string `json:"kubernetesVersion"` + KmsKeyId *string `json:"kmsKeyId"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Options *ClusterCreateOptions `json:"options"` + Metadata *ClusterMetadata `json:"metadata"` + LifecycleState ClusterLifecycleStateEnum `json:"lifecycleState"` + LifecycleDetails *string `json:"lifecycleDetails"` + Endpoints *ClusterEndpoints `json:"endpoints"` + AvailableKubernetesUpgrades []string `json:"availableKubernetesUpgrades"` + ImagePolicyConfig *ImagePolicyConfig `json:"imagePolicyConfig"` + ClusterPodNetworkOptions []clusterpodnetworkoptiondetails `json:"clusterPodNetworkOptions"` + Type ClusterTypeEnum `json:"type"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Id = model.Id + + m.Name = model.Name + + m.CompartmentId = model.CompartmentId + + m.EndpointConfig = model.EndpointConfig + + m.VcnId = model.VcnId + + m.KubernetesVersion = model.KubernetesVersion + + m.KmsKeyId = model.KmsKeyId + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.Options = model.Options + + m.Metadata = model.Metadata + + m.LifecycleState = model.LifecycleState + + m.LifecycleDetails = model.LifecycleDetails + + m.Endpoints = model.Endpoints + + m.AvailableKubernetesUpgrades = make([]string, len(model.AvailableKubernetesUpgrades)) + copy(m.AvailableKubernetesUpgrades, model.AvailableKubernetesUpgrades) + m.ImagePolicyConfig = model.ImagePolicyConfig + + m.ClusterPodNetworkOptions = make([]ClusterPodNetworkOptionDetails, len(model.ClusterPodNetworkOptions)) + for i, n := range model.ClusterPodNetworkOptions { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.ClusterPodNetworkOptions[i] = nn.(ClusterPodNetworkOptionDetails) + } else { + m.ClusterPodNetworkOptions[i] = nil + } + } + m.Type = model.Type + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_create_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_create_options.go new file mode 100644 index 000000000..ca766bbff --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_create_options.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterCreateOptions The properties that define extra options for a cluster. +type ClusterCreateOptions struct { + + // The OCIDs of the subnets used for Kubernetes services load balancers. + ServiceLbSubnetIds []string `mandatory:"false" json:"serviceLbSubnetIds"` + + // Network configuration for Kubernetes. + KubernetesNetworkConfig *KubernetesNetworkConfig `mandatory:"false" json:"kubernetesNetworkConfig"` + + // Configurable cluster add-ons + AddOns *AddOnOptions `mandatory:"false" json:"addOns"` + + // Configurable cluster admission controllers + AdmissionControllerOptions *AdmissionControllerOptions `mandatory:"false" json:"admissionControllerOptions"` + + PersistentVolumeConfig *PersistentVolumeConfigDetails `mandatory:"false" json:"persistentVolumeConfig"` + + ServiceLbConfig *ServiceLbConfigDetails `mandatory:"false" json:"serviceLbConfig"` +} + +func (m ClusterCreateOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterCreateOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_endpoint_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_endpoint_config.go new file mode 100644 index 000000000..c4dbd716a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_endpoint_config.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterEndpointConfig The properties that define the network configuration for the Cluster endpoint. +type ClusterEndpointConfig struct { + + // The OCID of the regional subnet in which to place the Cluster endpoint. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // A list of the OCIDs of the network security groups (NSGs) to apply to the cluster endpoint. For more information about NSGs, see NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Whether the cluster should be assigned a public IP address. Defaults to false. If set to true on a private subnet, the cluster provisioning will fail. + IsPublicIpEnabled *bool `mandatory:"false" json:"isPublicIpEnabled"` +} + +func (m ClusterEndpointConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterEndpointConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_endpoints.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_endpoints.go new file mode 100644 index 000000000..03596b64c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_endpoints.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterEndpoints The properties that define endpoints for a cluster. +type ClusterEndpoints struct { + + // The non-native networking Kubernetes API server endpoint. + Kubernetes *string `mandatory:"false" json:"kubernetes"` + + // The public native networking Kubernetes API server endpoint, if one was requested. + PublicEndpoint *string `mandatory:"false" json:"publicEndpoint"` + + // The private native networking Kubernetes API server endpoint. + PrivateEndpoint *string `mandatory:"false" json:"privateEndpoint"` + + // The FQDN assigned to the Kubernetes API private endpoint. + // Example: 'https://yourVcnHostnameEndpoint' + VcnHostnameEndpoint *string `mandatory:"false" json:"vcnHostnameEndpoint"` +} + +func (m ClusterEndpoints) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterEndpoints) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_lifecycle_state.go new file mode 100644 index 000000000..bcd691260 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_lifecycle_state.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// ClusterLifecycleStateEnum Enum with underlying type: string +type ClusterLifecycleStateEnum string + +// Set of constants representing the allowable values for ClusterLifecycleStateEnum +const ( + ClusterLifecycleStateCreating ClusterLifecycleStateEnum = "CREATING" + ClusterLifecycleStateActive ClusterLifecycleStateEnum = "ACTIVE" + ClusterLifecycleStateFailed ClusterLifecycleStateEnum = "FAILED" + ClusterLifecycleStateDeleting ClusterLifecycleStateEnum = "DELETING" + ClusterLifecycleStateDeleted ClusterLifecycleStateEnum = "DELETED" + ClusterLifecycleStateUpdating ClusterLifecycleStateEnum = "UPDATING" +) + +var mappingClusterLifecycleStateEnum = map[string]ClusterLifecycleStateEnum{ + "CREATING": ClusterLifecycleStateCreating, + "ACTIVE": ClusterLifecycleStateActive, + "FAILED": ClusterLifecycleStateFailed, + "DELETING": ClusterLifecycleStateDeleting, + "DELETED": ClusterLifecycleStateDeleted, + "UPDATING": ClusterLifecycleStateUpdating, +} + +var mappingClusterLifecycleStateEnumLowerCase = map[string]ClusterLifecycleStateEnum{ + "creating": ClusterLifecycleStateCreating, + "active": ClusterLifecycleStateActive, + "failed": ClusterLifecycleStateFailed, + "deleting": ClusterLifecycleStateDeleting, + "deleted": ClusterLifecycleStateDeleted, + "updating": ClusterLifecycleStateUpdating, +} + +// GetClusterLifecycleStateEnumValues Enumerates the set of values for ClusterLifecycleStateEnum +func GetClusterLifecycleStateEnumValues() []ClusterLifecycleStateEnum { + values := make([]ClusterLifecycleStateEnum, 0) + for _, v := range mappingClusterLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetClusterLifecycleStateEnumStringValues Enumerates the set of values in String for ClusterLifecycleStateEnum +func GetClusterLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "FAILED", + "DELETING", + "DELETED", + "UPDATING", + } +} + +// GetMappingClusterLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingClusterLifecycleStateEnum(val string) (ClusterLifecycleStateEnum, bool) { + enum, ok := mappingClusterLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_metadata.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_metadata.go new file mode 100644 index 000000000..d95f01c11 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_metadata.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterMetadata The properties that define meta data for a cluster. +type ClusterMetadata struct { + + // The time the cluster was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The user who created the cluster. + CreatedByUserId *string `mandatory:"false" json:"createdByUserId"` + + // The OCID of the work request which created the cluster. + CreatedByWorkRequestId *string `mandatory:"false" json:"createdByWorkRequestId"` + + // The time the cluster was deleted. + TimeDeleted *common.SDKTime `mandatory:"false" json:"timeDeleted"` + + // The user who deleted the cluster. + DeletedByUserId *string `mandatory:"false" json:"deletedByUserId"` + + // The OCID of the work request which deleted the cluster. + DeletedByWorkRequestId *string `mandatory:"false" json:"deletedByWorkRequestId"` + + // The time the cluster was updated. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The user who updated the cluster. + UpdatedByUserId *string `mandatory:"false" json:"updatedByUserId"` + + // The OCID of the work request which updated the cluster. + UpdatedByWorkRequestId *string `mandatory:"false" json:"updatedByWorkRequestId"` + + // The time until which the cluster credential is valid. + TimeCredentialExpiration *common.SDKTime `mandatory:"false" json:"timeCredentialExpiration"` +} + +func (m ClusterMetadata) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterMetadata) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_details.go new file mode 100644 index 000000000..666ba6fab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_details.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterMigrateToNativeVcnDetails The properties that define a request to migrate a cluster to Native VCN. +type ClusterMigrateToNativeVcnDetails struct { + + // The network configuration for access to the Cluster control plane. + EndpointConfig *ClusterEndpointConfig `mandatory:"true" json:"endpointConfig"` + + // The optional override of the non-native endpoint decommission time after migration is complete. Defaults to 30 days. + DecommissionDelayDuration *string `mandatory:"false" json:"decommissionDelayDuration"` +} + +func (m ClusterMigrateToNativeVcnDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterMigrateToNativeVcnDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_request_response.go new file mode 100644 index 000000000..e85ff36a8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ClusterMigrateToNativeVcnRequest wrapper for the ClusterMigrateToNativeVcn operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ClusterMigrateToNativeVcn.go.html to see an example of how to use ClusterMigrateToNativeVcnRequest. +type ClusterMigrateToNativeVcnRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The details for the cluster's migration to native VCN. + ClusterMigrateToNativeVcnDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ClusterMigrateToNativeVcnRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ClusterMigrateToNativeVcnRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ClusterMigrateToNativeVcnRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ClusterMigrateToNativeVcnRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ClusterMigrateToNativeVcnRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ClusterMigrateToNativeVcnResponse wrapper for the ClusterMigrateToNativeVcn operation +type ClusterMigrateToNativeVcnResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ClusterMigrateToNativeVcnResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ClusterMigrateToNativeVcnResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_status.go new file mode 100644 index 000000000..950acfb5e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_migrate_to_native_vcn_status.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterMigrateToNativeVcnStatus Information regarding a cluster's move to Native VCN. +type ClusterMigrateToNativeVcnStatus struct { + + // The current migration status of the cluster. + State ClusterMigrateToNativeVcnStatusStateEnum `mandatory:"true" json:"state"` + + // The date and time the non-native VCN is due to be decommissioned. + TimeDecommissionScheduled *common.SDKTime `mandatory:"false" json:"timeDecommissionScheduled"` +} + +func (m ClusterMigrateToNativeVcnStatus) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterMigrateToNativeVcnStatus) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingClusterMigrateToNativeVcnStatusStateEnum(string(m.State)); !ok && m.State != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for State: %s. Supported values are: %s.", m.State, strings.Join(GetClusterMigrateToNativeVcnStatusStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ClusterMigrateToNativeVcnStatusStateEnum Enum with underlying type: string +type ClusterMigrateToNativeVcnStatusStateEnum string + +// Set of constants representing the allowable values for ClusterMigrateToNativeVcnStatusStateEnum +const ( + ClusterMigrateToNativeVcnStatusStateNotStarted ClusterMigrateToNativeVcnStatusStateEnum = "NOT_STARTED" + ClusterMigrateToNativeVcnStatusStateRequested ClusterMigrateToNativeVcnStatusStateEnum = "REQUESTED" + ClusterMigrateToNativeVcnStatusStateInProgress ClusterMigrateToNativeVcnStatusStateEnum = "IN_PROGRESS" + ClusterMigrateToNativeVcnStatusStatePendingDecommission ClusterMigrateToNativeVcnStatusStateEnum = "PENDING_DECOMMISSION" + ClusterMigrateToNativeVcnStatusStateCompleted ClusterMigrateToNativeVcnStatusStateEnum = "COMPLETED" +) + +var mappingClusterMigrateToNativeVcnStatusStateEnum = map[string]ClusterMigrateToNativeVcnStatusStateEnum{ + "NOT_STARTED": ClusterMigrateToNativeVcnStatusStateNotStarted, + "REQUESTED": ClusterMigrateToNativeVcnStatusStateRequested, + "IN_PROGRESS": ClusterMigrateToNativeVcnStatusStateInProgress, + "PENDING_DECOMMISSION": ClusterMigrateToNativeVcnStatusStatePendingDecommission, + "COMPLETED": ClusterMigrateToNativeVcnStatusStateCompleted, +} + +var mappingClusterMigrateToNativeVcnStatusStateEnumLowerCase = map[string]ClusterMigrateToNativeVcnStatusStateEnum{ + "not_started": ClusterMigrateToNativeVcnStatusStateNotStarted, + "requested": ClusterMigrateToNativeVcnStatusStateRequested, + "in_progress": ClusterMigrateToNativeVcnStatusStateInProgress, + "pending_decommission": ClusterMigrateToNativeVcnStatusStatePendingDecommission, + "completed": ClusterMigrateToNativeVcnStatusStateCompleted, +} + +// GetClusterMigrateToNativeVcnStatusStateEnumValues Enumerates the set of values for ClusterMigrateToNativeVcnStatusStateEnum +func GetClusterMigrateToNativeVcnStatusStateEnumValues() []ClusterMigrateToNativeVcnStatusStateEnum { + values := make([]ClusterMigrateToNativeVcnStatusStateEnum, 0) + for _, v := range mappingClusterMigrateToNativeVcnStatusStateEnum { + values = append(values, v) + } + return values +} + +// GetClusterMigrateToNativeVcnStatusStateEnumStringValues Enumerates the set of values in String for ClusterMigrateToNativeVcnStatusStateEnum +func GetClusterMigrateToNativeVcnStatusStateEnumStringValues() []string { + return []string{ + "NOT_STARTED", + "REQUESTED", + "IN_PROGRESS", + "PENDING_DECOMMISSION", + "COMPLETED", + } +} + +// GetMappingClusterMigrateToNativeVcnStatusStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingClusterMigrateToNativeVcnStatusStateEnum(val string) (ClusterMigrateToNativeVcnStatusStateEnum, bool) { + enum, ok := mappingClusterMigrateToNativeVcnStatusStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_options.go new file mode 100644 index 000000000..cd4839078 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_options.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterOptions Options for creating or updating clusters. +type ClusterOptions struct { + + // Available Kubernetes versions. + KubernetesVersions []string `mandatory:"false" json:"kubernetesVersions"` + + // Available CNIs and network options for existing and new node pools of the cluster + ClusterPodNetworkOptions []ClusterPodNetworkOptionDetails `mandatory:"false" json:"clusterPodNetworkOptions"` +} + +func (m ClusterOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ClusterOptions) UnmarshalJSON(data []byte) (e error) { + model := struct { + KubernetesVersions []string `json:"kubernetesVersions"` + ClusterPodNetworkOptions []clusterpodnetworkoptiondetails `json:"clusterPodNetworkOptions"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.KubernetesVersions = make([]string, len(model.KubernetesVersions)) + copy(m.KubernetesVersions, model.KubernetesVersions) + m.ClusterPodNetworkOptions = make([]ClusterPodNetworkOptionDetails, len(model.ClusterPodNetworkOptions)) + for i, n := range model.ClusterPodNetworkOptions { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.ClusterPodNetworkOptions[i] = nn.(ClusterPodNetworkOptionDetails) + } else { + m.ClusterPodNetworkOptions[i] = nil + } + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_pod_network_option_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_pod_network_option_details.go new file mode 100644 index 000000000..5d5caf2ae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_pod_network_option_details.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterPodNetworkOptionDetails The CNI type and relevant network details potentially applicable to the node pools of the cluster +type ClusterPodNetworkOptionDetails interface { +} + +type clusterpodnetworkoptiondetails struct { + JsonData []byte + CniType string `json:"cniType"` +} + +// UnmarshalJSON unmarshals json +func (m *clusterpodnetworkoptiondetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerclusterpodnetworkoptiondetails clusterpodnetworkoptiondetails + s := struct { + Model Unmarshalerclusterpodnetworkoptiondetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CniType = s.Model.CniType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *clusterpodnetworkoptiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.CniType { + case "FLANNEL_OVERLAY": + mm := FlannelOverlayClusterPodNetworkOptionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "OCI_VCN_IP_NATIVE": + mm := OciVcnIpNativeClusterPodNetworkOptionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for ClusterPodNetworkOptionDetails: %s.", m.CniType) + return *m, nil + } +} + +func (m clusterpodnetworkoptiondetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m clusterpodnetworkoptiondetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ClusterPodNetworkOptionDetailsCniTypeEnum Enum with underlying type: string +type ClusterPodNetworkOptionDetailsCniTypeEnum string + +// Set of constants representing the allowable values for ClusterPodNetworkOptionDetailsCniTypeEnum +const ( + ClusterPodNetworkOptionDetailsCniTypeOciVcnIpNative ClusterPodNetworkOptionDetailsCniTypeEnum = "OCI_VCN_IP_NATIVE" + ClusterPodNetworkOptionDetailsCniTypeFlannelOverlay ClusterPodNetworkOptionDetailsCniTypeEnum = "FLANNEL_OVERLAY" +) + +var mappingClusterPodNetworkOptionDetailsCniTypeEnum = map[string]ClusterPodNetworkOptionDetailsCniTypeEnum{ + "OCI_VCN_IP_NATIVE": ClusterPodNetworkOptionDetailsCniTypeOciVcnIpNative, + "FLANNEL_OVERLAY": ClusterPodNetworkOptionDetailsCniTypeFlannelOverlay, +} + +var mappingClusterPodNetworkOptionDetailsCniTypeEnumLowerCase = map[string]ClusterPodNetworkOptionDetailsCniTypeEnum{ + "oci_vcn_ip_native": ClusterPodNetworkOptionDetailsCniTypeOciVcnIpNative, + "flannel_overlay": ClusterPodNetworkOptionDetailsCniTypeFlannelOverlay, +} + +// GetClusterPodNetworkOptionDetailsCniTypeEnumValues Enumerates the set of values for ClusterPodNetworkOptionDetailsCniTypeEnum +func GetClusterPodNetworkOptionDetailsCniTypeEnumValues() []ClusterPodNetworkOptionDetailsCniTypeEnum { + values := make([]ClusterPodNetworkOptionDetailsCniTypeEnum, 0) + for _, v := range mappingClusterPodNetworkOptionDetailsCniTypeEnum { + values = append(values, v) + } + return values +} + +// GetClusterPodNetworkOptionDetailsCniTypeEnumStringValues Enumerates the set of values in String for ClusterPodNetworkOptionDetailsCniTypeEnum +func GetClusterPodNetworkOptionDetailsCniTypeEnumStringValues() []string { + return []string{ + "OCI_VCN_IP_NATIVE", + "FLANNEL_OVERLAY", + } +} + +// GetMappingClusterPodNetworkOptionDetailsCniTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingClusterPodNetworkOptionDetailsCniTypeEnum(val string) (ClusterPodNetworkOptionDetailsCniTypeEnum, bool) { + enum, ok := mappingClusterPodNetworkOptionDetailsCniTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_summary.go new file mode 100644 index 000000000..9f75d7e7d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_summary.go @@ -0,0 +1,202 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ClusterSummary The properties that define a cluster summary. +type ClusterSummary struct { + + // The OCID of the cluster. + Id *string `mandatory:"false" json:"id"` + + // The name of the cluster. + Name *string `mandatory:"false" json:"name"` + + // The OCID of the compartment in which the cluster exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The network configuration for access to the Cluster control plane. + EndpointConfig *ClusterEndpointConfig `mandatory:"false" json:"endpointConfig"` + + // The OCID of the virtual cloud network (VCN) in which the cluster exists + VcnId *string `mandatory:"false" json:"vcnId"` + + // The version of Kubernetes running on the cluster masters. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // Optional attributes for the cluster. + Options *ClusterCreateOptions `mandatory:"false" json:"options"` + + // Metadata about the cluster. + Metadata *ClusterMetadata `mandatory:"false" json:"metadata"` + + // The state of the cluster masters. + LifecycleState ClusterLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the cluster masters. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Endpoints served up by the cluster masters. + Endpoints *ClusterEndpoints `mandatory:"false" json:"endpoints"` + + // Available Kubernetes versions to which the clusters masters may be upgraded. + AvailableKubernetesUpgrades []string `mandatory:"false" json:"availableKubernetesUpgrades"` + + // The image verification policy for signature validation. + ImagePolicyConfig *ImagePolicyConfig `mandatory:"false" json:"imagePolicyConfig"` + + // Available CNIs and network options for existing and new node pools of the cluster + ClusterPodNetworkOptions []ClusterPodNetworkOptionDetails `mandatory:"false" json:"clusterPodNetworkOptions"` + + // Type of cluster. Values can be BASIC_CLUSTER or ENHANCED_CLUSTER. For more information, see Cluster Types (https://docs.cloud.oracle.com/Content/ContEng/Tasks/contengcomparingenhancedwithbasicclusters_topic.htm) + Type ClusterTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m ClusterSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ClusterSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingClusterLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetClusterLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingClusterTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetClusterTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ClusterSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + Id *string `json:"id"` + Name *string `json:"name"` + CompartmentId *string `json:"compartmentId"` + EndpointConfig *ClusterEndpointConfig `json:"endpointConfig"` + VcnId *string `json:"vcnId"` + KubernetesVersion *string `json:"kubernetesVersion"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Options *ClusterCreateOptions `json:"options"` + Metadata *ClusterMetadata `json:"metadata"` + LifecycleState ClusterLifecycleStateEnum `json:"lifecycleState"` + LifecycleDetails *string `json:"lifecycleDetails"` + Endpoints *ClusterEndpoints `json:"endpoints"` + AvailableKubernetesUpgrades []string `json:"availableKubernetesUpgrades"` + ImagePolicyConfig *ImagePolicyConfig `json:"imagePolicyConfig"` + ClusterPodNetworkOptions []clusterpodnetworkoptiondetails `json:"clusterPodNetworkOptions"` + Type ClusterTypeEnum `json:"type"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Id = model.Id + + m.Name = model.Name + + m.CompartmentId = model.CompartmentId + + m.EndpointConfig = model.EndpointConfig + + m.VcnId = model.VcnId + + m.KubernetesVersion = model.KubernetesVersion + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.Options = model.Options + + m.Metadata = model.Metadata + + m.LifecycleState = model.LifecycleState + + m.LifecycleDetails = model.LifecycleDetails + + m.Endpoints = model.Endpoints + + m.AvailableKubernetesUpgrades = make([]string, len(model.AvailableKubernetesUpgrades)) + copy(m.AvailableKubernetesUpgrades, model.AvailableKubernetesUpgrades) + m.ImagePolicyConfig = model.ImagePolicyConfig + + m.ClusterPodNetworkOptions = make([]ClusterPodNetworkOptionDetails, len(model.ClusterPodNetworkOptions)) + for i, n := range model.ClusterPodNetworkOptions { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.ClusterPodNetworkOptions[i] = nn.(ClusterPodNetworkOptionDetails) + } else { + m.ClusterPodNetworkOptions[i] = nil + } + } + m.Type = model.Type + + return +} + +// ClusterSummaryLifecycleStateEnum is an alias to type: ClusterLifecycleStateEnum +// Consider using ClusterLifecycleStateEnum instead +// Deprecated +type ClusterSummaryLifecycleStateEnum = ClusterLifecycleStateEnum + +// Set of constants representing the allowable values for ClusterLifecycleStateEnum +// Deprecated +const ( + ClusterSummaryLifecycleStateCreating ClusterLifecycleStateEnum = "CREATING" + ClusterSummaryLifecycleStateActive ClusterLifecycleStateEnum = "ACTIVE" + ClusterSummaryLifecycleStateFailed ClusterLifecycleStateEnum = "FAILED" + ClusterSummaryLifecycleStateDeleting ClusterLifecycleStateEnum = "DELETING" + ClusterSummaryLifecycleStateDeleted ClusterLifecycleStateEnum = "DELETED" + ClusterSummaryLifecycleStateUpdating ClusterLifecycleStateEnum = "UPDATING" +) + +// GetClusterSummaryLifecycleStateEnumValues Enumerates the set of values for ClusterLifecycleStateEnum +// Consider using GetClusterLifecycleStateEnumValue +// Deprecated +var GetClusterSummaryLifecycleStateEnumValues = GetClusterLifecycleStateEnumValues diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_type.go new file mode 100644 index 000000000..bd036e1c4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/cluster_type.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// ClusterTypeEnum Enum with underlying type: string +type ClusterTypeEnum string + +// Set of constants representing the allowable values for ClusterTypeEnum +const ( + ClusterTypeBasicCluster ClusterTypeEnum = "BASIC_CLUSTER" + ClusterTypeEnhancedCluster ClusterTypeEnum = "ENHANCED_CLUSTER" +) + +var mappingClusterTypeEnum = map[string]ClusterTypeEnum{ + "BASIC_CLUSTER": ClusterTypeBasicCluster, + "ENHANCED_CLUSTER": ClusterTypeEnhancedCluster, +} + +var mappingClusterTypeEnumLowerCase = map[string]ClusterTypeEnum{ + "basic_cluster": ClusterTypeBasicCluster, + "enhanced_cluster": ClusterTypeEnhancedCluster, +} + +// GetClusterTypeEnumValues Enumerates the set of values for ClusterTypeEnum +func GetClusterTypeEnumValues() []ClusterTypeEnum { + values := make([]ClusterTypeEnum, 0) + for _, v := range mappingClusterTypeEnum { + values = append(values, v) + } + return values +} + +// GetClusterTypeEnumStringValues Enumerates the set of values in String for ClusterTypeEnum +func GetClusterTypeEnumStringValues() []string { + return []string{ + "BASIC_CLUSTER", + "ENHANCED_CLUSTER", + } +} + +// GetMappingClusterTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingClusterTypeEnum(val string) (ClusterTypeEnum, bool) { + enum, ok := mappingClusterTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/complete_credential_rotation_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/complete_credential_rotation_request_response.go new file mode 100644 index 000000000..416ca633d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/complete_credential_rotation_request_response.go @@ -0,0 +1,99 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CompleteCredentialRotationRequest wrapper for the CompleteCredentialRotation operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CompleteCredentialRotation.go.html to see an example of how to use CompleteCredentialRotationRequest. +type CompleteCredentialRotationRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // A token you supply to uniquely identify the request and provide idempotency if + // the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CompleteCredentialRotationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CompleteCredentialRotationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CompleteCredentialRotationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CompleteCredentialRotationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CompleteCredentialRotationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CompleteCredentialRotationResponse wrapper for the CompleteCredentialRotation operation +type CompleteCredentialRotationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CompleteCredentialRotationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CompleteCredentialRotationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/containerengine_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/containerengine_client.go new file mode 100644 index 000000000..bb64cd79f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/containerengine_client.go @@ -0,0 +1,2680 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "context" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/oci-go-sdk/v65/common/auth" + "net/http" +) + +// ContainerEngineClient a client for ContainerEngine +type ContainerEngineClient struct { + common.BaseClient + config *common.ConfigurationProvider +} + +// NewContainerEngineClientWithConfigurationProvider Creates a new default ContainerEngine client with the given configuration provider. +// the configuration provider will be used for the default signer as well as reading the region +func NewContainerEngineClientWithConfigurationProvider(configProvider common.ConfigurationProvider) (client ContainerEngineClient, err error) { + if enabled := common.CheckForEnabledServices("containerengine"); !enabled { + return client, fmt.Errorf("the Developer Tool configuration disabled this service, this behavior is controlled by OciSdkEnabledServicesMap variables. Please check if your local developer-tool-configuration.json file configured the service you're targeting or contact the cloud provider on the availability of this service") + } + provider, err := auth.GetGenericConfigurationProvider(configProvider) + if err != nil { + return client, err + } + baseClient, e := common.NewClientWithConfig(provider) + if e != nil { + return client, e + } + return newContainerEngineClientFromBaseClient(baseClient, provider) +} + +// NewContainerEngineClientWithOboToken Creates a new default ContainerEngine client with the given configuration provider. +// The obotoken will be added to default headers and signed; the configuration provider will be used for the signer +// +// as well as reading the region +func NewContainerEngineClientWithOboToken(configProvider common.ConfigurationProvider, oboToken string) (client ContainerEngineClient, err error) { + baseClient, err := common.NewClientWithOboToken(configProvider, oboToken) + if err != nil { + return client, err + } + + return newContainerEngineClientFromBaseClient(baseClient, configProvider) +} + +func newContainerEngineClientFromBaseClient(baseClient common.BaseClient, configProvider common.ConfigurationProvider) (client ContainerEngineClient, err error) { + // ContainerEngine service default circuit breaker is enabled + baseClient.Configuration.CircuitBreaker = common.NewCircuitBreaker(common.DefaultCircuitBreakerSettingWithServiceName("ContainerEngine")) + common.ConfigCircuitBreakerFromEnvVar(&baseClient) + common.ConfigCircuitBreakerFromGlobalVar(&baseClient) + + client = ContainerEngineClient{BaseClient: baseClient} + client.BasePath = "20180222" + err = client.setConfigurationProvider(configProvider) + return +} + +// SetRegion overrides the region of this client. +func (client *ContainerEngineClient) SetRegion(region string) { + client.Host = common.StringToRegion(region).EndpointForTemplate("containerengine", "https://containerengine.{region}.oci.{secondLevelDomain}") +} + +// SetConfigurationProvider sets the configuration provider including the region, returns an error if is not valid +func (client *ContainerEngineClient) setConfigurationProvider(configProvider common.ConfigurationProvider) error { + if ok, err := common.IsConfigurationProviderValid(configProvider); !ok { + return err + } + + // Error has been checked already + region, _ := configProvider.Region() + client.SetRegion(region) + if client.Host == "" { + return fmt.Errorf("invalid region or Host. Endpoint cannot be constructed without endpointServiceName or serviceEndpointTemplate for a dotted region") + } + client.config = &configProvider + return nil +} + +// ConfigurationProvider the ConfigurationProvider used in this client, or null if none set +func (client *ContainerEngineClient) ConfigurationProvider() *common.ConfigurationProvider { + return client.config +} + +// ClusterMigrateToNativeVcn Initiates cluster migration to use native VCN. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ClusterMigrateToNativeVcn.go.html to see an example of how to use ClusterMigrateToNativeVcn API. +// A default retry strategy applies to this operation ClusterMigrateToNativeVcn() +func (client ContainerEngineClient) ClusterMigrateToNativeVcn(ctx context.Context, request ClusterMigrateToNativeVcnRequest) (response ClusterMigrateToNativeVcnResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.clusterMigrateToNativeVcn, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ClusterMigrateToNativeVcnResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ClusterMigrateToNativeVcnResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ClusterMigrateToNativeVcnResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ClusterMigrateToNativeVcnResponse") + } + return +} + +// clusterMigrateToNativeVcn implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) clusterMigrateToNativeVcn(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/actions/migrateToNativeVcn", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ClusterMigrateToNativeVcnResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/ClusterMigrateToNativeVcn" + err = common.PostProcessServiceError(err, "ContainerEngine", "ClusterMigrateToNativeVcn", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CompleteCredentialRotation Complete cluster credential rotation. Retire old credentials from kubernetes components. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CompleteCredentialRotation.go.html to see an example of how to use CompleteCredentialRotation API. +// A default retry strategy applies to this operation CompleteCredentialRotation() +func (client ContainerEngineClient) CompleteCredentialRotation(ctx context.Context, request CompleteCredentialRotationRequest) (response CompleteCredentialRotationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.completeCredentialRotation, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CompleteCredentialRotationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CompleteCredentialRotationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CompleteCredentialRotationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CompleteCredentialRotationResponse") + } + return +} + +// completeCredentialRotation implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) completeCredentialRotation(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/actions/completeCredentialRotation", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CompleteCredentialRotationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CompleteCredentialRotation" + err = common.PostProcessServiceError(err, "ContainerEngine", "CompleteCredentialRotation", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateCluster Create a new cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateCluster.go.html to see an example of how to use CreateCluster API. +// A default retry strategy applies to this operation CreateCluster() +func (client ContainerEngineClient) CreateCluster(ctx context.Context, request CreateClusterRequest) (response CreateClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateClusterResponse") + } + return +} + +// createCluster implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) createCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateClusterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CreateCluster" + err = common.PostProcessServiceError(err, "ContainerEngine", "CreateCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateKubeconfig Create the Kubeconfig YAML for a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateKubeconfig.go.html to see an example of how to use CreateKubeconfig API. +// A default retry strategy applies to this operation CreateKubeconfig() +func (client ContainerEngineClient) CreateKubeconfig(ctx context.Context, request CreateKubeconfigRequest) (response CreateKubeconfigResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.createKubeconfig, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateKubeconfigResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateKubeconfigResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateKubeconfigResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateKubeconfigResponse") + } + return +} + +// createKubeconfig implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) createKubeconfig(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/kubeconfig/content", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateKubeconfigResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CreateKubeconfig" + err = common.PostProcessServiceError(err, "ContainerEngine", "CreateKubeconfig", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateNodePool Create a new node pool. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateNodePool.go.html to see an example of how to use CreateNodePool API. +// A default retry strategy applies to this operation CreateNodePool() +func (client ContainerEngineClient) CreateNodePool(ctx context.Context, request CreateNodePoolRequest) (response CreateNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createNodePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateNodePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateNodePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateNodePoolResponse") + } + return +} + +// createNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) createNodePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/nodePools", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/CreateNodePool" + err = common.PostProcessServiceError(err, "ContainerEngine", "CreateNodePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateVirtualNodePool Create a new virtual node pool. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateVirtualNodePool.go.html to see an example of how to use CreateVirtualNodePool API. +// A default retry strategy applies to this operation CreateVirtualNodePool() +func (client ContainerEngineClient) CreateVirtualNodePool(ctx context.Context, request CreateVirtualNodePoolRequest) (response CreateVirtualNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createVirtualNodePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateVirtualNodePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateVirtualNodePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateVirtualNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateVirtualNodePoolResponse") + } + return +} + +// createVirtualNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) createVirtualNodePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/virtualNodePools", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateVirtualNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/CreateVirtualNodePool" + err = common.PostProcessServiceError(err, "ContainerEngine", "CreateVirtualNodePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateWorkloadMapping Create the specified workloadMapping for a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateWorkloadMapping.go.html to see an example of how to use CreateWorkloadMapping API. +// A default retry strategy applies to this operation CreateWorkloadMapping() +func (client ContainerEngineClient) CreateWorkloadMapping(ctx context.Context, request CreateWorkloadMappingRequest) (response CreateWorkloadMappingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createWorkloadMapping, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateWorkloadMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateWorkloadMappingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateWorkloadMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateWorkloadMappingResponse") + } + return +} + +// createWorkloadMapping implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) createWorkloadMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/workloadMappings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateWorkloadMappingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/CreateWorkloadMapping" + err = common.PostProcessServiceError(err, "ContainerEngine", "CreateWorkloadMapping", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteCluster Delete a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteCluster.go.html to see an example of how to use DeleteCluster API. +// A default retry strategy applies to this operation DeleteCluster() +func (client ContainerEngineClient) DeleteCluster(ctx context.Context, request DeleteClusterRequest) (response DeleteClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteClusterResponse") + } + return +} + +// deleteCluster implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) deleteCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/clusters/{clusterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteClusterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/DeleteCluster" + err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteNode Delete node. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteNode.go.html to see an example of how to use DeleteNode API. +// A default retry strategy applies to this operation DeleteNode() +func (client ContainerEngineClient) DeleteNode(ctx context.Context, request DeleteNodeRequest) (response DeleteNodeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteNode, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteNodeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteNodeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteNodeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteNodeResponse") + } + return +} + +// deleteNode implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) deleteNode(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/nodePools/{nodePoolId}/node/{nodeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteNodeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/DeleteNode" + err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteNode", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteNodePool Delete a node pool. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteNodePool.go.html to see an example of how to use DeleteNodePool API. +// A default retry strategy applies to this operation DeleteNodePool() +func (client ContainerEngineClient) DeleteNodePool(ctx context.Context, request DeleteNodePoolRequest) (response DeleteNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteNodePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteNodePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteNodePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteNodePoolResponse") + } + return +} + +// deleteNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) deleteNodePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/nodePools/{nodePoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/DeleteNodePool" + err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteNodePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteVirtualNodePool Delete a virtual node pool. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteVirtualNodePool.go.html to see an example of how to use DeleteVirtualNodePool API. +// A default retry strategy applies to this operation DeleteVirtualNodePool() +func (client ContainerEngineClient) DeleteVirtualNodePool(ctx context.Context, request DeleteVirtualNodePoolRequest) (response DeleteVirtualNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteVirtualNodePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteVirtualNodePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteVirtualNodePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteVirtualNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteVirtualNodePoolResponse") + } + return +} + +// deleteVirtualNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) deleteVirtualNodePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/virtualNodePools/{virtualNodePoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteVirtualNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/DeleteVirtualNodePool" + err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteVirtualNodePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteWorkRequest Cancel a work request that has not started. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteWorkRequest.go.html to see an example of how to use DeleteWorkRequest API. +// A default retry strategy applies to this operation DeleteWorkRequest() +func (client ContainerEngineClient) DeleteWorkRequest(ctx context.Context, request DeleteWorkRequestRequest) (response DeleteWorkRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteWorkRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteWorkRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteWorkRequestResponse") + } + return +} + +// deleteWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) deleteWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequest/DeleteWorkRequest" + err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteWorkloadMapping Delete workloadMapping for a provisioned cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteWorkloadMapping.go.html to see an example of how to use DeleteWorkloadMapping API. +// A default retry strategy applies to this operation DeleteWorkloadMapping() +func (client ContainerEngineClient) DeleteWorkloadMapping(ctx context.Context, request DeleteWorkloadMappingRequest) (response DeleteWorkloadMappingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteWorkloadMapping, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteWorkloadMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteWorkloadMappingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteWorkloadMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteWorkloadMappingResponse") + } + return +} + +// deleteWorkloadMapping implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) deleteWorkloadMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/clusters/{clusterId}/workloadMappings/{workloadMappingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteWorkloadMappingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/DeleteWorkloadMapping" + err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteWorkloadMapping", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DisableAddon Disable addon for a provisioned cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DisableAddon.go.html to see an example of how to use DisableAddon API. +// A default retry strategy applies to this operation DisableAddon() +func (client ContainerEngineClient) DisableAddon(ctx context.Context, request DisableAddonRequest) (response DisableAddonResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.disableAddon, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DisableAddonResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DisableAddonResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DisableAddonResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DisableAddonResponse") + } + return +} + +// disableAddon implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) disableAddon(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/clusters/{clusterId}/addons/{addonName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DisableAddonResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/DisableAddon" + err = common.PostProcessServiceError(err, "ContainerEngine", "DisableAddon", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetAddon Get the specified addon for a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetAddon.go.html to see an example of how to use GetAddon API. +// A default retry strategy applies to this operation GetAddon() +func (client ContainerEngineClient) GetAddon(ctx context.Context, request GetAddonRequest) (response GetAddonResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getAddon, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetAddonResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetAddonResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetAddonResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetAddonResponse") + } + return +} + +// getAddon implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getAddon(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}/addons/{addonName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetAddonResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/GetAddon" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetAddon", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCluster Get the details of a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetCluster.go.html to see an example of how to use GetCluster API. +// A default retry strategy applies to this operation GetCluster() +func (client ContainerEngineClient) GetCluster(ctx context.Context, request GetClusterRequest) (response GetClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetClusterResponse") + } + return +} + +// getCluster implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetClusterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/GetCluster" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetClusterMigrateToNativeVcnStatus Get details on a cluster's migration to native VCN. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetClusterMigrateToNativeVcnStatus.go.html to see an example of how to use GetClusterMigrateToNativeVcnStatus API. +// A default retry strategy applies to this operation GetClusterMigrateToNativeVcnStatus() +func (client ContainerEngineClient) GetClusterMigrateToNativeVcnStatus(ctx context.Context, request GetClusterMigrateToNativeVcnStatusRequest) (response GetClusterMigrateToNativeVcnStatusResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getClusterMigrateToNativeVcnStatus, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetClusterMigrateToNativeVcnStatusResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetClusterMigrateToNativeVcnStatusResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetClusterMigrateToNativeVcnStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetClusterMigrateToNativeVcnStatusResponse") + } + return +} + +// getClusterMigrateToNativeVcnStatus implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getClusterMigrateToNativeVcnStatus(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}/migrateToNativeVcnStatus", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetClusterMigrateToNativeVcnStatusResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterMigrateToNativeVcnStatus/GetClusterMigrateToNativeVcnStatus" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetClusterMigrateToNativeVcnStatus", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetClusterOptions Get options available for clusters. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetClusterOptions.go.html to see an example of how to use GetClusterOptions API. +// A default retry strategy applies to this operation GetClusterOptions() +func (client ContainerEngineClient) GetClusterOptions(ctx context.Context, request GetClusterOptionsRequest) (response GetClusterOptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getClusterOptions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetClusterOptionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetClusterOptionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetClusterOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetClusterOptionsResponse") + } + return +} + +// getClusterOptions implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getClusterOptions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusterOptions/{clusterOptionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetClusterOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterOptions/GetClusterOptions" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetClusterOptions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCredentialRotationStatus Get cluster credential rotation status. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetCredentialRotationStatus.go.html to see an example of how to use GetCredentialRotationStatus API. +// A default retry strategy applies to this operation GetCredentialRotationStatus() +func (client ContainerEngineClient) GetCredentialRotationStatus(ctx context.Context, request GetCredentialRotationStatusRequest) (response GetCredentialRotationStatusResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCredentialRotationStatus, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCredentialRotationStatusResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCredentialRotationStatusResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCredentialRotationStatusResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCredentialRotationStatusResponse") + } + return +} + +// getCredentialRotationStatus implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getCredentialRotationStatus(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}/credentialRotationStatus", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCredentialRotationStatusResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/CredentialRotationStatus/GetCredentialRotationStatus" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetCredentialRotationStatus", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNodePool Get the details of a node pool. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetNodePool.go.html to see an example of how to use GetNodePool API. +// A default retry strategy applies to this operation GetNodePool() +func (client ContainerEngineClient) GetNodePool(ctx context.Context, request GetNodePoolRequest) (response GetNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNodePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetNodePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetNodePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNodePoolResponse") + } + return +} + +// getNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getNodePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePools/{nodePoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/GetNodePool" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetNodePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetNodePoolOptions Get options available for node pools. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetNodePoolOptions.go.html to see an example of how to use GetNodePoolOptions API. +// A default retry strategy applies to this operation GetNodePoolOptions() +func (client ContainerEngineClient) GetNodePoolOptions(ctx context.Context, request GetNodePoolOptionsRequest) (response GetNodePoolOptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getNodePoolOptions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetNodePoolOptionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetNodePoolOptionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetNodePoolOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetNodePoolOptionsResponse") + } + return +} + +// getNodePoolOptions implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getNodePoolOptions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePoolOptions/{nodePoolOptionId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetNodePoolOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePoolOptions/GetNodePoolOptions" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetNodePoolOptions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVirtualNode Get the details of a virtual node. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetVirtualNode.go.html to see an example of how to use GetVirtualNode API. +// A default retry strategy applies to this operation GetVirtualNode() +func (client ContainerEngineClient) GetVirtualNode(ctx context.Context, request GetVirtualNodeRequest) (response GetVirtualNodeResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVirtualNode, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVirtualNodeResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVirtualNodeResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVirtualNodeResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVirtualNodeResponse") + } + return +} + +// getVirtualNode implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getVirtualNode(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualNodePools/{virtualNodePoolId}/virtualNodes/{virtualNodeId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetVirtualNodeResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/GetVirtualNode" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetVirtualNode", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetVirtualNodePool Get the details of a virtual node pool. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetVirtualNodePool.go.html to see an example of how to use GetVirtualNodePool API. +// A default retry strategy applies to this operation GetVirtualNodePool() +func (client ContainerEngineClient) GetVirtualNodePool(ctx context.Context, request GetVirtualNodePoolRequest) (response GetVirtualNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getVirtualNodePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetVirtualNodePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetVirtualNodePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetVirtualNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetVirtualNodePoolResponse") + } + return +} + +// getVirtualNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getVirtualNodePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualNodePools/{virtualNodePoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetVirtualNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/GetVirtualNodePool" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetVirtualNodePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetWorkRequest Get the details of a work request. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetWorkRequest.go.html to see an example of how to use GetWorkRequest API. +// A default retry strategy applies to this operation GetWorkRequest() +func (client ContainerEngineClient) GetWorkRequest(ctx context.Context, request GetWorkRequestRequest) (response GetWorkRequestResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getWorkRequest, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetWorkRequestResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetWorkRequestResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetWorkRequestResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWorkRequestResponse") + } + return +} + +// getWorkRequest implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getWorkRequest(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetWorkRequestResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequest/GetWorkRequest" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetWorkRequest", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetWorkloadMapping Get the specified workloadMapping for a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetWorkloadMapping.go.html to see an example of how to use GetWorkloadMapping API. +// A default retry strategy applies to this operation GetWorkloadMapping() +func (client ContainerEngineClient) GetWorkloadMapping(ctx context.Context, request GetWorkloadMappingRequest) (response GetWorkloadMappingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getWorkloadMapping, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetWorkloadMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetWorkloadMappingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetWorkloadMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetWorkloadMappingResponse") + } + return +} + +// getWorkloadMapping implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) getWorkloadMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}/workloadMappings/{workloadMappingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetWorkloadMappingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/GetWorkloadMapping" + err = common.PostProcessServiceError(err, "ContainerEngine", "GetWorkloadMapping", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// InstallAddon Install the specified addon for a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/InstallAddon.go.html to see an example of how to use InstallAddon API. +// A default retry strategy applies to this operation InstallAddon() +func (client ContainerEngineClient) InstallAddon(ctx context.Context, request InstallAddonRequest) (response InstallAddonResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.installAddon, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = InstallAddonResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = InstallAddonResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(InstallAddonResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into InstallAddonResponse") + } + return +} + +// installAddon implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) installAddon(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/addons", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response InstallAddonResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/InstallAddon" + err = common.PostProcessServiceError(err, "ContainerEngine", "InstallAddon", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListAddonOptions Get list of supported addons for a specific kubernetes version. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListAddonOptions.go.html to see an example of how to use ListAddonOptions API. +// A default retry strategy applies to this operation ListAddonOptions() +func (client ContainerEngineClient) ListAddonOptions(ctx context.Context, request ListAddonOptionsRequest) (response ListAddonOptionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listAddonOptions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListAddonOptionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListAddonOptionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListAddonOptionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAddonOptionsResponse") + } + return +} + +// listAddonOptions implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listAddonOptions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/addonOptions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListAddonOptionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/AddonOptionSummary/ListAddonOptions" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListAddonOptions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListAddons List addon for a provisioned cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListAddons.go.html to see an example of how to use ListAddons API. +// A default retry strategy applies to this operation ListAddons() +func (client ContainerEngineClient) ListAddons(ctx context.Context, request ListAddonsRequest) (response ListAddonsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listAddons, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListAddonsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListAddonsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListAddonsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListAddonsResponse") + } + return +} + +// listAddons implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listAddons(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}/addons", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListAddonsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/ListAddons" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListAddons", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListClusters List all the cluster objects in a compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListClusters.go.html to see an example of how to use ListClusters API. +// A default retry strategy applies to this operation ListClusters() +func (client ContainerEngineClient) ListClusters(ctx context.Context, request ListClustersRequest) (response ListClustersResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listClusters, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListClustersResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListClustersResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListClustersResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListClustersResponse") + } + return +} + +// listClusters implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listClusters(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListClustersResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterSummary/ListClusters" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListClusters", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListNodePools List all the node pools in a compartment, and optionally filter by cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListNodePools.go.html to see an example of how to use ListNodePools API. +// A default retry strategy applies to this operation ListNodePools() +func (client ContainerEngineClient) ListNodePools(ctx context.Context, request ListNodePoolsRequest) (response ListNodePoolsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listNodePools, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListNodePoolsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListNodePoolsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListNodePoolsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListNodePoolsResponse") + } + return +} + +// listNodePools implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listNodePools(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/nodePools", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListNodePoolsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePoolSummary/ListNodePools" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListNodePools", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPodShapes List all the Pod Shapes in a compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListPodShapes.go.html to see an example of how to use ListPodShapes API. +// A default retry strategy applies to this operation ListPodShapes() +func (client ContainerEngineClient) ListPodShapes(ctx context.Context, request ListPodShapesRequest) (response ListPodShapesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPodShapes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListPodShapesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListPodShapesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListPodShapesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPodShapesResponse") + } + return +} + +// listPodShapes implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listPodShapes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/podShapes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListPodShapesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/PodShapeSummary/ListPodShapes" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListPodShapes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVirtualNodePools List all the virtual node pools in a compartment, and optionally filter by cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListVirtualNodePools.go.html to see an example of how to use ListVirtualNodePools API. +// A default retry strategy applies to this operation ListVirtualNodePools() +func (client ContainerEngineClient) ListVirtualNodePools(ctx context.Context, request ListVirtualNodePoolsRequest) (response ListVirtualNodePoolsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualNodePools, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVirtualNodePoolsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVirtualNodePoolsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVirtualNodePoolsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualNodePoolsResponse") + } + return +} + +// listVirtualNodePools implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listVirtualNodePools(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualNodePools", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListVirtualNodePoolsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePoolSummary/ListVirtualNodePools" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListVirtualNodePools", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListVirtualNodes List virtual nodes in a virtual node pool. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListVirtualNodes.go.html to see an example of how to use ListVirtualNodes API. +// A default retry strategy applies to this operation ListVirtualNodes() +func (client ContainerEngineClient) ListVirtualNodes(ctx context.Context, request ListVirtualNodesRequest) (response ListVirtualNodesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listVirtualNodes, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListVirtualNodesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListVirtualNodesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListVirtualNodesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListVirtualNodesResponse") + } + return +} + +// listVirtualNodes implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listVirtualNodes(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/virtualNodePools/{virtualNodePoolId}/virtualNodes", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListVirtualNodesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/ListVirtualNodes" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListVirtualNodes", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestErrors Get the errors of a work request. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrors API. +// A default retry strategy applies to this operation ListWorkRequestErrors() +func (client ContainerEngineClient) ListWorkRequestErrors(ctx context.Context, request ListWorkRequestErrorsRequest) (response ListWorkRequestErrorsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestErrors, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestErrorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestErrorsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestErrorsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestErrorsResponse") + } + return +} + +// listWorkRequestErrors implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listWorkRequestErrors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/errors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestErrorsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestError/ListWorkRequestErrors" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListWorkRequestErrors", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequestLogs Get the logs of a work request. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogs API. +// A default retry strategy applies to this operation ListWorkRequestLogs() +func (client ContainerEngineClient) ListWorkRequestLogs(ctx context.Context, request ListWorkRequestLogsRequest) (response ListWorkRequestLogsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequestLogs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestLogsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestLogsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestLogsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestLogsResponse") + } + return +} + +// listWorkRequestLogs implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listWorkRequestLogs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests/{workRequestId}/logs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestLogsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestLogEntry/ListWorkRequestLogs" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListWorkRequestLogs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkRequests List all work requests in a compartment. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListWorkRequests.go.html to see an example of how to use ListWorkRequests API. +// A default retry strategy applies to this operation ListWorkRequests() +func (client ContainerEngineClient) ListWorkRequests(ctx context.Context, request ListWorkRequestsRequest) (response ListWorkRequestsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkRequests, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkRequestsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkRequestsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkRequestsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkRequestsResponse") + } + return +} + +// listWorkRequests implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listWorkRequests(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/workRequests", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkRequestsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestSummary/ListWorkRequests" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListWorkRequests", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListWorkloadMappings List workloadMappings for a provisioned cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListWorkloadMappings.go.html to see an example of how to use ListWorkloadMappings API. +// A default retry strategy applies to this operation ListWorkloadMappings() +func (client ContainerEngineClient) ListWorkloadMappings(ctx context.Context, request ListWorkloadMappingsRequest) (response ListWorkloadMappingsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listWorkloadMappings, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListWorkloadMappingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListWorkloadMappingsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListWorkloadMappingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListWorkloadMappingsResponse") + } + return +} + +// listWorkloadMappings implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) listWorkloadMappings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/clusters/{clusterId}/workloadMappings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListWorkloadMappingsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMappingSummary/ListWorkloadMappings" + err = common.PostProcessServiceError(err, "ContainerEngine", "ListWorkloadMappings", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// StartCredentialRotation Start cluster credential rotation by adding new credentials, old credentials will still work after this operation. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/StartCredentialRotation.go.html to see an example of how to use StartCredentialRotation API. +// A default retry strategy applies to this operation StartCredentialRotation() +func (client ContainerEngineClient) StartCredentialRotation(ctx context.Context, request StartCredentialRotationRequest) (response StartCredentialRotationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.startCredentialRotation, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = StartCredentialRotationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = StartCredentialRotationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(StartCredentialRotationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into StartCredentialRotationResponse") + } + return +} + +// startCredentialRotation implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) startCredentialRotation(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/actions/startCredentialRotation", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response StartCredentialRotationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/StartCredentialRotation" + err = common.PostProcessServiceError(err, "ContainerEngine", "StartCredentialRotation", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateAddon Update addon details for a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateAddon.go.html to see an example of how to use UpdateAddon API. +// A default retry strategy applies to this operation UpdateAddon() +func (client ContainerEngineClient) UpdateAddon(ctx context.Context, request UpdateAddonRequest) (response UpdateAddonResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateAddon, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateAddonResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateAddonResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateAddonResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateAddonResponse") + } + return +} + +// updateAddon implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) updateAddon(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/clusters/{clusterId}/addons/{addonName}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateAddonResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateAddon" + err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateAddon", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateCluster Update the details of a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateCluster.go.html to see an example of how to use UpdateCluster API. +// A default retry strategy applies to this operation UpdateCluster() +func (client ContainerEngineClient) UpdateCluster(ctx context.Context, request UpdateClusterRequest) (response UpdateClusterResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCluster, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateClusterResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateClusterResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateClusterResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateClusterResponse") + } + return +} + +// updateCluster implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) updateCluster(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/clusters/{clusterId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateClusterResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateCluster" + err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateCluster", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateClusterEndpointConfig Update the details of the cluster endpoint configuration. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateClusterEndpointConfig.go.html to see an example of how to use UpdateClusterEndpointConfig API. +// A default retry strategy applies to this operation UpdateClusterEndpointConfig() +func (client ContainerEngineClient) UpdateClusterEndpointConfig(ctx context.Context, request UpdateClusterEndpointConfigRequest) (response UpdateClusterEndpointConfigResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateClusterEndpointConfig, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateClusterEndpointConfigResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateClusterEndpointConfigResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateClusterEndpointConfigResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateClusterEndpointConfigResponse") + } + return +} + +// updateClusterEndpointConfig implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) updateClusterEndpointConfig(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/clusters/{clusterId}/actions/updateEndpointConfig", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateClusterEndpointConfigResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateClusterEndpointConfig" + err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateClusterEndpointConfig", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateNodePool Update the details of a node pool. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateNodePool.go.html to see an example of how to use UpdateNodePool API. +// A default retry strategy applies to this operation UpdateNodePool() +func (client ContainerEngineClient) UpdateNodePool(ctx context.Context, request UpdateNodePoolRequest) (response UpdateNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateNodePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateNodePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateNodePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateNodePoolResponse") + } + return +} + +// updateNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) updateNodePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/nodePools/{nodePoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/UpdateNodePool" + err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateNodePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateVirtualNodePool Update the details of a virtual node pool. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateVirtualNodePool.go.html to see an example of how to use UpdateVirtualNodePool API. +// A default retry strategy applies to this operation UpdateVirtualNodePool() +func (client ContainerEngineClient) UpdateVirtualNodePool(ctx context.Context, request UpdateVirtualNodePoolRequest) (response UpdateVirtualNodePoolResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateVirtualNodePool, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateVirtualNodePoolResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateVirtualNodePoolResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateVirtualNodePoolResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateVirtualNodePoolResponse") + } + return +} + +// updateVirtualNodePool implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) updateVirtualNodePool(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/virtualNodePools/{virtualNodePoolId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateVirtualNodePoolResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/UpdateVirtualNodePool" + err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateVirtualNodePool", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateWorkloadMapping Update workloadMapping details for a cluster. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateWorkloadMapping.go.html to see an example of how to use UpdateWorkloadMapping API. +// A default retry strategy applies to this operation UpdateWorkloadMapping() +func (client ContainerEngineClient) UpdateWorkloadMapping(ctx context.Context, request UpdateWorkloadMappingRequest) (response UpdateWorkloadMappingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateWorkloadMapping, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateWorkloadMappingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateWorkloadMappingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateWorkloadMappingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateWorkloadMappingResponse") + } + return +} + +// updateWorkloadMapping implements the OCIOperation interface (enables retrying operations) +func (client ContainerEngineClient) updateWorkloadMapping(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/clusters/{clusterId}/workloadMappings/{workloadMappingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateWorkloadMappingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/UpdateWorkloadMapping" + err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateWorkloadMapping", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_details.go new file mode 100644 index 000000000..b7fe3ddc5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_details.go @@ -0,0 +1,144 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateClusterDetails The properties that define a request to create a cluster. +type CreateClusterDetails struct { + + // The name of the cluster. Avoid entering confidential information. + Name *string `mandatory:"true" json:"name"` + + // The OCID of the compartment in which to create the cluster. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the virtual cloud network (VCN) in which to create the cluster. + VcnId *string `mandatory:"true" json:"vcnId"` + + // The version of Kubernetes to install into the cluster masters. + KubernetesVersion *string `mandatory:"true" json:"kubernetesVersion"` + + // The network configuration for access to the Cluster control plane. + EndpointConfig *CreateClusterEndpointConfigDetails `mandatory:"false" json:"endpointConfig"` + + // The OCID of the KMS key to be used as the master encryption key for Kubernetes secret encryption. + // When used, `kubernetesVersion` must be at least `v1.13.0`. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Optional attributes for the cluster. + Options *ClusterCreateOptions `mandatory:"false" json:"options"` + + // The image verification policy for signature validation. Once a policy is created and enabled with + // one or more kms keys, the policy will ensure all images deployed has been signed with the key(s) + // attached to the policy. + ImagePolicyConfig *CreateImagePolicyConfigDetails `mandatory:"false" json:"imagePolicyConfig"` + + // Available CNIs and network options for existing and new node pools of the cluster + ClusterPodNetworkOptions []ClusterPodNetworkOptionDetails `mandatory:"false" json:"clusterPodNetworkOptions"` + + // Type of cluster + Type ClusterTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m CreateClusterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateClusterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingClusterTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetClusterTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateClusterDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + EndpointConfig *CreateClusterEndpointConfigDetails `json:"endpointConfig"` + KmsKeyId *string `json:"kmsKeyId"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + Options *ClusterCreateOptions `json:"options"` + ImagePolicyConfig *CreateImagePolicyConfigDetails `json:"imagePolicyConfig"` + ClusterPodNetworkOptions []clusterpodnetworkoptiondetails `json:"clusterPodNetworkOptions"` + Type ClusterTypeEnum `json:"type"` + Name *string `json:"name"` + CompartmentId *string `json:"compartmentId"` + VcnId *string `json:"vcnId"` + KubernetesVersion *string `json:"kubernetesVersion"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.EndpointConfig = model.EndpointConfig + + m.KmsKeyId = model.KmsKeyId + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.Options = model.Options + + m.ImagePolicyConfig = model.ImagePolicyConfig + + m.ClusterPodNetworkOptions = make([]ClusterPodNetworkOptionDetails, len(model.ClusterPodNetworkOptions)) + for i, n := range model.ClusterPodNetworkOptions { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.ClusterPodNetworkOptions[i] = nn.(ClusterPodNetworkOptionDetails) + } else { + m.ClusterPodNetworkOptions[i] = nil + } + } + m.Type = model.Type + + m.Name = model.Name + + m.CompartmentId = model.CompartmentId + + m.VcnId = model.VcnId + + m.KubernetesVersion = model.KubernetesVersion + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_endpoint_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_endpoint_config_details.go new file mode 100644 index 000000000..9a00e3ad1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_endpoint_config_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateClusterEndpointConfigDetails The properties that define the network configuration for the Cluster endpoint. +type CreateClusterEndpointConfigDetails struct { + + // The OCID of the regional subnet in which to place the Cluster endpoint. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // A list of the OCIDs of the network security groups (NSGs) to apply to the cluster endpoint. For more information about NSGs, see NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Whether the cluster should be assigned a public IP address. Defaults to false. If set to true on a private subnet, the cluster provisioning will fail. + IsPublicIpEnabled *bool `mandatory:"false" json:"isPublicIpEnabled"` +} + +func (m CreateClusterEndpointConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateClusterEndpointConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_kubeconfig_content_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_kubeconfig_content_details.go new file mode 100644 index 000000000..0524c448b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_kubeconfig_content_details.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateClusterKubeconfigContentDetails The properties that define a request to create a cluster kubeconfig. +type CreateClusterKubeconfigContentDetails struct { + + // The version of the kubeconfig token. Supported value 2.0.0 + TokenVersion *string `mandatory:"false" json:"tokenVersion"` + + // Deprecated. This field is no longer used. + Expiration *int `mandatory:"false" json:"expiration"` + + // The endpoint to target. A cluster may have multiple endpoints exposed but the kubeconfig can only target one at a time. + Endpoint CreateClusterKubeconfigContentDetailsEndpointEnum `mandatory:"false" json:"endpoint,omitempty"` +} + +func (m CreateClusterKubeconfigContentDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateClusterKubeconfigContentDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingCreateClusterKubeconfigContentDetailsEndpointEnum(string(m.Endpoint)); !ok && m.Endpoint != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Endpoint: %s. Supported values are: %s.", m.Endpoint, strings.Join(GetCreateClusterKubeconfigContentDetailsEndpointEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateClusterKubeconfigContentDetailsEndpointEnum Enum with underlying type: string +type CreateClusterKubeconfigContentDetailsEndpointEnum string + +// Set of constants representing the allowable values for CreateClusterKubeconfigContentDetailsEndpointEnum +const ( + CreateClusterKubeconfigContentDetailsEndpointLegacyKubernetes CreateClusterKubeconfigContentDetailsEndpointEnum = "LEGACY_KUBERNETES" + CreateClusterKubeconfigContentDetailsEndpointPublicEndpoint CreateClusterKubeconfigContentDetailsEndpointEnum = "PUBLIC_ENDPOINT" + CreateClusterKubeconfigContentDetailsEndpointPrivateEndpoint CreateClusterKubeconfigContentDetailsEndpointEnum = "PRIVATE_ENDPOINT" + CreateClusterKubeconfigContentDetailsEndpointVcnHostname CreateClusterKubeconfigContentDetailsEndpointEnum = "VCN_HOSTNAME" +) + +var mappingCreateClusterKubeconfigContentDetailsEndpointEnum = map[string]CreateClusterKubeconfigContentDetailsEndpointEnum{ + "LEGACY_KUBERNETES": CreateClusterKubeconfigContentDetailsEndpointLegacyKubernetes, + "PUBLIC_ENDPOINT": CreateClusterKubeconfigContentDetailsEndpointPublicEndpoint, + "PRIVATE_ENDPOINT": CreateClusterKubeconfigContentDetailsEndpointPrivateEndpoint, + "VCN_HOSTNAME": CreateClusterKubeconfigContentDetailsEndpointVcnHostname, +} + +var mappingCreateClusterKubeconfigContentDetailsEndpointEnumLowerCase = map[string]CreateClusterKubeconfigContentDetailsEndpointEnum{ + "legacy_kubernetes": CreateClusterKubeconfigContentDetailsEndpointLegacyKubernetes, + "public_endpoint": CreateClusterKubeconfigContentDetailsEndpointPublicEndpoint, + "private_endpoint": CreateClusterKubeconfigContentDetailsEndpointPrivateEndpoint, + "vcn_hostname": CreateClusterKubeconfigContentDetailsEndpointVcnHostname, +} + +// GetCreateClusterKubeconfigContentDetailsEndpointEnumValues Enumerates the set of values for CreateClusterKubeconfigContentDetailsEndpointEnum +func GetCreateClusterKubeconfigContentDetailsEndpointEnumValues() []CreateClusterKubeconfigContentDetailsEndpointEnum { + values := make([]CreateClusterKubeconfigContentDetailsEndpointEnum, 0) + for _, v := range mappingCreateClusterKubeconfigContentDetailsEndpointEnum { + values = append(values, v) + } + return values +} + +// GetCreateClusterKubeconfigContentDetailsEndpointEnumStringValues Enumerates the set of values in String for CreateClusterKubeconfigContentDetailsEndpointEnum +func GetCreateClusterKubeconfigContentDetailsEndpointEnumStringValues() []string { + return []string{ + "LEGACY_KUBERNETES", + "PUBLIC_ENDPOINT", + "PRIVATE_ENDPOINT", + "VCN_HOSTNAME", + } +} + +// GetMappingCreateClusterKubeconfigContentDetailsEndpointEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCreateClusterKubeconfigContentDetailsEndpointEnum(val string) (CreateClusterKubeconfigContentDetailsEndpointEnum, bool) { + enum, ok := mappingCreateClusterKubeconfigContentDetailsEndpointEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_request_response.go new file mode 100644 index 000000000..934710458 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_cluster_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateClusterRequest wrapper for the CreateCluster operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateCluster.go.html to see an example of how to use CreateClusterRequest. +type CreateClusterRequest struct { + + // The details of the cluster to create. + CreateClusterDetails `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if + // the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateClusterResponse wrapper for the CreateCluster operation +type CreateClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_image_policy_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_image_policy_config_details.go new file mode 100644 index 000000000..dbbfedada --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_image_policy_config_details.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateImagePolicyConfigDetails The properties that define a image verification policy. +type CreateImagePolicyConfigDetails struct { + + // Whether the image verification policy is enabled. Defaults to false. If set to true, the images will be verified against the policy at runtime. + IsPolicyEnabled *bool `mandatory:"false" json:"isPolicyEnabled"` + + // A list of KMS key details. + KeyDetails []KeyDetails `mandatory:"false" json:"keyDetails"` +} + +func (m CreateImagePolicyConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateImagePolicyConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_kubeconfig_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_kubeconfig_request_response.go new file mode 100644 index 000000000..f31c8e45a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_kubeconfig_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// CreateKubeconfigRequest wrapper for the CreateKubeconfig operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateKubeconfig.go.html to see an example of how to use CreateKubeconfigRequest. +type CreateKubeconfigRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The details of the cluster kubeconfig to create. + CreateClusterKubeconfigContentDetails `contributesTo:"body"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateKubeconfigRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateKubeconfigRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateKubeconfigRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateKubeconfigRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateKubeconfigRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateKubeconfigResponse wrapper for the CreateKubeconfig operation +type CreateKubeconfigResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateKubeconfigResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateKubeconfigResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_details.go new file mode 100644 index 000000000..2f13ea482 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_details.go @@ -0,0 +1,176 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateNodePoolDetails The properties that define a request to create a node pool. +type CreateNodePoolDetails struct { + + // The OCID of the compartment in which the node pool exists. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the cluster to which this node pool is attached. + ClusterId *string `mandatory:"true" json:"clusterId"` + + // The name of the node pool. Avoid entering confidential information. + Name *string `mandatory:"true" json:"name"` + + // The name of the node shape of the nodes in the node pool. + NodeShape *string `mandatory:"true" json:"nodeShape"` + + // The version of Kubernetes to install on the nodes in the node pool. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // A list of key/value pairs to add to each underlying OCI instance in the node pool on launch. + NodeMetadata map[string]string `mandatory:"false" json:"nodeMetadata"` + + // Deprecated. Use `nodeSourceDetails` instead. + // If you specify values for both, this value is ignored. + // The name of the image running on the nodes in the node pool. + NodeImageName *string `mandatory:"false" json:"nodeImageName"` + + // Specify the source to use to launch nodes in the node pool. Currently, image is the only supported source. + NodeSourceDetails NodeSourceDetails `mandatory:"false" json:"nodeSourceDetails"` + + // Specify the configuration of the shape to launch nodes in the node pool. + NodeShapeConfig *CreateNodeShapeConfigDetails `mandatory:"false" json:"nodeShapeConfig"` + + // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. + InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` + + // The SSH public key on each node in the node pool on launch. + SshPublicKey *string `mandatory:"false" json:"sshPublicKey"` + + // Optional, default to 1. The number of nodes to create in each subnet specified in subnetIds property. + // When used, subnetIds is required. This property is deprecated, use nodeConfigDetails instead. + QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` + + // The OCIDs of the subnets in which to place nodes for this node pool. When used, quantityPerSubnet + // can be provided. This property is deprecated, use nodeConfigDetails. Exactly one of the + // subnetIds or nodeConfigDetails properties must be specified. + SubnetIds []string `mandatory:"false" json:"subnetIds"` + + // The configuration of nodes in the node pool. Exactly one of the + // subnetIds or nodeConfigDetails properties must be specified. + NodeConfigDetails *CreateNodePoolNodeConfigDetails `mandatory:"false" json:"nodeConfigDetails"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + NodeEvictionNodePoolSettings *NodeEvictionNodePoolSettings `mandatory:"false" json:"nodeEvictionNodePoolSettings"` + + NodePoolCyclingDetails *NodePoolCyclingDetails `mandatory:"false" json:"nodePoolCyclingDetails"` +} + +func (m CreateNodePoolDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateNodePoolDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateNodePoolDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + KubernetesVersion *string `json:"kubernetesVersion"` + NodeMetadata map[string]string `json:"nodeMetadata"` + NodeImageName *string `json:"nodeImageName"` + NodeSourceDetails nodesourcedetails `json:"nodeSourceDetails"` + NodeShapeConfig *CreateNodeShapeConfigDetails `json:"nodeShapeConfig"` + InitialNodeLabels []KeyValue `json:"initialNodeLabels"` + SshPublicKey *string `json:"sshPublicKey"` + QuantityPerSubnet *int `json:"quantityPerSubnet"` + SubnetIds []string `json:"subnetIds"` + NodeConfigDetails *CreateNodePoolNodeConfigDetails `json:"nodeConfigDetails"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + NodeEvictionNodePoolSettings *NodeEvictionNodePoolSettings `json:"nodeEvictionNodePoolSettings"` + NodePoolCyclingDetails *NodePoolCyclingDetails `json:"nodePoolCyclingDetails"` + CompartmentId *string `json:"compartmentId"` + ClusterId *string `json:"clusterId"` + Name *string `json:"name"` + NodeShape *string `json:"nodeShape"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.KubernetesVersion = model.KubernetesVersion + + m.NodeMetadata = model.NodeMetadata + + m.NodeImageName = model.NodeImageName + + nn, e = model.NodeSourceDetails.UnmarshalPolymorphicJSON(model.NodeSourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.NodeSourceDetails = nn.(NodeSourceDetails) + } else { + m.NodeSourceDetails = nil + } + + m.NodeShapeConfig = model.NodeShapeConfig + + m.InitialNodeLabels = make([]KeyValue, len(model.InitialNodeLabels)) + copy(m.InitialNodeLabels, model.InitialNodeLabels) + m.SshPublicKey = model.SshPublicKey + + m.QuantityPerSubnet = model.QuantityPerSubnet + + m.SubnetIds = make([]string, len(model.SubnetIds)) + copy(m.SubnetIds, model.SubnetIds) + m.NodeConfigDetails = model.NodeConfigDetails + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.NodeEvictionNodePoolSettings = model.NodeEvictionNodePoolSettings + + m.NodePoolCyclingDetails = model.NodePoolCyclingDetails + + m.CompartmentId = model.CompartmentId + + m.ClusterId = model.ClusterId + + m.Name = model.Name + + m.NodeShape = model.NodeShape + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_node_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_node_config_details.go new file mode 100644 index 000000000..caf3056bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_node_config_details.go @@ -0,0 +1,116 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateNodePoolNodeConfigDetails The size and placement configuration of nodes in the node pool. +type CreateNodePoolNodeConfigDetails struct { + + // The number of nodes that should be in the node pool. + Size *int `mandatory:"true" json:"size"` + + // The placement configurations for the node pool. Provide one placement + // configuration for each availability domain in which you intend to launch a node. + // To use the node pool with a regional subnet, provide a placement configuration for + // each availability domain, and include the regional subnet in each placement + // configuration. + PlacementConfigs []NodePoolPlacementConfigDetails `mandatory:"true" json:"placementConfigs"` + + // The OCIDs of the Network Security Group(s) to associate nodes for this node pool with. For more information about NSGs, see NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The OCID of the Key Management Service key assigned to the boot volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // Whether to enable in-transit encryption for the data volume's paravirtualized attachment. This field applies to both block volumes and boot volumes. The default value is false. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The CNI related configuration of pods in the node pool. + NodePoolPodNetworkOptionDetails NodePoolPodNetworkOptionDetails `mandatory:"false" json:"nodePoolPodNetworkOptionDetails"` +} + +func (m CreateNodePoolNodeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateNodePoolNodeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateNodePoolNodeConfigDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + NsgIds []string `json:"nsgIds"` + KmsKeyId *string `json:"kmsKeyId"` + IsPvEncryptionInTransitEnabled *bool `json:"isPvEncryptionInTransitEnabled"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + NodePoolPodNetworkOptionDetails nodepoolpodnetworkoptiondetails `json:"nodePoolPodNetworkOptionDetails"` + Size *int `json:"size"` + PlacementConfigs []NodePoolPlacementConfigDetails `json:"placementConfigs"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.KmsKeyId = model.KmsKeyId + + m.IsPvEncryptionInTransitEnabled = model.IsPvEncryptionInTransitEnabled + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + nn, e = model.NodePoolPodNetworkOptionDetails.UnmarshalPolymorphicJSON(model.NodePoolPodNetworkOptionDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.NodePoolPodNetworkOptionDetails = nn.(NodePoolPodNetworkOptionDetails) + } else { + m.NodePoolPodNetworkOptionDetails = nil + } + + m.Size = model.Size + + m.PlacementConfigs = make([]NodePoolPlacementConfigDetails, len(model.PlacementConfigs)) + copy(m.PlacementConfigs, model.PlacementConfigs) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_request_response.go new file mode 100644 index 000000000..d63f06b88 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_pool_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateNodePoolRequest wrapper for the CreateNodePool operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateNodePool.go.html to see an example of how to use CreateNodePoolRequest. +type CreateNodePoolRequest struct { + + // The details of the node pool to create. + CreateNodePoolDetails `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if + // the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateNodePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateNodePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateNodePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateNodePoolResponse wrapper for the CreateNodePool operation +type CreateNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_shape_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_shape_config_details.go new file mode 100644 index 000000000..b4a4e022e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_node_shape_config_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateNodeShapeConfigDetails The shape configuration of the nodes. +type CreateNodeShapeConfigDetails struct { + + // The total number of OCPUs available to each node in the node pool. + // See here (https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/Shape/) for details. + Ocpus *float32 `mandatory:"false" json:"ocpus"` + + // The total amount of memory available to each node, in gigabytes. + MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` +} + +func (m CreateNodeShapeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateNodeShapeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_virtual_node_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_virtual_node_pool_details.go new file mode 100644 index 000000000..ba8d283e6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_virtual_node_pool_details.go @@ -0,0 +1,77 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateVirtualNodePoolDetails The properties that define a request to create a virtual node pool. +type CreateVirtualNodePoolDetails struct { + + // Compartment of the virtual node pool. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The cluster the virtual node pool is associated with. A virtual node pool can only be associated with one cluster. + ClusterId *string `mandatory:"true" json:"clusterId"` + + // Display name of the virtual node pool. This is a non-unique value. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The list of placement configurations which determines where Virtual Nodes will be provisioned across as it relates to the subnet and availability domains. The size attribute determines how many we evenly spread across these placement configurations + PlacementConfigurations []PlacementConfiguration `mandatory:"true" json:"placementConfigurations"` + + // Initial labels that will be added to the Kubernetes Virtual Node object when it registers. + InitialVirtualNodeLabels []InitialVirtualNodeLabel `mandatory:"false" json:"initialVirtualNodeLabels"` + + // A taint is a collection of . These taints will be applied to the Virtual Nodes of this Virtual Node Pool for Kubernetes scheduling. + Taints []Taint `mandatory:"false" json:"taints"` + + // The number of Virtual Nodes that should be in the Virtual Node Pool. The placement configurations determine where these virtual nodes are placed. + Size *int `mandatory:"false" json:"size"` + + // List of network security group id's applied to the Virtual Node VNIC. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The pod configuration for pods run on virtual nodes of this virtual node pool. + PodConfiguration *PodConfiguration `mandatory:"false" json:"podConfiguration"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + VirtualNodeTags *VirtualNodeTags `mandatory:"false" json:"virtualNodeTags"` +} + +func (m CreateVirtualNodePoolDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateVirtualNodePoolDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_virtual_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_virtual_node_pool_request_response.go new file mode 100644 index 000000000..359e45b76 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_virtual_node_pool_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateVirtualNodePoolRequest wrapper for the CreateVirtualNodePool operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateVirtualNodePool.go.html to see an example of how to use CreateVirtualNodePoolRequest. +type CreateVirtualNodePoolRequest struct { + + // The details of the virtual node pool to create. + CreateVirtualNodePoolDetails `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if + // the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateVirtualNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateVirtualNodePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateVirtualNodePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateVirtualNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateVirtualNodePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateVirtualNodePoolResponse wrapper for the CreateVirtualNodePool operation +type CreateVirtualNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateVirtualNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateVirtualNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_workload_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_workload_mapping_details.go new file mode 100644 index 000000000..c154a7050 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_workload_mapping_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateWorkloadMappingDetails The properties that define a workloadMapping +type CreateWorkloadMappingDetails struct { + + // The namespace of the workloadMapping. + Namespace *string `mandatory:"true" json:"namespace"` + + // The OCID of the mapped customer compartment. + MappedCompartmentId *string `mandatory:"true" json:"mappedCompartmentId"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateWorkloadMappingDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateWorkloadMappingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_workload_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_workload_mapping_request_response.go new file mode 100644 index 000000000..7c4f31628 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/create_workload_mapping_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateWorkloadMappingRequest wrapper for the CreateWorkloadMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/CreateWorkloadMapping.go.html to see an example of how to use CreateWorkloadMappingRequest. +type CreateWorkloadMappingRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The details of the workloadMapping to be create. + CreateWorkloadMappingDetails `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if + // the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateWorkloadMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateWorkloadMappingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateWorkloadMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateWorkloadMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateWorkloadMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateWorkloadMappingResponse wrapper for the CreateWorkloadMapping operation +type CreateWorkloadMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkloadMapping instance + WorkloadMapping `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateWorkloadMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateWorkloadMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/credential_rotation_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/credential_rotation_status.go new file mode 100644 index 000000000..50903c9cf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/credential_rotation_status.go @@ -0,0 +1,156 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CredentialRotationStatus Information regarding cluster's credential rotation. +type CredentialRotationStatus struct { + + // Credential rotation status of a kubernetes cluster + // IN_PROGRESS: Issuing new credentials to kubernetes cluster control plane and worker nodes or retiring old credentials from kubernetes cluster control plane and worker nodes. + // WAITING: Waiting for customer to invoke the complete rotation action or the automcatic complete rotation action. + // COMPLETED: New credentials are functional on kuberentes cluster. + Status CredentialRotationStatusStatusEnum `mandatory:"true" json:"status"` + + // Details of a kuberenetes cluster credential rotation status: + // ISSUING_NEW_CREDENTIALS: Credential rotation is in progress. Starting to issue new credentials to kubernetes cluster control plane and worker nodes. + // NEW_CREDENTIALS_ISSUED: New credentials are added. At this stage cluster has both old and new credentials and is awaiting old credentials retirement. + // RETIRING_OLD_CREDENTIALS: Retirement of old credentials is in progress. Starting to remove old credentials from kubernetes cluster control plane and worker nodes. + // COMPLETED: Credential rotation is complete. Old credentials are retired. + StatusDetails CredentialRotationStatusStatusDetailsEnum `mandatory:"true" json:"statusDetails"` + + // The time by which retirement of old credentials should start. + TimeAutoCompletionScheduled *common.SDKTime `mandatory:"false" json:"timeAutoCompletionScheduled"` +} + +func (m CredentialRotationStatus) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CredentialRotationStatus) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCredentialRotationStatusStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetCredentialRotationStatusStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingCredentialRotationStatusStatusDetailsEnum(string(m.StatusDetails)); !ok && m.StatusDetails != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for StatusDetails: %s. Supported values are: %s.", m.StatusDetails, strings.Join(GetCredentialRotationStatusStatusDetailsEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CredentialRotationStatusStatusEnum Enum with underlying type: string +type CredentialRotationStatusStatusEnum string + +// Set of constants representing the allowable values for CredentialRotationStatusStatusEnum +const ( + CredentialRotationStatusStatusInProgress CredentialRotationStatusStatusEnum = "IN_PROGRESS" + CredentialRotationStatusStatusWaiting CredentialRotationStatusStatusEnum = "WAITING" + CredentialRotationStatusStatusCompleted CredentialRotationStatusStatusEnum = "COMPLETED" +) + +var mappingCredentialRotationStatusStatusEnum = map[string]CredentialRotationStatusStatusEnum{ + "IN_PROGRESS": CredentialRotationStatusStatusInProgress, + "WAITING": CredentialRotationStatusStatusWaiting, + "COMPLETED": CredentialRotationStatusStatusCompleted, +} + +var mappingCredentialRotationStatusStatusEnumLowerCase = map[string]CredentialRotationStatusStatusEnum{ + "in_progress": CredentialRotationStatusStatusInProgress, + "waiting": CredentialRotationStatusStatusWaiting, + "completed": CredentialRotationStatusStatusCompleted, +} + +// GetCredentialRotationStatusStatusEnumValues Enumerates the set of values for CredentialRotationStatusStatusEnum +func GetCredentialRotationStatusStatusEnumValues() []CredentialRotationStatusStatusEnum { + values := make([]CredentialRotationStatusStatusEnum, 0) + for _, v := range mappingCredentialRotationStatusStatusEnum { + values = append(values, v) + } + return values +} + +// GetCredentialRotationStatusStatusEnumStringValues Enumerates the set of values in String for CredentialRotationStatusStatusEnum +func GetCredentialRotationStatusStatusEnumStringValues() []string { + return []string{ + "IN_PROGRESS", + "WAITING", + "COMPLETED", + } +} + +// GetMappingCredentialRotationStatusStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCredentialRotationStatusStatusEnum(val string) (CredentialRotationStatusStatusEnum, bool) { + enum, ok := mappingCredentialRotationStatusStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// CredentialRotationStatusStatusDetailsEnum Enum with underlying type: string +type CredentialRotationStatusStatusDetailsEnum string + +// Set of constants representing the allowable values for CredentialRotationStatusStatusDetailsEnum +const ( + CredentialRotationStatusStatusDetailsIssuingNewCredentials CredentialRotationStatusStatusDetailsEnum = "ISSUING_NEW_CREDENTIALS" + CredentialRotationStatusStatusDetailsNewCredentialsIssued CredentialRotationStatusStatusDetailsEnum = "NEW_CREDENTIALS_ISSUED" + CredentialRotationStatusStatusDetailsRetiringOldCredentials CredentialRotationStatusStatusDetailsEnum = "RETIRING_OLD_CREDENTIALS" + CredentialRotationStatusStatusDetailsCompleted CredentialRotationStatusStatusDetailsEnum = "COMPLETED" +) + +var mappingCredentialRotationStatusStatusDetailsEnum = map[string]CredentialRotationStatusStatusDetailsEnum{ + "ISSUING_NEW_CREDENTIALS": CredentialRotationStatusStatusDetailsIssuingNewCredentials, + "NEW_CREDENTIALS_ISSUED": CredentialRotationStatusStatusDetailsNewCredentialsIssued, + "RETIRING_OLD_CREDENTIALS": CredentialRotationStatusStatusDetailsRetiringOldCredentials, + "COMPLETED": CredentialRotationStatusStatusDetailsCompleted, +} + +var mappingCredentialRotationStatusStatusDetailsEnumLowerCase = map[string]CredentialRotationStatusStatusDetailsEnum{ + "issuing_new_credentials": CredentialRotationStatusStatusDetailsIssuingNewCredentials, + "new_credentials_issued": CredentialRotationStatusStatusDetailsNewCredentialsIssued, + "retiring_old_credentials": CredentialRotationStatusStatusDetailsRetiringOldCredentials, + "completed": CredentialRotationStatusStatusDetailsCompleted, +} + +// GetCredentialRotationStatusStatusDetailsEnumValues Enumerates the set of values for CredentialRotationStatusStatusDetailsEnum +func GetCredentialRotationStatusStatusDetailsEnumValues() []CredentialRotationStatusStatusDetailsEnum { + values := make([]CredentialRotationStatusStatusDetailsEnum, 0) + for _, v := range mappingCredentialRotationStatusStatusDetailsEnum { + values = append(values, v) + } + return values +} + +// GetCredentialRotationStatusStatusDetailsEnumStringValues Enumerates the set of values in String for CredentialRotationStatusStatusDetailsEnum +func GetCredentialRotationStatusStatusDetailsEnumStringValues() []string { + return []string{ + "ISSUING_NEW_CREDENTIALS", + "NEW_CREDENTIALS_ISSUED", + "RETIRING_OLD_CREDENTIALS", + "COMPLETED", + } +} + +// GetMappingCredentialRotationStatusStatusDetailsEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCredentialRotationStatusStatusDetailsEnum(val string) (CredentialRotationStatusStatusDetailsEnum, bool) { + enum, ok := mappingCredentialRotationStatusStatusDetailsEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_cluster_request_response.go new file mode 100644 index 000000000..162fb193c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_cluster_request_response.go @@ -0,0 +1,95 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteClusterRequest wrapper for the DeleteCluster operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteCluster.go.html to see an example of how to use DeleteClusterRequest. +type DeleteClusterRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteClusterResponse wrapper for the DeleteCluster operation +type DeleteClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_node_pool_request_response.go new file mode 100644 index 000000000..b6415945c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_node_pool_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteNodePoolRequest wrapper for the DeleteNodePool operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteNodePool.go.html to see an example of how to use DeleteNodePoolRequest. +type DeleteNodePoolRequest struct { + + // The OCID of the node pool. + NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Duration after which OKE will give up eviction of the pods on the node. + // PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M + OverrideEvictionGraceDuration *string `mandatory:"false" contributesTo:"query" name:"overrideEvictionGraceDuration"` + + // If the underlying compute instance should be deleted if you cannot evict all the pods in grace period + IsForceDeletionAfterOverrideGraceDuration *bool `mandatory:"false" contributesTo:"query" name:"isForceDeletionAfterOverrideGraceDuration"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteNodePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteNodePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteNodePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteNodePoolResponse wrapper for the DeleteNodePool operation +type DeleteNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_node_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_node_request_response.go new file mode 100644 index 000000000..f99104b08 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_node_request_response.go @@ -0,0 +1,108 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteNodeRequest wrapper for the DeleteNode operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteNode.go.html to see an example of how to use DeleteNodeRequest. +type DeleteNodeRequest struct { + + // The OCID of the node pool. + NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"` + + // The OCID of the compute instance. + NodeId *string `mandatory:"true" contributesTo:"path" name:"nodeId"` + + // If the nodepool should be scaled down after the node is deleted. + IsDecrementSize *bool `mandatory:"false" contributesTo:"query" name:"isDecrementSize"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Duration after which OKE will give up eviction of the pods on the node. + // PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M + OverrideEvictionGraceDuration *string `mandatory:"false" contributesTo:"query" name:"overrideEvictionGraceDuration"` + + // If the underlying compute instance should be deleted if you cannot evict all the pods in grace period + IsForceDeletionAfterOverrideGraceDuration *bool `mandatory:"false" contributesTo:"query" name:"isForceDeletionAfterOverrideGraceDuration"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteNodeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteNodeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteNodeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteNodeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteNodeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteNodeResponse wrapper for the DeleteNode operation +type DeleteNodeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteNodeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteNodeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_virtual_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_virtual_node_pool_request_response.go new file mode 100644 index 000000000..5cc62ebc8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_virtual_node_pool_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteVirtualNodePoolRequest wrapper for the DeleteVirtualNodePool operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteVirtualNodePool.go.html to see an example of how to use DeleteVirtualNodePoolRequest. +type DeleteVirtualNodePoolRequest struct { + + // The OCID of the virtual node pool. + VirtualNodePoolId *string `mandatory:"true" contributesTo:"path" name:"virtualNodePoolId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Duration after which Sk8s will give up eviction of the pods on the node. + // PT0M will indicate you want to delete the virtual node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M + OverrideEvictionGraceDurationVnp *string `mandatory:"false" contributesTo:"query" name:"overrideEvictionGraceDurationVnp"` + + // If the underlying compute instance should be deleted if you cannot evict all the pods in grace period + IsForceDeletionAfterOverrideGraceDurationVnp *bool `mandatory:"false" contributesTo:"query" name:"isForceDeletionAfterOverrideGraceDurationVnp"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteVirtualNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteVirtualNodePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteVirtualNodePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteVirtualNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteVirtualNodePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteVirtualNodePoolResponse wrapper for the DeleteVirtualNodePool operation +type DeleteVirtualNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteVirtualNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteVirtualNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_work_request_request_response.go new file mode 100644 index 000000000..b030cdcbf --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_work_request_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteWorkRequestRequest wrapper for the DeleteWorkRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteWorkRequest.go.html to see an example of how to use DeleteWorkRequestRequest. +type DeleteWorkRequestRequest struct { + + // The OCID of the work request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteWorkRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteWorkRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteWorkRequestResponse wrapper for the DeleteWorkRequest operation +type DeleteWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_workload_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_workload_mapping_request_response.go new file mode 100644 index 000000000..f2c8ff3b8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/delete_workload_mapping_request_response.go @@ -0,0 +1,96 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteWorkloadMappingRequest wrapper for the DeleteWorkloadMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DeleteWorkloadMapping.go.html to see an example of how to use DeleteWorkloadMappingRequest. +type DeleteWorkloadMappingRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The OCID of the workloadMapping. + WorkloadMappingId *string `mandatory:"true" contributesTo:"path" name:"workloadMappingId"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteWorkloadMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteWorkloadMappingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteWorkloadMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteWorkloadMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteWorkloadMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteWorkloadMappingResponse wrapper for the DeleteWorkloadMapping operation +type DeleteWorkloadMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteWorkloadMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteWorkloadMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/disable_addon_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/disable_addon_request_response.go new file mode 100644 index 000000000..1f428d3e3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/disable_addon_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DisableAddonRequest wrapper for the DisableAddon operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/DisableAddon.go.html to see an example of how to use DisableAddonRequest. +type DisableAddonRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The name of the addon. + AddonName *string `mandatory:"true" contributesTo:"path" name:"addonName"` + + // Whether existing addon resources should be deleted or not. True would remove the underlying resources completely. + IsRemoveExistingAddOn *bool `mandatory:"true" contributesTo:"query" name:"isRemoveExistingAddOn"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DisableAddonRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DisableAddonRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DisableAddonRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DisableAddonRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DisableAddonRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DisableAddonResponse wrapper for the DisableAddon operation +type DisableAddonResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DisableAddonResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DisableAddonResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/flannel_overlay_cluster_pod_network_option_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/flannel_overlay_cluster_pod_network_option_details.go new file mode 100644 index 000000000..67caae6aa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/flannel_overlay_cluster_pod_network_option_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FlannelOverlayClusterPodNetworkOptionDetails Network options specific to using the flannel (FLANNEL_OVERLAY) CNI +type FlannelOverlayClusterPodNetworkOptionDetails struct { +} + +func (m FlannelOverlayClusterPodNetworkOptionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FlannelOverlayClusterPodNetworkOptionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m FlannelOverlayClusterPodNetworkOptionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeFlannelOverlayClusterPodNetworkOptionDetails FlannelOverlayClusterPodNetworkOptionDetails + s := struct { + DiscriminatorParam string `json:"cniType"` + MarshalTypeFlannelOverlayClusterPodNetworkOptionDetails + }{ + "FLANNEL_OVERLAY", + (MarshalTypeFlannelOverlayClusterPodNetworkOptionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/flannel_overlay_node_pool_pod_network_option_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/flannel_overlay_node_pool_pod_network_option_details.go new file mode 100644 index 000000000..ab642e48b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/flannel_overlay_node_pool_pod_network_option_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FlannelOverlayNodePoolPodNetworkOptionDetails Network options specific to using the flannel (FLANNEL_OVERLAY) CNI +type FlannelOverlayNodePoolPodNetworkOptionDetails struct { +} + +func (m FlannelOverlayNodePoolPodNetworkOptionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FlannelOverlayNodePoolPodNetworkOptionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m FlannelOverlayNodePoolPodNetworkOptionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeFlannelOverlayNodePoolPodNetworkOptionDetails FlannelOverlayNodePoolPodNetworkOptionDetails + s := struct { + DiscriminatorParam string `json:"cniType"` + MarshalTypeFlannelOverlayNodePoolPodNetworkOptionDetails + }{ + "FLANNEL_OVERLAY", + (MarshalTypeFlannelOverlayNodePoolPodNetworkOptionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_addon_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_addon_request_response.go new file mode 100644 index 000000000..0e2f5e28b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_addon_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetAddonRequest wrapper for the GetAddon operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetAddon.go.html to see an example of how to use GetAddonRequest. +type GetAddonRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The name of the addon. + AddonName *string `mandatory:"true" contributesTo:"path" name:"addonName"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetAddonRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetAddonRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetAddonRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetAddonRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetAddonRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetAddonResponse wrapper for the GetAddon operation +type GetAddonResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Addon instance + Addon `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetAddonResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetAddonResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_migrate_to_native_vcn_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_migrate_to_native_vcn_status_request_response.go new file mode 100644 index 000000000..90f618a02 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_migrate_to_native_vcn_status_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetClusterMigrateToNativeVcnStatusRequest wrapper for the GetClusterMigrateToNativeVcnStatus operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetClusterMigrateToNativeVcnStatus.go.html to see an example of how to use GetClusterMigrateToNativeVcnStatusRequest. +type GetClusterMigrateToNativeVcnStatusRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetClusterMigrateToNativeVcnStatusRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetClusterMigrateToNativeVcnStatusRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetClusterMigrateToNativeVcnStatusRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetClusterMigrateToNativeVcnStatusRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetClusterMigrateToNativeVcnStatusRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetClusterMigrateToNativeVcnStatusResponse wrapper for the GetClusterMigrateToNativeVcnStatus operation +type GetClusterMigrateToNativeVcnStatusResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ClusterMigrateToNativeVcnStatus instance + ClusterMigrateToNativeVcnStatus `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetClusterMigrateToNativeVcnStatusResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetClusterMigrateToNativeVcnStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_options_request_response.go new file mode 100644 index 000000000..5f43d622c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_options_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetClusterOptionsRequest wrapper for the GetClusterOptions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetClusterOptions.go.html to see an example of how to use GetClusterOptionsRequest. +type GetClusterOptionsRequest struct { + + // The id of the option set to retrieve. Use "all" get all options, or use a cluster ID to get options specific to the provided cluster. + ClusterOptionId *string `mandatory:"true" contributesTo:"path" name:"clusterOptionId"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetClusterOptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetClusterOptionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetClusterOptionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetClusterOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetClusterOptionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetClusterOptionsResponse wrapper for the GetClusterOptions operation +type GetClusterOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The ClusterOptions instance + ClusterOptions `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetClusterOptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetClusterOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_request_response.go new file mode 100644 index 000000000..cb8dee297 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_cluster_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetClusterRequest wrapper for the GetCluster operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetCluster.go.html to see an example of how to use GetClusterRequest. +type GetClusterRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetClusterResponse wrapper for the GetCluster operation +type GetClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Cluster instance + Cluster `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_credential_rotation_status_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_credential_rotation_status_request_response.go new file mode 100644 index 000000000..583fb2cd7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_credential_rotation_status_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCredentialRotationStatusRequest wrapper for the GetCredentialRotationStatus operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetCredentialRotationStatus.go.html to see an example of how to use GetCredentialRotationStatusRequest. +type GetCredentialRotationStatusRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCredentialRotationStatusRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCredentialRotationStatusRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCredentialRotationStatusRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCredentialRotationStatusRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCredentialRotationStatusRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCredentialRotationStatusResponse wrapper for the GetCredentialRotationStatus operation +type GetCredentialRotationStatusResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CredentialRotationStatus instance + CredentialRotationStatus `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCredentialRotationStatusResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCredentialRotationStatusResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_node_pool_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_node_pool_options_request_response.go new file mode 100644 index 000000000..6979f9e0e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_node_pool_options_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetNodePoolOptionsRequest wrapper for the GetNodePoolOptions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetNodePoolOptions.go.html to see an example of how to use GetNodePoolOptionsRequest. +type GetNodePoolOptionsRequest struct { + + // The id of the option set to retrieve. Use "all" get all options, or use a cluster ID to get options specific to the provided cluster. + NodePoolOptionId *string `mandatory:"true" contributesTo:"path" name:"nodePoolOptionId"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNodePoolOptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNodePoolOptionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetNodePoolOptionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNodePoolOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetNodePoolOptionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetNodePoolOptionsResponse wrapper for the GetNodePoolOptions operation +type GetNodePoolOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NodePoolOptions instance + NodePoolOptions `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNodePoolOptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNodePoolOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_node_pool_request_response.go new file mode 100644 index 000000000..fcbebde24 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_node_pool_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetNodePoolRequest wrapper for the GetNodePool operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetNodePool.go.html to see an example of how to use GetNodePoolRequest. +type GetNodePoolRequest struct { + + // The OCID of the node pool. + NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetNodePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetNodePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetNodePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetNodePoolResponse wrapper for the GetNodePool operation +type GetNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The NodePool instance + NodePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_virtual_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_virtual_node_pool_request_response.go new file mode 100644 index 000000000..487113db0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_virtual_node_pool_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVirtualNodePoolRequest wrapper for the GetVirtualNodePool operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetVirtualNodePool.go.html to see an example of how to use GetVirtualNodePoolRequest. +type GetVirtualNodePoolRequest struct { + + // The OCID of the virtual node pool. + VirtualNodePoolId *string `mandatory:"true" contributesTo:"path" name:"virtualNodePoolId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVirtualNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVirtualNodePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVirtualNodePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVirtualNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVirtualNodePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVirtualNodePoolResponse wrapper for the GetVirtualNodePool operation +type GetVirtualNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VirtualNodePool instance + VirtualNodePool `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVirtualNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVirtualNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_virtual_node_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_virtual_node_request_response.go new file mode 100644 index 000000000..20d6c9225 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_virtual_node_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetVirtualNodeRequest wrapper for the GetVirtualNode operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetVirtualNode.go.html to see an example of how to use GetVirtualNodeRequest. +type GetVirtualNodeRequest struct { + + // The OCID of the virtual node pool. + VirtualNodePoolId *string `mandatory:"true" contributesTo:"path" name:"virtualNodePoolId"` + + // The OCID of the virtual node. + VirtualNodeId *string `mandatory:"true" contributesTo:"path" name:"virtualNodeId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetVirtualNodeRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetVirtualNodeRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetVirtualNodeRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetVirtualNodeRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetVirtualNodeRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetVirtualNodeResponse wrapper for the GetVirtualNode operation +type GetVirtualNodeResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The VirtualNode instance + VirtualNode `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetVirtualNodeResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetVirtualNodeResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_work_request_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_work_request_request_response.go new file mode 100644 index 000000000..7e928d24a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_work_request_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetWorkRequestRequest wrapper for the GetWorkRequest operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetWorkRequest.go.html to see an example of how to use GetWorkRequestRequest. +type GetWorkRequestRequest struct { + + // The OCID of the work request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetWorkRequestRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetWorkRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetWorkRequestRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetWorkRequestResponse wrapper for the GetWorkRequest operation +type GetWorkRequestResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkRequest instance + WorkRequest `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // the number of seconds to should wait before polling this endpoint again + RetryAfter *int `presentIn:"header" name:"retry-after"` +} + +func (response GetWorkRequestResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetWorkRequestResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_workload_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_workload_mapping_request_response.go new file mode 100644 index 000000000..06b483960 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/get_workload_mapping_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetWorkloadMappingRequest wrapper for the GetWorkloadMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/GetWorkloadMapping.go.html to see an example of how to use GetWorkloadMappingRequest. +type GetWorkloadMappingRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The OCID of the workloadMapping. + WorkloadMappingId *string `mandatory:"true" contributesTo:"path" name:"workloadMappingId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetWorkloadMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetWorkloadMappingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetWorkloadMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetWorkloadMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetWorkloadMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetWorkloadMappingResponse wrapper for the GetWorkloadMapping operation +type GetWorkloadMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkloadMapping instance + WorkloadMapping `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetWorkloadMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetWorkloadMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/image_policy_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/image_policy_config.go new file mode 100644 index 000000000..00d7e80e0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/image_policy_config.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ImagePolicyConfig The properties that define a image verification policy. +type ImagePolicyConfig struct { + + // Whether the image verification policy is enabled. Defaults to false. If set to true, the images will be verified against the policy at runtime. + IsPolicyEnabled *bool `mandatory:"false" json:"isPolicyEnabled"` + + // A list of KMS key details. + KeyDetails []KeyDetails `mandatory:"false" json:"keyDetails"` +} + +func (m ImagePolicyConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ImagePolicyConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/initial_virtual_node_label.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/initial_virtual_node_label.go new file mode 100644 index 000000000..5e8c05182 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/initial_virtual_node_label.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InitialVirtualNodeLabel The properties that define a key value pair. +type InitialVirtualNodeLabel struct { + + // The key of the pair. + Key *string `mandatory:"false" json:"key"` + + // The value of the pair. + Value *string `mandatory:"false" json:"value"` +} + +func (m InitialVirtualNodeLabel) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InitialVirtualNodeLabel) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/install_addon_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/install_addon_details.go new file mode 100644 index 000000000..d4d09745f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/install_addon_details.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstallAddonDetails The properties that define to install/enable addon on a cluster +type InstallAddonDetails struct { + + // The name of the addon. + AddonName *string `mandatory:"true" json:"addonName"` + + // The version of addon to be installed. + Version *string `mandatory:"false" json:"version"` + + // Addon configuration details. + Configurations []AddonConfiguration `mandatory:"false" json:"configurations"` +} + +func (m InstallAddonDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstallAddonDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/install_addon_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/install_addon_request_response.go new file mode 100644 index 000000000..f28396b41 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/install_addon_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// InstallAddonRequest wrapper for the InstallAddon operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/InstallAddon.go.html to see an example of how to use InstallAddonRequest. +type InstallAddonRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The details of the addon to be installed. + InstallAddonDetails `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if + // the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request InstallAddonRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request InstallAddonRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request InstallAddonRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request InstallAddonRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request InstallAddonRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// InstallAddonResponse wrapper for the InstallAddon operation +type InstallAddonResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response InstallAddonResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response InstallAddonResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/key_details.go new file mode 100644 index 000000000..18be063db --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/key_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KeyDetails The properties that define the kms keys used by OKE for Image Signature verification. +type KeyDetails struct { + + // The OCIDs of the KMS key that will be used to verify whether the images are signed by an approved source. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` +} + +func (m KeyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m KeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/key_value.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/key_value.go new file mode 100644 index 000000000..e787c82af --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/key_value.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KeyValue The properties that define a key value pair. +type KeyValue struct { + + // The key of the pair. + Key *string `mandatory:"false" json:"key"` + + // The value of the pair. + Value *string `mandatory:"false" json:"value"` +} + +func (m KeyValue) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m KeyValue) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/kubernetes_network_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/kubernetes_network_config.go new file mode 100644 index 000000000..1e48b57f0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/kubernetes_network_config.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KubernetesNetworkConfig The properties that define the network configuration for Kubernetes. +type KubernetesNetworkConfig struct { + + // The CIDR block for Kubernetes pods. Optional, defaults to 10.244.0.0/16. + PodsCidr *string `mandatory:"false" json:"podsCidr"` + + // The CIDR block for Kubernetes services. Optional, defaults to 10.96.0.0/16. + ServicesCidr *string `mandatory:"false" json:"servicesCidr"` +} + +func (m KubernetesNetworkConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m KubernetesNetworkConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/kubernetes_versions_filters.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/kubernetes_versions_filters.go new file mode 100644 index 000000000..87bc039e3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/kubernetes_versions_filters.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// KubernetesVersionsFilters The range of kubernetes versions an addon can be configured. +type KubernetesVersionsFilters struct { + + // The earliest kubernetes version. + MinimalVersion *string `mandatory:"false" json:"minimalVersion"` + + // The latest kubernetes version. + MaximumVersion *string `mandatory:"false" json:"maximumVersion"` + + // The exact version of kubernetes that are compatible. + ExactKubernetesVersions []string `mandatory:"false" json:"exactKubernetesVersions"` +} + +func (m KubernetesVersionsFilters) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m KubernetesVersionsFilters) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_addon_options_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_addon_options_request_response.go new file mode 100644 index 000000000..dc572f11f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_addon_options_request_response.go @@ -0,0 +1,203 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAddonOptionsRequest wrapper for the ListAddonOptions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListAddonOptions.go.html to see an example of how to use ListAddonOptionsRequest. +type ListAddonOptionsRequest struct { + + // The kubernetes version to fetch the addons. + KubernetesVersion *string `mandatory:"true" contributesTo:"query" name:"kubernetesVersion"` + + // The name of the addon. + AddonName *string `mandatory:"false" contributesTo:"query" name:"addonName"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. + // 1 is the minimum, 1000 is the maximum. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListAddonOptionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListAddonOptionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListAddonOptionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAddonOptionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListAddonOptionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAddonOptionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListAddonOptionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAddonOptionsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListAddonOptionsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListAddonOptionsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListAddonOptionsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAddonOptionsResponse wrapper for the ListAddonOptions operation +type ListAddonOptionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []AddonOptionSummary instances + Items []AddonOptionSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListAddonOptionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAddonOptionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAddonOptionsSortOrderEnum Enum with underlying type: string +type ListAddonOptionsSortOrderEnum string + +// Set of constants representing the allowable values for ListAddonOptionsSortOrderEnum +const ( + ListAddonOptionsSortOrderAsc ListAddonOptionsSortOrderEnum = "ASC" + ListAddonOptionsSortOrderDesc ListAddonOptionsSortOrderEnum = "DESC" +) + +var mappingListAddonOptionsSortOrderEnum = map[string]ListAddonOptionsSortOrderEnum{ + "ASC": ListAddonOptionsSortOrderAsc, + "DESC": ListAddonOptionsSortOrderDesc, +} + +var mappingListAddonOptionsSortOrderEnumLowerCase = map[string]ListAddonOptionsSortOrderEnum{ + "asc": ListAddonOptionsSortOrderAsc, + "desc": ListAddonOptionsSortOrderDesc, +} + +// GetListAddonOptionsSortOrderEnumValues Enumerates the set of values for ListAddonOptionsSortOrderEnum +func GetListAddonOptionsSortOrderEnumValues() []ListAddonOptionsSortOrderEnum { + values := make([]ListAddonOptionsSortOrderEnum, 0) + for _, v := range mappingListAddonOptionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAddonOptionsSortOrderEnumStringValues Enumerates the set of values in String for ListAddonOptionsSortOrderEnum +func GetListAddonOptionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAddonOptionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddonOptionsSortOrderEnum(val string) (ListAddonOptionsSortOrderEnum, bool) { + enum, ok := mappingListAddonOptionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAddonOptionsSortByEnum Enum with underlying type: string +type ListAddonOptionsSortByEnum string + +// Set of constants representing the allowable values for ListAddonOptionsSortByEnum +const ( + ListAddonOptionsSortByName ListAddonOptionsSortByEnum = "NAME" + ListAddonOptionsSortByTimeCreated ListAddonOptionsSortByEnum = "TIME_CREATED" +) + +var mappingListAddonOptionsSortByEnum = map[string]ListAddonOptionsSortByEnum{ + "NAME": ListAddonOptionsSortByName, + "TIME_CREATED": ListAddonOptionsSortByTimeCreated, +} + +var mappingListAddonOptionsSortByEnumLowerCase = map[string]ListAddonOptionsSortByEnum{ + "name": ListAddonOptionsSortByName, + "time_created": ListAddonOptionsSortByTimeCreated, +} + +// GetListAddonOptionsSortByEnumValues Enumerates the set of values for ListAddonOptionsSortByEnum +func GetListAddonOptionsSortByEnumValues() []ListAddonOptionsSortByEnum { + values := make([]ListAddonOptionsSortByEnum, 0) + for _, v := range mappingListAddonOptionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAddonOptionsSortByEnumStringValues Enumerates the set of values in String for ListAddonOptionsSortByEnum +func GetListAddonOptionsSortByEnumStringValues() []string { + return []string{ + "NAME", + "TIME_CREATED", + } +} + +// GetMappingListAddonOptionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddonOptionsSortByEnum(val string) (ListAddonOptionsSortByEnum, bool) { + enum, ok := mappingListAddonOptionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_addons_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_addons_request_response.go new file mode 100644 index 000000000..a23f27849 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_addons_request_response.go @@ -0,0 +1,200 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListAddonsRequest wrapper for the ListAddons operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListAddons.go.html to see an example of how to use ListAddonsRequest. +type ListAddonsRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. + // 1 is the minimum, 1000 is the maximum. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListAddonsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListAddonsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListAddonsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListAddonsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListAddonsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListAddonsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListAddonsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListAddonsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListAddonsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListAddonsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListAddonsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListAddonsResponse wrapper for the ListAddons operation +type ListAddonsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []AddonSummary instances + Items []AddonSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListAddonsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListAddonsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListAddonsSortOrderEnum Enum with underlying type: string +type ListAddonsSortOrderEnum string + +// Set of constants representing the allowable values for ListAddonsSortOrderEnum +const ( + ListAddonsSortOrderAsc ListAddonsSortOrderEnum = "ASC" + ListAddonsSortOrderDesc ListAddonsSortOrderEnum = "DESC" +) + +var mappingListAddonsSortOrderEnum = map[string]ListAddonsSortOrderEnum{ + "ASC": ListAddonsSortOrderAsc, + "DESC": ListAddonsSortOrderDesc, +} + +var mappingListAddonsSortOrderEnumLowerCase = map[string]ListAddonsSortOrderEnum{ + "asc": ListAddonsSortOrderAsc, + "desc": ListAddonsSortOrderDesc, +} + +// GetListAddonsSortOrderEnumValues Enumerates the set of values for ListAddonsSortOrderEnum +func GetListAddonsSortOrderEnumValues() []ListAddonsSortOrderEnum { + values := make([]ListAddonsSortOrderEnum, 0) + for _, v := range mappingListAddonsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListAddonsSortOrderEnumStringValues Enumerates the set of values in String for ListAddonsSortOrderEnum +func GetListAddonsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListAddonsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddonsSortOrderEnum(val string) (ListAddonsSortOrderEnum, bool) { + enum, ok := mappingListAddonsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListAddonsSortByEnum Enum with underlying type: string +type ListAddonsSortByEnum string + +// Set of constants representing the allowable values for ListAddonsSortByEnum +const ( + ListAddonsSortByName ListAddonsSortByEnum = "NAME" + ListAddonsSortByTimeCreated ListAddonsSortByEnum = "TIME_CREATED" +) + +var mappingListAddonsSortByEnum = map[string]ListAddonsSortByEnum{ + "NAME": ListAddonsSortByName, + "TIME_CREATED": ListAddonsSortByTimeCreated, +} + +var mappingListAddonsSortByEnumLowerCase = map[string]ListAddonsSortByEnum{ + "name": ListAddonsSortByName, + "time_created": ListAddonsSortByTimeCreated, +} + +// GetListAddonsSortByEnumValues Enumerates the set of values for ListAddonsSortByEnum +func GetListAddonsSortByEnumValues() []ListAddonsSortByEnum { + values := make([]ListAddonsSortByEnum, 0) + for _, v := range mappingListAddonsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListAddonsSortByEnumStringValues Enumerates the set of values in String for ListAddonsSortByEnum +func GetListAddonsSortByEnumStringValues() []string { + return []string{ + "NAME", + "TIME_CREATED", + } +} + +// GetMappingListAddonsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListAddonsSortByEnum(val string) (ListAddonsSortByEnum, bool) { + enum, ok := mappingListAddonsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_clusters_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_clusters_request_response.go new file mode 100644 index 000000000..4ea045c9c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_clusters_request_response.go @@ -0,0 +1,216 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListClustersRequest wrapper for the ListClusters operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListClusters.go.html to see an example of how to use ListClustersRequest. +type ListClustersRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // A cluster lifecycle state to filter on. Can have multiple parameters of this name. + LifecycleState []ClusterLifecycleStateEnum `contributesTo:"query" name:"lifecycleState" omitEmpty:"true" collectionFormat:"multi"` + + // The name to filter on. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. + // 1 is the minimum, 1000 is the maximum. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListClustersSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListClustersSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListClustersRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListClustersRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListClustersRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListClustersRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListClustersRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + for _, val := range request.LifecycleState { + if _, ok := GetMappingClusterLifecycleStateEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", val, strings.Join(GetClusterLifecycleStateEnumStringValues(), ","))) + } + } + + if _, ok := GetMappingListClustersSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListClustersSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListClustersSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListClustersSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListClustersResponse wrapper for the ListClusters operation +type ListClustersResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []ClusterSummary instances + Items []ClusterSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListClustersResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListClustersResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListClustersSortOrderEnum Enum with underlying type: string +type ListClustersSortOrderEnum string + +// Set of constants representing the allowable values for ListClustersSortOrderEnum +const ( + ListClustersSortOrderAsc ListClustersSortOrderEnum = "ASC" + ListClustersSortOrderDesc ListClustersSortOrderEnum = "DESC" +) + +var mappingListClustersSortOrderEnum = map[string]ListClustersSortOrderEnum{ + "ASC": ListClustersSortOrderAsc, + "DESC": ListClustersSortOrderDesc, +} + +var mappingListClustersSortOrderEnumLowerCase = map[string]ListClustersSortOrderEnum{ + "asc": ListClustersSortOrderAsc, + "desc": ListClustersSortOrderDesc, +} + +// GetListClustersSortOrderEnumValues Enumerates the set of values for ListClustersSortOrderEnum +func GetListClustersSortOrderEnumValues() []ListClustersSortOrderEnum { + values := make([]ListClustersSortOrderEnum, 0) + for _, v := range mappingListClustersSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListClustersSortOrderEnumStringValues Enumerates the set of values in String for ListClustersSortOrderEnum +func GetListClustersSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListClustersSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListClustersSortOrderEnum(val string) (ListClustersSortOrderEnum, bool) { + enum, ok := mappingListClustersSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListClustersSortByEnum Enum with underlying type: string +type ListClustersSortByEnum string + +// Set of constants representing the allowable values for ListClustersSortByEnum +const ( + ListClustersSortById ListClustersSortByEnum = "ID" + ListClustersSortByName ListClustersSortByEnum = "NAME" + ListClustersSortByTimeCreated ListClustersSortByEnum = "TIME_CREATED" +) + +var mappingListClustersSortByEnum = map[string]ListClustersSortByEnum{ + "ID": ListClustersSortById, + "NAME": ListClustersSortByName, + "TIME_CREATED": ListClustersSortByTimeCreated, +} + +var mappingListClustersSortByEnumLowerCase = map[string]ListClustersSortByEnum{ + "id": ListClustersSortById, + "name": ListClustersSortByName, + "time_created": ListClustersSortByTimeCreated, +} + +// GetListClustersSortByEnumValues Enumerates the set of values for ListClustersSortByEnum +func GetListClustersSortByEnumValues() []ListClustersSortByEnum { + values := make([]ListClustersSortByEnum, 0) + for _, v := range mappingListClustersSortByEnum { + values = append(values, v) + } + return values +} + +// GetListClustersSortByEnumStringValues Enumerates the set of values in String for ListClustersSortByEnum +func GetListClustersSortByEnumStringValues() []string { + return []string{ + "ID", + "NAME", + "TIME_CREATED", + } +} + +// GetMappingListClustersSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListClustersSortByEnum(val string) (ListClustersSortByEnum, bool) { + enum, ok := mappingListClustersSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_node_pools_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_node_pools_request_response.go new file mode 100644 index 000000000..1b761b07d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_node_pools_request_response.go @@ -0,0 +1,219 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListNodePoolsRequest wrapper for the ListNodePools operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListNodePools.go.html to see an example of how to use ListNodePoolsRequest. +type ListNodePoolsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the cluster. + ClusterId *string `mandatory:"false" contributesTo:"query" name:"clusterId"` + + // The name to filter on. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. + // 1 is the minimum, 1000 is the maximum. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListNodePoolsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListNodePoolsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING] + LifecycleState []NodePoolLifecycleStateEnum `contributesTo:"query" name:"lifecycleState" omitEmpty:"true" collectionFormat:"multi"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListNodePoolsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListNodePoolsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListNodePoolsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListNodePoolsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListNodePoolsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListNodePoolsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListNodePoolsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListNodePoolsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListNodePoolsSortByEnumStringValues(), ","))) + } + for _, val := range request.LifecycleState { + if _, ok := GetMappingNodePoolLifecycleStateEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", val, strings.Join(GetNodePoolLifecycleStateEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListNodePoolsResponse wrapper for the ListNodePools operation +type ListNodePoolsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []NodePoolSummary instances + Items []NodePoolSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListNodePoolsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListNodePoolsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListNodePoolsSortOrderEnum Enum with underlying type: string +type ListNodePoolsSortOrderEnum string + +// Set of constants representing the allowable values for ListNodePoolsSortOrderEnum +const ( + ListNodePoolsSortOrderAsc ListNodePoolsSortOrderEnum = "ASC" + ListNodePoolsSortOrderDesc ListNodePoolsSortOrderEnum = "DESC" +) + +var mappingListNodePoolsSortOrderEnum = map[string]ListNodePoolsSortOrderEnum{ + "ASC": ListNodePoolsSortOrderAsc, + "DESC": ListNodePoolsSortOrderDesc, +} + +var mappingListNodePoolsSortOrderEnumLowerCase = map[string]ListNodePoolsSortOrderEnum{ + "asc": ListNodePoolsSortOrderAsc, + "desc": ListNodePoolsSortOrderDesc, +} + +// GetListNodePoolsSortOrderEnumValues Enumerates the set of values for ListNodePoolsSortOrderEnum +func GetListNodePoolsSortOrderEnumValues() []ListNodePoolsSortOrderEnum { + values := make([]ListNodePoolsSortOrderEnum, 0) + for _, v := range mappingListNodePoolsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListNodePoolsSortOrderEnumStringValues Enumerates the set of values in String for ListNodePoolsSortOrderEnum +func GetListNodePoolsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListNodePoolsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNodePoolsSortOrderEnum(val string) (ListNodePoolsSortOrderEnum, bool) { + enum, ok := mappingListNodePoolsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListNodePoolsSortByEnum Enum with underlying type: string +type ListNodePoolsSortByEnum string + +// Set of constants representing the allowable values for ListNodePoolsSortByEnum +const ( + ListNodePoolsSortById ListNodePoolsSortByEnum = "ID" + ListNodePoolsSortByName ListNodePoolsSortByEnum = "NAME" + ListNodePoolsSortByTimeCreated ListNodePoolsSortByEnum = "TIME_CREATED" +) + +var mappingListNodePoolsSortByEnum = map[string]ListNodePoolsSortByEnum{ + "ID": ListNodePoolsSortById, + "NAME": ListNodePoolsSortByName, + "TIME_CREATED": ListNodePoolsSortByTimeCreated, +} + +var mappingListNodePoolsSortByEnumLowerCase = map[string]ListNodePoolsSortByEnum{ + "id": ListNodePoolsSortById, + "name": ListNodePoolsSortByName, + "time_created": ListNodePoolsSortByTimeCreated, +} + +// GetListNodePoolsSortByEnumValues Enumerates the set of values for ListNodePoolsSortByEnum +func GetListNodePoolsSortByEnumValues() []ListNodePoolsSortByEnum { + values := make([]ListNodePoolsSortByEnum, 0) + for _, v := range mappingListNodePoolsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListNodePoolsSortByEnumStringValues Enumerates the set of values in String for ListNodePoolsSortByEnum +func GetListNodePoolsSortByEnumStringValues() []string { + return []string{ + "ID", + "NAME", + "TIME_CREATED", + } +} + +// GetMappingListNodePoolsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListNodePoolsSortByEnum(val string) (ListNodePoolsSortByEnum, bool) { + enum, ok := mappingListNodePoolsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_pod_shapes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_pod_shapes_request_response.go new file mode 100644 index 000000000..52f11e78d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_pod_shapes_request_response.go @@ -0,0 +1,210 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPodShapesRequest wrapper for the ListPodShapes operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListPodShapes.go.html to see an example of how to use ListPodShapesRequest. +type ListPodShapesRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The availability domain of the pod shape. + AvailabilityDomain *string `mandatory:"false" contributesTo:"query" name:"availabilityDomain"` + + // The name to filter on. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. + // 1 is the minimum, 1000 is the maximum. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListPodShapesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListPodShapesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPodShapesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPodShapesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPodShapesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPodShapesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPodShapesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListPodShapesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListPodShapesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPodShapesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListPodShapesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPodShapesResponse wrapper for the ListPodShapes operation +type ListPodShapesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []PodShapeSummary instances + Items []PodShapeSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListPodShapesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPodShapesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPodShapesSortOrderEnum Enum with underlying type: string +type ListPodShapesSortOrderEnum string + +// Set of constants representing the allowable values for ListPodShapesSortOrderEnum +const ( + ListPodShapesSortOrderAsc ListPodShapesSortOrderEnum = "ASC" + ListPodShapesSortOrderDesc ListPodShapesSortOrderEnum = "DESC" +) + +var mappingListPodShapesSortOrderEnum = map[string]ListPodShapesSortOrderEnum{ + "ASC": ListPodShapesSortOrderAsc, + "DESC": ListPodShapesSortOrderDesc, +} + +var mappingListPodShapesSortOrderEnumLowerCase = map[string]ListPodShapesSortOrderEnum{ + "asc": ListPodShapesSortOrderAsc, + "desc": ListPodShapesSortOrderDesc, +} + +// GetListPodShapesSortOrderEnumValues Enumerates the set of values for ListPodShapesSortOrderEnum +func GetListPodShapesSortOrderEnumValues() []ListPodShapesSortOrderEnum { + values := make([]ListPodShapesSortOrderEnum, 0) + for _, v := range mappingListPodShapesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPodShapesSortOrderEnumStringValues Enumerates the set of values in String for ListPodShapesSortOrderEnum +func GetListPodShapesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPodShapesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPodShapesSortOrderEnum(val string) (ListPodShapesSortOrderEnum, bool) { + enum, ok := mappingListPodShapesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPodShapesSortByEnum Enum with underlying type: string +type ListPodShapesSortByEnum string + +// Set of constants representing the allowable values for ListPodShapesSortByEnum +const ( + ListPodShapesSortById ListPodShapesSortByEnum = "ID" + ListPodShapesSortByName ListPodShapesSortByEnum = "NAME" + ListPodShapesSortByTimeCreated ListPodShapesSortByEnum = "TIME_CREATED" +) + +var mappingListPodShapesSortByEnum = map[string]ListPodShapesSortByEnum{ + "ID": ListPodShapesSortById, + "NAME": ListPodShapesSortByName, + "TIME_CREATED": ListPodShapesSortByTimeCreated, +} + +var mappingListPodShapesSortByEnumLowerCase = map[string]ListPodShapesSortByEnum{ + "id": ListPodShapesSortById, + "name": ListPodShapesSortByName, + "time_created": ListPodShapesSortByTimeCreated, +} + +// GetListPodShapesSortByEnumValues Enumerates the set of values for ListPodShapesSortByEnum +func GetListPodShapesSortByEnumValues() []ListPodShapesSortByEnum { + values := make([]ListPodShapesSortByEnum, 0) + for _, v := range mappingListPodShapesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPodShapesSortByEnumStringValues Enumerates the set of values in String for ListPodShapesSortByEnum +func GetListPodShapesSortByEnumStringValues() []string { + return []string{ + "ID", + "NAME", + "TIME_CREATED", + } +} + +// GetMappingListPodShapesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPodShapesSortByEnum(val string) (ListPodShapesSortByEnum, bool) { + enum, ok := mappingListPodShapesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_virtual_node_pools_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_virtual_node_pools_request_response.go new file mode 100644 index 000000000..c7d335cb5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_virtual_node_pools_request_response.go @@ -0,0 +1,219 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVirtualNodePoolsRequest wrapper for the ListVirtualNodePools operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListVirtualNodePools.go.html to see an example of how to use ListVirtualNodePoolsRequest. +type ListVirtualNodePoolsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The OCID of the cluster. + ClusterId *string `mandatory:"false" contributesTo:"query" name:"clusterId"` + + // The name to filter on. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. + // 1 is the minimum, 1000 is the maximum. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListVirtualNodePoolsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListVirtualNodePoolsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // A virtual node pool lifecycle state to filter on. Can have multiple parameters of this name. + LifecycleState []VirtualNodePoolLifecycleStateEnum `contributesTo:"query" name:"lifecycleState" omitEmpty:"true" collectionFormat:"multi"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVirtualNodePoolsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualNodePoolsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVirtualNodePoolsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualNodePoolsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVirtualNodePoolsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVirtualNodePoolsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVirtualNodePoolsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListVirtualNodePoolsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVirtualNodePoolsSortByEnumStringValues(), ","))) + } + for _, val := range request.LifecycleState { + if _, ok := GetMappingVirtualNodePoolLifecycleStateEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", val, strings.Join(GetVirtualNodePoolLifecycleStateEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVirtualNodePoolsResponse wrapper for the ListVirtualNodePools operation +type ListVirtualNodePoolsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VirtualNodePoolSummary instances + Items []VirtualNodePoolSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVirtualNodePoolsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualNodePoolsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVirtualNodePoolsSortOrderEnum Enum with underlying type: string +type ListVirtualNodePoolsSortOrderEnum string + +// Set of constants representing the allowable values for ListVirtualNodePoolsSortOrderEnum +const ( + ListVirtualNodePoolsSortOrderAsc ListVirtualNodePoolsSortOrderEnum = "ASC" + ListVirtualNodePoolsSortOrderDesc ListVirtualNodePoolsSortOrderEnum = "DESC" +) + +var mappingListVirtualNodePoolsSortOrderEnum = map[string]ListVirtualNodePoolsSortOrderEnum{ + "ASC": ListVirtualNodePoolsSortOrderAsc, + "DESC": ListVirtualNodePoolsSortOrderDesc, +} + +var mappingListVirtualNodePoolsSortOrderEnumLowerCase = map[string]ListVirtualNodePoolsSortOrderEnum{ + "asc": ListVirtualNodePoolsSortOrderAsc, + "desc": ListVirtualNodePoolsSortOrderDesc, +} + +// GetListVirtualNodePoolsSortOrderEnumValues Enumerates the set of values for ListVirtualNodePoolsSortOrderEnum +func GetListVirtualNodePoolsSortOrderEnumValues() []ListVirtualNodePoolsSortOrderEnum { + values := make([]ListVirtualNodePoolsSortOrderEnum, 0) + for _, v := range mappingListVirtualNodePoolsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVirtualNodePoolsSortOrderEnumStringValues Enumerates the set of values in String for ListVirtualNodePoolsSortOrderEnum +func GetListVirtualNodePoolsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVirtualNodePoolsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVirtualNodePoolsSortOrderEnum(val string) (ListVirtualNodePoolsSortOrderEnum, bool) { + enum, ok := mappingListVirtualNodePoolsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVirtualNodePoolsSortByEnum Enum with underlying type: string +type ListVirtualNodePoolsSortByEnum string + +// Set of constants representing the allowable values for ListVirtualNodePoolsSortByEnum +const ( + ListVirtualNodePoolsSortById ListVirtualNodePoolsSortByEnum = "ID" + ListVirtualNodePoolsSortByName ListVirtualNodePoolsSortByEnum = "NAME" + ListVirtualNodePoolsSortByTimeCreated ListVirtualNodePoolsSortByEnum = "TIME_CREATED" +) + +var mappingListVirtualNodePoolsSortByEnum = map[string]ListVirtualNodePoolsSortByEnum{ + "ID": ListVirtualNodePoolsSortById, + "NAME": ListVirtualNodePoolsSortByName, + "TIME_CREATED": ListVirtualNodePoolsSortByTimeCreated, +} + +var mappingListVirtualNodePoolsSortByEnumLowerCase = map[string]ListVirtualNodePoolsSortByEnum{ + "id": ListVirtualNodePoolsSortById, + "name": ListVirtualNodePoolsSortByName, + "time_created": ListVirtualNodePoolsSortByTimeCreated, +} + +// GetListVirtualNodePoolsSortByEnumValues Enumerates the set of values for ListVirtualNodePoolsSortByEnum +func GetListVirtualNodePoolsSortByEnumValues() []ListVirtualNodePoolsSortByEnum { + values := make([]ListVirtualNodePoolsSortByEnum, 0) + for _, v := range mappingListVirtualNodePoolsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVirtualNodePoolsSortByEnumStringValues Enumerates the set of values in String for ListVirtualNodePoolsSortByEnum +func GetListVirtualNodePoolsSortByEnumStringValues() []string { + return []string{ + "ID", + "NAME", + "TIME_CREATED", + } +} + +// GetMappingListVirtualNodePoolsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVirtualNodePoolsSortByEnum(val string) (ListVirtualNodePoolsSortByEnum, bool) { + enum, ok := mappingListVirtualNodePoolsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_virtual_nodes_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_virtual_nodes_request_response.go new file mode 100644 index 000000000..ce04ec8d3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_virtual_nodes_request_response.go @@ -0,0 +1,207 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListVirtualNodesRequest wrapper for the ListVirtualNodes operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListVirtualNodes.go.html to see an example of how to use ListVirtualNodesRequest. +type ListVirtualNodesRequest struct { + + // The OCID of the virtual node pool. + VirtualNodePoolId *string `mandatory:"true" contributesTo:"path" name:"virtualNodePoolId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The name to filter on. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. + // 1 is the minimum, 1000 is the maximum. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListVirtualNodesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListVirtualNodesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListVirtualNodesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListVirtualNodesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListVirtualNodesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListVirtualNodesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListVirtualNodesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListVirtualNodesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListVirtualNodesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListVirtualNodesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListVirtualNodesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListVirtualNodesResponse wrapper for the ListVirtualNodes operation +type ListVirtualNodesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []VirtualNodeSummary instances + Items []VirtualNodeSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListVirtualNodesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListVirtualNodesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListVirtualNodesSortOrderEnum Enum with underlying type: string +type ListVirtualNodesSortOrderEnum string + +// Set of constants representing the allowable values for ListVirtualNodesSortOrderEnum +const ( + ListVirtualNodesSortOrderAsc ListVirtualNodesSortOrderEnum = "ASC" + ListVirtualNodesSortOrderDesc ListVirtualNodesSortOrderEnum = "DESC" +) + +var mappingListVirtualNodesSortOrderEnum = map[string]ListVirtualNodesSortOrderEnum{ + "ASC": ListVirtualNodesSortOrderAsc, + "DESC": ListVirtualNodesSortOrderDesc, +} + +var mappingListVirtualNodesSortOrderEnumLowerCase = map[string]ListVirtualNodesSortOrderEnum{ + "asc": ListVirtualNodesSortOrderAsc, + "desc": ListVirtualNodesSortOrderDesc, +} + +// GetListVirtualNodesSortOrderEnumValues Enumerates the set of values for ListVirtualNodesSortOrderEnum +func GetListVirtualNodesSortOrderEnumValues() []ListVirtualNodesSortOrderEnum { + values := make([]ListVirtualNodesSortOrderEnum, 0) + for _, v := range mappingListVirtualNodesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListVirtualNodesSortOrderEnumStringValues Enumerates the set of values in String for ListVirtualNodesSortOrderEnum +func GetListVirtualNodesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListVirtualNodesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVirtualNodesSortOrderEnum(val string) (ListVirtualNodesSortOrderEnum, bool) { + enum, ok := mappingListVirtualNodesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListVirtualNodesSortByEnum Enum with underlying type: string +type ListVirtualNodesSortByEnum string + +// Set of constants representing the allowable values for ListVirtualNodesSortByEnum +const ( + ListVirtualNodesSortById ListVirtualNodesSortByEnum = "ID" + ListVirtualNodesSortByName ListVirtualNodesSortByEnum = "NAME" + ListVirtualNodesSortByTimeCreated ListVirtualNodesSortByEnum = "TIME_CREATED" +) + +var mappingListVirtualNodesSortByEnum = map[string]ListVirtualNodesSortByEnum{ + "ID": ListVirtualNodesSortById, + "NAME": ListVirtualNodesSortByName, + "TIME_CREATED": ListVirtualNodesSortByTimeCreated, +} + +var mappingListVirtualNodesSortByEnumLowerCase = map[string]ListVirtualNodesSortByEnum{ + "id": ListVirtualNodesSortById, + "name": ListVirtualNodesSortByName, + "time_created": ListVirtualNodesSortByTimeCreated, +} + +// GetListVirtualNodesSortByEnumValues Enumerates the set of values for ListVirtualNodesSortByEnum +func GetListVirtualNodesSortByEnumValues() []ListVirtualNodesSortByEnum { + values := make([]ListVirtualNodesSortByEnum, 0) + for _, v := range mappingListVirtualNodesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListVirtualNodesSortByEnumStringValues Enumerates the set of values in String for ListVirtualNodesSortByEnum +func GetListVirtualNodesSortByEnumStringValues() []string { + return []string{ + "ID", + "NAME", + "TIME_CREATED", + } +} + +// GetMappingListVirtualNodesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListVirtualNodesSortByEnum(val string) (ListVirtualNodesSortByEnum, bool) { + enum, ok := mappingListVirtualNodesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_request_errors_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_request_errors_request_response.go new file mode 100644 index 000000000..078de0ad5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_request_errors_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestErrorsRequest wrapper for the ListWorkRequestErrors operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrorsRequest. +type ListWorkRequestErrorsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the work request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestErrorsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestErrorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestErrorsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestErrorsResponse wrapper for the ListWorkRequestErrors operation +type ListWorkRequestErrorsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []WorkRequestError instance + Items []WorkRequestError `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestErrorsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_request_logs_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_request_logs_request_response.go new file mode 100644 index 000000000..6211a7b19 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_request_logs_request_response.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestLogsRequest wrapper for the ListWorkRequestLogs operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogsRequest. +type ListWorkRequestLogsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the work request. + WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestLogsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestLogsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestLogsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestLogsResponse wrapper for the ListWorkRequestLogs operation +type ListWorkRequestLogsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The []WorkRequestLogEntry instance + Items []WorkRequestLogEntry `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestLogsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_requests_request_response.go new file mode 100644 index 000000000..a232c5032 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_work_requests_request_response.go @@ -0,0 +1,273 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkRequestsRequest wrapper for the ListWorkRequests operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListWorkRequests.go.html to see an example of how to use ListWorkRequestsRequest. +type ListWorkRequestsRequest struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // The OCID of the cluster. + ClusterId *string `mandatory:"false" contributesTo:"query" name:"clusterId"` + + // The OCID of the resource associated with a work request + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // Type of the resource associated with a work request + ResourceType ListWorkRequestsResourceTypeEnum `mandatory:"false" contributesTo:"query" name:"resourceType" omitEmpty:"true"` + + // A work request status to filter on. Can have multiple parameters of this name. + Status []string `contributesTo:"query" name:"status" collectionFormat:"multi"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. + // 1 is the minimum, 1000 is the maximum. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListWorkRequestsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListWorkRequestsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkRequestsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkRequestsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkRequestsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkRequestsResourceTypeEnum(string(request.ResourceType)); !ok && request.ResourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ResourceType: %s. Supported values are: %s.", request.ResourceType, strings.Join(GetListWorkRequestsResourceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkRequestsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkRequestsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkRequestsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkRequestsResponse wrapper for the ListWorkRequests operation +type ListWorkRequestsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []WorkRequestSummary instances + Items []WorkRequestSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkRequestsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkRequestsResourceTypeEnum Enum with underlying type: string +type ListWorkRequestsResourceTypeEnum string + +// Set of constants representing the allowable values for ListWorkRequestsResourceTypeEnum +const ( + ListWorkRequestsResourceTypeCluster ListWorkRequestsResourceTypeEnum = "CLUSTER" + ListWorkRequestsResourceTypeNodepool ListWorkRequestsResourceTypeEnum = "NODEPOOL" +) + +var mappingListWorkRequestsResourceTypeEnum = map[string]ListWorkRequestsResourceTypeEnum{ + "CLUSTER": ListWorkRequestsResourceTypeCluster, + "NODEPOOL": ListWorkRequestsResourceTypeNodepool, +} + +var mappingListWorkRequestsResourceTypeEnumLowerCase = map[string]ListWorkRequestsResourceTypeEnum{ + "cluster": ListWorkRequestsResourceTypeCluster, + "nodepool": ListWorkRequestsResourceTypeNodepool, +} + +// GetListWorkRequestsResourceTypeEnumValues Enumerates the set of values for ListWorkRequestsResourceTypeEnum +func GetListWorkRequestsResourceTypeEnumValues() []ListWorkRequestsResourceTypeEnum { + values := make([]ListWorkRequestsResourceTypeEnum, 0) + for _, v := range mappingListWorkRequestsResourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsResourceTypeEnumStringValues Enumerates the set of values in String for ListWorkRequestsResourceTypeEnum +func GetListWorkRequestsResourceTypeEnumStringValues() []string { + return []string{ + "CLUSTER", + "NODEPOOL", + } +} + +// GetMappingListWorkRequestsResourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsResourceTypeEnum(val string) (ListWorkRequestsResourceTypeEnum, bool) { + enum, ok := mappingListWorkRequestsResourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestsSortOrderEnum Enum with underlying type: string +type ListWorkRequestsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortOrderEnum +const ( + ListWorkRequestsSortOrderAsc ListWorkRequestsSortOrderEnum = "ASC" + ListWorkRequestsSortOrderDesc ListWorkRequestsSortOrderEnum = "DESC" +) + +var mappingListWorkRequestsSortOrderEnum = map[string]ListWorkRequestsSortOrderEnum{ + "ASC": ListWorkRequestsSortOrderAsc, + "DESC": ListWorkRequestsSortOrderDesc, +} + +var mappingListWorkRequestsSortOrderEnumLowerCase = map[string]ListWorkRequestsSortOrderEnum{ + "asc": ListWorkRequestsSortOrderAsc, + "desc": ListWorkRequestsSortOrderDesc, +} + +// GetListWorkRequestsSortOrderEnumValues Enumerates the set of values for ListWorkRequestsSortOrderEnum +func GetListWorkRequestsSortOrderEnumValues() []ListWorkRequestsSortOrderEnum { + values := make([]ListWorkRequestsSortOrderEnum, 0) + for _, v := range mappingListWorkRequestsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkRequestsSortOrderEnum +func GetListWorkRequestsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkRequestsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsSortOrderEnum(val string) (ListWorkRequestsSortOrderEnum, bool) { + enum, ok := mappingListWorkRequestsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkRequestsSortByEnum Enum with underlying type: string +type ListWorkRequestsSortByEnum string + +// Set of constants representing the allowable values for ListWorkRequestsSortByEnum +const ( + ListWorkRequestsSortById ListWorkRequestsSortByEnum = "ID" + ListWorkRequestsSortByOperationType ListWorkRequestsSortByEnum = "OPERATION_TYPE" + ListWorkRequestsSortByStatus ListWorkRequestsSortByEnum = "STATUS" + ListWorkRequestsSortByTimeAccepted ListWorkRequestsSortByEnum = "TIME_ACCEPTED" + ListWorkRequestsSortByTimeStarted ListWorkRequestsSortByEnum = "TIME_STARTED" + ListWorkRequestsSortByTimeFinished ListWorkRequestsSortByEnum = "TIME_FINISHED" +) + +var mappingListWorkRequestsSortByEnum = map[string]ListWorkRequestsSortByEnum{ + "ID": ListWorkRequestsSortById, + "OPERATION_TYPE": ListWorkRequestsSortByOperationType, + "STATUS": ListWorkRequestsSortByStatus, + "TIME_ACCEPTED": ListWorkRequestsSortByTimeAccepted, + "TIME_STARTED": ListWorkRequestsSortByTimeStarted, + "TIME_FINISHED": ListWorkRequestsSortByTimeFinished, +} + +var mappingListWorkRequestsSortByEnumLowerCase = map[string]ListWorkRequestsSortByEnum{ + "id": ListWorkRequestsSortById, + "operation_type": ListWorkRequestsSortByOperationType, + "status": ListWorkRequestsSortByStatus, + "time_accepted": ListWorkRequestsSortByTimeAccepted, + "time_started": ListWorkRequestsSortByTimeStarted, + "time_finished": ListWorkRequestsSortByTimeFinished, +} + +// GetListWorkRequestsSortByEnumValues Enumerates the set of values for ListWorkRequestsSortByEnum +func GetListWorkRequestsSortByEnumValues() []ListWorkRequestsSortByEnum { + values := make([]ListWorkRequestsSortByEnum, 0) + for _, v := range mappingListWorkRequestsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkRequestsSortByEnumStringValues Enumerates the set of values in String for ListWorkRequestsSortByEnum +func GetListWorkRequestsSortByEnumStringValues() []string { + return []string{ + "ID", + "OPERATION_TYPE", + "STATUS", + "TIME_ACCEPTED", + "TIME_STARTED", + "TIME_FINISHED", + } +} + +// GetMappingListWorkRequestsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkRequestsSortByEnum(val string) (ListWorkRequestsSortByEnum, bool) { + enum, ok := mappingListWorkRequestsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_workload_mappings_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_workload_mappings_request_response.go new file mode 100644 index 000000000..2de1ead87 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/list_workload_mappings_request_response.go @@ -0,0 +1,200 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListWorkloadMappingsRequest wrapper for the ListWorkloadMappings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/ListWorkloadMappings.go.html to see an example of how to use ListWorkloadMappingsRequest. +type ListWorkloadMappingsRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. + // 1 is the minimum, 1000 is the maximum. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // For list pagination. The value of the `opc-next-page` response header from the previous "List" call. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The optional order in which to sort the results. + SortOrder ListWorkloadMappingsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The optional field to sort the results by. + SortBy ListWorkloadMappingsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListWorkloadMappingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListWorkloadMappingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListWorkloadMappingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListWorkloadMappingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListWorkloadMappingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListWorkloadMappingsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListWorkloadMappingsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListWorkloadMappingsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListWorkloadMappingsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListWorkloadMappingsResponse wrapper for the ListWorkloadMappings operation +type ListWorkloadMappingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of []WorkloadMappingSummary instances + Items []WorkloadMappingSummary `presentIn:"body"` + + // For list pagination. When this header appears in the response, additional pages of results remain. + // For important details about how pagination works, see List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ListWorkloadMappingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListWorkloadMappingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListWorkloadMappingsSortOrderEnum Enum with underlying type: string +type ListWorkloadMappingsSortOrderEnum string + +// Set of constants representing the allowable values for ListWorkloadMappingsSortOrderEnum +const ( + ListWorkloadMappingsSortOrderAsc ListWorkloadMappingsSortOrderEnum = "ASC" + ListWorkloadMappingsSortOrderDesc ListWorkloadMappingsSortOrderEnum = "DESC" +) + +var mappingListWorkloadMappingsSortOrderEnum = map[string]ListWorkloadMappingsSortOrderEnum{ + "ASC": ListWorkloadMappingsSortOrderAsc, + "DESC": ListWorkloadMappingsSortOrderDesc, +} + +var mappingListWorkloadMappingsSortOrderEnumLowerCase = map[string]ListWorkloadMappingsSortOrderEnum{ + "asc": ListWorkloadMappingsSortOrderAsc, + "desc": ListWorkloadMappingsSortOrderDesc, +} + +// GetListWorkloadMappingsSortOrderEnumValues Enumerates the set of values for ListWorkloadMappingsSortOrderEnum +func GetListWorkloadMappingsSortOrderEnumValues() []ListWorkloadMappingsSortOrderEnum { + values := make([]ListWorkloadMappingsSortOrderEnum, 0) + for _, v := range mappingListWorkloadMappingsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListWorkloadMappingsSortOrderEnumStringValues Enumerates the set of values in String for ListWorkloadMappingsSortOrderEnum +func GetListWorkloadMappingsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListWorkloadMappingsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkloadMappingsSortOrderEnum(val string) (ListWorkloadMappingsSortOrderEnum, bool) { + enum, ok := mappingListWorkloadMappingsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListWorkloadMappingsSortByEnum Enum with underlying type: string +type ListWorkloadMappingsSortByEnum string + +// Set of constants representing the allowable values for ListWorkloadMappingsSortByEnum +const ( + ListWorkloadMappingsSortByNamespace ListWorkloadMappingsSortByEnum = "NAMESPACE" + ListWorkloadMappingsSortByTimecreated ListWorkloadMappingsSortByEnum = "TIMECREATED" +) + +var mappingListWorkloadMappingsSortByEnum = map[string]ListWorkloadMappingsSortByEnum{ + "NAMESPACE": ListWorkloadMappingsSortByNamespace, + "TIMECREATED": ListWorkloadMappingsSortByTimecreated, +} + +var mappingListWorkloadMappingsSortByEnumLowerCase = map[string]ListWorkloadMappingsSortByEnum{ + "namespace": ListWorkloadMappingsSortByNamespace, + "timecreated": ListWorkloadMappingsSortByTimecreated, +} + +// GetListWorkloadMappingsSortByEnumValues Enumerates the set of values for ListWorkloadMappingsSortByEnum +func GetListWorkloadMappingsSortByEnumValues() []ListWorkloadMappingsSortByEnum { + values := make([]ListWorkloadMappingsSortByEnum, 0) + for _, v := range mappingListWorkloadMappingsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListWorkloadMappingsSortByEnumStringValues Enumerates the set of values in String for ListWorkloadMappingsSortByEnum +func GetListWorkloadMappingsSortByEnumStringValues() []string { + return []string{ + "NAMESPACE", + "TIMECREATED", + } +} + +// GetMappingListWorkloadMappingsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListWorkloadMappingsSortByEnum(val string) (ListWorkloadMappingsSortByEnum, bool) { + enum, ok := mappingListWorkloadMappingsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node.go new file mode 100644 index 000000000..cf8a5b44e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node.go @@ -0,0 +1,153 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Node The properties that define a node. +type Node struct { + + // The OCID of the compute instance backing this node. + Id *string `mandatory:"false" json:"id"` + + // The name of the node. + Name *string `mandatory:"false" json:"name"` + + // The version of Kubernetes this node is running. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // The name of the availability domain in which this node is placed. + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The OCID of the subnet in which this node is placed. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // The OCID of the node pool to which this node belongs. + NodePoolId *string `mandatory:"false" json:"nodePoolId"` + + // The fault domain of this node. + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // The private IP address of this node. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // The public IP address of this node. + PublicIp *string `mandatory:"false" json:"publicIp"` + + // An error that may be associated with the node. + NodeError *NodeError `mandatory:"false" json:"nodeError"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The state of the node. + LifecycleState NodeLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the node. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` +} + +func (m Node) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Node) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingNodeLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetNodeLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// NodeLifecycleStateEnum Enum with underlying type: string +type NodeLifecycleStateEnum string + +// Set of constants representing the allowable values for NodeLifecycleStateEnum +const ( + NodeLifecycleStateCreating NodeLifecycleStateEnum = "CREATING" + NodeLifecycleStateActive NodeLifecycleStateEnum = "ACTIVE" + NodeLifecycleStateUpdating NodeLifecycleStateEnum = "UPDATING" + NodeLifecycleStateDeleting NodeLifecycleStateEnum = "DELETING" + NodeLifecycleStateDeleted NodeLifecycleStateEnum = "DELETED" + NodeLifecycleStateFailing NodeLifecycleStateEnum = "FAILING" + NodeLifecycleStateInactive NodeLifecycleStateEnum = "INACTIVE" +) + +var mappingNodeLifecycleStateEnum = map[string]NodeLifecycleStateEnum{ + "CREATING": NodeLifecycleStateCreating, + "ACTIVE": NodeLifecycleStateActive, + "UPDATING": NodeLifecycleStateUpdating, + "DELETING": NodeLifecycleStateDeleting, + "DELETED": NodeLifecycleStateDeleted, + "FAILING": NodeLifecycleStateFailing, + "INACTIVE": NodeLifecycleStateInactive, +} + +var mappingNodeLifecycleStateEnumLowerCase = map[string]NodeLifecycleStateEnum{ + "creating": NodeLifecycleStateCreating, + "active": NodeLifecycleStateActive, + "updating": NodeLifecycleStateUpdating, + "deleting": NodeLifecycleStateDeleting, + "deleted": NodeLifecycleStateDeleted, + "failing": NodeLifecycleStateFailing, + "inactive": NodeLifecycleStateInactive, +} + +// GetNodeLifecycleStateEnumValues Enumerates the set of values for NodeLifecycleStateEnum +func GetNodeLifecycleStateEnumValues() []NodeLifecycleStateEnum { + values := make([]NodeLifecycleStateEnum, 0) + for _, v := range mappingNodeLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetNodeLifecycleStateEnumStringValues Enumerates the set of values in String for NodeLifecycleStateEnum +func GetNodeLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "DELETED", + "FAILING", + "INACTIVE", + } +} + +// GetMappingNodeLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNodeLifecycleStateEnum(val string) (NodeLifecycleStateEnum, bool) { + enum, ok := mappingNodeLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_error.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_error.go new file mode 100644 index 000000000..837fd903b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_error.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodeError The properties that define an upstream error while managing a node. +type NodeError struct { + + // A short error code that defines the upstream error, meant for programmatic parsing. See API Errors (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm). + Code *string `mandatory:"true" json:"code"` + + // A human-readable error string of the upstream error. + Message *string `mandatory:"true" json:"message"` + + // The status of the HTTP response encountered in the upstream error. + Status *string `mandatory:"false" json:"status"` + + // Unique Oracle-assigned identifier for the upstream request. If you need to contact Oracle about a particular upstream request, please provide the request ID. + OpcRequestId *string `mandatory:"false" json:"opc-request-id"` +} + +func (m NodeError) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodeError) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_eviction_node_pool_settings.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_eviction_node_pool_settings.go new file mode 100644 index 000000000..f9272eaba --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_eviction_node_pool_settings.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodeEvictionNodePoolSettings Node Eviction Details configuration +type NodeEvictionNodePoolSettings struct { + + // Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. + // Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M + EvictionGraceDuration *string `mandatory:"false" json:"evictionGraceDuration"` + + // If the underlying compute instance should be deleted if you cannot evict all the pods in grace period + IsForceDeleteAfterGraceDuration *bool `mandatory:"false" json:"isForceDeleteAfterGraceDuration"` +} + +func (m NodeEvictionNodePoolSettings) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodeEvictionNodePoolSettings) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool.go new file mode 100644 index 000000000..c5a0f8167 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool.go @@ -0,0 +1,224 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodePool A pool of compute nodes attached to a cluster. Avoid entering confidential information. +type NodePool struct { + + // The OCID of the node pool. + Id *string `mandatory:"false" json:"id"` + + // The state of the nodepool. + LifecycleState NodePoolLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the nodepool. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID of the compartment in which the node pool exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the cluster to which this node pool is attached. + ClusterId *string `mandatory:"false" json:"clusterId"` + + // The name of the node pool. + Name *string `mandatory:"false" json:"name"` + + // The version of Kubernetes running on the nodes in the node pool. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // A list of key/value pairs to add to each underlying OCI instance in the node pool on launch. + NodeMetadata map[string]string `mandatory:"false" json:"nodeMetadata"` + + // Deprecated. see `nodeSource`. The OCID of the image running on the nodes in the node pool. + NodeImageId *string `mandatory:"false" json:"nodeImageId"` + + // Deprecated. see `nodeSource`. The name of the image running on the nodes in the node pool. + NodeImageName *string `mandatory:"false" json:"nodeImageName"` + + // The shape configuration of the nodes. + NodeShapeConfig *NodeShapeConfig `mandatory:"false" json:"nodeShapeConfig"` + + // Deprecated. see `nodeSourceDetails`. Source running on the nodes in the node pool. + NodeSource NodeSourceOption `mandatory:"false" json:"nodeSource"` + + // Source running on the nodes in the node pool. + NodeSourceDetails NodeSourceDetails `mandatory:"false" json:"nodeSourceDetails"` + + // The name of the node shape of the nodes in the node pool. + NodeShape *string `mandatory:"false" json:"nodeShape"` + + // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. + InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` + + // The SSH public key on each node in the node pool on launch. + SshPublicKey *string `mandatory:"false" json:"sshPublicKey"` + + // The number of nodes in each subnet. + QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` + + // The OCIDs of the subnets in which to place nodes for this node pool. + SubnetIds []string `mandatory:"false" json:"subnetIds"` + + // The nodes in the node pool. + Nodes []Node `mandatory:"false" json:"nodes"` + + // The configuration of nodes in the node pool. + NodeConfigDetails *NodePoolNodeConfigDetails `mandatory:"false" json:"nodeConfigDetails"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + NodeEvictionNodePoolSettings *NodeEvictionNodePoolSettings `mandatory:"false" json:"nodeEvictionNodePoolSettings"` + + NodePoolCyclingDetails *NodePoolCyclingDetails `mandatory:"false" json:"nodePoolCyclingDetails"` +} + +func (m NodePool) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodePool) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingNodePoolLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetNodePoolLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *NodePool) UnmarshalJSON(data []byte) (e error) { + model := struct { + Id *string `json:"id"` + LifecycleState NodePoolLifecycleStateEnum `json:"lifecycleState"` + LifecycleDetails *string `json:"lifecycleDetails"` + CompartmentId *string `json:"compartmentId"` + ClusterId *string `json:"clusterId"` + Name *string `json:"name"` + KubernetesVersion *string `json:"kubernetesVersion"` + NodeMetadata map[string]string `json:"nodeMetadata"` + NodeImageId *string `json:"nodeImageId"` + NodeImageName *string `json:"nodeImageName"` + NodeShapeConfig *NodeShapeConfig `json:"nodeShapeConfig"` + NodeSource nodesourceoption `json:"nodeSource"` + NodeSourceDetails nodesourcedetails `json:"nodeSourceDetails"` + NodeShape *string `json:"nodeShape"` + InitialNodeLabels []KeyValue `json:"initialNodeLabels"` + SshPublicKey *string `json:"sshPublicKey"` + QuantityPerSubnet *int `json:"quantityPerSubnet"` + SubnetIds []string `json:"subnetIds"` + Nodes []Node `json:"nodes"` + NodeConfigDetails *NodePoolNodeConfigDetails `json:"nodeConfigDetails"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + NodeEvictionNodePoolSettings *NodeEvictionNodePoolSettings `json:"nodeEvictionNodePoolSettings"` + NodePoolCyclingDetails *NodePoolCyclingDetails `json:"nodePoolCyclingDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + m.LifecycleDetails = model.LifecycleDetails + + m.CompartmentId = model.CompartmentId + + m.ClusterId = model.ClusterId + + m.Name = model.Name + + m.KubernetesVersion = model.KubernetesVersion + + m.NodeMetadata = model.NodeMetadata + + m.NodeImageId = model.NodeImageId + + m.NodeImageName = model.NodeImageName + + m.NodeShapeConfig = model.NodeShapeConfig + + nn, e = model.NodeSource.UnmarshalPolymorphicJSON(model.NodeSource.JsonData) + if e != nil { + return + } + if nn != nil { + m.NodeSource = nn.(NodeSourceOption) + } else { + m.NodeSource = nil + } + + nn, e = model.NodeSourceDetails.UnmarshalPolymorphicJSON(model.NodeSourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.NodeSourceDetails = nn.(NodeSourceDetails) + } else { + m.NodeSourceDetails = nil + } + + m.NodeShape = model.NodeShape + + m.InitialNodeLabels = make([]KeyValue, len(model.InitialNodeLabels)) + copy(m.InitialNodeLabels, model.InitialNodeLabels) + m.SshPublicKey = model.SshPublicKey + + m.QuantityPerSubnet = model.QuantityPerSubnet + + m.SubnetIds = make([]string, len(model.SubnetIds)) + copy(m.SubnetIds, model.SubnetIds) + m.Nodes = make([]Node, len(model.Nodes)) + copy(m.Nodes, model.Nodes) + m.NodeConfigDetails = model.NodeConfigDetails + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.NodeEvictionNodePoolSettings = model.NodeEvictionNodePoolSettings + + m.NodePoolCyclingDetails = model.NodePoolCyclingDetails + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_cycling_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_cycling_details.go new file mode 100644 index 000000000..0f35181c6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_cycling_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodePoolCyclingDetails Node Pool Cycling Details +type NodePoolCyclingDetails struct { + + // Maximum active nodes that would be terminated from nodepool during the cycling nodepool process. + // OKE supports both integer and percentage input. + // Defaults to 0, Ranges from 0 to Nodepool size or 0% to 100% + MaximumUnavailable *string `mandatory:"false" json:"maximumUnavailable"` + + // Maximum additional new compute instances that would be temporarily created and added to nodepool during the cycling nodepool process. + // OKE supports both integer and percentage input. + // Defaults to 1, Ranges from 0 to Nodepool size or 0% to 100% + MaximumSurge *string `mandatory:"false" json:"maximumSurge"` + + // If nodes in the nodepool will be cycled to have new changes. + IsNodeCyclingEnabled *bool `mandatory:"false" json:"isNodeCyclingEnabled"` +} + +func (m NodePoolCyclingDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodePoolCyclingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_lifecycle_state.go new file mode 100644 index 000000000..8d1d8c39e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_lifecycle_state.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// NodePoolLifecycleStateEnum Enum with underlying type: string +type NodePoolLifecycleStateEnum string + +// Set of constants representing the allowable values for NodePoolLifecycleStateEnum +const ( + NodePoolLifecycleStateDeleted NodePoolLifecycleStateEnum = "DELETED" + NodePoolLifecycleStateCreating NodePoolLifecycleStateEnum = "CREATING" + NodePoolLifecycleStateActive NodePoolLifecycleStateEnum = "ACTIVE" + NodePoolLifecycleStateUpdating NodePoolLifecycleStateEnum = "UPDATING" + NodePoolLifecycleStateDeleting NodePoolLifecycleStateEnum = "DELETING" + NodePoolLifecycleStateFailed NodePoolLifecycleStateEnum = "FAILED" + NodePoolLifecycleStateInactive NodePoolLifecycleStateEnum = "INACTIVE" + NodePoolLifecycleStateNeedsAttention NodePoolLifecycleStateEnum = "NEEDS_ATTENTION" +) + +var mappingNodePoolLifecycleStateEnum = map[string]NodePoolLifecycleStateEnum{ + "DELETED": NodePoolLifecycleStateDeleted, + "CREATING": NodePoolLifecycleStateCreating, + "ACTIVE": NodePoolLifecycleStateActive, + "UPDATING": NodePoolLifecycleStateUpdating, + "DELETING": NodePoolLifecycleStateDeleting, + "FAILED": NodePoolLifecycleStateFailed, + "INACTIVE": NodePoolLifecycleStateInactive, + "NEEDS_ATTENTION": NodePoolLifecycleStateNeedsAttention, +} + +var mappingNodePoolLifecycleStateEnumLowerCase = map[string]NodePoolLifecycleStateEnum{ + "deleted": NodePoolLifecycleStateDeleted, + "creating": NodePoolLifecycleStateCreating, + "active": NodePoolLifecycleStateActive, + "updating": NodePoolLifecycleStateUpdating, + "deleting": NodePoolLifecycleStateDeleting, + "failed": NodePoolLifecycleStateFailed, + "inactive": NodePoolLifecycleStateInactive, + "needs_attention": NodePoolLifecycleStateNeedsAttention, +} + +// GetNodePoolLifecycleStateEnumValues Enumerates the set of values for NodePoolLifecycleStateEnum +func GetNodePoolLifecycleStateEnumValues() []NodePoolLifecycleStateEnum { + values := make([]NodePoolLifecycleStateEnum, 0) + for _, v := range mappingNodePoolLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetNodePoolLifecycleStateEnumStringValues Enumerates the set of values in String for NodePoolLifecycleStateEnum +func GetNodePoolLifecycleStateEnumStringValues() []string { + return []string{ + "DELETED", + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "FAILED", + "INACTIVE", + "NEEDS_ATTENTION", + } +} + +// GetMappingNodePoolLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNodePoolLifecycleStateEnum(val string) (NodePoolLifecycleStateEnum, bool) { + enum, ok := mappingNodePoolLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_node_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_node_config_details.go new file mode 100644 index 000000000..2de50c7a2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_node_config_details.go @@ -0,0 +1,116 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodePoolNodeConfigDetails The size and placement configuration of nodes in the node pool. +type NodePoolNodeConfigDetails struct { + + // The number of nodes in the node pool. + Size *int `mandatory:"false" json:"size"` + + // The OCIDs of the Network Security Group(s) to associate nodes for this node pool with. For more information about NSGs, see NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The OCID of the Key Management Service key assigned to the boot volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // Whether to enable in-transit encryption for the data volume's paravirtualized attachment. This field applies to both block volumes and boot volumes. The default value is false. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The placement configurations for the node pool. Provide one placement + // configuration for each availability domain in which you intend to launch a node. + // To use the node pool with a regional subnet, provide a placement configuration for + // each availability domain, and include the regional subnet in each placement + // configuration. + PlacementConfigs []NodePoolPlacementConfigDetails `mandatory:"false" json:"placementConfigs"` + + // The CNI related configuration of pods in the node pool. + NodePoolPodNetworkOptionDetails NodePoolPodNetworkOptionDetails `mandatory:"false" json:"nodePoolPodNetworkOptionDetails"` +} + +func (m NodePoolNodeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodePoolNodeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *NodePoolNodeConfigDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Size *int `json:"size"` + NsgIds []string `json:"nsgIds"` + KmsKeyId *string `json:"kmsKeyId"` + IsPvEncryptionInTransitEnabled *bool `json:"isPvEncryptionInTransitEnabled"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + PlacementConfigs []NodePoolPlacementConfigDetails `json:"placementConfigs"` + NodePoolPodNetworkOptionDetails nodepoolpodnetworkoptiondetails `json:"nodePoolPodNetworkOptionDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Size = model.Size + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.KmsKeyId = model.KmsKeyId + + m.IsPvEncryptionInTransitEnabled = model.IsPvEncryptionInTransitEnabled + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.PlacementConfigs = make([]NodePoolPlacementConfigDetails, len(model.PlacementConfigs)) + copy(m.PlacementConfigs, model.PlacementConfigs) + nn, e = model.NodePoolPodNetworkOptionDetails.UnmarshalPolymorphicJSON(model.NodePoolPodNetworkOptionDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.NodePoolPodNetworkOptionDetails = nn.(NodePoolPodNetworkOptionDetails) + } else { + m.NodePoolPodNetworkOptionDetails = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_options.go new file mode 100644 index 000000000..d4fd90df6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_options.go @@ -0,0 +1,88 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodePoolOptions Options for creating or updating node pools. +type NodePoolOptions struct { + + // Available Kubernetes versions. + KubernetesVersions []string `mandatory:"false" json:"kubernetesVersions"` + + // Available shapes for nodes. + Shapes []string `mandatory:"false" json:"shapes"` + + // Deprecated. See sources. + // When creating a node pool using the `CreateNodePoolDetails` object, only image names contained in this + // property can be passed to the `nodeImageName` property. + Images []string `mandatory:"false" json:"images"` + + // Available source of the node. + Sources []NodeSourceOption `mandatory:"false" json:"sources"` +} + +func (m NodePoolOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodePoolOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *NodePoolOptions) UnmarshalJSON(data []byte) (e error) { + model := struct { + KubernetesVersions []string `json:"kubernetesVersions"` + Shapes []string `json:"shapes"` + Images []string `json:"images"` + Sources []nodesourceoption `json:"sources"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.KubernetesVersions = make([]string, len(model.KubernetesVersions)) + copy(m.KubernetesVersions, model.KubernetesVersions) + m.Shapes = make([]string, len(model.Shapes)) + copy(m.Shapes, model.Shapes) + m.Images = make([]string, len(model.Images)) + copy(m.Images, model.Images) + m.Sources = make([]NodeSourceOption, len(model.Sources)) + for i, n := range model.Sources { + nn, e = n.UnmarshalPolymorphicJSON(n.JsonData) + if e != nil { + return e + } + if nn != nil { + m.Sources[i] = nn.(NodeSourceOption) + } else { + m.Sources[i] = nil + } + } + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_placement_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_placement_config_details.go new file mode 100644 index 000000000..0afa620ef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_placement_config_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodePoolPlacementConfigDetails The location where a node pool will place nodes. +type NodePoolPlacementConfigDetails struct { + + // The availability domain in which to place nodes. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` + + // The OCID of the subnet in which to place nodes. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // The OCID of the compute capacity reservation in which to place the compute instance. + CapacityReservationId *string `mandatory:"false" json:"capacityReservationId"` + + PreemptibleNodeConfig *PreemptibleNodeConfigDetails `mandatory:"false" json:"preemptibleNodeConfig"` + + // A list of fault domains in which to place nodes. + FaultDomains []string `mandatory:"false" json:"faultDomains"` +} + +func (m NodePoolPlacementConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodePoolPlacementConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_pod_network_option_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_pod_network_option_details.go new file mode 100644 index 000000000..64924b892 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_pod_network_option_details.go @@ -0,0 +1,125 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodePoolPodNetworkOptionDetails The CNI type and relevant network details for the pods of a given node pool +type NodePoolPodNetworkOptionDetails interface { +} + +type nodepoolpodnetworkoptiondetails struct { + JsonData []byte + CniType string `json:"cniType"` +} + +// UnmarshalJSON unmarshals json +func (m *nodepoolpodnetworkoptiondetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalernodepoolpodnetworkoptiondetails nodepoolpodnetworkoptiondetails + s := struct { + Model Unmarshalernodepoolpodnetworkoptiondetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.CniType = s.Model.CniType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *nodepoolpodnetworkoptiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.CniType { + case "OCI_VCN_IP_NATIVE": + mm := OciVcnIpNativeNodePoolPodNetworkOptionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "FLANNEL_OVERLAY": + mm := FlannelOverlayNodePoolPodNetworkOptionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for NodePoolPodNetworkOptionDetails: %s.", m.CniType) + return *m, nil + } +} + +func (m nodepoolpodnetworkoptiondetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m nodepoolpodnetworkoptiondetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// NodePoolPodNetworkOptionDetailsCniTypeEnum Enum with underlying type: string +type NodePoolPodNetworkOptionDetailsCniTypeEnum string + +// Set of constants representing the allowable values for NodePoolPodNetworkOptionDetailsCniTypeEnum +const ( + NodePoolPodNetworkOptionDetailsCniTypeOciVcnIpNative NodePoolPodNetworkOptionDetailsCniTypeEnum = "OCI_VCN_IP_NATIVE" + NodePoolPodNetworkOptionDetailsCniTypeFlannelOverlay NodePoolPodNetworkOptionDetailsCniTypeEnum = "FLANNEL_OVERLAY" +) + +var mappingNodePoolPodNetworkOptionDetailsCniTypeEnum = map[string]NodePoolPodNetworkOptionDetailsCniTypeEnum{ + "OCI_VCN_IP_NATIVE": NodePoolPodNetworkOptionDetailsCniTypeOciVcnIpNative, + "FLANNEL_OVERLAY": NodePoolPodNetworkOptionDetailsCniTypeFlannelOverlay, +} + +var mappingNodePoolPodNetworkOptionDetailsCniTypeEnumLowerCase = map[string]NodePoolPodNetworkOptionDetailsCniTypeEnum{ + "oci_vcn_ip_native": NodePoolPodNetworkOptionDetailsCniTypeOciVcnIpNative, + "flannel_overlay": NodePoolPodNetworkOptionDetailsCniTypeFlannelOverlay, +} + +// GetNodePoolPodNetworkOptionDetailsCniTypeEnumValues Enumerates the set of values for NodePoolPodNetworkOptionDetailsCniTypeEnum +func GetNodePoolPodNetworkOptionDetailsCniTypeEnumValues() []NodePoolPodNetworkOptionDetailsCniTypeEnum { + values := make([]NodePoolPodNetworkOptionDetailsCniTypeEnum, 0) + for _, v := range mappingNodePoolPodNetworkOptionDetailsCniTypeEnum { + values = append(values, v) + } + return values +} + +// GetNodePoolPodNetworkOptionDetailsCniTypeEnumStringValues Enumerates the set of values in String for NodePoolPodNetworkOptionDetailsCniTypeEnum +func GetNodePoolPodNetworkOptionDetailsCniTypeEnumStringValues() []string { + return []string{ + "OCI_VCN_IP_NATIVE", + "FLANNEL_OVERLAY", + } +} + +// GetMappingNodePoolPodNetworkOptionDetailsCniTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNodePoolPodNetworkOptionDetailsCniTypeEnum(val string) (NodePoolPodNetworkOptionDetailsCniTypeEnum, bool) { + enum, ok := mappingNodePoolPodNetworkOptionDetailsCniTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_summary.go new file mode 100644 index 000000000..ce46b04f9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_pool_summary.go @@ -0,0 +1,212 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodePoolSummary The properties that define a node pool summary. +type NodePoolSummary struct { + + // The OCID of the node pool. + Id *string `mandatory:"false" json:"id"` + + // The state of the nodepool. + LifecycleState NodePoolLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the nodepool. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The OCID of the compartment in which the node pool exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The OCID of the cluster to which this node pool is attached. + ClusterId *string `mandatory:"false" json:"clusterId"` + + // The name of the node pool. + Name *string `mandatory:"false" json:"name"` + + // The version of Kubernetes running on the nodes in the node pool. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // Deprecated. see `nodeSource`. The OCID of the image running on the nodes in the node pool. + NodeImageId *string `mandatory:"false" json:"nodeImageId"` + + // Deprecated. see `nodeSource`. The name of the image running on the nodes in the node pool. + NodeImageName *string `mandatory:"false" json:"nodeImageName"` + + // The shape configuration of the nodes. + NodeShapeConfig *NodeShapeConfig `mandatory:"false" json:"nodeShapeConfig"` + + // Deprecated. see `nodeSourceDetails`. Source running on the nodes in the node pool. + NodeSource NodeSourceOption `mandatory:"false" json:"nodeSource"` + + // Source running on the nodes in the node pool. + NodeSourceDetails NodeSourceDetails `mandatory:"false" json:"nodeSourceDetails"` + + // The name of the node shape of the nodes in the node pool. + NodeShape *string `mandatory:"false" json:"nodeShape"` + + // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. + InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` + + // The SSH public key on each node in the node pool on launch. + SshPublicKey *string `mandatory:"false" json:"sshPublicKey"` + + // The number of nodes in each subnet. + QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` + + // The OCIDs of the subnets in which to place nodes for this node pool. + SubnetIds []string `mandatory:"false" json:"subnetIds"` + + // The configuration of nodes in the node pool. + NodeConfigDetails *NodePoolNodeConfigDetails `mandatory:"false" json:"nodeConfigDetails"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + NodeEvictionNodePoolSettings *NodeEvictionNodePoolSettings `mandatory:"false" json:"nodeEvictionNodePoolSettings"` + + NodePoolCyclingDetails *NodePoolCyclingDetails `mandatory:"false" json:"nodePoolCyclingDetails"` +} + +func (m NodePoolSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodePoolSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingNodePoolLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetNodePoolLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *NodePoolSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + Id *string `json:"id"` + LifecycleState NodePoolLifecycleStateEnum `json:"lifecycleState"` + LifecycleDetails *string `json:"lifecycleDetails"` + CompartmentId *string `json:"compartmentId"` + ClusterId *string `json:"clusterId"` + Name *string `json:"name"` + KubernetesVersion *string `json:"kubernetesVersion"` + NodeImageId *string `json:"nodeImageId"` + NodeImageName *string `json:"nodeImageName"` + NodeShapeConfig *NodeShapeConfig `json:"nodeShapeConfig"` + NodeSource nodesourceoption `json:"nodeSource"` + NodeSourceDetails nodesourcedetails `json:"nodeSourceDetails"` + NodeShape *string `json:"nodeShape"` + InitialNodeLabels []KeyValue `json:"initialNodeLabels"` + SshPublicKey *string `json:"sshPublicKey"` + QuantityPerSubnet *int `json:"quantityPerSubnet"` + SubnetIds []string `json:"subnetIds"` + NodeConfigDetails *NodePoolNodeConfigDetails `json:"nodeConfigDetails"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + NodeEvictionNodePoolSettings *NodeEvictionNodePoolSettings `json:"nodeEvictionNodePoolSettings"` + NodePoolCyclingDetails *NodePoolCyclingDetails `json:"nodePoolCyclingDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Id = model.Id + + m.LifecycleState = model.LifecycleState + + m.LifecycleDetails = model.LifecycleDetails + + m.CompartmentId = model.CompartmentId + + m.ClusterId = model.ClusterId + + m.Name = model.Name + + m.KubernetesVersion = model.KubernetesVersion + + m.NodeImageId = model.NodeImageId + + m.NodeImageName = model.NodeImageName + + m.NodeShapeConfig = model.NodeShapeConfig + + nn, e = model.NodeSource.UnmarshalPolymorphicJSON(model.NodeSource.JsonData) + if e != nil { + return + } + if nn != nil { + m.NodeSource = nn.(NodeSourceOption) + } else { + m.NodeSource = nil + } + + nn, e = model.NodeSourceDetails.UnmarshalPolymorphicJSON(model.NodeSourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.NodeSourceDetails = nn.(NodeSourceDetails) + } else { + m.NodeSourceDetails = nil + } + + m.NodeShape = model.NodeShape + + m.InitialNodeLabels = make([]KeyValue, len(model.InitialNodeLabels)) + copy(m.InitialNodeLabels, model.InitialNodeLabels) + m.SshPublicKey = model.SshPublicKey + + m.QuantityPerSubnet = model.QuantityPerSubnet + + m.SubnetIds = make([]string, len(model.SubnetIds)) + copy(m.SubnetIds, model.SubnetIds) + m.NodeConfigDetails = model.NodeConfigDetails + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.NodeEvictionNodePoolSettings = model.NodeEvictionNodePoolSettings + + m.NodePoolCyclingDetails = model.NodePoolCyclingDetails + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_shape_config.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_shape_config.go new file mode 100644 index 000000000..ede30810c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_shape_config.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodeShapeConfig The shape configuration of the nodes. +type NodeShapeConfig struct { + + // The total number of OCPUs available to each node in the node pool. + // See here (https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/Shape/) for details. + Ocpus *float32 `mandatory:"false" json:"ocpus"` + + // The total amount of memory available to each node, in gigabytes. + MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` +} + +func (m NodeShapeConfig) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodeShapeConfig) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_details.go new file mode 100644 index 000000000..4a9ec7c67 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_details.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodeSourceDetails The details of the node's source. +type NodeSourceDetails interface { +} + +type nodesourcedetails struct { + JsonData []byte + SourceType string `json:"sourceType"` +} + +// UnmarshalJSON unmarshals json +func (m *nodesourcedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalernodesourcedetails nodesourcedetails + s := struct { + Model Unmarshalernodesourcedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.SourceType = s.Model.SourceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *nodesourcedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SourceType { + case "IMAGE": + mm := NodeSourceViaImageDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for NodeSourceDetails: %s.", m.SourceType) + return *m, nil + } +} + +func (m nodesourcedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m nodesourcedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_option.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_option.go new file mode 100644 index 000000000..c13fa545e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_option.go @@ -0,0 +1,89 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodeSourceOption The source option for the node. +type NodeSourceOption interface { + + // The user-friendly name of the entity corresponding to the OCID. + GetSourceName() *string +} + +type nodesourceoption struct { + JsonData []byte + SourceName *string `mandatory:"false" json:"sourceName"` + SourceType string `json:"sourceType"` +} + +// UnmarshalJSON unmarshals json +func (m *nodesourceoption) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalernodesourceoption nodesourceoption + s := struct { + Model Unmarshalernodesourceoption + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.SourceName = s.Model.SourceName + m.SourceType = s.Model.SourceType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *nodesourceoption) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SourceType { + case "IMAGE": + mm := NodeSourceViaImageOption{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for NodeSourceOption: %s.", m.SourceType) + return *m, nil + } +} + +// GetSourceName returns SourceName +func (m nodesourceoption) GetSourceName() *string { + return m.SourceName +} + +func (m nodesourceoption) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m nodesourceoption) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_type.go new file mode 100644 index 000000000..7696620c2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_type.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// NodeSourceTypeEnum Enum with underlying type: string +type NodeSourceTypeEnum string + +// Set of constants representing the allowable values for NodeSourceTypeEnum +const ( + NodeSourceTypeImage NodeSourceTypeEnum = "IMAGE" +) + +var mappingNodeSourceTypeEnum = map[string]NodeSourceTypeEnum{ + "IMAGE": NodeSourceTypeImage, +} + +var mappingNodeSourceTypeEnumLowerCase = map[string]NodeSourceTypeEnum{ + "image": NodeSourceTypeImage, +} + +// GetNodeSourceTypeEnumValues Enumerates the set of values for NodeSourceTypeEnum +func GetNodeSourceTypeEnumValues() []NodeSourceTypeEnum { + values := make([]NodeSourceTypeEnum, 0) + for _, v := range mappingNodeSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetNodeSourceTypeEnumStringValues Enumerates the set of values in String for NodeSourceTypeEnum +func GetNodeSourceTypeEnumStringValues() []string { + return []string{ + "IMAGE", + } +} + +// GetMappingNodeSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingNodeSourceTypeEnum(val string) (NodeSourceTypeEnum, bool) { + enum, ok := mappingNodeSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_via_image_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_via_image_details.go new file mode 100644 index 000000000..86e7bc703 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_via_image_details.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodeSourceViaImageDetails Details of the image running on the node. +type NodeSourceViaImageDetails struct { + + // The OCID of the image used to boot the node. + ImageId *string `mandatory:"true" json:"imageId"` + + // The size of the boot volume in GBs. Minimum value is 50 GB. See here (https://docs.cloud.oracle.com/en-us/iaas/Content/Block/Concepts/bootvolumes.htm) for max custom boot volume sizing and OS-specific requirements. + BootVolumeSizeInGBs *int64 `mandatory:"false" json:"bootVolumeSizeInGBs"` +} + +func (m NodeSourceViaImageDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodeSourceViaImageDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m NodeSourceViaImageDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeNodeSourceViaImageDetails NodeSourceViaImageDetails + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeNodeSourceViaImageDetails + }{ + "IMAGE", + (MarshalTypeNodeSourceViaImageDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_via_image_option.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_via_image_option.go new file mode 100644 index 000000000..2eca0010f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/node_source_via_image_option.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// NodeSourceViaImageOption An image can be specified as the source of nodes when launching a node pool using the `nodeSourceDetails` object. +type NodeSourceViaImageOption struct { + + // The user-friendly name of the entity corresponding to the OCID. + SourceName *string `mandatory:"false" json:"sourceName"` + + // The OCID of the image. + ImageId *string `mandatory:"false" json:"imageId"` +} + +// GetSourceName returns SourceName +func (m NodeSourceViaImageOption) GetSourceName() *string { + return m.SourceName +} + +func (m NodeSourceViaImageOption) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m NodeSourceViaImageOption) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m NodeSourceViaImageOption) MarshalJSON() (buff []byte, e error) { + type MarshalTypeNodeSourceViaImageOption NodeSourceViaImageOption + s := struct { + DiscriminatorParam string `json:"sourceType"` + MarshalTypeNodeSourceViaImageOption + }{ + "IMAGE", + (MarshalTypeNodeSourceViaImageOption)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/oci_vcn_ip_native_cluster_pod_network_option_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/oci_vcn_ip_native_cluster_pod_network_option_details.go new file mode 100644 index 000000000..24ba042ad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/oci_vcn_ip_native_cluster_pod_network_option_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OciVcnIpNativeClusterPodNetworkOptionDetails Network options specific to using the OCI VCN Native CNI +type OciVcnIpNativeClusterPodNetworkOptionDetails struct { +} + +func (m OciVcnIpNativeClusterPodNetworkOptionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OciVcnIpNativeClusterPodNetworkOptionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m OciVcnIpNativeClusterPodNetworkOptionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeOciVcnIpNativeClusterPodNetworkOptionDetails OciVcnIpNativeClusterPodNetworkOptionDetails + s := struct { + DiscriminatorParam string `json:"cniType"` + MarshalTypeOciVcnIpNativeClusterPodNetworkOptionDetails + }{ + "OCI_VCN_IP_NATIVE", + (MarshalTypeOciVcnIpNativeClusterPodNetworkOptionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/oci_vcn_ip_native_node_pool_pod_network_option_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/oci_vcn_ip_native_node_pool_pod_network_option_details.go new file mode 100644 index 000000000..778a7839d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/oci_vcn_ip_native_node_pool_pod_network_option_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OciVcnIpNativeNodePoolPodNetworkOptionDetails Network options specific to using the OCI VCN Native CNI +type OciVcnIpNativeNodePoolPodNetworkOptionDetails struct { + + // The OCIDs of the subnets in which to place pods for this node pool. This can be one of the node pool subnet IDs + PodSubnetIds []string `mandatory:"true" json:"podSubnetIds"` + + // The max number of pods per node in the node pool. This value will be limited by the number of VNICs attachable to the node pool shape + MaxPodsPerNode *int `mandatory:"false" json:"maxPodsPerNode"` + + // The OCIDs of the Network Security Group(s) to associate pods for this node pool with. For more information about NSGs, see NetworkSecurityGroup. + PodNsgIds []string `mandatory:"false" json:"podNsgIds"` +} + +func (m OciVcnIpNativeNodePoolPodNetworkOptionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OciVcnIpNativeNodePoolPodNetworkOptionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m OciVcnIpNativeNodePoolPodNetworkOptionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeOciVcnIpNativeNodePoolPodNetworkOptionDetails OciVcnIpNativeNodePoolPodNetworkOptionDetails + s := struct { + DiscriminatorParam string `json:"cniType"` + MarshalTypeOciVcnIpNativeNodePoolPodNetworkOptionDetails + }{ + "OCI_VCN_IP_NATIVE", + (MarshalTypeOciVcnIpNativeNodePoolPodNetworkOptionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/persistent_volume_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/persistent_volume_config_details.go new file mode 100644 index 000000000..0e4876dd3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/persistent_volume_config_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PersistentVolumeConfigDetails Configuration to be applied to block volumes created by Kubernetes Persistent Volume Claims (PVC) +type PersistentVolumeConfigDetails struct { + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m PersistentVolumeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PersistentVolumeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/placement_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/placement_configuration.go new file mode 100644 index 000000000..40f9b10ec --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/placement_configuration.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlacementConfiguration The information of virtual node placement in the virtual node pool. +type PlacementConfiguration struct { + + // The availability domain in which to place virtual nodes. + // Example: `Uocm:PHX-AD-1` + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The fault domain of this virtual node. + FaultDomain []string `mandatory:"false" json:"faultDomain"` + + // The OCID of the subnet in which to place virtual nodes. + SubnetId *string `mandatory:"false" json:"subnetId"` +} + +func (m PlacementConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PlacementConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_configuration.go new file mode 100644 index 000000000..faf3f60c0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_configuration.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PodConfiguration The pod configuration for pods run on virtual nodes of this virtual node pool. +type PodConfiguration struct { + + // The regional subnet where pods' VNIC will be placed. + SubnetId *string `mandatory:"true" json:"subnetId"` + + // Shape of the pods. + Shape *string `mandatory:"true" json:"shape"` + + // List of network security group IDs applied to the Pod VNIC. + NsgIds []string `mandatory:"false" json:"nsgIds"` +} + +func (m PodConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PodConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_shape.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_shape.go new file mode 100644 index 000000000..36fcb8906 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_shape.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PodShape Pod shape. +type PodShape struct { + + // The name of the identifying shape. + Name *string `mandatory:"true" json:"name"` + + // A short description of the VM's processor (CPU). + ProcessorDescription *string `mandatory:"false" json:"processorDescription"` + + // Options for OCPU shape. + OcpuOptions []ShapeOcpuOptions `mandatory:"false" json:"ocpuOptions"` + + // ShapeMemoryOptions. + MemoryOptions []ShapeMemoryOptions `mandatory:"false" json:"memoryOptions"` + + // ShapeNetworkBandwidthOptions. + NetworkBandwidthOptions []ShapeNetworkBandwidthOptions `mandatory:"false" json:"networkBandwidthOptions"` +} + +func (m PodShape) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PodShape) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_shape_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_shape_summary.go new file mode 100644 index 000000000..7740c796f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/pod_shape_summary.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PodShapeSummary Pod shape. +type PodShapeSummary struct { + + // The name of the identifying shape. + Name *string `mandatory:"true" json:"name"` + + // A short description of the VM's processor (CPU). + ProcessorDescription *string `mandatory:"false" json:"processorDescription"` + + // Options for OCPU shape. + OcpuOptions []ShapeOcpuOptions `mandatory:"false" json:"ocpuOptions"` + + // ShapeMemoryOptions. + MemoryOptions []ShapeMemoryOptions `mandatory:"false" json:"memoryOptions"` + + // ShapeNetworkBandwidthOptions. + NetworkBandwidthOptions []ShapeNetworkBandwidthOptions `mandatory:"false" json:"networkBandwidthOptions"` +} + +func (m PodShapeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PodShapeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/preemptible_node_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/preemptible_node_config_details.go new file mode 100644 index 000000000..96783639c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/preemptible_node_config_details.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PreemptibleNodeConfigDetails Configuration options for preemptible nodes. +type PreemptibleNodeConfigDetails struct { + PreemptionAction PreemptionAction `mandatory:"true" json:"preemptionAction"` +} + +func (m PreemptibleNodeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PreemptibleNodeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PreemptibleNodeConfigDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + PreemptionAction preemptionaction `json:"preemptionAction"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.PreemptionAction.UnmarshalPolymorphicJSON(model.PreemptionAction.JsonData) + if e != nil { + return + } + if nn != nil { + m.PreemptionAction = nn.(PreemptionAction) + } else { + m.PreemptionAction = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/preemption_action.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/preemption_action.go new file mode 100644 index 000000000..577a85dfd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/preemption_action.go @@ -0,0 +1,117 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PreemptionAction The action to run when the preemptible node is interrupted for eviction. +type PreemptionAction interface { +} + +type preemptionaction struct { + JsonData []byte + Type string `json:"type"` +} + +// UnmarshalJSON unmarshals json +func (m *preemptionaction) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpreemptionaction preemptionaction + s := struct { + Model Unmarshalerpreemptionaction + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Type = s.Model.Type + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *preemptionaction) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Type { + case "TERMINATE": + mm := TerminatePreemptionAction{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PreemptionAction: %s.", m.Type) + return *m, nil + } +} + +func (m preemptionaction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m preemptionaction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PreemptionActionTypeEnum Enum with underlying type: string +type PreemptionActionTypeEnum string + +// Set of constants representing the allowable values for PreemptionActionTypeEnum +const ( + PreemptionActionTypeTerminate PreemptionActionTypeEnum = "TERMINATE" +) + +var mappingPreemptionActionTypeEnum = map[string]PreemptionActionTypeEnum{ + "TERMINATE": PreemptionActionTypeTerminate, +} + +var mappingPreemptionActionTypeEnumLowerCase = map[string]PreemptionActionTypeEnum{ + "terminate": PreemptionActionTypeTerminate, +} + +// GetPreemptionActionTypeEnumValues Enumerates the set of values for PreemptionActionTypeEnum +func GetPreemptionActionTypeEnumValues() []PreemptionActionTypeEnum { + values := make([]PreemptionActionTypeEnum, 0) + for _, v := range mappingPreemptionActionTypeEnum { + values = append(values, v) + } + return values +} + +// GetPreemptionActionTypeEnumStringValues Enumerates the set of values in String for PreemptionActionTypeEnum +func GetPreemptionActionTypeEnumStringValues() []string { + return []string{ + "TERMINATE", + } +} + +// GetMappingPreemptionActionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPreemptionActionTypeEnum(val string) (PreemptionActionTypeEnum, bool) { + enum, ok := mappingPreemptionActionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/service_lb_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/service_lb_config_details.go new file mode 100644 index 000000000..214f63359 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/service_lb_config_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ServiceLbConfigDetails Configuration to be applied to load balancers created by Kubernetes services +type ServiceLbConfigDetails struct { + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m ServiceLbConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ServiceLbConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_memory_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_memory_options.go new file mode 100644 index 000000000..ac979bad5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_memory_options.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeMemoryOptions Memory properties. +type ShapeMemoryOptions struct { + + // The minimum amount of memory, in gigabytes. + MinInGBs *float32 `mandatory:"false" json:"minInGBs"` + + // The maximum amount of memory, in gigabytes. + MaxInGBs *float32 `mandatory:"false" json:"maxInGBs"` + + // The default amount of memory per OCPU available for this shape, in gigabytes. + DefaultPerOcpuInGBs *float32 `mandatory:"false" json:"defaultPerOcpuInGBs"` + + // The minimum amount of memory per OCPU available for this shape, in gigabytes. + MinPerOcpuInGBs *float32 `mandatory:"false" json:"minPerOcpuInGBs"` + + // The maximum amount of memory per OCPU available for this shape, in gigabytes. + MaxPerOcpuInGBs *float32 `mandatory:"false" json:"maxPerOcpuInGBs"` +} + +func (m ShapeMemoryOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeMemoryOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_network_bandwidth_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_network_bandwidth_options.go new file mode 100644 index 000000000..46a643669 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_network_bandwidth_options.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeNetworkBandwidthOptions Properties of network bandwidth. +type ShapeNetworkBandwidthOptions struct { + + // The minimum amount of networking bandwidth, in gigabits per second. + MinInGbps *float32 `mandatory:"false" json:"minInGbps"` + + // The maximum amount of networking bandwidth, in gigabits per second. + MaxInGbps *float32 `mandatory:"false" json:"maxInGbps"` + + // The default amount of networking bandwidth per OCPU, in gigabits per second. + DefaultPerOcpuInGbps *float32 `mandatory:"false" json:"defaultPerOcpuInGbps"` +} + +func (m ShapeNetworkBandwidthOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeNetworkBandwidthOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_ocpu_options.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_ocpu_options.go new file mode 100644 index 000000000..abc825c21 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/shape_ocpu_options.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ShapeOcpuOptions Properties of OCPUs. +type ShapeOcpuOptions struct { + + // The minimum number of OCPUs. + Min *float32 `mandatory:"false" json:"min"` + + // The maximum number of OCPUs. + Max *float32 `mandatory:"false" json:"max"` +} + +func (m ShapeOcpuOptions) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ShapeOcpuOptions) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/sort_order.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/sort_order.go new file mode 100644 index 000000000..214857a66 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/sort_order.go @@ -0,0 +1,58 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// SortOrderEnum Enum with underlying type: string +type SortOrderEnum string + +// Set of constants representing the allowable values for SortOrderEnum +const ( + SortOrderAsc SortOrderEnum = "ASC" + SortOrderDesc SortOrderEnum = "DESC" +) + +var mappingSortOrderEnum = map[string]SortOrderEnum{ + "ASC": SortOrderAsc, + "DESC": SortOrderDesc, +} + +var mappingSortOrderEnumLowerCase = map[string]SortOrderEnum{ + "asc": SortOrderAsc, + "desc": SortOrderDesc, +} + +// GetSortOrderEnumValues Enumerates the set of values for SortOrderEnum +func GetSortOrderEnumValues() []SortOrderEnum { + values := make([]SortOrderEnum, 0) + for _, v := range mappingSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSortOrderEnumStringValues Enumerates the set of values in String for SortOrderEnum +func GetSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSortOrderEnum(val string) (SortOrderEnum, bool) { + enum, ok := mappingSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/start_credential_rotation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/start_credential_rotation_details.go new file mode 100644 index 000000000..92e8b5d4f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/start_credential_rotation_details.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StartCredentialRotationDetails Properties that define a request to start credential rotation on a kubernetes cluster. +type StartCredentialRotationDetails struct { + + // The duration in days(in ISO 8601 notation eg. P5D) after which the old credentials should be retired. Maximum delay duration is 14 days. + AutoCompletionDelayDuration *string `mandatory:"true" json:"autoCompletionDelayDuration"` +} + +func (m StartCredentialRotationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m StartCredentialRotationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/start_credential_rotation_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/start_credential_rotation_request_response.go new file mode 100644 index 000000000..3576c0626 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/start_credential_rotation_request_response.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// StartCredentialRotationRequest wrapper for the StartCredentialRotation operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/StartCredentialRotation.go.html to see an example of how to use StartCredentialRotationRequest. +type StartCredentialRotationRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The details for a kubernetes cluster to start credential rotation. + StartCredentialRotationDetails `contributesTo:"body"` + + // A token you supply to uniquely identify the request and provide idempotency if + // the request is retried. Idempotency tokens expire after 24 hours. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request StartCredentialRotationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request StartCredentialRotationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request StartCredentialRotationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request StartCredentialRotationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request StartCredentialRotationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// StartCredentialRotationResponse wrapper for the StartCredentialRotation operation +type StartCredentialRotationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response StartCredentialRotationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response StartCredentialRotationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/taint.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/taint.go new file mode 100644 index 000000000..eaafe914a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/taint.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Taint taints +type Taint struct { + + // The key of the pair. + Key *string `mandatory:"false" json:"key"` + + // The value of the pair. + Value *string `mandatory:"false" json:"value"` + + // The effect of the pair. + Effect *string `mandatory:"false" json:"effect"` +} + +func (m Taint) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Taint) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/terminate_preemption_action.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/terminate_preemption_action.go new file mode 100644 index 000000000..478abdf3b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/terminate_preemption_action.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TerminatePreemptionAction Terminates the preemptible instance when it is interrupted for eviction. +type TerminatePreemptionAction struct { + + // Whether to preserve the boot volume that was used to launch the preemptible instance when the instance is terminated. Defaults to false if not specified. + IsPreserveBootVolume *bool `mandatory:"false" json:"isPreserveBootVolume"` +} + +func (m TerminatePreemptionAction) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TerminatePreemptionAction) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m TerminatePreemptionAction) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTerminatePreemptionAction TerminatePreemptionAction + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeTerminatePreemptionAction + }{ + "TERMINATE", + (MarshalTypeTerminatePreemptionAction)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_addon_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_addon_details.go new file mode 100644 index 000000000..7d164a5ad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_addon_details.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAddonDetails The properties that define to update addon details. +type UpdateAddonDetails struct { + + // The version of the installed addon. + Version *string `mandatory:"false" json:"version"` + + // Addon configuration details. + Configurations []AddonConfiguration `mandatory:"false" json:"configurations"` +} + +func (m UpdateAddonDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateAddonDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_addon_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_addon_request_response.go new file mode 100644 index 000000000..e998a6087 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_addon_request_response.go @@ -0,0 +1,101 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateAddonRequest wrapper for the UpdateAddon operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateAddon.go.html to see an example of how to use UpdateAddonRequest. +type UpdateAddonRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The name of the addon. + AddonName *string `mandatory:"true" contributesTo:"path" name:"addonName"` + + // The details of the addon to be updated. + UpdateAddonDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateAddonRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateAddonRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateAddonRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateAddonRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateAddonRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateAddonResponse wrapper for the UpdateAddon operation +type UpdateAddonResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateAddonResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateAddonResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_details.go new file mode 100644 index 000000000..1b16d3967 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateClusterDetails The properties that define a request to update a cluster. +type UpdateClusterDetails struct { + + // The new name for the cluster. Avoid entering confidential information. + Name *string `mandatory:"false" json:"name"` + + // The version of Kubernetes to which the cluster masters should be upgraded. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + Options *UpdateClusterOptionsDetails `mandatory:"false" json:"options"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The image verification policy for signature validation. Once a policy is created and enabled with + // one or more kms keys, the policy will ensure all images deployed has been signed with the key(s) + // attached to the policy. + ImagePolicyConfig *UpdateImagePolicyConfigDetails `mandatory:"false" json:"imagePolicyConfig"` + + // Type of cluster + Type ClusterTypeEnum `mandatory:"false" json:"type,omitempty"` +} + +func (m UpdateClusterDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateClusterDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingClusterTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetClusterTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_endpoint_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_endpoint_config_details.go new file mode 100644 index 000000000..649d9f68c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_endpoint_config_details.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateClusterEndpointConfigDetails The properties that define a request to update a cluster endpoint config. +type UpdateClusterEndpointConfigDetails struct { + + // A list of the OCIDs of the network security groups (NSGs) to apply to the cluster endpoint. For more information about NSGs, see NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // Whether the cluster should be assigned a public IP address. Defaults to false. If set to true on a private subnet, the cluster update will fail. + IsPublicIpEnabled *bool `mandatory:"false" json:"isPublicIpEnabled"` +} + +func (m UpdateClusterEndpointConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateClusterEndpointConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_endpoint_config_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_endpoint_config_request_response.go new file mode 100644 index 000000000..541a5876e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_endpoint_config_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateClusterEndpointConfigRequest wrapper for the UpdateClusterEndpointConfig operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateClusterEndpointConfig.go.html to see an example of how to use UpdateClusterEndpointConfigRequest. +type UpdateClusterEndpointConfigRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The details of the cluster's endpoint to update. + UpdateClusterEndpointConfigDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateClusterEndpointConfigRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateClusterEndpointConfigRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateClusterEndpointConfigRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateClusterEndpointConfigRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateClusterEndpointConfigRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateClusterEndpointConfigResponse wrapper for the UpdateClusterEndpointConfig operation +type UpdateClusterEndpointConfigResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateClusterEndpointConfigResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateClusterEndpointConfigResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_options_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_options_details.go new file mode 100644 index 000000000..370c88e40 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_options_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateClusterOptionsDetails The properties that define extra options updating a cluster. +type UpdateClusterOptionsDetails struct { + + // Configurable cluster admission controllers + AdmissionControllerOptions *AdmissionControllerOptions `mandatory:"false" json:"admissionControllerOptions"` + + PersistentVolumeConfig *PersistentVolumeConfigDetails `mandatory:"false" json:"persistentVolumeConfig"` + + ServiceLbConfig *ServiceLbConfigDetails `mandatory:"false" json:"serviceLbConfig"` +} + +func (m UpdateClusterOptionsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateClusterOptionsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_request_response.go new file mode 100644 index 000000000..1e7716d63 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_cluster_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateClusterRequest wrapper for the UpdateCluster operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateCluster.go.html to see an example of how to use UpdateClusterRequest. +type UpdateClusterRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The details of the cluster to update. + UpdateClusterDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateClusterRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateClusterRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateClusterRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateClusterRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateClusterRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateClusterResponse wrapper for the UpdateCluster operation +type UpdateClusterResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateClusterResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateClusterResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_image_policy_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_image_policy_config_details.go new file mode 100644 index 000000000..b9737776b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_image_policy_config_details.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateImagePolicyConfigDetails The properties that define a image verification policy. +type UpdateImagePolicyConfigDetails struct { + + // Whether the image verification policy is enabled. Defaults to false. If set to true, the images will be verified against the policy at runtime. + IsPolicyEnabled *bool `mandatory:"false" json:"isPolicyEnabled"` + + // A list of KMS key details. + KeyDetails []KeyDetails `mandatory:"false" json:"keyDetails"` +} + +func (m UpdateImagePolicyConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateImagePolicyConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_details.go new file mode 100644 index 000000000..a5b4be323 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_details.go @@ -0,0 +1,161 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateNodePoolDetails The properties that define a request to update a node pool. +type UpdateNodePoolDetails struct { + + // The new name for the cluster. Avoid entering confidential information. + Name *string `mandatory:"false" json:"name"` + + // The version of Kubernetes to which the nodes in the node pool should be upgraded. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // A list of key/value pairs to add to nodes after they join the Kubernetes cluster. + InitialNodeLabels []KeyValue `mandatory:"false" json:"initialNodeLabels"` + + // The number of nodes to have in each subnet specified in the subnetIds property. This property is deprecated, + // use nodeConfigDetails instead. If the current value of quantityPerSubnet is greater than 0, you can only + // use quantityPerSubnet to scale the node pool. If the current value of quantityPerSubnet is equal to 0 and + // the current value of size in nodeConfigDetails is greater than 0, before you can use quantityPerSubnet, + // you must first scale the node pool to 0 nodes using nodeConfigDetails. + QuantityPerSubnet *int `mandatory:"false" json:"quantityPerSubnet"` + + // The OCIDs of the subnets in which to place nodes for this node pool. This property is deprecated, + // use nodeConfigDetails instead. Only one of the subnetIds or nodeConfigDetails + // properties can be specified. + SubnetIds []string `mandatory:"false" json:"subnetIds"` + + // The configuration of nodes in the node pool. Only one of the subnetIds or nodeConfigDetails + // properties should be specified. If the current value of quantityPerSubnet is greater than 0, the node + // pool may still be scaled using quantityPerSubnet. Before you can use nodeConfigDetails, + // you must first scale the node pool to 0 nodes using quantityPerSubnet. + NodeConfigDetails *UpdateNodePoolNodeConfigDetails `mandatory:"false" json:"nodeConfigDetails"` + + // A list of key/value pairs to add to each underlying OCI instance in the node pool on launch. + NodeMetadata map[string]string `mandatory:"false" json:"nodeMetadata"` + + // Specify the source to use to launch nodes in the node pool. Currently, image is the only supported source. + NodeSourceDetails NodeSourceDetails `mandatory:"false" json:"nodeSourceDetails"` + + // The SSH public key to add to each node in the node pool on launch. + SshPublicKey *string `mandatory:"false" json:"sshPublicKey"` + + // The name of the node shape of the nodes in the node pool used on launch. + NodeShape *string `mandatory:"false" json:"nodeShape"` + + // Specify the configuration of the shape to launch nodes in the node pool. + NodeShapeConfig *UpdateNodeShapeConfigDetails `mandatory:"false" json:"nodeShapeConfig"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + NodeEvictionNodePoolSettings *NodeEvictionNodePoolSettings `mandatory:"false" json:"nodeEvictionNodePoolSettings"` + + NodePoolCyclingDetails *NodePoolCyclingDetails `mandatory:"false" json:"nodePoolCyclingDetails"` +} + +func (m UpdateNodePoolDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateNodePoolDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateNodePoolDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Name *string `json:"name"` + KubernetesVersion *string `json:"kubernetesVersion"` + InitialNodeLabels []KeyValue `json:"initialNodeLabels"` + QuantityPerSubnet *int `json:"quantityPerSubnet"` + SubnetIds []string `json:"subnetIds"` + NodeConfigDetails *UpdateNodePoolNodeConfigDetails `json:"nodeConfigDetails"` + NodeMetadata map[string]string `json:"nodeMetadata"` + NodeSourceDetails nodesourcedetails `json:"nodeSourceDetails"` + SshPublicKey *string `json:"sshPublicKey"` + NodeShape *string `json:"nodeShape"` + NodeShapeConfig *UpdateNodeShapeConfigDetails `json:"nodeShapeConfig"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + NodeEvictionNodePoolSettings *NodeEvictionNodePoolSettings `json:"nodeEvictionNodePoolSettings"` + NodePoolCyclingDetails *NodePoolCyclingDetails `json:"nodePoolCyclingDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Name = model.Name + + m.KubernetesVersion = model.KubernetesVersion + + m.InitialNodeLabels = make([]KeyValue, len(model.InitialNodeLabels)) + copy(m.InitialNodeLabels, model.InitialNodeLabels) + m.QuantityPerSubnet = model.QuantityPerSubnet + + m.SubnetIds = make([]string, len(model.SubnetIds)) + copy(m.SubnetIds, model.SubnetIds) + m.NodeConfigDetails = model.NodeConfigDetails + + m.NodeMetadata = model.NodeMetadata + + nn, e = model.NodeSourceDetails.UnmarshalPolymorphicJSON(model.NodeSourceDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.NodeSourceDetails = nn.(NodeSourceDetails) + } else { + m.NodeSourceDetails = nil + } + + m.SshPublicKey = model.SshPublicKey + + m.NodeShape = model.NodeShape + + m.NodeShapeConfig = model.NodeShapeConfig + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.NodeEvictionNodePoolSettings = model.NodeEvictionNodePoolSettings + + m.NodePoolCyclingDetails = model.NodePoolCyclingDetails + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_node_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_node_config_details.go new file mode 100644 index 000000000..b02f01069 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_node_config_details.go @@ -0,0 +1,116 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateNodePoolNodeConfigDetails The size and placement configuration of nodes in the node pool. +type UpdateNodePoolNodeConfigDetails struct { + + // The number of nodes in the node pool. + Size *int `mandatory:"false" json:"size"` + + // The OCIDs of the Network Security Group(s) to associate nodes for this node pool with. For more information about NSGs, see NetworkSecurityGroup. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The OCID of the Key Management Service key assigned to the boot volume. + KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` + + // Whether to enable in-transit encryption for the data volume's paravirtualized attachment. This field applies to both block volumes and boot volumes. The default value is false. + IsPvEncryptionInTransitEnabled *bool `mandatory:"false" json:"isPvEncryptionInTransitEnabled"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The placement configurations for the node pool. Provide one placement + // configuration for each availability domain in which you intend to launch a node. + // To use the node pool with a regional subnet, provide a placement configuration for + // each availability domain, and include the regional subnet in each placement + // configuration. + PlacementConfigs []NodePoolPlacementConfigDetails `mandatory:"false" json:"placementConfigs"` + + // The CNI related configuration of pods in the node pool. + NodePoolPodNetworkOptionDetails NodePoolPodNetworkOptionDetails `mandatory:"false" json:"nodePoolPodNetworkOptionDetails"` +} + +func (m UpdateNodePoolNodeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateNodePoolNodeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateNodePoolNodeConfigDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Size *int `json:"size"` + NsgIds []string `json:"nsgIds"` + KmsKeyId *string `json:"kmsKeyId"` + IsPvEncryptionInTransitEnabled *bool `json:"isPvEncryptionInTransitEnabled"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + PlacementConfigs []NodePoolPlacementConfigDetails `json:"placementConfigs"` + NodePoolPodNetworkOptionDetails nodepoolpodnetworkoptiondetails `json:"nodePoolPodNetworkOptionDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Size = model.Size + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.KmsKeyId = model.KmsKeyId + + m.IsPvEncryptionInTransitEnabled = model.IsPvEncryptionInTransitEnabled + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.PlacementConfigs = make([]NodePoolPlacementConfigDetails, len(model.PlacementConfigs)) + copy(m.PlacementConfigs, model.PlacementConfigs) + nn, e = model.NodePoolPodNetworkOptionDetails.UnmarshalPolymorphicJSON(model.NodePoolPodNetworkOptionDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.NodePoolPodNetworkOptionDetails = nn.(NodePoolPodNetworkOptionDetails) + } else { + m.NodePoolPodNetworkOptionDetails = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_request_response.go new file mode 100644 index 000000000..b80c317da --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_pool_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateNodePoolRequest wrapper for the UpdateNodePool operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateNodePool.go.html to see an example of how to use UpdateNodePoolRequest. +type UpdateNodePoolRequest struct { + + // The OCID of the node pool. + NodePoolId *string `mandatory:"true" contributesTo:"path" name:"nodePoolId"` + + // The fields to update in a node pool. + UpdateNodePoolDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Duration after which OKE will give up eviction of the pods on the node. + // PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M + OverrideEvictionGraceDuration *string `mandatory:"false" contributesTo:"query" name:"overrideEvictionGraceDuration"` + + // If the underlying compute instance should be deleted if you cannot evict all the pods in grace period + IsForceDeletionAfterOverrideGraceDuration *bool `mandatory:"false" contributesTo:"query" name:"isForceDeletionAfterOverrideGraceDuration"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateNodePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateNodePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateNodePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateNodePoolResponse wrapper for the UpdateNodePool operation +type UpdateNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_shape_config_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_shape_config_details.go new file mode 100644 index 000000000..f2a6263da --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_node_shape_config_details.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateNodeShapeConfigDetails The shape configuration of the nodes. +type UpdateNodeShapeConfigDetails struct { + + // The total number of OCPUs available to each node in the node pool. + // See here (https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/20160918/Shape/) for details. + Ocpus *float32 `mandatory:"false" json:"ocpus"` + + // The total amount of memory available to each node, in gigabytes. + MemoryInGBs *float32 `mandatory:"false" json:"memoryInGBs"` +} + +func (m UpdateNodeShapeConfigDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateNodeShapeConfigDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_virtual_node_pool_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_virtual_node_pool_details.go new file mode 100644 index 000000000..8064c5c29 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_virtual_node_pool_details.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateVirtualNodePoolDetails The properties that define a request to update a virtual node pool. +type UpdateVirtualNodePoolDetails struct { + + // Display name of the virtual node pool. This is a non-unique value. + DisplayName *string `mandatory:"false" json:"displayName"` + + // Initial labels that will be added to the Kubernetes Virtual Node object when it registers. + InitialVirtualNodeLabels []InitialVirtualNodeLabel `mandatory:"false" json:"initialVirtualNodeLabels"` + + // A taint is a collection of . These taints will be applied to the Virtual Nodes of this Virtual Node Pool for Kubernetes scheduling. + Taints []Taint `mandatory:"false" json:"taints"` + + // The number of Virtual Nodes that should be in the Virtual Node Pool. The placement configurations determine where these virtual nodes are placed. + Size *int `mandatory:"false" json:"size"` + + // The list of placement configurations which determines where Virtual Nodes will be provisioned across as it relates to the subnet and availability domains. The size attribute determines how many we evenly spread across these placement configurations + PlacementConfigurations []PlacementConfiguration `mandatory:"false" json:"placementConfigurations"` + + // List of network security group id's applied to the Virtual Node VNIC. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The pod configuration for pods run on virtual nodes of this virtual node pool. + PodConfiguration *PodConfiguration `mandatory:"false" json:"podConfiguration"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + VirtualNodeTags *VirtualNodeTags `mandatory:"false" json:"virtualNodeTags"` +} + +func (m UpdateVirtualNodePoolDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateVirtualNodePoolDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_virtual_node_pool_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_virtual_node_pool_request_response.go new file mode 100644 index 000000000..9707b90b6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_virtual_node_pool_request_response.go @@ -0,0 +1,98 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateVirtualNodePoolRequest wrapper for the UpdateVirtualNodePool operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateVirtualNodePool.go.html to see an example of how to use UpdateVirtualNodePoolRequest. +type UpdateVirtualNodePoolRequest struct { + + // The OCID of the virtual node pool. + VirtualNodePoolId *string `mandatory:"true" contributesTo:"path" name:"virtualNodePoolId"` + + // The fields to update in a virtual node pool. + UpdateVirtualNodePoolDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateVirtualNodePoolRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateVirtualNodePoolRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateVirtualNodePoolRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateVirtualNodePoolRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateVirtualNodePoolRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateVirtualNodePoolResponse wrapper for the UpdateVirtualNodePool operation +type UpdateVirtualNodePoolResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OCID of the work request handling the operation. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateVirtualNodePoolResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateVirtualNodePoolResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_workload_mapping_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_workload_mapping_details.go new file mode 100644 index 000000000..bdae873ea --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_workload_mapping_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateWorkloadMappingDetails The properties that define a workloadMapping +type UpdateWorkloadMappingDetails struct { + + // The OCID of the mapped customer compartment. + MappedCompartmentId *string `mandatory:"false" json:"mappedCompartmentId"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateWorkloadMappingDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateWorkloadMappingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_workload_mapping_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_workload_mapping_request_response.go new file mode 100644 index 000000000..29d5dfb88 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/update_workload_mapping_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateWorkloadMappingRequest wrapper for the UpdateWorkloadMapping operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/containerengine/UpdateWorkloadMapping.go.html to see an example of how to use UpdateWorkloadMappingRequest. +type UpdateWorkloadMappingRequest struct { + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" contributesTo:"path" name:"clusterId"` + + // The OCID of the workloadMapping. + WorkloadMappingId *string `mandatory:"true" contributesTo:"path" name:"workloadMappingId"` + + // The details of the workloadMapping to be updated. + UpdateWorkloadMappingDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` + // parameter to the value of the etag from a previous GET or POST response for that resource. The resource + // will be updated or deleted only if the etag you provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateWorkloadMappingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateWorkloadMappingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateWorkloadMappingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateWorkloadMappingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateWorkloadMappingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateWorkloadMappingResponse wrapper for the UpdateWorkloadMapping operation +type UpdateWorkloadMappingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The WorkloadMapping instance + WorkloadMapping `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + // particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateWorkloadMappingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateWorkloadMappingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node.go new file mode 100644 index 000000000..a6a6db601 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualNode The properties that define a virtual node. +type VirtualNode struct { + + // The ocid of the virtual node. + Id *string `mandatory:"true" json:"id"` + + // The name of the virtual node. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The ocid of the virtual node pool this virtual node belongs to. + VirtualNodePoolId *string `mandatory:"true" json:"virtualNodePoolId"` + + // The version of Kubernetes this virtual node is running. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // The name of the availability domain in which this virtual node is placed + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The fault domain of this virtual node. + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // The OCID of the subnet in which this Virtual Node is placed. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // NSG Ids applied to virtual node vnic. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The private IP address of this Virtual Node. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // An error that may be associated with the virtual node. + VirtualNodeError *string `mandatory:"false" json:"virtualNodeError"` + + // The state of the Virtual Node. + LifecycleState VirtualNodeLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the Virtual Node. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The time at which the virtual node was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m VirtualNode) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualNode) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVirtualNodeLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVirtualNodeLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_lifecycle_state.go new file mode 100644 index 000000000..4950deeca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_lifecycle_state.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// VirtualNodeLifecycleStateEnum Enum with underlying type: string +type VirtualNodeLifecycleStateEnum string + +// Set of constants representing the allowable values for VirtualNodeLifecycleStateEnum +const ( + VirtualNodeLifecycleStateCreating VirtualNodeLifecycleStateEnum = "CREATING" + VirtualNodeLifecycleStateActive VirtualNodeLifecycleStateEnum = "ACTIVE" + VirtualNodeLifecycleStateUpdating VirtualNodeLifecycleStateEnum = "UPDATING" + VirtualNodeLifecycleStateDeleting VirtualNodeLifecycleStateEnum = "DELETING" + VirtualNodeLifecycleStateDeleted VirtualNodeLifecycleStateEnum = "DELETED" + VirtualNodeLifecycleStateFailed VirtualNodeLifecycleStateEnum = "FAILED" + VirtualNodeLifecycleStateNeedsAttention VirtualNodeLifecycleStateEnum = "NEEDS_ATTENTION" +) + +var mappingVirtualNodeLifecycleStateEnum = map[string]VirtualNodeLifecycleStateEnum{ + "CREATING": VirtualNodeLifecycleStateCreating, + "ACTIVE": VirtualNodeLifecycleStateActive, + "UPDATING": VirtualNodeLifecycleStateUpdating, + "DELETING": VirtualNodeLifecycleStateDeleting, + "DELETED": VirtualNodeLifecycleStateDeleted, + "FAILED": VirtualNodeLifecycleStateFailed, + "NEEDS_ATTENTION": VirtualNodeLifecycleStateNeedsAttention, +} + +var mappingVirtualNodeLifecycleStateEnumLowerCase = map[string]VirtualNodeLifecycleStateEnum{ + "creating": VirtualNodeLifecycleStateCreating, + "active": VirtualNodeLifecycleStateActive, + "updating": VirtualNodeLifecycleStateUpdating, + "deleting": VirtualNodeLifecycleStateDeleting, + "deleted": VirtualNodeLifecycleStateDeleted, + "failed": VirtualNodeLifecycleStateFailed, + "needs_attention": VirtualNodeLifecycleStateNeedsAttention, +} + +// GetVirtualNodeLifecycleStateEnumValues Enumerates the set of values for VirtualNodeLifecycleStateEnum +func GetVirtualNodeLifecycleStateEnumValues() []VirtualNodeLifecycleStateEnum { + values := make([]VirtualNodeLifecycleStateEnum, 0) + for _, v := range mappingVirtualNodeLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVirtualNodeLifecycleStateEnumStringValues Enumerates the set of values in String for VirtualNodeLifecycleStateEnum +func GetVirtualNodeLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "DELETED", + "FAILED", + "NEEDS_ATTENTION", + } +} + +// GetMappingVirtualNodeLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualNodeLifecycleStateEnum(val string) (VirtualNodeLifecycleStateEnum, bool) { + enum, ok := mappingVirtualNodeLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool.go new file mode 100644 index 000000000..3c15f6f69 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualNodePool A pool of virtual nodes attached to a cluster. +type VirtualNodePool struct { + + // The OCID of the virtual node pool. + Id *string `mandatory:"true" json:"id"` + + // Compartment of the virtual node pool. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The cluster the virtual node pool is associated with. A virtual node pool can only be associated with one cluster. + ClusterId *string `mandatory:"true" json:"clusterId"` + + // Display name of the virtual node pool. This is a non-unique value. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The version of Kubernetes running on the nodes in the node pool. + KubernetesVersion *string `mandatory:"true" json:"kubernetesVersion"` + + // The list of placement configurations which determines where Virtual Nodes will be provisioned across as it relates to the subnet and availability domains. The size attribute determines how many we evenly spread across these placement configurations + PlacementConfigurations []PlacementConfiguration `mandatory:"true" json:"placementConfigurations"` + + // Initial labels that will be added to the Kubernetes Virtual Node object when it registers. This is the same as virtualNodePool resources. + InitialVirtualNodeLabels []InitialVirtualNodeLabel `mandatory:"false" json:"initialVirtualNodeLabels"` + + // A taint is a collection of . These taints will be applied to the Virtual Nodes of this Virtual Node Pool for Kubernetes scheduling. + Taints []Taint `mandatory:"false" json:"taints"` + + // The number of Virtual Nodes that should be in the Virtual Node Pool. The placement configurations determine where these virtual nodes are placed. + Size *int `mandatory:"false" json:"size"` + + // List of network security group id's applied to the Virtual Node VNIC. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The pod configuration for pods run on virtual nodes of this virtual node pool. + PodConfiguration *PodConfiguration `mandatory:"false" json:"podConfiguration"` + + // The state of the Virtual Node Pool. + LifecycleState VirtualNodePoolLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the Virtual Node Pool. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The time the virtual node pool was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time the virtual node pool was updated. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + VirtualNodeTags *VirtualNodeTags `mandatory:"false" json:"virtualNodeTags"` +} + +func (m VirtualNodePool) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualNodePool) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVirtualNodePoolLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVirtualNodePoolLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool_lifecycle_state.go new file mode 100644 index 000000000..3b66b86db --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool_lifecycle_state.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// VirtualNodePoolLifecycleStateEnum Enum with underlying type: string +type VirtualNodePoolLifecycleStateEnum string + +// Set of constants representing the allowable values for VirtualNodePoolLifecycleStateEnum +const ( + VirtualNodePoolLifecycleStateCreating VirtualNodePoolLifecycleStateEnum = "CREATING" + VirtualNodePoolLifecycleStateActive VirtualNodePoolLifecycleStateEnum = "ACTIVE" + VirtualNodePoolLifecycleStateUpdating VirtualNodePoolLifecycleStateEnum = "UPDATING" + VirtualNodePoolLifecycleStateDeleting VirtualNodePoolLifecycleStateEnum = "DELETING" + VirtualNodePoolLifecycleStateDeleted VirtualNodePoolLifecycleStateEnum = "DELETED" + VirtualNodePoolLifecycleStateFailed VirtualNodePoolLifecycleStateEnum = "FAILED" + VirtualNodePoolLifecycleStateNeedsAttention VirtualNodePoolLifecycleStateEnum = "NEEDS_ATTENTION" +) + +var mappingVirtualNodePoolLifecycleStateEnum = map[string]VirtualNodePoolLifecycleStateEnum{ + "CREATING": VirtualNodePoolLifecycleStateCreating, + "ACTIVE": VirtualNodePoolLifecycleStateActive, + "UPDATING": VirtualNodePoolLifecycleStateUpdating, + "DELETING": VirtualNodePoolLifecycleStateDeleting, + "DELETED": VirtualNodePoolLifecycleStateDeleted, + "FAILED": VirtualNodePoolLifecycleStateFailed, + "NEEDS_ATTENTION": VirtualNodePoolLifecycleStateNeedsAttention, +} + +var mappingVirtualNodePoolLifecycleStateEnumLowerCase = map[string]VirtualNodePoolLifecycleStateEnum{ + "creating": VirtualNodePoolLifecycleStateCreating, + "active": VirtualNodePoolLifecycleStateActive, + "updating": VirtualNodePoolLifecycleStateUpdating, + "deleting": VirtualNodePoolLifecycleStateDeleting, + "deleted": VirtualNodePoolLifecycleStateDeleted, + "failed": VirtualNodePoolLifecycleStateFailed, + "needs_attention": VirtualNodePoolLifecycleStateNeedsAttention, +} + +// GetVirtualNodePoolLifecycleStateEnumValues Enumerates the set of values for VirtualNodePoolLifecycleStateEnum +func GetVirtualNodePoolLifecycleStateEnumValues() []VirtualNodePoolLifecycleStateEnum { + values := make([]VirtualNodePoolLifecycleStateEnum, 0) + for _, v := range mappingVirtualNodePoolLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetVirtualNodePoolLifecycleStateEnumStringValues Enumerates the set of values in String for VirtualNodePoolLifecycleStateEnum +func GetVirtualNodePoolLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "UPDATING", + "DELETING", + "DELETED", + "FAILED", + "NEEDS_ATTENTION", + } +} + +// GetMappingVirtualNodePoolLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualNodePoolLifecycleStateEnum(val string) (VirtualNodePoolLifecycleStateEnum, bool) { + enum, ok := mappingVirtualNodePoolLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool_summary.go new file mode 100644 index 000000000..caa4a3a32 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_pool_summary.go @@ -0,0 +1,102 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualNodePoolSummary The properties that define a virtual node pool summary. +type VirtualNodePoolSummary struct { + + // The OCID of the virtual node pool. + Id *string `mandatory:"true" json:"id"` + + // Compartment of the virtual node pool. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The cluster the virtual node pool is associated with. A virtual node pool can only be associated with one cluster. + ClusterId *string `mandatory:"true" json:"clusterId"` + + // Display name of the virtual node pool. This is a non-unique value. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The version of Kubernetes running on the nodes in the node pool. + KubernetesVersion *string `mandatory:"true" json:"kubernetesVersion"` + + // The list of placement configurations which determines where Virtual Nodes will be provisioned across as it relates to the subnet and availability domains. The size attribute determines how many we evenly spread across these placement configurations + PlacementConfigurations []PlacementConfiguration `mandatory:"true" json:"placementConfigurations"` + + // Initial labels that will be added to the Kubernetes Virtual Node object when it registers. This is the same as virtualNodePool resources. + InitialVirtualNodeLabels []InitialVirtualNodeLabel `mandatory:"false" json:"initialVirtualNodeLabels"` + + // A taint is a collection of . These taints will be applied to the Virtual Nodes of this Virtual Node Pool for Kubernetes scheduling. + Taints []Taint `mandatory:"false" json:"taints"` + + // The number of Virtual Nodes that should be in the Virtual Node Pool. The placement configurations determine where these virtual nodes are placed. + Size *int `mandatory:"false" json:"size"` + + // List of network security group id's applied to the Virtual Node VNIC. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The pod configuration for pods run on virtual nodes of this virtual node pool. + PodConfiguration *PodConfiguration `mandatory:"false" json:"podConfiguration"` + + // The state of the Virtual Node Pool. + LifecycleState VirtualNodePoolLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the Virtual Node Pool. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The time the virtual node pool was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The time the virtual node pool was updated. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + VirtualNodeTags *VirtualNodeTags `mandatory:"false" json:"virtualNodeTags"` +} + +func (m VirtualNodePoolSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualNodePoolSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVirtualNodePoolLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVirtualNodePoolLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_summary.go new file mode 100644 index 000000000..f5922be33 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_summary.go @@ -0,0 +1,94 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualNodeSummary The properties that define a virtual node summary. +type VirtualNodeSummary struct { + + // The ocid of the virtual node. + Id *string `mandatory:"true" json:"id"` + + // The name of the virtual node. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The ocid of the virtual node pool this virtual node belongs to. + VirtualNodePoolId *string `mandatory:"true" json:"virtualNodePoolId"` + + // The version of Kubernetes this virtual node is running. + KubernetesVersion *string `mandatory:"false" json:"kubernetesVersion"` + + // The name of the availability domain in which this virtual node is placed + AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + + // The fault domain of this virtual node. + FaultDomain *string `mandatory:"false" json:"faultDomain"` + + // The OCID of the subnet in which this Virtual Node is placed. + SubnetId *string `mandatory:"false" json:"subnetId"` + + // NSG Ids applied to virtual node vnic. + NsgIds []string `mandatory:"false" json:"nsgIds"` + + // The private IP address of this Virtual Node. + PrivateIp *string `mandatory:"false" json:"privateIp"` + + // An error that may be associated with the virtual node. + VirtualNodeError *string `mandatory:"false" json:"virtualNodeError"` + + // The state of the Virtual Node. + LifecycleState VirtualNodeLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` + + // Details about the state of the Virtual Node. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // The time at which the virtual node was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Usage of system tag keys. These predefined keys are scoped to namespaces. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m VirtualNodeSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualNodeSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVirtualNodeLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetVirtualNodeLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_tags.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_tags.go new file mode 100644 index 000000000..173cda228 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/virtual_node_tags.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualNodeTags The tags associated to the virtual nodes in this virtual node pool. +type VirtualNodeTags struct { + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m VirtualNodeTags) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualNodeTags) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request.go new file mode 100644 index 000000000..b8fe6605c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequest An asynchronous work request. +type WorkRequest struct { + + // The OCID of the work request. + Id *string `mandatory:"false" json:"id"` + + // The type of work the work request is doing. + OperationType WorkRequestOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"` + + // The current status of the work request. + Status WorkRequestStatusEnum `mandatory:"false" json:"status,omitempty"` + + // The OCID of the compartment in which the work request exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The resources this work request affects. + Resources []WorkRequestResource `mandatory:"false" json:"resources"` + + // The time the work request was accepted. + TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"` + + // The time the work request was started. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the work request was finished. + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequest) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingWorkRequestOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetWorkRequestOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingWorkRequestStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetWorkRequestStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_error.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_error.go new file mode 100644 index 000000000..f9044250b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_error.go @@ -0,0 +1,47 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestError Errors related to a specific work request. +type WorkRequestError struct { + + // A short error code that defines the error, meant for programmatic parsing. See API Errors (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm). + Code *string `mandatory:"true" json:"code"` + + // A human-readable error string. + Message *string `mandatory:"true" json:"message"` + + // The date and time the error occurred. + Timestamp *common.SDKTime `mandatory:"true" json:"timestamp"` +} + +func (m WorkRequestError) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestError) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_log_entry.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_log_entry.go new file mode 100644 index 000000000..235ebdfd4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_log_entry.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestLogEntry Log entries related to a specific work request. +type WorkRequestLogEntry struct { + + // The description of an action that occurred. + Message *string `mandatory:"false" json:"message"` + + // The date and time the log entry occurred. + Timestamp *string `mandatory:"false" json:"timestamp"` +} + +func (m WorkRequestLogEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestLogEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_operation_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_operation_type.go new file mode 100644 index 000000000..15c7e7ac9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_operation_type.go @@ -0,0 +1,118 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// WorkRequestOperationTypeEnum Enum with underlying type: string +type WorkRequestOperationTypeEnum string + +// Set of constants representing the allowable values for WorkRequestOperationTypeEnum +const ( + WorkRequestOperationTypeClusterCreate WorkRequestOperationTypeEnum = "CLUSTER_CREATE" + WorkRequestOperationTypeClusterUpdate WorkRequestOperationTypeEnum = "CLUSTER_UPDATE" + WorkRequestOperationTypeClusterDelete WorkRequestOperationTypeEnum = "CLUSTER_DELETE" + WorkRequestOperationTypeNodepoolCreate WorkRequestOperationTypeEnum = "NODEPOOL_CREATE" + WorkRequestOperationTypeNodepoolUpdate WorkRequestOperationTypeEnum = "NODEPOOL_UPDATE" + WorkRequestOperationTypeNodepoolDelete WorkRequestOperationTypeEnum = "NODEPOOL_DELETE" + WorkRequestOperationTypeNodepoolReconcile WorkRequestOperationTypeEnum = "NODEPOOL_RECONCILE" + WorkRequestOperationTypeNodepoolCycling WorkRequestOperationTypeEnum = "NODEPOOL_CYCLING" + WorkRequestOperationTypeWorkrequestCancel WorkRequestOperationTypeEnum = "WORKREQUEST_CANCEL" + WorkRequestOperationTypeVirtualnodepoolCreate WorkRequestOperationTypeEnum = "VIRTUALNODEPOOL_CREATE" + WorkRequestOperationTypeVirtualnodepoolUpdate WorkRequestOperationTypeEnum = "VIRTUALNODEPOOL_UPDATE" + WorkRequestOperationTypeVirtualnodepoolDelete WorkRequestOperationTypeEnum = "VIRTUALNODEPOOL_DELETE" + WorkRequestOperationTypeVirtualnodeDelete WorkRequestOperationTypeEnum = "VIRTUALNODE_DELETE" + WorkRequestOperationTypeEnableAddon WorkRequestOperationTypeEnum = "ENABLE_ADDON" + WorkRequestOperationTypeUpdateAddon WorkRequestOperationTypeEnum = "UPDATE_ADDON" + WorkRequestOperationTypeDisableAddon WorkRequestOperationTypeEnum = "DISABLE_ADDON" + WorkRequestOperationTypeReconcileAddon WorkRequestOperationTypeEnum = "RECONCILE_ADDON" +) + +var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnum{ + "CLUSTER_CREATE": WorkRequestOperationTypeClusterCreate, + "CLUSTER_UPDATE": WorkRequestOperationTypeClusterUpdate, + "CLUSTER_DELETE": WorkRequestOperationTypeClusterDelete, + "NODEPOOL_CREATE": WorkRequestOperationTypeNodepoolCreate, + "NODEPOOL_UPDATE": WorkRequestOperationTypeNodepoolUpdate, + "NODEPOOL_DELETE": WorkRequestOperationTypeNodepoolDelete, + "NODEPOOL_RECONCILE": WorkRequestOperationTypeNodepoolReconcile, + "NODEPOOL_CYCLING": WorkRequestOperationTypeNodepoolCycling, + "WORKREQUEST_CANCEL": WorkRequestOperationTypeWorkrequestCancel, + "VIRTUALNODEPOOL_CREATE": WorkRequestOperationTypeVirtualnodepoolCreate, + "VIRTUALNODEPOOL_UPDATE": WorkRequestOperationTypeVirtualnodepoolUpdate, + "VIRTUALNODEPOOL_DELETE": WorkRequestOperationTypeVirtualnodepoolDelete, + "VIRTUALNODE_DELETE": WorkRequestOperationTypeVirtualnodeDelete, + "ENABLE_ADDON": WorkRequestOperationTypeEnableAddon, + "UPDATE_ADDON": WorkRequestOperationTypeUpdateAddon, + "DISABLE_ADDON": WorkRequestOperationTypeDisableAddon, + "RECONCILE_ADDON": WorkRequestOperationTypeReconcileAddon, +} + +var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperationTypeEnum{ + "cluster_create": WorkRequestOperationTypeClusterCreate, + "cluster_update": WorkRequestOperationTypeClusterUpdate, + "cluster_delete": WorkRequestOperationTypeClusterDelete, + "nodepool_create": WorkRequestOperationTypeNodepoolCreate, + "nodepool_update": WorkRequestOperationTypeNodepoolUpdate, + "nodepool_delete": WorkRequestOperationTypeNodepoolDelete, + "nodepool_reconcile": WorkRequestOperationTypeNodepoolReconcile, + "nodepool_cycling": WorkRequestOperationTypeNodepoolCycling, + "workrequest_cancel": WorkRequestOperationTypeWorkrequestCancel, + "virtualnodepool_create": WorkRequestOperationTypeVirtualnodepoolCreate, + "virtualnodepool_update": WorkRequestOperationTypeVirtualnodepoolUpdate, + "virtualnodepool_delete": WorkRequestOperationTypeVirtualnodepoolDelete, + "virtualnode_delete": WorkRequestOperationTypeVirtualnodeDelete, + "enable_addon": WorkRequestOperationTypeEnableAddon, + "update_addon": WorkRequestOperationTypeUpdateAddon, + "disable_addon": WorkRequestOperationTypeDisableAddon, + "reconcile_addon": WorkRequestOperationTypeReconcileAddon, +} + +// GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum +func GetWorkRequestOperationTypeEnumValues() []WorkRequestOperationTypeEnum { + values := make([]WorkRequestOperationTypeEnum, 0) + for _, v := range mappingWorkRequestOperationTypeEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestOperationTypeEnumStringValues Enumerates the set of values in String for WorkRequestOperationTypeEnum +func GetWorkRequestOperationTypeEnumStringValues() []string { + return []string{ + "CLUSTER_CREATE", + "CLUSTER_UPDATE", + "CLUSTER_DELETE", + "NODEPOOL_CREATE", + "NODEPOOL_UPDATE", + "NODEPOOL_DELETE", + "NODEPOOL_RECONCILE", + "NODEPOOL_CYCLING", + "WORKREQUEST_CANCEL", + "VIRTUALNODEPOOL_CREATE", + "VIRTUALNODEPOOL_UPDATE", + "VIRTUALNODEPOOL_DELETE", + "VIRTUALNODE_DELETE", + "ENABLE_ADDON", + "UPDATE_ADDON", + "DISABLE_ADDON", + "RECONCILE_ADDON", + } +} + +// GetMappingWorkRequestOperationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestOperationTypeEnum(val string) (WorkRequestOperationTypeEnum, bool) { + enum, ok := mappingWorkRequestOperationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_resource.go new file mode 100644 index 000000000..3c006ec49 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_resource.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestResource The properties that define a work request resource. +type WorkRequestResource struct { + + // The way in which this resource was affected by the work tracked by the work request. + ActionType WorkRequestResourceActionTypeEnum `mandatory:"false" json:"actionType,omitempty"` + + // The resource type the work request affects. + EntityType *string `mandatory:"false" json:"entityType"` + + // The OCID of the resource the work request affects. + Identifier *string `mandatory:"false" json:"identifier"` + + // The URI path on which the user can issue a GET request to access the resource metadata. + EntityUri *string `mandatory:"false" json:"entityUri"` +} + +func (m WorkRequestResource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingWorkRequestResourceActionTypeEnum(string(m.ActionType)); !ok && m.ActionType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ActionType: %s. Supported values are: %s.", m.ActionType, strings.Join(GetWorkRequestResourceActionTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// WorkRequestResourceActionTypeEnum Enum with underlying type: string +type WorkRequestResourceActionTypeEnum string + +// Set of constants representing the allowable values for WorkRequestResourceActionTypeEnum +const ( + WorkRequestResourceActionTypeCreated WorkRequestResourceActionTypeEnum = "CREATED" + WorkRequestResourceActionTypeUpdated WorkRequestResourceActionTypeEnum = "UPDATED" + WorkRequestResourceActionTypeDeleted WorkRequestResourceActionTypeEnum = "DELETED" + WorkRequestResourceActionTypeRelated WorkRequestResourceActionTypeEnum = "RELATED" + WorkRequestResourceActionTypeInProgress WorkRequestResourceActionTypeEnum = "IN_PROGRESS" + WorkRequestResourceActionTypeFailed WorkRequestResourceActionTypeEnum = "FAILED" + WorkRequestResourceActionTypeCanceledCreate WorkRequestResourceActionTypeEnum = "CANCELED_CREATE" + WorkRequestResourceActionTypeCanceledUpdate WorkRequestResourceActionTypeEnum = "CANCELED_UPDATE" + WorkRequestResourceActionTypeCanceledDelete WorkRequestResourceActionTypeEnum = "CANCELED_DELETE" +) + +var mappingWorkRequestResourceActionTypeEnum = map[string]WorkRequestResourceActionTypeEnum{ + "CREATED": WorkRequestResourceActionTypeCreated, + "UPDATED": WorkRequestResourceActionTypeUpdated, + "DELETED": WorkRequestResourceActionTypeDeleted, + "RELATED": WorkRequestResourceActionTypeRelated, + "IN_PROGRESS": WorkRequestResourceActionTypeInProgress, + "FAILED": WorkRequestResourceActionTypeFailed, + "CANCELED_CREATE": WorkRequestResourceActionTypeCanceledCreate, + "CANCELED_UPDATE": WorkRequestResourceActionTypeCanceledUpdate, + "CANCELED_DELETE": WorkRequestResourceActionTypeCanceledDelete, +} + +var mappingWorkRequestResourceActionTypeEnumLowerCase = map[string]WorkRequestResourceActionTypeEnum{ + "created": WorkRequestResourceActionTypeCreated, + "updated": WorkRequestResourceActionTypeUpdated, + "deleted": WorkRequestResourceActionTypeDeleted, + "related": WorkRequestResourceActionTypeRelated, + "in_progress": WorkRequestResourceActionTypeInProgress, + "failed": WorkRequestResourceActionTypeFailed, + "canceled_create": WorkRequestResourceActionTypeCanceledCreate, + "canceled_update": WorkRequestResourceActionTypeCanceledUpdate, + "canceled_delete": WorkRequestResourceActionTypeCanceledDelete, +} + +// GetWorkRequestResourceActionTypeEnumValues Enumerates the set of values for WorkRequestResourceActionTypeEnum +func GetWorkRequestResourceActionTypeEnumValues() []WorkRequestResourceActionTypeEnum { + values := make([]WorkRequestResourceActionTypeEnum, 0) + for _, v := range mappingWorkRequestResourceActionTypeEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestResourceActionTypeEnumStringValues Enumerates the set of values in String for WorkRequestResourceActionTypeEnum +func GetWorkRequestResourceActionTypeEnumStringValues() []string { + return []string{ + "CREATED", + "UPDATED", + "DELETED", + "RELATED", + "IN_PROGRESS", + "FAILED", + "CANCELED_CREATE", + "CANCELED_UPDATE", + "CANCELED_DELETE", + } +} + +// GetMappingWorkRequestResourceActionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestResourceActionTypeEnum(val string) (WorkRequestResourceActionTypeEnum, bool) { + enum, ok := mappingWorkRequestResourceActionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_status.go new file mode 100644 index 000000000..fe43bdbc0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_status.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// WorkRequestStatusEnum Enum with underlying type: string +type WorkRequestStatusEnum string + +// Set of constants representing the allowable values for WorkRequestStatusEnum +const ( + WorkRequestStatusAccepted WorkRequestStatusEnum = "ACCEPTED" + WorkRequestStatusInProgress WorkRequestStatusEnum = "IN_PROGRESS" + WorkRequestStatusFailed WorkRequestStatusEnum = "FAILED" + WorkRequestStatusSucceeded WorkRequestStatusEnum = "SUCCEEDED" + WorkRequestStatusCanceling WorkRequestStatusEnum = "CANCELING" + WorkRequestStatusCanceled WorkRequestStatusEnum = "CANCELED" +) + +var mappingWorkRequestStatusEnum = map[string]WorkRequestStatusEnum{ + "ACCEPTED": WorkRequestStatusAccepted, + "IN_PROGRESS": WorkRequestStatusInProgress, + "FAILED": WorkRequestStatusFailed, + "SUCCEEDED": WorkRequestStatusSucceeded, + "CANCELING": WorkRequestStatusCanceling, + "CANCELED": WorkRequestStatusCanceled, +} + +var mappingWorkRequestStatusEnumLowerCase = map[string]WorkRequestStatusEnum{ + "accepted": WorkRequestStatusAccepted, + "in_progress": WorkRequestStatusInProgress, + "failed": WorkRequestStatusFailed, + "succeeded": WorkRequestStatusSucceeded, + "canceling": WorkRequestStatusCanceling, + "canceled": WorkRequestStatusCanceled, +} + +// GetWorkRequestStatusEnumValues Enumerates the set of values for WorkRequestStatusEnum +func GetWorkRequestStatusEnumValues() []WorkRequestStatusEnum { + values := make([]WorkRequestStatusEnum, 0) + for _, v := range mappingWorkRequestStatusEnum { + values = append(values, v) + } + return values +} + +// GetWorkRequestStatusEnumStringValues Enumerates the set of values in String for WorkRequestStatusEnum +func GetWorkRequestStatusEnumStringValues() []string { + return []string{ + "ACCEPTED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED", + "CANCELING", + "CANCELED", + } +} + +// GetMappingWorkRequestStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkRequestStatusEnum(val string) (WorkRequestStatusEnum, bool) { + enum, ok := mappingWorkRequestStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_summary.go new file mode 100644 index 000000000..13d0f6cad --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/work_request_summary.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkRequestSummary The properties that define a work request summary. +type WorkRequestSummary struct { + + // The OCID of the work request. + Id *string `mandatory:"false" json:"id"` + + // The type of work the work request is doing. + OperationType WorkRequestOperationTypeEnum `mandatory:"false" json:"operationType,omitempty"` + + // The current status of the work request. + Status WorkRequestStatusEnum `mandatory:"false" json:"status,omitempty"` + + // The OCID of the compartment in which the work request exists. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // The resources this work request affects. + Resources []WorkRequestResource `mandatory:"false" json:"resources"` + + // The time the work request was accepted. + TimeAccepted *common.SDKTime `mandatory:"false" json:"timeAccepted"` + + // The time the work request was started. + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the work request was finished. + TimeFinished *common.SDKTime `mandatory:"false" json:"timeFinished"` +} + +func (m WorkRequestSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkRequestSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingWorkRequestOperationTypeEnum(string(m.OperationType)); !ok && m.OperationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OperationType: %s. Supported values are: %s.", m.OperationType, strings.Join(GetWorkRequestOperationTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingWorkRequestStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetWorkRequestStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// WorkRequestSummaryOperationTypeEnum is an alias to type: WorkRequestOperationTypeEnum +// Consider using WorkRequestOperationTypeEnum instead +// Deprecated +type WorkRequestSummaryOperationTypeEnum = WorkRequestOperationTypeEnum + +// Set of constants representing the allowable values for WorkRequestOperationTypeEnum +// Deprecated +const ( + WorkRequestSummaryOperationTypeClusterCreate WorkRequestOperationTypeEnum = "CLUSTER_CREATE" + WorkRequestSummaryOperationTypeClusterUpdate WorkRequestOperationTypeEnum = "CLUSTER_UPDATE" + WorkRequestSummaryOperationTypeClusterDelete WorkRequestOperationTypeEnum = "CLUSTER_DELETE" + WorkRequestSummaryOperationTypeNodepoolCreate WorkRequestOperationTypeEnum = "NODEPOOL_CREATE" + WorkRequestSummaryOperationTypeNodepoolUpdate WorkRequestOperationTypeEnum = "NODEPOOL_UPDATE" + WorkRequestSummaryOperationTypeNodepoolDelete WorkRequestOperationTypeEnum = "NODEPOOL_DELETE" + WorkRequestSummaryOperationTypeNodepoolReconcile WorkRequestOperationTypeEnum = "NODEPOOL_RECONCILE" + WorkRequestSummaryOperationTypeNodepoolCycling WorkRequestOperationTypeEnum = "NODEPOOL_CYCLING" + WorkRequestSummaryOperationTypeWorkrequestCancel WorkRequestOperationTypeEnum = "WORKREQUEST_CANCEL" + WorkRequestSummaryOperationTypeVirtualnodepoolCreate WorkRequestOperationTypeEnum = "VIRTUALNODEPOOL_CREATE" + WorkRequestSummaryOperationTypeVirtualnodepoolUpdate WorkRequestOperationTypeEnum = "VIRTUALNODEPOOL_UPDATE" + WorkRequestSummaryOperationTypeVirtualnodepoolDelete WorkRequestOperationTypeEnum = "VIRTUALNODEPOOL_DELETE" + WorkRequestSummaryOperationTypeVirtualnodeDelete WorkRequestOperationTypeEnum = "VIRTUALNODE_DELETE" + WorkRequestSummaryOperationTypeEnableAddon WorkRequestOperationTypeEnum = "ENABLE_ADDON" + WorkRequestSummaryOperationTypeUpdateAddon WorkRequestOperationTypeEnum = "UPDATE_ADDON" + WorkRequestSummaryOperationTypeDisableAddon WorkRequestOperationTypeEnum = "DISABLE_ADDON" + WorkRequestSummaryOperationTypeReconcileAddon WorkRequestOperationTypeEnum = "RECONCILE_ADDON" +) + +// GetWorkRequestSummaryOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum +// Consider using GetWorkRequestOperationTypeEnumValue +// Deprecated +var GetWorkRequestSummaryOperationTypeEnumValues = GetWorkRequestOperationTypeEnumValues + +// WorkRequestSummaryStatusEnum is an alias to type: WorkRequestStatusEnum +// Consider using WorkRequestStatusEnum instead +// Deprecated +type WorkRequestSummaryStatusEnum = WorkRequestStatusEnum + +// Set of constants representing the allowable values for WorkRequestStatusEnum +// Deprecated +const ( + WorkRequestSummaryStatusAccepted WorkRequestStatusEnum = "ACCEPTED" + WorkRequestSummaryStatusInProgress WorkRequestStatusEnum = "IN_PROGRESS" + WorkRequestSummaryStatusFailed WorkRequestStatusEnum = "FAILED" + WorkRequestSummaryStatusSucceeded WorkRequestStatusEnum = "SUCCEEDED" + WorkRequestSummaryStatusCanceling WorkRequestStatusEnum = "CANCELING" + WorkRequestSummaryStatusCanceled WorkRequestStatusEnum = "CANCELED" +) + +// GetWorkRequestSummaryStatusEnumValues Enumerates the set of values for WorkRequestStatusEnum +// Consider using GetWorkRequestStatusEnumValue +// Deprecated +var GetWorkRequestSummaryStatusEnumValues = GetWorkRequestStatusEnumValues diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping.go new file mode 100644 index 000000000..cff8d663d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkloadMapping The properties that define an workloadMapping. +type WorkloadMapping struct { + + // The ocid of the workloadMapping. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" json:"clusterId"` + + // The namespace of the workloadMapping. + Namespace *string `mandatory:"true" json:"namespace"` + + // The OCID of the mapped customer tenancy. + MappedTenancyId *string `mandatory:"true" json:"mappedTenancyId"` + + // The OCID of the mapped customer compartment. + MappedCompartmentId *string `mandatory:"true" json:"mappedCompartmentId"` + + // The time the cluster was created. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The state of the workloadMapping. + LifecycleState WorkloadMappingLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m WorkloadMapping) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkloadMapping) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingWorkloadMappingLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetWorkloadMappingLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping_lifecycle_state.go new file mode 100644 index 000000000..0c1add928 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping_lifecycle_state.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "strings" +) + +// WorkloadMappingLifecycleStateEnum Enum with underlying type: string +type WorkloadMappingLifecycleStateEnum string + +// Set of constants representing the allowable values for WorkloadMappingLifecycleStateEnum +const ( + WorkloadMappingLifecycleStateCreating WorkloadMappingLifecycleStateEnum = "CREATING" + WorkloadMappingLifecycleStateActive WorkloadMappingLifecycleStateEnum = "ACTIVE" + WorkloadMappingLifecycleStateFailed WorkloadMappingLifecycleStateEnum = "FAILED" + WorkloadMappingLifecycleStateDeleting WorkloadMappingLifecycleStateEnum = "DELETING" + WorkloadMappingLifecycleStateDeleted WorkloadMappingLifecycleStateEnum = "DELETED" + WorkloadMappingLifecycleStateUpdating WorkloadMappingLifecycleStateEnum = "UPDATING" +) + +var mappingWorkloadMappingLifecycleStateEnum = map[string]WorkloadMappingLifecycleStateEnum{ + "CREATING": WorkloadMappingLifecycleStateCreating, + "ACTIVE": WorkloadMappingLifecycleStateActive, + "FAILED": WorkloadMappingLifecycleStateFailed, + "DELETING": WorkloadMappingLifecycleStateDeleting, + "DELETED": WorkloadMappingLifecycleStateDeleted, + "UPDATING": WorkloadMappingLifecycleStateUpdating, +} + +var mappingWorkloadMappingLifecycleStateEnumLowerCase = map[string]WorkloadMappingLifecycleStateEnum{ + "creating": WorkloadMappingLifecycleStateCreating, + "active": WorkloadMappingLifecycleStateActive, + "failed": WorkloadMappingLifecycleStateFailed, + "deleting": WorkloadMappingLifecycleStateDeleting, + "deleted": WorkloadMappingLifecycleStateDeleted, + "updating": WorkloadMappingLifecycleStateUpdating, +} + +// GetWorkloadMappingLifecycleStateEnumValues Enumerates the set of values for WorkloadMappingLifecycleStateEnum +func GetWorkloadMappingLifecycleStateEnumValues() []WorkloadMappingLifecycleStateEnum { + values := make([]WorkloadMappingLifecycleStateEnum, 0) + for _, v := range mappingWorkloadMappingLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetWorkloadMappingLifecycleStateEnumStringValues Enumerates the set of values in String for WorkloadMappingLifecycleStateEnum +func GetWorkloadMappingLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "ACTIVE", + "FAILED", + "DELETING", + "DELETED", + "UPDATING", + } +} + +// GetMappingWorkloadMappingLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingWorkloadMappingLifecycleStateEnum(val string) (WorkloadMappingLifecycleStateEnum, bool) { + enum, ok := mappingWorkloadMappingLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping_summary.go new file mode 100644 index 000000000..ce8246b64 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/workload_mapping_summary.go @@ -0,0 +1,72 @@ +// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. +// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +// Code generated. DO NOT EDIT. + +// Container Engine for Kubernetes API +// +// API for the Container Engine for Kubernetes service. Use this API to build, deploy, +// and manage cloud-native applications. For more information, see +// Overview of Container Engine for Kubernetes (https://docs.cloud.oracle.com/iaas/Content/ContEng/Concepts/contengoverview.htm). +// + +package containerengine + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// WorkloadMappingSummary The properties that define an workloadMapping summary. +type WorkloadMappingSummary struct { + + // The ocid of the workloadMapping. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the cluster. + ClusterId *string `mandatory:"true" json:"clusterId"` + + // The namespace of the workloadMapping. + Namespace *string `mandatory:"true" json:"namespace"` + + // The OCID of the mapped customer tenancy. + MappedTenancyId *string `mandatory:"true" json:"mappedTenancyId"` + + // The OCID of the mapped customer compartment. + MappedCompartmentId *string `mandatory:"true" json:"mappedCompartmentId"` + + // The time the cluster was created. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The state of the workloadMapping. + LifecycleState WorkloadMappingLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m WorkloadMappingSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m WorkloadMappingSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingWorkloadMappingLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetWorkloadMappingLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 1e5b63c29..139687f16 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -275,6 +275,7 @@ github.com/opencontainers/selinux/pkg/pwalkdir github.com/oracle/oci-go-sdk/v65/common github.com/oracle/oci-go-sdk/v65/common/auth github.com/oracle/oci-go-sdk/v65/common/utils +github.com/oracle/oci-go-sdk/v65/containerengine github.com/oracle/oci-go-sdk/v65/core github.com/oracle/oci-go-sdk/v65/filestorage github.com/oracle/oci-go-sdk/v65/identity From 26a7fa3751bdfbe145f36d9c4ad942e5873d8877 Mon Sep 17 00:00:00 2001 From: Pranav Sriram Date: Wed, 26 Jul 2023 11:38:40 +0530 Subject: [PATCH 10/22] add opc-retry-token --- pkg/oci/client/load_balancer.go | 1 + pkg/oci/client/network_load_balancer.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/oci/client/load_balancer.go b/pkg/oci/client/load_balancer.go index 19c0ae1f9..33c9e1aac 100644 --- a/pkg/oci/client/load_balancer.go +++ b/pkg/oci/client/load_balancer.go @@ -133,6 +133,7 @@ func (c *loadbalancerClientStruct) CreateLoadBalancer(ctx context.Context, detai DefinedTags: details.DefinedTags, }, RequestMetadata: c.requestMetadata, + OpcRetryToken: details.DisplayName, }) incRequestCounter(err, createVerb, loadBalancerResource) diff --git a/pkg/oci/client/network_load_balancer.go b/pkg/oci/client/network_load_balancer.go index 5df2dbf03..9cf9eb544 100644 --- a/pkg/oci/client/network_load_balancer.go +++ b/pkg/oci/client/network_load_balancer.go @@ -104,6 +104,7 @@ func (c *networkLoadbalancer) CreateLoadBalancer(ctx context.Context, details *G DefinedTags: details.DefinedTags, }, RequestMetadata: c.requestMetadata, + OpcRetryToken: details.DisplayName, }) incRequestCounter(err, createVerb, networkLoadBalancerResource) From 032849e3c6362f1dd4a21577743f4a3a7a41d97f Mon Sep 17 00:00:00 2001 From: l-technicore Date: Mon, 6 May 2024 15:01:43 +0530 Subject: [PATCH 11/22] Do not record events for failure to acquire lock for lb sync --- pkg/cloudprovider/providers/oci/load_balancer.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/cloudprovider/providers/oci/load_balancer.go b/pkg/cloudprovider/providers/oci/load_balancer.go index 16d59625e..5e890c979 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer.go +++ b/pkg/cloudprovider/providers/oci/load_balancer.go @@ -52,9 +52,10 @@ const ( NetworkLoadBalancingPolicyTwoTuple = "TWO_TUPLE" NetworkLoadBalancingPolicyThreeTuple = "THREE_TUPLE" NetworkLoadBalancingPolicyFiveTuple = "FIVE_TUPLE" - LbOperationAlreadyExistsFmt = "An operation for the %s: %s already exists." ) +var LbOperationAlreadyExists = errors.New("An operation for the service is already in progress.") + // DefaultLoadBalancerBEProtocol defines the default protocol for load // balancer listeners created by the CCM. const DefaultLoadBalancerBEProtocol = "TCP" @@ -491,7 +492,7 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str loadBalancerService := fmt.Sprintf("%s/%s", service.Namespace, service.Name) if acquired := cp.lbLocks.TryAcquire(loadBalancerService); !acquired { logger.Error("Could not acquire lock for Ensuring Load Balancer") - return nil, errors.Errorf(LbOperationAlreadyExistsFmt, loadBalancerType, loadBalancerService) + return nil, LbOperationAlreadyExists } defer cp.lbLocks.Release(loadBalancerService) @@ -1149,7 +1150,7 @@ func (cp *CloudProvider) UpdateLoadBalancer(ctx context.Context, clusterName str loadBalancerService := fmt.Sprintf("%s/%s", service.Namespace, service.Name) if acquired := cp.lbLocks.TryAcquire(loadBalancerService); !acquired { logger.Error("Could not acquire lock for Updating Load Balancer") - return errors.Errorf(LbOperationAlreadyExistsFmt, loadBalancerType, loadBalancerService) + return LbOperationAlreadyExists } defer cp.lbLocks.Release(loadBalancerService) @@ -1316,7 +1317,7 @@ func (cp *CloudProvider) EnsureLoadBalancerDeleted(ctx context.Context, clusterN loadBalancerService := fmt.Sprintf("%s/%s", service.Namespace, service.Name) if acquired := cp.lbLocks.TryAcquire(loadBalancerService); !acquired { logger.Error("Could not acquire lock for Deleting Load Balancer") - return errors.Errorf(LbOperationAlreadyExistsFmt, loadBalancerType, loadBalancerService) + return LbOperationAlreadyExists } defer cp.lbLocks.Release(loadBalancerService) From 2d93700101ecca105e9123194ea9c5a4c3dd40b9 Mon Sep 17 00:00:00 2001 From: Goutham M L Date: Fri, 15 Mar 2024 00:56:02 +0530 Subject: [PATCH 12/22] Add unit test to for merging common tags tags at the time of creation of LB & storage resources Merge common free-form & defined tags to LB, NLB & FSS during provision Squashed commit: fix not using generics to remove Go >=1.18 dependency --- .../providers/oci/config/config.go | 4 +- .../providers/oci/load_balancer_spec.go | 6 + .../providers/oci/load_balancer_spec_test.go | 771 ++++++++++++++++++ pkg/csi/driver/bv_controller.go | 41 +- pkg/csi/driver/bv_controller_test.go | 133 +++ pkg/util/commons.go | 37 + pkg/util/commons_test.go | 146 ++++ 7 files changed, 1119 insertions(+), 19 deletions(-) diff --git a/pkg/cloudprovider/providers/oci/config/config.go b/pkg/cloudprovider/providers/oci/config/config.go index e2f118b8f..ddc6b439b 100644 --- a/pkg/cloudprovider/providers/oci/config/config.go +++ b/pkg/cloudprovider/providers/oci/config/config.go @@ -22,7 +22,6 @@ import ( "github.com/oracle/oci-go-sdk/v65/common" "github.com/oracle/oci-go-sdk/v65/common/auth" "github.com/pkg/errors" - "go.uber.org/zap" "gopkg.in/yaml.v2" ) @@ -127,6 +126,7 @@ type InitialTags struct { LoadBalancer *TagConfig `yaml:"loadBalancer"` BlockVolume *TagConfig `yaml:"blockVolume"` FSS *TagConfig `yaml:"fss"` + Common *TagConfig `yaml:"common"` } // Config holds the OCI cloud-provider config passed to Kubernetes components @@ -151,7 +151,7 @@ type Config struct { // cluster resides. VCNID string `yaml:"vcn"` - //Metadata service to help fill in certain fields + // Metadata service to help fill in certain fields metadataSvc metadata.Interface } diff --git a/pkg/cloudprovider/providers/oci/load_balancer_spec.go b/pkg/cloudprovider/providers/oci/load_balancer_spec.go index 58bb5e051..53c5e739c 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_spec.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_spec.go @@ -17,6 +17,7 @@ package oci import ( "encoding/json" "fmt" + "github.com/oracle/oci-cloud-controller-manager/pkg/util" "net" "net/http" "strconv" @@ -377,6 +378,10 @@ func NewLBSpec(logger *zap.SugaredLogger, svc *v1.Service, nodes []*v1.Node, sub if err != nil { return nil, err } + // merge lbtags with common tags if present + if util.IsCommonTagPresent(initialLBTags) { + lbTags = util.MergeTagConfig(lbTags, initialLBTags.Common) + } ruleManagementMode, managedNsg, err := getRuleManagementMode(svc) if err != nil { @@ -1286,6 +1291,7 @@ func getLoadBalancerTags(svc *v1.Service, initialTags *config.InitialTags) (*con if initialTags == nil || initialTags.LoadBalancer == nil { return &config.TagConfig{}, nil } + // return initial tags return initialTags.LoadBalancer, nil } diff --git a/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go b/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go index 36d9bce59..a659995ac 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go @@ -1936,6 +1936,158 @@ func TestNewLBSpecSuccess(t *testing.T) { DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}}, }, }, + "merge default tags with common tags": { + defaultSubnetOne: "one", + defaultSubnetTwo: "two", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + Annotations: map[string]string{ + ServiceAnnotationLoadBalancerInitialFreeformTagsOverride: `{"cluster":"resource", "unique":"tag"}`, + ServiceAnnotationLoadBalancerInitialDefinedTagsOverride: `{"namespace":{"key":"value", "owner":"team"}, "namespace2": {"cost": "staging"}}`, + }, + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{ + LoadBalancer: &providercfg.TagConfig{ + DefinedTags: map[string]map[string]interface{}{"namespace": {"cluster": "name", "owner": "cluster"}}, + }, + Common: &providercfg.TagConfig{ + DefinedTags: map[string]map[string]interface{}{"namespace": {"cluster": "CommonCluster", "owner": "CommonClusterOwner"}}, + }, + }, + expected: &LBSpec{ + Name: "test-uid", + Type: "lb", + Shape: "100Mbps", + Internal: false, + Subnets: []string{"one", "two"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("ROUND_ROBIN"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + FreeformTags: map[string]string{"cluster": "resource", "unique": "tag"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"cluster": "CommonCluster", "owner": "CommonClusterOwner"}, "namespace2": {"cost": "staging"}}, + }, + }, + "merge intial lb tags with common tags": { + defaultSubnetOne: "one", + defaultSubnetTwo: "two", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{ + LoadBalancer: &providercfg.TagConfig{ + FreeformTags: map[string]string{"cluster": "testname", "project": "pre-prod"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"cluster": "name", "owner": "cluster"}}, + }, + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"access": "developers"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"cluster": "CommonCluster", "owner": "CommonClusterOwner"}, "cost": {"unit": "shared", "env": "pre-prod"}}, + }, + }, + expected: &LBSpec{ + Name: "test-uid", + Type: "lb", + Shape: "100Mbps", + Internal: false, + Subnets: []string{"one", "two"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("ROUND_ROBIN"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + FreeformTags: map[string]string{"cluster": "testname", "project": "pre-prod", "access": "developers"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"cluster": "CommonCluster", "owner": "CommonClusterOwner"}, "cost": {"unit": "shared", "env": "pre-prod"}}, + }, + }, } cp := &CloudProvider{ @@ -1973,6 +2125,625 @@ func TestNewLBSpecSuccess(t *testing.T) { } } +func TestNewLBSpecForTags(t *testing.T) { + tests := map[string]struct { + defaultSubnetOne string + defaultSubnetTwo string + nodes []*v1.Node + virtualPods []*v1.Pod + service *v1.Service + sslConfig *SSLConfig + expected *LBSpec + clusterTags *providercfg.InitialTags + }{ + "no resource & cluster level tags but common tags from config": { + defaultSubnetOne: "one", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{ + LoadBalancer: &providercfg.TagConfig{ + DefinedTags: map[string]map[string]interface{}{"namespace": {"cluster": "name", "owner": "cluster"}}, + }, + Common: &providercfg.TagConfig{ + DefinedTags: map[string]map[string]interface{}{"namespace": {"cluster": "CommonCluster", "owner": "CommonClusterOwner"}}, + }, + }, + expected: &LBSpec{ + Name: "test-uid", + Type: "lb", + Shape: "100Mbps", + Internal: false, + Subnets: []string{"one"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("ROUND_ROBIN"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + FreeformTags: map[string]string{}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"cluster": "CommonCluster", "owner": "CommonClusterOwner"}}, + }, + }, + "no resource or cluster level tags and no common tags": { + defaultSubnetOne: "one", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{}, + expected: &LBSpec{ + Name: "test-uid", + Type: "lb", + Shape: "100Mbps", + Internal: false, + Subnets: []string{"one"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("ROUND_ROBIN"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + }, + }, + "resource level tags with common tags from config": { + defaultSubnetOne: "one", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + Annotations: map[string]string{ + ServiceAnnotationLoadBalancerType: "nlb", + ServiceAnnotationNetworkLoadBalancerInitialFreeformTagsOverride: `{"cluster":"resource", "unique":"tag"}`, + ServiceAnnotationNetworkLoadBalancerInitialDefinedTagsOverride: `{"namespace":{"key":"value", "owner":"team"}}`, + }, + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{ + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"name": "development_cluster"}, + DefinedTags: map[string]map[string]interface{}{"namespace2": {"owner2": "team2", "key2": "value2"}}, + }, + }, + expected: &LBSpec{ + Name: "kube-system/testservice/test-uid", + Type: "nlb", + Shape: "flexible", + Internal: false, + Subnets: []string{"one"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("FIVE_TUPLE"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + FreeformTags: map[string]string{"cluster": "resource", "unique": "tag", "name": "development_cluster"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}, "namespace2": {"owner2": "team2", "key2": "value2"}}, + }, + }, + "resource level defined tags and common defined tags from config with same key": { + defaultSubnetOne: "one", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + Annotations: map[string]string{ + ServiceAnnotationLoadBalancerInitialFreeformTagsOverride: `{"cluster":"resource", "unique":"tag"}`, + ServiceAnnotationLoadBalancerInitialDefinedTagsOverride: `{"namespace":{"key":"value", "owner":"team"}}`, + }, + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{ + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"name": "development_cluster"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner2": "team2", "key2": "value2"}}, + }, + }, + expected: &LBSpec{ + Name: "test-uid", + Type: "lb", + Shape: "100Mbps", + Internal: false, + Subnets: []string{"one"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("ROUND_ROBIN"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + FreeformTags: map[string]string{"cluster": "resource", "unique": "tag", "name": "development_cluster"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner2": "team2", "key2": "value2"}}, + }, + }, + "cluster level tags and common tags": { + defaultSubnetOne: "one", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{ + LoadBalancer: &providercfg.TagConfig{ + FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}}, + }, + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"name": "development_cluster"}, + DefinedTags: map[string]map[string]interface{}{"namespace2": {"owner2": "team2", "key2": "value2"}}, + }, + }, + expected: &LBSpec{ + Name: "test-uid", + Type: "lb", + Shape: "100Mbps", + Internal: false, + Subnets: []string{"one"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("ROUND_ROBIN"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer", "name": "development_cluster"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}, "namespace2": {"owner2": "team2", "key2": "value2"}}, + }, + }, + "cluster level defined tags and common defined tags with same key": { + defaultSubnetOne: "one", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{ + LoadBalancer: &providercfg.TagConfig{ + FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}}, + }, + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"name": "development_cluster"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner2": "team2", "key2": "value2"}}, + }, + }, + expected: &LBSpec{ + Name: "test-uid", + Type: "lb", + Shape: "100Mbps", + Internal: false, + Subnets: []string{"one"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("ROUND_ROBIN"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer", "name": "development_cluster"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner2": "team2", "key2": "value2"}}, + }, + }, + "cluster level tags with no common tags": { + defaultSubnetOne: "one", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{ + LoadBalancer: &providercfg.TagConfig{ + FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}}, + }, + }, + expected: &LBSpec{ + Name: "test-uid", + Type: "lb", + Shape: "100Mbps", + Internal: false, + Subnets: []string{"one"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("ROUND_ROBIN"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}}, + }, + }, + "no cluster or level tags but common tags from config": { + defaultSubnetOne: "one", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{ + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}}, + }, + }, + expected: &LBSpec{ + Name: "test-uid", + Type: "lb", + Shape: "100Mbps", + Internal: false, + Subnets: []string{"one"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("ROUND_ROBIN"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}}, + }, + }, + } + cp := &CloudProvider{ + client: MockOCIClient{}, + config: &providercfg.Config{CompartmentID: "testCompartment"}, + } + + for name, tc := range tests { + logger := zap.L() + t.Run(name, func(t *testing.T) { + // we expect the service to be unchanged + tc.expected.service = tc.service + cp.config = &providercfg.Config{ + LoadBalancer: &providercfg.LoadBalancerConfig{ + Subnet1: tc.defaultSubnetOne, + Subnet2: tc.defaultSubnetTwo, + }, + } + subnets, err := cp.getLoadBalancerSubnets(context.Background(), logger.Sugar(), tc.service) + if err != nil { + t.Error(err) + } + slManagerFactory := func(mode string) securityListManager { + return newSecurityListManagerNOOP() + } + + result, err := NewLBSpec(logger.Sugar(), tc.service, tc.nodes, tc.virtualPods, subnets, tc.sslConfig, slManagerFactory, tc.clusterTags, nil) + if err != nil { + t.Error(err) + } + if !reflect.DeepEqual(result, tc.expected) { + t.Errorf("Expected load balancer spec\n%+v\nbut got\n%+v", tc.expected, result) + } + }) + } +} + func TestNewLBSpecSingleAD(t *testing.T) { testCases := map[string]struct { defaultSubnetOne string diff --git a/pkg/csi/driver/bv_controller.go b/pkg/csi/driver/bv_controller.go index 8ea33b392..6ad7b0c90 100644 --- a/pkg/csi/driver/bv_controller.go +++ b/pkg/csi/driver/bv_controller.go @@ -404,22 +404,7 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi return nil, status.Errorf(codes.InvalidArgument, "invalid available domain: %s or compartment ID: %s", availableDomainShortName, d.config.CompartmentID) } - // use initial tags for all BVs - bvTags := &config.TagConfig{} - if d.config.Tags != nil && d.config.Tags.BlockVolume != nil { - bvTags = d.config.Tags.BlockVolume - } - - // use storage class level tags if provided - scTags := &config.TagConfig{ - FreeformTags: volumeParams.freeformTags, - DefinedTags: volumeParams.definedTags, - } - - // storage class tags overwrite initial BV Tags - if scTags.FreeformTags != nil || scTags.DefinedTags != nil { - bvTags = scTags - } + bvTags := getBVTags(d.config.Tags, volumeParams) provisionedVolume, err = provision(ctx, log, d.client, volumeName, size, *ad.Name, d.config.CompartmentID, srcSnapshotId, srcVolumeId, volumeParams.diskEncryptionKey, volumeParams.vpusPerGB, bvTags) @@ -1254,7 +1239,7 @@ func (d *BlockVolumeControllerDriver) ControllerExpandVolume(ctx context.Context return nil, status.Error(codes.Internal, message) } _, err = d.client.BlockStorage().AwaitVolumeAvailableORTimeout(ctx, volumeId) - if err != nil { + if err != nil { log.With("service", "blockstorage", "verb", "get", "resource", "volume", "statusCode", util.GetHttpStatusCode(err)). Error("Volume Expansion failed with time out") errorType = util.GetError(err) @@ -1353,3 +1338,25 @@ func isBlockVolumeAvailable(backup core.VolumeBackup) (bool, error) { } return false, nil } + +func getBVTags(tags *config.InitialTags, vp VolumeParameters) *config.TagConfig { + + bvTags := &config.TagConfig{} + if tags != nil && tags.BlockVolume != nil { + bvTags = tags.BlockVolume + } + + // use storage class level tags if provided + scTags := &config.TagConfig{ + FreeformTags: vp.freeformTags, + DefinedTags: vp.definedTags, + } + if scTags.FreeformTags != nil || scTags.DefinedTags != nil { + bvTags = scTags + } + // merge final tags with common tags + if util.IsCommonTagPresent(tags) { + bvTags = util.MergeTagConfig(bvTags, tags.Common) + } + return bvTags +} diff --git a/pkg/csi/driver/bv_controller_test.go b/pkg/csi/driver/bv_controller_test.go index 7111ef7e8..d22181bca 100644 --- a/pkg/csi/driver/bv_controller_test.go +++ b/pkg/csi/driver/bv_controller_test.go @@ -1843,3 +1843,136 @@ func TestGetAttachmentOptions(t *testing.T) { }) } } + +func TestGetBVTags(t *testing.T) { + emptyTags := &providercfg.InitialTags{} + emptyTagConfig := &providercfg.TagConfig{} + emptyVolumeParameters := VolumeParameters{} + tests := map[string]struct { + initialTags *providercfg.InitialTags + volumeParameters VolumeParameters + expectedTagConfig *providercfg.TagConfig + }{ + "no resource tags, no common tags": { + initialTags: emptyTags, + volumeParameters: emptyVolumeParameters, + expectedTagConfig: emptyTagConfig, + }, + "no resource tags, but common tags": { + initialTags: &providercfg.InitialTags{ + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + }, + volumeParameters: emptyVolumeParameters, + expectedTagConfig: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + }, + "resource tags with common tags from config": { + initialTags: &providercfg.InitialTags{ + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + }, + volumeParameters: VolumeParameters{ + freeformTags: map[string]string{"key2": "value2"}, + definedTags: map[string]map[string]interface{}{"ns2": {"key2": "value2"}}, + }, + expectedTagConfig: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1", "key2": "value2"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}, "ns2": {"key2": "value2"}}, + }, + }, + "resource level tags with common tags from config with same key": { + initialTags: &providercfg.InitialTags{ + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + }, + volumeParameters: VolumeParameters{ + freeformTags: map[string]string{"key1": "value2"}, + definedTags: map[string]map[string]interface{}{"ns1": {"key2": "value2"}}, + }, + expectedTagConfig: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + }, + "cluster level tags with common tags from config": { + initialTags: &providercfg.InitialTags{ + BlockVolume: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key2": "value2"}, + DefinedTags: map[string]map[string]interface{}{"ns2": {"key2": "value2"}}, + }, + }, + volumeParameters: emptyVolumeParameters, + expectedTagConfig: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1", "key2": "value2"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}, "ns2": {"key2": "value2"}}, + }, + }, + "cluster level tags with common tags from config with same key": { + initialTags: &providercfg.InitialTags{ + BlockVolume: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value2"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key2": "value2"}}, + }, + }, + volumeParameters: emptyVolumeParameters, + expectedTagConfig: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value2"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key2": "value2"}}, + }, + }, + "cluster level tags but no common tags": { + initialTags: &providercfg.InitialTags{ + BlockVolume: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + }, + volumeParameters: emptyVolumeParameters, + expectedTagConfig: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + }, + "no cluster level or resource level tags but common tags": { + initialTags: &providercfg.InitialTags{ + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + }, + volumeParameters: emptyVolumeParameters, + expectedTagConfig: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + }, + } + for name, testcase := range tests { + t.Run(name, func(t *testing.T) { + actualTagConfig := getBVTags(testcase.initialTags, testcase.volumeParameters) + t.Logf("%v", actualTagConfig) + t.Logf("%v", testcase.expectedTagConfig) + if !reflect.DeepEqual(actualTagConfig, testcase.expectedTagConfig) { + t.Errorf("Expected tagconfig %v but got %v", testcase.expectedTagConfig, actualTagConfig) + } + + }) + } +} diff --git a/pkg/util/commons.go b/pkg/util/commons.go index 4127b6191..4a1b9dcb9 100644 --- a/pkg/util/commons.go +++ b/pkg/util/commons.go @@ -18,6 +18,7 @@ import ( "context" "errors" "fmt" + "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" "regexp" "strconv" "strings" @@ -120,3 +121,39 @@ func GetHttpStatusCode(err error) int { } return statusCode } + +func mergeFreeFormTags(freefromTags ...map[string]string) map[string]string { + merged := make(map[string]string) + for _, t := range freefromTags { + for k, v := range t { + merged[k] = v + } + } + return merged +} + +func mergeDefinedTags(definedTags ...map[string]map[string]interface{}) map[string]map[string]interface{} { + merged := make(map[string]map[string]interface{}) + for _, t := range definedTags { + for k, v := range t { + merged[k] = v + } + } + return merged +} + +// MergeTagConfig merges TagConfig's where dstTagConfig takes precedence +func MergeTagConfig(srcTagConfig, dstTagConfig *config.TagConfig) *config.TagConfig { + var mergedTag config.TagConfig + mergedTag.FreeformTags = mergeFreeFormTags(srcTagConfig.FreeformTags, dstTagConfig.FreeformTags) + mergedTag.DefinedTags = mergeDefinedTags(srcTagConfig.DefinedTags, dstTagConfig.DefinedTags) + + return &mergedTag +} + +// IsCommonTagPresent return true if Common tags are initialised in config +func IsCommonTagPresent(initialTags *config.InitialTags) bool { + // TODO: perform feature enabled check + + return initialTags != nil && initialTags.Common != nil +} diff --git a/pkg/util/commons_test.go b/pkg/util/commons_test.go index 6fac818d6..f6432ee3a 100644 --- a/pkg/util/commons_test.go +++ b/pkg/util/commons_test.go @@ -16,6 +16,8 @@ package util import ( "errors" + "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" + "reflect" "testing" errors2 "github.com/pkg/errors" @@ -125,3 +127,147 @@ func TestGetError(t *testing.T) { }) } } +func TestIsCommonTagPresent(t *testing.T) { + emptyInitialTags := &config.InitialTags{} + tests := map[string]struct { + initialtag *config.InitialTags + want bool + }{ + "empty initial tags": { + initialtag: emptyInitialTags, + want: false, + }, + "No common tags": { + initialtag: &config.InitialTags{ + LoadBalancer: &config.TagConfig{ + FreeformTags: nil, + DefinedTags: nil, + }, + BlockVolume: &config.TagConfig{ + FreeformTags: nil, + DefinedTags: nil, + }, + FSS: &config.TagConfig{ + FreeformTags: nil, + DefinedTags: nil, + }, + }, + want: false, + }, + "Common tags": { + initialtag: &config.InitialTags{ + Common: &config.TagConfig{ + FreeformTags: nil, + DefinedTags: nil, + }, + }, + want: true, + }, + } + for name, tc := range tests { + t.Run(name, func(t *testing.T) { + actual := IsCommonTagPresent(tc.initialtag) + if actual != tc.want { + t.Errorf("Expected %t but got %t", tc.want, actual) + } + }) + } +} + +func TestMergeTagConfig(t *testing.T) { + emptyTagConfig := &config.TagConfig{} + tests := map[string]struct { + srcTagConfig *config.TagConfig + dstTagConfig *config.TagConfig + mergedTagConfig config.TagConfig + }{ + "null test case": { + srcTagConfig: emptyTagConfig, + dstTagConfig: emptyTagConfig, + mergedTagConfig: config.TagConfig{ + FreeformTags: map[string]string{}, + DefinedTags: map[string]map[string]interface{}{}, + }, + }, + "base test case": { + srcTagConfig: &config.TagConfig{ + FreeformTags: map[string]string{"foo": "bar"}, + DefinedTags: map[string]map[string]interface{}{ + "ns": {"foo": "bar"}, + }, + }, + dstTagConfig: &config.TagConfig{ + FreeformTags: map[string]string{"foo1": "bar1"}, + DefinedTags: map[string]map[string]interface{}{ + "ns1": {"foo1": "bar1"}, + }, + }, + mergedTagConfig: config.TagConfig{ + FreeformTags: map[string]string{"foo": "bar", "foo1": "bar1"}, + DefinedTags: map[string]map[string]interface{}{ + "ns": {"foo": "bar"}, + "ns1": {"foo1": "bar1"}, + }, + }, + }, + "test case with conflicting key": { + srcTagConfig: &config.TagConfig{ + FreeformTags: map[string]string{"foo": "bar"}, + DefinedTags: map[string]map[string]interface{}{ + "ns": {"foo": "bar"}, + }, + }, + dstTagConfig: &config.TagConfig{ + FreeformTags: map[string]string{"foo": "bar1"}, + DefinedTags: map[string]map[string]interface{}{ + "ns": {"foo2": "bar2"}, + }, + }, + mergedTagConfig: config.TagConfig{ + FreeformTags: map[string]string{"foo1": "bar1"}, + DefinedTags: map[string]map[string]interface{}{ + "ns": {"foo2": "bar2"}, + }, + }, + }, + "test case with one empty config - 1": { + srcTagConfig: emptyTagConfig, + dstTagConfig: &config.TagConfig{ + FreeformTags: map[string]string{"foo": "bar1"}, + DefinedTags: map[string]map[string]interface{}{ + "ns": {"foo2": "bar2"}, + }, + }, + mergedTagConfig: config.TagConfig{ + FreeformTags: map[string]string{"foo": "bar1"}, + DefinedTags: map[string]map[string]interface{}{ + "ns": {"foo2": "bar2"}, + }, + }, + }, + "test case with one empty config - 2": { + srcTagConfig: &config.TagConfig{ + FreeformTags: map[string]string{"foo": "bar1"}, + DefinedTags: map[string]map[string]interface{}{ + "ns": {"foo2": "bar2"}, + }, + }, + dstTagConfig: emptyTagConfig, + mergedTagConfig: config.TagConfig{ + FreeformTags: map[string]string{"foo": "bar1"}, + DefinedTags: map[string]map[string]interface{}{ + "ns": {"foo2": "bar2"}, + }, + }, + }, + } + for name, tc := range tests { + t.Run(name, func(t *testing.T) { + actual := MergeTagConfig(tc.srcTagConfig, tc.dstTagConfig) + if !reflect.DeepEqual(actual.FreeformTags, tc.mergedTagConfig.FreeformTags) && + !reflect.DeepEqual(actual.DefinedTags, tc.mergedTagConfig.DefinedTags) { + t.Errorf("Expected %v but got %v", tc.mergedTagConfig, actual) + } + }) + } +} From 8c1e66d3559e41b53b371b9db20c2fa7b1bbcaca Mon Sep 17 00:00:00 2001 From: Yashwant Gohokar Date: Thu, 25 Apr 2024 13:08:15 +0530 Subject: [PATCH 13/22] Use topology.kubernetes.io labels --- .../csioptions/csioptions.go | 4 +-- pkg/csi-util/utils.go | 10 ++++--- pkg/csi/driver/bv_controller.go | 19 +++++++++++-- pkg/csi/driver/bv_node.go | 1 + pkg/csi/driver/fss_node.go | 1 + .../cloud-provider-oci/csi_volume_creation.go | 28 ++++++++++--------- test/e2e/framework/pvc_util.go | 11 ++++---- 7 files changed, 47 insertions(+), 27 deletions(-) diff --git a/cmd/oci-csi-controller-driver/csioptions/csioptions.go b/cmd/oci-csi-controller-driver/csioptions/csioptions.go index 9a8197fd3..61460e181 100644 --- a/cmd/oci-csi-controller-driver/csioptions/csioptions.go +++ b/cmd/oci-csi-controller-driver/csioptions/csioptions.go @@ -28,7 +28,7 @@ const ( CrossNamespaceVolumeDataSource = "CrossNamespaceVolumeDataSource" ) -// CSIOptions structure which contains flag values +//CSIOptions structure which contains flag values type CSIOptions struct { Master string Kubeconfig string @@ -59,7 +59,7 @@ type CSIOptions struct { EnableResizer bool } -// NewCSIOptions initializes the flag +//NewCSIOptions initializes the flag func NewCSIOptions() *CSIOptions { csioptions := CSIOptions{ Master: *flag.String("master", "", "kube master"), diff --git a/pkg/csi-util/utils.go b/pkg/csi-util/utils.go index 431af0cd5..4723d7db7 100644 --- a/pkg/csi-util/utils.go +++ b/pkg/csi-util/utils.go @@ -109,14 +109,16 @@ func (u *Util) LookupNodeAvailableDomain(k kubernetes.Interface, nodeID string) return "", fmt.Errorf("failed to get node %s", nodeID) } if n.Labels != nil { - ad, ok := n.Labels[kubeAPI.LabelZoneFailureDomain] + ad, ok := n.Labels[kubeAPI.LabelTopologyZone] + if !ok { + ad, ok = n.Labels[kubeAPI.LabelZoneFailureDomain] + } if ok { return ad, nil } } - - errMsg := fmt.Sprint("Did not find the label for the fault domain.") - u.Logger.With("nodeId", nodeID, "label", kubeAPI.LabelZoneFailureDomain).Error(errMsg) + errMsg := fmt.Sprintf("Did not find the label for the fault domain. Checked Topology Labels: %s, %s", kubeAPI.LabelTopologyZone, kubeAPI.LabelZoneFailureDomain) + u.Logger.With("nodeId", nodeID).Error(errMsg) return "", fmt.Errorf(errMsg) } diff --git a/pkg/csi/driver/bv_controller.go b/pkg/csi/driver/bv_controller.go index 6ad7b0c90..4179bae4e 100644 --- a/pkg/csi/driver/bv_controller.go +++ b/pkg/csi/driver/bv_controller.go @@ -324,7 +324,11 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi if req.AccessibilityRequirements != nil && req.AccessibilityRequirements.Preferred != nil && availableDomainShortName == "" { for _, t := range req.AccessibilityRequirements.Preferred { - availableDomainShortName, _ = t.Segments[kubeAPI.LabelZoneFailureDomain] + var ok bool + availableDomainShortName, ok = t.Segments[kubeAPI.LabelTopologyZone] + if !ok { + availableDomainShortName, _ = t.Segments[kubeAPI.LabelZoneFailureDomain] + } log.With("AD", availableDomainShortName).Info("Using preferred topology for AD.") if len(availableDomainShortName) > 0 { break @@ -335,7 +339,11 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi if availableDomainShortName == "" { if req.AccessibilityRequirements != nil && req.AccessibilityRequirements.Requisite != nil { for _, t := range req.AccessibilityRequirements.Requisite { - availableDomainShortName, _ = t.Segments[kubeAPI.LabelZoneFailureDomain] + var ok bool + availableDomainShortName, ok = t.Segments[kubeAPI.LabelTopologyZone] + if !ok { + availableDomainShortName, _ = t.Segments[kubeAPI.LabelZoneFailureDomain] + } log.With("AD", availableDomainShortName).Info("Using requisite topology for AD.") if len(availableDomainShortName) > 0 { break @@ -360,7 +368,7 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi dimensionsMap[metrics.ComponentDimension] = metricDimension metrics.SendMetricData(d.metricPusher, metric, time.Since(startTime).Seconds(), dimensionsMap) log.Error("Available domain short name is not found") - return nil, status.Errorf(codes.InvalidArgument, "%s is required in PreferredTopologies or allowedTopologies", kubeAPI.LabelZoneFailureDomain) + return nil, status.Errorf(codes.InvalidArgument, "(%s) or (%s) is required in PreferredTopologies or allowedTopologies", kubeAPI.LabelTopologyZone, kubeAPI.LabelZoneFailureDomain) } //make sure this method is idempotent by checking existence of volume with same name. @@ -452,6 +460,11 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi VolumeId: *provisionedVolume.Id, CapacityBytes: *provisionedVolume.SizeInMBs * client.MiB, AccessibleTopology: []*csi.Topology{ + { + Segments: map[string]string{ + kubeAPI.LabelTopologyZone: d.util.GetAvailableDomainInNodeLabel(*provisionedVolume.AvailabilityDomain), + }, + }, { Segments: map[string]string{ kubeAPI.LabelZoneFailureDomain: d.util.GetAvailableDomainInNodeLabel(*provisionedVolume.AvailabilityDomain), diff --git a/pkg/csi/driver/bv_node.go b/pkg/csi/driver/bv_node.go index fd48e542c..ba781cf10 100644 --- a/pkg/csi/driver/bv_node.go +++ b/pkg/csi/driver/bv_node.go @@ -659,6 +659,7 @@ func (d BlockVolumeNodeDriver) NodeGetInfo(ctx context.Context, req *csi.NodeGet AccessibleTopology: &csi.Topology{ Segments: map[string]string{ kubeAPI.LabelZoneFailureDomain: ad, + kubeAPI.LabelTopologyZone: ad, }, }, }, nil diff --git a/pkg/csi/driver/fss_node.go b/pkg/csi/driver/fss_node.go index fd8534669..836a11d03 100644 --- a/pkg/csi/driver/fss_node.go +++ b/pkg/csi/driver/fss_node.go @@ -428,6 +428,7 @@ func (d FSSNodeDriver) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequ AccessibleTopology: &csi.Topology{ Segments: map[string]string{ kubeAPI.LabelZoneFailureDomain: ad, + kubeAPI.LabelTopologyZone: ad, }, }, }, nil diff --git a/test/e2e/cloud-provider-oci/csi_volume_creation.go b/test/e2e/cloud-provider-oci/csi_volume_creation.go index f95b0b532..9155725b8 100644 --- a/test/e2e/cloud-provider-oci/csi_volume_creation.go +++ b/test/e2e/cloud-provider-oci/csi_volume_creation.go @@ -23,7 +23,6 @@ import ( . "github.com/onsi/ginkgo" csi_util "github.com/oracle/oci-cloud-controller-manager/pkg/csi-util" - "github.com/oracle/oci-cloud-controller-manager/pkg/volume/provisioner/plugin" "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" ) @@ -392,7 +391,8 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - err := pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName); if err != nil { + err := pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName) + if err != nil { framework.Failf("Error deleting pod: %v", err) } _ = f.DeleteStorageClass(scName) @@ -407,7 +407,8 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName); if err != nil { + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName) + if err != nil { framework.Failf("Error deleting pod: %v", err) } _ = f.DeleteStorageClass(scName) @@ -422,14 +423,15 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) - err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName); if err != nil { + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName) + if err != nil { framework.Failf("Error deleting pod: %v", err) } _ = f.DeleteStorageClass(scName) By("Completed test: Create CSI block volume with UHP Performance Level and xfs file system") By("Running test: Static Provisioning CSI UHP") - scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP + "-4", "blockvolume.csi.oraclecloud.com", + scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP+"-4", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized, csi_util.VpusPerGB: "30"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) @@ -439,7 +441,8 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) pvcJig.CheckVolumeCapacity("50Gi", pvc.Name, f.Namespace.Name) - err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName); if err != nil { + err = pvcJig.DeleteAndAwaitPod(f.Namespace.Name, podName) + if err != nil { framework.Failf("Error deleting pod: %v", err) } f.VolumeIds = append(f.VolumeIds, volumeId) @@ -447,7 +450,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { By("Completed test: Static Provisioning CSI UHP") By("Running test: Basic Pod Delete UHP") - scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP + "-5", "blockvolume.csi.oraclecloud.com", + scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP+"-5", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "30"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc = pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -476,7 +479,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "30", } - scName = f.CreateStorageClassOrFail(framework.ClassOCIKMS + "-1", "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) + scName = f.CreateStorageClassOrFail(framework.ClassOCIKMS+"-1", "blockvolume.csi.oraclecloud.com", scParameter, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) pvc = pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) podName = pvcJig.NewPodForCSI("app1", f.Namespace.Name, pvc.Name, setupF.AdLabel) pvcJig.VerifyMultipathEnabled(ctx, f.ComputeClient, pvc.Name, f.Namespace.Name, compartmentId) @@ -501,7 +504,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { By("Running test: Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for iSCSI UHP volume") pvcJig.Name = "csi-uhp-pvc-expand-to-100gi" var size = "100Gi" - scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP + "-6", "blockvolume.csi.oraclecloud.com", + scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP+"-6", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeISCSI, csi_util.VpusPerGB: "30"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc = pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -519,7 +522,7 @@ var _ = Describe("CSI Ultra High Performance Volumes", func() { By("Completed test: Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for iSCSI UHP volume") By("Running test: Expand PVC VolumeSize from 50Gi to 100Gi and asserts size, file existence and file corruptions for Paravirtualized UHP volume") - scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP + "-7", "blockvolume.csi.oraclecloud.com", + scName = f.CreateStorageClassOrFail(framework.ClassOCIUHP+"-7", "blockvolume.csi.oraclecloud.com", map[string]string{framework.AttachmentType: framework.AttachmentTypeParavirtualized, csi_util.VpusPerGB: "30"}, pvcJig.Labels, "WaitForFirstConsumer", true, "Delete", nil) pvc = pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) @@ -751,8 +754,8 @@ func testTwoPVCSetup(f *framework.CloudProviderFramework, storageclass1params ma nodeHostname := pvcJig.GetNodeHostnameFromPod(podName, f.Namespace.Name) nodeLabels := map[string]string{ - plugin.LabelZoneFailureDomain: setupF.AdLabel, - framework.NodeHostnameLabel: nodeHostname, + v1.LabelTopologyZone: setupF.AdLabel, + framework.NodeHostnameLabel: nodeHostname, } lowPerfScName := f.CreateStorageClassOrFail("storage-class-two", "blockvolume.csi.oraclecloud.com", @@ -761,7 +764,6 @@ func testTwoPVCSetup(f *framework.CloudProviderFramework, storageclass1params ma pvcTwo := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, lowPerfScName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) podName2 := pvcJig.NewPodWithLabels("pvc-two-app", f.Namespace.Name, pvcTwo.Name, nodeLabels) - pvcJig.DeleteAndAwaitPodOrFail(f.Namespace.Name, podName) pvcJig.DeleteAndAwaitPodOrFail(f.Namespace.Name, podName2) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) diff --git a/test/e2e/framework/pvc_util.go b/test/e2e/framework/pvc_util.go index 41b7b229b..74cae1739 100644 --- a/test/e2e/framework/pvc_util.go +++ b/test/e2e/framework/pvc_util.go @@ -36,11 +36,12 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + ocicore "github.com/oracle/oci-go-sdk/v65/core" + csi_util "github.com/oracle/oci-cloud-controller-manager/pkg/csi-util" "github.com/oracle/oci-cloud-controller-manager/pkg/csi/driver" "github.com/oracle/oci-cloud-controller-manager/pkg/oci/client" "github.com/oracle/oci-cloud-controller-manager/pkg/volume/provisioner/plugin" - ocicore "github.com/oracle/oci-go-sdk/v65/core" ) const ( @@ -100,7 +101,7 @@ func (j *PVCTestJig) pvcAddLabelSelector(pvc *v1.PersistentVolumeClaim, adLabel if pvc != nil { pvc.Spec.Selector = &metav1.LabelSelector{ MatchLabels: map[string]string{ - plugin.LabelZoneFailureDomain: adLabel, + v1.LabelTopologyZone: adLabel, }, } } @@ -686,7 +687,7 @@ func (j *PVCTestJig) NewPodForCSI(name string, namespace string, claimName strin return pod.Name } -// NewPodWithLabels returns the default template for this jig, +// newPODTemplate returns the default template for this jig, // creates the Pod. Attaches PVC to the Pod which is created by CSI func (j *PVCTestJig) NewPodWithLabels(name string, namespace string, claimName string, labels map[string]string) string { By("Creating a pod with the claiming PVC created by CSI") @@ -777,7 +778,7 @@ func (j *PVCTestJig) NewPodForCSIClone(name string, namespace string, claimName }, }, NodeSelector: map[string]string{ - plugin.LabelZoneFailureDomain: adLabel, + v1.LabelTopologyZone: adLabel, }, }, }, metav1.CreateOptions{}) @@ -832,7 +833,7 @@ func (j *PVCTestJig) NewPodForCSIWithoutWait(name string, namespace string, clai }, }, NodeSelector: map[string]string{ - plugin.LabelZoneFailureDomain: adLabel, + v1.LabelTopologyZone: adLabel, }, }, }, metav1.CreateOptions{}) From 2d6b4f69d3d2bd2053359bd426b6b445b2845471 Mon Sep 17 00:00:00 2001 From: Pranav Sriram Date: Tue, 21 May 2024 20:56:09 +0530 Subject: [PATCH 14/22] set serviceUid as opc-retry-token --- pkg/cloudprovider/providers/oci/instances_test.go | 4 ++-- pkg/cloudprovider/providers/oci/load_balancer.go | 3 ++- pkg/csi/driver/bv_controller_test.go | 2 +- pkg/oci/client/load_balancer.go | 7 +++---- pkg/oci/client/network_load_balancer.go | 4 ++-- pkg/oci/client/networking.go | 2 +- pkg/volume/provisioner/block/block_test.go | 2 +- pkg/volume/provisioner/fss/fss_test.go | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/cloudprovider/providers/oci/instances_test.go b/pkg/cloudprovider/providers/oci/instances_test.go index ccfef626c..9f104f4f8 100644 --- a/pkg/cloudprovider/providers/oci/instances_test.go +++ b/pkg/cloudprovider/providers/oci/instances_test.go @@ -439,7 +439,7 @@ func (c *MockLoadBalancerClient) ListWorkRequests(ctx context.Context, compartme return nil, nil } -func (c *MockLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails) (string, error) { +func (c *MockLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails, serviceUid *string) (string, error) { return "", nil } @@ -533,7 +533,7 @@ func (c *MockNetworkLoadBalancerClient) ListWorkRequests(ctx context.Context, co return nil, nil } -func (c *MockNetworkLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails) (string, error) { +func (c *MockNetworkLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails, serviceUid *string) (string, error) { return "", nil } diff --git a/pkg/cloudprovider/providers/oci/load_balancer.go b/pkg/cloudprovider/providers/oci/load_balancer.go index 5e890c979..91410f826 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer.go +++ b/pkg/cloudprovider/providers/oci/load_balancer.go @@ -394,7 +394,8 @@ func (clb *CloudLoadBalancerProvider) createLoadBalancer(ctx context.Context, sp } } - wrID, err := clb.lbClient.CreateLoadBalancer(ctx, &details) + serviceUid := fmt.Sprintf("%s", spec.service.UID) + wrID, err := clb.lbClient.CreateLoadBalancer(ctx, &details, &serviceUid) if err != nil { return nil, "", errors.Wrap(err, "creating load balancer") } diff --git a/pkg/csi/driver/bv_controller_test.go b/pkg/csi/driver/bv_controller_test.go index d22181bca..d60214aac 100644 --- a/pkg/csi/driver/bv_controller_test.go +++ b/pkg/csi/driver/bv_controller_test.go @@ -465,7 +465,7 @@ func (c *MockLoadBalancerClient) ListWorkRequests(ctx context.Context, compartme return nil, nil } -func (c *MockLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails) (string, error) { +func (c *MockLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails, serviceUid *string) (string, error) { return "", nil } diff --git a/pkg/oci/client/load_balancer.go b/pkg/oci/client/load_balancer.go index 33c9e1aac..5571fa134 100644 --- a/pkg/oci/client/load_balancer.go +++ b/pkg/oci/client/load_balancer.go @@ -39,7 +39,7 @@ type loadbalancerClientStruct struct { } type GenericLoadBalancerInterface interface { - CreateLoadBalancer(ctx context.Context, details *GenericCreateLoadBalancerDetails) (string, error) + CreateLoadBalancer(ctx context.Context, details *GenericCreateLoadBalancerDetails, serviceUid *string) (string, error) GetLoadBalancer(ctx context.Context, id string) (*GenericLoadBalancer, error) GetLoadBalancerByName(ctx context.Context, compartmentID, name string) (*GenericLoadBalancer, error) @@ -111,11 +111,10 @@ func (c *loadbalancerClientStruct) GetLoadBalancerByName(ctx context.Context, co return nil, errors.WithStack(errNotFound) } -func (c *loadbalancerClientStruct) CreateLoadBalancer(ctx context.Context, details *GenericCreateLoadBalancerDetails) (string, error) { +func (c *loadbalancerClientStruct) CreateLoadBalancer(ctx context.Context, details *GenericCreateLoadBalancerDetails, serviceUid *string) (string, error) { if !c.rateLimiter.Writer.TryAccept() { return "", RateLimitError(true, "CreateLoadBalancer") } - resp, err := c.loadbalancer.CreateLoadBalancer(ctx, loadbalancer.CreateLoadBalancerRequest{ CreateLoadBalancerDetails: loadbalancer.CreateLoadBalancerDetails{ CompartmentId: details.CompartmentId, @@ -133,7 +132,7 @@ func (c *loadbalancerClientStruct) CreateLoadBalancer(ctx context.Context, detai DefinedTags: details.DefinedTags, }, RequestMetadata: c.requestMetadata, - OpcRetryToken: details.DisplayName, + OpcRetryToken: serviceUid, }) incRequestCounter(err, createVerb, loadBalancerResource) diff --git a/pkg/oci/client/network_load_balancer.go b/pkg/oci/client/network_load_balancer.go index 9cf9eb544..94e93572a 100644 --- a/pkg/oci/client/network_load_balancer.go +++ b/pkg/oci/client/network_load_balancer.go @@ -84,7 +84,7 @@ func (c *networkLoadbalancer) GetLoadBalancerByName(ctx context.Context, compart return nil, errors.WithStack(errNotFound) } -func (c *networkLoadbalancer) CreateLoadBalancer(ctx context.Context, details *GenericCreateLoadBalancerDetails) (string, error) { +func (c *networkLoadbalancer) CreateLoadBalancer(ctx context.Context, details *GenericCreateLoadBalancerDetails, serviceUid *string) (string, error) { if !c.rateLimiter.Writer.TryAccept() { return "", RateLimitError(true, "CreateLoadBalancer") } @@ -104,7 +104,7 @@ func (c *networkLoadbalancer) CreateLoadBalancer(ctx context.Context, details *G DefinedTags: details.DefinedTags, }, RequestMetadata: c.requestMetadata, - OpcRetryToken: details.DisplayName, + OpcRetryToken: serviceUid, }) incRequestCounter(err, createVerb, networkLoadBalancerResource) diff --git a/pkg/oci/client/networking.go b/pkg/oci/client/networking.go index ea639d5b5..026503ea5 100644 --- a/pkg/oci/client/networking.go +++ b/pkg/oci/client/networking.go @@ -232,7 +232,7 @@ func (c *client) CreateNetworkSecurityGroup(ctx context.Context, compartmentId, DisplayName: &displayName, FreeformTags: map[string]string{"CreatedBy": "CCM", "ServiceUid": serviceUid}, }, - OpcRetryToken: &displayName, + OpcRetryToken: &serviceUid, RequestMetadata: requestMetadata, }) diff --git a/pkg/volume/provisioner/block/block_test.go b/pkg/volume/provisioner/block/block_test.go index 6684f9065..8193eff1d 100644 --- a/pkg/volume/provisioner/block/block_test.go +++ b/pkg/volume/provisioner/block/block_test.go @@ -393,7 +393,7 @@ func (c *MockLoadBalancerClient) ListWorkRequests(ctx context.Context, compartme return nil, nil } -func (c *MockLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails) (string, error) { +func (c *MockLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails, serviceUid *string) (string, error) { return "", nil } diff --git a/pkg/volume/provisioner/fss/fss_test.go b/pkg/volume/provisioner/fss/fss_test.go index 634f497fe..87a339833 100644 --- a/pkg/volume/provisioner/fss/fss_test.go +++ b/pkg/volume/provisioner/fss/fss_test.go @@ -392,7 +392,7 @@ func (c *MockLoadBalancerClient) ListWorkRequests(ctx context.Context, compartme return nil, nil } -func (c *MockLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails) (string, error) { +func (c *MockLoadBalancerClient) CreateLoadBalancer(ctx context.Context, details *client.GenericCreateLoadBalancerDetails, serviceUid *string) (string, error) { return "", nil } From 914231d079f38c79b7601826022835bef701aef8 Mon Sep 17 00:00:00 2001 From: l-technicore Date: Mon, 27 May 2024 13:39:18 +0530 Subject: [PATCH 15/22] Bugfix: Ensure backend ssl certificates during Update LoadBalancer Backendsets flow --- .../providers/oci/load_balancer.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkg/cloudprovider/providers/oci/load_balancer.go b/pkg/cloudprovider/providers/oci/load_balancer.go index 91410f826..36ad93bf4 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer.go +++ b/pkg/cloudprovider/providers/oci/load_balancer.go @@ -1229,6 +1229,22 @@ func (cp *CloudProvider) UpdateLoadBalancer(ctx context.Context, clusterName str return err } + var sslConfig *SSLConfig + if requiresCertificate(service) { + ports, err := getSSLEnabledPorts(service) + if err != nil { + logger.With(zap.Error(err)).Error("Failed to parse SSL port.") + errorType = util.GetError(err) + lbMetricDimension = util.GetMetricDimensionForComponent(errorType, util.LoadBalancerType) + dimensionsMap[metrics.ComponentDimension] = lbMetricDimension + metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), time.Since(startTime).Seconds(), dimensionsMap) + return err + } + secretListenerString := service.Annotations[ServiceAnnotationLoadBalancerTLSSecret] + secretBackendSetString := service.Annotations[ServiceAnnotationLoadBalancerTLSBackendSetSecret] + sslConfig = NewSSLConfig(secretListenerString, secretBackendSetString, service, ports, cp) + } + subnets, err := cp.getLoadBalancerSubnets(ctx, logger, service) if err != nil { logger.With(zap.Error(err)).Error("Failed to get Load balancer Subnets.") @@ -1239,7 +1255,7 @@ func (cp *CloudProvider) UpdateLoadBalancer(ctx context.Context, clusterName str return err } - spec, err := NewLBSpec(logger, service, nodes, subnets, nil, cp.securityListManagerFactory, cp.config.Tags, lb) + spec, err := NewLBSpec(logger, service, nodes, subnets, sslConfig, cp.securityListManagerFactory, cp.config.Tags, lb) if err != nil { logger.With(zap.Error(err)).Error("Failed to derive LBSpec") errorType = util.GetError(err) From db50d3140fc27784c922b53ae3fd0f94921e2e34 Mon Sep 17 00:00:00 2001 From: yashg Date: Mon, 27 May 2024 13:40:10 +0530 Subject: [PATCH 16/22] Fix response when no size change in ControllerExpandVolume --- pkg/csi/driver/bv_controller.go | 2 +- pkg/csi/driver/bv_controller_test.go | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/pkg/csi/driver/bv_controller.go b/pkg/csi/driver/bv_controller.go index 4179bae4e..c470927e4 100644 --- a/pkg/csi/driver/bv_controller.go +++ b/pkg/csi/driver/bv_controller.go @@ -1229,7 +1229,7 @@ func (d *BlockVolumeControllerDriver) ControllerExpandVolume(ctx context.Context if newSizeInGB <= oldSize { log.Infof("Existing volume size: %v Requested volume size: %v No action needed.", *volume.SizeInGBs, newSizeInGB) return &csi.ControllerExpandVolumeResponse{ - CapacityBytes: oldSize, + CapacityBytes: oldSize * client.GiB, NodeExpansionRequired: true, }, nil } diff --git a/pkg/csi/driver/bv_controller_test.go b/pkg/csi/driver/bv_controller_test.go index d60214aac..fb3ee69ab 100644 --- a/pkg/csi/driver/bv_controller_test.go +++ b/pkg/csi/driver/bv_controller_test.go @@ -1235,6 +1235,24 @@ func TestControllerDriver_ControllerExpandVolume(t *testing.T) { want: nil, wantErr: errors.New("Update volume failed"), }, + { + name: "If no changes then do nothing in ControllerExpandVolume", + fields: fields{}, + args: args{ + ctx: nil, + req: &csi.ControllerExpandVolumeRequest{ + VolumeId: "valid_volume_id", + CapacityRange: &csi.CapacityRange{ + RequiredBytes: int64(csi_util.MaximumVolumeSizeInBytes), + }, + }, + }, + want: &csi.ControllerExpandVolumeResponse{ + CapacityBytes: int64(csi_util.MaximumVolumeSizeInBytes), + NodeExpansionRequired: true, + }, + wantErr: nil, + }, { name: "Uhp volume expand success in ControllerExpandVolume", fields: fields{}, From 6edfc7fd299fc405bc020aea9029ae3b4b3fb729 Mon Sep 17 00:00:00 2001 From: Goutham M L Date: Mon, 3 Jun 2024 19:47:38 +0530 Subject: [PATCH 17/22] Avoid change service type in update shape test cases --- test/e2e/cloud-provider-oci/load_balancer.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/test/e2e/cloud-provider-oci/load_balancer.go b/test/e2e/cloud-provider-oci/load_balancer.go index 556da9836..42b40d55e 100644 --- a/test/e2e/cloud-provider-oci/load_balancer.go +++ b/test/e2e/cloud-provider-oci/load_balancer.go @@ -1150,23 +1150,11 @@ var _ = Describe("LB Properties", func() { "10", "100", }, - }, - }, - { - "Create and update flexible LB", - "flexible", - []struct { - shape string - flexMin string - flexMax string - }{ { "flexible", "50", "150", }, - // Note: We can't go back to fixed shape after converting to flexible shape. - // Use Min and Max values to be the same value to get fixed shape LB }, }, } From 34cb70ccc4a3ebd2b005d63cbb16220eb592c137 Mon Sep 17 00:00:00 2001 From: ypgohoka Date: Fri, 21 Jun 2024 15:42:17 +0530 Subject: [PATCH 18/22] change image push registry to create image --- .github/workflows/release.yaml | 4 ++-- pkg/cloudprovider/providers/oci/load_balancer_spec_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 56591c42c..83e919396 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${GITHUB_ACTOR,,} --password-stdin - name: Build Image - run: OSS_REGISTRY="ghcr.io/oracle" VERSION="${{ github.ref_name }}" make image + run: OSS_REGISTRY="ghcr.io/${GITHUB_ACTOR,,}" VERSION="${{ github.ref_name }}" make image - name: Push Image - run: OSS_REGISTRY="ghcr.io/oracle" VERSION="${{ github.ref_name }}" make docker-push-all + run: OSS_REGISTRY="ghcr.io/${GITHUB_ACTOR,,}" VERSION="${{ github.ref_name }}" make docker-push-all diff --git a/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go b/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go index a659995ac..083a0e2dd 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go @@ -2733,7 +2733,7 @@ func TestNewLBSpecForTags(t *testing.T) { return newSecurityListManagerNOOP() } - result, err := NewLBSpec(logger.Sugar(), tc.service, tc.nodes, tc.virtualPods, subnets, tc.sslConfig, slManagerFactory, tc.clusterTags, nil) + result, err := NewLBSpec(logger.Sugar(), tc.service, tc.nodes, subnets, tc.sslConfig, slManagerFactory, tc.clusterTags, nil) if err != nil { t.Error(err) } From 0b95055220f0dd49087a9446b2edf5ca129f6df8 Mon Sep 17 00:00:00 2001 From: Akarsh Ellore Sreenath Date: Wed, 24 Apr 2024 15:42:36 +0530 Subject: [PATCH 19/22] List instances to check for authorization issues --- pkg/cloudprovider/providers/oci/instances.go | 31 ++++++++++++++++++- .../providers/oci/instances_test.go | 4 +++ pkg/csi/driver/bv_controller_test.go | 4 +++ pkg/oci/client/compute.go | 31 +++++++++++++++++++ pkg/volume/provisioner/block/block_test.go | 4 +++ pkg/volume/provisioner/fss/fss_test.go | 4 +++ 6 files changed, 77 insertions(+), 1 deletion(-) diff --git a/pkg/cloudprovider/providers/oci/instances.go b/pkg/cloudprovider/providers/oci/instances.go index 986f1457c..106a8f26c 100644 --- a/pkg/cloudprovider/providers/oci/instances.go +++ b/pkg/cloudprovider/providers/oci/instances.go @@ -243,7 +243,8 @@ func (cp *CloudProvider) InstanceExistsByProviderID(ctx context.Context, provide } instance, err := cp.client.Compute().GetInstance(ctx, instanceID) if client.IsNotFound(err) { - return false, nil + return cp.checkForAuthorizationError(ctx, providerID) + } if err != nil { return false, err @@ -252,6 +253,34 @@ func (cp *CloudProvider) InstanceExistsByProviderID(ctx context.Context, provide return !client.IsInstanceInTerminalState(instance), nil } +func (cp *CloudProvider) checkForAuthorizationError(ctx context.Context, instanceId string) (bool, error) { + cp.logger.With("instanceId", instanceId).Info("Received 404 for an instance, listing instances to check for authorization errors") + compartmentId, err := cp.getCompartmentIDByInstanceID(instanceId) + if err != nil { + return false, err + } + // to eliminate AD specific issues, list all ADs and make AD specific requests + availabilityDomains, err := cp.client.Identity().ListAvailabilityDomains(ctx, compartmentId) + for _, availabilityDomain := range availabilityDomains { + instances, err := cp.client.Compute().ListInstancesByCompartmentAndAD(ctx, compartmentId, *availabilityDomain.Name) + // if we are getting errors for ListInstances the issue can be authorization or other issues + // so to be safe we return the error back as we can't list instances in the compartment + if err != nil { + cp.logger.With("instanceId", instanceId).Info("Received error when listing instances to check for authorization errors") + return false, err + } + + for _, instance := range instances { + if *instance.Id == instanceId { + // Can only happen if changes are done in policy in-between requests + return true, nil + } + } + } + + return false, nil +} + // InstanceShutdownByProviderID returns true if the instance is shutdown in cloudprovider. func (cp *CloudProvider) InstanceShutdownByProviderID(ctx context.Context, providerID string) (bool, error) { //Please do not try to optimise it by using InstanceCache because we prefer correctness over efficiency here diff --git a/pkg/cloudprovider/providers/oci/instances_test.go b/pkg/cloudprovider/providers/oci/instances_test.go index 9f104f4f8..8c178ab4b 100644 --- a/pkg/cloudprovider/providers/oci/instances_test.go +++ b/pkg/cloudprovider/providers/oci/instances_test.go @@ -310,6 +310,10 @@ func (MockOCIClient) Identity() client.IdentityInterface { // MockComputeClient mocks Compute client implementation type MockComputeClient struct{} +func (c MockComputeClient) ListInstancesByCompartmentAndAD(ctx context.Context, compartmentId, availabilityDomain string) (response []core.Instance, err error) { + return nil, nil +} + func (MockComputeClient) GetInstance(ctx context.Context, id string) (*core.Instance, error) { if instance, ok := instances[id]; ok { return instance, nil diff --git a/pkg/csi/driver/bv_controller_test.go b/pkg/csi/driver/bv_controller_test.go index fb3ee69ab..f1493f200 100644 --- a/pkg/csi/driver/bv_controller_test.go +++ b/pkg/csi/driver/bv_controller_test.go @@ -542,6 +542,10 @@ type MockComputeClient struct { compute util.MockOCIComputeClient } +func (c *MockComputeClient) ListInstancesByCompartmentAndAD(ctx context.Context, compartmentId, availabilityDomain string) (response []core.Instance, err error) { + return nil, nil +} + // GetInstance gets information about the specified instance. func (c *MockComputeClient) GetInstance(ctx context.Context, id string) (*core.Instance, error) { if instance, ok := instances[id]; ok { diff --git a/pkg/oci/client/compute.go b/pkg/oci/client/compute.go index e34e311bb..e5f5b96c6 100644 --- a/pkg/oci/client/compute.go +++ b/pkg/oci/client/compute.go @@ -26,6 +26,7 @@ import ( type ComputeInterface interface { // GetInstance gets information about the specified instance. GetInstance(ctx context.Context, id string) (*core.Instance, error) + ListInstancesByCompartmentAndAD(ctx context.Context, compartmentId, availabilityDomain string) (response []core.Instance, err error) // GetInstanceByNodeName gets the OCI instance corresponding to the given // Kubernetes node name. @@ -53,6 +54,36 @@ func (c *client) GetInstance(ctx context.Context, id string) (*core.Instance, er return &resp.Instance, nil } +func (c *client) ListInstancesByCompartmentAndAD(ctx context.Context, compartmentID, availabilityDomain string) ([]core.Instance, error) { + var ( + page *string + instances []core.Instance + ) + for { + if !c.rateLimiter.Reader.TryAccept() { + return nil, RateLimitError(false, "ListInstances") + } + resp, err := c.compute.ListInstances(ctx, core.ListInstancesRequest{ + AvailabilityDomain: &availabilityDomain, + CompartmentId: &compartmentID, + Page: page, + RequestMetadata: c.requestMetadata, + }) + incRequestCounter(err, listVerb, instanceResource) + + if err != nil { + return nil, errors.WithStack(err) + } + + instances = append(instances, resp.Items...) + if page = resp.OpcNextPage; resp.OpcNextPage == nil { + break + } + } + + return instances, nil +} + func (c *client) getInstanceByDisplayName(ctx context.Context, compartmentID, displayName string) (*core.Instance, error) { var ( page *string diff --git a/pkg/volume/provisioner/block/block_test.go b/pkg/volume/provisioner/block/block_test.go index 8193eff1d..1e4eb37cf 100644 --- a/pkg/volume/provisioner/block/block_test.go +++ b/pkg/volume/provisioner/block/block_test.go @@ -226,6 +226,10 @@ func (c *MockFileStorageClient) AwaitMountTargetActive(ctx context.Context, logg type MockComputeClient struct{} +func (c *MockComputeClient) ListInstancesByCompartmentAndAD(ctx context.Context, compartmentId, availabilityDomain string) (response []core.Instance, err error) { + return nil, nil +} + // GetInstance gets information about the specified instance. func (c *MockComputeClient) GetInstance(ctx context.Context, id string) (*core.Instance, error) { return nil, nil diff --git a/pkg/volume/provisioner/fss/fss_test.go b/pkg/volume/provisioner/fss/fss_test.go index 87a339833..949f5f3a0 100644 --- a/pkg/volume/provisioner/fss/fss_test.go +++ b/pkg/volume/provisioner/fss/fss_test.go @@ -225,6 +225,10 @@ func (c *MockFileStorageClient) AwaitMountTargetActive(ctx context.Context, logg type MockComputeClient struct{} +func (c *MockComputeClient) ListInstancesByCompartmentAndAD(ctx context.Context, compartmentId, availabilityDomain string) (response []core.Instance, err error) { + return nil, nil +} + // GetInstance gets information about the specified instance. func (c *MockComputeClient) GetInstance(ctx context.Context, id string) (*core.Instance, error) { return nil, nil From 0780ac81ea317a61afce2054a97f2cda492331a1 Mon Sep 17 00:00:00 2001 From: Goutham M L Date: Fri, 15 Mar 2024 00:56:02 +0530 Subject: [PATCH 20/22] System tag support in CPO. Backfilling existing LB & NLB --- .../providers/oci/instances_test.go | 16 +++ .../providers/oci/load_balancer.go | 99 +++++++++++++- .../providers/oci/load_balancer_spec.go | 25 +++- .../providers/oci/load_balancer_spec_test.go | 125 ++++++++++++++++++ .../providers/oci/load_balancer_test.go | 118 +++++++++++++++++ pkg/csi-util/utils.go | 14 ++ pkg/csi/driver/bv_controller.go | 31 ++++- pkg/csi/driver/bv_controller_test.go | 36 ++++- pkg/oci/client/client.go | 2 + pkg/oci/client/errors.go | 25 ++++ pkg/oci/client/errors_test.go | 67 ++++++++++ pkg/oci/client/generic_load_balancer_types.go | 6 + pkg/oci/client/load_balancer.go | 21 +++ pkg/oci/client/load_balancer_test.go | 3 + pkg/oci/client/network_load_balancer.go | 23 ++++ pkg/oci/client/network_load_balancer_test.go | 4 + pkg/util/commons.go | 23 ++-- pkg/util/commons_test.go | 3 +- pkg/volume/provisioner/block/block_test.go | 4 + pkg/volume/provisioner/fss/fss_test.go | 3 + 20 files changed, 627 insertions(+), 21 deletions(-) diff --git a/pkg/cloudprovider/providers/oci/instances_test.go b/pkg/cloudprovider/providers/oci/instances_test.go index 8c178ab4b..2e5f62fef 100644 --- a/pkg/cloudprovider/providers/oci/instances_test.go +++ b/pkg/cloudprovider/providers/oci/instances_test.go @@ -497,6 +497,18 @@ func (c *MockLoadBalancerClient) DeleteListener(ctx context.Context, lbID, name return "", nil } +var updateLoadBalancerErrors = map[string]error{ + "work request fail": errors.New("internal server error"), +} + +func (c *MockLoadBalancerClient) UpdateLoadBalancer(ctx context.Context, lbID string, details *client.GenericUpdateLoadBalancerDetails) (string, error) { + if err, ok := updateLoadBalancerErrors[lbID]; ok { + return "", err + } + + return "", nil +} + var awaitLoadbalancerWorkrequestMap = map[string]error{ "failedToGetUpdateNetworkSecurityGroupsWorkRequest": errors.New("internal server error for get workrequest call"), } @@ -612,6 +624,10 @@ func (c *MockNetworkLoadBalancerClient) UpdateNetworkSecurityGroups(ctx context. return "", nil } +func (c *MockNetworkLoadBalancerClient) UpdateLoadBalancer(ctx context.Context, lbID string, details *client.GenericUpdateLoadBalancerDetails) (string, error) { + return "", nil +} + // MockBlockStorageClient mocks BlockStorage client implementation type MockBlockStorageClient struct{} diff --git a/pkg/cloudprovider/providers/oci/load_balancer.go b/pkg/cloudprovider/providers/oci/load_balancer.go index 36ad93bf4..d4e8dfbf2 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer.go +++ b/pkg/cloudprovider/providers/oci/load_balancer.go @@ -68,6 +68,17 @@ const DefaultNetworkLoadBalancerListenerProtocol = "TCP" // https://docs.oracle.com/en-us/iaas/Content/General/Concepts/servicelimits.htm#nsg_limits const MaxNsgPerVnic = 5 +const ( + OkeSystemTagNamesapce = "orcl-containerengine" + // MaxDefinedTagPerLB is the maximum number of defined tags that be can be associated with the resource + //https://docs.oracle.com/en-us/iaas/Content/Tagging/Concepts/taggingoverview.htm#limits + MaxDefinedTagPerLB = 64 + resourceTrackingFeatureFlagName = "CPO_ENABLE_RESOURCE_ATTRIBUTION" +) + +var MaxDefinedTagPerLBErr = fmt.Errorf("max limit of defined tags for lb is reached. skip adding tags. sending metric") +var enableOkeSystemTags = false + const ( // Fallback value if annotation on service is not set lbDefaultShape = "100Mbps" @@ -373,6 +384,11 @@ func (clb *CloudLoadBalancerProvider) createLoadBalancer(ctx context.Context, sp FreeformTags: spec.FreeformTags, DefinedTags: spec.DefinedTags, } + // do not block creation if the defined tag limit is reached. defer LB to tracked by backfilling + if len(details.DefinedTags) > MaxDefinedTagPerLB { + logger.Warnf("the number of defined tags in the LB create request is beyond the limit. removing the resource tracking tags from the details..") + delete(details.DefinedTags, OkeSystemTagNamesapce) + } if spec.Shape == flexible { details.ShapeDetails = &client.GenericShapeDetails{ @@ -714,6 +730,19 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str if !lbExists { lbStatus, newLBOCID, err := lbProvider.createLoadBalancer(ctx, spec) + if err != nil && client.IsSystemTagNotFoundOrNotAuthorisedError(logger, err) { + logger.Warn("LB creation failed due to error in adding system tags. sending metric & retrying without system tags") + + // send resource track tagging failure metrics + errorType = util.SystemTagErrTypePrefix + util.GetError(err) + lbMetricDimension = util.GetMetricDimensionForComponent(errorType, util.LoadBalancerType) + dimensionsMap[metrics.ComponentDimension] = lbMetricDimension + metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Create), time.Since(startTime).Seconds(), dimensionsMap) + + // retry create without resource tracking system tags + delete(spec.DefinedTags, OkeSystemTagNamesapce) + lbStatus, newLBOCID, err = lbProvider.createLoadBalancer(ctx, spec) + } if err != nil { logger.With(zap.Error(err)).Error("Failed to provision LoadBalancer") errorType = util.GetError(err) @@ -884,7 +913,7 @@ func (cp *CloudProvider) getLoadBalancerSubnets(ctx context.Context, logger *zap func (clb *CloudLoadBalancerProvider) updateLoadBalancer(ctx context.Context, lb *client.GenericLoadBalancer, spec *LBSpec) error { lbID := *lb.Id - + start := time.Now() logger := clb.logger.With("loadBalancerID", lbID, "compartmentID", clb.config.CompartmentID, "loadBalancerType", getLoadBalancerType(spec.service), "serviceName", spec.service.Name) var actualPublicReservedIP *string @@ -983,6 +1012,24 @@ func (clb *CloudLoadBalancerProvider) updateLoadBalancer(ctx context.Context, lb return errors.Errorf("The Load Balancer service reserved IP cannot be updated after the Load Balancer is created.") } } + + dimensionsMap := make(map[string]string) + var errType string + if enableOkeSystemTags && !doesLbHaveOkeSystemTags(lb, spec) { + logger.Info("detected loadbalancer without oke system tags. proceeding to add") + err = clb.addLoadBalancerOkeSystemTags(ctx, lb, spec) + if err != nil { + // fail open if the update request fails + logger.With(zap.Error(err)).Warn("updateLoadBalancer didn't succeed. unable to add oke system tags") + errType = util.SystemTagErrTypePrefix + util.GetError(err) + if errors.Is(err, MaxDefinedTagPerLBErr) { + errType = util.ErrTagLimitReached + } + dimensionsMap[metrics.ComponentDimension] = util.GetMetricDimensionForComponent(errType, util.LoadBalancerType) + dimensionsMap[metrics.ResourceOCIDDimension] = *lb.Id + metrics.SendMetricData(clb.metricPusher, getMetric(spec.Type, Update), time.Since(start).Seconds(), dimensionsMap) + } + } return nil } @@ -1648,6 +1695,56 @@ func (clb *CloudLoadBalancerProvider) updateLoadBalancerNetworkSecurityGroups(ct return nil } +func doesLbHaveOkeSystemTags(lb *client.GenericLoadBalancer, spec *LBSpec) bool { + if lb.SystemTags == nil || spec.SystemTags == nil { + return false + } + if okeSystemTag, okeSystemTagNsExists := lb.SystemTags[OkeSystemTagNamesapce]; okeSystemTagNsExists { + return reflect.DeepEqual(okeSystemTag, spec.SystemTags[OkeSystemTagNamesapce]) + } + return false +} +func (clb *CloudLoadBalancerProvider) addLoadBalancerOkeSystemTags(ctx context.Context, lb *client.GenericLoadBalancer, spec *LBSpec) error { + lbDefinedTagsRequest := make(map[string]map[string]interface{}) + + if spec.SystemTags == nil { + return fmt.Errorf("oke system tag is not found in LB spec. ignoring..") + } + if _, exists := spec.SystemTags[OkeSystemTagNamesapce]; !exists { + return fmt.Errorf("oke system tag namespace is not found in LB spec") + } + + if lb.DefinedTags != nil { + lbDefinedTagsRequest = lb.DefinedTags + } + + // no overwriting customer tags as customer can not have a tag namespace with prefix 'orcl-' + // system tags are passed as defined tags in the request + lbDefinedTagsRequest[OkeSystemTagNamesapce] = spec.SystemTags[OkeSystemTagNamesapce] + + // update fails if the number of defined tags is more than the service limit i.e 64 + if len(lbDefinedTagsRequest) > MaxDefinedTagPerLB { + return MaxDefinedTagPerLBErr + } + + lbUpdateDetails := &client.GenericUpdateLoadBalancerDetails{ + FreeformTags: lb.FreeformTags, + DefinedTags: lbDefinedTagsRequest, + } + wrID, err := clb.lbClient.UpdateLoadBalancer(ctx, *lb.Id, lbUpdateDetails) + if err != nil { + return errors.Wrap(err, "UpdateLoadBalancer request failed") + } + _, err = clb.lbClient.AwaitWorkRequest(ctx, wrID) + if err != nil { + return errors.Wrap(err, "failed to await updateloadbalancer work request") + } + + logger := clb.logger.With("opc-workrequest-id", wrID, "loadBalancerID", lb.Id) + logger.Info("UpdateLoadBalancer request to add oke system tags completed successfully") + return nil +} + // Given an OCI load balancer, return a LoadBalancerStatus func loadBalancerToStatus(lb *client.GenericLoadBalancer) (*v1.LoadBalancerStatus, error) { if len(lb.IpAddresses) == 0 { diff --git a/pkg/cloudprovider/providers/oci/load_balancer_spec.go b/pkg/cloudprovider/providers/oci/load_balancer_spec.go index 53c5e739c..4ad4f5a69 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_spec.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_spec.go @@ -17,7 +17,6 @@ package oci import ( "encoding/json" "fmt" - "github.com/oracle/oci-cloud-controller-manager/pkg/util" "net" "net/http" "strconv" @@ -30,6 +29,7 @@ import ( "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" "github.com/oracle/oci-cloud-controller-manager/pkg/oci/client" + "github.com/oracle/oci-cloud-controller-manager/pkg/util" "github.com/oracle/oci-go-sdk/v65/common" "github.com/pkg/errors" helper "k8s.io/cloud-provider/service/helpers" @@ -318,6 +318,7 @@ type LBSpec struct { NetworkSecurityGroupIds []string FreeformTags map[string]string DefinedTags map[string]map[string]interface{} + SystemTags map[string]map[string]interface{} service *v1.Service nodes []*v1.Node @@ -379,7 +380,7 @@ func NewLBSpec(logger *zap.SugaredLogger, svc *v1.Service, nodes []*v1.Node, sub return nil, err } // merge lbtags with common tags if present - if util.IsCommonTagPresent(initialLBTags) { + if enableOkeSystemTags && util.IsCommonTagPresent(initialLBTags) { lbTags = util.MergeTagConfig(lbTags, initialLBTags.Common) } @@ -421,6 +422,7 @@ func NewLBSpec(logger *zap.SugaredLogger, svc *v1.Service, nodes []*v1.Node, sub securityListManager: secListFactory(ruleManagementMode), FreeformTags: lbTags.FreeformTags, DefinedTags: lbTags.DefinedTags, + SystemTags: getResourceTrackingSysTagsFromConfig(logger, initialLBTags), }, nil } @@ -1351,3 +1353,22 @@ func updateSpecWithLbSubnets(spec *LBSpec, lbSubnetId []string) (*LBSpec, error) return spec, nil } + +// getResourceTrackingSysTagsFromConfig reads resource tracking tags from config +// which are specified under common tags +func getResourceTrackingSysTagsFromConfig(logger *zap.SugaredLogger, initialTags *config.InitialTags) (resourceTrackingTags map[string]map[string]interface{}) { + resourceTrackingTags = make(map[string]map[string]interface{}) + // TODO: Fix the double negative + if !(util.IsCommonTagPresent(initialTags) && initialTags.Common.DefinedTags != nil) { + logger.Error("oke resource tracking system tags are not present in cloud-config.yaml") + return nil + } + + if tag, exists := initialTags.Common.DefinedTags[OkeSystemTagNamesapce]; exists { + resourceTrackingTags[OkeSystemTagNamesapce] = tag + return + } + + logger.Error("tag config doesn't consist resource tracking tags") + return nil +} diff --git a/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go b/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go index 083a0e2dd..fcd01316f 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_spec_test.go @@ -65,6 +65,7 @@ func (ssr mockSSLSecretReader) readSSLSecret(ns, name string) (sslSecret *certif } func TestNewLBSpecSuccess(t *testing.T) { + enableOkeSystemTags = true testCases := map[string]struct { defaultSubnetOne string defaultSubnetTwo string @@ -2126,6 +2127,7 @@ func TestNewLBSpecSuccess(t *testing.T) { } func TestNewLBSpecForTags(t *testing.T) { + enableOkeSystemTags = true tests := map[string]struct { defaultSubnetOne string defaultSubnetTwo string @@ -2135,6 +2137,7 @@ func TestNewLBSpecForTags(t *testing.T) { sslConfig *SSLConfig expected *LBSpec clusterTags *providercfg.InitialTags + featureEnabled bool }{ "no resource & cluster level tags but common tags from config": { defaultSubnetOne: "one", @@ -2207,6 +2210,7 @@ func TestNewLBSpecForTags(t *testing.T) { FreeformTags: map[string]string{}, DefinedTags: map[string]map[string]interface{}{"namespace": {"cluster": "CommonCluster", "owner": "CommonClusterOwner"}}, }, + featureEnabled: true, }, "no resource or cluster level tags and no common tags": { defaultSubnetOne: "one", @@ -2270,6 +2274,7 @@ func TestNewLBSpecForTags(t *testing.T) { securityListManager: newSecurityListManagerNOOP(), ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, }, + featureEnabled: true, }, "resource level tags with common tags from config": { defaultSubnetOne: "one", @@ -2345,6 +2350,7 @@ func TestNewLBSpecForTags(t *testing.T) { FreeformTags: map[string]string{"cluster": "resource", "unique": "tag", "name": "development_cluster"}, DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}, "namespace2": {"owner2": "team2", "key2": "value2"}}, }, + featureEnabled: true, }, "resource level defined tags and common defined tags from config with same key": { defaultSubnetOne: "one", @@ -2419,6 +2425,7 @@ func TestNewLBSpecForTags(t *testing.T) { FreeformTags: map[string]string{"cluster": "resource", "unique": "tag", "name": "development_cluster"}, DefinedTags: map[string]map[string]interface{}{"namespace": {"owner2": "team2", "key2": "value2"}}, }, + featureEnabled: true, }, "cluster level tags and common tags": { defaultSubnetOne: "one", @@ -2493,6 +2500,7 @@ func TestNewLBSpecForTags(t *testing.T) { FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer", "name": "development_cluster"}, DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}, "namespace2": {"owner2": "team2", "key2": "value2"}}, }, + featureEnabled: true, }, "cluster level defined tags and common defined tags with same key": { defaultSubnetOne: "one", @@ -2567,6 +2575,7 @@ func TestNewLBSpecForTags(t *testing.T) { FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer", "name": "development_cluster"}, DefinedTags: map[string]map[string]interface{}{"namespace": {"owner2": "team2", "key2": "value2"}}, }, + featureEnabled: true, }, "cluster level tags with no common tags": { defaultSubnetOne: "one", @@ -2637,6 +2646,7 @@ func TestNewLBSpecForTags(t *testing.T) { FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer"}, DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}}, }, + featureEnabled: true, }, "no cluster or level tags but common tags from config": { defaultSubnetOne: "one", @@ -2707,6 +2717,76 @@ func TestNewLBSpecForTags(t *testing.T) { FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer"}, DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}}, }, + featureEnabled: true, + }, + "when the feature is disabled": { + defaultSubnetOne: "one", + service: &v1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: "kube-system", + Name: "testservice", + UID: "test-uid", + }, + Spec: v1.ServiceSpec{ + SessionAffinity: v1.ServiceAffinityNone, + Ports: []v1.ServicePort{ + { + Protocol: v1.ProtocolTCP, + Port: int32(80), + }, + }, + }, + }, + clusterTags: &providercfg.InitialTags{ + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"lbname": "development_cluster_loadbalancer"}, + DefinedTags: map[string]map[string]interface{}{"namespace": {"owner": "team", "key": "value"}}, + }, + }, + expected: &LBSpec{ + Name: "test-uid", + Type: "lb", + Shape: "100Mbps", + Internal: false, + Subnets: []string{"one"}, + Listeners: map[string]client.GenericListener{ + "TCP-80": { + Name: common.String("TCP-80"), + DefaultBackendSetName: common.String("TCP-80"), + Port: common.Int(80), + Protocol: common.String("TCP"), + }, + }, + BackendSets: map[string]client.GenericBackendSetDetails{ + "TCP-80": { + Backends: []client.GenericBackend{}, + HealthChecker: &client.GenericHealthChecker{ + Protocol: "HTTP", + IsForcePlainText: common.Bool(false), + Port: common.Int(10256), + UrlPath: common.String("/healthz"), + Retries: common.Int(3), + TimeoutInMillis: common.Int(3000), + IntervalInMillis: common.Int(10000), + ReturnCode: common.Int(http.StatusOK), + }, + IsPreserveSource: common.Bool(false), + Policy: common.String("ROUND_ROBIN"), + }, + }, + IsPreserveSource: common.Bool(false), + NetworkSecurityGroupIds: []string{}, + SourceCIDRs: []string{"0.0.0.0/0"}, + Ports: map[string]portSpec{ + "TCP-80": { + ListenerPort: 80, + HealthCheckerPort: 10256, + }, + }, + securityListManager: newSecurityListManagerNOOP(), + ManagedNetworkSecurityGroup: &ManagedNetworkSecurityGroup{frontendNsgId: "", backendNsgId: []string{}, nsgRuleManagementMode: ManagementModeNone}, + }, + featureEnabled: false, }, } cp := &CloudProvider{ @@ -2716,6 +2796,7 @@ func TestNewLBSpecForTags(t *testing.T) { for name, tc := range tests { logger := zap.L() + enableOkeSystemTags = tc.featureEnabled t.Run(name, func(t *testing.T) { // we expect the service to be unchanged tc.expected.service = tc.service @@ -6333,3 +6414,47 @@ func Test_getNetworkLoadbalancerSubnets(t *testing.T) { }) } } + +func Test_getResourceTrackingSysTagsFromConfig(t *testing.T) { + tests := map[string]struct { + initialTags *providercfg.InitialTags + wantTag map[string]map[string]interface{} + }{ + "expect an empty system tag when has no common tags": { + initialTags: &providercfg.InitialTags{}, + wantTag: nil, + }, + "expect an empty system tag when resource tracking tags are not in common tags": { + initialTags: &providercfg.InitialTags{ + LoadBalancer: &providercfg.TagConfig{ + DefinedTags: map[string]map[string]interface{}{"ns": {"key": "val"}}, + }, + Common: &providercfg.TagConfig{ + DefinedTags: map[string]map[string]interface{}{"orcl-not-a-tracking-tag": {"Cluster": "ocid1.cluster.aa..."}}, + }, + }, + wantTag: nil, + }, + "extract tracking system tag from config": { + initialTags: &providercfg.InitialTags{ + LoadBalancer: &providercfg.TagConfig{ + DefinedTags: map[string]map[string]interface{}{"ns": {"key": "val"}}, + }, + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"Cluster": "ocid1.cluster.aa..."}, + DefinedTags: map[string]map[string]interface{}{"orcl-containerengine": {"Cluster": "ocid1.cluster.aa..."}}, + }, + }, + wantTag: map[string]map[string]interface{}{"orcl-containerengine": {"Cluster": "ocid1.cluster.aa..."}}, + }, + } + for name, test := range tests { + t.Run(name, func(t *testing.T) { + tag := getResourceTrackingSysTagsFromConfig(zap.S(), test.initialTags) + t.Logf("%#v", tag) + if !reflect.DeepEqual(test.wantTag, tag) { + t.Errorf("wanted %v but got %v", test.wantTag, tag) + } + }) + } +} diff --git a/pkg/cloudprovider/providers/oci/load_balancer_test.go b/pkg/cloudprovider/providers/oci/load_balancer_test.go index 7cd2ae53f..9c70787c1 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer_test.go +++ b/pkg/cloudprovider/providers/oci/load_balancer_test.go @@ -19,6 +19,8 @@ import ( "errors" "fmt" "reflect" + "strconv" + "strings" "testing" "time" @@ -1059,6 +1061,122 @@ func TestCloudProvider_EnsureLoadBalancerDeleted(t *testing.T) { } } +func Test_addLoadBalancerOkeSystemTags(t *testing.T) { + tests := map[string]struct { + //config *providercfg.Config + lb *client.GenericLoadBalancer + spec *LBSpec + wantErr error + }{ + "expect an error when spec system tag is nil": { + lb: &client.GenericLoadBalancer{ + Id: common.String("ocid1.loadbalancer."), + }, + spec: &LBSpec{}, + wantErr: errors.New("oke system tag is not found in LB spec. ignoring.."), + }, + "expect an error when spec system tag is empty map": { + lb: &client.GenericLoadBalancer{ + Id: common.String("ocid1.loadbalancer."), + }, + spec: &LBSpec{ + SystemTags: map[string]map[string]interface{}{}, + }, + wantErr: errors.New("oke system tag namespace is not found in LB spec"), + }, + "expect an error when defined tags are limits are reached": { + lb: &client.GenericLoadBalancer{ + Id: common.String("defined tag limit of 64 reached"), + DefinedTags: make(map[string]map[string]interface{}), + }, + spec: &LBSpec{ + SystemTags: map[string]map[string]interface{}{"orcl-containerengine": {"Cluster": "val"}}, + }, + wantErr: errors.New("max limit of defined tags for lb is reached. skip adding tags. sending metric"), + }, + "expect an error when updateLoadBalancer work request fails": { + lb: &client.GenericLoadBalancer{ + Id: common.String("work request fail"), + FreeformTags: map[string]string{"key": "val"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "val1"}}, + }, + spec: &LBSpec{ + SystemTags: map[string]map[string]interface{}{"orcl-containerengine": {"Cluster": "val"}}, + }, + wantErr: errors.New("UpdateLoadBalancer request failed: internal server error"), + }, + } + + for name, testcase := range tests { + clb := &CloudLoadBalancerProvider{ + lbClient: &MockLoadBalancerClient{}, + logger: zap.S(), + //config: testcase.config, + } + t.Run(name, func(t *testing.T) { + if strings.Contains(name, "limit") { + // add 64 defined tags + for i := 1; i <= 64; i++ { + testcase.lb.DefinedTags["ns"+strconv.Itoa(i)] = map[string]interface{}{"key": strconv.Itoa(i)} + } + } + err := clb.addLoadBalancerOkeSystemTags(context.Background(), testcase.lb, testcase.spec) + t.Logf(err.Error()) + if !assertError(err, testcase.wantErr) { + t.Errorf("Expected error = %v, but got %v", testcase.wantErr, err) + return + } + }) + } +} + +func Test_doesLbHaveResourceTrackingSystemTags(t *testing.T) { + tests := map[string]struct { + lb *client.GenericLoadBalancer + spec *LBSpec + want bool + }{ + "base case": { + lb: &client.GenericLoadBalancer{ + DefinedTags: map[string]map[string]interface{}{"ns": {"key": "val"}}, + SystemTags: map[string]map[string]interface{}{"orcl-containerengine": {"Cluster": "val"}}, + }, + spec: &LBSpec{ + SystemTags: map[string]map[string]interface{}{"orcl-containerengine": {"Cluster": "val"}}, + }, + want: true, + }, + "system tag exists for different ns in lb": { + lb: &client.GenericLoadBalancer{ + DefinedTags: map[string]map[string]interface{}{"ns": {"key": "val"}}, + SystemTags: map[string]map[string]interface{}{"orcl-free-tier": {"Cluster": "val"}}, + }, + spec: &LBSpec{ + SystemTags: map[string]map[string]interface{}{"orcl-containerengine": {"Cluster": "val"}}, + }, + want: false, + }, + "resource tracking system tag doesnt exists in lb": { + lb: &client.GenericLoadBalancer{ + DefinedTags: map[string]map[string]interface{}{"ns": {"key": "val"}}, + }, + spec: &LBSpec{ + SystemTags: map[string]map[string]interface{}{"orcl-containerengine": {"Cluster": "val"}}, + }, + want: false, + }, + } + for name, test := range tests { + t.Run(name, func(t *testing.T) { + actual := doesLbHaveOkeSystemTags(test.lb, test.spec) + t.Logf("expected %v but got %v", test.want, actual) + if test.want != actual { + t.Errorf("expected %v but got %v", test.want, actual) + } + }) + } +} + func assertError(actual, expected error) bool { if expected == nil || actual == nil { return expected == actual diff --git a/pkg/csi-util/utils.go b/pkg/csi-util/utils.go index 4723d7db7..f4290b1c1 100644 --- a/pkg/csi-util/utils.go +++ b/pkg/csi-util/utils.go @@ -452,3 +452,17 @@ func ValidateFssId(id string) *FSSVolumeHandler { } return volumeHandler } + +func GetIsFeatureEnabledFromEnv(logger *zap.SugaredLogger, featureName string, defaultValue bool) bool { + enableFeature := defaultValue + enableFeatureEnvVar, ok := os.LookupEnv(featureName) + if ok { + var err error + enableFeature, err = strconv.ParseBool(enableFeatureEnvVar) + if err != nil { + logger.With(zap.Error(err)).Errorf("failed to parse %s envvar, defaulting to %t", featureName, defaultValue) + return defaultValue + } + } + return enableFeature +} diff --git a/pkg/csi/driver/bv_controller.go b/pkg/csi/driver/bv_controller.go index c470927e4..d92784232 100644 --- a/pkg/csi/driver/bv_controller.go +++ b/pkg/csi/driver/bv_controller.go @@ -65,7 +65,10 @@ const ( multipathEnabled = "multipathEnabled" multipathDevices = "multipathDevices" //device is the consistent device path that would be used for paravirtualized attachment - device = "device" + device = "device" + resourceTrackingFeatureFlagName = "CPO_ENABLE_RESOURCE_ATTRIBUTION" + OkeSystemTagNamesapce = "orcl-containerengine" + MaxDefinedTagPerVolume = 64 ) var ( @@ -77,6 +80,8 @@ var ( } ) +var enableOkeSystemTags = csi_util.GetIsFeatureEnabledFromEnv(zap.S(), resourceTrackingFeatureFlagName, false) + // VolumeParameters holds configuration type VolumeParameters struct { //kmsKey is the KMS key that would be used as CMEK key for BV attachment @@ -412,10 +417,23 @@ func (d *BlockVolumeControllerDriver) CreateVolume(ctx context.Context, req *csi return nil, status.Errorf(codes.InvalidArgument, "invalid available domain: %s or compartment ID: %s", availableDomainShortName, d.config.CompartmentID) } - bvTags := getBVTags(d.config.Tags, volumeParams) + bvTags := getBVTags(log, d.config.Tags, volumeParams) provisionedVolume, err = provision(ctx, log, d.client, volumeName, size, *ad.Name, d.config.CompartmentID, srcSnapshotId, srcVolumeId, volumeParams.diskEncryptionKey, volumeParams.vpusPerGB, bvTags) + + if err != nil && client.IsSystemTagNotFoundOrNotAuthorisedError(log, errors.Unwrap(err)) { + log.With("Ad name", *ad.Name, "Compartment Id", d.config.CompartmentID).With(zap.Error(err)).Warn("New volume creation failed due to oke system tags error. sending metric & retrying without oke system tags") + errorType = util.SystemTagErrTypePrefix + util.GetError(err) + metricDimension = util.GetMetricDimensionForComponent(errorType, metricType) + dimensionsMap[metrics.ComponentDimension] = metricDimension + metrics.SendMetricData(d.metricPusher, metric, time.Since(startTime).Seconds(), dimensionsMap) + + // retry provision without oke system tags + delete(bvTags.DefinedTags, OkeSystemTagNamesapce) + provisionedVolume, err = provision(ctx, log, d.client, volumeName, size, *ad.Name, d.config.CompartmentID, srcSnapshotId, srcVolumeId, + volumeParams.diskEncryptionKey, volumeParams.vpusPerGB, bvTags) + } if err != nil { log.With("Ad name", *ad.Name, "Compartment Id", d.config.CompartmentID).With(zap.Error(err)).Error("New volume creation failed.") errorType = util.GetError(err) @@ -1309,6 +1327,11 @@ func provision(ctx context.Context, log *zap.SugaredLogger, c client.Interface, } if bvTags != nil && bvTags.DefinedTags != nil { volumeDetails.DefinedTags = bvTags.DefinedTags + if len(volumeDetails.DefinedTags) > MaxDefinedTagPerVolume { + log.With("service", "blockstorage", "verb", "create", "resource", "volume", "volumeName", volName). + Warn("the number of defined tags in the volume create request is beyond the limit. removing system tags from the details") + delete(volumeDetails.DefinedTags, OkeSystemTagNamesapce) + } } newVolume, err := c.BlockStorage().CreateVolume(ctx, volumeDetails) @@ -1352,7 +1375,7 @@ func isBlockVolumeAvailable(backup core.VolumeBackup) (bool, error) { return false, nil } -func getBVTags(tags *config.InitialTags, vp VolumeParameters) *config.TagConfig { +func getBVTags(logger *zap.SugaredLogger, tags *config.InitialTags, vp VolumeParameters) *config.TagConfig { bvTags := &config.TagConfig{} if tags != nil && tags.BlockVolume != nil { @@ -1368,7 +1391,7 @@ func getBVTags(tags *config.InitialTags, vp VolumeParameters) *config.TagConfig bvTags = scTags } // merge final tags with common tags - if util.IsCommonTagPresent(tags) { + if enableOkeSystemTags && util.IsCommonTagPresent(tags) { bvTags = util.MergeTagConfig(bvTags, tags.Common) } return bvTags diff --git a/pkg/csi/driver/bv_controller_test.go b/pkg/csi/driver/bv_controller_test.go index f1493f200..a5b9011d9 100644 --- a/pkg/csi/driver/bv_controller_test.go +++ b/pkg/csi/driver/bv_controller_test.go @@ -533,6 +533,10 @@ func (c *MockLoadBalancerClient) UpdateNetworkSecurityGroups(context.Context, st return "", nil } +func (c *MockLoadBalancerClient) UpdateLoadBalancer(ctx context.Context, lbID string, details *client.GenericUpdateLoadBalancerDetails) (string, error) { + return "", nil +} + // Networking mocks client VirtualNetwork implementation. func (p *MockProvisionerClient) LoadBalancer(*zap.SugaredLogger, string, string, *authv1.TokenRequest) client.GenericLoadBalancerInterface { return &MockLoadBalancerClient{} @@ -1870,15 +1874,18 @@ func TestGetBVTags(t *testing.T) { emptyTags := &providercfg.InitialTags{} emptyTagConfig := &providercfg.TagConfig{} emptyVolumeParameters := VolumeParameters{} + enableOkeSystemTags = true tests := map[string]struct { initialTags *providercfg.InitialTags volumeParameters VolumeParameters expectedTagConfig *providercfg.TagConfig + featureEnabled bool }{ "no resource tags, no common tags": { initialTags: emptyTags, volumeParameters: emptyVolumeParameters, expectedTagConfig: emptyTagConfig, + featureEnabled: true, }, "no resource tags, but common tags": { initialTags: &providercfg.InitialTags{ @@ -1892,6 +1899,7 @@ func TestGetBVTags(t *testing.T) { FreeformTags: map[string]string{"key1": "value1"}, DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, }, + featureEnabled: true, }, "resource tags with common tags from config": { initialTags: &providercfg.InitialTags{ @@ -1908,6 +1916,7 @@ func TestGetBVTags(t *testing.T) { FreeformTags: map[string]string{"key1": "value1", "key2": "value2"}, DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}, "ns2": {"key2": "value2"}}, }, + featureEnabled: true, }, "resource level tags with common tags from config with same key": { initialTags: &providercfg.InitialTags{ @@ -1924,6 +1933,7 @@ func TestGetBVTags(t *testing.T) { FreeformTags: map[string]string{"key1": "value1"}, DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, }, + featureEnabled: true, }, "cluster level tags with common tags from config": { initialTags: &providercfg.InitialTags{ @@ -1941,6 +1951,7 @@ func TestGetBVTags(t *testing.T) { FreeformTags: map[string]string{"key1": "value1", "key2": "value2"}, DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}, "ns2": {"key2": "value2"}}, }, + featureEnabled: true, }, "cluster level tags with common tags from config with same key": { initialTags: &providercfg.InitialTags{ @@ -1958,6 +1969,7 @@ func TestGetBVTags(t *testing.T) { FreeformTags: map[string]string{"key1": "value2"}, DefinedTags: map[string]map[string]interface{}{"ns1": {"key2": "value2"}}, }, + featureEnabled: true, }, "cluster level tags but no common tags": { initialTags: &providercfg.InitialTags{ @@ -1971,6 +1983,7 @@ func TestGetBVTags(t *testing.T) { FreeformTags: map[string]string{"key1": "value1"}, DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, }, + featureEnabled: true, }, "no cluster level or resource level tags but common tags": { initialTags: &providercfg.InitialTags{ @@ -1984,13 +1997,30 @@ func TestGetBVTags(t *testing.T) { FreeformTags: map[string]string{"key1": "value1"}, DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, }, + featureEnabled: true, + }, + "when the feature is disabled": { + initialTags: &providercfg.InitialTags{ + Common: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key1": "value1"}, + DefinedTags: map[string]map[string]interface{}{"ns1": {"key1": "value1"}}, + }, + }, + volumeParameters: VolumeParameters{ + freeformTags: map[string]string{"key2": "value2"}, + definedTags: map[string]map[string]interface{}{"ns2": {"key2": "value2"}}, + }, + expectedTagConfig: &providercfg.TagConfig{ + FreeformTags: map[string]string{"key2": "value2"}, + DefinedTags: map[string]map[string]interface{}{"ns2": {"key2": "value2"}}, + }, + featureEnabled: false, }, } for name, testcase := range tests { + enableOkeSystemTags = testcase.featureEnabled t.Run(name, func(t *testing.T) { - actualTagConfig := getBVTags(testcase.initialTags, testcase.volumeParameters) - t.Logf("%v", actualTagConfig) - t.Logf("%v", testcase.expectedTagConfig) + actualTagConfig := getBVTags(zap.S(), testcase.initialTags, testcase.volumeParameters) if !reflect.DeepEqual(actualTagConfig, testcase.expectedTagConfig) { t.Errorf("Expected tagconfig %v but got %v", testcase.expectedTagConfig, actualTagConfig) } diff --git a/pkg/oci/client/client.go b/pkg/oci/client/client.go index 5653c7057..313d76b45 100644 --- a/pkg/oci/client/client.go +++ b/pkg/oci/client/client.go @@ -104,6 +104,7 @@ type loadBalancerClient interface { DeleteListener(ctx context.Context, request loadbalancer.DeleteListenerRequest) (response loadbalancer.DeleteListenerResponse, err error) UpdateLoadBalancerShape(ctx context.Context, request loadbalancer.UpdateLoadBalancerShapeRequest) (response loadbalancer.UpdateLoadBalancerShapeResponse, err error) UpdateNetworkSecurityGroups(ctx context.Context, request loadbalancer.UpdateNetworkSecurityGroupsRequest) (response loadbalancer.UpdateNetworkSecurityGroupsResponse, err error) + UpdateLoadBalancer(ctx context.Context, request loadbalancer.UpdateLoadBalancerRequest) (response loadbalancer.UpdateLoadBalancerResponse, err error) } type networkLoadBalancerClient interface { @@ -120,6 +121,7 @@ type networkLoadBalancerClient interface { UpdateListener(ctx context.Context, request networkloadbalancer.UpdateListenerRequest) (response networkloadbalancer.UpdateListenerResponse, err error) DeleteListener(ctx context.Context, request networkloadbalancer.DeleteListenerRequest) (response networkloadbalancer.DeleteListenerResponse, err error) UpdateNetworkSecurityGroups(ctx context.Context, request networkloadbalancer.UpdateNetworkSecurityGroupsRequest) (response networkloadbalancer.UpdateNetworkSecurityGroupsResponse, err error) + UpdateNetworkLoadBalancer(ctx context.Context, request networkloadbalancer.UpdateNetworkLoadBalancerRequest) (response networkloadbalancer.UpdateNetworkLoadBalancerResponse, err error) } type filestorageClient interface { diff --git a/pkg/oci/client/errors.go b/pkg/oci/client/errors.go index 2919452da..7183c5c50 100644 --- a/pkg/oci/client/errors.go +++ b/pkg/oci/client/errors.go @@ -18,14 +18,22 @@ import ( "context" "math" "net/http" + "regexp" "time" "github.com/oracle/oci-go-sdk/v65/common" "github.com/pkg/errors" + "go.uber.org/zap" ) var errNotFound = errors.New("not found") +/* +Addition of system tags can fail due to permission issue while API returns error code: RelatedResourceNotAuthorizedOrNotFound & +the error message "The following tag namespaces / keys are not authorized or not found: 'orcl-containerengine'" +*/ +var regexSystemTagNotFoundNotAuthorised = regexp.MustCompile(".*tag namespace.*orcl-containerengine.*") + // HTTP Error Types const ( HTTP400RelatedResourceNotAuthorizedOrNotFoundCode = "RelatedResourceNotAuthorizedOrNotFound" @@ -111,3 +119,20 @@ func NewRetryPolicyWithMaxAttempts(retryAttempts uint) *common.RetryPolicy { ) return &policy } + +func IsSystemTagNotFoundOrNotAuthorisedError(logger *zap.SugaredLogger, err error) bool { + + var ociServiceError common.ServiceError + + // unwrap till ociServiceError is found + if errors.As(err, &ociServiceError) { + logger.Debugf("API error code: %s", ociServiceError.GetCode()) + logger.Debugf("service error message: %s", ociServiceError.GetMessage()) + + if ociServiceError.GetHTTPStatusCode() == http.StatusBadRequest && + ociServiceError.GetCode() == HTTP400RelatedResourceNotAuthorizedOrNotFoundCode { + return regexSystemTagNotFoundNotAuthorised.MatchString(ociServiceError.GetMessage()) + } + } + return false +} diff --git a/pkg/oci/client/errors_test.go b/pkg/oci/client/errors_test.go index 4593fbcc6..2ebf63fbd 100644 --- a/pkg/oci/client/errors_test.go +++ b/pkg/oci/client/errors_test.go @@ -15,6 +15,9 @@ package client import ( + "fmt" + "github.com/pkg/errors" + "go.uber.org/zap" "net/http" "testing" @@ -43,6 +46,9 @@ func (m mockServiceError) GetCode() string { func (m mockServiceError) GetOpcRequestID() string { return m.OpcRequestID } +func (m mockServiceError) Error() string { + return m.Message +} func TestIsRetryableServiceError(t *testing.T) { testCases := map[string]struct { @@ -117,3 +123,64 @@ func TestIsRetryableServiceError(t *testing.T) { } } + +func TestIsSystemTagNotFoundOrNotAuthorisedError(t *testing.T) { + systemTagError := mockServiceError{ + StatusCode: http.StatusBadRequest, + Code: HTTP400RelatedResourceNotAuthorizedOrNotFoundCode, + Message: "The following tag namespaces / keys are not authorized or not found: 'orcl-containerengine'", + } + systemTagError2 := mockServiceError{ + StatusCode: http.StatusBadRequest, + Code: HTTP400RelatedResourceNotAuthorizedOrNotFoundCode, + Message: "The following tag namespaces / keys are not authorized or not found: TagDefinition cluster_foobar in TagNamespace orcl-containerengine does not exists.\\n", + } + userDefinedTagError1 := mockServiceError{ + StatusCode: http.StatusBadRequest, + Code: HTTP400RelatedResourceNotAuthorizedOrNotFoundCode, + Message: "The following tag namespaces / keys are not authorized or not found: 'foobar-namespace'", + } + userDefinedTagError2 := mockServiceError{ + StatusCode: http.StatusBadRequest, + Code: HTTP400RelatedResourceNotAuthorizedOrNotFoundCode, + Message: "TagNamespace orcl-foobar does not exists.\\nTagNamespace orcl-foobar-name does not exists.\\n", + } + tests := map[string]struct { + se mockServiceError + wrappedError error + expectIsTagError bool + }{ + "base case": { + wrappedError: errors.WithMessage(systemTagError, "taggin failure"), + expectIsTagError: true, + }, + "three layer wrapping - resource tracking system tag error": { + wrappedError: errors.Wrap(errors.Wrap(errors.WithMessage(systemTagError, "taggin failure"), "first layer"), "second layer"), + expectIsTagError: true, + }, + "wrapping with stack trace - resource tracking system tag error": { + wrappedError: errors.WithStack(errors.Wrap(errors.WithMessage(systemTagError2, "taggin failure"), "first layer")), + expectIsTagError: true, + }, + "three layer wrapping - user defined tag error": { + wrappedError: errors.Wrap(errors.Wrap(errors.WithMessage(userDefinedTagError1, "taggin failure"), "first layer"), "second layer"), + expectIsTagError: false, + }, + "wrapping with stack trace - user defined tag error": { + wrappedError: errors.WithStack(errors.Wrap(errors.WithMessage(userDefinedTagError2, "taggin failure"), "first layer")), + expectIsTagError: false, + }, + "not a service error": { + wrappedError: errors.Wrap(fmt.Errorf("not a service error"), "precheck error"), + expectIsTagError: false, + }, + } + for name, test := range tests { + t.Run(name, func(t *testing.T) { + actualResult := IsSystemTagNotFoundOrNotAuthorisedError(zap.S(), test.wrappedError) + if actualResult != test.expectIsTagError { + t.Errorf("expected %t but got %t", actualResult, test.expectIsTagError) + } + }) + } +} diff --git a/pkg/oci/client/generic_load_balancer_types.go b/pkg/oci/client/generic_load_balancer_types.go index f206736e3..d2b108fe5 100644 --- a/pkg/oci/client/generic_load_balancer_types.go +++ b/pkg/oci/client/generic_load_balancer_types.go @@ -146,6 +146,7 @@ type GenericLoadBalancer struct { FreeformTags map[string]string DefinedTags map[string]map[string]interface{} + SystemTags map[string]map[string]interface{} } type GenericWorkRequest struct { @@ -162,3 +163,8 @@ type GenericWorkRequest struct { type GenericUpdateNetworkSecurityGroupsDetails struct { NetworkSecurityGroupIds []string } + +type GenericUpdateLoadBalancerDetails struct { + FreeformTags map[string]string + DefinedTags map[string]map[string]interface{} +} diff --git a/pkg/oci/client/load_balancer.go b/pkg/oci/client/load_balancer.go index 5571fa134..8608bdf08 100644 --- a/pkg/oci/client/load_balancer.go +++ b/pkg/oci/client/load_balancer.go @@ -61,6 +61,7 @@ type GenericLoadBalancerInterface interface { AwaitWorkRequest(ctx context.Context, id string) (*GenericWorkRequest, error) ListWorkRequests(ctx context.Context, compartmentId, lbId string) ([]*GenericWorkRequest, error) + UpdateLoadBalancer(ctx context.Context, lbID string, details *GenericUpdateLoadBalancerDetails) (string, error) } func (c *loadbalancerClientStruct) GetLoadBalancer(ctx context.Context, id string) (*GenericLoadBalancer, error) { @@ -515,6 +516,25 @@ func (c *loadbalancerClientStruct) UpdateNetworkSecurityGroups(ctx context.Conte return *resp.OpcWorkRequestId, nil } +func (c *loadbalancerClientStruct) UpdateLoadBalancer(ctx context.Context, lbID string, details *GenericUpdateLoadBalancerDetails) (string, error) { + if !c.rateLimiter.Writer.TryAccept() { + return "", RateLimitError(true, "UpdateLoadBalancer") + } + + resp, err := c.loadbalancer.UpdateLoadBalancer(ctx, loadbalancer.UpdateLoadBalancerRequest{ + UpdateLoadBalancerDetails: loadbalancer.UpdateLoadBalancerDetails{ + FreeformTags: details.FreeformTags, + DefinedTags: details.DefinedTags, + }, + LoadBalancerId: &lbID, + RequestMetadata: c.requestMetadata, + }) + incRequestCounter(err, updateVerb, loadBalancerResource) + if err != nil { + return "", errors.WithStack(err) + } + return *resp.OpcWorkRequestId, nil +} func (c *loadbalancerClientStruct) loadbalancerToGenericLoadbalancer(lb *loadbalancer.LoadBalancer) *GenericLoadBalancer { if lb == nil { return nil @@ -536,6 +556,7 @@ func (c *loadbalancerClientStruct) loadbalancerToGenericLoadbalancer(lb *loadbal BackendSets: c.backendSetsToGenericBackendSetDetails(lb.BackendSets), FreeformTags: lb.FreeformTags, DefinedTags: lb.DefinedTags, + SystemTags: lb.SystemTags, } } diff --git a/pkg/oci/client/load_balancer_test.go b/pkg/oci/client/load_balancer_test.go index 49dc26978..c2a420388 100644 --- a/pkg/oci/client/load_balancer_test.go +++ b/pkg/oci/client/load_balancer_test.go @@ -220,6 +220,9 @@ func (c *MockLoadBalancerClient) UpdateLoadBalancerShape(ctx context.Context, re func (c *MockLoadBalancerClient) UpdateNetworkSecurityGroups(ctx context.Context, request loadbalancer.UpdateNetworkSecurityGroupsRequest) (response loadbalancer.UpdateNetworkSecurityGroupsResponse, err error) { return } +func (c *MockLoadBalancerClient) UpdateLoadBalancer(ctx context.Context, request loadbalancer.UpdateLoadBalancerRequest) (response loadbalancer.UpdateLoadBalancerResponse, err error) { + return +} func assertError(actual, expected error) bool { if expected == nil || actual == nil { diff --git a/pkg/oci/client/network_load_balancer.go b/pkg/oci/client/network_load_balancer.go index 94e93572a..10a2edeae 100644 --- a/pkg/oci/client/network_load_balancer.go +++ b/pkg/oci/client/network_load_balancer.go @@ -385,6 +385,27 @@ func (c *networkLoadbalancer) UpdateNetworkSecurityGroups(ctx context.Context, l return *resp.OpcWorkRequestId, nil } +func (c *networkLoadbalancer) UpdateLoadBalancer(ctx context.Context, lbID string, details *GenericUpdateLoadBalancerDetails) (string, error) { + if !c.rateLimiter.Writer.TryAccept() { + return "", RateLimitError(true, "UpdateLoadBalancer") + } + + resp, err := c.networkloadbalancer.UpdateNetworkLoadBalancer(ctx, networkloadbalancer.UpdateNetworkLoadBalancerRequest{ + UpdateNetworkLoadBalancerDetails: networkloadbalancer.UpdateNetworkLoadBalancerDetails{ + FreeformTags: details.FreeformTags, + DefinedTags: details.DefinedTags, + }, + NetworkLoadBalancerId: &lbID, + }) + incRequestCounter(err, updateVerb, networkLoadBalancerResource) + + if err != nil { + return "", errors.WithStack(err) + } + + return *resp.OpcWorkRequestId, nil +} + func backendsToBackendDetails(backends []GenericBackend) []networkloadbalancer.BackendDetails { backendDetails := make([]networkloadbalancer.BackendDetails, 0) for _, backend := range backends { @@ -430,6 +451,7 @@ func (c *networkLoadbalancer) networkLoadbalancerToGenericLoadbalancer(nlb *netw BackendSets: c.backendSetsToGenericBackendSetDetails(nlb.BackendSets), FreeformTags: nlb.FreeformTags, DefinedTags: nlb.DefinedTags, + SystemTags: nlb.SystemTags, } } @@ -448,6 +470,7 @@ func (c *networkLoadbalancer) networkLoadbalancerSummaryToGenericLoadbalancer(nl BackendSets: c.backendSetsToGenericBackendSetDetails(nlb.BackendSets), FreeformTags: nlb.FreeformTags, DefinedTags: nlb.DefinedTags, + SystemTags: nlb.SystemTags, } } diff --git a/pkg/oci/client/network_load_balancer_test.go b/pkg/oci/client/network_load_balancer_test.go index d4a2af28c..d677a6ace 100644 --- a/pkg/oci/client/network_load_balancer_test.go +++ b/pkg/oci/client/network_load_balancer_test.go @@ -208,3 +208,7 @@ func (c *MockNetworkLoadBalancerClient) DeleteListener(ctx context.Context, requ func (c *MockNetworkLoadBalancerClient) UpdateNetworkSecurityGroups(ctx context.Context, request networkloadbalancer.UpdateNetworkSecurityGroupsRequest) (response networkloadbalancer.UpdateNetworkSecurityGroupsResponse, err error) { return } +func (c *MockNetworkLoadBalancerClient) UpdateNetworkLoadBalancer(ctx context.Context, request networkloadbalancer.UpdateNetworkLoadBalancerRequest) (response networkloadbalancer.UpdateNetworkLoadBalancerResponse, err error) { + //TODO implement me + return +} diff --git a/pkg/util/commons.go b/pkg/util/commons.go index 4a1b9dcb9..7f6c8f0e4 100644 --- a/pkg/util/commons.go +++ b/pkg/util/commons.go @@ -18,11 +18,11 @@ import ( "context" "errors" "fmt" - "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" "regexp" "strconv" "strings" + "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" "github.com/oracle/oci-go-sdk/v65/common" metricErrors "github.com/pkg/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -35,14 +35,15 @@ const ( CompartmentIDAnnotation = "oci.oraclecloud.com/compartment-id" // Error codes - Err429 = "429" - Err4XX = "4XX" - Err5XX = "5XX" - ErrValidation = "VALIDATION_ERROR" - ErrLimitExceeded = "LIMIT_EXCEEDED" - ErrCtxTimeout = "CTX_TIMEOUT" - Success = "SUCCESS" - BackupCreating = "CREATING" + Err429 = "429" + Err4XX = "4XX" + Err5XX = "5XX" + ErrValidation = "VALIDATION_ERROR" + ErrLimitExceeded = "LIMIT_EXCEEDED" + ErrCtxTimeout = "CTX_TIMEOUT" + ErrTagLimitReached = "TAG_LIMIT_REACHED" + Success = "SUCCESS" + BackupCreating = "CREATING" // Components generating errors // Load Balancer @@ -51,6 +52,9 @@ const ( // storage types CSIStorageType = "CSI" FVDStorageType = "FVD" + + // Errorcode prefixes + SystemTagErrTypePrefix = "SYSTEM_TAG_" ) // LookupNodeCompartment returns the compartment OCID for the given nodeName. @@ -153,7 +157,6 @@ func MergeTagConfig(srcTagConfig, dstTagConfig *config.TagConfig) *config.TagCon // IsCommonTagPresent return true if Common tags are initialised in config func IsCommonTagPresent(initialTags *config.InitialTags) bool { - // TODO: perform feature enabled check return initialTags != nil && initialTags.Common != nil } diff --git a/pkg/util/commons_test.go b/pkg/util/commons_test.go index f6432ee3a..a81fd1638 100644 --- a/pkg/util/commons_test.go +++ b/pkg/util/commons_test.go @@ -16,10 +16,11 @@ package util import ( "errors" - "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" "reflect" "testing" + "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" + errors2 "github.com/pkg/errors" "k8s.io/apimachinery/pkg/util/wait" ) diff --git a/pkg/volume/provisioner/block/block_test.go b/pkg/volume/provisioner/block/block_test.go index 1e4eb37cf..3c05b3c41 100644 --- a/pkg/volume/provisioner/block/block_test.go +++ b/pkg/volume/provisioner/block/block_test.go @@ -457,6 +457,10 @@ func (c *MockLoadBalancerClient) UpdateNetworkSecurityGroups(context.Context, st return "", nil } +func (c *MockLoadBalancerClient) UpdateLoadBalancer(ctx context.Context, lbID string, details *client.GenericUpdateLoadBalancerDetails) (string, error) { + return "", nil +} + func (c *MockVirtualNetworkClient) AddNetworkSecurityGroupSecurityRules(ctx context.Context, id string, details core.AddNetworkSecurityGroupSecurityRulesDetails) (*core.AddNetworkSecurityGroupSecurityRulesResponse, error) { return nil, nil } diff --git a/pkg/volume/provisioner/fss/fss_test.go b/pkg/volume/provisioner/fss/fss_test.go index 949f5f3a0..23eb97bf6 100644 --- a/pkg/volume/provisioner/fss/fss_test.go +++ b/pkg/volume/provisioner/fss/fss_test.go @@ -455,6 +455,9 @@ func (c *MockLoadBalancerClient) AwaitWorkRequest(ctx context.Context, id string func (c *MockLoadBalancerClient) UpdateNetworkSecurityGroups(context.Context, string, []string) (string, error) { return "", nil } +func (c *MockLoadBalancerClient) UpdateLoadBalancer(ctx context.Context, lbID string, details *client.GenericUpdateLoadBalancerDetails) (string, error) { + return "", nil +} func (c *MockVirtualNetworkClient) AddNetworkSecurityGroupSecurityRules(ctx context.Context, id string, details core.AddNetworkSecurityGroupSecurityRulesDetails) (*core.AddNetworkSecurityGroupSecurityRulesResponse, error) { return nil, nil From f442a064f470dc20e8aa12d41254420e91f04618 Mon Sep 17 00:00:00 2001 From: Goutham M L Date: Mon, 13 May 2024 13:14:55 +0530 Subject: [PATCH 21/22] Update e2e for system tags --- hack/run_e2e_test.sh | 3 +- .../cloud-provider-oci/csi_volume_creation.go | 18 ++++++++- test/e2e/cloud-provider-oci/load_balancer.go | 38 ++++++++++++++++--- test/e2e/cloud-provider-oci/setup.go | 6 +-- test/e2e/framework/framework.go | 4 ++ test/e2e/framework/system_tags_util.go | 22 +++++++++++ 6 files changed, 79 insertions(+), 12 deletions(-) create mode 100644 test/e2e/framework/system_tags_util.go diff --git a/hack/run_e2e_test.sh b/hack/run_e2e_test.sh index eccc06f07..945c61ce9 100755 --- a/hack/run_e2e_test.sh +++ b/hack/run_e2e_test.sh @@ -61,7 +61,8 @@ function run_e2e_tests_existing_cluster() { --volume-handle=${FSS_VOLUME_HANDLE} \ --static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \ --enable-parallel-run=${ENABLE_PARALLEL_RUN} \ - --run-uhp-e2e=${RUN_UHP_E2E} + --run-uhp-e2e=${RUN_UHP_E2E} \ + --add-oke-system-tags="false" retval=$? return $retval } diff --git a/test/e2e/cloud-provider-oci/csi_volume_creation.go b/test/e2e/cloud-provider-oci/csi_volume_creation.go index 9155725b8..82b03c2c9 100644 --- a/test/e2e/cloud-provider-oci/csi_volume_creation.go +++ b/test/e2e/cloud-provider-oci/csi_volume_creation.go @@ -28,14 +28,28 @@ import ( var _ = Describe("CSI Volume Creation", func() { f := framework.NewDefaultFramework("csi-basic") - Context("[cloudprovider][storage][csi]", func() { + Context("[cloudprovider][storage][csi][system-tags]", func() { It("Create PVC and POD for CSI.", func() { pvcJig := framework.NewPVCTestJig(f.ClientSet, "csi-provisioner-e2e-tests") - + ctx := context.TODO() scName := f.CreateStorageClassOrFail(f.Namespace.Name, "blockvolume.csi.oraclecloud.com", nil, pvcJig.Labels, "WaitForFirstConsumer", false, "Delete", nil) pvc := pvcJig.CreateAndAwaitPVCOrFailCSI(f.Namespace.Name, framework.MinVolumeBlock, scName, nil, v1.PersistentVolumeFilesystem, v1.ReadWriteOnce, v1.ClaimPending) f.VolumeIds = append(f.VolumeIds, pvc.Spec.VolumeName) pvcJig.NewPodForCSI("app1", f.Namespace.Name, pvc.Name, setupF.AdLabel) + volumeName := pvcJig.GetVolumeNameFromPVC(pvc.GetName(), f.Namespace.Name) + compartmentId := f.GetCompartmentId(*setupF) + // read created BV + volumes, err := f.Client.BlockStorage().GetVolumesByName(ctx, volumeName, compartmentId) + framework.ExpectNoError(err) + // volume name duplicate should not exist + for _, volume := range volumes { + framework.Logf("volume details %v :", volume) + framework.Logf("cluster ocid from setup is %s", setupF.ClusterOcid) + if setupF.AddOkeSystemTags && !framework.HasOkeSystemTags(volume.SystemTags) { + framework.Failf("the resource %s is expected to have oke system tags", *volume.Id) + } + } + }) It("Create PVC with VolumeSize 1Gi but should use default 50Gi", func() { diff --git a/test/e2e/cloud-provider-oci/load_balancer.go b/test/e2e/cloud-provider-oci/load_balancer.go index 42b40d55e..a2c0a0a4d 100644 --- a/test/e2e/cloud-provider-oci/load_balancer.go +++ b/test/e2e/cloud-provider-oci/load_balancer.go @@ -59,7 +59,7 @@ var _ = Describe("Service [Slow]", func() { }, }, } - Context("[cloudprovider][ccm][lb][SL]", func() { + Context("[cloudprovider][ccm][lb][SL][system-tags]", func() { It("should be possible to create and mutate a Service type:LoadBalancer (change nodeport) [Canary]", func() { for _, test := range basicTestArray { By("Running test for: " + test.lbType) @@ -99,6 +99,32 @@ var _ = Describe("Service [Slow]", func() { tcpService = jig.WaitForLoadBalancerOrFail(ns, tcpService.Name, loadBalancerCreateTimeout) jig.SanityCheckService(tcpService, v1.ServiceTypeLoadBalancer) + By("validating system tags on the loadbalancer") + lbName := cloudprovider.GetLoadBalancerName(tcpService) + sharedfw.Logf("LB Name is %s", lbName) + ctx := context.TODO() + compartmentId := "" + if setupF.Compartment1 != "" { + compartmentId = setupF.Compartment1 + } else if f.CloudProviderConfig.CompartmentID != "" { + compartmentId = f.CloudProviderConfig.CompartmentID + } else if f.CloudProviderConfig.Auth.CompartmentID != "" { + compartmentId = f.CloudProviderConfig.Auth.CompartmentID + } else { + sharedfw.Failf("Compartment Id undefined.") + } + lbType := test.lbType + if strings.HasSuffix(test.lbType, "-wris") { + lbType = strings.TrimSuffix(test.lbType, "-wris") + } + loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), lbType, "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) + sharedfw.ExpectNoError(err) + sharedfw.Logf("Loadbalancer details %v:", loadBalancer) + sharedfw.Logf("cluster ocid from setup is %s", setupF.ClusterOcid) + if setupF.AddOkeSystemTags && !sharedfw.HasOkeSystemTags(loadBalancer.SystemTags) { + sharedfw.Failf("Loadbalancer is expected to have the system tags") + } + tcpNodePort := int(tcpService.Spec.Ports[0].NodePort) sharedfw.Logf("TCP node port: %d", tcpNodePort) @@ -1347,8 +1373,8 @@ var _ = Describe("LB Properties", func() { { "lb", map[string]string{ - cloudprovider.ServiceAnnotationLoadBalancerInternal: "true", - cloudprovider.ServiceAnnotationLoadBalancerShape: "flexible", + cloudprovider.ServiceAnnotationLoadBalancerInternal: "true", + cloudprovider.ServiceAnnotationLoadBalancerShape: "flexible", cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMin: "10", cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMax: "10", }, @@ -1478,10 +1504,10 @@ var _ = Describe("LB Properties", func() { { "lb", map[string]string{ - cloudprovider.ServiceAnnotationLoadBalancerShape: "flexible", + cloudprovider.ServiceAnnotationLoadBalancerShape: "flexible", cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMin: "10", cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMax: "10", - cloudprovider.ServiceAnnotationLoadBalancerPolicy: cloudprovider.IPHashLoadBalancerPolicy, + cloudprovider.ServiceAnnotationLoadBalancerPolicy: cloudprovider.IPHashLoadBalancerPolicy, }, map[string]string{ cloudprovider.ServiceAnnotationLoadBalancerPolicy: cloudprovider.LeastConnectionsLoadBalancerPolicy, @@ -1590,7 +1616,7 @@ var _ = Describe("LB Properties", func() { { "lb", map[string]string{ - cloudprovider.ServiceAnnotationLoadBalancerShape: "flexible", + cloudprovider.ServiceAnnotationLoadBalancerShape: "flexible", cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMin: "10", cloudprovider.ServiceAnnotationLoadBalancerShapeFlexMax: "10", }, diff --git a/test/e2e/cloud-provider-oci/setup.go b/test/e2e/cloud-provider-oci/setup.go index a12060e35..07f7d616e 100644 --- a/test/e2e/cloud-provider-oci/setup.go +++ b/test/e2e/cloud-provider-oci/setup.go @@ -18,9 +18,9 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte { sharedfw.Logf("CloudProviderFramework Setup") sharedfw.Logf("Running tests with existing cluster.") return nil - }, func(data []byte) { - setupF = sharedfw.New() - }, +}, func(data []byte) { + setupF = sharedfw.New() +}, ) var _ = ginkgo.SynchronizedAfterSuite(func() {}, func() { diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 984885517..7cc652c65 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -103,6 +103,7 @@ var ( staticSnapshotCompartmentOCID string // Compartment ID for cross compartment snapshot test runUhpE2E bool // Whether to run UHP E2Es, requires Volume Management Plugin enabled on the node and 16+ cores (check blockvolumeperformance public doc for the exact requirements) enableParallelRun bool + addOkeSystemTags bool ) func init() { @@ -134,6 +135,7 @@ func init() { flag.StringVar(&staticSnapshotCompartmentOCID, "static-snapshot-compartment-id", "", "Compartment ID for cross compartment snapshot test") flag.BoolVar(&runUhpE2E, "run-uhp-e2e", false, "Run UHP E2Es as well") flag.BoolVar(&enableParallelRun, "enable-parallel-run", true, "Enables parallel running of test suite") + flag.BoolVar(&addOkeSystemTags, "add-oke-system-tags", false, "Adds oke system tags to new and existing loadbalancers and storage resources") } // Framework is the context of the text execution. @@ -167,6 +169,7 @@ type Framework struct { // Compartment ID for cross compartment snapshot test StaticSnapshotCompartmentOcid string RunUhpE2E bool + AddOkeSystemTags bool } // New creates a new a framework that holds the context of the test @@ -191,6 +194,7 @@ func NewWithConfig() *Framework { VolumeHandle: volumeHandle, StaticSnapshotCompartmentOcid: staticSnapshotCompartmentOCID, RunUhpE2E: runUhpE2E, + AddOkeSystemTags: addOkeSystemTags, } f.CloudConfigPath = cloudConfigFile diff --git a/test/e2e/framework/system_tags_util.go b/test/e2e/framework/system_tags_util.go new file mode 100644 index 000000000..a71f79475 --- /dev/null +++ b/test/e2e/framework/system_tags_util.go @@ -0,0 +1,22 @@ +package framework + +import ( + cloudprovider "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci" +) + +const ( + okeSystemTagKey = "Cluster" +) + +func HasOkeSystemTags(systemTags map[string]map[string]interface{}) bool { + Logf("actual system tags on the resource: %v", systemTags) + if systemTags != nil { + if okeSystemTag, okeSystemTagNsExists := systemTags[cloudprovider.OkeSystemTagNamesapce]; okeSystemTagNsExists { + if _, okeSystemTagKeyExists := okeSystemTag[okeSystemTagKey]; okeSystemTagKeyExists { + return true + } + } + return false + } + return false +} From c592bcbc3439f68e24e31deb8ebf88d4d9bb2787 Mon Sep 17 00:00:00 2001 From: ypgohoka Date: Thu, 27 Jun 2024 09:05:49 +0530 Subject: [PATCH 22/22] Updated Manifests, Readme and third party licenses --- .github/workflows/release.yaml | 4 +- Makefile | 2 +- README.md | 15 ++-- THIRD_PARTY_LICENSES.txt | 79 +++++++++++-------- hack/run_e2e_test.sh | 68 +++++++++++----- .../oci-cloud-controller-manager.yaml | 2 +- .../oci-csi-controller-driver.yaml | 2 +- .../oci-csi-node-driver.yaml | 2 +- .../oci-flexvolume-driver.yaml | 4 +- .../oci-volume-provisioner-fss.yaml | 2 +- .../oci-volume-provisioner.yaml | 2 +- .../providers/oci/load_balancer.go | 1 + .../cloud-provider-oci/csi_volume_creation.go | 1 - test/e2e/cloud-provider-oci/load_balancer.go | 4 - test/e2e/cloud-provider-oci/setup.go | 18 ++++- test/e2e/framework/framework.go | 13 --- test/e2e/framework/system_tags_util.go | 14 ++++ 17 files changed, 137 insertions(+), 96 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 83e919396..56591c42c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,7 +26,7 @@ jobs: run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${GITHUB_ACTOR,,} --password-stdin - name: Build Image - run: OSS_REGISTRY="ghcr.io/${GITHUB_ACTOR,,}" VERSION="${{ github.ref_name }}" make image + run: OSS_REGISTRY="ghcr.io/oracle" VERSION="${{ github.ref_name }}" make image - name: Push Image - run: OSS_REGISTRY="ghcr.io/${GITHUB_ACTOR,,}" VERSION="${{ github.ref_name }}" make docker-push-all + run: OSS_REGISTRY="ghcr.io/oracle" VERSION="${{ github.ref_name }}" make docker-push-all diff --git a/Makefile b/Makefile index 4c8b62275..982f9c35c 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ else VERSION ?= ${VERSION} endif -RELEASE = v1.27.0 +RELEASE = v1.27.3 GOOS ?= linux ARCH ?= amd64 diff --git a/README.md b/README.md index e7895c7de..8a911b20a 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,15 @@ cloud-provider specific code out of the Kubernetes codebase. | v1.23.0 | v1.23 | - | | v1.24.2 | v1.24 | - | | v1.25.2 | v1.25 | - | -| v1.26.3 | v1.26 | - | -| v1.27.2 | v1.27 | - | -| v1.28.0 | v1.28 | - | +| v1.26.4 | v1.26 | - | +| v1.27.3 | v1.27 | - | +| v1.28.1 | v1.28 | - | +| v1.29.0 | v1.29 | - | Note: -Versions older than v1.25.2 are no longer supported, new features / bug fixes will be available in v1.25.2 and later. +Versions older than v1.27.3 are no longer supported, new features / bug fixes will be available in v1.27.3 and later. ## Implementation Currently `oci-cloud-controller-manager` implements: @@ -170,12 +171,6 @@ details. Oracle gratefully acknowledges the contributions to this project that have been made by the community. -## Upcoming Releases - -| Release | Expected Release Date | -|-----------------------|-----------------------| -| Support for K8s v1.24 | August 2022 | - ## License Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index 1d4df9479..835d64b03 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -173,8 +173,7 @@ This product includes software developed at CoreOS, Inc. github.com/davecgh/go-spew == License Type -===ISC-c06795ed - +=== ISC-c06795ed ISC License Copyright (c) 2012-2016 Dave Collins @@ -192,6 +191,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + == Copyright Copyright (c) 2012-2016 Dave Collins Copyright (c) 2013 Dave Collins @@ -242,8 +242,7 @@ Copyright 2021 Ernest Micklei. All rights reserved. github.com/evanphx/json-patch == License Type -===BSD-3-Clause-96ae735c - +=== BSD-3-Clause-96ae735c Copyright (c) 2014, Evan Phoenix All rights reserved. @@ -271,6 +270,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2014, Evan Phoenix @@ -295,6 +295,7 @@ SPDX:BSD-3-Clause--modified-by-Google == Copyright Copyright © 2012 The Go Authors. All rights reserved. +Copyright © fsnotify Authors. All rights reserved. --------------------------------- (separator) ---------------------------------- @@ -362,8 +363,7 @@ Copyright 2015 go-swagger maintainers github.com/gofrs/flock == License Type -===BSD-3-Clause-4e7459b3 - +=== BSD-3-Clause-4e7459b3 Copyright (c) 2015-2020, Tim Heckman All rights reserved. @@ -393,6 +393,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2015-2020, Tim Heckman Copyright 2015 Tim Heckman. All rights reserved. @@ -466,8 +467,8 @@ Copyright 2020 The Go Authors. All rights reserved. github.com/google/cel-go == License Type -===Apache-2.0-9e40c772 - +=== Apache-2.0-9e40c772 +=== BSD-3-Clause--modified-by-Google Apache License Version 2.0, January 2004 @@ -703,6 +704,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2018 The Go Authors. All rights reserved. Copyright 2018 Google LLC @@ -769,6 +771,7 @@ Copyright 2016 Google Inc. All rights reserved. Copyright 2017 Google Inc. All rights reserved. Copyright 2018 Google Inc. All rights reserved. Copyright 2021 Google Inc. All rights reserved. +Copyright 2023 Google Inc. All rights reserved. --------------------------------- (separator) ---------------------------------- @@ -787,8 +790,7 @@ Copyright 2016 Michal Witkowski. All Rights Reserved. github.com/grpc-ecosystem/grpc-gateway/v2 == License Type -===BSD-3-Clause--modified-by-Google-c510a2a0 - +=== BSD-3-Clause--modified-by-Google-c510a2a0 Copyright (c) 2015, Gengo, Inc. All rights reserved. @@ -818,6 +820,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2015, Gengo, Inc. Copyright 2009 The Go Authors. All rights reserved. @@ -904,8 +907,7 @@ Copyright 2022 The Kubernetes Authors. github.com/magiconair/properties == License Type -===BSD-2-Clause-714beb73 - +=== BSD-2-Clause-714beb73 Copyright (c) 2013-2020, Frank Schroeder All rights reserved. @@ -932,6 +934,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2013-2020, Frank Schroeder Copyright 2011 The Go Authors. All rights reserved. @@ -1053,8 +1056,7 @@ SPDX:Apache-2.0 github.com/munnerz/goautoneg == License Type -===BSD-3-Clause-0c241922 - +=== BSD-3-Clause-0c241922 Copyright (c) 2011, Open Knowledge Foundation Ltd. All rights reserved. @@ -1088,6 +1090,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2011, Open Knowledge Foundation Ltd. @@ -1118,6 +1121,7 @@ SPDX:MIT == Copyright Copyright (c) 2013-2014 Onsi Fakhouri Copyright (c) 2016 Yasuhiro Matsumoto +Copyright (c) Yasuhiro MATSUMOTO Copyright 2013 The Go Authors. All rights reserved. --------------------------------- (separator) ---------------------------------- @@ -1154,8 +1158,9 @@ Copyright © 2019, 2020 OCI Contributors github.com/oracle/oci-go-sdk/v65 == License Type -===Apache-2.0-9010f56e - +=== Apache-2.0-9010f56e +=== UPL-1.0 +=== Apache-2.0 Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. @@ -1260,6 +1265,7 @@ END OF TERMS AND CONDITIONS limitations under the License. + == Copyright Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. Copyright (c) 2013 The Go Authors. All rights reserved. @@ -1281,8 +1287,8 @@ Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. github.com/pelletier/go-toml == License Type -===Apache-2.0-e49b63d8 - +=== MIT-e49b63d8 +=== Apache-2.0 The bulk of github.com/pelletier/go-toml is distributed under the MIT license (see below), with the exception of localtime.go and localtime.test.go. Those two files have been copied over from Google's civil library at revision @@ -1532,6 +1538,7 @@ License: limitations under the License. + == Copyright Copyright (c) 2013 - 2021 Thomas Pelletier, Eric Anderton Copyright 2016 Google LLC @@ -1830,7 +1837,6 @@ Copyright 2018 The etcd Authors Copyright 2019 The etcd Authors Copyright 2021 The etcd Authors Copyright 2022 The etcd Authors -Copyright 2023 The etcd Authors --------------------------------- (separator) ---------------------------------- @@ -1972,11 +1978,7 @@ SPDX:MIT == Copyright Copyright (c) 2017 Uber Technologies, Inc. -Copyright (c) 2017-2021 Uber Technologies, Inc. -Copyright (c) 2017-2023 Uber Technologies, Inc. -Copyright (c) 2020 Uber Technologies, Inc. -Copyright (c) 2021 Uber Technologies, Inc. -Copyright (c) 2023 Uber Technologies, Inc. +Copyright (c) 2019 Uber Technologies, Inc. --------------------------------- (separator) ---------------------------------- @@ -1987,6 +1989,7 @@ go.uber.org/zap SPDX:MIT == Copyright +Copyright (c) "*" Uber Technologies, Inc.") Copyright (c) 2016 Uber Technologies, Inc. Copyright (c) 2016, 2017 Uber Technologies, Inc. Copyright (c) 2016-2017 Uber Technologies, Inc. @@ -2195,6 +2198,7 @@ Copyright 2020 The Go Authors. All rights reserved. Copyright 2021 The Go Authors. All rights reserved. Copyright 2022 The Go Authors. All rights reserved. Copyright 2023 The Go Authors. All rights reserved. +Copyright 2024 The Go Authors. All rights reserved. == Patents Additional IP Rights Grant (Patents) @@ -2432,7 +2436,9 @@ Copyright 2019 The Go Authors. All rights reserved.", Copyright 2020 The Go Authors. All rights reserved. Copyright 2021 The Go Authors. All rights reserved. Copyright 2022 The Go Authors. All rights reserved. +Copyright 2023 Google Inc. All rights reserved. Copyright 2023 The Go Authors. All rights reserved. +Copyright 2024 The Go Authors. All rights reserved. == Patents Additional IP Rights Grant (Patents) @@ -2502,8 +2508,7 @@ Copyright (c) 2014 Nate Finch gopkg.in/tomb.v1 == License Type -===BSD-3-Clause-95d4102f - +=== BSD-3-Clause-95d4102f tomb - support for clean goroutine termination in Go. Copyright (c) 2010-2011 - Gustavo Niemeyer @@ -2535,6 +2540,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2010-2011 - Gustavo Niemeyer Copyright (c) 2011 - Gustavo Niemeyer @@ -2573,8 +2579,8 @@ limitations under the License. gopkg.in/yaml.v3 == License Type -===Apache-2.0-3c91c172 - +=== MIT-3c91c172 +=== Apache-2.0 This project is covered by two different licenses: MIT and Apache. @@ -2627,6 +2633,7 @@ See the License for the specific language governing permissions and limitations under the License. + == Copyright Copyright (c) 2006-2010 Kirill Simonov Copyright (c) 2006-2011 Kirill Simonov @@ -2878,6 +2885,7 @@ k8s.io/kube-openapi SPDX:Apache-2.0 == Copyright +Copyright (C) MongoDB, Inc. 2017-present. Copyright (c) 2020 The Go Authors. All rights reserved. Copyright 2015 go-swagger maintainers Copyright 2016 The Kubernetes Authors. @@ -2955,6 +2963,7 @@ SPDX:Apache-2.0 Copyright (c) 2009 The Go Authors. All rights reserved. Copyright (c) 2015-2016 Manfred Touron Copyright (c) 2015-2018 gimme contributors +Copyright (c) Microsoft Corporation. All rights reserved. Copyright 2009 The Go Authors. All rights reserved. Copyright 2014 The Kubernetes Authors. Copyright 2015 The Kubernetes Authors. @@ -3026,8 +3035,8 @@ Copyright 2022 The Kubernetes Authors. sigs.k8s.io/json == License Type -===Apache-2.0-545d3f23 - +=== BSD-3-Clause--modified-by-Google-545d3f23 +=== Apache-2.0 Files other than internal/golang/* licensed under: @@ -3268,6 +3277,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2009 The Go Authors. All rights reserved. Copyright 2010 The Go Authors. All rights reserved. @@ -3314,8 +3324,8 @@ Copyright 2020 The Kubernetes Authors. sigs.k8s.io/yaml == License Type -===BSD-3-Clause--modified-by-Google-0ceb9ff3 - +=== MIT-0ceb9ff3 +=== BSD-3-Clause--modified-by-Google The MIT License (MIT) Copyright (c) 2014 Sam Ghods @@ -3368,6 +3378,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + == Copyright Copyright (c) 2012 The Go Authors. All rights reserved. Copyright (c) 2014 Sam Ghods @@ -3953,5 +3964,5 @@ the Mozilla Public License, v. 2.0. === ATTRIBUTION-HELPER-GENERATED: -=== Attribution helper version: {Major:0 Minor:11 GitVersion:0.10.0-69-g9cf205e3 GitCommit:9cf205e3ce436f506f0901d927c1e417e72f384f GitTreeState:dirty BuildDate:2022-10-10T19:24:17Z GoVersion:go1.19 Compiler:gc Platform:darwin/amd64} -=== License file based on go.mod with md5 sum: c9ae5852248d0ea20400a817f8643ccb +=== Attribution helper version: {Major:0 Minor:11 GitVersion: GitCommit: GitTreeState:dirty BuildDate:1970-01-01T00:00:00Z GoVersion:go1.19.3 Compiler:gc Platform:darwin/arm64} +=== License file based on go.mod with md5 sum: de9d9164b9aea0c7ed531118168fb242 diff --git a/hack/run_e2e_test.sh b/hack/run_e2e_test.sh index 945c61ce9..4e59d3926 100755 --- a/hack/run_e2e_test.sh +++ b/hack/run_e2e_test.sh @@ -43,26 +43,54 @@ function set_image_pull_repo_and_delete_namespace_flag () { } function run_e2e_tests_existing_cluster() { - ginkgo -v -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \ - test/e2e/cloud-provider-oci -- \ - --cluster-kubeconfig=${CLUSTER_KUBECONFIG} \ - --cloud-config=${CLOUD_CONFIG} \ - --adlocation=${ADLOCATION} \ - --delete-namespace=${DELETE_NAMESPACE} \ - --image-pull-repo=${IMAGE_PULL_REPO} \ - --cmek-kms-key=${CMEK_KMS_KEY} \ - --mnt-target-id=${MNT_TARGET_ID} \ - --mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \ - --mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \ - --nsg-ocids=${NSG_OCIDS} \ - --backend-nsg-ocids=${BACKEND_NSG_OCIDS} \ - --reserved-ip=${RESERVED_IP} \ - --architecture=${ARCHITECTURE} \ - --volume-handle=${FSS_VOLUME_HANDLE} \ - --static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \ - --enable-parallel-run=${ENABLE_PARALLEL_RUN} \ - --run-uhp-e2e=${RUN_UHP_E2E} \ - --add-oke-system-tags="false" + if [[ -z "${E2E_NODE_COUNT}" ]]; then + E2E_NODE_COUNT=1 + fi + + if [ "$ENABLE_PARALLEL_RUN" == "true" ] || [ "$ENABLE_PARALLEL_RUN" == "TRUE" ]; then + ginkgo -v -p -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \ + test/e2e/cloud-provider-oci -- \ + --cluster-kubeconfig=${CLUSTER_KUBECONFIG} \ + --cloud-config=${CLOUD_CONFIG} \ + --adlocation=${ADLOCATION} \ + --delete-namespace=${DELETE_NAMESPACE} \ + --image-pull-repo=${IMAGE_PULL_REPO} \ + --cmek-kms-key=${CMEK_KMS_KEY} \ + --mnt-target-id=${MNT_TARGET_ID} \ + --mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \ + --mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \ + --nsg-ocids=${NSG_OCIDS} \ + --backend-nsg-ocids=${BACKEND_NSG_OCIDS} \ + --reserved-ip=${RESERVED_IP} \ + --architecture=${ARCHITECTURE} \ + --volume-handle=${FSS_VOLUME_HANDLE} \ + --static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \ + --enable-parallel-run=${ENABLE_PARALLEL_RUN} \ + --run-uhp-e2e=${RUN_UHP_E2E} \ + --add-oke-system-tags="false" + else + ginkgo -v -progress --trace -nodes=${E2E_NODE_COUNT} "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \ + ginkgo -v -p -progress --trace "${FOCUS_OPT}" "${FOCUS_FP_OPT}" \ + test/e2e/cloud-provider-oci -- \ + --cluster-kubeconfig=${CLUSTER_KUBECONFIG} \ + --cloud-config=${CLOUD_CONFIG} \ + --adlocation=${ADLOCATION} \ + --delete-namespace=${DELETE_NAMESPACE} \ + --image-pull-repo=${IMAGE_PULL_REPO} \ + --cmek-kms-key=${CMEK_KMS_KEY} \ + --mnt-target-id=${MNT_TARGET_ID} \ + --mnt-target-subnet-id=${MNT_TARGET_SUBNET_ID} \ + --mnt-target-compartment-id=${MNT_TARGET_COMPARTMENT_ID} \ + --nsg-ocids=${NSG_OCIDS} \ + --backend-nsg-ocids=${BACKEND_NSG_OCIDS} \ + --reserved-ip=${RESERVED_IP} \ + --architecture=${ARCHITECTURE} \ + --volume-handle=${FSS_VOLUME_HANDLE} \ + --static-snapshot-compartment-id=${STATIC_SNAPSHOT_COMPARTMENT_ID} \ + --enable-parallel-run=${ENABLE_PARALLEL_RUN} \ + --run-uhp-e2e=${RUN_UHP_E2E} \ + --add-oke-system-tags="false" + fi retval=$? return $retval } diff --git a/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml b/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml index 123fda62a..ff2c21f66 100644 --- a/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml +++ b/manifests/cloud-controller-manager/oci-cloud-controller-manager.yaml @@ -42,7 +42,7 @@ spec: path: /etc/kubernetes containers: - name: oci-cloud-controller-manager - image: ghcr.io/oracle/cloud-provider-oci:v1.27.2 + image: ghcr.io/oracle/cloud-provider-oci:v1.27.3 command: ["/usr/local/bin/oci-cloud-controller-manager"] args: - --cloud-config=/etc/oci/cloud-provider.yaml diff --git a/manifests/container-storage-interface/oci-csi-controller-driver.yaml b/manifests/container-storage-interface/oci-csi-controller-driver.yaml index 165657ac4..8155159d3 100644 --- a/manifests/container-storage-interface/oci-csi-controller-driver.yaml +++ b/manifests/container-storage-interface/oci-csi-controller-driver.yaml @@ -96,7 +96,7 @@ spec: - --fss-csi-endpoint=unix://var/run/shared-tmpfs/csi-fss.sock command: - /usr/local/bin/oci-csi-controller-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.27.2 + image: ghcr.io/oracle/cloud-provider-oci:v1.27.3 imagePullPolicy: IfNotPresent volumeMounts: - name: config diff --git a/manifests/container-storage-interface/oci-csi-node-driver.yaml b/manifests/container-storage-interface/oci-csi-node-driver.yaml index 23d8890fa..75006ad0d 100644 --- a/manifests/container-storage-interface/oci-csi-node-driver.yaml +++ b/manifests/container-storage-interface/oci-csi-node-driver.yaml @@ -117,7 +117,7 @@ spec: fieldPath: spec.nodeName - name: PATH value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/host/usr/bin:/host/sbin - image: ghcr.io/oracle/cloud-provider-oci:v1.27.2 + image: ghcr.io/oracle/cloud-provider-oci:v1.27.3 securityContext: privileged: true volumeMounts: diff --git a/manifests/flexvolume-driver/oci-flexvolume-driver.yaml b/manifests/flexvolume-driver/oci-flexvolume-driver.yaml index 7391cc3c8..2e7e3b7c5 100644 --- a/manifests/flexvolume-driver/oci-flexvolume-driver.yaml +++ b/manifests/flexvolume-driver/oci-flexvolume-driver.yaml @@ -40,7 +40,7 @@ spec: secretName: oci-flexvolume-driver containers: - name: oci-flexvolume-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.27.2 + image: ghcr.io/oracle/cloud-provider-oci:v1.27.3 command: ["/usr/local/bin/install.py", "-c", "/tmp/config.yaml"] securityContext: privileged: true @@ -76,7 +76,7 @@ spec: type: DirectoryOrCreate containers: - name: oci-flexvolume-driver - image: ghcr.io/oracle/cloud-provider-oci:v1.27.2 + image: ghcr.io/oracle/cloud-provider-oci:v1.27.3 command: ["/usr/local/bin/install.py"] securityContext: privileged: true diff --git a/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml b/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml index e86523022..d5d1f0140 100644 --- a/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml +++ b/manifests/volume-provisioner/oci-volume-provisioner-fss.yaml @@ -35,7 +35,7 @@ spec: secretName: oci-volume-provisioner containers: - name: oci-volume-provisioner - image: ghcr.io/oracle/cloud-provider-oci:v1.27.2 + image: ghcr.io/oracle/cloud-provider-oci:v1.27.3 command: ["/usr/local/bin/oci-volume-provisioner"] env: - name: NODE_NAME diff --git a/manifests/volume-provisioner/oci-volume-provisioner.yaml b/manifests/volume-provisioner/oci-volume-provisioner.yaml index 6cfe06879..4d2e69688 100644 --- a/manifests/volume-provisioner/oci-volume-provisioner.yaml +++ b/manifests/volume-provisioner/oci-volume-provisioner.yaml @@ -35,7 +35,7 @@ spec: secretName: oci-volume-provisioner containers: - name: oci-volume-provisioner - image: ghcr.io/oracle/cloud-provider-oci:v1.27.2 + image: ghcr.io/oracle/cloud-provider-oci:v1.27.3 command: ["/usr/local/bin/oci-volume-provisioner"] env: - name: NODE_NAME diff --git a/pkg/cloudprovider/providers/oci/load_balancer.go b/pkg/cloudprovider/providers/oci/load_balancer.go index d4e8dfbf2..122818f36 100644 --- a/pkg/cloudprovider/providers/oci/load_balancer.go +++ b/pkg/cloudprovider/providers/oci/load_balancer.go @@ -539,6 +539,7 @@ func (cp *CloudProvider) EnsureLoadBalancer(ctx context.Context, clusterName str dimensionsMap[metrics.ComponentDimension] = lbMetricDimension dimensionsMap[metrics.ResourceOCIDDimension] = lbName metrics.SendMetricData(cp.metricPusher, getMetric(loadBalancerType, Update), time.Since(startTime).Seconds(), dimensionsMap) + return nil, err } lbExists := !client.IsNotFound(err) lbOCID := "" diff --git a/test/e2e/cloud-provider-oci/csi_volume_creation.go b/test/e2e/cloud-provider-oci/csi_volume_creation.go index 82b03c2c9..f21743ff7 100644 --- a/test/e2e/cloud-provider-oci/csi_volume_creation.go +++ b/test/e2e/cloud-provider-oci/csi_volume_creation.go @@ -44,7 +44,6 @@ var _ = Describe("CSI Volume Creation", func() { // volume name duplicate should not exist for _, volume := range volumes { framework.Logf("volume details %v :", volume) - framework.Logf("cluster ocid from setup is %s", setupF.ClusterOcid) if setupF.AddOkeSystemTags && !framework.HasOkeSystemTags(volume.SystemTags) { framework.Failf("the resource %s is expected to have oke system tags", *volume.Id) } diff --git a/test/e2e/cloud-provider-oci/load_balancer.go b/test/e2e/cloud-provider-oci/load_balancer.go index a2c0a0a4d..ecffae5f4 100644 --- a/test/e2e/cloud-provider-oci/load_balancer.go +++ b/test/e2e/cloud-provider-oci/load_balancer.go @@ -16,10 +16,8 @@ package e2e import ( "context" - "encoding/json" "fmt" "net" - "reflect" "strconv" "strings" @@ -27,7 +25,6 @@ import ( . "github.com/onsi/gomega" cloudprovider "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci" sharedfw "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" - "github.com/oracle/oci-go-sdk/v65/containerengine" "github.com/oracle/oci-go-sdk/v65/core" "go.uber.org/zap" @@ -120,7 +117,6 @@ var _ = Describe("Service [Slow]", func() { loadBalancer, err := f.Client.LoadBalancer(zap.L().Sugar(), lbType, "", nil).GetLoadBalancerByName(ctx, compartmentId, lbName) sharedfw.ExpectNoError(err) sharedfw.Logf("Loadbalancer details %v:", loadBalancer) - sharedfw.Logf("cluster ocid from setup is %s", setupF.ClusterOcid) if setupF.AddOkeSystemTags && !sharedfw.HasOkeSystemTags(loadBalancer.SystemTags) { sharedfw.Failf("Loadbalancer is expected to have the system tags") } diff --git a/test/e2e/cloud-provider-oci/setup.go b/test/e2e/cloud-provider-oci/setup.go index 07f7d616e..dbd83bb2d 100644 --- a/test/e2e/cloud-provider-oci/setup.go +++ b/test/e2e/cloud-provider-oci/setup.go @@ -1,12 +1,22 @@ +// Copyright 2020 Oracle and/or its affiliates. All rights reserved. +// +// 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. + package e2e import ( - "time" - "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" sharedfw "github.com/oracle/oci-cloud-controller-manager/test/e2e/framework" - oke "github.com/oracle/oci-go-sdk/v65/containerengine" ) var setupF *sharedfw.Framework diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 7cc652c65..238ddba90 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -15,26 +15,13 @@ package framework import ( - "context" "flag" "fmt" - "io/ioutil" "math/rand" - "os" - "strconv" "strings" "time" imageutils "k8s.io/kubernetes/test/utils/image" - - "github.com/oracle/oci-cloud-controller-manager/pkg/cloudprovider/providers/oci/config" - - . "github.com/onsi/gomega" - "github.com/oracle/oci-go-sdk/v65/common" - oke "github.com/oracle/oci-go-sdk/v65/containerengine" - "github.com/oracle/oci-go-sdk/v65/core" - "github.com/oracle/oci-go-sdk/v65/identity" - "gopkg.in/yaml.v2" ) const ( diff --git a/test/e2e/framework/system_tags_util.go b/test/e2e/framework/system_tags_util.go index a71f79475..02719477c 100644 --- a/test/e2e/framework/system_tags_util.go +++ b/test/e2e/framework/system_tags_util.go @@ -1,3 +1,17 @@ +// Copyright 2020 Oracle and/or its affiliates. All rights reserved. +// +// 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. + package framework import (