Skip to content

Commit 4832303

Browse files
authored
test(internal/librarian/gcloud): add parallelstore for gcloud generation (#5672)
Added librarian.yaml to `internal/librarian/gcloud/testdata`, configured to generate the gcloud command surface for the parallelstore service. The generated files are also included in `internal/librarian/gcloud/generated`, which will be used to validate gcloud generation. These are not completely correct yet, but we will slowly add functionality and make fixes to make these correct.
1 parent faad5d9 commit 4832303

35 files changed

Lines changed: 1507 additions & 0 deletions
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# -*- coding: utf-8 -*- #
2+
# Copyright 2026 Google LLC. All Rights Reserved.
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+
# NOTE: This file is autogenerated and should not be edited by hand.
17+
"""Manage Parallelstore resources."""
18+
19+
from googlecloudsdk.calliope import base
20+
from googlecloudsdk.surface.parallelstore import _init_extensions as extensions
21+
22+
23+
@base.ReleaseTracks(base.ReleaseTrack.GA)
24+
@base.Autogenerated
25+
class ParallelstoreGa(extensions.ParallelstoreGa):
26+
"""Manage Parallelstore resources."""
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# -*- coding: utf-8 -*- #
2+
# Copyright 2026 Google LLC. All Rights Reserved.
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+
"""File to add optional custom code to extend __init__.py."""
16+
from googlecloudsdk.calliope import base
17+
18+
19+
class ParallelstoreAlpha(base.Group):
20+
"""Optional no-auto-generated code for ALPHA."""
21+
category = base.UNCATEGORIZED_CATEGORY
22+
23+
24+
class ParallelstoreBeta(base.Group):
25+
"""Optional no-auto-generated code for BETA."""
26+
category = base.UNCATEGORIZED_CATEGORY
27+
28+
29+
class ParallelstoreGa(base.Group):
30+
"""Optional no-auto-generated code for GA."""
31+
category = base.UNCATEGORIZED_CATEGORY
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# -*- coding: utf-8 -*- #
2+
# Copyright 2026 Google LLC. All Rights Reserved.
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+
# NOTE: This file is autogenerated and should not be edited by hand.
17+
"""Manage Instance resources."""
18+
19+
from googlecloudsdk.calliope import base
20+
from googlecloudsdk.surface.parallelstore.instances import _init_extensions as extensions
21+
22+
23+
@base.ReleaseTracks(base.ReleaseTrack.GA)
24+
@base.Autogenerated
25+
class InstancesGa(extensions.InstancesGa):
26+
"""Manage Instance resources."""
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# -*- coding: utf-8 -*- #
2+
# Copyright 2026 Google LLC. All Rights Reserved.
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+
"""File to add optional custom code to extend __init__.py."""
16+
from googlecloudsdk.calliope import base
17+
18+
19+
class InstancesAlpha(base.Group):
20+
"""Optional no-auto-generated code for ALPHA."""
21+
22+
23+
class InstancesBeta(base.Group):
24+
"""Optional no-auto-generated code for BETA."""
25+
26+
27+
class InstancesGa(base.Group):
28+
"""Optional no-auto-generated code for GA."""
Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
# -*- coding: utf-8 -*- #
2+
# Copyright 2026 Google LLC. All Rights Reserved.
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+
# NOTE: This file is autogenerated and should not be edited by hand.
17+
- release_tracks:
18+
- GA
19+
auto_generated: true
20+
hidden: true
21+
help_text:
22+
brief: Create instances
23+
description: Create a instance
24+
examples: |-
25+
To create the instance, run:
26+
27+
$ {command}
28+
arguments:
29+
params:
30+
- help_text: |-
31+
The resource name of the instance, in the format
32+
`projects/{project}/locations/{location}/instances/{instance_id}`.
33+
is_positional: true
34+
is_primary_resource: true
35+
request_id_field: instanceId
36+
resource_spec:
37+
attributes:
38+
- attribute_name: project
39+
help: The project id of the {resource} resource.
40+
parameter_name: projectsId
41+
property: core/project
42+
- attribute_name: location
43+
help: The location id of the {resource} resource.
44+
parameter_name: locationsId
45+
- attribute_name: instance
46+
help: The instance id of the {resource} resource.
47+
parameter_name: instancesId
48+
collection: parallelstore.projects.locations.instances
49+
disable_auto_completers: false
50+
name: instance
51+
plural_name: instances
52+
required: true
53+
- arg_name: description
54+
api_field: instance.description
55+
help_text: The description of the instance. 2048 characters or less.
56+
is_positional: false
57+
required: false
58+
- arg_name: labels
59+
api_field: instance.labels
60+
help_text: |-
61+
Cloud Labels are a flexible and lightweight mechanism for
62+
organizing cloud resources into groups that reflect a customer's
63+
organizational needs and deployment strategies. See
64+
https://cloud.google.com/resource-manager/docs/labels-overview for details.
65+
is_positional: false
66+
required: false
67+
repeated: true
68+
spec:
69+
- api_field: key
70+
- api_field: value
71+
- arg_name: capacity-gib
72+
api_field: instance.capacityGib
73+
help_text: |-
74+
Immutable. The instance's storage capacity in Gibibytes (GiB).
75+
Allowed values are between 12000 and 100000, in multiples of 4000; e.g.,
76+
12000, 16000, 20000, ...
77+
is_positional: false
78+
required: true
79+
type: long
80+
- arg_name: network
81+
api_field: instance.network
82+
help_text: |-
83+
Immutable. The name of the Compute Engine
84+
[VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
85+
instance is connected.
86+
is_positional: false
87+
resource_spec:
88+
attributes:
89+
- attribute_name: project
90+
help: The project id of the {resource} resource.
91+
parameter_name: projectsId
92+
property: core/project
93+
- attribute_name: network
94+
help: The network id of the {resource} resource.
95+
parameter_name: networksId
96+
collection: parallelstore.projects.networks
97+
disable_auto_completers: true
98+
name: network
99+
plural_name: networks
100+
required: false
101+
resource_method_params:
102+
instance.network: '{__relative_name__}'
103+
- arg_name: reserved-ip-range
104+
api_field: instance.reservedIpRange
105+
help_text: |-
106+
Immutable. The ID of the IP address range being used by the
107+
instance's VPC network. See [Configure a VPC
108+
network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc).
109+
If no ID is provided, all ranges are considered.
110+
is_positional: false
111+
resource_spec:
112+
attributes:
113+
- attribute_name: project
114+
help: The project id of the {resource} resource.
115+
parameter_name: projectsId
116+
property: core/project
117+
- attribute_name: region
118+
help: The region id of the {resource} resource.
119+
parameter_name: regionsId
120+
- attribute_name: address
121+
help: The address id of the {resource} resource.
122+
parameter_name: addressesId
123+
collection: parallelstore.projects.regions.addresses
124+
disable_auto_completers: true
125+
name: address
126+
plural_name: addresses
127+
required: false
128+
resource_method_params:
129+
instance.reservedIpRange: '{__relative_name__}'
130+
- arg_name: file-stripe-level
131+
api_field: instance.fileStripeLevel
132+
help_text: |-
133+
Immutable. Stripe level for files. Allowed values are:
134+
135+
* `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size
136+
files.
137+
* `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads
138+
involving a mix of small and large files.
139+
* `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files.
140+
is_positional: false
141+
required: false
142+
choices:
143+
- arg_value: file-stripe-level-min
144+
enum_value: FILE_STRIPE_LEVEL_MIN
145+
help_text: Value for the `file-stripe-level-min` field.
146+
- arg_value: file-stripe-level-balanced
147+
enum_value: FILE_STRIPE_LEVEL_BALANCED
148+
help_text: Value for the `file-stripe-level-balanced` field.
149+
- arg_value: file-stripe-level-max
150+
enum_value: FILE_STRIPE_LEVEL_MAX
151+
help_text: Value for the `file-stripe-level-max` field.
152+
- arg_name: directory-stripe-level
153+
api_field: instance.directoryStripeLevel
154+
help_text: |-
155+
Immutable. Stripe level for directories. Allowed values are:
156+
157+
* `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a
158+
small number of files.
159+
* `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads
160+
involving a mix of small and large directories.
161+
* `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large
162+
number of files.
163+
is_positional: false
164+
required: false
165+
choices:
166+
- arg_value: directory-stripe-level-min
167+
enum_value: DIRECTORY_STRIPE_LEVEL_MIN
168+
help_text: Value for the `directory-stripe-level-min` field.
169+
- arg_value: directory-stripe-level-balanced
170+
enum_value: DIRECTORY_STRIPE_LEVEL_BALANCED
171+
help_text: Value for the `directory-stripe-level-balanced` field.
172+
- arg_value: directory-stripe-level-max
173+
enum_value: DIRECTORY_STRIPE_LEVEL_MAX
174+
help_text: Value for the `directory-stripe-level-max` field.
175+
- arg_name: deployment-type
176+
api_field: instance.deploymentType
177+
help_text: |-
178+
Immutable. The deployment type of the instance. Allowed values
179+
are:
180+
181+
* `SCRATCH`: the instance is a scratch instance.
182+
* `PERSISTENT`: the instance is a persistent instance.
183+
is_positional: false
184+
required: false
185+
choices:
186+
- arg_value: scratch
187+
enum_value: SCRATCH
188+
help_text: Value for the `scratch` field.
189+
- arg_value: persistent
190+
enum_value: PERSISTENT
191+
help_text: Value for the `persistent` field.
192+
- arg_name: request-id
193+
api_field: requestId
194+
help_text: |-
195+
An optional request ID to identify requests. Specify a unique
196+
request ID so that if you must retry your request, the server will know to
197+
ignore the request if it has already been completed. The server will
198+
guarantee that for at least 60 minutes since the first request.
199+
200+
For example, consider a situation where you make an initial request and
201+
the request times out. If you make the request again with the same request
202+
ID, the server can check if original operation with the same request ID
203+
was received, and if so, will ignore the second request. This prevents
204+
clients from accidentally creating duplicate commitments.
205+
206+
The request ID must be a valid UUID with the exception that zero UUID is
207+
not supported (00000000-0000-0000-0000-000000000000).
208+
is_positional: false
209+
required: false
210+
request:
211+
collection:
212+
- parallelstore.projects.locations.instances
213+
async:
214+
collection:
215+
- parallelstore.projects.locations.operations
216+
extract_resource_result: true

0 commit comments

Comments
 (0)