Skip to content

Commit

Permalink
feat: add support for google.cloud.bare_metal_solution.__version__ (#…
Browse files Browse the repository at this point in the history
…64)

* chore: update to gapic-generator-python 1.5.0

feat: add support for `google.cloud.<api>.__version__`
PiperOrigin-RevId: 484665853

Source-Link: googleapis/googleapis@8eb249a

Source-Link: googleapis/googleapis-gen@c8aa327
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* add .release-please-manifest.json with correct version

* use templated owlbot.py and autogenerated setup.py

* run nox format session

* add release please config

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
  • Loading branch information
3 people authored Nov 9, 2022
1 parent 56261d0 commit 40f0e83
Show file tree
Hide file tree
Showing 52 changed files with 365 additions and 1,063 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
releaseType: python
handleGHRelease: true
manifest: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.1.3"
}
2 changes: 1 addition & 1 deletion packages/google-cloud-bare-metal-solution/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import shlex
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.bare_metal_solution import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.bare_metal_solution_v2.services.bare_metal_solution.async_client import (
BareMetalSolutionAsyncClient,
)
from google.cloud.bare_metal_solution_v2.services.bare_metal_solution.client import (
BareMetalSolutionClient,
)
from google.cloud.bare_metal_solution_v2.types.baremetalsolution import (
OperationMetadata,
ResetInstanceResponse,
)
from google.cloud.bare_metal_solution_v2.types.instance import (
DetachLunRequest,
GetInstanceRequest,
Instance,
ListInstancesRequest,
ListInstancesResponse,
ResetInstanceRequest,
ServerNetworkTemplate,
StartInstanceRequest,
StartInstanceResponse,
StopInstanceRequest,
StopInstanceResponse,
UpdateInstanceRequest,
)
from google.cloud.bare_metal_solution_v2.types.lun import (
GetLunRequest,
ListLunsRequest,
ListLunsResponse,
Lun,
)
from google.cloud.bare_metal_solution_v2.types.network import (
VRF,
GetNetworkRequest,
ListNetworksRequest,
ListNetworksResponse,
ListNetworkUsageRequest,
ListNetworkUsageResponse,
LogicalInterface,
Network,
NetworkAddressReservation,
NetworkUsage,
UpdateNetworkRequest,
)
from google.cloud.bare_metal_solution_v2.types.nfs_share import (
GetNfsShareRequest,
ListNfsSharesRequest,
ListNfsSharesResponse,
NfsShare,
UpdateNfsShareRequest,
)
from google.cloud.bare_metal_solution_v2.types.volume import (
GetVolumeRequest,
ListVolumesRequest,
ListVolumesResponse,
ResizeVolumeRequest,
UpdateVolumeRequest,
Volume,
)

