Skip to content

Commit

Permalink
feat: [netapp] Enable creation of Onprem Migration in CreateVolume (#…
Browse files Browse the repository at this point in the history
…5837)

* feat: Enable creation of Onprem Migration in CreateVolume
feat: Add EstablishPeering API for Onprem Migration
feat: Add Sync API for Replications
feat: Add new Active Directory state for AD Diagnostics support
docs: Docs now do not allow underscore in IDs of various Resources

PiperOrigin-RevId: 699033921

Source-Link: googleapis/googleapis@005b0fd

Source-Link: googleapis/googleapis-gen@a47d42c
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldGFwcC8uT3dsQm90LnlhbWwiLCJoIjoiYTQ3ZDQyY2VlNGE5NmQ4NGMwZjlkODMxN2ZjNTFlYWE1ZGJlZDRhZiJ9

* 🦉 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Dec 2, 2024
1 parent 338106a commit 068e928
Show file tree
Hide file tree
Showing 31 changed files with 14,202 additions and 10,267 deletions.
2 changes: 2 additions & 0 deletions packages/google-cloud-netapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Net_app.delete_storage_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.delete_storage_pool.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.delete_volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.delete_volume.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.encrypt_volumes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.encrypt_volumes.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.establish_peering | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.establish_peering.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.get_active_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.get_active_directory.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.get_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.get_backup_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.get_backup_policy.js,packages/google-cloud-netapp/samples/README.md) |
Expand All @@ -158,6 +159,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Net_app.revert_volume | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.revert_volume.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.stop_replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.stop_replication.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.switch_active_replica_zone | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.switch_active_replica_zone.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.sync_replication | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.sync_replication.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.update_active_directory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.update_active_directory.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.update_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.update_backup.js,packages/google-cloud-netapp/samples/README.md) |
| Net_app.update_backup_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-netapp/samples/generated/v1/net_app.update_backup_policy.js,packages/google-cloud-netapp/samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ message CreateActiveDirectoryRequest {
ActiveDirectory active_directory = 2 [(google.api.field_behavior) = REQUIRED];

// Required. ID of the active directory to create. Must be unique within the
// parent resource. Must contain only letters, numbers, underscore and hyphen,
// with the first character a letter or underscore, the last a letter or
// underscore or a number, and a 63 character maximum.
// parent resource. Must contain only letters, numbers and hyphen, with the
// first character a letter , the last a letter or a number, and a 63
// character maximum.
string active_directory_id = 3 [(google.api.field_behavior) = REQUIRED];
}

Expand Down Expand Up @@ -152,6 +152,9 @@ message ActiveDirectory {

// Active Directory State is Error
ERROR = 6;

// Active Directory State is Diagnosing.
DIAGNOSING = 7;
}

// Identifier. The resource name of the active directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ message CreateBackupRequest {

// Required. The ID to use for the backup.
// The ID must be unique within the specified backupVault.
// Must contain only letters, numbers, underscore and hyphen, with the first
// character a letter or underscore, the last a letter or underscore or a
// Must contain only letters, numbers and hyphen, with the first
// character a letter, the last a letter or a
// number, and a 63 character maximum.
string backup_id = 2 [(google.api.field_behavior) = REQUIRED];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ message CreateBackupPolicyRequest {

// Required. The ID to use for the backup policy.
// The ID must be unique within the specified location.
// Must contain only letters, numbers, underscore and hyphen, with the first
// character a letter or underscore, the last a letter or underscore or a
// Must contain only letters, numbers and hyphen, with the first
// character a letter, the last a letter or a
// number, and a 63 character maximum.
string backup_policy_id = 3 [(google.api.field_behavior) = REQUIRED];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ message CreateBackupVaultRequest {

// Required. The ID to use for the backupVault.
// The ID must be unique within the specified location.
// Must contain only letters, numbers, underscore and hyphen, with the first
// character a letter or underscore, the last a letter or underscore or a
// Must contain only letters, numbers and hyphen, with the first
// character a letter, the last a letter or a
// number, and a 63 character maximum.
string backup_vault_id = 2 [(google.api.field_behavior) = REQUIRED];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,33 @@ service NetApp {
};
}

// Establish replication peering.
rpc EstablishPeering(EstablishPeeringRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "Replication"
metadata_type: "OperationMetadata"
};
}

// Syncs the replication. This will invoke one time volume data transfer from
// source to destination.
rpc SyncReplication(SyncReplicationRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "Replication"
metadata_type: "OperationMetadata"
};
}

