From 3aa287a0db33778bd3119feaa2203e0e558eb953 Mon Sep 17 00:00:00 2001 From: apattar Date: Thu, 29 Aug 2024 13:35:56 +0530 Subject: [PATCH] updating function name from validateForwardTo to validateNameServers --- infoblox/resource_infoblox_zone_delegated.go | 4 ++-- infoblox/resource_infoblox_zone_forward.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/infoblox/resource_infoblox_zone_delegated.go b/infoblox/resource_infoblox_zone_delegated.go index c6314fc79..983e0f8df 100644 --- a/infoblox/resource_infoblox_zone_delegated.go +++ b/infoblox/resource_infoblox_zone_delegated.go @@ -122,7 +122,7 @@ func resourceZoneDelegatedCreate(d *schema.ResourceData, m interface{}) error { if delegateToOk { dtSlice := dtInterface.(*schema.Set).List() var err error - delegateTo, err = validateForwardTo(dtSlice) + delegateTo, err = validateNameServers(dtSlice) if err != nil { return err } @@ -339,7 +339,7 @@ func resourceZoneDelegatedUpdate(d *schema.ResourceData, m interface{}) error { } else { dtSlice := dtInterface.(*schema.Set).List() var err error - delegateTo, err = validateForwardTo(dtSlice) + delegateTo, err = validateNameServers(dtSlice) if err != nil { return err } diff --git a/infoblox/resource_infoblox_zone_forward.go b/infoblox/resource_infoblox_zone_forward.go index 362c4bf61..64fd4150f 100644 --- a/infoblox/resource_infoblox_zone_forward.go +++ b/infoblox/resource_infoblox_zone_forward.go @@ -180,7 +180,7 @@ func resourceZoneForwardCreate(d *schema.ResourceData, m interface{}) error { return fmt.Errorf("forward_to is not a slice of Nameservers") } var err error - forwardTo, err = validateForwardTo(ftSlice) + forwardTo, err = validateNameServers(ftSlice) if err != nil { return err } @@ -258,7 +258,7 @@ func validateForwardingServers(fsSlice []interface{}) ([]*ibclient.Forwardingmem return forwardingServer, nil } -func validateForwardTo(ftSlice []interface{}) ([]ibclient.NameServer, error) { +func validateNameServers(ftSlice []interface{}) ([]ibclient.NameServer, error) { nsStr, err := json.Marshal(ftSlice) if err != nil { return nil, fmt.Errorf("failed to marshal nameservers: %s", err) @@ -438,7 +438,7 @@ func resourceZoneForwardUpdate(d *schema.ResourceData, m interface{}) error { return fmt.Errorf("forward_to is not a slice of Nameservers") } var err error - forwardTo, err = validateForwardTo(ftSlice) + forwardTo, err = validateNameServers(ftSlice) if err != nil { return err }