__all__ = (
"BareMetalSolutionClient",
"BareMetalSolutionAsyncClient",
"OperationMetadata",
"ResetInstanceResponse",
"DetachLunRequest",
"GetInstanceRequest",
"Instance",
"ListInstancesRequest",
"ListInstancesResponse",
"ResetInstanceRequest",
"ServerNetworkTemplate",
"StartInstanceRequest",
"StartInstanceResponse",
"StopInstanceRequest",
"StopInstanceResponse",
"UpdateInstanceRequest",
"GetLunRequest",
"ListLunsRequest",
"ListLunsResponse",
"Lun",
"GetNetworkRequest",
"ListNetworksRequest",
"ListNetworksResponse",
"ListNetworkUsageRequest",
"ListNetworkUsageResponse",
"LogicalInterface",
"Network",
"NetworkAddressReservation",
"NetworkUsage",
"UpdateNetworkRequest",
"VRF",
"GetNfsShareRequest",
"ListNfsSharesRequest",
"ListNfsSharesResponse",
"NfsShare",
"UpdateNfsShareRequest",
"GetVolumeRequest",
"ListVolumesRequest",
"ListVolumesResponse",
"ResizeVolumeRequest",
"UpdateVolumeRequest",
"Volume",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.1.3" # {x-release-please-version}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-bare-metal-solution package uses inline types.
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,59 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.bare_metal_solution import gapic_version as package_version

from .services.bare_metal_solution import BareMetalSolutionClient
from .services.bare_metal_solution import BareMetalSolutionAsyncClient
__version__ = package_version.__version__

from .types.baremetalsolution import OperationMetadata
from .types.baremetalsolution import ResetInstanceResponse
from .types.instance import DetachLunRequest
from .types.instance import GetInstanceRequest
from .types.instance import Instance
from .types.instance import ListInstancesRequest
from .types.instance import ListInstancesResponse
from .types.instance import ResetInstanceRequest
from .types.instance import ServerNetworkTemplate
from .types.instance import StartInstanceRequest
from .types.instance import StartInstanceResponse
from .types.instance import StopInstanceRequest
from .types.instance import StopInstanceResponse
from .types.instance import UpdateInstanceRequest
from .types.lun import GetLunRequest
from .types.lun import ListLunsRequest
from .types.lun import ListLunsResponse
from .types.lun import Lun
from .types.network import GetNetworkRequest
from .types.network import ListNetworksRequest
from .types.network import ListNetworksResponse
from .types.network import ListNetworkUsageRequest
from .types.network import ListNetworkUsageResponse
from .types.network import LogicalInterface
from .types.network import Network
from .types.network import NetworkAddressReservation
from .types.network import NetworkUsage
from .types.network import UpdateNetworkRequest
from .types.network import VRF
from .types.nfs_share import GetNfsShareRequest
from .types.nfs_share import ListNfsSharesRequest
from .types.nfs_share import ListNfsSharesResponse
from .types.nfs_share import NfsShare
from .types.nfs_share import UpdateNfsShareRequest
from .types.volume import GetVolumeRequest
from .types.volume import ListVolumesRequest
from .types.volume import ListVolumesResponse
from .types.volume import ResizeVolumeRequest
from .types.volume import UpdateVolumeRequest
from .types.volume import Volume

from .services.bare_metal_solution import (
BareMetalSolutionAsyncClient,
BareMetalSolutionClient,
)
from .types.baremetalsolution import OperationMetadata, ResetInstanceResponse
from .types.instance import (
DetachLunRequest,
GetInstanceRequest,
Instance,
ListInstancesRequest,
ListInstancesResponse,
ResetInstanceRequest,
ServerNetworkTemplate,
StartInstanceRequest,
StartInstanceResponse,
StopInstanceRequest,
StopInstanceResponse,
UpdateInstanceRequest,
)
from .types.lun import GetLunRequest, ListLunsRequest, ListLunsResponse, Lun
from .types.network import (
VRF,
GetNetworkRequest,
ListNetworksRequest,
ListNetworksResponse,
ListNetworkUsageRequest,
ListNetworkUsageResponse,
LogicalInterface,
Network,
NetworkAddressReservation,
NetworkUsage,
UpdateNetworkRequest,
)
from .types.nfs_share import (
GetNfsShareRequest,
ListNfsSharesRequest,
ListNfsSharesResponse,
NfsShare,
UpdateNfsShareRequest,
)
from .types.volume import (
GetVolumeRequest,
ListVolumesRequest,
ListVolumesResponse,
ResizeVolumeRequest,
UpdateVolumeRequest,
Volume,
)

__all__ = (
"BareMetalSolutionAsyncClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .client import BareMetalSolutionClient
from .async_client import BareMetalSolutionAsyncClient
from .client import BareMetalSolutionClient

__all__ = (
"BareMetalSolutionClient",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
import functools
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources

from google.api_core.client_options import ClientOptions
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.api_core.client_options import ClientOptions
from google.auth import credentials as ga_credentials # type: ignore
from google.oauth2 import service_account # type: ignore
import pkg_resources

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
Expand All @@ -33,22 +33,24 @@

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore

from google.cloud.bare_metal_solution_v2.services.bare_metal_solution import pagers
from google.cloud.bare_metal_solution_v2.types import nfs_share as gcb_nfs_share
from google.cloud.bare_metal_solution_v2.types import baremetalsolution
from google.cloud.bare_metal_solution_v2.types import instance
from google.cloud.bare_metal_solution_v2.types import instance as gcb_instance
from google.cloud.bare_metal_solution_v2.types import lun
from google.cloud.bare_metal_solution_v2.types import network
from google.cloud.bare_metal_solution_v2.types import network as gcb_network
from google.cloud.bare_metal_solution_v2.types import nfs_share
from google.cloud.bare_metal_solution_v2.types import nfs_share as gcb_nfs_share
from google.cloud.bare_metal_solution_v2.types import volume
from google.cloud.bare_metal_solution_v2.types import volume as gcb_volume
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import BareMetalSolutionTransport, DEFAULT_CLIENT_INFO
from .transports.grpc_asyncio import BareMetalSolutionGrpcAsyncIOTransport

from .client import BareMetalSolutionClient
from .transports.base import DEFAULT_CLIENT_INFO, BareMetalSolutionTransport
from .transports.grpc_asyncio import BareMetalSolutionGrpcAsyncIOTransport


class BareMetalSolutionAsyncClient:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
from collections import OrderedDict
import os
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
import pkg_resources
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union, cast

from google.api_core import client_options as client_options_lib
from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.exceptions import MutualTLSChannelError # type: ignore
from google.auth.transport import mtls # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.auth.exceptions import MutualTLSChannelError # type: ignore
from google.oauth2 import service_account # type: ignore
import pkg_resources

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
Expand All @@ -36,20 +36,22 @@

from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore

from google.cloud.bare_metal_solution_v2.services.bare_metal_solution import pagers
from google.cloud.bare_metal_solution_v2.types import nfs_share as gcb_nfs_share
from google.cloud.bare_metal_solution_v2.types import baremetalsolution
from google.cloud.bare_metal_solution_v2.types import instance
from google.cloud.bare_metal_solution_v2.types import instance as gcb_instance
from google.cloud.bare_metal_solution_v2.types import lun
from google.cloud.bare_metal_solution_v2.types import network
from google.cloud.bare_metal_solution_v2.types import network as gcb_network
from google.cloud.bare_metal_solution_v2.types import nfs_share
from google.cloud.bare_metal_solution_v2.types import nfs_share as gcb_nfs_share
from google.cloud.bare_metal_solution_v2.types import volume
from google.cloud.bare_metal_solution_v2.types import volume as gcb_volume
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
from .transports.base import BareMetalSolutionTransport, DEFAULT_CLIENT_INFO

from .transports.base import DEFAULT_CLIENT_INFO, BareMetalSolutionTransport
from .transports.grpc import BareMetalSolutionGrpcTransport
from .transports.grpc_asyncio import BareMetalSolutionGrpcAsyncIOTransport

Expand Down Expand Up @@ -467,7 +469,7 @@ def __init__(
*,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, BareMetalSolutionTransport, None] = None,
client_options: Optional[client_options_lib.ClientOptions] = None,
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the bare metal solution client.
Expand All @@ -481,7 +483,7 @@ def __init__(
transport (Union[str, BareMetalSolutionTransport]): The
transport to use. If set to None, a transport is chosen
automatically.
client_options (google.api_core.client_options.ClientOptions): Custom options for the
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
client. It won't take effect if a ``transport`` instance is provided.
(1) The ``api_endpoint`` property can be used to override the
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
Expand Down Expand Up @@ -511,6 +513,7 @@ def __init__(
client_options = client_options_lib.from_dict(client_options)
if client_options is None:
client_options = client_options_lib.ClientOptions()
client_options = cast(client_options_lib.ClientOptions, client_options)

api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
client_options
Expand Down
Loading

0 comments on commit 40f0e83

Please sign in to comment.