OVH: Refresh zone after deleting challenge record (#815)

After removing the challenge record from OVH, the zone itself
does not get refreshed and leaving the obsolete record in place.

Calling '/domain/zone/ZONE/refresh' after deleting the record will
apply the changes to the zone.
This commit is contained in:
Jens Sauer 2019-03-04 19:17:53 +01:00 committed by Ludovic Fernandez
parent 1c309c9c80
commit 67b329e3e3

View file

@ -173,6 +173,13 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
return fmt.Errorf("ovh: error when call OVH api to delete challenge record (%s): %v", reqURL, err)
}
// Apply the change
reqURL = fmt.Sprintf("/domain/zone/%s/refresh", authZone)
err = d.client.Post(reqURL, nil, nil)
if err != nil {
return fmt.Errorf("ovh: error when call api to refresh zone (%s): %v", reqURL, err)
}
// Delete record ID from map
d.recordIDsMu.Lock()
delete(d.recordIDs, fqdn)