1
0
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:
Ross McFarland
2020-09-14 15:10:08 -07:00
committed by GitHub
2 changed files with 18 additions and 5 deletions

View File

@ -7,6 +7,7 @@ from __future__ import absolute_import, division, print_function, \
unicode_literals
from pprint import pprint
import sys
from octodns.cmds.args import ArgumentParser
from octodns.manager import Manager
@ -23,13 +24,25 @@ def main():
help='Second source(s) to pull data from')
parser.add_argument('--zone', default=None, required=True,
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()
manager = Manager(args.config_file)
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)
# Exit with non-zero exit code if changes exist
if len(changes):
sys.exit(1)
if __name__ == '__main__':
main()

View File

@ -1,14 +1,14 @@
PyYaml==5.3.1
azure-common==1.1.25
azure-mgmt-dns==3.0.0
boto3==1.14.14
botocore==1.17.14
boto3==1.14.52
botocore==1.17.52
dnspython==1.16.0
docutils==0.16
dyn==1.8.1
edgegrid-python==1.1.1
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
ipaddress==1.0.23; python_version < '3.3'
jmespath==0.10.0
@ -17,7 +17,7 @@ natsort==6.2.1
ns1-python==0.16.0
ovh==0.5.0
pycountry-convert==0.7.2
pycountry==19.8.18
pycountry==20.7.3
python-dateutil==2.8.1
requests==2.24.0
s3transfer==0.3.3