diff --git a/apis/io-engine/protobuf/v1/replica.proto b/apis/io-engine/protobuf/v1/replica.proto index 65598d3..60b109a 100644 --- a/apis/io-engine/protobuf/v1/replica.proto +++ b/apis/io-engine/protobuf/v1/replica.proto @@ -15,6 +15,7 @@ service ReplicaRpc { rpc ListReplicas (ListReplicaOptions) returns (ListReplicasResponse) {} rpc ShareReplica (ShareReplicaRequest) returns (Replica) {} rpc UnshareReplica (UnshareReplicaRequest) returns (Replica) {} + rpc ResizeReplica (ResizeReplicaRequest) returns (Replica) {} } // Replica space usage @@ -78,6 +79,13 @@ message UnshareReplicaRequest { string uuid = 1; // uuid of the replica } +// Resize(expand or shrink) a replica. Only valid for normal lvol +// replicas, and not lvols that are a snapshot. +message ResizeReplicaRequest { + string uuid = 1; // uuid of the replica. + uint64 requested_size = 2; // indicates the requested new size of replica. +} + // List of replicas and their properties. message ListReplicasResponse { repeated Replica replicas = 1; // list of the replicas diff --git a/apis/io-engine/src/v1.rs b/apis/io-engine/src/v1.rs index d14bd35..5c991e6 100644 --- a/apis/io-engine/src/v1.rs +++ b/apis/io-engine/src/v1.rs @@ -55,7 +55,8 @@ pub mod replica { replica_rpc_client::ReplicaRpcClient, replica_rpc_server::{ReplicaRpc, ReplicaRpcServer}, CreateReplicaRequest, DestroyReplicaRequest, ListReplicaOptions, ListReplicasResponse, - Replica, ReplicaSpaceUsage, ShareReplicaRequest, SnapshotInfo, UnshareReplicaRequest, + Replica, ReplicaSpaceUsage, ResizeReplicaRequest, ShareReplicaRequest, SnapshotInfo, + UnshareReplicaRequest, }; } pub mod snapshot {