Skip to content

Commit a90dc55

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add ONTAP passthrough APIs
Adds the following new methods for direct ONTAP API interaction: - ExecuteOntapPost - ExecuteOntapGet - ExecuteOntapDelete - ExecuteOntapPatch `StoragePoolType` docs: A comment for field `source_volume` in message `.google.cloud.netapp.v1.Backup` is changed docs: A comment for field `type` in message `.google.cloud.netapp.v1.StoragePool` is changed docs: A comment for field `source_backup` in message `.google.cloud.netapp.v1.RestoreParameters` is changed fix!: An existing value `UNIFIED_LARGE_CAPACITY` is removed from enum `StoragePoolType` PiperOrigin-RevId: 889585893
1 parent 1e1ca41 commit a90dc55

File tree

8 files changed

+276
-9
lines changed

8 files changed

+276
-9
lines changed

google/cloud/netapp/v1/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ proto_library(
3232
"common.proto",
3333
"host_group.proto",
3434
"kms.proto",
35+
"ontap.proto",
3536
"quota_rule.proto",
3637
"replication.proto",
3738
"snapshot.proto",
@@ -48,6 +49,7 @@ proto_library(
4849
"@com_google_protobuf//:duration_proto",
4950
"@com_google_protobuf//:empty_proto",
5051
"@com_google_protobuf//:field_mask_proto",
52+
"@com_google_protobuf//:struct_proto",
5153
"@com_google_protobuf//:timestamp_proto",
5254
],
5355
)
@@ -164,6 +166,7 @@ go_gapic_library(
164166
"@com_google_cloud_go_longrunning//:go_default_library",
165167
"@com_google_cloud_go_longrunning//autogen:go_default_library",
166168
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
169+
"@io_bazel_rules_go//proto/wkt:struct_go_proto",
167170
],
168171
)
169172

@@ -353,6 +356,7 @@ load(
353356

354357
csharp_proto_library(
355358
name = "netapp_csharp_proto",
359+
extra_opts = [],
356360
deps = [":netapp_proto"],
357361
)
358362

google/cloud/netapp/v1/backup.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ message Backup {
100100
Type backup_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
101101

102102
// Volume full name of this backup belongs to.
103+
// Either source_volume or ontap_source should be provided.
103104
// Format:
104105
// `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
105106
string source_volume = 6 [

google/cloud/netapp/v1/cloud_netapp_service.proto

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import "google/cloud/netapp/v1/backup_policy.proto";
2626
import "google/cloud/netapp/v1/backup_vault.proto";
2727
import "google/cloud/netapp/v1/host_group.proto";
2828
import "google/cloud/netapp/v1/kms.proto";
29+
import "google/cloud/netapp/v1/ontap.proto";
2930
import "google/cloud/netapp/v1/quota_rule.proto";
3031
import "google/cloud/netapp/v1/replication.proto";
3132
import "google/cloud/netapp/v1/snapshot.proto";
@@ -208,6 +209,20 @@ service NetApp {
208209
};
209210
}
210211

212+
// Establish volume peering. This is used to establish cluster and svm
213+
// peerings between the GCNV and OnPrem clusters.
214+
rpc EstablishVolumePeering(EstablishVolumePeeringRequest)
215+
returns (google.longrunning.Operation) {
216+
option (google.api.http) = {
217+
post: "/v1/{name=projects/*/locations/*/volumes/*}:establishPeering"
218+
body: "*"
219+
};
220+
option (google.longrunning.operation_info) = {
221+
response_type: "Volume"
222+
metadata_type: "OperationMetadata"
223+
};
224+
}
225+
211226
// Returns descriptions of all snapshots for a volume.
212227
rpc ListSnapshots(ListSnapshotsRequest) returns (ListSnapshotsResponse) {
213228
option (google.api.http) = {
@@ -832,6 +847,44 @@ service NetApp {
832847
metadata_type: "OperationMetadata"
833848
};
834849
}
850+
851+
// `ExecuteOntapPost` dispatches the ONTAP `POST` request to the
852+
// `StoragePool` cluster.
853+
rpc ExecuteOntapPost(ExecuteOntapPostRequest)
854+
returns (ExecuteOntapPostResponse) {
855+
option (google.api.http) = {
856+
post: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}"
857+
body: "*"
858+
};
859+
}
860+
861+
// `ExecuteOntapGet` dispatches the ONTAP `GET` request to the
862+
// `StoragePool` cluster.
863+
rpc ExecuteOntapGet(ExecuteOntapGetRequest)
864+
returns (ExecuteOntapGetResponse) {
865+
option (google.api.http) = {
866+
get: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}"
867+
};
868+
}
869+
870+
// `ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the
871+
// `StoragePool` cluster.
872+
rpc ExecuteOntapDelete(ExecuteOntapDeleteRequest)
873+
returns (ExecuteOntapDeleteResponse) {
874+
option (google.api.http) = {
875+
delete: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}"
876+
};
877+
}
878+
879+
// `ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the
880+
// `StoragePool` cluster.
881+
rpc ExecuteOntapPatch(ExecuteOntapPatchRequest)
882+
returns (ExecuteOntapPatchResponse) {
883+
option (google.api.http) = {
884+
patch: "/v1/{ontap_path=projects/*/locations/*/storagePools/*/ontap/**}"
885+
body: "*"
886+
};
887+
}
835888
}
836889

