Browse Source

Apply suggestions from code review

Co-authored-by: Ross McFarland <ross@github.com>
pull/669/head
Robert Reichel 5 years ago
committed by GitHub
parent
commit
a58371e3bb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      octodns/provider/azuredns.py

+ 4
- 4
octodns/provider/azuredns.py View File

@ -336,24 +336,24 @@ class AzureProvider(BaseProvider):
self._dns_client_key = key self._dns_client_key = key
self._dns_client_directory_id = directory_id self._dns_client_directory_id = directory_id
self._dns_client_subscription_id = sub_id self._dns_client_subscription_id = sub_id
self._dns_client = None
self.__dns_client = None
self._resource_group = resource_group self._resource_group = resource_group
self._azure_zones = set() self._azure_zones = set()
@property @property
def _dns_client(self): def _dns_client(self):
if self._dns_client is None:
if self.__dns_client is None:
credentials = ServicePrincipalCredentials( credentials = ServicePrincipalCredentials(
self._dns_client_client_id, self._dns_client_client_id,
secret=self._dns_client_key, secret=self._dns_client_key,
tenant=self._dns_client_directory_id tenant=self._dns_client_directory_id
) )
self._dns_client = DnsManagementClient(
self.__dns_client = DnsManagementClient(
credentials, credentials,
self._dns_client_subscription_id self._dns_client_subscription_id
) )
return self._dns_client
return self.__dns_client
def _populate_zones(self): def _populate_zones(self):
self.log.debug('azure_zones: loading') self.log.debug('azure_zones: loading')


Loading…
Cancel
Save