// Creates new backup vault
rpc CreateBackupVault(CreateBackupVaultRequest)
returns (google.longrunning.Operation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ message CreateKmsConfigRequest {
];

// Required. Id of the requesting KmsConfig. Must be unique within the parent
// resource. Must contain only letters, numbers, underscore and hyphen, with
// the first character a letter or underscore, the last a letter or underscore
// or a number, and a 63 character maximum.
// resource. Must contain only letters, numbers and hyphen, with the first
// character a letter, the last a letter or a
// number, and a 63 character maximum.
string kms_config_id = 2 [(google.api.field_behavior) = REQUIRED];

// Required. The required parameters to create a new KmsConfig.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package google.cloud.netapp.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/netapp/v1/volume.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
Expand Down Expand Up @@ -90,6 +91,12 @@ message Replication {

// Replication is in error state.
ERROR = 6;

// Replication is waiting for cluster peering to be established.
PENDING_CLUSTER_PEERING = 8;

// Replication is waiting for SVM peering to be established.
PENDING_SVM_PEERING = 9;
}

// New enum values may be added in future to support different replication
Expand Down Expand Up @@ -140,6 +147,24 @@ message Replication {

// Incremental replication is in progress.
TRANSFERRING = 4;

// Baseline replication is in progress.
BASELINE_TRANSFERRING = 5;

// Replication is aborted.
ABORTED = 6;
}

// Hybrid replication type.
enum HybridReplicationType {
// Unspecified hybrid replication type.
HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0;

// Hybrid replication type for migration.
MIGRATION = 1;

// Hybrid replication type for continuous replication.
CONTINUOUS_REPLICATION = 2;
}

// Identifier. The resource name of the Replication.
Expand Down Expand Up @@ -202,6 +227,35 @@ message Replication {
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = { type: "netapp.googleapis.com/Volume" }
];

// Output only. Hybrid peering details.
HybridPeeringDetails hybrid_peering_details = 16
[(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. Location of the user cluster.
string cluster_location = 18 [(google.api.field_behavior) = OPTIONAL];

// Output only. Type of the hybrid replication.
HybridReplicationType hybrid_replication_type = 19
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// HybridPeeringDetails contains details about the hybrid peering.
message HybridPeeringDetails {
// Optional. IP address of the subnet.
string subnet_ip = 1 [(google.api.field_behavior) = OPTIONAL];

// Optional. Copy-paste-able commands to be used on user's ONTAP to accept
// peering requests.
string command = 2 [(google.api.field_behavior) = OPTIONAL];

// Optional. Expiration time for the peering command to be executed on user's
// ONTAP.
google.protobuf.Timestamp command_expiry_time = 3
[(google.api.field_behavior) = OPTIONAL];

// Optional. Temporary passphrase generated to accept cluster peering command.
string passphrase = 4 [(google.api.field_behavior) = OPTIONAL];
}

// ListReplications lists replications.
Expand Down Expand Up @@ -278,6 +332,10 @@ message DestinationVolumeParameters {

// Description for the destination volume.
optional string description = 4;

// Optional. Tiering policy for the volume.
optional TieringPolicy tiering_policy = 5
[(google.api.field_behavior) = OPTIONAL];
}

// CreateReplicationRequest creates a replication.
Expand All @@ -295,9 +353,9 @@ message CreateReplicationRequest {
Replication replication = 2 [(google.api.field_behavior) = REQUIRED];

// Required. ID of the replication to create. Must be unique within the parent
// resource. Must contain only letters, numbers, underscore and hyphen, with
// the first character a letter or underscore, the last a letter or underscore
// or a number, and a 63 character maximum.
// resource. Must contain only letters, numbers and hyphen, with the first
// character a letter, the last a letter or a
// number, and a 63 character maximum.
string replication_id = 3 [(google.api.field_behavior) = REQUIRED];
}

Expand Down Expand Up @@ -368,3 +426,44 @@ message ReverseReplicationDirectionRequest {
}
];
}

// EstablishPeeringRequest establishes cluster and svm peerings between the
// source and the destination replications.
message EstablishPeeringRequest {
// Required. The resource name of the replication, in the format of
// projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "netapp.googleapis.com/Replication"
}
];

// Required. Name of the user's local source cluster to be peered with the
// destination cluster.
string peer_cluster_name = 2 [(google.api.field_behavior) = REQUIRED];

// Required. Name of the user's local source vserver svm to be peered with the
// destination vserver svm.
string peer_svm_name = 3 [(google.api.field_behavior) = REQUIRED];

// Optional. List of IPv4 ip addresses to be used for peering.
repeated string peer_ip_addresses = 4
[(google.api.field_behavior) = OPTIONAL];

// Required. Name of the user's local source volume to be peered with the
// destination volume.
string peer_volume_name = 5 [(google.api.field_behavior) = REQUIRED];
}

// SyncReplicationRequest syncs the replication from source to destination.
message SyncReplicationRequest {
// Required. The resource name of the replication, in the format of
// projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "netapp.googleapis.com/Replication"
}
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ message CreateSnapshotRequest {
Snapshot snapshot = 2 [(google.api.field_behavior) = REQUIRED];

// Required. ID of the snapshot to create. Must be unique within the parent
// resource. Must contain only letters, numbers, underscore and hyphen, with
// the first character a letter or underscore, the last a letter or underscore
// or a number, and a 63 character maximum.
// resource. Must contain only letters, numbers and hyphen, with the first
// character a letter, the last a letter or a
// number, and a 63 character maximum.
string snapshot_id = 3 [(google.api.field_behavior) = REQUIRED];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ message CreateStoragePoolRequest {
];

// Required. Id of the requesting storage pool. Must be unique within the
// parent resource. Must contain only letters, numbers, underscore and hyphen,
// with the first character a letter or underscore, the last a letter or
// underscore or a number, and a 63 character maximum.
// parent resource. Must contain only letters, numbers and hyphen, with the
// first character a letter, the last a letter or a number, and a 63 character
// maximum.
string storage_pool_id = 2 [(google.api.field_behavior) = REQUIRED];

// Required. The required parameters to create a new storage pool.
Expand Down
Loading

0 comments on commit 068e928

Please sign in to comment.