Skip to content

Commit

Permalink
Allow updating gandi rrset ttl (#512)
Browse files Browse the repository at this point in the history
Previously, a rrset ttl could be set only when creating a new record,
whereas with this change, now a new ttl value can be specified.
  • Loading branch information
doddo committed Jun 13, 2020
1 parent 57a90f2 commit fabe729
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lexicon/providers/gandi.py
Expand Up @@ -98,6 +98,8 @@ def _create_record(self, rtype, name, content):
self.domain_id, self._relative_name(name), rtype)
if current_values:
record = {'rrset_values': current_values + [content]}
if self._get_lexicon_option('ttl'):
record['rrset_ttl'] = self._get_lexicon_option('ttl')
self._put(url, record)
else:
record = {'rrset_values': [content]}
Expand Down

0 comments on commit fabe729

Please sign in to comment.