Skip to content

Commit

Permalink
adding licensing and removing commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
skalpin committed Jun 4, 2024
1 parent 725c6dd commit 1e1da9c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internal/infoblox/infoblox.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,11 @@ func (p *Provider) Records(_ context.Context) (endpoints []*endpoint.Endpoint, e

for _, zone := range zones {
log.Debugf("fetch records from zone '%s'", zone.Fqdn)
// searchParams := recordQueryParams(zone.Fqdn, p.config.View)
searchParams := map[string]string{"zone": zone.Fqdn, "view": p.config.View}
var resA []ibclient.RecordA
objA := ibclient.NewEmptyRecordA()
objA.View = p.config.View
objA.Zone = zone.Fqdn
// err = p.client.GetObject(objA, "", searchParams, &resA)
err = PagingGetObject(p.client, objA, "", searchParams, &resA)
if err != nil && !isNotFoundError(err) {
return nil, fmt.Errorf("could not fetch A records from zone '%s': %w", zone.Fqdn, err)
Expand All @@ -214,7 +212,6 @@ func (p *Provider) Records(_ context.Context) (endpoints []*endpoint.Endpoint, e
objH := ibclient.NewEmptyHostRecord()
objH.View = &p.config.View
objH.Zone = zone.Fqdn
// err = p.client.GetObject(objH, "", searchParams, &resH)
err = PagingGetObject(p.client, objH, "", searchParams, &resH)
if err != nil && !isNotFoundError(err) {
return nil, fmt.Errorf("could not fetch host records from zone '%s': %w", zone.Fqdn, err)
Expand All @@ -226,7 +223,6 @@ func (p *Provider) Records(_ context.Context) (endpoints []*endpoint.Endpoint, e
objC := ibclient.NewEmptyRecordCNAME()
objC.View = &p.config.View
objC.Zone = zone.Fqdn
// err = p.client.GetObject(objC, "", searchParams, &resC)
err = PagingGetObject(p.client, objC, "", searchParams, &resC)
if err != nil && !isNotFoundError(err) {
return nil, fmt.Errorf("could not fetch CNAME records from zone '%s': %w", zone.Fqdn, err)
Expand All @@ -238,7 +234,6 @@ func (p *Provider) Records(_ context.Context) (endpoints []*endpoint.Endpoint, e
objT := ibclient.NewEmptyRecordTXT()
objT.View = &p.config.View
objT.Zone = zone.Fqdn
// err = p.client.GetObject(objT, "", searchParams, &resT)
err = PagingGetObject(p.client, objT, "", searchParams, &resT)
if err != nil && !isNotFoundError(err) {
return nil, fmt.Errorf("could not fetch TXT records from zone '%s': %w", zone.Fqdn, err)
Expand Down
18 changes: 18 additions & 0 deletions internal/infoblox/paging_ibclient.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
package infoblox

/*
Copyright 2024 The external-dns-infoblox-webhook Contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
*/

import (
"fmt"
"reflect"
Expand Down

0 comments on commit 1e1da9c

Please sign in to comment.