Skip to content

Commit 3c72b64

Browse files
fix: [Lustre] Changed field behavior for an existing field per_unit_storage_throughput. It is now required (#8359)
* fix: Changed field behavior for an existing field per_unit_storage_throughput. It is now required docs: expand on and update various comments PiperOrigin-RevId: 766812120 Source-Link: googleapis/googleapis@85d120d Source-Link: googleapis/googleapis-gen@40a2bce Copy-Tag: eyJwIjoiTHVzdHJlLy5Pd2xCb3QueWFtbCIsImgiOiI0MGEyYmNlODdhM2FmN2JhOTA2ZGU2YmVmMTUyMjBlMzA4ZTg0YzYwIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 53f9dba commit 3c72b64

11 files changed

Lines changed: 159 additions & 92 deletions

File tree

Lustre/metadata/V1/Instance.php

0 Bytes
Binary file not shown.

Lustre/samples/V1/LustreClient/create_instance.php

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,32 +33,35 @@
3333
/**
3434
* Creates a new instance in a given project and location.
3535
*
36-
* @param string $formattedParent The instance's project and location, in the format
37-
* `projects/{project}/locations/{location}`. Locations map to Google Cloud
38-
* zones; for example, `us-west1-b`. Please see
39-
* {@see LustreClient::locationName()} for help formatting this field.
40-
* @param string $instanceId The name of the Managed Lustre instance.
36+
* @param string $formattedParent The instance's project and location, in the format
37+
* `projects/{project}/locations/{location}`. Locations map to Google Cloud
38+
* zones; for example, `us-west1-b`. Please see
39+
* {@see LustreClient::locationName()} for help formatting this field.
40+
* @param string $instanceId The name of the Managed Lustre instance.
4141
*
42-
* * Must contain only lowercase letters, numbers, and hyphens.
43-
* * Must start with a letter.
44-
* * Must be between 1-63 characters.
45-
* * Must end with a number or a letter.
46-
* @param string $instanceFilesystem Immutable. The filesystem name for this instance. This name is
47-
* used by client-side tools, including when mounting the instance. Must be
48-
* eight characters or less and can only contain letters and numbers.
49-
* @param int $instanceCapacityGib The storage capacity of the instance in gibibytes (GiB). Allowed
50-
* values are from `18000` to `936000`, in increments of 9000.
51-
* @param string $formattedInstanceNetwork Immutable. The full name of the VPC network to which the instance
52-
* is connected. Must be in the format
53-
* `projects/{project_id}/global/networks/{network_name}`. Please see
54-
* {@see LustreClient::networkName()} for help formatting this field.
42+
* * Must contain only lowercase letters, numbers, and hyphens.
43+
* * Must start with a letter.
44+
* * Must be between 1-63 characters.
45+
* * Must end with a number or a letter.
46+
* @param string $instanceFilesystem Immutable. The filesystem name for this instance. This name is
47+
* used by client-side tools, including when mounting the instance. Must be
48+
* eight characters or less and can only contain letters and numbers.
49+
* @param int $instanceCapacityGib The storage capacity of the instance in gibibytes (GiB). Allowed
50+
* values are from `18000` to `954000`, in increments of 9000.
51+
* @param string $formattedInstanceNetwork Immutable. The full name of the VPC network to which the instance
52+
* is connected. Must be in the format
53+
* `projects/{project_id}/global/networks/{network_name}`. Please see
54+
* {@see LustreClient::networkName()} for help formatting this field.
55+
* @param int $instancePerUnitStorageThroughput The throughput of the instance in MB/s/TiB.
56+
* Valid values are 125, 250, 500, 1000.
5557
*/
5658
function create_instance_sample(
5759
string $formattedParent,
5860
string $instanceId,
5961
string $instanceFilesystem,
6062
int $instanceCapacityGib,
61-
string $formattedInstanceNetwork
63+
string $formattedInstanceNetwork,
64+
int $instancePerUnitStorageThroughput
6265
): void {
6366
// Create a client.
6467
$lustreClient = new LustreClient();
@@ -67,7 +70,8 @@ function create_instance_sample(
6770
$instance = (new Instance())
6871
->setFilesystem($instanceFilesystem)
6972
->setCapacityGib($instanceCapacityGib)
70-
->setNetwork($formattedInstanceNetwork);
73+
->setNetwork($formattedInstanceNetwork)
74+
->setPerUnitStorageThroughput($instancePerUnitStorageThroughput);
7175
$request = (new CreateInstanceRequest())
7276
->setParent($formattedParent)
7377
->setInstanceId($instanceId)
@@ -109,13 +113,15 @@ function callSample(): void
109113
$instanceFilesystem = '[FILESYSTEM]';
110114
$instanceCapacityGib = 0;
111115
$formattedInstanceNetwork = LustreClient::networkName('[PROJECT]', '[NETWORK]');
116+
$instancePerUnitStorageThroughput = 0;
112117

113118
create_instance_sample(
114119
$formattedParent,
115120
$instanceId,
116121
$instanceFilesystem,
117122
$instanceCapacityGib,
118-
$formattedInstanceNetwork
123+
$formattedInstanceNetwork,
124+
$instancePerUnitStorageThroughput
119125
);
120126
}
121127
// [END lustre_v1_generated_Lustre_CreateInstance_sync]

Lustre/samples/V1/LustreClient/export_data.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
/**
3434
* Exports data from a Managed Lustre instance to Cloud Storage.
3535
*
36-
* @param string $formattedName Name of the resource. Please see
36+
* @param string $formattedName The name of the Managed Lustre instance in the format
37+
* `projects/{project}/locations/{location}/instances/{instance}`. Please see
3738
* {@see LustreClient::instanceName()} for help formatting this field.
3839
*/
3940
function export_data_sample(string $formattedName): void

Lustre/samples/V1/LustreClient/import_data.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
/**
3434
* Imports data from Cloud Storage to a Managed Lustre instance.
3535
*
36-
* @param string $formattedName Name of the resource. Please see
36+
* @param string $formattedName The name of the Managed Lustre instance in the format
37+
* `projects/{project}/locations/{location}/instances/{instance}`. Please see
3738
* {@see LustreClient::instanceName()} for help formatting this field.
3839
*/
3940
function import_data_sample(string $formattedName): void

Lustre/samples/V1/LustreClient/update_instance.php

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,23 @@
3333
/**
3434
* Updates the parameters of a single instance.
3535
*
36-
* @param string $instanceFilesystem Immutable. The filesystem name for this instance. This name is
37-
* used by client-side tools, including when mounting the instance. Must be
38-
* eight characters or less and can only contain letters and numbers.
39-
* @param int $instanceCapacityGib The storage capacity of the instance in gibibytes (GiB). Allowed
40-
* values are from `18000` to `936000`, in increments of 9000.
41-
* @param string $formattedInstanceNetwork Immutable. The full name of the VPC network to which the instance
42-
* is connected. Must be in the format
43-
* `projects/{project_id}/global/networks/{network_name}`. Please see
44-
* {@see LustreClient::networkName()} for help formatting this field.
36+
* @param string $instanceFilesystem Immutable. The filesystem name for this instance. This name is
37+
* used by client-side tools, including when mounting the instance. Must be
38+
* eight characters or less and can only contain letters and numbers.
39+
* @param int $instanceCapacityGib The storage capacity of the instance in gibibytes (GiB). Allowed
40+
* values are from `18000` to `954000`, in increments of 9000.
41+
* @param string $formattedInstanceNetwork Immutable. The full name of the VPC network to which the instance
42+
* is connected. Must be in the format
43+
* `projects/{project_id}/global/networks/{network_name}`. Please see
44+
* {@see LustreClient::networkName()} for help formatting this field.
45+
* @param int $instancePerUnitStorageThroughput The throughput of the instance in MB/s/TiB.
46+
* Valid values are 125, 250, 500, 1000.
4547
*/
4648
function update_instance_sample(
4749
string $instanceFilesystem,
4850
int $instanceCapacityGib,
49-
string $formattedInstanceNetwork
51+
string $formattedInstanceNetwork,
52+
int $instancePerUnitStorageThroughput
5053
): void {
5154
// Create a client.
5255
$lustreClient = new LustreClient();
@@ -55,7 +58,8 @@ function update_instance_sample(
5558
$instance = (new Instance())
5659
->setFilesystem($instanceFilesystem)
5760
->setCapacityGib($instanceCapacityGib)
58-
->setNetwork($formattedInstanceNetwork);
61+
->setNetwork($formattedInstanceNetwork)
62+
->setPerUnitStorageThroughput($instancePerUnitStorageThroughput);
5963
$request = (new UpdateInstanceRequest())
6064
->setInstance($instance);
6165

@@ -93,7 +97,13 @@ function callSample(): void
9397
$instanceFilesystem = '[FILESYSTEM]';
9498
$instanceCapacityGib = 0;
9599
$formattedInstanceNetwork = LustreClient::networkName('[PROJECT]', '[NETWORK]');
100+
$instancePerUnitStorageThroughput = 0;
96101

97-
update_instance_sample($instanceFilesystem, $instanceCapacityGib, $formattedInstanceNetwork);
102+
update_instance_sample(
103+
$instanceFilesystem,
104+
$instanceCapacityGib,
105+
$formattedInstanceNetwork,
106+
$instancePerUnitStorageThroughput
107+
);
98108
}
99109
// [END lustre_v1_generated_Lustre_UpdateInstance_sync]

Lustre/src/V1/ExportDataRequest.php

Lines changed: 27 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lustre/src/V1/GcsPath.php

Lines changed: 17 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)