Skip to content

Commit 6be6b6a

Browse files
authored
chore: complete google-cloud-dns migration (#16678)
- Reformat with nox - Enable generation with librarian - Regenerate with librarian
1 parent f0b5d3a commit 6be6b6a

13 files changed

Lines changed: 26 additions & 29 deletions

File tree

librarian.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1881,7 +1881,6 @@ libraries:
18811881
- name: google-cloud-dns
18821882
version: 0.36.1
18831883
description_override: provides methods that you can use to manage DNS for your applications.
1884-
skip_generate: true
18851884
python:
18861885
library_type: REST
18871886
name_pretty_override: Cloud DNS
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
{
2-
"name": "dns",
3-
"name_pretty": "Cloud DNS",
4-
"product_documentation": "https://cloud.google.com/dns",
2+
"api_shortname": "dns",
53
"client_documentation": "https://cloud.google.com/python/docs/reference/dns/latest",
4+
"distribution_name": "google-cloud-dns",
65
"issue_tracker": "https://issuetracker.google.com/savedsearches/559772",
7-
"release_level": "preview",
86
"language": "python",
97
"library_type": "REST",
10-
"repo": "googleapis/google-cloud-python",
11-
"distribution_name": "google-cloud-dns",
12-
"requires_billing": true,
13-
"default_version": "",
14-
"codeowner_team": "",
15-
"api_shortname": "dns",
16-
"api_description": "provides methods that you can use to manage DNS for your applications."
17-
}
8+
"name": "dns",
9+
"name_pretty": "Cloud DNS",
10+
"product_documentation": "https://cloud.google.com/dns",
11+
"release_level": "preview",
12+
"repo": "googleapis/google-cloud-python"
13+
}

packages/google-cloud-dns/docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
# All configuration values have a default; values that are commented out
2525
# serve to show the default.
2626

27-
import sys
2827
import os
2928
import shlex
29+
import sys
3030

3131
# If extensions (or modules to document with autodoc) are in another directory,
3232
# add these directories to sys.path here. If the directory is relative to the

packages/google-cloud-dns/google/cloud/dns/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@
2424
(adding/deleting resource record sets) to a zone.
2525
"""
2626

27-
from google.cloud.dns.version import __version__
28-
from google.cloud.dns.zone import Changes
27+
from google.cloud.dns import version
28+
29+
__version__ = version.__version__
30+
2931
from google.cloud.dns.client import Client
30-
from google.cloud.dns.zone import ManagedZone
3132
from google.cloud.dns.resource_record_set import ResourceRecordSet
32-
33+
from google.cloud.dns.zone import Changes, ManagedZone
3334

3435
SCOPE = Client.SCOPE
3536

packages/google-cloud-dns/google/cloud/dns/_http.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"""Create / interact with Google Cloud DNS connections."""
1616

1717
from google.cloud import _http
18-
1918
from google.cloud.dns import __version__
2019

2120

packages/google-cloud-dns/google/cloud/dns/changes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
from google.cloud._helpers import _rfc3339_to_datetime
1818
from google.cloud.exceptions import NotFound
19+
1920
from google.cloud.dns.resource_record_set import ResourceRecordSet
2021

2122

packages/google-cloud-dns/google/cloud/dns/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
"""Client for interacting with the Google Cloud DNS API."""
1616

17-
from google.api_core import page_iterator
1817
from google.api_core import client_options as client_options_mod
18+
from google.api_core import page_iterator
1919
from google.cloud.client import ClientWithProject
2020

2121
from google.cloud.dns._http import Connection

packages/google-cloud-dns/google/cloud/dns/zone.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from google.api_core import page_iterator
1818
from google.cloud._helpers import _rfc3339_to_datetime
1919
from google.cloud.exceptions import NotFound
20+
2021
from google.cloud.dns.changes import Changes
2122
from google.cloud.dns.resource_record_set import ResourceRecordSet
2223

packages/google-cloud-dns/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import setuptools
2020

21-
2221
# Package metadata.
2322

2423
name = "google-cloud-dns"

packages/google-cloud-dns/tests/unit/test__http.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def _make_one(self, *args, **kw):
2828
return self._get_target_class()(*args, **kw)
2929

3030
def test_build_api_url_no_extra_query_params(self):
31-
from urllib.parse import parse_qsl
32-
from urllib.parse import urlsplit
31+
from urllib.parse import parse_qsl, urlsplit
3332

3433
conn = self._make_one(object())
3534
uri = conn.build_api_url("/foo")
@@ -42,8 +41,7 @@ def test_build_api_url_no_extra_query_params(self):
4241
self.assertEqual(parms, {})
4342

4443
def test_build_api_url_w_custom_endpoint(self):
45-
from urllib.parse import parse_qsl
46-
from urllib.parse import urlsplit
44+
from urllib.parse import parse_qsl, urlsplit
4745

4846
custom_endpoint = "https://foo-dns.googleapis.com"
4947
conn = self._make_one(object(), api_endpoint=custom_endpoint)
@@ -57,8 +55,7 @@ def test_build_api_url_w_custom_endpoint(self):
5755
self.assertEqual(parms, {})
5856

5957
def test_build_api_url_w_extra_query_params(self):
60-
from urllib.parse import parse_qsl
61-
from urllib.parse import urlsplit
58+
from urllib.parse import parse_qsl, urlsplit
6259

6360
conn = self._make_one(object())
6461
uri = conn.build_api_url("/foo", {"bar": "baz"})
@@ -70,6 +67,7 @@ def test_build_api_url_w_extra_query_params(self):
7067

7168
def test_extra_headers(self):
7269
import requests
70+
7371
from google.cloud import _http as base_http
7472

7573
http = mock.create_autospec(requests.Session, instance=True)

0 commit comments

Comments
 (0)