|
|
@ -151,6 +151,7 @@ class Record(EqualityTupleMixin): |
|
|
# force everything lower-case just to be safe |
|
|
# force everything lower-case just to be safe |
|
|
self.name = text_type(name).lower() if name else name |
|
|
self.name = text_type(name).lower() if name else name |
|
|
self.source = source |
|
|
self.source = source |
|
|
|
|
|
self._raw_data = data |
|
|
self.ttl = int(data['ttl']) |
|
|
self.ttl = int(data['ttl']) |
|
|
|
|
|
|
|
|
self._octodns = data.get('octodns', {}) |
|
|
self._octodns = data.get('octodns', {}) |
|
|
@ -219,6 +220,14 @@ class Record(EqualityTupleMixin): |
|
|
if self.ttl != other.ttl: |
|
|
if self.ttl != other.ttl: |
|
|
return Update(self, other) |
|
|
return Update(self, other) |
|
|
|
|
|
|
|
|
|
|
|
def copy(self, zone=None): |
|
|
|
|
|
return Record( |
|
|
|
|
|
zone if zone else self.zone, |
|
|
|
|
|
self.name, |
|
|
|
|
|
self._raw_data, |
|
|
|
|
|
self.source |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
# NOTE: we're using __hash__ and ordering methods that consider Records |
|
|
# NOTE: we're using __hash__ and ordering methods that consider Records |
|
|
# equivalent if they have the same name & _type. Values are ignored. This |
|
|
# equivalent if they have the same name & _type. Values are ignored. This |
|
|
# is useful when computing diffs/changes. |
|
|
# is useful when computing diffs/changes. |
|
|
|