Merge branch 'main' into get-zone

This commit is contained in:
Ross McFarland
2022-11-27 06:53:42 -08:00
committed by GitHub
61 changed files with 34 additions and 990 deletions
+7
View File
@@ -2,6 +2,13 @@
#### Noteworthy changes
* 1.x Deprecation removals
* Provider, Source, and Processor shims removed, they've been warnings for >
1yr. Everything should be using and referring to provider-specific
modules now.
* Provider.strict_supports defaults to true, can be returned to the old
behavior by setting strict_supports=False in your provider params.
#### Stuff
* Added simple IgnoreRootNsFilter
+1
View File
@@ -213,6 +213,7 @@ The table below lists the providers octoDNS supports. They are maintained in the
| [DNSimple](https://dnsimple.com/) | [octodns_dnsimple](https://github.com/octodns/octodns-dnsimple/) | |
| [Dyn](https://www.oracle.com/cloud/networking/dns/) ([deprecated](https://www.oracle.com/corporate/acquisitions/dyn/technologies/migrate-your-services/)) | [octodns_dyn](https://github.com/octodns/octodns-dyn/) | |
| [easyDNS](https://easydns.com/) | [octodns_easydns](https://github.com/octodns/octodns-easydns/) | |
| [EdgeCenter DNS](https://edgecenter.ru/dns/) | [octodns_gcore](https://github.com/octodns/octodns-gcore/) | |
| /etc/hosts | [octodns_etchosts](https://github.com/octodns/octodns-etchosts/) | |
| [Gandi](https://www.gandi.net/en-US/domain/dns) | [octodns_gandi](https://github.com/octodns/octodns-gandi/) | |
| [G-Core Labs DNS](https://gcorelabs.com/dns/) | [octodns_gcore](https://github.com/octodns/octodns-gcore/) | |
-2
View File
@@ -98,8 +98,6 @@ class Manager(object):
plan = p[1]
return len(plan.changes[0].record.zone.name) if plan.changes else 0
# TODO: all of this should get broken up, mainly so that it's not so huge
# and each bit can be cleanly tested independently
def __init__(self, config_file, max_workers=None, include_meta=False):
version = self._try_version('octodns', version=__VERSION__)
self.log.info(
-24
View File
@@ -1,24 +0,0 @@
#
# Ignores AWS ACM validation CNAME records.
#
from logging import getLogger
logger = getLogger('Route53')
try:
logger.warning(
'octodns_route53 shimmed. Update your processor class to '
'octodns_route53.processor.AwsAcmMangingProcessor. '
'Shim will be removed in 1.0'
)
from octodns_route53.processor import AwsAcmMangingProcessor
AwsAcmMangingProcessor # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'AwsAcmMangingProcessor has been moved into a separate '
'module, octodns_route53 is now required. Processor '
'class should be updated to '
'octodns_route53.processor.AwsAcmMangingProcessor'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Azure')
try:
logger.warning(
'octodns_azure shimmed. Update your provider class to '
'octodns_azure.AzureProvider. '
'Shim will be removed in 1.0'
)
from octodns_azure import AzureProvider
AzureProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'AzureProvider has been moved into a separate module, '
'octodns_azure is now required. Provider class should '
'be updated to octodns_azure.AzureProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
+1 -1
View File
@@ -15,7 +15,7 @@ class BaseProvider(BaseSource):
apply_disabled=False,
update_pcent_threshold=Plan.MAX_SAFE_UPDATE_PCENT,
delete_pcent_threshold=Plan.MAX_SAFE_DELETE_PCENT,
strict_supports=False,
strict_supports=True,
):
super().__init__(id)
self.log.debug(
-26
View File
@@ -1,26 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Cloudflare')
try:
logger.warning(
'octodns_cloudflare shimmed. Update your provider class to '
'octodns_cloudflare.CloudflareProvider. '
'Shim will be removed in 1.0'
)
from octodns_cloudflare import CloudflareProvider
CloudflareProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'CloudflareProvider has been moved into a separate '
'module, octodns_cloudflare is now required. Provider '
'class should be updated to '
'octodns_cloudflare.CloudflareProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-26
View File
@@ -1,26 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Constellix')
try:
logger.warning(
'octodns_constellix shimmed. Update your provider class to '
'octodns_constellix.ConstellixProvider. '
'Shim will be removed in 1.0'
)
from octodns_constellix import ConstellixProvider
ConstellixProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'ConstellixProvider has been moved into a separate '
'module, octodns_constellix is now required. Provider '
'class should be updated to '
'octodns_constellix.ConstellixProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-26
View File
@@ -1,26 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('DigitalOcean')
try:
logger.warning(
'octodns_digitalocean shimmed. Update your provider class '
'to octodns_digitalocean.DigitalOceanProvider. Shim will '
'be removed in 1.0'
)
from octodns_digitalocean import DigitalOceanProvider
DigitalOceanProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'DigitalOceanProvider has been moved into a separate '
'module, octodns_digitalocean is now required. Provider '
'class should be updated to '
'octodns_digitalocean.DigitalOceanProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Dnsimple')
try:
logger.warning(
'octodns_dnsimple shimmed. Update your provider class to '
'octodns_dnsimple.DnsimpleProvider. '
'Shim will be removed in 1.0'
)
from octodns_dnsimple import DnsimpleProvider
DnsimpleProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'DnsimpleProvider has been moved into a separate module, '
'octodns_dnsimple is now required. Provider class should '
'be updated to octodns_dnsimple.DnsimpleProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-26
View File
@@ -1,26 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('DnsMadeEasy')
try:
logger.warning(
'octodns_dnsmadeeasy shimmed. Update your provider class '
'to octodns_dnsmadeeasy.DnsMadeEasyProvider. '
'Shim will be removed in 1.0'
)
from octodns_dnsmadeeasy import DnsMadeEasyProvider
DnsMadeEasyProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'DnsMadeEasyProvider has been moved into a separate '
'module, octodns_dnsmadeeasy is now required. Provider '
'class should be updated to '
'octodns_dnsmadeeasy.DnsMadeEasyProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Dyn')
try:
logger.warning(
'octodns_dyn shimmed. Update your provider class to '
'octodns_dyn.DynProvider. '
'Shim will be removed in 1.0'
)
from octodns_dyn import DynProvider
DynProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'DynProvider has been moved into a separate module, '
'octodns_dyn is now required. Provider class should '
'be updated to octodns_dyn.DynProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-26
View File
@@ -1,26 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('EasyDns')
try:
logger.warning(
'octodns_easydns shimmed. Update your provider class to '
'octodns_easydns.EasyDnsProvider. '
'Shim will be removed in 1.0'
)
from octodns_easydns import EasyDnsProvider, EasyDNSProvider
EasyDnsProvider # pragma: no cover
EasyDNSProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'EasyDNSProvider has been moved into a separate module, '
'octodns_easydns is now required. Provider class should '
'be updated to octodns_easydns.EasyDnsProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Akamai')
try:
logger.warning(
'octodns_edgedns shimmed. Update your provider class to '
'octodns_edgedns.AkamaiProvider. '
'Shim will be removed in 1.0'
)
from octodns_edgedns import AkamaiProvider
AkamaiProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'AkamaiProvider has been moved into a separate module, '
'octodns_edgedns is now required. Provider class should '
'be updated to octodns_edgedns.AkamaiProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('EtcHosts')
try:
logger.warning(
'octodns_etchosts shimmed. Update your provider class to '
'octodns_etchosts.EtcHostsProvider. '
'Shim will be removed in 1.0'
)
from octodns_etchosts import EtcHostsProvider
EtcHostsProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'EtcHostsProvider has been moved into a separate module, '
'octodns_etchosts is now required. Provider class should '
'be updated to octodns_etchosts.EtcHostsProvider. See '
'See https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-14
View File
@@ -1,14 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Akamai')
logger.warning(
'AkamaiProvider has been moved into a separate module, '
'octodns_edgedns is now required. Provider class should '
'be updated to octodns_edgedns.AkamaiProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Gandi')
try:
logger.warning(
'octodns_gandi shimmed. Update your provider class to '
'octodns_gandi.GandiProvider. '
'Shim will be removed in 1.0'
)
from octodns_gandi import GandiProvider
GandiProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'GandiProvider has been moved into a separate module, '
'octodns_gandi is now required. Provider class should '
'be updated to octodns_gandi.GandiProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('GCore')
try:
logger.warning(
'octodns_gcore shimmed. Update your provider class to '
'octodns_gcore.GCoreProvider. '
'Shim will be removed in 1.0'
)
from octodns_gcore import GCoreProvider
GCoreProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'GCoreProvider has been moved into a separate module, '
'octodns_gcore is now required. Provider class should '
'be updated to octodns_gcore.GCoreProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-26
View File
@@ -1,26 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('GoogleCloud')
try:
logger.warning(
'octodns_googlecloud shimmed. Update your provider class '
'to octodns_googlecloud.GoogleCloudProvider. '
'Shim will be removed in 1.0'
)
from octodns_googlecloud import GoogleCloudProvider
GoogleCloudProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'GoogleCloudProvider has been moved into a separate '
'module, octodns_googlecloud is now required. Provider '
'class should be updated to '
'octodns_googlecloud.GoogleCloudProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Hetzner')
try:
logger.warning(
'octodns_hetzner shimmed. Update your provider class to '
'octodns_hetzner.HetznerProvider. '
'Shim will be removed in 1.0'
)
from octodns_hetzner import HetznerProvider
HetznerProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'HetznerProvider has been moved into a separate module, '
'octodns_hetzner is now required. Provider class should '
'be updated to octodns_hetzner.HetznerProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-26
View File
@@ -1,26 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('MythicBeasts')
try:
logger.warning(
'octodns_mythicbeasts shimmed. Update your provider class '
'to octodns_mythicbeasts.MythicBeastsProvider. '
'Shim will be removed in 1.0'
)
from octodns_mythicbeasts import MythicBeastsProvider
MythicBeastsProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'MythicBeastsProvider has been moved into a separate '
'module, octodns_mythicbeasts is now required. Provider '
'class should be updated to '
'octodns_mythicbeasts.MythicBeastsProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Ns1')
try:
logger.warning(
'octodns_ns1 shimmed. Update your provider class to '
'octodns_ns1.Ns1Provider. '
'Shim will be removed in 1.0'
)
from octodns_ns1 import Ns1Provider
Ns1Provider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'Ns1Provider has been moved into a separate module, '
'octodns_ns1 is now required. Provider class should '
'be updated to octodns_ns1.Ns1Provider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Ovh')
try:
logger.warning(
'octodns_ovh shimmed. Update your provider class to '
'octodns_ovh.OvhProvider. '
'Shim will be removed in 1.0'
)
from octodns_ovh import OvhProvider
OvhProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'OvhProvider has been moved into a separate module, '
'octodns_ovh is now required. Provider class should '
'be updated to octodns_ovh.OvhProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-26
View File
@@ -1,26 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('PowerDns')
try:
logger.warning(
'octodns_powerdns shimmed. Update your provider class to '
'octodns_powerdns.PowerDnsProvider. '
'Shim will be removed in 1.0'
)
from octodns_powerdns import PowerDnsProvider, PowerDnsBaseProvider
PowerDnsProvider # pragma: no cover
PowerDnsBaseProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'PowerDnsProvider has been moved into a separate module, '
'octodns_powerdns is now required. Provider class should '
'be updated to octodns_powerdns.PowerDnsProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-26
View File
@@ -1,26 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Rackspace')
try:
logger.warning(
'octodns_rackspace shimmed. Update your provider class to '
'octodns_rackspace.RackspaceProvider. '
'Shim will be removed in 1.0'
)
from octodns_rackspace import RackspaceProvider
RackspaceProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'RackspaceProvider has been moved into a separate '
'module, octodns_rackspace is now required. Provider '
'class should be updated to '
'octodns_rackspace.RackspaceProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Route53')
try:
logger.warning(
'octodns_route53 shimmed. Update your provider class to '
'octodns_route53.Route53Provider. '
'Shim will be removed in 1.0'
)
from octodns_route53 import Route53Provider
Route53Provider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'Route53Provider has been moved into a separate module, '
'octodns_route53 is now required. Provider class should '
'be updated to octodns_route53.Route53Provider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Selectel')
try:
logger.warning(
'octodns_selectel shimmed. Update your provider class to '
'octodns_selectel.SelectelProvider. '
'Shim will be removed in 1.0'
)
from octodns_selectel import SelectelProvider
SelectelProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'SelectelProvider has been moved into a separate module, '
'octodns_selectel is now required. Provider class should '
'be updated to octodns_selectel.SelectelProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Transip')
try:
logger.warning(
'octodns_transip shimmed. Update your provider class to '
'octodns_transip.TransipProvider. '
'Shim will be removed in 1.0'
)
from octodns_transip import TransipProvider
TransipProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'TransipProvider has been moved into a separate module, '
'octodns_transip is now required. Provider class should '
'be updated to octodns_transip.TransipProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-25
View File
@@ -1,25 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('Ultra')
try:
logger.warning(
'octodns_ultra shimmed. Update your provider class to '
'octodns_ultra.UltraProvider. '
'Shim will be removed in 1.0'
)
from octodns_ultra import UltraProvider
UltraProvider # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'UltraProvider has been moved into a separate module, '
'octodns_ultra is now required. Provider class should '
'be updated to octodns_ultra.UltraProvider. See '
'https://github.com/octodns/octodns#updating-'
'to-use-extracted-providers for more information.'
)
raise
-20
View File
@@ -1,20 +0,0 @@
#
#
#
from logging import getLogger
logger = getLogger('AXFR')
try:
logger.warning(
'octodns_bind shimmed. Update your provider class to octodns_bind.AxfrSource or octodns_bind.ZoneFileSource. Shim will be removed in 1.0'
)
from octodns_bind import AxfrSource, ZoneFileSource
AxfrSource # pragma: no cover
ZoneFileSource # pragma: no cover
except ModuleNotFoundError:
logger.exception(
'AXFR/Zone file support has been moved into a separate module, octodns_bind is now required. Provider classes should be updated to octodns_bind.AxfrSource or octodns_bind.ZoneFileSource. See https://github.com/octodns/octodns#updating-to-use-extracted-providers for more information.'
)
raise
+2
View File
@@ -2,10 +2,12 @@ providers:
in:
class: octodns.provider.yaml.YamlProvider
directory: tests/config
strict_supports: False
dump:
class: octodns.provider.yaml.YamlProvider
directory: env/YAML_TMP_DIR
supports_root_ns: False
strict_supports: False
zones:
unit.tests.:
always-dry-run: true
+2
View File
@@ -7,10 +7,12 @@ providers:
# This helps us get coverage when printing out provider versions
class: helpers.TestYamlProvider
directory: tests/config
strict_supports: False
dump:
class: octodns.provider.yaml.YamlProvider
directory: env/YAML_TMP_DIR
supports_root_ns: False
strict_supports: False
geo:
class: helpers.GeoProvider
nosshfp:
+2
View File
@@ -4,10 +4,12 @@ providers:
in:
class: octodns.provider.yaml.YamlProvider
directory: tests/config
strict_supports: False
dump:
class: octodns.provider.yaml.YamlProvider
directory: env/YAML_TMP_DIR
supports_root_ns: False
strict_supports: False
zones:
unit.tests.:
sources:
+3
View File
@@ -5,17 +5,20 @@ providers:
class: octodns.provider.yaml.YamlProvider
directory: tests/config
supports_root_ns: False
strict_supports: False
dump:
class: octodns.provider.yaml.YamlProvider
directory: env/YAML_TMP_DIR
default_ttl: 999
supports_root_ns: False
strict_supports: False
# This is sort of ugly, but it shouldn't hurt anything. It'll just write out
# the target file twice where it and dump are both used
dump2:
class: octodns.provider.yaml.YamlProvider
directory: env/YAML_TMP_DIR2
supports_root_ns: False
strict_supports: False
simple:
class: helpers.SimpleProvider
geo:
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestAwsAcmMangingProcessor(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.processor.awsacm import AwsAcmMangingProcessor
AwsAcmMangingProcessor
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestAzureShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.azuredns import AzureProvider
AzureProvider
+4
View File
@@ -715,6 +715,7 @@ class TestBaseProviderSupportsRootNs(TestCase):
def test_supports_root_ns_false_matches(self):
# provider has a matching existing root record
provider = self.Provider(self.has_root)
provider.strict_supports = False
provider.SUPPORTS_ROOT_NS = False
# matching root NS in the desired
@@ -737,6 +738,7 @@ class TestBaseProviderSupportsRootNs(TestCase):
def test_supports_root_ns_false_different(self):
# provider has a non-matching existing record
provider = self.Provider(self.different_root)
provider.strict_supports = False
provider.SUPPORTS_ROOT_NS = False
# different root is in the desired
@@ -760,6 +762,7 @@ class TestBaseProviderSupportsRootNs(TestCase):
def test_supports_root_ns_false_missing(self):
# provider has an existing record
provider = self.Provider(self.has_root)
provider.strict_supports = False
provider.SUPPORTS_ROOT_NS = False
# desired doesn't have a root
@@ -778,6 +781,7 @@ class TestBaseProviderSupportsRootNs(TestCase):
def test_supports_root_ns_false_create_zone(self):
# provider has no existing records (create)
provider = self.Provider()
provider.strict_supports = False
provider.SUPPORTS_ROOT_NS = False
# case where we have a root NS in the desired
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestCloudflareShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.cloudflare import CloudflareProvider
CloudflareProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestConstellixShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.constellix import ConstellixProvider
ConstellixProvider
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestDigitalOceanShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.digitalocean import DigitalOceanProvider
DigitalOceanProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestDnsimpleShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.dnsimple import DnsimpleProvider
DnsimpleProvider
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestDnsMadeEasyShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.dnsmadeeasy import DnsMadeEasyProvider
DnsMadeEasyProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestDynShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.dyn import DynProvider
DynProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestEasyDnsShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.easydns import EasyDnsProvider
EasyDnsProvider
-19
View File
@@ -1,19 +0,0 @@
#
#
#
from unittest import TestCase
# Just for coverage
import octodns.provider.fastdns
# Quell warnings
octodns.provider.fastdns
class TestAkamaiShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.edgedns import AkamaiProvider
AkamaiProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestEtcHostsShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.etc_hosts import EtcHostsProvider
EtcHostsProvider
-19
View File
@@ -1,19 +0,0 @@
#
#
#
from unittest import TestCase
# Just for coverage
import octodns.provider.fastdns
# Quell warnings
octodns.provider.fastdns
class TestGandiShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.gandi import GandiProvider
GandiProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestGCoreShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.gcore import GCoreProvider
GCoreProvider
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestGoogleCloudShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.googlecloud import GoogleCloudProvider
GoogleCloudProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestHetznerShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.hetzner import HetznerProvider
HetznerProvider
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestMythicBeastsShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.mythicbeasts import MythicBeastsProvider
MythicBeastsProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestNs1Provider(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.ns1 import Ns1Provider
Ns1Provider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestOvhShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.ovh import OvhProvider
OvhProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestPowerDnsShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.powerdns import PowerDnsProvider
PowerDnsProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestRackspaceShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.rackspace import RackspaceProvider
RackspaceProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestRoute53Provider(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.route53 import Route53Provider
Route53Provider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestSelectelShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.selectel import SelectelProvider
SelectelProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestTransipShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.transip import TransipProvider
TransipProvider
-13
View File
@@ -1,13 +0,0 @@
#
#
#
from unittest import TestCase
class TestUltraShim(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.provider.ultra import UltraProvider
UltraProvider
+12 -3
View File
@@ -54,7 +54,9 @@ class TestYamlProvider(TestCase):
directory = join(td.dirname, 'sub', 'dir')
yaml_file = join(directory, 'unit.tests.yaml')
dynamic_yaml_file = join(directory, 'dynamic.tests.yaml')
target = YamlProvider('test', directory, supports_root_ns=False)
target = YamlProvider(
'test', directory, supports_root_ns=False, strict_supports=False
)
# We add everything
plan = target.plan(zone)
@@ -343,7 +345,10 @@ class TestSplitYamlProvider(TestCase):
def test_provider(self):
source = SplitYamlProvider(
'test', join(dirname(__file__), 'config/split'), extension='.tst'
'test',
join(dirname(__file__), 'config/split'),
extension='.tst',
strict_supports=False,
)
zone = Zone('unit.tests.', [])
@@ -366,7 +371,11 @@ class TestSplitYamlProvider(TestCase):
zone_dir = join(directory, 'unit.tests.tst')
dynamic_zone_dir = join(directory, 'dynamic.tests.tst')
target = SplitYamlProvider(
'test', directory, extension='.tst', supports_root_ns=False
'test',
directory,
extension='.tst',
supports_root_ns=False,
strict_supports=False,
)
# We add everything
-18
View File
@@ -1,18 +0,0 @@
#
#
#
from unittest import TestCase
class TestAxfrSource(TestCase):
def test_missing(self):
with self.assertRaises(ModuleNotFoundError):
from octodns.source.axfr import AxfrSource
AxfrSource
with self.assertRaises(ModuleNotFoundError):
from octodns.source.axfr import ZoneFileSource
ZoneFileSource