Skip to content

Commit

Permalink
Added return fields to zoneAuth object.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdas-infoblox committed Mar 11, 2024
1 parent f3cce51 commit a3bbb89
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions object_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,21 @@ var getRecordTypeMap = map[string]func(ref string) IBObject{
return NewEmptyDNSView()
},
ZoneAuthConst: func(ref string) IBObject {
return NewZoneAuth(ZoneAuth{})
zone := &ZoneAuth{}
zone.SetReturnFields(append(
zone.ReturnFields(),
"comment",
"ns_group",
"soa_default_ttl",
"soa_expire",
"soa_negative_ttl",
"soa_refresh",
"soa_retry",
"view",
"zone_format",
"extattrs",
))
return zone
},
NetworkViewConst: func(ref string) IBObject {
return NewEmptyNetworkView()
Expand Down Expand Up @@ -277,8 +291,9 @@ var getObjectWithSearchFieldsMap = map[string]func(recordType IBObject, objMgr *
if recordType.(*ZoneAuth).Ref != "" {
return res, nil
}
zoneAuth := recordType.(*ZoneAuth)
var zoneAuthList []*ZoneAuth
err := objMgr.connector.GetObject(NewZoneAuth(ZoneAuth{}), "", NewQueryParams(false, sf), &zoneAuthList)
err := objMgr.connector.GetObject(zoneAuth, "", NewQueryParams(false, sf), &zoneAuthList)
if err == nil && len(zoneAuthList) > 0 {
res = zoneAuthList[0]
}
Expand Down

0 comments on commit a3bbb89

Please sign in to comment.