octodns-cloudns 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- octodns_cloudns/__init__.py +75 -61
- {octodns_cloudns-0.0.4.dist-info → octodns_cloudns-0.0.6.dist-info}/METADATA +9 -12
- octodns_cloudns-0.0.6.dist-info/RECORD +6 -0
- {octodns_cloudns-0.0.4.dist-info → octodns_cloudns-0.0.6.dist-info}/WHEEL +1 -1
- octodns_cloudns-0.0.4.dist-info/RECORD +0 -6
- {octodns_cloudns-0.0.4.dist-info → octodns_cloudns-0.0.6.dist-info}/LICENSE +0 -0
- {octodns_cloudns-0.0.4.dist-info → octodns_cloudns-0.0.6.dist-info}/top_level.txt +0 -0
octodns_cloudns/__init__.py
CHANGED
|
@@ -8,7 +8,7 @@ from octodns.record import Record
|
|
|
8
8
|
logging.basicConfig(level=logging.DEBUG)
|
|
9
9
|
logger = logging.getLogger(__name__)
|
|
10
10
|
|
|
11
|
-
__version__ = __VERSION__ = '0.0.
|
|
11
|
+
__version__ = __VERSION__ = '0.0.6'
|
|
12
12
|
|
|
13
13
|
class ClouDNSClientException(ProviderException):
|
|
14
14
|
pass
|
|
@@ -580,75 +580,89 @@ class ClouDNSProvider(BaseProvider):
|
|
|
580
580
|
zone = existing.zone
|
|
581
581
|
record_ids = []
|
|
582
582
|
for record_id, record in self.zone_records(zone).items():
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
583
|
+
if existing._type == 'NAPTR' and record['type'] == 'NAPTR':
|
|
584
|
+
for value in existing.values:
|
|
585
|
+
if (
|
|
586
|
+
existing.name == record['host']
|
|
587
|
+
and value.order == int(record['order'])
|
|
588
|
+
and value.preference == int(record['pref'])
|
|
589
|
+
and value.flags == record['flag']
|
|
590
|
+
):
|
|
591
|
+
record_ids.append(record_id)
|
|
592
592
|
elif existing._type == 'SSHFP' and record['type'] == 'SSHFP':
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
593
|
+
for value in existing.values:
|
|
594
|
+
if (
|
|
595
|
+
existing.name == record['host']
|
|
596
|
+
and value.fingerprint_type == int(record['fp_type'])
|
|
597
|
+
and value.algorithm == int(record['algorithm'])
|
|
598
|
+
and value.fingerprint == record['record']
|
|
599
|
+
):
|
|
600
|
+
record_ids.append(record_id)
|
|
600
601
|
elif existing._type == 'SRV' and record['type'] == 'SRV':
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
602
|
+
for value in existing.values:
|
|
603
|
+
if (
|
|
604
|
+
existing.name == record['host']
|
|
605
|
+
and value.priority == int(record['priority'])
|
|
606
|
+
and value.weight == int(record['weight'])
|
|
607
|
+
and value.port == record['port']
|
|
608
|
+
and value.target == record['record']
|
|
609
|
+
):
|
|
610
|
+
record_ids.append(record_id)
|
|
609
611
|
elif existing._type == 'CAA' and record['type'] == 'CAA':
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
612
|
+
for value in existing.values:
|
|
613
|
+
if (
|
|
614
|
+
existing.name == record['host']
|
|
615
|
+
and value.flags == record['caa_flag']
|
|
616
|
+
and value.tag == record['caa_type']
|
|
617
|
+
and value.value == record['caa_value']
|
|
618
|
+
):
|
|
619
|
+
record_ids.append(record_id)
|
|
617
620
|
elif existing._type == 'MX' and record['type'] == 'MX':
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
621
|
+
for value in existing.values:
|
|
622
|
+
if (
|
|
623
|
+
existing.name == record['host']
|
|
624
|
+
and value.preference == int(record['priority'])
|
|
625
|
+
and value.exchange == record['record']
|
|
626
|
+
):
|
|
627
|
+
record_ids.append(record_id)
|
|
624
628
|
|
|
625
629
|
elif existing._type == 'LOC' and record['type'] == 'LOC':
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
630
|
+
for value in existing.values:
|
|
631
|
+
if (
|
|
632
|
+
existing.name == record['host']
|
|
633
|
+
and value.lat_degrees == record['lat_deg']
|
|
634
|
+
and value.lat_minutes == record['lat_min']
|
|
635
|
+
and value.lat_seconds == record['lat_sec']
|
|
636
|
+
and value.lat_direction == record['lat_dir']
|
|
637
|
+
and value.long_degrees == record['long_deg']
|
|
638
|
+
and value.long_minutes == record['long_min']
|
|
639
|
+
and value.long_seconds == record['long_sec']
|
|
640
|
+
and value.long_direction == record['long_dir']
|
|
641
|
+
and value.altitude == record['altitude']
|
|
642
|
+
and value.size == record['size']
|
|
643
|
+
and value.precision_horz == record['h_precision']
|
|
644
|
+
and value.precision_vert == record['v_precision']
|
|
645
|
+
):
|
|
646
|
+
record_ids.append(record_id)
|
|
642
647
|
else:
|
|
643
648
|
if (record == 'Failed' or record == 'Missing domain-name'):
|
|
644
649
|
continue
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
650
|
+
|
|
651
|
+
if hasattr(existing, 'value'):
|
|
652
|
+
if (
|
|
653
|
+
existing.name == record['host']
|
|
654
|
+
and existing._type == record['type']
|
|
655
|
+
and existing.value == record['record']
|
|
656
|
+
):
|
|
657
|
+
record_ids.append(record_id)
|
|
658
|
+
elif hasattr(existing, 'values'):
|
|
659
|
+
for value in existing.values:
|
|
660
|
+
if (
|
|
661
|
+
existing.name == record['host']
|
|
662
|
+
and existing._type == record['type']
|
|
663
|
+
and value == record['record']
|
|
664
|
+
):
|
|
665
|
+
record_ids.append(record_id)
|
|
652
666
|
return record_ids
|
|
653
667
|
|
|
654
668
|
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: octodns-cloudns
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: ClouDNS API provider for octoDNS
|
|
5
5
|
Home-page: https://github.com/octodns/octodns-cloudns
|
|
6
6
|
Author: ClouDNS
|
|
7
7
|
Author-email: support@cloudns.net
|
|
8
8
|
License: MIT
|
|
9
|
-
Platform: UNKNOWN
|
|
10
9
|
Requires-Python: >=3.6
|
|
11
10
|
Description-Content-Type: text/markdown
|
|
12
11
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: octodns
|
|
14
|
-
Requires-Dist: requests
|
|
12
|
+
Requires-Dist: octodns >=0.9.17
|
|
13
|
+
Requires-Dist: requests >=2.27.0
|
|
15
14
|
Provides-Extra: dev
|
|
16
|
-
Requires-Dist: black (<24.0.0,>=23.1.0) ; extra == 'dev'
|
|
17
|
-
Requires-Dist: build (>=0.7.0) ; extra == 'dev'
|
|
18
|
-
Requires-Dist: isort (>=5.11.5) ; extra == 'dev'
|
|
19
|
-
Requires-Dist: pyflakes (>=2.2.0) ; extra == 'dev'
|
|
20
15
|
Requires-Dist: pytest ; extra == 'dev'
|
|
21
16
|
Requires-Dist: pytest-cov ; extra == 'dev'
|
|
22
17
|
Requires-Dist: pytest-network ; extra == 'dev'
|
|
23
|
-
Requires-Dist: readme-renderer[md] (>=26.0) ; extra == 'dev'
|
|
24
18
|
Requires-Dist: requests-mock ; extra == 'dev'
|
|
25
|
-
Requires-Dist:
|
|
19
|
+
Requires-Dist: black <24.0.0,>=23.1.0 ; extra == 'dev'
|
|
20
|
+
Requires-Dist: build >=0.7.0 ; extra == 'dev'
|
|
21
|
+
Requires-Dist: isort >=5.11.5 ; extra == 'dev'
|
|
22
|
+
Requires-Dist: pyflakes >=2.2.0 ; extra == 'dev'
|
|
23
|
+
Requires-Dist: readme-renderer[md] >=26.0 ; extra == 'dev'
|
|
24
|
+
Requires-Dist: twine >=3.4.2 ; extra == 'dev'
|
|
26
25
|
Provides-Extra: test
|
|
27
26
|
Requires-Dist: pytest ; extra == 'test'
|
|
28
27
|
Requires-Dist: pytest-cov ; extra == 'test'
|
|
@@ -80,5 +79,3 @@ ClouDNSProvider does not support dynamic records.
|
|
|
80
79
|
### Development
|
|
81
80
|
|
|
82
81
|
See the [/script/](/script/) directory for some tools to help with the development process. They generally follow the [Script to rule them all](https://github.com/github/scripts-to-rule-them-all) pattern. Most useful is `./script/bootstrap` which will create a venv and install both the runtime and development related requirements. It will also hook up a pre-commit hook that covers most of what's run by CI.
|
|
83
|
-
|
|
84
|
-
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
octodns_cloudns/__init__.py,sha256=4vzaiPoNtKaetNa-rs-UO4AXhs8kjefqas7ATrycX1o,27844
|
|
2
|
+
octodns_cloudns-0.0.6.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
3
|
+
octodns_cloudns-0.0.6.dist-info/METADATA,sha256=8uHLgLoWl69B0G-mPw5Uaw94xRxnhyYz-54og9YOaFc,2387
|
|
4
|
+
octodns_cloudns-0.0.6.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
5
|
+
octodns_cloudns-0.0.6.dist-info/top_level.txt,sha256=t-gGz4zcl1yUE6hyw-aaR6KggpKY25v5xwsSJw-zBdY,16
|
|
6
|
+
octodns_cloudns-0.0.6.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
octodns_cloudns/__init__.py,sha256=7fsXhtHmcANN5lB0T2XWDnSyvSxdNkSg3JYxtzCuFww,26917
|
|
2
|
-
octodns_cloudns-0.0.4.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
3
|
-
octodns_cloudns-0.0.4.dist-info/METADATA,sha256=WN04S6gwziUMdw50CeL-yEmnu2wNRfFQJDnVFa2TEhU,2423
|
|
4
|
-
octodns_cloudns-0.0.4.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
5
|
-
octodns_cloudns-0.0.4.dist-info/top_level.txt,sha256=t-gGz4zcl1yUE6hyw-aaR6KggpKY25v5xwsSJw-zBdY,16
|
|
6
|
-
octodns_cloudns-0.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|