Skip to content

Commit b60fef3

Browse files
fix: [google-cloud-lustre] Changed field behavior for an existing field per_unit_storage_throughput. It is now required (#13973)
BEGIN_COMMIT_OVERRIDE fix: Changed field behavior for an existing field per_unit_storage_throughput. It is now required docs: expand on and update various comments END_COMMIT_OVERRIDE docs: expand on and update various comments PiperOrigin-RevId: 766812120 Source-Link: googleapis/googleapis@85d120d Source-Link: googleapis/googleapis-gen@40a2bce Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWx1c3RyZS8uT3dsQm90LnlhbWwiLCJoIjoiNDBhMmJjZTg3YTNhZjdiYTkwNmRlNmJlZjE1MjIwZTMwOGU4NGM2MCJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 4b5d19b commit b60fef3

File tree

10 files changed

+84
-54
lines changed

10 files changed

+84
-54
lines changed

packages/google-cloud-lustre/google/cloud/lustre_v1/services/lustre/async_client.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ async def sample_create_instance():
563563
instance.filesystem = "filesystem_value"
564564
instance.capacity_gib = 1247
565565
instance.network = "network_value"
566+
instance.per_unit_storage_throughput = 2931
566567
567568
request = lustre_v1.CreateInstanceRequest(
568569
parent="parent_value",
@@ -719,6 +720,7 @@ async def sample_update_instance():
719720
instance.filesystem = "filesystem_value"
720721
instance.capacity_gib = 1247
721722
instance.network = "network_value"
723+
instance.per_unit_storage_throughput = 2931
722724
723725
request = lustre_v1.UpdateInstanceRequest(
724726
instance=instance,
@@ -1018,7 +1020,10 @@ async def sample_import_data():
10181020
request (Optional[Union[google.cloud.lustre_v1.types.ImportDataRequest, dict]]):
10191021
The request object. Message for importing data to Lustre.
10201022
name (:class:`str`):
1021-
Required. Name of the resource.
1023+
Required. The name of the Managed Lustre instance in the
1024+
format
1025+
``projects/{project}/locations/{location}/instances/{instance}``.
1026+
10221027
This corresponds to the ``name`` field
10231028
on the ``request`` instance; if ``request`` is provided, this
10241029
should not be set.
@@ -1143,8 +1148,8 @@ async def sample_export_data():
11431148
11441149
Args:
11451150
request (Optional[Union[google.cloud.lustre_v1.types.ExportDataRequest, dict]]):
1146-
The request object. Message for exporting data from
1147-
Lustre.
1151+
The request object. Export data from Managed Lustre to a
1152+
Cloud Storage bucket.
11481153
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
11491154
should be retried.
11501155
timeout (float): The timeout for this request.

packages/google-cloud-lustre/google/cloud/lustre_v1/services/lustre/client.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ def sample_create_instance():
10201020
instance.filesystem = "filesystem_value"
10211021
instance.capacity_gib = 1247
10221022
instance.network = "network_value"
1023+
instance.per_unit_storage_throughput = 2931
10231024
10241025
request = lustre_v1.CreateInstanceRequest(
10251026
parent="parent_value",
@@ -1173,6 +1174,7 @@ def sample_update_instance():
11731174
instance.filesystem = "filesystem_value"
11741175
instance.capacity_gib = 1247
11751176
instance.network = "network_value"
1177+
instance.per_unit_storage_throughput = 2931
11761178
11771179
request = lustre_v1.UpdateInstanceRequest(
11781180
instance=instance,
@@ -1466,7 +1468,10 @@ def sample_import_data():
14661468
request (Union[google.cloud.lustre_v1.types.ImportDataRequest, dict]):
14671469
The request object. Message for importing data to Lustre.
14681470
name (str):
1469-
Required. Name of the resource.
1471+
Required. The name of the Managed Lustre instance in the
1472+
format
1473+
``projects/{project}/locations/{location}/instances/{instance}``.
1474+
14701475
This corresponds to the ``name`` field
14711476
on the ``request`` instance; if ``request`` is provided, this
14721477
should not be set.
@@ -1588,8 +1593,8 @@ def sample_export_data():
15881593
15891594
Args:
15901595
request (Union[google.cloud.lustre_v1.types.ExportDataRequest, dict]):
1591-
The request object. Message for exporting data from
1592-
Lustre.
1596+
The request object. Export data from Managed Lustre to a
1597+
Cloud Storage bucket.
15931598
retry (google.api_core.retry.Retry): Designation of what errors, if any,
15941599
should be retried.
15951600
timeout (float): The timeout for this request.

packages/google-cloud-lustre/google/cloud/lustre_v1/services/lustre/transports/rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,8 +1087,8 @@ def __call__(
10871087
10881088
Args:
10891089
request (~.transfer.ExportDataRequest):
1090-
The request object. Message for exporting data from
1091-
Lustre.
1090+
The request object. Export data from Managed Lustre to a
1091+
Cloud Storage bucket.
10921092
retry (google.api_core.retry.Retry): Designation of what errors, if any,
10931093
should be retried.
10941094
timeout (float): The timeout for this request.

packages/google-cloud-lustre/google/cloud/lustre_v1/types/instance.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Instance(proto.Message):
5050
contain letters and numbers.
5151
capacity_gib (int):
5252
Required. The storage capacity of the instance in gibibytes
53-
(GiB). Allowed values are from ``18000`` to ``936000``, in
53+
(GiB). Allowed values are from ``18000`` to ``954000``, in
5454
increments of 9000.
5555
network (str):
5656
Required. Immutable. The full name of the VPC network to
@@ -73,9 +73,8 @@ class Instance(proto.Message):
7373
labels (MutableMapping[str, str]):
7474
Optional. Labels as key value pairs.
7575
per_unit_storage_throughput (int):
76-
Optional. The throughput of the instance in
77-
MB/s/TiB. Valid values are 250, 500, 1000.
78-
Default value is 1000.
76+
Required. The throughput of the instance in
77+
MB/s/TiB. Valid values are 125, 250, 500, 1000.
7978
gke_support_enabled (bool):
8079
Optional. Indicates whether you want to
8180
enable support for GKE clients. By default, GKE

packages/google-cloud-lustre/google/cloud/lustre_v1/types/transfer.py

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,26 @@ class ImportDataRequest(proto.Message):
6464
6565
Attributes:
6666
gcs_path (google.cloud.lustre_v1.types.GcsPath):
67-
The Cloud Storage source bucket and,
68-
optionally, path inside the bucket.
67+
The Cloud Storage source bucket and, optionally, path inside
68+
the bucket. If a path inside the bucket is specified, it
69+
must end with a forward slash (``/``).
6970
7071
This field is a member of `oneof`_ ``source``.
7172
lustre_path (google.cloud.lustre_v1.types.LustrePath):
7273
Lustre path destination.
7374
7475
This field is a member of `oneof`_ ``destination``.
7576
name (str):
76-
Required. Name of the resource.
77+
Required. The name of the Managed Lustre instance in the
78+
format
79+
``projects/{project}/locations/{location}/instances/{instance}``.
7780
request_id (str):
7881
Optional. UUID to identify requests.
7982
service_account (str):
8083
Optional. User-specified service account used
8184
to perform the transfer. If unspecified, the
82-
default Lustre P4 service account will be used.
85+
default Managed Lustre service agent will be
86+
used.
8387
"""
8488

8589
gcs_path: "GcsPath" = proto.Field(
@@ -109,21 +113,28 @@ class ImportDataRequest(proto.Message):
109113

110114

111115
class ExportDataRequest(proto.Message):
112-
r"""Message for exporting data from Lustre.
116+
r"""Export data from Managed Lustre to a Cloud Storage bucket.
113117
114118
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
115119
116120
Attributes:
117121
lustre_path (google.cloud.lustre_v1.types.LustrePath):
118-
Lustre path source.
122+
The root directory path to the Managed Lustre file system.
123+
Must start with ``/``. Default is ``/``.
119124
120125
This field is a member of `oneof`_ ``source``.
121126
gcs_path (google.cloud.lustre_v1.types.GcsPath):
122-
Cloud Storage destination.
127+
The URI to a Cloud Storage bucket, or a path within a
128+
bucket, using the format
129+
``gs://<bucket_name>/<optional_path_inside_bucket>/``. If a
130+
path inside the bucket is specified, it must end with a
131+
forward slash (``/``).
123132
124133
This field is a member of `oneof`_ ``destination``.
125134
name (str):
126-
Required. Name of the resource.
135+
Required. The name of the Managed Lustre instance in the
136+
format
137+
``projects/{project}/locations/{location}/instances/{instance}``.
127138
request_id (str):
128139
Optional. UUID to identify requests.
129140
service_account (str):
@@ -302,12 +313,16 @@ class ImportDataMetadata(proto.Message):
302313

303314

304315
class GcsPath(proto.Message):
305-
r"""Cloud Storage as the source of a data transfer.
316+
r"""Specifies a Cloud Storage bucket and, optionally, a path
317+
inside the bucket.
306318
307319
Attributes:
308320
uri (str):
309-
Required. URI to a Cloud Storage path in the format:
310-
``gs://<bucket_name>``.
321+
Required. The URI to a Cloud Storage bucket, or a path
322+
within a bucket, using the format
323+
``gs://<bucket_name>/<optional_path_inside_bucket>/``. If a
324+
path inside the bucket is specified, it must end with a
325+
forward slash (``/``).
311326
"""
312327

313328
uri: str = proto.Field(
@@ -317,12 +332,14 @@ class GcsPath(proto.Message):
317332

318333

319334
class LustrePath(proto.Message):
320-
r"""LustrePath represents a path in the Lustre file system.
335+
r"""The root directory path to the Lustre file system.
321336
322337
Attributes:
323338
path (str):
324-
Optional. Root directory path to the Managed Lustre file
325-
system, starting with ``/``. Defaults to ``/`` if unset.
339+
Optional. The root directory path to the Managed Lustre file
340+
system. Must start with ``/``. Default is ``/``. If you're
341+
importing data into Managed Lustre, any path other than the
342+
default must already exist on the file system.
326343
"""
327344

328345
path: str = proto.Field(

packages/google-cloud-lustre/samples/generated_samples/lustre_v1_generated_lustre_create_instance_async.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ async def sample_create_instance():
4343
instance.filesystem = "filesystem_value"
4444
instance.capacity_gib = 1247
4545
instance.network = "network_value"
46+
instance.per_unit_storage_throughput = 2931
4647

4748
request = lustre_v1.CreateInstanceRequest(
4849
parent="parent_value",

packages/google-cloud-lustre/samples/generated_samples/lustre_v1_generated_lustre_create_instance_sync.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def sample_create_instance():
4343
instance.filesystem = "filesystem_value"
4444
instance.capacity_gib = 1247
4545
instance.network = "network_value"
46+
instance.per_unit_storage_throughput = 2931
4647

4748
request = lustre_v1.CreateInstanceRequest(
4849
parent="parent_value",

packages/google-cloud-lustre/samples/generated_samples/lustre_v1_generated_lustre_update_instance_async.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ async def sample_update_instance():
4343
instance.filesystem = "filesystem_value"
4444
instance.capacity_gib = 1247
4545
instance.network = "network_value"
46+
instance.per_unit_storage_throughput = 2931
4647

4748
request = lustre_v1.UpdateInstanceRequest(
4849
instance=instance,

packages/google-cloud-lustre/samples/generated_samples/lustre_v1_generated_lustre_update_instance_sync.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def sample_update_instance():
4343
instance.filesystem = "filesystem_value"
4444
instance.capacity_gib = 1247
4545
instance.network = "network_value"
46+
instance.per_unit_storage_throughput = 2931
4647

4748
request = lustre_v1.UpdateInstanceRequest(
4849
instance=instance,

packages/google-cloud-lustre/samples/generated_samples/snippet_metadata_google.cloud.lustre.v1.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@
6868
"regionTag": "lustre_v1_generated_Lustre_CreateInstance_async",
6969
"segments": [
7070
{
71-
"end": 62,
71+
"end": 63,
7272
"start": 27,
7373
"type": "FULL"
7474
},
7575
{
76-
"end": 62,
76+
"end": 63,
7777
"start": 27,
7878
"type": "SHORT"
7979
},
@@ -83,18 +83,18 @@
8383
"type": "CLIENT_INITIALIZATION"
8484
},
8585
{
86-
"end": 52,
86+
"end": 53,
8787
"start": 41,
8888
"type": "REQUEST_INITIALIZATION"
8989
},
9090
{
91-
"end": 59,
92-
"start": 53,
91+
"end": 60,
92+
"start": 54,
9393
"type": "REQUEST_EXECUTION"
9494
},
9595
{
96-
"end": 63,
97-
"start": 60,
96+
"end": 64,
97+
"start": 61,
9898
"type": "RESPONSE_HANDLING"
9999
}
100100
],
@@ -156,12 +156,12 @@
156156
"regionTag": "lustre_v1_generated_Lustre_CreateInstance_sync",
157157
"segments": [
158158
{
159-
"end": 62,
159+
"end": 63,
160160
"start": 27,
161161
"type": "FULL"
162162
},
163163
{
164-
"end": 62,
164+
"end": 63,
165165
"start": 27,
166166
"type": "SHORT"
167167
},
@@ -171,18 +171,18 @@
171171
"type": "CLIENT_INITIALIZATION"
172172
},
173173
{
174-
"end": 52,
174+
"end": 53,
175175
"start": 41,
176176
"type": "REQUEST_INITIALIZATION"
177177
},
178178
{
179-
"end": 59,
180-
"start": 53,
179+
"end": 60,
180+
"start": 54,
181181
"type": "REQUEST_EXECUTION"
182182
},
183183
{
184-
"end": 63,
185-
"start": 60,
184+
"end": 64,
185+
"start": 61,
186186
"type": "RESPONSE_HANDLING"
187187
}
188188
],
@@ -1038,12 +1038,12 @@
10381038
"regionTag": "lustre_v1_generated_Lustre_UpdateInstance_async",
10391039
"segments": [
10401040
{
1041-
"end": 60,
1041+
"end": 61,
10421042
"start": 27,
10431043
"type": "FULL"
10441044
},
10451045
{
1046-
"end": 60,
1046+
"end": 61,
10471047
"start": 27,
10481048
"type": "SHORT"
10491049
},
@@ -1053,18 +1053,18 @@
10531053
"type": "CLIENT_INITIALIZATION"
10541054
},
10551055
{
1056-
"end": 50,
1056+
"end": 51,
10571057
"start": 41,
10581058
"type": "REQUEST_INITIALIZATION"
10591059
},
10601060
{
1061-
"end": 57,
1062-
"start": 51,
1061+
"end": 58,
1062+
"start": 52,
10631063
"type": "REQUEST_EXECUTION"
10641064
},
10651065
{
1066-
"end": 61,
1067-
"start": 58,
1066+
"end": 62,
1067+
"start": 59,
10681068
"type": "RESPONSE_HANDLING"
10691069
}
10701070
],
@@ -1122,12 +1122,12 @@
11221122
"regionTag": "lustre_v1_generated_Lustre_UpdateInstance_sync",
11231123
"segments": [
11241124
{
1125-
"end": 60,
1125+
"end": 61,
11261126
"start": 27,
11271127
"type": "FULL"
11281128
},
11291129
{
1130-
"end": 60,
1130+
"end": 61,
11311131
"start": 27,
11321132
"type": "SHORT"
11331133
},
@@ -1137,18 +1137,18 @@
11371137
"type": "CLIENT_INITIALIZATION"
11381138
},
11391139
{
1140-
"end": 50,
1140+
"end": 51,
11411141
"start": 41,
11421142
"type": "REQUEST_INITIALIZATION"
11431143
},
11441144
{
1145-
"end": 57,
1146-
"start": 51,
1145+
"end": 58,
1146+
"start": 52,
11471147
"type": "REQUEST_EXECUTION"
11481148
},
11491149
{
1150-
"end": 61,
1151-
"start": 58,
1150+
"end": 62,
1151+
"start": 59,
11521152
"type": "RESPONSE_HANDLING"
11531153
}
11541154
],

0 commit comments

Comments
 (0)