Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions azure/services/natgateways/natgateways.go
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Comment thread
nojnhuh marked this conversation as resolved.
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 {
Expand Down