Skip to content

Commit

Permalink
feat(replica/resize): api for resizing a replica
Browse files Browse the repository at this point in the history
Signed-off-by: Diwakar Sharma <[email protected]>
  • Loading branch information
dsharma-dc committed Dec 11, 2023
1 parent dca05e3 commit 3b87b03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions apis/io-engine/protobuf/v1/replica.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion apis/io-engine/src/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3b87b03

Please sign in to comment.