From d13ed4c7758a68317929319f1ef350caa034ba4d Mon Sep 17 00:00:00 2001 From: Nikhil-Ladha Date: Fri, 20 Sep 2024 13:40:15 +0530 Subject: [PATCH] volumesnapshot: update spec for volumesnapshot replication updated replication source to add VolumeSnapshot as a source Signed-off-by: Nikhil-Ladha --- lib/go/replication/replication.pb.go | 252 ++++++++++++++++++--------- replication/README.md | 9 + replication/replication.proto | 9 + 3 files changed, 190 insertions(+), 80 deletions(-) diff --git a/lib/go/replication/replication.pb.go b/lib/go/replication/replication.pb.go index 834d405..49c4beb 100644 --- a/lib/go/replication/replication.pb.go +++ b/lib/go/replication/replication.pb.go @@ -956,6 +956,7 @@ type ReplicationSource struct { // Types that are assignable to Type: // *ReplicationSource_Volume // *ReplicationSource_Volumegroup + // *ReplicationSource_Volumesnapshot Type isReplicationSource_Type `protobuf_oneof:"type"` } @@ -1012,6 +1013,13 @@ func (x *ReplicationSource) GetVolumegroup() *ReplicationSource_VolumeGroupSourc return nil } +func (x *ReplicationSource) GetVolumesnapshot() *ReplicationSource_VolumeSnapshotSource { + if x, ok := x.GetType().(*ReplicationSource_Volumesnapshot); ok { + return x.Volumesnapshot + } + return nil +} + type isReplicationSource_Type interface { isReplicationSource_Type() } @@ -1026,10 +1034,17 @@ type ReplicationSource_Volumegroup struct { Volumegroup *ReplicationSource_VolumeGroupSource `protobuf:"bytes,2,opt,name=volumegroup,proto3,oneof"` } +type ReplicationSource_Volumesnapshot struct { + // Volume snapshot source type + Volumesnapshot *ReplicationSource_VolumeSnapshotSource `protobuf:"bytes,3,opt,name=volumesnapshot,proto3,oneof"` +} + func (*ReplicationSource_Volume) isReplicationSource_Type() {} func (*ReplicationSource_Volumegroup) isReplicationSource_Type() {} +func (*ReplicationSource_Volumesnapshot) isReplicationSource_Type() {} + // VolumeSource contains the details about the volume to be replication type ReplicationSource_VolumeSource struct { state protoimpl.MessageState @@ -1131,6 +1146,57 @@ func (x *ReplicationSource_VolumeGroupSource) GetVolumeGroupId() string { return "" } +// VolumeSnapshotSource contains the details about the snapshot to +// be replicated +type ReplicationSource_VolumeSnapshotSource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Contains identity information for the existing volume snapshot. + // This field is REQUIRED + VolumeSnapshotId string `protobuf:"bytes,1,opt,name=volume_snapshot_id,json=volumeSnapshotId,proto3" json:"volume_snapshot_id,omitempty"` +} + +func (x *ReplicationSource_VolumeSnapshotSource) Reset() { + *x = ReplicationSource_VolumeSnapshotSource{} + if protoimpl.UnsafeEnabled { + mi := &file_replication_replication_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReplicationSource_VolumeSnapshotSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReplicationSource_VolumeSnapshotSource) ProtoMessage() {} + +func (x *ReplicationSource_VolumeSnapshotSource) ProtoReflect() protoreflect.Message { + mi := &file_replication_replication_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReplicationSource_VolumeSnapshotSource.ProtoReflect.Descriptor instead. +func (*ReplicationSource_VolumeSnapshotSource) Descriptor() ([]byte, []int) { + return file_replication_replication_proto_rawDescGZIP(), []int{12, 2} +} + +func (x *ReplicationSource_VolumeSnapshotSource) GetVolumeSnapshotId() string { + if x != nil { + return x.VolumeSnapshotId + } + return "" +} + var file_replication_replication_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.FieldOptions)(nil), @@ -1366,7 +1432,7 @@ var file_replication_replication_proto_rawDesc = []byte{ 0x52, 0x10, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6c, 0x61, 0x73, - 0x74, 0x53, 0x79, 0x6e, 0x63, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa2, 0x02, 0x0a, 0x11, 0x52, + 0x74, 0x53, 0x79, 0x6e, 0x63, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0xc7, 0x03, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x45, 0x0a, 0x06, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, @@ -1377,60 +1443,71 @@ var file_replication_replication_proto_rawDesc = []byte{ 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, - 0x52, 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x1a, 0x2b, 0x0a, - 0x0c, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x1a, 0x3b, 0x0a, 0x11, 0x56, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, - 0x26, 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x32, - 0x82, 0x05, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x76, - 0x0a, 0x17, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x72, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x6f, - 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x18, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x58, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0c, 0x44, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x6d, 0x6f, - 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x6f, 0x6c, 0x75, - 0x6d, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x52, 0x0b, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x5d, 0x0a, + 0x0e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x1a, 0x2b, 0x0a, 0x0c, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, + 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x1a, 0x3b, 0x0a, 0x11, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, + 0x0a, 0x0f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x1a, 0x44, 0x0a, 0x14, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2c, + 0x0a, 0x12, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x49, 0x64, 0x42, 0x06, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x32, 0x82, 0x05, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x12, 0x76, 0x0a, 0x17, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, + 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x3a, 0x3f, 0x0a, 0x0b, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x5f, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0xcc, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x18, 0x44, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, + 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x21, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x55, 0x0a, 0x0c, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x12, 0x20, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, + 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x79, 0x6e, + 0x63, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x20, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, + 0x0a, 0x18, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x2e, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x65, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x3a, 0x3f, 0x0a, 0x0b, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xcc, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x3b, + 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1445,7 +1522,7 @@ func file_replication_replication_proto_rawDescGZIP() []byte { return file_replication_replication_proto_rawDescData } -var file_replication_replication_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_replication_replication_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_replication_replication_proto_goTypes = []interface{}{ (*EnableVolumeReplicationRequest)(nil), // 0: replication.EnableVolumeReplicationRequest (*EnableVolumeReplicationResponse)(nil), // 1: replication.EnableVolumeReplicationResponse @@ -1472,10 +1549,11 @@ var file_replication_replication_proto_goTypes = []interface{}{ nil, // 22: replication.ResyncVolumeRequest.SecretsEntry nil, // 23: replication.GetVolumeReplicationInfoRequest.SecretsEntry (*ReplicationSource_VolumeSource)(nil), // 24: replication.ReplicationSource.VolumeSource - (*ReplicationSource_VolumeGroupSource)(nil), // 25: replication.ReplicationSource.VolumeGroupSource - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 27: google.protobuf.Duration - (*descriptorpb.FieldOptions)(nil), // 28: google.protobuf.FieldOptions + (*ReplicationSource_VolumeGroupSource)(nil), // 25: replication.ReplicationSource.VolumeGroupSource + (*ReplicationSource_VolumeSnapshotSource)(nil), // 26: replication.ReplicationSource.VolumeSnapshotSource + (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 28: google.protobuf.Duration + (*descriptorpb.FieldOptions)(nil), // 29: google.protobuf.FieldOptions } var file_replication_replication_proto_depIdxs = []int32{ 13, // 0: replication.EnableVolumeReplicationRequest.parameters:type_name -> replication.EnableVolumeReplicationRequest.ParametersEntry @@ -1495,28 +1573,29 @@ var file_replication_replication_proto_depIdxs = []int32{ 12, // 14: replication.ResyncVolumeRequest.replication_source:type_name -> replication.ReplicationSource 23, // 15: replication.GetVolumeReplicationInfoRequest.secrets:type_name -> replication.GetVolumeReplicationInfoRequest.SecretsEntry 12, // 16: replication.GetVolumeReplicationInfoRequest.replication_source:type_name -> replication.ReplicationSource - 26, // 17: replication.GetVolumeReplicationInfoResponse.last_sync_time:type_name -> google.protobuf.Timestamp - 27, // 18: replication.GetVolumeReplicationInfoResponse.last_sync_duration:type_name -> google.protobuf.Duration + 27, // 17: replication.GetVolumeReplicationInfoResponse.last_sync_time:type_name -> google.protobuf.Timestamp + 28, // 18: replication.GetVolumeReplicationInfoResponse.last_sync_duration:type_name -> google.protobuf.Duration 24, // 19: replication.ReplicationSource.volume:type_name -> replication.ReplicationSource.VolumeSource 25, // 20: replication.ReplicationSource.volumegroup:type_name -> replication.ReplicationSource.VolumeGroupSource - 28, // 21: replication.alpha_field:extendee -> google.protobuf.FieldOptions - 0, // 22: replication.Controller.EnableVolumeReplication:input_type -> replication.EnableVolumeReplicationRequest - 2, // 23: replication.Controller.DisableVolumeReplication:input_type -> replication.DisableVolumeReplicationRequest - 4, // 24: replication.Controller.PromoteVolume:input_type -> replication.PromoteVolumeRequest - 6, // 25: replication.Controller.DemoteVolume:input_type -> replication.DemoteVolumeRequest - 8, // 26: replication.Controller.ResyncVolume:input_type -> replication.ResyncVolumeRequest - 10, // 27: replication.Controller.GetVolumeReplicationInfo:input_type -> replication.GetVolumeReplicationInfoRequest - 1, // 28: replication.Controller.EnableVolumeReplication:output_type -> replication.EnableVolumeReplicationResponse - 3, // 29: replication.Controller.DisableVolumeReplication:output_type -> replication.DisableVolumeReplicationResponse - 5, // 30: replication.Controller.PromoteVolume:output_type -> replication.PromoteVolumeResponse - 7, // 31: replication.Controller.DemoteVolume:output_type -> replication.DemoteVolumeResponse - 9, // 32: replication.Controller.ResyncVolume:output_type -> replication.ResyncVolumeResponse - 11, // 33: replication.Controller.GetVolumeReplicationInfo:output_type -> replication.GetVolumeReplicationInfoResponse - 28, // [28:34] is the sub-list for method output_type - 22, // [22:28] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 21, // [21:22] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name + 26, // 21: replication.ReplicationSource.volumesnapshot:type_name -> replication.ReplicationSource.VolumeSnapshotSource + 29, // 22: replication.alpha_field:extendee -> google.protobuf.FieldOptions + 0, // 23: replication.Controller.EnableVolumeReplication:input_type -> replication.EnableVolumeReplicationRequest + 2, // 24: replication.Controller.DisableVolumeReplication:input_type -> replication.DisableVolumeReplicationRequest + 4, // 25: replication.Controller.PromoteVolume:input_type -> replication.PromoteVolumeRequest + 6, // 26: replication.Controller.DemoteVolume:input_type -> replication.DemoteVolumeRequest + 8, // 27: replication.Controller.ResyncVolume:input_type -> replication.ResyncVolumeRequest + 10, // 28: replication.Controller.GetVolumeReplicationInfo:input_type -> replication.GetVolumeReplicationInfoRequest + 1, // 29: replication.Controller.EnableVolumeReplication:output_type -> replication.EnableVolumeReplicationResponse + 3, // 30: replication.Controller.DisableVolumeReplication:output_type -> replication.DisableVolumeReplicationResponse + 5, // 31: replication.Controller.PromoteVolume:output_type -> replication.PromoteVolumeResponse + 7, // 32: replication.Controller.DemoteVolume:output_type -> replication.DemoteVolumeResponse + 9, // 33: replication.Controller.ResyncVolume:output_type -> replication.ResyncVolumeResponse + 11, // 34: replication.Controller.GetVolumeReplicationInfo:output_type -> replication.GetVolumeReplicationInfoResponse + 29, // [29:35] is the sub-list for method output_type + 23, // [23:29] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 22, // [22:23] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_replication_replication_proto_init() } @@ -1705,10 +1784,23 @@ func file_replication_replication_proto_init() { return nil } } + file_replication_replication_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplicationSource_VolumeSnapshotSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_replication_replication_proto_msgTypes[12].OneofWrappers = []interface{}{ (*ReplicationSource_Volume)(nil), (*ReplicationSource_Volumegroup)(nil), + (*ReplicationSource_Volumesnapshot)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1716,7 +1808,7 @@ func file_replication_replication_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_replication_replication_proto_rawDesc, NumEnums: 0, - NumMessages: 26, + NumMessages: 27, NumExtensions: 1, NumServices: 1, }, diff --git a/replication/README.md b/replication/README.md index 1dfc346..64c66b8 100644 --- a/replication/README.md +++ b/replication/README.md @@ -424,12 +424,21 @@ message ReplicationSource { // This field is REQUIRED. string volume_group_id = 1; } + // VolumeSnapshotSource contains the details about the snapshot to + // be replicated + message VolumeSnapshotSource { + // Contains identity information for the existing volume snapshot. + // This field is REQUIRED + string volume_snapshot_id = 1; + } oneof type { // Volume source type VolumeSource volume = 1; // Volume group source type VolumeGroupSource volumegroup = 2; + // Volume snapshot source type + VolumeSnapshotSource volumesnapshot = 3; } } ``` diff --git a/replication/replication.proto b/replication/replication.proto index 0b7e7d3..929036e 100644 --- a/replication/replication.proto +++ b/replication/replication.proto @@ -271,11 +271,20 @@ message ReplicationSource { // This field is REQUIRED. string volume_group_id = 1; } + // VolumeSnapshotSource contains the details about the snapshot to + // be replicated + message VolumeSnapshotSource { + // Contains identity information for the existing volume snapshot. + // This field is REQUIRED + string volume_snapshot_id = 1; + } oneof type { // Volume source type VolumeSource volume = 1; // Volume group source type VolumeGroupSource volumegroup = 2; + // Volume snapshot source type + VolumeSnapshotSource volumesnapshot = 3; } }