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

Commit 72e3e8b

Browse files
feat: add TPU v2alpha1 (#55)
- [ ] Regenerate this pull request now. Committer: @rosbo PiperOrigin-RevId: 403400668 Source-Link: googleapis/googleapis@8f48b97 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f966fd02bd0d248e9adeffe3bb2daa53bf44a252 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjk2NmZkMDJiZDBkMjQ4ZTlhZGVmZmUzYmIyZGFhNTNiZjQ0YTI1MiJ9
1 parent 47f27eb commit 72e3e8b

File tree

21 files changed

+9853
-0
lines changed

21 files changed

+9853
-0
lines changed

docs/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
.. include:: multiprocessing.rst
44

5+
This package includes clients for multiple versions of Cloud TPU.
6+
By default, you will get version ``tpu_v1``.
7+
58

69
API Reference
710
-------------
@@ -11,6 +14,14 @@ API Reference
1114
tpu_v1/services
1215
tpu_v1/types
1316

17+
API Reference
18+
-------------
19+
.. toctree::
20+
:maxdepth: 2
21+
22+
tpu_v2alpha1/services
23+
tpu_v2alpha1/types
24+
1425
Changelog
1526
---------
1627

docs/tpu_v2alpha1/services.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Services for Google Cloud Tpu v2alpha1 API
2+
==========================================
3+
.. toctree::
4+
:maxdepth: 2
5+
6+
tpu

docs/tpu_v2alpha1/tpu.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Tpu
2+
---------------------
3+
4+
.. automodule:: google.cloud.tpu_v2alpha1.services.tpu
5+
:members:
6+
:inherited-members:
7+
8+
.. automodule:: google.cloud.tpu_v2alpha1.services.tpu.pagers
9+
:members:
10+
:inherited-members:

docs/tpu_v2alpha1/types.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Types for Google Cloud Tpu v2alpha1 API
2+
=======================================
3+
4+
.. automodule:: google.cloud.tpu_v2alpha1.types
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
from .services.tpu import TpuClient
18+
from .services.tpu import TpuAsyncClient
19+
20+
from .types.cloud_tpu import AcceleratorType
21+
from .types.cloud_tpu import AccessConfig
22+
from .types.cloud_tpu import AttachedDisk
23+
from .types.cloud_tpu import CreateNodeRequest
24+
from .types.cloud_tpu import DeleteNodeRequest
25+
from .types.cloud_tpu import GenerateServiceIdentityRequest
26+
from .types.cloud_tpu import GenerateServiceIdentityResponse
27+
from .types.cloud_tpu import GetAcceleratorTypeRequest
28+
from .types.cloud_tpu import GetGuestAttributesRequest
29+
from .types.cloud_tpu import GetGuestAttributesResponse
30+
from .types.cloud_tpu import GetNodeRequest
31+
from .types.cloud_tpu import GetRuntimeVersionRequest
32+
from .types.cloud_tpu import GuestAttributes
33+
from .types.cloud_tpu import GuestAttributesEntry
34+
from .types.cloud_tpu import GuestAttributesValue
35+
from .types.cloud_tpu import ListAcceleratorTypesRequest
36+
from .types.cloud_tpu import ListAcceleratorTypesResponse
37+
from .types.cloud_tpu import ListNodesRequest
38+
from .types.cloud_tpu import ListNodesResponse
39+
from .types.cloud_tpu import ListRuntimeVersionsRequest
40+
from .types.cloud_tpu import ListRuntimeVersionsResponse
41+
from .types.cloud_tpu import NetworkConfig
42+
from .types.cloud_tpu import NetworkEndpoint
43+
from .types.cloud_tpu import Node
44+
from .types.cloud_tpu import OperationMetadata
45+
from .types.cloud_tpu import RuntimeVersion
46+
from .types.cloud_tpu import SchedulingConfig
47+
from .types.cloud_tpu import ServiceAccount
48+
from .types.cloud_tpu import ServiceIdentity
49+
from .types.cloud_tpu import StartNodeRequest
50+
from .types.cloud_tpu import StopNodeRequest
51+
from .types.cloud_tpu import Symptom
52+
from .types.cloud_tpu import UpdateNodeRequest
53+
54+
__all__ = (
55+
"TpuAsyncClient",
56+
"AcceleratorType",
57+
"AccessConfig",
58+
"AttachedDisk",
59+
"CreateNodeRequest",
60+
"DeleteNodeRequest",
61+
"GenerateServiceIdentityRequest",
62+
"GenerateServiceIdentityResponse",
63+
"GetAcceleratorTypeRequest",
64+
"GetGuestAttributesRequest",
65+
"GetGuestAttributesResponse",
66+
"GetNodeRequest",
67+
"GetRuntimeVersionRequest",
68+
"GuestAttributes",
69+
"GuestAttributesEntry",
70+
"GuestAttributesValue",
71+
"ListAcceleratorTypesRequest",
72+
"ListAcceleratorTypesResponse",
73+
"ListNodesRequest",
74+
"ListNodesResponse",
75+
"ListRuntimeVersionsRequest",
76+
"ListRuntimeVersionsResponse",
77+
"NetworkConfig",
78+
"NetworkEndpoint",
79+
"Node",
80+
"OperationMetadata",
81+
"RuntimeVersion",
82+
"SchedulingConfig",
83+
"ServiceAccount",
84+
"ServiceIdentity",
85+
"StartNodeRequest",
86+
"StopNodeRequest",
87+
"Symptom",
88+
"TpuClient",
89+
"UpdateNodeRequest",
90+
)
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
{
2+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
3+
"language": "python",
4+
"libraryPackage": "google.cloud.tpu_v2alpha1",
5+
"protoPackage": "google.cloud.tpu.v2alpha1",
6+
"schema": "1.0",
7+
"services": {
8+
"Tpu": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "TpuClient",
12+
"rpcs": {
13+
"CreateNode": {
14+
"methods": [
15+
"create_node"
16+
]
17+
},
18+
"DeleteNode": {
19+
"methods": [
20+
"delete_node"
21+
]
22+
},
23+
"GenerateServiceIdentity": {
24+
"methods": [
25+
"generate_service_identity"
26+
]
27+
},
28+
"GetAcceleratorType": {
29+
"methods": [
30+
"get_accelerator_type"
31+
]
32+
},
33+
"GetGuestAttributes": {
34+
"methods": [
35+
"get_guest_attributes"
36+
]
37+
},
38+
"GetNode": {
39+
"methods": [
40+
"get_node"
41+
]
42+
},
43+
"GetRuntimeVersion": {
44+
"methods": [
45+
"get_runtime_version"
46+
]
47+
},
48+
"ListAcceleratorTypes": {
49+
"methods": [
50+
"list_accelerator_types"
51+
]
52+
},
53+
"ListNodes": {
54+
"methods": [
55+
"list_nodes"
56+
]
57+
},
58+
"ListRuntimeVersions": {
59+
"methods": [
60+
"list_runtime_versions"
61+
]
62+
},
63+
"StartNode": {
64+
"methods": [
65+
"start_node"
66+
]
67+
},
68+
"StopNode": {
69+
"methods": [
70+
"stop_node"
71+
]
72+
},
73+
"UpdateNode": {
74+
"methods": [
75+
"update_node"
76+
]
77+
}
78+
}
79+
},
80+
"grpc-async": {
81+
"libraryClient": "TpuAsyncClient",
82+
"rpcs": {
83+
"CreateNode": {
84+
"methods": [
85+
"create_node"
86+
]
87+
},
88+
"DeleteNode": {
89+
"methods": [
90+
"delete_node"
91+
]
92+
},
93+
"GenerateServiceIdentity": {
94+
"methods": [
95+
"generate_service_identity"
96+
]
97+
},
98+
"GetAcceleratorType": {
99+
"methods": [
100+
"get_accelerator_type"
101+
]
102+
},
103+
"GetGuestAttributes": {
104+
"methods": [
105+
"get_guest_attributes"
106+
]
107+
},
108+
"GetNode": {
109+
"methods": [
110+
"get_node"
111+
]
112+
},
113+
"GetRuntimeVersion": {
114+
"methods": [
115+
"get_runtime_version"
116+
]
117+
},
118+
"ListAcceleratorTypes": {
119+
"methods": [
120+
"list_accelerator_types"
121+
]
122+
},
123+
"ListNodes": {
124+
"methods": [
125+
"list_nodes"
126+
]
127+
},
128+
"ListRuntimeVersions": {
129+
"methods": [
130+
"list_runtime_versions"
131+
]
132+
},
133+
"StartNode": {
134+
"methods": [
135+
"start_node"
136+
]
137+
},
138+
"StopNode": {
139+
"methods": [
140+
"stop_node"
141+
]
142+
},
143+
"UpdateNode": {
144+
"methods": [
145+
"update_node"
146+
]
147+
}
148+
}
149+
}
150+
}
151+
}
152+
}
153+
}

google/cloud/tpu_v2alpha1/py.typed

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Marker file for PEP 561.
2+
# The google-cloud-tpu package uses inline types.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
from .client import TpuClient
17+
from .async_client import TpuAsyncClient
18+
19+
__all__ = (
20+
"TpuClient",
21+
"TpuAsyncClient",
22+
)

0 commit comments

Comments
 (0)