Skip to content

Commit 47eb38c

Browse files
authored
feat(shell): generate library (#7946)
Fixes #7944.
1 parent 1b6f6f9 commit 47eb38c

42 files changed

Lines changed: 3051 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ google/cloud/recommender/quickstart/
2424
google/cloud/resourcemanager/quickstart/
2525
google/cloud/scheduler/quickstart/
2626
google/cloud/secretmanager/quickstart/
27+
google/cloud/shell/quickstart/
2728
google/cloud/spanner/quickstart/
2829
google/cloud/storage/quickstart/
2930
google/cloud/storagetransfer/quickstart/

.codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ ignore:
3131
- "google/cloud/resourcemanager"
3232
- "google/cloud/scheduler"
3333
- "google/cloud/secretmanager"
34+
- "google/cloud/shell"
3435
- "google/cloud/spanner/admin"
3536
- "google/cloud/storagetransfer"
3637
- "google/cloud/talent"

BUILD.bazel

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,20 @@ cc_library(
343343
],
344344
)
345345

346+
cc_library(
347+
name = "experimental-shell",
348+
deps = [
349+
"//google/cloud/shell:google_cloud_cpp_shell",
350+
],
351+
)
352+
353+
cc_library(
354+
name = "experimental-shell_mocks",
355+
deps = [
356+
"//google/cloud/shell:google_cloud_cpp_shell_mocks",
357+
],
358+
)
359+
346360
cc_library(
347361
name = "spanner",
348362
deps = [

ci/etc/expected_install_directories

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
./include/google/cloud/secretmanager/internal
8484
./include/google/cloud/secretmanager/mocks
8585
./include/google/cloud/secretmanager/v1
86+
./include/google/cloud/shell
87+
./include/google/cloud/shell/internal
88+
./include/google/cloud/shell/mocks
89+
./include/google/cloud/shell/v1
8690
./include/google/cloud/spanner
8791
./include/google/cloud/spanner/admin
8892
./include/google/cloud/spanner/admin/internal
@@ -157,6 +161,7 @@
157161
./lib64/cmake/google_cloud_cpp_resourcemanager
158162
./lib64/cmake/google_cloud_cpp_scheduler
159163
./lib64/cmake/google_cloud_cpp_secretmanager
164+
./lib64/cmake/google_cloud_cpp_shell
160165
./lib64/cmake/google_cloud_cpp_storagetransfer
161166
./lib64/cmake/google_cloud_cpp_talent
162167
./lib64/cmake/google_cloud_cpp_tasks

ci/etc/full_feature_list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ recommender
1616
resourcemanager
1717
scheduler
1818
secretmanager
19+
shell
1920
storagetransfer
2021
talent
2122
tasks
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@com_google_googleapis//google/api:annotations_proto
2+
@com_google_googleapis//google/api:client_proto
3+
@com_google_googleapis//google/api:field_behavior_proto
4+
@com_google_googleapis//google/api:http_proto
5+
@com_google_googleapis//google/api:resource_proto
6+
@com_google_googleapis//google/longrunning:operations_proto
7+
@com_google_googleapis//google/rpc:status_proto
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@com_google_googleapis//google/cloud/shell/v1:cloudshell.proto

external/googleapis/update_libraries.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ declare -A -r LIBRARIES=(
7979
"@com_google_googleapis//google/cloud/secretmanager/v1:secretmanager_proto" \
8080
"@com_google_googleapis//google/cloud/secretmanager/logging/v1:logging_proto"
8181
)"
82+
["shell"]="@com_google_googleapis//google/cloud/shell/v1:shell_cc_grpc"
8283
["spanner"]="$(
8384
printf ",%s" \
8485
"@com_google_googleapis//google/spanner/v1:spanner_proto" \

generator/generator_config.textproto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,14 @@ service {
224224
retryable_status_codes: ["kDeadlineExceeded", "kUnavailable"]
225225
}
226226

227+
# Shell
228+
service {
229+
service_proto_path: "google/cloud/shell/v1/cloudshell.proto"
230+
product_path: "google/cloud/shell"
231+
initial_copyright_year: "2022"
232+
retryable_status_codes: ["kUnavailable", "kUnknown"]
233+
}
234+
227235
# Spanner
228236
service {
229237
service_proto_path: "google/spanner/admin/database/v1/spanner_database_admin.proto"

google/cloud/shell/BUILD.bazel

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
package(default_visibility = ["//visibility:private"])
16+
17+
licenses(["notice"]) # Apache 2.0
18+
19+
SOURCE_GLOB = "**/*.cc"
20+
21+
MOCK_SOURCE_GLOB = "mocks/*.cc"
22+
23+
HEADER_GLOB = "**/*.h"
24+
25+
MOCK_HEADER_GLOB = "mocks/*.h"
26+
27+
cc_library(
28+
name = "google_cloud_cpp_shell",
29+
srcs = glob(
30+
include = [SOURCE_GLOB],
31+
exclude = [MOCK_SOURCE_GLOB],
32+
),
33+
hdrs = glob(
34+
include = [HEADER_GLOB],
35+
exclude = [MOCK_HEADER_GLOB],
36+
),
37+
visibility = ["//:__pkg__"],
38+
deps = [
39+
"//google/cloud:google_cloud_cpp_common",
40+
"//google/cloud:google_cloud_cpp_grpc_utils",
41+
"@com_google_googleapis//google/cloud/shell/v1:shell_cc_grpc",
42+
],
43+
)
44+
45+
cc_library(
46+
name = "google_cloud_cpp_shell_mocks",
47+
srcs = glob(
48+
include = [MOCK_SOURCE_GLOB],
49+
),
50+
hdrs = glob(
51+
include = [MOCK_HEADER_GLOB],
52+
),
53+
visibility = ["//:__pkg__"],
54+
deps = [
55+
":google_cloud_cpp_shell",
56+
"//google/cloud:google_cloud_cpp_common",
57+
"//google/cloud:google_cloud_cpp_grpc_utils",
58+
],
59+
)

0 commit comments

Comments
 (0)