Skip to content

Commit

Permalink
feat(clone): new parameter to identify deleted snapshot having active…
Browse files Browse the repository at this point in the history
… clones

Signed-off-by: Hrudaya <[email protected]>
  • Loading branch information
hrudaya21 committed Jul 28, 2023
1 parent 3c58926 commit 2f61f67
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions protobuf/v1/replica.proto
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,18 @@ message ListReplicasResponse {
repeated Replica replicas = 1; // list of the replicas
}

/// ReplicaType enum is used to filter replica in listreplica response.
enum ReplicaType {
ALL_REPLICAS = 0; // Default value, to return all the replicas including snapshots and clones
ALL_REPLICAS_EXCEPT_SNAPSHOTS = 1; // Return replicas and snapshot clones, without snapshots
ONLY_SNAPSHOT_CLONES = 2; // Returns only snapshot clones
ONLY_REPLICAS = 3; // Returns only replicas
}

message ListReplicaOptions {
google.protobuf.StringValue name = 1; // list the replica with the name if provided
google.protobuf.StringValue poolname = 2; // list the replicas on the provided pool, by name
google.protobuf.StringValue uuid = 3; // list the replica with the uuid if provided
google.protobuf.StringValue pooluuid = 4; // list the replicas on the provided pool, by uuid
ReplicaType type = 5; // list replica based on ReplicaType value
}
12 changes: 12 additions & 0 deletions protobuf/v1/snapshot.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,23 @@ message SnapshotInfo {
bool valid_snapshot = 12; // true: valid, false: invalid (missing one/more snapshotdescriptor field i.e. txn_id, entity_id, source_uuid
bool ready_as_source = 13; // ready for usage, i,e source for another volume.
uint64 referenced_bytes = 14; // amount of bytes referenced by all successor snapshots.
bool obsolete_snapshot = 15; // true: snapshot is marked as obsolete. false: Valid Snapshot
}

/// SnapshotQueryType enum is used to filter snapshots in listsnapshot response.
enum SnapshotQueryType {
ALL_SNAPSHOTS = 0; // Default value, to return all the snapshots
ALL_SNAPSHOTS_EXCEPT_OBSOLETE_SNAPSHOT = 1; // Returns all snapshots except obsolete snapshots
ONLY_OBSOLETE_SNAPSHOTS = 2; // Returns only obsolete snapshots
ONLY_INVALID_SNAPSHOTS = 3; // Returns only invalid snapshots
ONLY_USABLE_SNAPSHOTS = 4; // Returns only usable snapshots
}

/// Request parameters to list snapshot.
message ListSnapshotsRequest {
optional string source_uuid = 1; // source uuid from which snapshot is taken
optional string snapshot_uuid = 2; // snapshot uuid for which the detail can be listed
SnapshotQueryType type = 3; // list snapshot based on SnapshotQueryType value
}

/// List Snapshot Response.
Expand Down

0 comments on commit 2f61f67

Please sign in to comment.