mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Merge branch 'master' into sdist-tests
This commit is contained in:
@ -7,6 +7,7 @@ from __future__ import absolute_import, division, print_function, \
|
|||||||
unicode_literals
|
unicode_literals
|
||||||
|
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
import sys
|
||||||
|
|
||||||
from octodns.cmds.args import ArgumentParser
|
from octodns.cmds.args import ArgumentParser
|
||||||
from octodns.manager import Manager
|
from octodns.manager import Manager
|
||||||
@ -23,13 +24,25 @@ def main():
|
|||||||
help='Second source(s) to pull data from')
|
help='Second source(s) to pull data from')
|
||||||
parser.add_argument('--zone', default=None, required=True,
|
parser.add_argument('--zone', default=None, required=True,
|
||||||
help='Zone to compare')
|
help='Zone to compare')
|
||||||
|
parser.add_argument('--ignore-prefix', default=None, required=False,
|
||||||
|
help='Record prefix to ignore from list of changes')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
manager = Manager(args.config_file)
|
manager = Manager(args.config_file)
|
||||||
changes = manager.compare(args.a, args.b, args.zone)
|
changes = manager.compare(args.a, args.b, args.zone)
|
||||||
|
|
||||||
|
# Filter changes list based on ignore-prefix argument if present
|
||||||
|
if args.ignore_prefix:
|
||||||
|
pattern = args.ignore_prefix
|
||||||
|
changes = [c for c in changes
|
||||||
|
if not c.record.fqdn.startswith(pattern)]
|
||||||
|
|
||||||
pprint(changes)
|
pprint(changes)
|
||||||
|
|
||||||
|
# Exit with non-zero exit code if changes exist
|
||||||
|
if len(changes):
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
PyYaml==5.3.1
|
PyYaml==5.3.1
|
||||||
azure-common==1.1.25
|
azure-common==1.1.25
|
||||||
azure-mgmt-dns==3.0.0
|
azure-mgmt-dns==3.0.0
|
||||||
boto3==1.14.14
|
boto3==1.14.52
|
||||||
botocore==1.17.14
|
botocore==1.17.52
|
||||||
dnspython==1.16.0
|
dnspython==1.16.0
|
||||||
docutils==0.16
|
docutils==0.16
|
||||||
dyn==1.8.1
|
dyn==1.8.1
|
||||||
edgegrid-python==1.1.1
|
edgegrid-python==1.1.1
|
||||||
futures==3.2.0; python_version < '3.2'
|
futures==3.2.0; python_version < '3.2'
|
||||||
google-cloud-core==1.3.0
|
google-cloud-core==1.4.1
|
||||||
google-cloud-dns==0.32.0
|
google-cloud-dns==0.32.0
|
||||||
ipaddress==1.0.23; python_version < '3.3'
|
ipaddress==1.0.23; python_version < '3.3'
|
||||||
jmespath==0.10.0
|
jmespath==0.10.0
|
||||||
@ -17,7 +17,7 @@ natsort==6.2.1
|
|||||||
ns1-python==0.16.0
|
ns1-python==0.16.0
|
||||||
ovh==0.5.0
|
ovh==0.5.0
|
||||||
pycountry-convert==0.7.2
|
pycountry-convert==0.7.2
|
||||||
pycountry==19.8.18
|
pycountry==20.7.3
|
||||||
python-dateutil==2.8.1
|
python-dateutil==2.8.1
|
||||||
requests==2.24.0
|
requests==2.24.0
|
||||||
s3transfer==0.3.3
|
s3transfer==0.3.3
|
||||||
|
Reference in New Issue
Block a user