Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
fix: proper http bindings for v2 API (#209)
Browse files Browse the repository at this point in the history
* chore: Update gapic-generator-python to v1.8.2

PiperOrigin-RevId: 504289125

Source-Link: googleapis/googleapis@38a48a4

Source-Link: https://github.com/googleapis/googleapis-gen/commit/b2dc22663dbe47a972c8d8c2f8a4df013dafdcbc
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJkYzIyNjYzZGJlNDdhOTcyYzhkOGMyZjhhNGRmMDEzZGFmZGNiYyJ9

* 🦉 Updates from OwlBot post-processor

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

* chore: reformat protos

PiperOrigin-RevId: 504359717

Source-Link: googleapis/googleapis@1266905

Source-Link: https://github.com/googleapis/googleapis-gen/commit/881ee780389ca57235403e308065690b8478fe24
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODgxZWU3ODAzODljYTU3MjM1NDAzZTMwODA2NTY5MGI4NDc4ZmUyNCJ9

* 🦉 Updates from OwlBot post-processor

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

* docs: update comment
fix: update http bindings for alpha API

PiperOrigin-RevId: 504360226

Source-Link: googleapis/googleapis@44f176c

Source-Link: https://github.com/googleapis/googleapis-gen/commit/c2c886b4989b35ab7a50824c2c67353a95ed89a7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzJjODg2YjQ5ODliMzVhYjdhNTA4MjRjMmM2NzM1M2E5NWVkODlhNyJ9

* 🦉 Updates from OwlBot post-processor

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

* fix: proper http bindings for v2 API
chore: reformat protos

PiperOrigin-RevId: 504361887

Source-Link: googleapis/googleapis@1230a6b

Source-Link: https://github.com/googleapis/googleapis-gen/commit/51e8944ff6525b7dc567323617a9131c7dcbc544
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTFlODk0NGZmNjUyNWI3ZGM1NjczMjM2MTdhOTEzMWM3ZGNiYzU0NCJ9

* 🦉 Updates from OwlBot post-processor

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

* fix docs build

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people authored Jan 25, 2023
1 parent ace089e commit e549185
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 126 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ branch = True
show_missing = True
omit =
google/cloud/tpu/__init__.py
google/cloud/tpu/gapic_version.py
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/tpu_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.tpu import gapic_version as package_version
from google.cloud.tpu_v1 import gapic_version as package_version

__version__ = package_version.__version__

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/tpu_v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.tpu import gapic_version as package_version
from google.cloud.tpu_v2 import gapic_version as package_version

__version__ = package_version.__version__

Expand Down
120 changes: 0 additions & 120 deletions google/cloud/tpu_v2/services/tpu/transports/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,72 +714,24 @@ def operations_client(self) -> operations_v1.AbstractOperationsClient:
if self._operations_client is None:
http_options: Dict[str, List[Dict[str, str]]] = {
"google.longrunning.Operations.CancelOperation": [
{
"method": "post",
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel",
},
{
"method": "post",
"uri": "/v1/{name=projects/*/locations/*/operations/*}:cancel",
},
{
"method": "post",
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}:cancel",
},
{
"method": "post",
"uri": "/v2/{name=projects/*/locations/*/operations/*}:cancel",
},
],
"google.longrunning.Operations.DeleteOperation": [
{
"method": "delete",
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "delete",
"uri": "/v1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "delete",
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "delete",
"uri": "/v2/{name=projects/*/locations/*/operations/*}",
},
],
"google.longrunning.Operations.GetOperation": [
{
"method": "get",
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "get",
"uri": "/v1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "get",
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "get",
"uri": "/v2/{name=projects/*/locations/*/operations/*}",
},
],
"google.longrunning.Operations.ListOperations": [
{
"method": "get",
"uri": "/v1alpha1/{name=projects/*/locations/*}/operations",
},
{
"method": "get",
"uri": "/v1/{name=projects/*/locations/*}/operations",
},
{
"method": "get",
"uri": "/v2alpha1/{name=projects/*/locations/*}/operations",
},
{
"method": "get",
"uri": "/v2/{name=projects/*/locations/*}/operations",
Expand Down Expand Up @@ -2173,18 +2125,6 @@ def __call__(
"""

http_options: List[Dict[str, str]] = [
{
"method": "get",
"uri": "/v1alpha1/{name=projects/*/locations/*}",
},
{
"method": "get",
"uri": "/v1/{name=projects/*/locations/*}",
},
{
"method": "get",
"uri": "/v2alpha1/{name=projects/*/locations/*}",
},
{
"method": "get",
"uri": "/v2/{name=projects/*/locations/*}",
Expand Down Expand Up @@ -2252,18 +2192,6 @@ def __call__(
"""

http_options: List[Dict[str, str]] = [
{
"method": "get",
"uri": "/v1alpha1/{name=projects/*}/locations",
},
{
"method": "get",
"uri": "/v1/{name=projects/*}/locations",
},
{
"method": "get",
"uri": "/v2alpha1/{name=projects/*}/locations",
},
{
"method": "get",
"uri": "/v2/{name=projects/*}/locations",
Expand Down Expand Up @@ -2328,18 +2256,6 @@ def __call__(
"""

http_options: List[Dict[str, str]] = [
{
"method": "post",
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel",
},
{
"method": "post",
"uri": "/v1/{name=projects/*/locations/*/operations/*}:cancel",
},
{
"method": "post",
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}:cancel",
},
{
"method": "post",
"uri": "/v2/{name=projects/*/locations/*/operations/*}:cancel",
Expand Down Expand Up @@ -2403,18 +2319,6 @@ def __call__(
"""

http_options: List[Dict[str, str]] = [
{
"method": "delete",
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "delete",
"uri": "/v1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "delete",
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "delete",
"uri": "/v2/{name=projects/*/locations/*/operations/*}",
Expand Down Expand Up @@ -2481,18 +2385,6 @@ def __call__(
"""

http_options: List[Dict[str, str]] = [
{
"method": "get",
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "get",
"uri": "/v1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "get",
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}",
},
{
"method": "get",
"uri": "/v2/{name=projects/*/locations/*/operations/*}",
Expand Down Expand Up @@ -2560,18 +2452,6 @@ def __call__(
"""

http_options: List[Dict[str, str]] = [
{
"method": "get",
"uri": "/v1alpha1/{name=projects/*/locations/*}/operations",
},
{
"method": "get",
"uri": "/v1/{name=projects/*/locations/*}/operations",
},
{
"method": "get",
"uri": "/v2alpha1/{name=projects/*/locations/*}/operations",
},
{
"method": "get",
"uri": "/v2/{name=projects/*/locations/*}/operations",
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/tpu_v2alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.tpu import gapic_version as package_version
from google.cloud.tpu_v2alpha1 import gapic_version as package_version

__version__ = package_version.__version__

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-tpu",
"version": "1.7.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-tpu",
"version": "1.7.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-tpu",
"version": "1.7.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit e549185

Please sign in to comment.