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.
@@ -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.4'
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
- for value in existing.values:
584
- if existing._type == 'NAPTR' and record['type'] == 'NAPTR':
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)
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
- if (
594
- existing.name == record['host']
595
- and value.fingerprint_type == int(record['fp_type'])
596
- and value.algorithm == int(record['algorithm'])
597
- and value.fingerprint == record['record']
598
- ):
599
- record_ids.append(record_id)
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
- if (
602
- existing.name == record['host']
603
- and value.priority == int(record['priority'])
604
- and value.weight == int(record['weight'])
605
- and value.port == record['port']
606
- and value.target == record['record']
607
- ):
608
- record_ids.append(record_id)
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
- if (
611
- existing.name == record['host']
612
- and value.flags == record['caa_flag']
613
- and value.tag == record['caa_type']
614
- and value.value == record['caa_value']
615
- ):
616
- record_ids.append(record_id)
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
- if (
619
- existing.name == record['host']
620
- and value.preference == int(record['priority'])
621
- and value.exchange == record['record']
622
- ):
623
- record_ids.append(record_id)
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
- if (
627
- existing.name == record['host']
628
- and value.lat_degrees == record['lat_deg']
629
- and value.lat_minutes == record['lat_min']
630
- and value.lat_seconds == record['lat_sec']
631
- and value.lat_direction == record['lat_dir']
632
- and value.long_degrees == record['long_deg']
633
- and value.long_minutes == record['long_min']
634
- and value.long_seconds == record['long_sec']
635
- and value.long_direction == record['long_dir']
636
- and value.altitude == record['altitude']
637
- and value.size == record['size']
638
- and value.precision_horz == record['h_precision']
639
- and value.precision_vert == record['v_precision']
640
- ):
641
- record_ids.append(record_id)
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
- if (
646
- existing.name == record['host']
647
- and existing._type == record['type']
648
- and value == record['record']
649
- ):
650
- print(record['record'])
651
- record_ids.append(record_id)
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.4
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 (>=0.9.17)
14
- Requires-Dist: requests (>=2.27.0)
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: twine (>=3.4.2) ; extra == 'dev'
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,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.37.1)
2
+ Generator: setuptools (75.3.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -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,,