Browse Source
Implment Templating processor and prototype Value.template methods
pull/1259/head
Ross McFarland
6 months ago
No known key found for this signature in database
GPG Key ID: 943B179E15D3B22A
2 changed files with
10 additions and
0 deletions
-
octodns/record/chunked.py
-
octodns/record/target.py
|
|
|
@ -80,3 +80,8 @@ class _ChunkedValue(str): |
|
|
|
@property |
|
|
|
def rdata_text(self): |
|
|
|
return self |
|
|
|
|
|
|
|
def template(self, params): |
|
|
|
if '{' not in self: |
|
|
|
return self |
|
|
|
return self.__class__(self.format(**params)) |
|
|
|
@ -41,6 +41,11 @@ class _TargetValue(str): |
|
|
|
def rdata_text(self): |
|
|
|
return self |
|
|
|
|
|
|
|
def template(self, params): |
|
|
|
if '{' not in self: |
|
|
|
return self |
|
|
|
return self.__class__(self.format(**params)) |
|
|
|
|
|
|
|
|
|
|
|
# |
|
|
|
# much like _TargetValue, but geared towards multiple values |
|
|
|
|