From c4abb7c22928f5f9ae8374783153575d7190460d Mon Sep 17 00:00:00 2001 From: Nawaz Hussain Khazielakha Date: Wed, 1 Nov 2023 21:17:07 -0700 Subject: [PATCH] drop natgateway service struct since it is redundant --- azure/services/natgateways/natgateways.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/azure/services/natgateways/natgateways.go b/azure/services/natgateways/natgateways.go index f5237750a43..c5fdc86d8e5 100644 --- a/azure/services/natgateways/natgateways.go +++ b/azure/services/natgateways/natgateways.go @@ -35,22 +35,13 @@ type NatGatewayScope interface { NatGatewaySpecs() []azure.ASOResourceSpecGetter[*asonetworkv1.NatGateway] } -// Service provides operations on azure resources. -type Service struct { - Scope NatGatewayScope - *aso.Service[*asonetworkv1.NatGateway, NatGatewayScope] -} - // New creates a new service. -func New(scope NatGatewayScope) *Service { +func New(scope NatGatewayScope) *aso.Service[*asonetworkv1.NatGateway, NatGatewayScope] { svc := aso.NewService[*asonetworkv1.NatGateway, NatGatewayScope](serviceName, scope) svc.Specs = scope.NatGatewaySpecs() svc.ConditionType = infrav1.NATGatewaysReadyCondition svc.PostCreateOrUpdateResourceHook = postCreateOrUpdateResourceHook - return &Service{ - Scope: scope, - Service: svc, - } + return svc } func postCreateOrUpdateResourceHook(_ context.Context, scope NatGatewayScope, result *asonetworkv1.NatGateway, err error) error {