From 5b4ff35103756d28085f30ee363d097d4a4366c5 Mon Sep 17 00:00:00 2001 From: "red-hat-konflux[bot]" <126015336+red-hat-konflux[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 18:29:56 +0000 Subject: [PATCH] Update module github.com/openshift-online/ocm-common to v0.0.38 Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> --- go.mod | 6 +- go.sum | 8 +- .../ocm-common/pkg/aws/aws_client/client.go | 28 +- .../aws/aws_client/ec2_client_interface.go | 77 + .../pkg/aws/aws_client/internet_gateway.go | 12 +- .../pkg/aws/aws_client/mock_ec2_client.go | 1300 +++++++++++++++++ .../pkg/aws/aws_client/nat_gateway.go | 10 +- .../pkg/aws/aws_client/network_acl.go | 8 +- .../ocm-common/pkg/aws/aws_client/resource.go | 56 +- .../ocm-common/pkg/aws/aws_client/role.go | 10 +- .../pkg/aws/aws_client/route_table.go | 14 +- .../pkg/aws/aws_client/security_group.go | 6 +- .../ocm-common/pkg/aws/aws_client/subnet.go | 39 +- .../ocm-common/pkg/aws/aws_client/vpc.go | 8 +- .../ocm-common/pkg/aws/errors/errors.go | 1 + .../pkg/deprecation/field_deprecation.go | 12 +- .../pkg/idp/validations/password_validator.go | 2 +- .../pkg/rosa/oidcconfigs/oidcconfigs.go | 30 +- .../ocm-common/pkg/test/kms_key/kms.go | 2 +- .../pkg/test/vpc_client/nat_gateway.go | 2 +- .../pkg/test/vpc_client/network_acl.go | 4 +- .../ocm-common/pkg/test/vpc_client/subnet.go | 52 +- .../ocm-common/pkg/test/vpc_client/vpc.go | 2 +- .../ocm-common/pkg/utils/utils.go | 7 +- vendor/modules.txt | 8 +- 25 files changed, 1588 insertions(+), 116 deletions(-) create mode 100644 vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/ec2_client_interface.go create mode 100644 vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/mock_ec2_client.go diff --git a/go.mod b/go.mod index 6f20d951fd..d278e867a3 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/openshift/rosa -go 1.24.0 +go 1.24.7 require ( github.com/AlecAivazis/survey/v2 v2.2.15 @@ -30,7 +30,7 @@ require ( github.com/onsi/ginkgo/v2 v2.17.1 github.com/onsi/gomega v1.30.0 github.com/openshift-online/ocm-api-model/clientapi v0.0.453 - github.com/openshift-online/ocm-common v0.0.32 + github.com/openshift-online/ocm-common v0.0.38 github.com/openshift-online/ocm-sdk-go v0.1.499 github.com/pkg/errors v0.9.1 github.com/robfig/cron/v3 v3.0.1 @@ -39,7 +39,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/zgalor/weberr v0.6.0 gitlab.com/c0b/go-ordered-json v0.0.0-20201030195603-febf46534d5a - go.uber.org/mock v0.5.2 + go.uber.org/mock v0.6.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.29.2 k8s.io/utils v0.0.0-20230726121419-3b25d923346b diff --git a/go.sum b/go.sum index 307b60824d..db3e7b90c5 100644 --- a/go.sum +++ b/go.sum @@ -207,8 +207,8 @@ github.com/openshift-online/ocm-api-model/clientapi v0.0.453 h1:2KwHcetQzaCNFykG github.com/openshift-online/ocm-api-model/clientapi v0.0.453/go.mod h1:fZwy5HY2URG9nrExvQeXrDU/08TGqZ16f8oymVEN5lo= github.com/openshift-online/ocm-api-model/model v0.0.453 h1:CsOyRhrpxzXcn4aaobDgqv5aX2Zl0+Dm4VlJkHOxt3M= github.com/openshift-online/ocm-api-model/model v0.0.453/go.mod h1:PQIoq6P8Vlb7goOdRMLK8nJY+B7HH0RTqYAa4kyidTE= -github.com/openshift-online/ocm-common v0.0.32 h1:SApMbDZ/jGa4h+77A8rBGdGd84E6u1eN+eV5PoiJSaQ= -github.com/openshift-online/ocm-common v0.0.32/go.mod h1:VEkuZp9aqbXtetZ5ycND6QpvhykvTuBF3oPsVM1X3vI= +github.com/openshift-online/ocm-common v0.0.38 h1:BvsFrwpsr+e+J7t3IB+BYi7/52VIMMGjuRN4Z++yaGw= +github.com/openshift-online/ocm-common v0.0.38/go.mod h1:HQ+5CrortrZSngABaFNWH/FRIInoiFXouA1XhEFvsUM= github.com/openshift-online/ocm-sdk-go v0.1.499 h1:QDr980dOSV0tFNrvOGiorno4l7iMq8lNxU7PY2rVqzY= github.com/openshift-online/ocm-sdk-go v0.1.499/go.mod h1:eKqLMWEeZ6vadCHjlRPsePdqap6c34aM8TGxjMgZwKY= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -258,8 +258,8 @@ gitlab.com/c0b/go-ordered-json v0.0.0-20201030195603-febf46534d5a h1:DxppxFKRqJ8 gitlab.com/c0b/go-ordered-json v0.0.0-20201030195603-febf46534d5a/go.mod h1:NREvu3a57BaK0R1+ztrEzHWiZAihohNLQ6trPxlIqZI= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko= -go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/client.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/client.go index 275595c12c..9be4c5d6de 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/client.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/client.go @@ -25,7 +25,7 @@ import ( ) type AWSClient struct { - Ec2Client *ec2.Client + Ec2Client EC2ClientAPI Route53Client *route53.Client StackFormationClient *cloudformation.Client ElbClient *elb.Client @@ -58,31 +58,31 @@ func CreateAWSClient(profileName string, region string, awsSharedCredentialFile config.WithSharedCredentialsFiles([]string{file}), ) } else { - if envCredential() { - log.LogInfo("Got AWS_ACCESS_KEY_ID env settings, going to build the config with the env") + if envAwsProfile() { + file := os.Getenv("AWS_SHARED_CREDENTIALS_FILE") + log.LogInfo("Got file path: %s from env variable AWS_SHARED_CREDENTIALS_FILE\n", file) cfg, err = config.LoadDefaultConfig(context.TODO(), config.WithRegion(region), - config.WithCredentialsProvider( - credentials.NewStaticCredentialsProvider( - os.Getenv("AWS_ACCESS_KEY_ID"), - os.Getenv("AWS_SECRET_ACCESS_KEY"), - "")), + config.WithSharedCredentialsFiles([]string{file}), ) } else { - if envAwsProfile() { - file := os.Getenv("AWS_SHARED_CREDENTIALS_FILE") - log.LogInfo("Got file path: %s from env variable AWS_SHARED_CREDENTIALS_FILE\n", file) + if envCredential() { + log.LogInfo("Got AWS_ACCESS_KEY_ID env settings, going to build the config with the env") cfg, err = config.LoadDefaultConfig(context.TODO(), config.WithRegion(region), - config.WithSharedCredentialsFiles([]string{file}), + config.WithCredentialsProvider( + credentials.NewStaticCredentialsProvider( + os.Getenv("AWS_ACCESS_KEY_ID"), + os.Getenv("AWS_SECRET_ACCESS_KEY"), + "")), ) } else { + log.LogInfo("AWS_SHARED_CREDENTIALS_FILE not supplied") cfg, err = config.LoadDefaultConfig(context.TODO(), config.WithRegion(region), config.WithSharedConfigProfile(profileName), ) } - } } @@ -139,7 +139,7 @@ func (client *AWSClient) GetAWSPartition() string { return segments[1] } -func (client *AWSClient) EC2() *ec2.Client { +func (client *AWSClient) EC2() EC2ClientAPI { return client.Ec2Client } diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/ec2_client_interface.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/ec2_client_interface.go new file mode 100644 index 0000000000..d24b19fe14 --- /dev/null +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/ec2_client_interface.go @@ -0,0 +1,77 @@ +package aws_client + +import ( + "context" + + "github.com/aws/aws-sdk-go-v2/service/ec2" +) + +// EC2ClientAPI defines the EC2 methods used by AWSClient. +// This interface allows us to mock AWS EC2 calls in unit tests. +// +//go:generate mockgen -source=ec2_client_interface.go -package=aws_client -destination=mock_ec2_client.go +type EC2ClientAPI interface { + AllocateAddress(ctx context.Context, params *ec2.AllocateAddressInput, optFns ...func(*ec2.Options)) (*ec2.AllocateAddressOutput, error) + AssociateAddress(ctx context.Context, params *ec2.AssociateAddressInput, optFns ...func(*ec2.Options)) (*ec2.AssociateAddressOutput, error) + AssociateRouteTable(ctx context.Context, params *ec2.AssociateRouteTableInput, optFns ...func(*ec2.Options)) (*ec2.AssociateRouteTableOutput, error) + CopyImage(ctx context.Context, params *ec2.CopyImageInput, optFns ...func(*ec2.Options)) (*ec2.CopyImageOutput, error) + DescribeImages(ctx context.Context, params *ec2.DescribeImagesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeImagesOutput, error) + DisassociateAddress(ctx context.Context, params *ec2.DisassociateAddressInput, optFns ...func(*ec2.Options)) (*ec2.DisassociateAddressOutput, error) + TerminateInstances(ctx context.Context, params *ec2.TerminateInstancesInput, optFns ...func(*ec2.Options)) (*ec2.TerminateInstancesOutput, error) + AttachInternetGateway(ctx context.Context, params *ec2.AttachInternetGatewayInput, optFns ...func(*ec2.Options)) (*ec2.AttachInternetGatewayOutput, error) + AuthorizeSecurityGroupIngress(ctx context.Context, params *ec2.AuthorizeSecurityGroupIngressInput, optFns ...func(*ec2.Options)) (*ec2.AuthorizeSecurityGroupIngressOutput, error) + CancelCapacityReservation(ctx context.Context, params *ec2.CancelCapacityReservationInput, optFns ...func(*ec2.Options)) (*ec2.CancelCapacityReservationOutput, error) + CreateCapacityReservation(ctx context.Context, params *ec2.CreateCapacityReservationInput, optFns ...func(*ec2.Options)) (*ec2.CreateCapacityReservationOutput, error) + CreateInternetGateway(ctx context.Context, params *ec2.CreateInternetGatewayInput, optFns ...func(*ec2.Options)) (*ec2.CreateInternetGatewayOutput, error) + CreateKeyPair(ctx context.Context, params *ec2.CreateKeyPairInput, optFns ...func(*ec2.Options)) (*ec2.CreateKeyPairOutput, error) + CreateNatGateway(ctx context.Context, params *ec2.CreateNatGatewayInput, optFns ...func(*ec2.Options)) (*ec2.CreateNatGatewayOutput, error) + CreateNetworkAclEntry(ctx context.Context, params *ec2.CreateNetworkAclEntryInput, optFns ...func(*ec2.Options)) (*ec2.CreateNetworkAclEntryOutput, error) + CreateRoute(ctx context.Context, params *ec2.CreateRouteInput, optFns ...func(*ec2.Options)) (*ec2.CreateRouteOutput, error) + CreateRouteTable(ctx context.Context, params *ec2.CreateRouteTableInput, optFns ...func(*ec2.Options)) (*ec2.CreateRouteTableOutput, error) + CreateSecurityGroup(ctx context.Context, params *ec2.CreateSecurityGroupInput, optFns ...func(*ec2.Options)) (*ec2.CreateSecurityGroupOutput, error) + CreateSubnet(ctx context.Context, params *ec2.CreateSubnetInput, optFns ...func(*ec2.Options)) (*ec2.CreateSubnetOutput, error) + CreateTags(ctx context.Context, params *ec2.CreateTagsInput, optFns ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error) + CreateVolume(ctx context.Context, params *ec2.CreateVolumeInput, optFns ...func(*ec2.Options)) (*ec2.CreateVolumeOutput, error) + CreateVpc(ctx context.Context, params *ec2.CreateVpcInput, optFns ...func(*ec2.Options)) (*ec2.CreateVpcOutput, error) + CreateVpcEndpoint(ctx context.Context, params *ec2.CreateVpcEndpointInput, optFns ...func(*ec2.Options)) (*ec2.CreateVpcEndpointOutput, error) + DeleteInternetGateway(ctx context.Context, params *ec2.DeleteInternetGatewayInput, optFns ...func(*ec2.Options)) (*ec2.DeleteInternetGatewayOutput, error) + DeleteKeyPair(ctx context.Context, params *ec2.DeleteKeyPairInput, optFns ...func(*ec2.Options)) (*ec2.DeleteKeyPairOutput, error) + DeleteNatGateway(ctx context.Context, params *ec2.DeleteNatGatewayInput, optFns ...func(*ec2.Options)) (*ec2.DeleteNatGatewayOutput, error) + DeleteNetworkAclEntry(ctx context.Context, params *ec2.DeleteNetworkAclEntryInput, optFns ...func(*ec2.Options)) (*ec2.DeleteNetworkAclEntryOutput, error) + DeleteNetworkInterface(ctx context.Context, params *ec2.DeleteNetworkInterfaceInput, optFns ...func(*ec2.Options)) (*ec2.DeleteNetworkInterfaceOutput, error) + DeleteRouteTable(ctx context.Context, params *ec2.DeleteRouteTableInput, optFns ...func(*ec2.Options)) (*ec2.DeleteRouteTableOutput, error) + DeleteSecurityGroup(ctx context.Context, params *ec2.DeleteSecurityGroupInput, optFns ...func(*ec2.Options)) (*ec2.DeleteSecurityGroupOutput, error) + DeleteSubnet(ctx context.Context, params *ec2.DeleteSubnetInput, optFns ...func(*ec2.Options)) (*ec2.DeleteSubnetOutput, error) + DeleteTags(ctx context.Context, params *ec2.DeleteTagsInput, optFns ...func(*ec2.Options)) (*ec2.DeleteTagsOutput, error) + DeleteVolume(ctx context.Context, params *ec2.DeleteVolumeInput, optFns ...func(*ec2.Options)) (*ec2.DeleteVolumeOutput, error) + DeleteVpc(ctx context.Context, params *ec2.DeleteVpcInput, optFns ...func(*ec2.Options)) (*ec2.DeleteVpcOutput, error) + DeleteVpcEndpoints(ctx context.Context, params *ec2.DeleteVpcEndpointsInput, optFns ...func(*ec2.Options)) (*ec2.DeleteVpcEndpointsOutput, error) + DescribeAddresses(ctx context.Context, params *ec2.DescribeAddressesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeAddressesOutput, error) + DescribeAvailabilityZones(ctx context.Context, params *ec2.DescribeAvailabilityZonesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeAvailabilityZonesOutput, error) + DescribeCapacityReservations(ctx context.Context, params *ec2.DescribeCapacityReservationsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeCapacityReservationsOutput, error) + DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error) + DescribeInstanceStatus(ctx context.Context, params *ec2.DescribeInstanceStatusInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceStatusOutput, error) + DescribeInstanceTypeOfferings(ctx context.Context, params *ec2.DescribeInstanceTypeOfferingsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTypeOfferingsOutput, error) + DescribeInternetGateways(ctx context.Context, params *ec2.DescribeInternetGatewaysInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInternetGatewaysOutput, error) + DescribeKeyPairs(ctx context.Context, params *ec2.DescribeKeyPairsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeKeyPairsOutput, error) + DescribeNatGateways(ctx context.Context, params *ec2.DescribeNatGatewaysInput, optFns ...func(*ec2.Options)) (*ec2.DescribeNatGatewaysOutput, error) + DescribeNetworkAcls(ctx context.Context, params *ec2.DescribeNetworkAclsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeNetworkAclsOutput, error) + DescribeNetworkInterfaces(ctx context.Context, params *ec2.DescribeNetworkInterfacesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeNetworkInterfacesOutput, error) + DescribeRegions(ctx context.Context, params *ec2.DescribeRegionsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeRegionsOutput, error) + DescribeReservedInstancesOfferings(ctx context.Context, params *ec2.DescribeReservedInstancesOfferingsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeReservedInstancesOfferingsOutput, error) + DescribeRouteTables(ctx context.Context, params *ec2.DescribeRouteTablesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeRouteTablesOutput, error) + DescribeSecurityGroupRules(ctx context.Context, params *ec2.DescribeSecurityGroupRulesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupRulesOutput, error) + DescribeSecurityGroups(ctx context.Context, params *ec2.DescribeSecurityGroupsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupsOutput, error) + DescribeSubnets(ctx context.Context, params *ec2.DescribeSubnetsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSubnetsOutput, error) + DescribeVolumes(ctx context.Context, params *ec2.DescribeVolumesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVolumesOutput, error) + DescribeVpcEndpoints(ctx context.Context, params *ec2.DescribeVpcEndpointsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcEndpointsOutput, error) + DescribeVpcs(ctx context.Context, params *ec2.DescribeVpcsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcsOutput, error) + DescribeVpcAttribute(ctx context.Context, params *ec2.DescribeVpcAttributeInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcAttributeOutput, error) + DetachInternetGateway(ctx context.Context, params *ec2.DetachInternetGatewayInput, optFns ...func(*ec2.Options)) (*ec2.DetachInternetGatewayOutput, error) + DisassociateRouteTable(ctx context.Context, params *ec2.DisassociateRouteTableInput, optFns ...func(*ec2.Options)) (*ec2.DisassociateRouteTableOutput, error) + ModifyVpcAttribute(ctx context.Context, params *ec2.ModifyVpcAttributeInput, optFns ...func(*ec2.Options)) (*ec2.ModifyVpcAttributeOutput, error) + ReleaseAddress(ctx context.Context, params *ec2.ReleaseAddressInput, optFns ...func(*ec2.Options)) (*ec2.ReleaseAddressOutput, error) + RevokeSecurityGroupEgress(ctx context.Context, params *ec2.RevokeSecurityGroupEgressInput, optFns ...func(*ec2.Options)) (*ec2.RevokeSecurityGroupEgressOutput, error) + RevokeSecurityGroupIngress(ctx context.Context, params *ec2.RevokeSecurityGroupIngressInput, optFns ...func(*ec2.Options)) (*ec2.RevokeSecurityGroupIngressOutput, error) + RunInstances(ctx context.Context, params *ec2.RunInstancesInput, optFns ...func(*ec2.Options)) (*ec2.RunInstancesOutput, error) +} diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/internet_gateway.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/internet_gateway.go index bf065be275..f23e6e81a2 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/internet_gateway.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/internet_gateway.go @@ -16,10 +16,10 @@ func (client *AWSClient) CreateInternetGateway() (*ec2.CreateInternetGatewayOutp } respCreateInternetGateway, err := client.Ec2Client.CreateInternetGateway(context.TODO(), inputCreateInternetGateway) if err != nil { - log.LogError("Create igw error " + err.Error()) + log.LogError("Create igw error %s", err.Error()) return nil, err } - log.LogInfo("Create igw success: " + *respCreateInternetGateway.InternetGateway.InternetGatewayId) + log.LogInfo("Create igw success: %s", *respCreateInternetGateway.InternetGateway.InternetGatewayId) return respCreateInternetGateway, err } @@ -32,10 +32,10 @@ func (client *AWSClient) AttachInternetGateway(internetGatewayID string, vpcID s } resp, err := client.Ec2Client.AttachInternetGateway(context.TODO(), input) if err != nil { - log.LogError("Attach igw error " + err.Error()) + log.LogError("Attach igw error %s", err.Error()) return nil, err } - log.LogInfo("Attach igw success: " + internetGatewayID) + log.LogInfo("Attach igw success: %s", internetGatewayID) return resp, err } @@ -79,9 +79,9 @@ func (client *AWSClient) DeleteInternetGateway(internetGatewayID string) (*ec2.D } respDeleteInternetGateway, err := client.Ec2Client.DeleteInternetGateway(context.TODO(), inputDeleteInternetGateway) if err != nil { - log.LogError("Delete igw error " + err.Error()) + log.LogError("Delete igw error %s", err.Error()) return nil, err } - log.LogInfo("Delete igw success: " + internetGatewayID) + log.LogInfo("Delete igw success: %s", internetGatewayID) return respDeleteInternetGateway, err } diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/mock_ec2_client.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/mock_ec2_client.go new file mode 100644 index 0000000000..8051fa34bb --- /dev/null +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/mock_ec2_client.go @@ -0,0 +1,1300 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: ec2_client_interface.go +// +// Generated by this command: +// +// mockgen -source=ec2_client_interface.go -package=aws_client -destination=mock_ec2_client.go +// +// Package aws_client is a generated GoMock package. +package aws_client + +import ( + context "context" + reflect "reflect" + + ec2 "github.com/aws/aws-sdk-go-v2/service/ec2" + gomock "go.uber.org/mock/gomock" +) + +// MockEC2ClientAPI is a mock of EC2ClientAPI interface. +type MockEC2ClientAPI struct { + ctrl *gomock.Controller + recorder *MockEC2ClientAPIMockRecorder +} + +// MockEC2ClientAPIMockRecorder is the mock recorder for MockEC2ClientAPI. +type MockEC2ClientAPIMockRecorder struct { + mock *MockEC2ClientAPI +} + +// NewMockEC2ClientAPI creates a new mock instance. +func NewMockEC2ClientAPI(ctrl *gomock.Controller) *MockEC2ClientAPI { + mock := &MockEC2ClientAPI{ctrl: ctrl} + mock.recorder = &MockEC2ClientAPIMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockEC2ClientAPI) EXPECT() *MockEC2ClientAPIMockRecorder { + return m.recorder +} + +// AllocateAddress mocks base method. +func (m *MockEC2ClientAPI) AllocateAddress(ctx context.Context, params *ec2.AllocateAddressInput, optFns ...func(*ec2.Options)) (*ec2.AllocateAddressOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AllocateAddress", varargs...) + ret0, _ := ret[0].(*ec2.AllocateAddressOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AllocateAddress indicates an expected call of AllocateAddress. +func (mr *MockEC2ClientAPIMockRecorder) AllocateAddress(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllocateAddress", reflect.TypeOf((*MockEC2ClientAPI)(nil).AllocateAddress), varargs...) +} + +// AssociateAddress mocks base method. +func (m *MockEC2ClientAPI) AssociateAddress(ctx context.Context, params *ec2.AssociateAddressInput, optFns ...func(*ec2.Options)) (*ec2.AssociateAddressOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AssociateAddress", varargs...) + ret0, _ := ret[0].(*ec2.AssociateAddressOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AssociateAddress indicates an expected call of AssociateAddress. +func (mr *MockEC2ClientAPIMockRecorder) AssociateAddress(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssociateAddress", reflect.TypeOf((*MockEC2ClientAPI)(nil).AssociateAddress), varargs...) +} + +// AssociateRouteTable mocks base method. +func (m *MockEC2ClientAPI) AssociateRouteTable(ctx context.Context, params *ec2.AssociateRouteTableInput, optFns ...func(*ec2.Options)) (*ec2.AssociateRouteTableOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AssociateRouteTable", varargs...) + ret0, _ := ret[0].(*ec2.AssociateRouteTableOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AssociateRouteTable indicates an expected call of AssociateRouteTable. +func (mr *MockEC2ClientAPIMockRecorder) AssociateRouteTable(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AssociateRouteTable", reflect.TypeOf((*MockEC2ClientAPI)(nil).AssociateRouteTable), varargs...) +} + +// AttachInternetGateway mocks base method. +func (m *MockEC2ClientAPI) AttachInternetGateway(ctx context.Context, params *ec2.AttachInternetGatewayInput, optFns ...func(*ec2.Options)) (*ec2.AttachInternetGatewayOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AttachInternetGateway", varargs...) + ret0, _ := ret[0].(*ec2.AttachInternetGatewayOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AttachInternetGateway indicates an expected call of AttachInternetGateway. +func (mr *MockEC2ClientAPIMockRecorder) AttachInternetGateway(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachInternetGateway", reflect.TypeOf((*MockEC2ClientAPI)(nil).AttachInternetGateway), varargs...) +} + +// AuthorizeSecurityGroupIngress mocks base method. +func (m *MockEC2ClientAPI) AuthorizeSecurityGroupIngress(ctx context.Context, params *ec2.AuthorizeSecurityGroupIngressInput, optFns ...func(*ec2.Options)) (*ec2.AuthorizeSecurityGroupIngressOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "AuthorizeSecurityGroupIngress", varargs...) + ret0, _ := ret[0].(*ec2.AuthorizeSecurityGroupIngressOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AuthorizeSecurityGroupIngress indicates an expected call of AuthorizeSecurityGroupIngress. +func (mr *MockEC2ClientAPIMockRecorder) AuthorizeSecurityGroupIngress(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthorizeSecurityGroupIngress", reflect.TypeOf((*MockEC2ClientAPI)(nil).AuthorizeSecurityGroupIngress), varargs...) +} + +// CancelCapacityReservation mocks base method. +func (m *MockEC2ClientAPI) CancelCapacityReservation(ctx context.Context, params *ec2.CancelCapacityReservationInput, optFns ...func(*ec2.Options)) (*ec2.CancelCapacityReservationOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CancelCapacityReservation", varargs...) + ret0, _ := ret[0].(*ec2.CancelCapacityReservationOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CancelCapacityReservation indicates an expected call of CancelCapacityReservation. +func (mr *MockEC2ClientAPIMockRecorder) CancelCapacityReservation(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelCapacityReservation", reflect.TypeOf((*MockEC2ClientAPI)(nil).CancelCapacityReservation), varargs...) +} + +// CopyImage mocks base method. +func (m *MockEC2ClientAPI) CopyImage(ctx context.Context, params *ec2.CopyImageInput, optFns ...func(*ec2.Options)) (*ec2.CopyImageOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CopyImage", varargs...) + ret0, _ := ret[0].(*ec2.CopyImageOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CopyImage indicates an expected call of CopyImage. +func (mr *MockEC2ClientAPIMockRecorder) CopyImage(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CopyImage", reflect.TypeOf((*MockEC2ClientAPI)(nil).CopyImage), varargs...) +} + +// CreateCapacityReservation mocks base method. +func (m *MockEC2ClientAPI) CreateCapacityReservation(ctx context.Context, params *ec2.CreateCapacityReservationInput, optFns ...func(*ec2.Options)) (*ec2.CreateCapacityReservationOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateCapacityReservation", varargs...) + ret0, _ := ret[0].(*ec2.CreateCapacityReservationOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateCapacityReservation indicates an expected call of CreateCapacityReservation. +func (mr *MockEC2ClientAPIMockRecorder) CreateCapacityReservation(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCapacityReservation", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateCapacityReservation), varargs...) +} + +// CreateInternetGateway mocks base method. +func (m *MockEC2ClientAPI) CreateInternetGateway(ctx context.Context, params *ec2.CreateInternetGatewayInput, optFns ...func(*ec2.Options)) (*ec2.CreateInternetGatewayOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateInternetGateway", varargs...) + ret0, _ := ret[0].(*ec2.CreateInternetGatewayOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateInternetGateway indicates an expected call of CreateInternetGateway. +func (mr *MockEC2ClientAPIMockRecorder) CreateInternetGateway(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateInternetGateway", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateInternetGateway), varargs...) +} + +// CreateKeyPair mocks base method. +func (m *MockEC2ClientAPI) CreateKeyPair(ctx context.Context, params *ec2.CreateKeyPairInput, optFns ...func(*ec2.Options)) (*ec2.CreateKeyPairOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateKeyPair", varargs...) + ret0, _ := ret[0].(*ec2.CreateKeyPairOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateKeyPair indicates an expected call of CreateKeyPair. +func (mr *MockEC2ClientAPIMockRecorder) CreateKeyPair(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateKeyPair", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateKeyPair), varargs...) +} + +// CreateNatGateway mocks base method. +func (m *MockEC2ClientAPI) CreateNatGateway(ctx context.Context, params *ec2.CreateNatGatewayInput, optFns ...func(*ec2.Options)) (*ec2.CreateNatGatewayOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateNatGateway", varargs...) + ret0, _ := ret[0].(*ec2.CreateNatGatewayOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateNatGateway indicates an expected call of CreateNatGateway. +func (mr *MockEC2ClientAPIMockRecorder) CreateNatGateway(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNatGateway", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateNatGateway), varargs...) +} + +// CreateNetworkAclEntry mocks base method. +func (m *MockEC2ClientAPI) CreateNetworkAclEntry(ctx context.Context, params *ec2.CreateNetworkAclEntryInput, optFns ...func(*ec2.Options)) (*ec2.CreateNetworkAclEntryOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateNetworkAclEntry", varargs...) + ret0, _ := ret[0].(*ec2.CreateNetworkAclEntryOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateNetworkAclEntry indicates an expected call of CreateNetworkAclEntry. +func (mr *MockEC2ClientAPIMockRecorder) CreateNetworkAclEntry(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkAclEntry", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateNetworkAclEntry), varargs...) +} + +// CreateRoute mocks base method. +func (m *MockEC2ClientAPI) CreateRoute(ctx context.Context, params *ec2.CreateRouteInput, optFns ...func(*ec2.Options)) (*ec2.CreateRouteOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateRoute", varargs...) + ret0, _ := ret[0].(*ec2.CreateRouteOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateRoute indicates an expected call of CreateRoute. +func (mr *MockEC2ClientAPIMockRecorder) CreateRoute(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRoute", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateRoute), varargs...) +} + +// CreateRouteTable mocks base method. +func (m *MockEC2ClientAPI) CreateRouteTable(ctx context.Context, params *ec2.CreateRouteTableInput, optFns ...func(*ec2.Options)) (*ec2.CreateRouteTableOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateRouteTable", varargs...) + ret0, _ := ret[0].(*ec2.CreateRouteTableOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateRouteTable indicates an expected call of CreateRouteTable. +func (mr *MockEC2ClientAPIMockRecorder) CreateRouteTable(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRouteTable", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateRouteTable), varargs...) +} + +// CreateSecurityGroup mocks base method. +func (m *MockEC2ClientAPI) CreateSecurityGroup(ctx context.Context, params *ec2.CreateSecurityGroupInput, optFns ...func(*ec2.Options)) (*ec2.CreateSecurityGroupOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateSecurityGroup", varargs...) + ret0, _ := ret[0].(*ec2.CreateSecurityGroupOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateSecurityGroup indicates an expected call of CreateSecurityGroup. +func (mr *MockEC2ClientAPIMockRecorder) CreateSecurityGroup(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecurityGroup", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateSecurityGroup), varargs...) +} + +// CreateSubnet mocks base method. +func (m *MockEC2ClientAPI) CreateSubnet(ctx context.Context, params *ec2.CreateSubnetInput, optFns ...func(*ec2.Options)) (*ec2.CreateSubnetOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateSubnet", varargs...) + ret0, _ := ret[0].(*ec2.CreateSubnetOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateSubnet indicates an expected call of CreateSubnet. +func (mr *MockEC2ClientAPIMockRecorder) CreateSubnet(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSubnet", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateSubnet), varargs...) +} + +// CreateTags mocks base method. +func (m *MockEC2ClientAPI) CreateTags(ctx context.Context, params *ec2.CreateTagsInput, optFns ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateTags", varargs...) + ret0, _ := ret[0].(*ec2.CreateTagsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateTags indicates an expected call of CreateTags. +func (mr *MockEC2ClientAPIMockRecorder) CreateTags(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTags", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateTags), varargs...) +} + +// CreateVolume mocks base method. +func (m *MockEC2ClientAPI) CreateVolume(ctx context.Context, params *ec2.CreateVolumeInput, optFns ...func(*ec2.Options)) (*ec2.CreateVolumeOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateVolume", varargs...) + ret0, _ := ret[0].(*ec2.CreateVolumeOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateVolume indicates an expected call of CreateVolume. +func (mr *MockEC2ClientAPIMockRecorder) CreateVolume(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVolume", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateVolume), varargs...) +} + +// CreateVpc mocks base method. +func (m *MockEC2ClientAPI) CreateVpc(ctx context.Context, params *ec2.CreateVpcInput, optFns ...func(*ec2.Options)) (*ec2.CreateVpcOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateVpc", varargs...) + ret0, _ := ret[0].(*ec2.CreateVpcOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateVpc indicates an expected call of CreateVpc. +func (mr *MockEC2ClientAPIMockRecorder) CreateVpc(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVpc", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateVpc), varargs...) +} + +// CreateVpcEndpoint mocks base method. +func (m *MockEC2ClientAPI) CreateVpcEndpoint(ctx context.Context, params *ec2.CreateVpcEndpointInput, optFns ...func(*ec2.Options)) (*ec2.CreateVpcEndpointOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateVpcEndpoint", varargs...) + ret0, _ := ret[0].(*ec2.CreateVpcEndpointOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateVpcEndpoint indicates an expected call of CreateVpcEndpoint. +func (mr *MockEC2ClientAPIMockRecorder) CreateVpcEndpoint(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateVpcEndpoint", reflect.TypeOf((*MockEC2ClientAPI)(nil).CreateVpcEndpoint), varargs...) +} + +// DeleteInternetGateway mocks base method. +func (m *MockEC2ClientAPI) DeleteInternetGateway(ctx context.Context, params *ec2.DeleteInternetGatewayInput, optFns ...func(*ec2.Options)) (*ec2.DeleteInternetGatewayOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteInternetGateway", varargs...) + ret0, _ := ret[0].(*ec2.DeleteInternetGatewayOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteInternetGateway indicates an expected call of DeleteInternetGateway. +func (mr *MockEC2ClientAPIMockRecorder) DeleteInternetGateway(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInternetGateway", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteInternetGateway), varargs...) +} + +// DeleteKeyPair mocks base method. +func (m *MockEC2ClientAPI) DeleteKeyPair(ctx context.Context, params *ec2.DeleteKeyPairInput, optFns ...func(*ec2.Options)) (*ec2.DeleteKeyPairOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteKeyPair", varargs...) + ret0, _ := ret[0].(*ec2.DeleteKeyPairOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteKeyPair indicates an expected call of DeleteKeyPair. +func (mr *MockEC2ClientAPIMockRecorder) DeleteKeyPair(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteKeyPair", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteKeyPair), varargs...) +} + +// DeleteNatGateway mocks base method. +func (m *MockEC2ClientAPI) DeleteNatGateway(ctx context.Context, params *ec2.DeleteNatGatewayInput, optFns ...func(*ec2.Options)) (*ec2.DeleteNatGatewayOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteNatGateway", varargs...) + ret0, _ := ret[0].(*ec2.DeleteNatGatewayOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteNatGateway indicates an expected call of DeleteNatGateway. +func (mr *MockEC2ClientAPIMockRecorder) DeleteNatGateway(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNatGateway", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteNatGateway), varargs...) +} + +// DeleteNetworkAclEntry mocks base method. +func (m *MockEC2ClientAPI) DeleteNetworkAclEntry(ctx context.Context, params *ec2.DeleteNetworkAclEntryInput, optFns ...func(*ec2.Options)) (*ec2.DeleteNetworkAclEntryOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteNetworkAclEntry", varargs...) + ret0, _ := ret[0].(*ec2.DeleteNetworkAclEntryOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteNetworkAclEntry indicates an expected call of DeleteNetworkAclEntry. +func (mr *MockEC2ClientAPIMockRecorder) DeleteNetworkAclEntry(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkAclEntry", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteNetworkAclEntry), varargs...) +} + +// DeleteNetworkInterface mocks base method. +func (m *MockEC2ClientAPI) DeleteNetworkInterface(ctx context.Context, params *ec2.DeleteNetworkInterfaceInput, optFns ...func(*ec2.Options)) (*ec2.DeleteNetworkInterfaceOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteNetworkInterface", varargs...) + ret0, _ := ret[0].(*ec2.DeleteNetworkInterfaceOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteNetworkInterface indicates an expected call of DeleteNetworkInterface. +func (mr *MockEC2ClientAPIMockRecorder) DeleteNetworkInterface(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkInterface", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteNetworkInterface), varargs...) +} + +// DeleteRouteTable mocks base method. +func (m *MockEC2ClientAPI) DeleteRouteTable(ctx context.Context, params *ec2.DeleteRouteTableInput, optFns ...func(*ec2.Options)) (*ec2.DeleteRouteTableOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteRouteTable", varargs...) + ret0, _ := ret[0].(*ec2.DeleteRouteTableOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteRouteTable indicates an expected call of DeleteRouteTable. +func (mr *MockEC2ClientAPIMockRecorder) DeleteRouteTable(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRouteTable", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteRouteTable), varargs...) +} + +// DeleteSecurityGroup mocks base method. +func (m *MockEC2ClientAPI) DeleteSecurityGroup(ctx context.Context, params *ec2.DeleteSecurityGroupInput, optFns ...func(*ec2.Options)) (*ec2.DeleteSecurityGroupOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteSecurityGroup", varargs...) + ret0, _ := ret[0].(*ec2.DeleteSecurityGroupOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteSecurityGroup indicates an expected call of DeleteSecurityGroup. +func (mr *MockEC2ClientAPIMockRecorder) DeleteSecurityGroup(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecurityGroup", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteSecurityGroup), varargs...) +} + +// DeleteSubnet mocks base method. +func (m *MockEC2ClientAPI) DeleteSubnet(ctx context.Context, params *ec2.DeleteSubnetInput, optFns ...func(*ec2.Options)) (*ec2.DeleteSubnetOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteSubnet", varargs...) + ret0, _ := ret[0].(*ec2.DeleteSubnetOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteSubnet indicates an expected call of DeleteSubnet. +func (mr *MockEC2ClientAPIMockRecorder) DeleteSubnet(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSubnet", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteSubnet), varargs...) +} + +// DeleteTags mocks base method. +func (m *MockEC2ClientAPI) DeleteTags(ctx context.Context, params *ec2.DeleteTagsInput, optFns ...func(*ec2.Options)) (*ec2.DeleteTagsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteTags", varargs...) + ret0, _ := ret[0].(*ec2.DeleteTagsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteTags indicates an expected call of DeleteTags. +func (mr *MockEC2ClientAPIMockRecorder) DeleteTags(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTags", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteTags), varargs...) +} + +// DeleteVolume mocks base method. +func (m *MockEC2ClientAPI) DeleteVolume(ctx context.Context, params *ec2.DeleteVolumeInput, optFns ...func(*ec2.Options)) (*ec2.DeleteVolumeOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteVolume", varargs...) + ret0, _ := ret[0].(*ec2.DeleteVolumeOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteVolume indicates an expected call of DeleteVolume. +func (mr *MockEC2ClientAPIMockRecorder) DeleteVolume(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVolume", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteVolume), varargs...) +} + +// DeleteVpc mocks base method. +func (m *MockEC2ClientAPI) DeleteVpc(ctx context.Context, params *ec2.DeleteVpcInput, optFns ...func(*ec2.Options)) (*ec2.DeleteVpcOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteVpc", varargs...) + ret0, _ := ret[0].(*ec2.DeleteVpcOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteVpc indicates an expected call of DeleteVpc. +func (mr *MockEC2ClientAPIMockRecorder) DeleteVpc(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVpc", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteVpc), varargs...) +} + +// DeleteVpcEndpoints mocks base method. +func (m *MockEC2ClientAPI) DeleteVpcEndpoints(ctx context.Context, params *ec2.DeleteVpcEndpointsInput, optFns ...func(*ec2.Options)) (*ec2.DeleteVpcEndpointsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteVpcEndpoints", varargs...) + ret0, _ := ret[0].(*ec2.DeleteVpcEndpointsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteVpcEndpoints indicates an expected call of DeleteVpcEndpoints. +func (mr *MockEC2ClientAPIMockRecorder) DeleteVpcEndpoints(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVpcEndpoints", reflect.TypeOf((*MockEC2ClientAPI)(nil).DeleteVpcEndpoints), varargs...) +} + +// DescribeAddresses mocks base method. +func (m *MockEC2ClientAPI) DescribeAddresses(ctx context.Context, params *ec2.DescribeAddressesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeAddressesOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeAddresses", varargs...) + ret0, _ := ret[0].(*ec2.DescribeAddressesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeAddresses indicates an expected call of DescribeAddresses. +func (mr *MockEC2ClientAPIMockRecorder) DescribeAddresses(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeAddresses", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeAddresses), varargs...) +} + +// DescribeAvailabilityZones mocks base method. +func (m *MockEC2ClientAPI) DescribeAvailabilityZones(ctx context.Context, params *ec2.DescribeAvailabilityZonesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeAvailabilityZonesOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeAvailabilityZones", varargs...) + ret0, _ := ret[0].(*ec2.DescribeAvailabilityZonesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeAvailabilityZones indicates an expected call of DescribeAvailabilityZones. +func (mr *MockEC2ClientAPIMockRecorder) DescribeAvailabilityZones(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeAvailabilityZones", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeAvailabilityZones), varargs...) +} + +// DescribeCapacityReservations mocks base method. +func (m *MockEC2ClientAPI) DescribeCapacityReservations(ctx context.Context, params *ec2.DescribeCapacityReservationsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeCapacityReservationsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeCapacityReservations", varargs...) + ret0, _ := ret[0].(*ec2.DescribeCapacityReservationsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeCapacityReservations indicates an expected call of DescribeCapacityReservations. +func (mr *MockEC2ClientAPIMockRecorder) DescribeCapacityReservations(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeCapacityReservations", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeCapacityReservations), varargs...) +} + +// DescribeImages mocks base method. +func (m *MockEC2ClientAPI) DescribeImages(ctx context.Context, params *ec2.DescribeImagesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeImagesOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeImages", varargs...) + ret0, _ := ret[0].(*ec2.DescribeImagesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeImages indicates an expected call of DescribeImages. +func (mr *MockEC2ClientAPIMockRecorder) DescribeImages(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeImages", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeImages), varargs...) +} + +// DescribeInstanceStatus mocks base method. +func (m *MockEC2ClientAPI) DescribeInstanceStatus(ctx context.Context, params *ec2.DescribeInstanceStatusInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceStatusOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeInstanceStatus", varargs...) + ret0, _ := ret[0].(*ec2.DescribeInstanceStatusOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeInstanceStatus indicates an expected call of DescribeInstanceStatus. +func (mr *MockEC2ClientAPIMockRecorder) DescribeInstanceStatus(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceStatus", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeInstanceStatus), varargs...) +} + +// DescribeInstanceTypeOfferings mocks base method. +func (m *MockEC2ClientAPI) DescribeInstanceTypeOfferings(ctx context.Context, params *ec2.DescribeInstanceTypeOfferingsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTypeOfferingsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeInstanceTypeOfferings", varargs...) + ret0, _ := ret[0].(*ec2.DescribeInstanceTypeOfferingsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeInstanceTypeOfferings indicates an expected call of DescribeInstanceTypeOfferings. +func (mr *MockEC2ClientAPIMockRecorder) DescribeInstanceTypeOfferings(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstanceTypeOfferings", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeInstanceTypeOfferings), varargs...) +} + +// DescribeInstances mocks base method. +func (m *MockEC2ClientAPI) DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeInstances", varargs...) + ret0, _ := ret[0].(*ec2.DescribeInstancesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeInstances indicates an expected call of DescribeInstances. +func (mr *MockEC2ClientAPIMockRecorder) DescribeInstances(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInstances", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeInstances), varargs...) +} + +// DescribeInternetGateways mocks base method. +func (m *MockEC2ClientAPI) DescribeInternetGateways(ctx context.Context, params *ec2.DescribeInternetGatewaysInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInternetGatewaysOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeInternetGateways", varargs...) + ret0, _ := ret[0].(*ec2.DescribeInternetGatewaysOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeInternetGateways indicates an expected call of DescribeInternetGateways. +func (mr *MockEC2ClientAPIMockRecorder) DescribeInternetGateways(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeInternetGateways", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeInternetGateways), varargs...) +} + +// DescribeKeyPairs mocks base method. +func (m *MockEC2ClientAPI) DescribeKeyPairs(ctx context.Context, params *ec2.DescribeKeyPairsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeKeyPairsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeKeyPairs", varargs...) + ret0, _ := ret[0].(*ec2.DescribeKeyPairsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeKeyPairs indicates an expected call of DescribeKeyPairs. +func (mr *MockEC2ClientAPIMockRecorder) DescribeKeyPairs(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeKeyPairs", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeKeyPairs), varargs...) +} + +// DescribeNatGateways mocks base method. +func (m *MockEC2ClientAPI) DescribeNatGateways(ctx context.Context, params *ec2.DescribeNatGatewaysInput, optFns ...func(*ec2.Options)) (*ec2.DescribeNatGatewaysOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeNatGateways", varargs...) + ret0, _ := ret[0].(*ec2.DescribeNatGatewaysOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeNatGateways indicates an expected call of DescribeNatGateways. +func (mr *MockEC2ClientAPIMockRecorder) DescribeNatGateways(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeNatGateways", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeNatGateways), varargs...) +} + +// DescribeNetworkAcls mocks base method. +func (m *MockEC2ClientAPI) DescribeNetworkAcls(ctx context.Context, params *ec2.DescribeNetworkAclsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeNetworkAclsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeNetworkAcls", varargs...) + ret0, _ := ret[0].(*ec2.DescribeNetworkAclsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeNetworkAcls indicates an expected call of DescribeNetworkAcls. +func (mr *MockEC2ClientAPIMockRecorder) DescribeNetworkAcls(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeNetworkAcls", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeNetworkAcls), varargs...) +} + +// DescribeNetworkInterfaces mocks base method. +func (m *MockEC2ClientAPI) DescribeNetworkInterfaces(ctx context.Context, params *ec2.DescribeNetworkInterfacesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeNetworkInterfacesOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeNetworkInterfaces", varargs...) + ret0, _ := ret[0].(*ec2.DescribeNetworkInterfacesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeNetworkInterfaces indicates an expected call of DescribeNetworkInterfaces. +func (mr *MockEC2ClientAPIMockRecorder) DescribeNetworkInterfaces(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeNetworkInterfaces", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeNetworkInterfaces), varargs...) +} + +// DescribeRegions mocks base method. +func (m *MockEC2ClientAPI) DescribeRegions(ctx context.Context, params *ec2.DescribeRegionsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeRegionsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeRegions", varargs...) + ret0, _ := ret[0].(*ec2.DescribeRegionsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeRegions indicates an expected call of DescribeRegions. +func (mr *MockEC2ClientAPIMockRecorder) DescribeRegions(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeRegions", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeRegions), varargs...) +} + +// DescribeReservedInstancesOfferings mocks base method. +func (m *MockEC2ClientAPI) DescribeReservedInstancesOfferings(ctx context.Context, params *ec2.DescribeReservedInstancesOfferingsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeReservedInstancesOfferingsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeReservedInstancesOfferings", varargs...) + ret0, _ := ret[0].(*ec2.DescribeReservedInstancesOfferingsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeReservedInstancesOfferings indicates an expected call of DescribeReservedInstancesOfferings. +func (mr *MockEC2ClientAPIMockRecorder) DescribeReservedInstancesOfferings(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeReservedInstancesOfferings", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeReservedInstancesOfferings), varargs...) +} + +// DescribeRouteTables mocks base method. +func (m *MockEC2ClientAPI) DescribeRouteTables(ctx context.Context, params *ec2.DescribeRouteTablesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeRouteTablesOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeRouteTables", varargs...) + ret0, _ := ret[0].(*ec2.DescribeRouteTablesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeRouteTables indicates an expected call of DescribeRouteTables. +func (mr *MockEC2ClientAPIMockRecorder) DescribeRouteTables(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeRouteTables", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeRouteTables), varargs...) +} + +// DescribeSecurityGroupRules mocks base method. +func (m *MockEC2ClientAPI) DescribeSecurityGroupRules(ctx context.Context, params *ec2.DescribeSecurityGroupRulesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupRulesOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeSecurityGroupRules", varargs...) + ret0, _ := ret[0].(*ec2.DescribeSecurityGroupRulesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSecurityGroupRules indicates an expected call of DescribeSecurityGroupRules. +func (mr *MockEC2ClientAPIMockRecorder) DescribeSecurityGroupRules(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSecurityGroupRules", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeSecurityGroupRules), varargs...) +} + +// DescribeSecurityGroups mocks base method. +func (m *MockEC2ClientAPI) DescribeSecurityGroups(ctx context.Context, params *ec2.DescribeSecurityGroupsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeSecurityGroups", varargs...) + ret0, _ := ret[0].(*ec2.DescribeSecurityGroupsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSecurityGroups indicates an expected call of DescribeSecurityGroups. +func (mr *MockEC2ClientAPIMockRecorder) DescribeSecurityGroups(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSecurityGroups", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeSecurityGroups), varargs...) +} + +// DescribeSubnets mocks base method. +func (m *MockEC2ClientAPI) DescribeSubnets(ctx context.Context, params *ec2.DescribeSubnetsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeSubnetsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeSubnets", varargs...) + ret0, _ := ret[0].(*ec2.DescribeSubnetsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeSubnets indicates an expected call of DescribeSubnets. +func (mr *MockEC2ClientAPIMockRecorder) DescribeSubnets(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeSubnets", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeSubnets), varargs...) +} + +// DescribeVolumes mocks base method. +func (m *MockEC2ClientAPI) DescribeVolumes(ctx context.Context, params *ec2.DescribeVolumesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVolumesOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeVolumes", varargs...) + ret0, _ := ret[0].(*ec2.DescribeVolumesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeVolumes indicates an expected call of DescribeVolumes. +func (mr *MockEC2ClientAPIMockRecorder) DescribeVolumes(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeVolumes", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeVolumes), varargs...) +} + +// DescribeVpcAttribute mocks base method. +func (m *MockEC2ClientAPI) DescribeVpcAttribute(ctx context.Context, params *ec2.DescribeVpcAttributeInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcAttributeOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeVpcAttribute", varargs...) + ret0, _ := ret[0].(*ec2.DescribeVpcAttributeOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeVpcAttribute indicates an expected call of DescribeVpcAttribute. +func (mr *MockEC2ClientAPIMockRecorder) DescribeVpcAttribute(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeVpcAttribute", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeVpcAttribute), varargs...) +} + +// DescribeVpcEndpoints mocks base method. +func (m *MockEC2ClientAPI) DescribeVpcEndpoints(ctx context.Context, params *ec2.DescribeVpcEndpointsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcEndpointsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeVpcEndpoints", varargs...) + ret0, _ := ret[0].(*ec2.DescribeVpcEndpointsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeVpcEndpoints indicates an expected call of DescribeVpcEndpoints. +func (mr *MockEC2ClientAPIMockRecorder) DescribeVpcEndpoints(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeVpcEndpoints", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeVpcEndpoints), varargs...) +} + +// DescribeVpcs mocks base method. +func (m *MockEC2ClientAPI) DescribeVpcs(ctx context.Context, params *ec2.DescribeVpcsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVpcsOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DescribeVpcs", varargs...) + ret0, _ := ret[0].(*ec2.DescribeVpcsOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DescribeVpcs indicates an expected call of DescribeVpcs. +func (mr *MockEC2ClientAPIMockRecorder) DescribeVpcs(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeVpcs", reflect.TypeOf((*MockEC2ClientAPI)(nil).DescribeVpcs), varargs...) +} + +// DetachInternetGateway mocks base method. +func (m *MockEC2ClientAPI) DetachInternetGateway(ctx context.Context, params *ec2.DetachInternetGatewayInput, optFns ...func(*ec2.Options)) (*ec2.DetachInternetGatewayOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DetachInternetGateway", varargs...) + ret0, _ := ret[0].(*ec2.DetachInternetGatewayOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DetachInternetGateway indicates an expected call of DetachInternetGateway. +func (mr *MockEC2ClientAPIMockRecorder) DetachInternetGateway(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachInternetGateway", reflect.TypeOf((*MockEC2ClientAPI)(nil).DetachInternetGateway), varargs...) +} + +// DisassociateAddress mocks base method. +func (m *MockEC2ClientAPI) DisassociateAddress(ctx context.Context, params *ec2.DisassociateAddressInput, optFns ...func(*ec2.Options)) (*ec2.DisassociateAddressOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DisassociateAddress", varargs...) + ret0, _ := ret[0].(*ec2.DisassociateAddressOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DisassociateAddress indicates an expected call of DisassociateAddress. +func (mr *MockEC2ClientAPIMockRecorder) DisassociateAddress(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisassociateAddress", reflect.TypeOf((*MockEC2ClientAPI)(nil).DisassociateAddress), varargs...) +} + +// DisassociateRouteTable mocks base method. +func (m *MockEC2ClientAPI) DisassociateRouteTable(ctx context.Context, params *ec2.DisassociateRouteTableInput, optFns ...func(*ec2.Options)) (*ec2.DisassociateRouteTableOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DisassociateRouteTable", varargs...) + ret0, _ := ret[0].(*ec2.DisassociateRouteTableOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DisassociateRouteTable indicates an expected call of DisassociateRouteTable. +func (mr *MockEC2ClientAPIMockRecorder) DisassociateRouteTable(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DisassociateRouteTable", reflect.TypeOf((*MockEC2ClientAPI)(nil).DisassociateRouteTable), varargs...) +} + +// ModifyVpcAttribute mocks base method. +func (m *MockEC2ClientAPI) ModifyVpcAttribute(ctx context.Context, params *ec2.ModifyVpcAttributeInput, optFns ...func(*ec2.Options)) (*ec2.ModifyVpcAttributeOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ModifyVpcAttribute", varargs...) + ret0, _ := ret[0].(*ec2.ModifyVpcAttributeOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ModifyVpcAttribute indicates an expected call of ModifyVpcAttribute. +func (mr *MockEC2ClientAPIMockRecorder) ModifyVpcAttribute(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ModifyVpcAttribute", reflect.TypeOf((*MockEC2ClientAPI)(nil).ModifyVpcAttribute), varargs...) +} + +// ReleaseAddress mocks base method. +func (m *MockEC2ClientAPI) ReleaseAddress(ctx context.Context, params *ec2.ReleaseAddressInput, optFns ...func(*ec2.Options)) (*ec2.ReleaseAddressOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ReleaseAddress", varargs...) + ret0, _ := ret[0].(*ec2.ReleaseAddressOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReleaseAddress indicates an expected call of ReleaseAddress. +func (mr *MockEC2ClientAPIMockRecorder) ReleaseAddress(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseAddress", reflect.TypeOf((*MockEC2ClientAPI)(nil).ReleaseAddress), varargs...) +} + +// RevokeSecurityGroupEgress mocks base method. +func (m *MockEC2ClientAPI) RevokeSecurityGroupEgress(ctx context.Context, params *ec2.RevokeSecurityGroupEgressInput, optFns ...func(*ec2.Options)) (*ec2.RevokeSecurityGroupEgressOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "RevokeSecurityGroupEgress", varargs...) + ret0, _ := ret[0].(*ec2.RevokeSecurityGroupEgressOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RevokeSecurityGroupEgress indicates an expected call of RevokeSecurityGroupEgress. +func (mr *MockEC2ClientAPIMockRecorder) RevokeSecurityGroupEgress(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecurityGroupEgress", reflect.TypeOf((*MockEC2ClientAPI)(nil).RevokeSecurityGroupEgress), varargs...) +} + +// RevokeSecurityGroupIngress mocks base method. +func (m *MockEC2ClientAPI) RevokeSecurityGroupIngress(ctx context.Context, params *ec2.RevokeSecurityGroupIngressInput, optFns ...func(*ec2.Options)) (*ec2.RevokeSecurityGroupIngressOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "RevokeSecurityGroupIngress", varargs...) + ret0, _ := ret[0].(*ec2.RevokeSecurityGroupIngressOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RevokeSecurityGroupIngress indicates an expected call of RevokeSecurityGroupIngress. +func (mr *MockEC2ClientAPIMockRecorder) RevokeSecurityGroupIngress(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RevokeSecurityGroupIngress", reflect.TypeOf((*MockEC2ClientAPI)(nil).RevokeSecurityGroupIngress), varargs...) +} + +// RunInstances mocks base method. +func (m *MockEC2ClientAPI) RunInstances(ctx context.Context, params *ec2.RunInstancesInput, optFns ...func(*ec2.Options)) (*ec2.RunInstancesOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "RunInstances", varargs...) + ret0, _ := ret[0].(*ec2.RunInstancesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// RunInstances indicates an expected call of RunInstances. +func (mr *MockEC2ClientAPIMockRecorder) RunInstances(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunInstances", reflect.TypeOf((*MockEC2ClientAPI)(nil).RunInstances), varargs...) +} + +// TerminateInstances mocks base method. +func (m *MockEC2ClientAPI) TerminateInstances(ctx context.Context, params *ec2.TerminateInstancesInput, optFns ...func(*ec2.Options)) (*ec2.TerminateInstancesOutput, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, params} + for _, a := range optFns { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "TerminateInstances", varargs...) + ret0, _ := ret[0].(*ec2.TerminateInstancesOutput) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// TerminateInstances indicates an expected call of TerminateInstances. +func (mr *MockEC2ClientAPIMockRecorder) TerminateInstances(ctx, params any, optFns ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, params}, optFns...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TerminateInstances", reflect.TypeOf((*MockEC2ClientAPI)(nil).TerminateInstances), varargs...) +} diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/nat_gateway.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/nat_gateway.go index d1f7917107..7b19dc4d01 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/nat_gateway.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/nat_gateway.go @@ -20,10 +20,10 @@ func (client *AWSClient) CreateNatGateway(subnetID string, allocationID string, } respCreateNat, err := client.Ec2Client.CreateNatGateway(context.TODO(), inputCreateNat) if err != nil { - log.LogError("Create nat error " + err.Error()) + log.LogError("Create nat error %s", err.Error()) return nil, err } - log.LogInfo("Create nat success: " + *respCreateNat.NatGateway.NatGatewayId) + log.LogInfo("Create nat success: %s", *respCreateNat.NatGateway.NatGatewayId) err = client.WaitForResourceExisting(*respCreateNat.NatGateway.NatGatewayId, 10*60) return respCreateNat, err } @@ -36,7 +36,7 @@ func (client *AWSClient) DeleteNatGateway(natGatewayID string, timeout ...int) ( } respDeleteNatGateway, err := client.Ec2Client.DeleteNatGateway(context.TODO(), inputDeleteNatGateway) if err != nil { - log.LogError("Delete Nat Gateway error " + err.Error()) + log.LogError("Delete Nat Gateway error %s", err.Error()) return nil, err } timeoutTime := 60 @@ -47,11 +47,11 @@ func (client *AWSClient) DeleteNatGateway(natGatewayID string, timeout ...int) ( if err != nil { return respDeleteNatGateway, err } - log.LogInfo("Delete Nat Gateway success " + *respDeleteNatGateway.NatGatewayId) + log.LogInfo("Delete Nat Gateway success %s", *respDeleteNatGateway.NatGatewayId) return respDeleteNatGateway, err } -func (client *AWSClient) ListNatGateWays(vpcID string) ([]types.NatGateway, error) { +func (client *AWSClient) ListNatGateways(vpcID string) ([]types.NatGateway, error) { vpcFilter := "vpc-id" filter := []types.Filter{ types.Filter{ diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/network_acl.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/network_acl.go index 88485fcc46..5f7efcff06 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/network_acl.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/network_acl.go @@ -49,10 +49,10 @@ func (client *AWSClient) AddNetworkAclEntry(networkAclId string, egress bool, pr } resp, err := client.Ec2Client.CreateNetworkAclEntry(context.TODO(), input) if err != nil { - log.LogError("Create NetworkAcl rule failed " + err.Error()) + log.LogError("Create NetworkAcl rule failed %s", err.Error()) return nil, err } - log.LogInfo("Create NetworkAcl rule success " + networkAclId) + log.LogInfo("Create NetworkAcl rule success %s", networkAclId) return resp, err } @@ -64,10 +64,10 @@ func (client *AWSClient) DeleteNetworkAclEntry(networkAclId string, egress bool, } resp, err := client.Ec2Client.DeleteNetworkAclEntry(context.TODO(), input) if err != nil { - log.LogError("Delete NetworkAcl rule failed " + err.Error()) + log.LogError("Delete NetworkAcl rule failed %s", err.Error()) return nil, err } - log.LogInfo("Delete NetworkAcl rule success " + networkAclId) + log.LogInfo("Delete NetworkAcl rule success %s", networkAclId) return resp, err } diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/resource.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/resource.go index bcbe1821e2..5751b2ea1c 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/resource.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/resource.go @@ -7,6 +7,8 @@ import ( "time" "github.com/aws/aws-sdk-go-v2/service/ec2" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + awserrors "github.com/openshift-online/ocm-common/pkg/aws/errors" "github.com/openshift-online/ocm-common/pkg/log" ) @@ -25,7 +27,7 @@ func (client *AWSClient) ResourceExisting(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return false } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -41,7 +43,7 @@ func (client *AWSClient) ResourceExisting(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return false } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -57,7 +59,7 @@ func (client *AWSClient) ResourceExisting(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return false } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -75,7 +77,7 @@ func (client *AWSClient) ResourceExisting(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return false } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -93,7 +95,7 @@ func (client *AWSClient) ResourceExisting(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return false } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -111,7 +113,7 @@ func (client *AWSClient) ResourceExisting(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return false } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -129,7 +131,7 @@ func (client *AWSClient) ResourceExisting(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return false } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -144,19 +146,23 @@ func (client *AWSClient) ResourceExisting(resourceID string) bool { } output, err := client.Ec2Client.DescribeNatGateways(context.TODO(), input) if err != nil { - if strings.Contains(err.Error(), "NotFound") { + if awserrors.IsErrorCode(err, awserrors.InvalidNatGatewayID) { return false } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } if len(output.NatGateways) != 0 { - log.LogDebug("Current NAT gateway %s status %s ", resourceID, output.NatGateways[0].State) - status := string(output.NatGateways[0].State) - if status == "available" { + status := output.NatGateways[0].State + log.LogInfo("Current NAT gateway '%s' status: %s", resourceID, status) + if status == types.NatGatewayStateAvailable { return true } + if status == types.NatGatewayStateFailed { + log.LogError("NAT gateway %s entered failed state", resourceID) + return false + } } // role should use "role-" to pass @@ -187,7 +193,7 @@ func (client *AWSClient) ResourceDeleted(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return true } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -205,7 +211,7 @@ func (client *AWSClient) ResourceDeleted(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return true } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -223,7 +229,7 @@ func (client *AWSClient) ResourceDeleted(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return true } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -241,7 +247,7 @@ func (client *AWSClient) ResourceDeleted(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return true } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -259,7 +265,7 @@ func (client *AWSClient) ResourceDeleted(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return true } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -277,7 +283,7 @@ func (client *AWSClient) ResourceDeleted(resourceID string) bool { if strings.Contains(err.Error(), "NotFound") { return true } else { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return false } } @@ -292,13 +298,17 @@ func (client *AWSClient) ResourceDeleted(resourceID string) bool { } output, err := client.Ec2Client.DescribeNatGateways(context.TODO(), input) if err != nil { - log.LogError(err.Error()) - return false + if awserrors.IsErrorCode(err, awserrors.InvalidNatGatewayID) { + return true + } else { + log.LogError("%s", err.Error()) + return false + } } if len(output.NatGateways) != 0 { - log.LogDebug("Current NAT gateway %s status %s", resourceID, output.NatGateways[0].State) - status := string(output.NatGateways[0].State) - if status != "deleted" { + status := output.NatGateways[0].State + log.LogInfo("Current NAT gateway '%s' status: %s", resourceID, status) + if status != types.NatGatewayStateDeleted { deleted = false } diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/role.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/role.go index 82b84db75b..a62dd9ce32 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/role.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/role.go @@ -94,14 +94,18 @@ func (client *AWSClient) DeleteRoleAndPolicy(roleName string, managedPolicy bool return err } - fmt.Println(output.AttachedPolicies) for _, policy := range output.AttachedPolicies { - err = client.DetachIAMPolicy(roleName, *policy.PolicyArn) + policyArn := policy.PolicyArn + if policyArn == nil { + continue + } + log.LogInfo("Detaching and deleting policy with ARN '%s'", *policyArn) + err = client.DetachIAMPolicy(roleName, *policyArn) if err != nil { return err } if !managedPolicy { - err = client.DeletePolicy(*policy.PolicyArn) + err = client.DeletePolicy(*policyArn) if err != nil { return err } diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/route_table.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/route_table.go index 6842d656d2..fe997f9a36 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/route_table.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/route_table.go @@ -21,7 +21,7 @@ func (client *AWSClient) CreateRouteTable(vpcID string) (*ec2.CreateRouteTableOu respCreateRT, err := client.Ec2Client.CreateRouteTable(context.TODO(), inputCreateRouteTable) if err != nil { - log.LogError("Create route table failed " + err.Error()) + log.LogError("Create route table failed %s", err.Error()) return nil, err } err = client.WaitForResourceExisting(*respCreateRT.RouteTable.RouteTableId, 20) @@ -38,10 +38,10 @@ func (client *AWSClient) AssociateRouteTable(routeTableID string, subnetID strin respAssociateRouteTable, err := client.Ec2Client.AssociateRouteTable(context.TODO(), inputAssociateRouteTable) if err != nil { - log.LogError("Associate route table failed " + err.Error()) + log.LogError("Associate route table failed %s", err.Error()) return nil, err } - log.LogInfo("Associate route table success " + *respAssociateRouteTable.AssociationId) + log.LogInfo("Associate route table success %s", *respAssociateRouteTable.AssociationId) return respAssociateRouteTable, err } @@ -105,10 +105,10 @@ func (client *AWSClient) DisassociateRouteTableAssociation(associationID string) resp, err := client.Ec2Client.DisassociateRouteTable(context.TODO(), input) if err != nil { - log.LogError("Disassociate route table failed " + err.Error()) + log.LogError("Disassociate route table failed %s", err.Error()) return nil, err } - log.LogInfo("Disassociate route table success " + associationID) + log.LogInfo("Disassociate route table success %s", associationID) return resp, err } @@ -165,10 +165,10 @@ func (client *AWSClient) CreateRoute(routeTableID string, targetID string) (*typ _, err := client.Ec2Client.CreateRoute(context.TODO(), createRouteInput) if err != nil { - log.LogError("Create route failed " + err.Error()) + log.LogError("Create route failed %s", err.Error()) return nil, err } - log.LogInfo("Create route success for route table: " + routeTableID) + log.LogInfo("Create route success for route table: %s", routeTableID) return route, err } diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/security_group.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/security_group.go index dd9dd0115d..ce71bc52f9 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/security_group.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/security_group.go @@ -130,10 +130,10 @@ func (client *AWSClient) AuthorizeSecurityGroupIngress(groupID string, cidr stri resp, err := client.Ec2Client.AuthorizeSecurityGroupIngress(context.TODO(), input) if err != nil { - log.LogError("Authorize security group failed " + err.Error()) + log.LogError("Authorize security group failed %s", err.Error()) return nil, err } - log.LogInfo("Authorize security group success " + groupID) + log.LogInfo("Authorize security group success %s", groupID) return resp, err } @@ -148,7 +148,7 @@ func (client *AWSClient) CreateSecurityGroup(vpcID string, groupName string, sgD resp, err := client.Ec2Client.CreateSecurityGroup(context.TODO(), input) if err != nil { - log.LogError("Create security group failed " + err.Error()) + log.LogError("Create security group failed %s", err.Error()) return nil, err } log.LogInfo("Create security group %s success for %s", *resp.GroupId, vpcID) diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/subnet.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/subnet.go index f7e462a5b2..da5a01521d 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/subnet.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/subnet.go @@ -3,6 +3,8 @@ package aws_client import ( "context" "fmt" + "slices" + "time" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/ec2" @@ -10,6 +12,11 @@ import ( "github.com/openshift-online/ocm-common/pkg/log" ) +const ( + // ClientWaiterDelay is the standard polling interval for subnet availability waiter + ClientWaiterDelay = 2 * time.Second +) + func (client *AWSClient) CreateSubnet(vpcID string, zone string, subnetCidr string) (*types.Subnet, error) { if zone == "" { @@ -29,7 +36,7 @@ func (client *AWSClient) CreateSubnet(vpcID string, zone string, subnetCidr stri } respCreateSubnet, err := client.Ec2Client.CreateSubnet(context.TODO(), input) if err != nil { - log.LogError("create subnet error " + err.Error()) + log.LogError("create subnet error %s", err.Error()) return nil, err } log.LogInfo("Created subnet %s for vpc %s", *respCreateSubnet.Subnet.SubnetId, vpcID) @@ -104,8 +111,36 @@ func (client *AWSClient) ListSubnetsByFilter(filter []types.Filter) ([]types.Sub resp, err := client.Ec2Client.DescribeSubnets(context.TODO(), input) if err != nil { - return nil, fmt.Errorf("describe subnet by filter error " + err.Error()) + return nil, fmt.Errorf("describe subnet by filter error %s", err.Error()) } return resp.Subnets, err } + +// WaitForSubnetAccessibility validates subnets are accessible after RAM association. +// This addresses the AWS propagation delay between RAM reporting "ASSOCIATED" status +// and subnets being truly accessible in the target account. +func (client *AWSClient) WaitForSubnetAccessibility(subnetIDs []string, timeout int) error { + if len(subnetIDs) == 0 { + return nil + } + + uniqueSubnetIDs := []string{} + for _, id := range subnetIDs { + if !slices.Contains(uniqueSubnetIDs, id) { + uniqueSubnetIDs = append(uniqueSubnetIDs, id) + } + } + + now := time.Now() + for now.Add(time.Duration(timeout) * time.Second).After(time.Now()) { + subs, err := client.ListSubnetDetail(uniqueSubnetIDs...) + if err != nil { + log.LogError("failed to list subnet detail %s", err.Error()) + } else if len(subs) == len(uniqueSubnetIDs) { + return nil + } + time.Sleep(ClientWaiterDelay) + } + return fmt.Errorf("timeout after %d seconds waiting for subnets to be accessible: %v", timeout, uniqueSubnetIDs) +} diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/vpc.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/vpc.go index e84afd0e94..1096ca1ffc 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/vpc.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/aws_client/vpc.go @@ -58,10 +58,10 @@ func (client *AWSClient) CreateVpc(cidr string, name ...string) (*ec2.CreateVpcO resp, err := client.Ec2Client.CreateVpc(context.TODO(), input) if err != nil { - log.LogError("Create vpc error " + err.Error()) + log.LogError("Create vpc error %s", err.Error()) return nil, err } - log.LogInfo("Create vpc success " + *resp.Vpc.VpcId) + log.LogInfo("Create vpc success %s", *resp.Vpc.VpcId) err = client.WaitForResourceExisting(*resp.Vpc.VpcId, 10) if err != nil { return resp, err @@ -72,7 +72,7 @@ func (client *AWSClient) CreateVpc(cidr string, name ...string) (*ec2.CreateVpcO return resp, err } - log.LogInfo("Created vpc with ID " + *resp.Vpc.VpcId) + log.LogInfo("Created vpc with ID %s", *resp.Vpc.VpcId) return resp, err } @@ -95,7 +95,7 @@ func (client *AWSClient) ModifyVpcDnsAttribute(vpcID string, dnsAttribute string resp, err := client.Ec2Client.ModifyVpcAttribute(context.TODO(), inputModifyVpc) if err != nil { - log.LogError("Modify vpc dns attribute failed " + err.Error()) + log.LogError("Modify vpc dns attribute failed %s", err.Error()) return nil, err } log.LogInfo("Modify vpc dns attribute %s successfully for %s", dnsAttribute, vpcID) diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/aws/errors/errors.go b/vendor/github.com/openshift-online/ocm-common/pkg/aws/errors/errors.go index 388b813814..4df40a9005 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/aws/errors/errors.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/aws/errors/errors.go @@ -35,6 +35,7 @@ const ( InvalidAllocationID = "InvalidAllocationID.NotFound" InvalidGroup = "InvalidGroup.NotFound" InvalidSubnetID = "InvalidSubnetId.NotFound" + InvalidNatGatewayID = "InvalidNatGatewayID.NotFound" ) func IsErrorCode(err error, code string) bool { diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/deprecation/field_deprecation.go b/vendor/github.com/openshift-online/ocm-common/pkg/deprecation/field_deprecation.go index fab7927460..249d81cbef 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/deprecation/field_deprecation.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/deprecation/field_deprecation.go @@ -4,7 +4,9 @@ import ( "context" "encoding/json" "errors" + "fmt" "net/http" + "os" "time" "github.com/openshift-online/ocm-common/pkg/ocm/consts" @@ -19,9 +21,9 @@ type FieldDeprecations struct { messages map[string]map[string]string } -func (f *FieldDeprecations) Add(field, message string, sunsetDate time.Time) error { +func (f *FieldDeprecations) Add(field, message string, sunsetDate time.Time, failAfterSunsetDate bool) error { now := time.Now().UTC() - if now.After(sunsetDate) { + if now.After(sunsetDate) && failAfterSunsetDate { return errors.New(message) } @@ -79,7 +81,11 @@ func (w *FieldDeprecationResponseWriter) Write(data []byte) (int, error) { func (w *FieldDeprecationResponseWriter) setFieldDeprecationHeaders() { deprecatedFields := GetFieldDeprecations(w.Request.Context()) if !deprecatedFields.IsEmpty() { - deprecatedFieldsJSON, _ := deprecatedFields.ToJSON() + deprecatedFieldsJSON, err := deprecatedFields.ToJSON() + if err != nil { + fmt.Fprintf(os.Stderr, "Error setting field deprecation headers: %v\n", err) + return + } w.ResponseWriter.Header().Set(consts.OcmFieldDeprecation, string(deprecatedFieldsJSON)) } } diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/idp/validations/password_validator.go b/vendor/github.com/openshift-online/ocm-common/pkg/idp/validations/password_validator.go index 315e8f5728..ed45a5f28a 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/idp/validations/password_validator.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/idp/validations/password_validator.go @@ -29,7 +29,7 @@ func PasswordValidator(val interface{}) error { pwdErrors[len(pwdErrors)-1] = "and " + pwdErrors[len(pwdErrors)-1] } - return fmt.Errorf("Password " + strings.Join(pwdErrors, ", ")) + return fmt.Errorf("Password %s", strings.Join(pwdErrors, ", ")) } hasUppercase, _ := regexp.MatchString(`[A-Z]`, password) hasLowercase, _ := regexp.MatchString(`[a-z]`, password) diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/rosa/oidcconfigs/oidcconfigs.go b/vendor/github.com/openshift-online/ocm-common/pkg/rosa/oidcconfigs/oidcconfigs.go index 7d2ccc9cef..e51878841d 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/rosa/oidcconfigs/oidcconfigs.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/rosa/oidcconfigs/oidcconfigs.go @@ -22,7 +22,7 @@ import ( ) const ( - defaultLengthRandomLabel = 4 + defaultLengthRandomLabel = 8 prefixForPrivateKeySecret = "rosa-private-key" defaultPrefixForConfiguration = "oidc" @@ -85,15 +85,43 @@ const ( ) func IsValidBucketName(bucketName string) bool { + // AWS S3 bucket name length constraint: must be between 3 and 63 characters + if len(bucketName) < 3 || len(bucketName) > 63 { + return false + } if bucketName[0] == '.' || bucketName[len(bucketName)-1] == '.' { return false } + // Buckets cannot start with these prefixes: if strings.HasPrefix(bucketName, "xn--") { return false } + if strings.HasPrefix(bucketName, "sthree-") { + return false + } + if strings.HasPrefix(bucketName, "amzn-s3-demo-") { + return false + } + // This suffix is reserved for access point alias names if strings.HasSuffix(bucketName, "-s3alias") { return false } + // This suffix is reserved for Object Lambda Access Point alias names + if strings.HasSuffix(bucketName, "--ol-s3") { + return false + } + // This suffix is reserved for Multi-Region Access Point names + if strings.HasSuffix(bucketName, ".mrap") { + return false + } + // This suffix is reserved for directory buckets + if strings.HasSuffix(bucketName, "--x-s3") { + return false + } + // This suffix is reserved for S3 Tables buckets + if strings.HasSuffix(bucketName, "--table-s3") { + return false + } if match, _ := regexp.MatchString("\\.\\.", bucketName); match { return false } diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/test/kms_key/kms.go b/vendor/github.com/openshift-online/ocm-common/pkg/test/kms_key/kms.go index db5c30c533..1e119122d8 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/test/kms_key/kms.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/test/kms_key/kms.go @@ -46,7 +46,7 @@ func CreateOCMTestKMSKey(region string, multiRegion bool, testClient string) (st func ScheduleKeyDeletion(keyArn string, region string) error { client, err := aws_client.CreateAWSClient("", region) if err != nil { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return err } _, err = client.ScheduleKeyDeletion(keyArn, 7) diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/nat_gateway.go b/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/nat_gateway.go index c8879660ec..747db77033 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/nat_gateway.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/nat_gateway.go @@ -9,7 +9,7 @@ import ( func (vpc *VPC) DeleteVPCNatGateways(vpcID string) error { var delERR error - natGateways, err := vpc.AWSClient.ListNatGateWays(vpcID) + natGateways, err := vpc.AWSClient.ListNatGateways(vpcID) if err != nil { return err } diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/network_acl.go b/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/network_acl.go index 251a5bee4d..90d5d76c54 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/network_acl.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/network_acl.go @@ -13,7 +13,7 @@ func (vpc *VPC) AddNetworkACLRules(egress bool, protocol string, ruleAction stri return err } networkAclId := *acls[0].NetworkAclId - log.LogInfo("Find Network ACL" + networkAclId) + log.LogInfo("Find Network ACL %s", networkAclId) _, err = vpc.AWSClient.AddNetworkAclEntry(networkAclId, egress, protocol, ruleAction, ruleNumber, fromPort, toPort, cidrBlock) return err } @@ -24,7 +24,7 @@ func (vpc *VPC) DeleteNetworkACLRules(egress bool, ruleNumber int32) error { return err } networkAclId := *acls[0].NetworkAclId - log.LogInfo("Find Network ACL" + networkAclId) + log.LogInfo("Find Network ACL %s", networkAclId) _, err = vpc.AWSClient.DeleteNetworkAclEntry(networkAclId, egress, ruleNumber) return err diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/subnet.go b/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/subnet.go index d4f5ab7c07..84f4c1def5 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/subnet.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/subnet.go @@ -42,37 +42,43 @@ func (subnet *Subnet) IsNatgatwatEnabled() bool { return false } -// PrepareNatGatway will return a NAT gateway if existing no matter which zone set -// zone only work when create public subnet once no NAT gate way existing +// PrepareNatGateway will return a NAT gateway if existing no matter which zone set +// zone only work when create public subnet once no NAT gateway existing // Will implement zone supporting for nat gateway in future. But for now, there is no requirement -func (vpc *VPC) PrepareNatGatway(zone string) (types.NatGateway, error) { - var gateWay types.NatGateway - natGatways, err := vpc.AWSClient.ListNatGateWays(vpc.VpcID) +func (vpc *VPC) PrepareNatGateway(zone string) (types.NatGateway, error) { + var gateway types.NatGateway + natGateways, err := vpc.AWSClient.ListNatGateways(vpc.VpcID) if err != nil { - return gateWay, err + return gateway, err } - if len(natGatways) != 0 { - gateWay = natGatways[0] - log.LogInfo("Found existing nat gateway: %s", *gateWay.NatGatewayId) - err = vpc.AWSClient.WaitForResourceExisting(*gateWay.NatGatewayId, 10*60) + if len(natGateways) != 0 { + gateway = natGateways[0] + if gateway.NatGatewayId == nil { + return types.NatGateway{}, fmt.Errorf("gateway with nil id found on VPC '%s'", vpc.VpcID) + } + log.LogInfo("Found existing nat gateway: %s with state: %s", *gateway.NatGatewayId, gateway.State) + // Don't wait if it's already available + if gateway.State != types.NatGatewayStateAvailable { + err = vpc.AWSClient.WaitForResourceExisting(*gateway.NatGatewayId, 10*60) + } } else { allocation, err := vpc.AWSClient.AllocateEIPAddress() if err != nil { - return gateWay, fmt.Errorf("error happened when allocate EIP Address for NAT gateway: %s", err) + return gateway, fmt.Errorf("error happened when allocate EIP Address for NAT gateway: %s", err) } publicSubnet, err := vpc.PreparePublicSubnet(zone) if err != nil { - return gateWay, fmt.Errorf("error happened when prepare public subnet for NAT gateway: %s", err) + return gateway, fmt.Errorf("error happened when prepare public subnet for NAT gateway: %s", err) } - natGatway, err := vpc.AWSClient.CreateNatGateway(publicSubnet.ID, *allocation.AllocationId, vpc.VpcID) + natGateway, err := vpc.AWSClient.CreateNatGateway(publicSubnet.ID, *allocation.AllocationId, vpc.VpcID) if err != nil { - return gateWay, fmt.Errorf("error happened when prepare NAT gateway: %s", err) + return gateway, fmt.Errorf("error happened when prepare NAT gateway: %s", err) } - gateWay = *natGatway.NatGateway + gateway = *natGateway.NatGateway } - return gateWay, err + return gateway, err } func (vpc *VPC) PreparePublicSubnet(zone string) (*Subnet, error) { if vpc.SubnetList != nil { @@ -128,7 +134,7 @@ func (vpc *VPC) CreatePrivateSubnet(zone string, natEnabled bool) (*Subnet, erro subnet.RTable = respRouteTable.RouteTable if natEnabled { - natGateway, err := vpc.PrepareNatGatway(zone) + natGateway, err := vpc.PrepareNatGateway(zone) if err != nil { return nil, fmt.Errorf("prepare nat gateway for private cluster failed. %s", err.Error()) } @@ -215,12 +221,12 @@ func (vpc *VPC) CreatePublicSubnet(zone string) (*Subnet, error) { func (vpc *VPC) CreatePairSubnet(zone string) (*VPC, []*Subnet, error) { publicSubnet, err := vpc.CreatePublicSubnet(zone) if err != nil { - log.LogError("Create public subnet failed" + err.Error()) + log.LogError("Create public subnet failed %s", err.Error()) return vpc, nil, err } privateSubnet, err := vpc.CreatePrivateSubnet(zone, true) if err != nil { - log.LogError("Create private subnet failed" + err.Error()) + log.LogError("Create private subnet failed %s", err.Error()) return vpc, nil, err } return vpc, []*Subnet{publicSubnet, privateSubnet}, err @@ -314,7 +320,7 @@ func (vpc *VPC) CreateSubnet(zone string) (*Subnet, error) { subnetcidr := vpc.CIDRPool.Allocate().CIDR respCreateSubnet, err := vpc.AWSClient.CreateSubnet(vpc.VpcID, zone, subnetcidr) if err != nil { - log.LogError("create subnet error " + err.Error()) + log.LogError("create subnet error %s", err.Error()) return nil, err } err = vpc.AWSClient.WaitForResourceExisting(*respCreateSubnet.SubnetId, 4) @@ -324,7 +330,7 @@ func (vpc *VPC) CreateSubnet(zone string) (*Subnet, error) { return nil, err } - log.LogInfo("Created subnet with ID " + *respCreateSubnet.SubnetId) + log.LogInfo("Created subnet with ID %s", *respCreateSubnet.SubnetId) subnet := &Subnet{ ID: *respCreateSubnet.SubnetId, Private: true, @@ -390,7 +396,7 @@ func (vpc *VPC) ListSubnets() ([]*Subnet, error) { subnets := []*Subnet{} awsSubnets, err := vpc.AWSClient.ListSubnetByVpcID(vpc.VpcID) if err != nil { - log.LogError(err.Error()) + log.LogError("%s", err.Error()) return subnets, err } log.LogInfo("Got %d subnets", len(awsSubnets)) @@ -406,7 +412,7 @@ func (vpc *VPC) ListSubnets() ([]*Subnet, error) { SetRegion(vpc.Region) subnets = append(subnets, subnet) - log.LogInfo(*sub.SubnetId + "\t" + *sub.CidrBlock + "\t" + *sub.AvailabilityZone + "\t") + log.LogInfo("%s\t%s\t%s\t", *sub.SubnetId, *sub.CidrBlock, *sub.AvailabilityZone) } vpc.SubnetList = subnets diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/vpc.go b/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/vpc.go index 39504054f3..ae9b7c4987 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/vpc.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/test/vpc_client/vpc.go @@ -173,7 +173,7 @@ func PrepareVPC(vpcName string, region string, vpcCIDR string, checkExisting boo logMessage = fmt.Sprintf("Going to prepare a vpc with name %s, on region %s, with cidr %s ", vpcName, region, vpcCIDR) } - log.LogInfo(logMessage) + log.LogInfo("%s", logMessage) if awsSharedCredentialFile == "" { awsclient, err = aws_client.CreateAWSClient("", region) } else { diff --git a/vendor/github.com/openshift-online/ocm-common/pkg/utils/utils.go b/vendor/github.com/openshift-online/ocm-common/pkg/utils/utils.go index 1d10096f65..4d1bb87033 100644 --- a/vendor/github.com/openshift-online/ocm-common/pkg/utils/utils.go +++ b/vendor/github.com/openshift-online/ocm-common/pkg/utils/utils.go @@ -1,9 +1,10 @@ package utils import ( - "github.com/openshift-online/ocm-common/pkg/log" "math/rand" "time" + + "github.com/openshift-online/ocm-common/pkg/log" ) var r *rand.Rand @@ -70,6 +71,10 @@ func GeneratePassword(length int) string { return string(password) } +func GetBoolNotNil(f *bool) bool { + return f != nil && *f +} + func randInt(max int) int { return rand.Intn(max) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 780d04e44e..78fbf7af81 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -426,8 +426,8 @@ github.com/openshift-online/ocm-api-model/model/service_logs/v1 github.com/openshift-online/ocm-api-model/model/service_mgmt/v1 github.com/openshift-online/ocm-api-model/model/status_board/v1 github.com/openshift-online/ocm-api-model/model/web_rca/v1 -# github.com/openshift-online/ocm-common v0.0.32 -## explicit; go 1.21 +# github.com/openshift-online/ocm-common v0.0.38 +## explicit; go 1.24.7 github.com/openshift-online/ocm-common/pkg/aws/aws_client github.com/openshift-online/ocm-common/pkg/aws/consts github.com/openshift-online/ocm-common/pkg/aws/errors @@ -538,8 +538,8 @@ github.com/zgalor/weberr # gitlab.com/c0b/go-ordered-json v0.0.0-20201030195603-febf46534d5a ## explicit gitlab.com/c0b/go-ordered-json -# go.uber.org/mock v0.5.2 -## explicit; go 1.23 +# go.uber.org/mock v0.6.0 +## explicit; go 1.23.0 go.uber.org/mock/gomock # go.yaml.in/yaml/v2 v2.4.3 ## explicit; go 1.15