837890
// Represents the metadata of the long-running operation.

google/cloud/netapp/v1/common.proto

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ enum StoragePoolType {
8787

8888
// Storage pool type is unified.
8989
UNIFIED = 2;
90-
91-
// Storage pool type is unified large capacity.
92-
UNIFIED_LARGE_CAPACITY = 3;
9390
}
9491

9592
// Schedule for Hybrid Replication.

google/cloud/netapp/v1/netapp_v1.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,24 @@ documentation:
2222
description: Gets information about a location.
2323

2424
- selector: google.cloud.location.Locations.ListLocations
25-
description: Lists information about the supported locations for this service.
25+
description: |-
26+
Lists information about the supported locations for this service.
27+
28+
This method lists locations based on the resource scope provided in
29+
the [ListLocationsRequest.name] field:
30+
31+
* **Global locations**: If `name` is empty, the method lists the
32+
public locations available to all projects. * **Project-specific
33+
locations**: If `name` follows the format
34+
`projects/{project}`, the method lists locations visible to that
35+
specific project. This includes public, private, or other
36+
project-specific locations enabled for the project.
37+
38+
For gRPC and client library implementations, the resource name is
39+
passed as the `name` field. For direct service calls, the resource
40+
name is
41+
incorporated into the request path based on the specific service
42+
implementation and version.
2643
2744
http:
2845
rules:

