@@ -32,6 +32,7 @@ import (
3232 "github.com/aws/aws-sdk-go-v2/service/ec2"
3333 ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
3434 elb "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
35+ elbtypes "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing/types"
3536 elbv2 "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2"
3637 "github.com/aws/aws-sdk-go-v2/service/kms"
3738 "k8s.io/klog/v2"
@@ -521,108 +522,114 @@ type FakeELB struct {
521522
522523// CreateLoadBalancer is not implemented but is required for interface
523524// conformance
524- func (elb * FakeELB ) CreateLoadBalancer (ctx context.Context , input * elb.CreateLoadBalancerInput , opts ... func (* elb.Options )) (* elb.CreateLoadBalancerOutput , error ) {
525+ func (e * FakeELB ) CreateLoadBalancer (ctx context.Context , input * elb.CreateLoadBalancerInput , opts ... func (* elb.Options )) (* elb.CreateLoadBalancerOutput , error ) {
525526 panic ("Not implemented" )
526527}
527528
528529// DeleteLoadBalancer is not implemented but is required for interface
529530// conformance
530- func (elb * FakeELB ) DeleteLoadBalancer (ctx context.Context , input * elb.DeleteLoadBalancerInput , opts ... func (* elb.Options )) (* elb.DeleteLoadBalancerOutput , error ) {
531+ func (e * FakeELB ) DeleteLoadBalancer (ctx context.Context , input * elb.DeleteLoadBalancerInput , opts ... func (* elb.Options )) (* elb.DeleteLoadBalancerOutput , error ) {
531532 panic ("Not implemented" )
532533}
533534
534535// DescribeLoadBalancers is not implemented but is required for interface
535536// conformance
536- func (elb * FakeELB ) DescribeLoadBalancers (ctx context.Context , input * elb.DescribeLoadBalancersInput , opts ... func (* elb.Options )) (* elb.DescribeLoadBalancersOutput , error ) {
537+ func (e * FakeELB ) DescribeLoadBalancers (ctx context.Context , input * elb.DescribeLoadBalancersInput , opts ... func (* elb.Options )) (* elb.DescribeLoadBalancersOutput , error ) {
537538 panic ("Not implemented" )
538539}
539540
540541// AddTags is not implemented but is required for interface conformance
541- func (elb * FakeELB ) AddTags (ctx context.Context , input * elb.AddTagsInput , opts ... func (* elb.Options )) (* elb.AddTagsOutput , error ) {
542+ func (e * FakeELB ) AddTags (ctx context.Context , input * elb.AddTagsInput , opts ... func (* elb.Options )) (* elb.AddTagsOutput , error ) {
542543 panic ("Not implemented" )
543544}
544545
545546// RegisterInstancesWithLoadBalancer is not implemented but is required for
546547// interface conformance
547- func (elb * FakeELB ) RegisterInstancesWithLoadBalancer (ctx context.Context , input * elb.RegisterInstancesWithLoadBalancerInput , opts ... func (* elb.Options )) (* elb.RegisterInstancesWithLoadBalancerOutput , error ) {
548+ func (e * FakeELB ) RegisterInstancesWithLoadBalancer (ctx context.Context , input * elb.RegisterInstancesWithLoadBalancerInput , opts ... func (* elb.Options )) (* elb.RegisterInstancesWithLoadBalancerOutput , error ) {
548549 panic ("Not implemented" )
549550}
550551
551552// DeregisterInstancesFromLoadBalancer is not implemented but is required for
552553// interface conformance
553- func (elb * FakeELB ) DeregisterInstancesFromLoadBalancer (ctx context.Context , input * elb.DeregisterInstancesFromLoadBalancerInput , opts ... func (* elb.Options )) (* elb.DeregisterInstancesFromLoadBalancerOutput , error ) {
554+ func (e * FakeELB ) DeregisterInstancesFromLoadBalancer (ctx context.Context , input * elb.DeregisterInstancesFromLoadBalancerInput , opts ... func (* elb.Options )) (* elb.DeregisterInstancesFromLoadBalancerOutput , error ) {
554555 panic ("Not implemented" )
555556}
556557
557558// DetachLoadBalancerFromSubnets is not implemented but is required for
558559// interface conformance
559- func (elb * FakeELB ) DetachLoadBalancerFromSubnets (ctx context.Context , input * elb.DetachLoadBalancerFromSubnetsInput , opts ... func (* elb.Options )) (* elb.DetachLoadBalancerFromSubnetsOutput , error ) {
560+ func (e * FakeELB ) DetachLoadBalancerFromSubnets (ctx context.Context , input * elb.DetachLoadBalancerFromSubnetsInput , opts ... func (* elb.Options )) (* elb.DetachLoadBalancerFromSubnetsOutput , error ) {
560561 panic ("Not implemented" )
561562}
562563
563564// AttachLoadBalancerToSubnets is not implemented but is required for interface
564565// conformance
565- func (elb * FakeELB ) AttachLoadBalancerToSubnets (ctx context.Context , input * elb.AttachLoadBalancerToSubnetsInput , opts ... func (* elb.Options )) (* elb.AttachLoadBalancerToSubnetsOutput , error ) {
566+ func (e * FakeELB ) AttachLoadBalancerToSubnets (ctx context.Context , input * elb.AttachLoadBalancerToSubnetsInput , opts ... func (* elb.Options )) (* elb.AttachLoadBalancerToSubnetsOutput , error ) {
566567 panic ("Not implemented" )
567568}
568569
569570// CreateLoadBalancerListeners is not implemented but is required for interface
570571// conformance
571- func (elb * FakeELB ) CreateLoadBalancerListeners (ctx context.Context , input * elb.CreateLoadBalancerListenersInput , opts ... func (* elb.Options )) (* elb.CreateLoadBalancerListenersOutput , error ) {
572+ func (e * FakeELB ) CreateLoadBalancerListeners (ctx context.Context , input * elb.CreateLoadBalancerListenersInput , opts ... func (* elb.Options )) (* elb.CreateLoadBalancerListenersOutput , error ) {
572573 panic ("Not implemented" )
573574}
574575
575576// DeleteLoadBalancerListeners is not implemented but is required for interface
576577// conformance
577- func (elb * FakeELB ) DeleteLoadBalancerListeners (ctx context.Context , input * elb.DeleteLoadBalancerListenersInput , opts ... func (* elb.Options )) (* elb.DeleteLoadBalancerListenersOutput , error ) {
578+ func (e * FakeELB ) DeleteLoadBalancerListeners (ctx context.Context , input * elb.DeleteLoadBalancerListenersInput , opts ... func (* elb.Options )) (* elb.DeleteLoadBalancerListenersOutput , error ) {
578579 panic ("Not implemented" )
579580}
580581
581582// ApplySecurityGroupsToLoadBalancer is not implemented but is required for
582583// interface conformance
583- func (elb * FakeELB ) ApplySecurityGroupsToLoadBalancer (ctx context.Context , input * elb.ApplySecurityGroupsToLoadBalancerInput , opts ... func (* elb.Options )) (* elb.ApplySecurityGroupsToLoadBalancerOutput , error ) {
584+ func (e * FakeELB ) ApplySecurityGroupsToLoadBalancer (ctx context.Context , input * elb.ApplySecurityGroupsToLoadBalancerInput , opts ... func (* elb.Options )) (* elb.ApplySecurityGroupsToLoadBalancerOutput , error ) {
584585 panic ("Not implemented" )
585586}
586587
587588// ConfigureHealthCheck is not implemented but is required for interface
588589// conformance
589- func (elb * FakeELB ) ConfigureHealthCheck (ctx context.Context , input * elb.ConfigureHealthCheckInput , opts ... func (* elb.Options )) (* elb.ConfigureHealthCheckOutput , error ) {
590+ func (e * FakeELB ) ConfigureHealthCheck (ctx context.Context , input * elb.ConfigureHealthCheckInput , opts ... func (* elb.Options )) (* elb.ConfigureHealthCheckOutput , error ) {
590591 panic ("Not implemented" )
591592}
592593
593594// CreateLoadBalancerPolicy is not implemented but is required for interface
594595// conformance
595- func (elb * FakeELB ) CreateLoadBalancerPolicy (ctx context.Context , input * elb.CreateLoadBalancerPolicyInput , opts ... func (* elb.Options )) (* elb.CreateLoadBalancerPolicyOutput , error ) {
596- panic ( "Not implemented" )
596+ func (e * FakeELB ) CreateLoadBalancerPolicy (ctx context.Context , input * elb.CreateLoadBalancerPolicyInput , opts ... func (* elb.Options )) (* elb.CreateLoadBalancerPolicyOutput , error ) {
597+ return & elb. CreateLoadBalancerPolicyOutput {}, nil
597598}
598599
599600// SetLoadBalancerPoliciesForBackendServer is not implemented but is required
600601// for interface conformance
601- func (elb * FakeELB ) SetLoadBalancerPoliciesForBackendServer (ctx context.Context , input * elb.SetLoadBalancerPoliciesForBackendServerInput , opts ... func (* elb.Options )) (* elb.SetLoadBalancerPoliciesForBackendServerOutput , error ) {
602+ func (e * FakeELB ) SetLoadBalancerPoliciesForBackendServer (ctx context.Context , input * elb.SetLoadBalancerPoliciesForBackendServerInput , opts ... func (* elb.Options )) (* elb.SetLoadBalancerPoliciesForBackendServerOutput , error ) {
602603 panic ("Not implemented" )
603604}
604605
605606// SetLoadBalancerPoliciesOfListener is not implemented but is required for
606607// interface conformance
607- func (elb * FakeELB ) SetLoadBalancerPoliciesOfListener (ctx context.Context , input * elb.SetLoadBalancerPoliciesOfListenerInput , opts ... func (* elb.Options )) (* elb.SetLoadBalancerPoliciesOfListenerOutput , error ) {
608+ func (e * FakeELB ) SetLoadBalancerPoliciesOfListener (ctx context.Context , input * elb.SetLoadBalancerPoliciesOfListenerInput , opts ... func (* elb.Options )) (* elb.SetLoadBalancerPoliciesOfListenerOutput , error ) {
608609 panic ("Not implemented" )
609610}
610611
611612// DescribeLoadBalancerPolicies is not implemented but is required for
612613// interface conformance
613- func (elb * FakeELB ) DescribeLoadBalancerPolicies (ctx context.Context , input * elb.DescribeLoadBalancerPoliciesInput , opts ... func (* elb.Options )) (* elb.DescribeLoadBalancerPoliciesOutput , error ) {
614- panic ("Not implemented" )
614+ func (e * FakeELB ) DescribeLoadBalancerPolicies (ctx context.Context , input * elb.DescribeLoadBalancerPoliciesInput , opts ... func (* elb.Options )) (* elb.DescribeLoadBalancerPoliciesOutput , error ) {
615+ if aws .ToString (input .LoadBalancerName ) == "" {
616+ return nil , & elbtypes.LoadBalancerAttributeNotFoundException {}
617+ }
618+ if len (input .PolicyNames ) == 0 || input .PolicyNames [0 ] == "k8s-SSLNegotiationPolicy-" {
619+ return nil , & elbtypes.PolicyNotFoundException {}
620+ }
621+ return & elb.DescribeLoadBalancerPoliciesOutput {}, nil
615622}
616623
617624// DescribeLoadBalancerAttributes is not implemented but is required for
618625// interface conformance
619- func (elb * FakeELB ) DescribeLoadBalancerAttributes (ctx context.Context , input * elb.DescribeLoadBalancerAttributesInput , opts ... func (* elb.Options )) (* elb.DescribeLoadBalancerAttributesOutput , error ) {
626+ func (e * FakeELB ) DescribeLoadBalancerAttributes (ctx context.Context , input * elb.DescribeLoadBalancerAttributesInput , opts ... func (* elb.Options )) (* elb.DescribeLoadBalancerAttributesOutput , error ) {
620627 panic ("Not implemented" )
621628}
622629
623630// ModifyLoadBalancerAttributes is not implemented but is required for
624631// interface conformance
625- func (elb * FakeELB ) ModifyLoadBalancerAttributes (ctx context.Context , input * elb.ModifyLoadBalancerAttributesInput , opts ... func (* elb.Options )) (* elb.ModifyLoadBalancerAttributesOutput , error ) {
632+ func (e * FakeELB ) ModifyLoadBalancerAttributes (ctx context.Context , input * elb.ModifyLoadBalancerAttributesInput , opts ... func (* elb.Options )) (* elb.ModifyLoadBalancerAttributesOutput , error ) {
626633 panic ("Not implemented" )
627634}
628635
0 commit comments