@@ -115,7 +115,8 @@ func (mrb *ExtendedRequestBuilder) BuildRequest(t ibclient.RequestType, obj ibcl
115115 }
116116
117117 // if we are not doing a ZoneAuth query, support the name filter
118- if ! zoneAuthQuery && mrb .nameRegEx != "" {
118+ _ , isPTR := obj .(* ibclient.RecordPTR )
119+ if ! isPTR && ! zoneAuthQuery && mrb .nameRegEx != "" {
119120 query .Set ("name~" , mrb .nameRegEx )
120121 }
121122
@@ -363,7 +364,7 @@ func (p *Provider) submitChanges(changes []*infobloxChange) error {
363364 }
364365
365366 changesByZone := p .ChangesByZone (zonePointerConverter (zones ), changes )
366- for _ , changes := range changesByZone {
367+ for zone , changes := range changesByZone {
367368 for _ , change := range changes {
368369 record , err := p .buildRecord (change )
369370 if err != nil {
@@ -374,6 +375,7 @@ func (p *Provider) submitChanges(changes []*infobloxChange) error {
374375 return err
375376 }
376377 logFields ["action" ] = change .Action
378+ logFields ["zone" ] = zone
377379 if p .config .DryRun {
378380 log .WithFields (logFields ).Info ("Dry run: skipping.." )
379381 continue
@@ -712,7 +714,7 @@ func (p *Provider) recordSet(ep *endpoint.Endpoint, getObject bool) (recordSet i
712714 obj .Ttl = & ttl
713715 obj .UseTtl = & ptrToBoolTrue
714716 if getObject {
715- queryParams := ibclient .NewQueryParams (false , map [string ]string {"name " : * obj .PtrdName })
717+ queryParams := ibclient .NewQueryParams (false , map [string ]string {"ptrdname " : * obj .PtrdName , "ipv4addr" : * obj . Ipv4Addr })
716718 err = p .client .GetObject (obj , "" , queryParams , & res )
717719 if err != nil && ! isNotFoundError (err ) {
718720 return
0 commit comments