-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(v1beta1): Allow users to explicitly configure universe domain (#…
…12324) This PR fixes the issue where the client for [google.cloud.gkehub_v1beta1](https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1) was not being updated automatically. I followed the steps below to generate the changes in this PR: 1. Run the commands below in a clone of [googleapis/googleapis](https://github.com/googleapis/googleapis) ``` bazelisk build //google/cloud/gkehub/v1:gkehub-v1-py bazelisk build //google/cloud/gkehub/v1/configmanagement:configmanagement-v1-py bazelisk build //google/cloud/gkehub/v1/multiclusteringress:multiclusteringress-v1v1beta1-py bazelisk build //google/cloud/gkehub/v1beta1:gkehub-v1beta1-py ``` 2. Run the command below in a clone of this repository. The docker container will copy code from the `bazel-bin` directory of `googleapis` to the `owl-bot-staging` path specified in `.OwlBot.yaml` ``` docker run --rm --user $(id -u):$(id -g) -v $(pwd):/repo -v $HOME/git/googleapis/bazel-bin:/bazel-bin gcr.io/cloud-devrel-public-resources/owlbot-cli:latest copy-bazel-bin --source-dir /bazel-bin --dest /repo --config-file=/packages/google-cloud-gke-hub/.OwlBot.yaml ``` 3. Run the command below in a clone of this repository. The docker container will copy the files from `owl-bot-staging` to the destination path specified in `.OwlBot.yaml` ``` docker run --user $(id -u):$(id -g) --rm -v $(pwd):/repo -w /repo gcr.io/cloud-devrel-public-resources/owlbot-python-mono-repo:latest ``` Fixes #12323 🦕
- Loading branch information
Showing
26 changed files
with
3,111 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
173 changes: 132 additions & 41 deletions
173
...d-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/async_client.py
Large diffs are not rendered by default.
Oops, something went wrong.
345 changes: 311 additions & 34 deletions
345
...e-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/client.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...ed_samples/gkehub_v1beta1_generated_gke_hub_membership_service_create_membership_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2023 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for CreateMembership | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-gke-hub | ||
|
||
|
||
# [START gkehub_v1beta1_generated_GkeHubMembershipService_CreateMembership_async] | ||
# This snippet has been automatically generated and should be regarded as a | ||
# code template only. | ||
# It will require modifications to work: | ||
# - It may require correct/in-range values for request initialization. | ||
# - It may require specifying regional endpoints when creating the service | ||
# client as shown in: | ||
# https://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud import gkehub_v1beta1 | ||
|
||
|
||
async def sample_create_membership(): | ||
# Create a client | ||
client = gkehub_v1beta1.GkeHubMembershipServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = gkehub_v1beta1.CreateMembershipRequest( | ||
parent="parent_value", | ||
membership_id="membership_id_value", | ||
) | ||
|
||
# Make the request | ||
operation = client.create_membership(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = (await operation).result() | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END gkehub_v1beta1_generated_GkeHubMembershipService_CreateMembership_async] |
57 changes: 57 additions & 0 deletions
57
...ted_samples/gkehub_v1beta1_generated_gke_hub_membership_service_create_membership_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2023 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for CreateMembership | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-gke-hub | ||
|
||
|
||
# [START gkehub_v1beta1_generated_GkeHubMembershipService_CreateMembership_sync] | ||
# This snippet has been automatically generated and should be regarded as a | ||
# code template only. | ||
# It will require modifications to work: | ||
# - It may require correct/in-range values for request initialization. | ||
# - It may require specifying regional endpoints when creating the service | ||
# client as shown in: | ||
# https://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud import gkehub_v1beta1 | ||
|
||
|
||
def sample_create_membership(): | ||
# Create a client | ||
client = gkehub_v1beta1.GkeHubMembershipServiceClient() | ||
|
||
# Initialize request argument(s) | ||
request = gkehub_v1beta1.CreateMembershipRequest( | ||
parent="parent_value", | ||
membership_id="membership_id_value", | ||
) | ||
|
||
# Make the request | ||
operation = client.create_membership(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = operation.result() | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END gkehub_v1beta1_generated_GkeHubMembershipService_CreateMembership_sync] |
56 changes: 56 additions & 0 deletions
56
...ed_samples/gkehub_v1beta1_generated_gke_hub_membership_service_delete_membership_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2023 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for DeleteMembership | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-gke-hub | ||
|
||
|
||
# [START gkehub_v1beta1_generated_GkeHubMembershipService_DeleteMembership_async] | ||
# This snippet has been automatically generated and should be regarded as a | ||
# code template only. | ||
# It will require modifications to work: | ||
# - It may require correct/in-range values for request initialization. | ||
# - It may require specifying regional endpoints when creating the service | ||
# client as shown in: | ||
# https://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud import gkehub_v1beta1 | ||
|
||
|
||
async def sample_delete_membership(): | ||
# Create a client | ||
client = gkehub_v1beta1.GkeHubMembershipServiceAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = gkehub_v1beta1.DeleteMembershipRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
operation = client.delete_membership(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = (await operation).result() | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END gkehub_v1beta1_generated_GkeHubMembershipService_DeleteMembership_async] |
56 changes: 56 additions & 0 deletions
56
...ted_samples/gkehub_v1beta1_generated_gke_hub_membership_service_delete_membership_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2023 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for DeleteMembership | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-gke-hub | ||
|
||
|
||
# [START gkehub_v1beta1_generated_GkeHubMembershipService_DeleteMembership_sync] | ||
# This snippet has been automatically generated and should be regarded as a | ||
# code template only. | ||
# It will require modifications to work: | ||
# - It may require correct/in-range values for request initialization. | ||
# - It may require specifying regional endpoints when creating the service | ||
# client as shown in: | ||
# https://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud import gkehub_v1beta1 | ||
|
||
|
||
def sample_delete_membership(): | ||
# Create a client | ||
client = gkehub_v1beta1.GkeHubMembershipServiceClient() | ||
|
||
# Initialize request argument(s) | ||
request = gkehub_v1beta1.DeleteMembershipRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
operation = client.delete_membership(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = operation.result() | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END gkehub_v1beta1_generated_GkeHubMembershipService_DeleteMembership_sync] |
Oops, something went wrong.