Skip to content

Commit

Permalink
chore: Use gapic-generator-python 0.65.0 (#12)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 440970084

Source-Link: googleapis/googleapis@5e0a3d5

Source-Link: googleapis/googleapis-gen@b0c628a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBjNjI4YTNmYWRlNzY4ZjIyNWQ3Njk5Mjc5MWVhMWJhMmE4ODFiZSJ9

docs: fix type in docstring for map fields
  • Loading branch information
gcf-owl-bot[bot] authored Apr 13, 2022
1 parent ea64be6 commit 860a4e9
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -443,7 +443,6 @@ async def reset_instance(
Equivalent to shutting the power off and then turning it
back on.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -1077,7 +1076,6 @@ async def list_snapshot_schedule_policies(
r"""List snapshot schedule policies in a given project
and location.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -1283,7 +1281,6 @@ async def create_snapshot_schedule_policy(
r"""Create a snapshot schedule policy in the specified
project.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -1401,7 +1398,6 @@ async def update_snapshot_schedule_policy(
r"""Update a snapshot schedule policy in the specified
project.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -1600,7 +1596,6 @@ async def create_volume_snapshot(
r"""Create a storage volume snapshot in a containing
volume.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -1705,7 +1700,6 @@ async def restore_volume_snapshot(
r"""Restore a storage volume snapshot to its containing
volume.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -1993,7 +1987,6 @@ async def list_volume_snapshots(
r"""List storage volume snapshots for given storage
volume.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -2103,7 +2096,6 @@ async def get_lun(
r"""Get details of a single storage logical unit
number(LUN).
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Optional, Sequence, Tuple, Type, Union
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core import client_options as client_options_lib
Expand Down Expand Up @@ -765,7 +765,6 @@ def reset_instance(
Equivalent to shutting the power off and then turning it
back on.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -1399,7 +1398,6 @@ def list_snapshot_schedule_policies(
r"""List snapshot schedule policies in a given project
and location.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -1611,7 +1609,6 @@ def create_snapshot_schedule_policy(
r"""Create a snapshot schedule policy in the specified
project.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -1733,7 +1730,6 @@ def update_snapshot_schedule_policy(
r"""Update a snapshot schedule policy in the specified
project.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -1940,7 +1936,6 @@ def create_volume_snapshot(
r"""Create a storage volume snapshot in a containing
volume.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -2045,7 +2040,6 @@ def restore_volume_snapshot(
r"""Restore a storage volume snapshot to its containing
volume.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -2333,7 +2327,6 @@ def list_volume_snapshots(
r"""List storage volume snapshots for given storage
volume.
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down Expand Up @@ -2443,7 +2436,6 @@ def get_lun(
r"""Get details of a single storage logical unit
number(LUN).
.. code-block:: python
from google.cloud import bare_metal_solution_v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def __init__(
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
"""

# Save the hostname. Default to port 443 (HTTPS) if none is specified.
if ":" not in host:
host += ":443"
Expand Down Expand Up @@ -452,5 +453,9 @@ def list_luns(
]:
raise NotImplementedError()

@property
def kind(self) -> str:
raise NotImplementedError()


__all__ = ("BareMetalSolutionTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -830,5 +830,9 @@ def list_luns(
def close(self):
self.grpc_channel.close()

@property
def kind(self) -> str:
return "grpc"


__all__ = ("BareMetalSolutionGrpcTransport",)
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ class Instance(proto.Message):
True if you enable hyperthreading for the
server, otherwise false. The default value is
false.
labels (Sequence[google.cloud.bare_metal_solution_v2.types.Instance.LabelsEntry]):
labels (Mapping[str, str]):
Labels as key value pairs.
luns (Sequence[google.cloud.bare_metal_solution_v2.types.Lun]):
List of LUNs associated with this server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6894,6 +6894,19 @@ def test_transport_adc(transport_class):
adc.assert_called_once()


@pytest.mark.parametrize(
"transport_name",
[
"grpc",
],
)
def test_transport_kind(transport_name):
transport = BareMetalSolutionClient.get_transport_class(transport_name)(
credentials=ga_credentials.AnonymousCredentials(),
)
assert transport.kind == transport_name


def test_transport_grpc_default():
# A client should use the gRPC transport by default.
client = BareMetalSolutionClient(
Expand Down Expand Up @@ -6960,6 +6973,14 @@ def test_bare_metal_solution_base_transport():
with pytest.raises(NotImplementedError):
transport.operations_client

# Catch all for all remaining methods and properties
remainder = [
"kind",
]
for r in remainder:
with pytest.raises(NotImplementedError):
getattr(transport, r)()


def test_bare_metal_solution_base_transport_with_credentials_file():
# Instantiate the base transport with a credentials file
Expand Down

0 comments on commit 860a4e9

Please sign in to comment.