google/cloud/netapp/v1/ontap.proto

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
// Copyright 2026 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+
// http://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+
syntax = "proto3";
16+
17+
package google.cloud.netapp.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/protobuf/struct.proto";
21+
22+
option csharp_namespace = "Google.Cloud.NetApp.V1";
23+
option go_package = "cloud.google.com/go/netapp/apiv1/netapppb;netapppb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "OntapProto";
26+
option java_package = "com.google.cloud.netapp.v1";
27+
option php_namespace = "Google\\Cloud\\NetApp\\V1";
28+
option ruby_package = "Google::Cloud::NetApp::V1";
29+
30+
// Request message for `ExecuteOntapPost` API.
31+
message ExecuteOntapPostRequest {
32+
// Required. The raw `JSON` body of the request.
33+
// The body should be in the format of the ONTAP resource.
34+
// For example:
35+
// ```
36+
// {
37+
// "body": {
38+
// "field1": "value1",
39+
// "field2": "value2",
40+
// }
41+
// }
42+
// ```
43+
google.protobuf.Struct body = 2 [(google.api.field_behavior) = REQUIRED];
44+
45+
// Required. The resource path of the ONTAP resource.
46+
// Format:
47+
// `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`.
48+
// For example:
49+
// `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`.
50+
string ontap_path = 3 [(google.api.field_behavior) = REQUIRED];
51+
}
52+
53+
// Response message for `ExecuteOntapPost` API.
54+
message ExecuteOntapPostResponse {
55+
// The raw `JSON` body of the response.
56+
google.protobuf.Struct body = 1;
57+
}
58+
59+
// Request message for `ExecuteOntapGet` API.
60+
message ExecuteOntapGetRequest {
61+
// Required. The resource path of the ONTAP resource.
62+
// Format:
63+
// `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`.
64+
// For example:
65+
// `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`.
66+
string ontap_path = 1 [(google.api.field_behavior) = REQUIRED];
67+
}
68+
69+
// Response message for `ExecuteOntapGet` API.
70+
message ExecuteOntapGetResponse {
71+
// The raw `JSON` body of the response.
72+
google.protobuf.Struct body = 1;
73+
}
74+
75+
// Request message for `ExecuteOntapDelete` API.
76+
message ExecuteOntapDeleteRequest {
77+
// Required. The resource path of the ONTAP resource.
78+
// Format:
79+
// `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`.
80+
// For example:
81+
// `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`.
82+
string ontap_path = 2 [(google.api.field_behavior) = REQUIRED];
83+
}
84+
85+
// Response message for `ExecuteOntapDelete` API.
86+
message ExecuteOntapDeleteResponse {
87+
// The raw `JSON` body of the response.
88+
google.protobuf.Struct body = 1;
89+
}
90+
91+
// Request message for `ExecuteOntapPatch` API.
92+
message ExecuteOntapPatchRequest {
93+
// Required. The raw `JSON` body of the request.
94+
// The body should be in the format of the ONTAP resource.
95+
// For example:
96+
// ```
97+
// {
98+
// "body": {
99+
// "field1": "value1",
100+
// "field2": "value2",
101+
// }
102+
// }
103+
// ```
104+
google.protobuf.Struct body = 2 [(google.api.field_behavior) = REQUIRED];
105+
106+
// Required. The resource path of the ONTAP resource.
107+
// Format:
108+
// `projects/{project_number}/locations/{location_id}/storagePools/{storage_pool_id}/ontap/{ontap_resource_path}`.
109+
// For example:
110+
// `projects/123456789/locations/us-central1/storagePools/my-storage-pool/ontap/api/storage/volumes`.
111+
string ontap_path = 3 [(google.api.field_behavior) = REQUIRED];
112+
}
113+
114+
// Response message for `ExecuteOntapPatch` API.
115+
message ExecuteOntapPatchResponse {
116+
// The raw `JSON` body of the response.
117+
google.protobuf.Struct body = 1;
118+
}

google/cloud/netapp/v1/storage_pool.proto

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@ option java_package = "com.google.cloud.netapp.v1";
3030
option php_namespace = "Google\\Cloud\\NetApp\\V1";
3131
option ruby_package = "Google::Cloud::NetApp::V1";
3232

33+
// `Mode` of the storage pool or volume. This field is used to control whether
34+
// the resource is managed by the GCNV APIs or the GCNV ONTAP Mode APIs.
35+
enum Mode {
36+
// The `Mode` is not specified.
37+
MODE_UNSPECIFIED = 0;
38+
39+
// The resource is managed by the GCNV APIs.
40+
DEFAULT = 1;
41+
42+
// The resource is managed by the GCNV ONTAP Mode APIs.
43+
ONTAP = 2;
44+
}
45+
3346
// GetStoragePoolRequest gets a Storage Pool.
3447
message GetStoragePoolRequest {
3548
// Required. Name of the storage pool
@@ -302,10 +315,14 @@ message StoragePool {
302315

303316
// Optional. Type of the storage pool. This field is used to control whether
304317
// the pool supports `FILE` based volumes only or `UNIFIED` (both `FILE` and
305-
// `BLOCK`) volumes or `UNIFIED_LARGE_CAPACITY` (both `FILE` and `BLOCK`)
306-
// volumes with large capacity. If not specified during creation, it defaults
307-
// to `FILE`.
318+
// `BLOCK`) volumes. If not specified during creation, it defaults to `FILE`.
308319
optional StoragePoolType type = 35 [(google.api.field_behavior) = OPTIONAL];
320+
321+
// Optional. Mode of the storage pool. This field is used to control whether
322+
// the user can perform the ONTAP operations on the storage pool using the
323+
// GCNV ONTAP Mode APIs. If not specified during creation, it defaults to
324+
// `DEFAULT`.
325+
optional Mode mode = 36 [(google.api.field_behavior) = OPTIONAL];
309326
}
310327

311328
// ValidateDirectoryServiceRequest validates the directory service policy

google/cloud/netapp/v1/volume.proto

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,31 @@ message Volume {
236236
singular: "volume"
237237
};
238238

239+
// Details about a clone volume.
240+
message CloneDetails {
241+
// Output only. Specifies the full resource name of the source snapshot from
242+
// which this volume was cloned. Format:
243+
// projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}
244+
string source_snapshot = 1 [
245+
(google.api.field_behavior) = OUTPUT_ONLY,
246+
(google.api.resource_reference) = {
247+
type: "netapp.googleapis.com/Snapshot"
248+
}
249+
];
250+
251+
// Output only. Full name of the source volume resource.
252+
// Format:
253+
// projects/{project}/locations/{location}/volumes/{volume}
254+
string source_volume = 2 [
255+
(google.api.field_behavior) = OUTPUT_ONLY,
256+
(google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" }
257+
];
258+
259+
// Output only. Shared space in GiB. Determined at volume creation time
260+
// based on size of source snapshot.
261+
int64 shared_space_gib = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
262+
}
263+
239264
// The volume states
240265
enum State {
241266
// Unspecified Volume State
@@ -438,6 +463,10 @@ message Volume {
438463
// Currently, only one block device is permitted per Volume.
439464
repeated BlockDevice block_devices = 45
440465
[(google.api.field_behavior) = OPTIONAL];
466+
467+
// Output only. If this volume is a clone, this field contains details about
468+
// the clone.
469+
CloneDetails clone_details = 47 [(google.api.field_behavior) = OUTPUT_ONLY];
441470
}
442471

443472
// Defines the export policy for the volume.
@@ -634,9 +663,13 @@ message RestoreParameters {
634663
string source_snapshot = 1;
635664

636665
// Full name of the backup resource.
637-
// Format:
666+
// Format for standard backup:
638667
// projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}
639-
string source_backup = 2;
668+
// Format for BackupDR backup:
669+
// projects/{project}/locations/{location}/backupVaults/{backup_vault}/dataSources/{data_source}/backups/{backup}
670+
string source_backup = 2 [
671+
(google.api.resource_reference) = { type: "netapp.googleapis.com/Backup" }
672+
];
640673
}
641674
}
642675

@@ -960,3 +993,30 @@ message RestoreBackupFilesRequest {
960993

961994
// RestoreBackupFilesResponse is the result of RestoreBackupFilesRequest.
962995
message RestoreBackupFilesResponse {}
996+
997+
// EstablishVolumePeeringRequest establishes cluster and svm peerings between
998+
// the source and destination clusters.
999+
message EstablishVolumePeeringRequest {
1000+
// Required. The volume resource name, in the format
1001+
// `projects/{project_id}/locations/{location}/volumes/{volume_id}`
1002+
string name = 1 [
1003+
(google.api.field_behavior) = REQUIRED,
1004+
(google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" }
1005+
];
1006+
1007+
// Required. Name of the user's local source cluster to be peered with the
1008+
// destination cluster.
1009+
string peer_cluster_name = 2 [(google.api.field_behavior) = REQUIRED];
1010+
1011+
// Required. Name of the user's local source vserver svm to be peered with the
1012+
// destination vserver svm.
1013+
string peer_svm_name = 3 [(google.api.field_behavior) = REQUIRED];
1014+
1015+
// Optional. List of IPv4 ip addresses to be used for peering.
1016+
repeated string peer_ip_addresses = 4
1017+
[(google.api.field_behavior) = OPTIONAL];
1018+
1019+
// Required. Name of the user's local source volume to be peered with the
1020+
// destination volume.
1021+
string peer_volume_name = 5 [(google.api.field_behavior) = REQUIRED];
1022+
}

0 commit comments

Comments
 (0)