diff --git a/api/managementpb/dbaas/components.pb.go b/api/managementpb/dbaas/components.pb.go index b76d646bfe..0e48bb4f32 100644 --- a/api/managementpb/dbaas/components.pb.go +++ b/api/managementpb/dbaas/components.pb.go @@ -755,6 +755,190 @@ func (*ChangePXCComponentsResponse) Descriptor() ([]byte, []int) { return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{11} } +type CheckForOperatorUpdateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CheckForOperatorUpdateRequest) Reset() { + *x = CheckForOperatorUpdateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_managementpb_dbaas_components_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckForOperatorUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckForOperatorUpdateRequest) ProtoMessage() {} + +func (x *CheckForOperatorUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_managementpb_dbaas_components_proto_msgTypes[12] + 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 CheckForOperatorUpdateRequest.ProtoReflect.Descriptor instead. +func (*CheckForOperatorUpdateRequest) Descriptor() ([]byte, []int) { + return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{12} +} + +// ComponentUpdateInformation contains version we can update to for certain component. +type ComponentUpdateInformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AvailableVersion string `protobuf:"bytes,1,opt,name=available_version,json=availableVersion,proto3" json:"available_version,omitempty"` +} + +func (x *ComponentUpdateInformation) Reset() { + *x = ComponentUpdateInformation{} + if protoimpl.UnsafeEnabled { + mi := &file_managementpb_dbaas_components_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComponentUpdateInformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComponentUpdateInformation) ProtoMessage() {} + +func (x *ComponentUpdateInformation) ProtoReflect() protoreflect.Message { + mi := &file_managementpb_dbaas_components_proto_msgTypes[13] + 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 ComponentUpdateInformation.ProtoReflect.Descriptor instead. +func (*ComponentUpdateInformation) Descriptor() ([]byte, []int) { + return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{13} +} + +func (x *ComponentUpdateInformation) GetAvailableVersion() string { + if x != nil { + return x.AvailableVersion + } + return "" +} + +// ComponentsUpdateInformation contains info about components and their available latest versions. +type ComponentsUpdateInformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // component_to_update_information stores, under the name of the component, information about the update. + // "pxc-operator", "psmdb-operator" are names used by backend for our operators. + ComponentToUpdateInformation map[string]*ComponentUpdateInformation `protobuf:"bytes,1,rep,name=component_to_update_information,json=componentToUpdateInformation,proto3" json:"component_to_update_information,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ComponentsUpdateInformation) Reset() { + *x = ComponentsUpdateInformation{} + if protoimpl.UnsafeEnabled { + mi := &file_managementpb_dbaas_components_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComponentsUpdateInformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComponentsUpdateInformation) ProtoMessage() {} + +func (x *ComponentsUpdateInformation) ProtoReflect() protoreflect.Message { + mi := &file_managementpb_dbaas_components_proto_msgTypes[14] + 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 ComponentsUpdateInformation.ProtoReflect.Descriptor instead. +func (*ComponentsUpdateInformation) Descriptor() ([]byte, []int) { + return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{14} +} + +func (x *ComponentsUpdateInformation) GetComponentToUpdateInformation() map[string]*ComponentUpdateInformation { + if x != nil { + return x.ComponentToUpdateInformation + } + return nil +} + +type CheckForOperatorUpdateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The cluster name is used as a key for this map, value contains components and their inforamtion about update. + ClusterToComponents map[string]*ComponentsUpdateInformation `protobuf:"bytes,1,rep,name=cluster_to_components,json=clusterToComponents,proto3" json:"cluster_to_components,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *CheckForOperatorUpdateResponse) Reset() { + *x = CheckForOperatorUpdateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_managementpb_dbaas_components_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckForOperatorUpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckForOperatorUpdateResponse) ProtoMessage() {} + +func (x *CheckForOperatorUpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_managementpb_dbaas_components_proto_msgTypes[15] + 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 CheckForOperatorUpdateResponse.ProtoReflect.Descriptor instead. +func (*CheckForOperatorUpdateResponse) Descriptor() ([]byte, []int) { + return file_managementpb_dbaas_components_proto_rawDescGZIP(), []int{15} +} + +func (x *CheckForOperatorUpdateResponse) GetClusterToComponents() map[string]*ComponentsUpdateInformation { + if x != nil { + return x.ClusterToComponents + } + return nil +} + // ComponentVersion contains operations which should be done with component version. type ChangeComponent_ComponentVersion struct { state protoimpl.MessageState @@ -769,7 +953,7 @@ type ChangeComponent_ComponentVersion struct { func (x *ChangeComponent_ComponentVersion) Reset() { *x = ChangeComponent_ComponentVersion{} if protoimpl.UnsafeEnabled { - mi := &file_managementpb_dbaas_components_proto_msgTypes[20] + mi := &file_managementpb_dbaas_components_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -782,7 +966,7 @@ func (x *ChangeComponent_ComponentVersion) String() string { func (*ChangeComponent_ComponentVersion) ProtoMessage() {} func (x *ChangeComponent_ComponentVersion) ProtoReflect() protoreflect.Message { - mi := &file_managementpb_dbaas_components_proto_msgTypes[20] + mi := &file_managementpb_dbaas_components_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -994,51 +1178,106 @@ var file_managementpb_dbaas_components_proto_rawDesc = []byte{ 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x68, 0x61, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x22, 0x1d, 0x0a, 0x1b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0x98, 0x05, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x9e, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, - 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, 0x70, - 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x3a, - 0x01, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, - 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x27, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, - 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, - 0x73, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x3a, 0x01, 0x2a, 0x12, 0xaa, 0x01, 0x0a, 0x15, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, - 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x53, 0x4d, 0x44, - 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x50, 0x53, 0x4d, 0x44, 0x42, 0x3a, 0x01, 0x2a, 0x12, 0xa2, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x61, + 0x73, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x1a, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xaf, + 0x02, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x93, + 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x5f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x6f, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x1c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x7a, 0x0a, 0x21, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3f, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x62, 0x61, + 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x90, 0x02, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x15, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x74, + 0x6f, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x1a, + 0x72, 0x0a, 0x18, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x54, 0x6f, 0x43, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, + 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x32, 0xd3, 0x06, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x9e, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x64, 0x62, 0x61, 0x61, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, + 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x53, 0x4d, 0x44, 0x42, + 0x3a, 0x01, 0x2a, 0x12, 0x96, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6f, + 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2b, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, + 0x74, 0x73, 0x2f, 0x47, 0x65, 0x74, 0x50, 0x58, 0x43, 0x3a, 0x01, 0x2a, 0x12, 0xaa, 0x01, 0x0a, + 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, + 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x53, 0x4d, + 0x44, 0x42, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x43, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x22, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, + 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x50, 0x53, 0x4d, 0x44, 0x42, 0x3a, 0x01, 0x2a, 0x12, 0xa2, 0x01, 0x0a, 0x13, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x29, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, + 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x29, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x64, 0x62, - 0x61, 0x61, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x50, 0x58, 0x43, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x22, - 0x29, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, - 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, - 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x3a, 0x01, 0x2a, 0x42, 0x25, 0x5a, - 0x23, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, - 0x62, 0x2f, 0x64, 0x62, 0x61, 0x61, 0x73, 0x3b, 0x64, 0x62, 0x61, 0x61, 0x73, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, + 0x22, 0x29, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2f, 0x44, 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, + 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x58, 0x43, 0x3a, 0x01, 0x2a, 0x12, 0xb8, + 0x01, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x2e, 0x64, 0x62, 0x61, 0x61, + 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, + 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x64, 0x62, 0x61, 0x61, 0x73, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22, 0x36, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x44, + 0x42, 0x61, 0x61, 0x53, 0x2f, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x42, 0x25, 0x5a, 0x23, 0x61, 0x70, 0x69, + 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x62, 0x2f, 0x64, 0x62, + 0x61, 0x61, 0x73, 0x3b, 0x64, 0x62, 0x61, 0x61, 0x73, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1053,7 +1292,7 @@ func file_managementpb_dbaas_components_proto_rawDescGZIP() []byte { return file_managementpb_dbaas_components_proto_rawDescData } -var file_managementpb_dbaas_components_proto_msgTypes = make([]protoimpl.MessageInfo, 21) +var file_managementpb_dbaas_components_proto_msgTypes = make([]protoimpl.MessageInfo, 27) var file_managementpb_dbaas_components_proto_goTypes = []interface{}{ (*Component)(nil), // 0: dbaas.v1beta1.Component (*Matrix)(nil), // 1: dbaas.v1beta1.Matrix @@ -1067,54 +1306,66 @@ var file_managementpb_dbaas_components_proto_goTypes = []interface{}{ (*ChangePSMDBComponentsResponse)(nil), // 9: dbaas.v1beta1.ChangePSMDBComponentsResponse (*ChangePXCComponentsRequest)(nil), // 10: dbaas.v1beta1.ChangePXCComponentsRequest (*ChangePXCComponentsResponse)(nil), // 11: dbaas.v1beta1.ChangePXCComponentsResponse - nil, // 12: dbaas.v1beta1.Matrix.MongodEntry - nil, // 13: dbaas.v1beta1.Matrix.PxcEntry - nil, // 14: dbaas.v1beta1.Matrix.PmmEntry - nil, // 15: dbaas.v1beta1.Matrix.ProxysqlEntry - nil, // 16: dbaas.v1beta1.Matrix.HaproxyEntry - nil, // 17: dbaas.v1beta1.Matrix.BackupEntry - nil, // 18: dbaas.v1beta1.Matrix.OperatorEntry - nil, // 19: dbaas.v1beta1.Matrix.LogCollectorEntry - (*ChangeComponent_ComponentVersion)(nil), // 20: dbaas.v1beta1.ChangeComponent.ComponentVersion + (*CheckForOperatorUpdateRequest)(nil), // 12: dbaas.v1beta1.CheckForOperatorUpdateRequest + (*ComponentUpdateInformation)(nil), // 13: dbaas.v1beta1.ComponentUpdateInformation + (*ComponentsUpdateInformation)(nil), // 14: dbaas.v1beta1.ComponentsUpdateInformation + (*CheckForOperatorUpdateResponse)(nil), // 15: dbaas.v1beta1.CheckForOperatorUpdateResponse + nil, // 16: dbaas.v1beta1.Matrix.MongodEntry + nil, // 17: dbaas.v1beta1.Matrix.PxcEntry + nil, // 18: dbaas.v1beta1.Matrix.PmmEntry + nil, // 19: dbaas.v1beta1.Matrix.ProxysqlEntry + nil, // 20: dbaas.v1beta1.Matrix.HaproxyEntry + nil, // 21: dbaas.v1beta1.Matrix.BackupEntry + nil, // 22: dbaas.v1beta1.Matrix.OperatorEntry + nil, // 23: dbaas.v1beta1.Matrix.LogCollectorEntry + (*ChangeComponent_ComponentVersion)(nil), // 24: dbaas.v1beta1.ChangeComponent.ComponentVersion + nil, // 25: dbaas.v1beta1.ComponentsUpdateInformation.ComponentToUpdateInformationEntry + nil, // 26: dbaas.v1beta1.CheckForOperatorUpdateResponse.ClusterToComponentsEntry } var file_managementpb_dbaas_components_proto_depIdxs = []int32{ - 12, // 0: dbaas.v1beta1.Matrix.mongod:type_name -> dbaas.v1beta1.Matrix.MongodEntry - 13, // 1: dbaas.v1beta1.Matrix.pxc:type_name -> dbaas.v1beta1.Matrix.PxcEntry - 14, // 2: dbaas.v1beta1.Matrix.pmm:type_name -> dbaas.v1beta1.Matrix.PmmEntry - 15, // 3: dbaas.v1beta1.Matrix.proxysql:type_name -> dbaas.v1beta1.Matrix.ProxysqlEntry - 16, // 4: dbaas.v1beta1.Matrix.haproxy:type_name -> dbaas.v1beta1.Matrix.HaproxyEntry - 17, // 5: dbaas.v1beta1.Matrix.backup:type_name -> dbaas.v1beta1.Matrix.BackupEntry - 18, // 6: dbaas.v1beta1.Matrix.operator:type_name -> dbaas.v1beta1.Matrix.OperatorEntry - 19, // 7: dbaas.v1beta1.Matrix.log_collector:type_name -> dbaas.v1beta1.Matrix.LogCollectorEntry + 16, // 0: dbaas.v1beta1.Matrix.mongod:type_name -> dbaas.v1beta1.Matrix.MongodEntry + 17, // 1: dbaas.v1beta1.Matrix.pxc:type_name -> dbaas.v1beta1.Matrix.PxcEntry + 18, // 2: dbaas.v1beta1.Matrix.pmm:type_name -> dbaas.v1beta1.Matrix.PmmEntry + 19, // 3: dbaas.v1beta1.Matrix.proxysql:type_name -> dbaas.v1beta1.Matrix.ProxysqlEntry + 20, // 4: dbaas.v1beta1.Matrix.haproxy:type_name -> dbaas.v1beta1.Matrix.HaproxyEntry + 21, // 5: dbaas.v1beta1.Matrix.backup:type_name -> dbaas.v1beta1.Matrix.BackupEntry + 22, // 6: dbaas.v1beta1.Matrix.operator:type_name -> dbaas.v1beta1.Matrix.OperatorEntry + 23, // 7: dbaas.v1beta1.Matrix.log_collector:type_name -> dbaas.v1beta1.Matrix.LogCollectorEntry 1, // 8: dbaas.v1beta1.OperatorVersion.matrix:type_name -> dbaas.v1beta1.Matrix 2, // 9: dbaas.v1beta1.GetPSMDBComponentsResponse.versions:type_name -> dbaas.v1beta1.OperatorVersion 2, // 10: dbaas.v1beta1.GetPXCComponentsResponse.versions:type_name -> dbaas.v1beta1.OperatorVersion - 20, // 11: dbaas.v1beta1.ChangeComponent.versions:type_name -> dbaas.v1beta1.ChangeComponent.ComponentVersion + 24, // 11: dbaas.v1beta1.ChangeComponent.versions:type_name -> dbaas.v1beta1.ChangeComponent.ComponentVersion 7, // 12: dbaas.v1beta1.ChangePSMDBComponentsRequest.mongod:type_name -> dbaas.v1beta1.ChangeComponent 7, // 13: dbaas.v1beta1.ChangePXCComponentsRequest.pxc:type_name -> dbaas.v1beta1.ChangeComponent 7, // 14: dbaas.v1beta1.ChangePXCComponentsRequest.proxysql:type_name -> dbaas.v1beta1.ChangeComponent 7, // 15: dbaas.v1beta1.ChangePXCComponentsRequest.haproxy:type_name -> dbaas.v1beta1.ChangeComponent - 0, // 16: dbaas.v1beta1.Matrix.MongodEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 17: dbaas.v1beta1.Matrix.PxcEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 18: dbaas.v1beta1.Matrix.PmmEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 19: dbaas.v1beta1.Matrix.ProxysqlEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 20: dbaas.v1beta1.Matrix.HaproxyEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 21: dbaas.v1beta1.Matrix.BackupEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 22: dbaas.v1beta1.Matrix.OperatorEntry.value:type_name -> dbaas.v1beta1.Component - 0, // 23: dbaas.v1beta1.Matrix.LogCollectorEntry.value:type_name -> dbaas.v1beta1.Component - 3, // 24: dbaas.v1beta1.Components.GetPSMDBComponents:input_type -> dbaas.v1beta1.GetPSMDBComponentsRequest - 5, // 25: dbaas.v1beta1.Components.GetPXCComponents:input_type -> dbaas.v1beta1.GetPXCComponentsRequest - 8, // 26: dbaas.v1beta1.Components.ChangePSMDBComponents:input_type -> dbaas.v1beta1.ChangePSMDBComponentsRequest - 10, // 27: dbaas.v1beta1.Components.ChangePXCComponents:input_type -> dbaas.v1beta1.ChangePXCComponentsRequest - 4, // 28: dbaas.v1beta1.Components.GetPSMDBComponents:output_type -> dbaas.v1beta1.GetPSMDBComponentsResponse - 6, // 29: dbaas.v1beta1.Components.GetPXCComponents:output_type -> dbaas.v1beta1.GetPXCComponentsResponse - 9, // 30: dbaas.v1beta1.Components.ChangePSMDBComponents:output_type -> dbaas.v1beta1.ChangePSMDBComponentsResponse - 11, // 31: dbaas.v1beta1.Components.ChangePXCComponents:output_type -> dbaas.v1beta1.ChangePXCComponentsResponse - 28, // [28:32] is the sub-list for method output_type - 24, // [24:28] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 25, // 16: dbaas.v1beta1.ComponentsUpdateInformation.component_to_update_information:type_name -> dbaas.v1beta1.ComponentsUpdateInformation.ComponentToUpdateInformationEntry + 26, // 17: dbaas.v1beta1.CheckForOperatorUpdateResponse.cluster_to_components:type_name -> dbaas.v1beta1.CheckForOperatorUpdateResponse.ClusterToComponentsEntry + 0, // 18: dbaas.v1beta1.Matrix.MongodEntry.value:type_name -> dbaas.v1beta1.Component + 0, // 19: dbaas.v1beta1.Matrix.PxcEntry.value:type_name -> dbaas.v1beta1.Component + 0, // 20: dbaas.v1beta1.Matrix.PmmEntry.value:type_name -> dbaas.v1beta1.Component + 0, // 21: dbaas.v1beta1.Matrix.ProxysqlEntry.value:type_name -> dbaas.v1beta1.Component + 0, // 22: dbaas.v1beta1.Matrix.HaproxyEntry.value:type_name -> dbaas.v1beta1.Component + 0, // 23: dbaas.v1beta1.Matrix.BackupEntry.value:type_name -> dbaas.v1beta1.Component + 0, // 24: dbaas.v1beta1.Matrix.OperatorEntry.value:type_name -> dbaas.v1beta1.Component + 0, // 25: dbaas.v1beta1.Matrix.LogCollectorEntry.value:type_name -> dbaas.v1beta1.Component + 13, // 26: dbaas.v1beta1.ComponentsUpdateInformation.ComponentToUpdateInformationEntry.value:type_name -> dbaas.v1beta1.ComponentUpdateInformation + 14, // 27: dbaas.v1beta1.CheckForOperatorUpdateResponse.ClusterToComponentsEntry.value:type_name -> dbaas.v1beta1.ComponentsUpdateInformation + 3, // 28: dbaas.v1beta1.Components.GetPSMDBComponents:input_type -> dbaas.v1beta1.GetPSMDBComponentsRequest + 5, // 29: dbaas.v1beta1.Components.GetPXCComponents:input_type -> dbaas.v1beta1.GetPXCComponentsRequest + 8, // 30: dbaas.v1beta1.Components.ChangePSMDBComponents:input_type -> dbaas.v1beta1.ChangePSMDBComponentsRequest + 10, // 31: dbaas.v1beta1.Components.ChangePXCComponents:input_type -> dbaas.v1beta1.ChangePXCComponentsRequest + 12, // 32: dbaas.v1beta1.Components.CheckForOperatorUpdate:input_type -> dbaas.v1beta1.CheckForOperatorUpdateRequest + 4, // 33: dbaas.v1beta1.Components.GetPSMDBComponents:output_type -> dbaas.v1beta1.GetPSMDBComponentsResponse + 6, // 34: dbaas.v1beta1.Components.GetPXCComponents:output_type -> dbaas.v1beta1.GetPXCComponentsResponse + 9, // 35: dbaas.v1beta1.Components.ChangePSMDBComponents:output_type -> dbaas.v1beta1.ChangePSMDBComponentsResponse + 11, // 36: dbaas.v1beta1.Components.ChangePXCComponents:output_type -> dbaas.v1beta1.ChangePXCComponentsResponse + 15, // 37: dbaas.v1beta1.Components.CheckForOperatorUpdate:output_type -> dbaas.v1beta1.CheckForOperatorUpdateResponse + 33, // [33:38] is the sub-list for method output_type + 28, // [28:33] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name } func init() { file_managementpb_dbaas_components_proto_init() } @@ -1267,7 +1518,55 @@ func file_managementpb_dbaas_components_proto_init() { return nil } } - file_managementpb_dbaas_components_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_managementpb_dbaas_components_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckForOperatorUpdateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_managementpb_dbaas_components_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComponentUpdateInformation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_managementpb_dbaas_components_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComponentsUpdateInformation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_managementpb_dbaas_components_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckForOperatorUpdateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_managementpb_dbaas_components_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ChangeComponent_ComponentVersion); i { case 0: return &v.state @@ -1286,7 +1585,7 @@ func file_managementpb_dbaas_components_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_managementpb_dbaas_components_proto_rawDesc, NumEnums: 0, - NumMessages: 21, + NumMessages: 27, NumExtensions: 0, NumServices: 1, }, @@ -1320,6 +1619,8 @@ type ComponentsClient interface { ChangePSMDBComponents(ctx context.Context, in *ChangePSMDBComponentsRequest, opts ...grpc.CallOption) (*ChangePSMDBComponentsResponse, error) // ChangePXCComponents manages PXC related components. ChangePXCComponents(ctx context.Context, in *ChangePXCComponentsRequest, opts ...grpc.CallOption) (*ChangePXCComponentsResponse, error) + // CheckForOperatorUpdate checks if a new version of an operator is available. + CheckForOperatorUpdate(ctx context.Context, in *CheckForOperatorUpdateRequest, opts ...grpc.CallOption) (*CheckForOperatorUpdateResponse, error) } type componentsClient struct { @@ -1366,6 +1667,15 @@ func (c *componentsClient) ChangePXCComponents(ctx context.Context, in *ChangePX return out, nil } +func (c *componentsClient) CheckForOperatorUpdate(ctx context.Context, in *CheckForOperatorUpdateRequest, opts ...grpc.CallOption) (*CheckForOperatorUpdateResponse, error) { + out := new(CheckForOperatorUpdateResponse) + err := c.cc.Invoke(ctx, "/dbaas.v1beta1.Components/CheckForOperatorUpdate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ComponentsServer is the server API for Components service. type ComponentsServer interface { // GetPSMDBComponents returns list of available components for PSMDB Clusters. @@ -1376,6 +1686,8 @@ type ComponentsServer interface { ChangePSMDBComponents(context.Context, *ChangePSMDBComponentsRequest) (*ChangePSMDBComponentsResponse, error) // ChangePXCComponents manages PXC related components. ChangePXCComponents(context.Context, *ChangePXCComponentsRequest) (*ChangePXCComponentsResponse, error) + // CheckForOperatorUpdate checks if a new version of an operator is available. + CheckForOperatorUpdate(context.Context, *CheckForOperatorUpdateRequest) (*CheckForOperatorUpdateResponse, error) } // UnimplementedComponentsServer can be embedded to have forward compatible implementations. @@ -1394,6 +1706,9 @@ func (*UnimplementedComponentsServer) ChangePSMDBComponents(context.Context, *Ch func (*UnimplementedComponentsServer) ChangePXCComponents(context.Context, *ChangePXCComponentsRequest) (*ChangePXCComponentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangePXCComponents not implemented") } +func (*UnimplementedComponentsServer) CheckForOperatorUpdate(context.Context, *CheckForOperatorUpdateRequest) (*CheckForOperatorUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckForOperatorUpdate not implemented") +} func RegisterComponentsServer(s *grpc.Server, srv ComponentsServer) { s.RegisterService(&_Components_serviceDesc, srv) @@ -1471,6 +1786,24 @@ func _Components_ChangePXCComponents_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _Components_CheckForOperatorUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckForOperatorUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ComponentsServer).CheckForOperatorUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dbaas.v1beta1.Components/CheckForOperatorUpdate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ComponentsServer).CheckForOperatorUpdate(ctx, req.(*CheckForOperatorUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Components_serviceDesc = grpc.ServiceDesc{ ServiceName: "dbaas.v1beta1.Components", HandlerType: (*ComponentsServer)(nil), @@ -1491,6 +1824,10 @@ var _Components_serviceDesc = grpc.ServiceDesc{ MethodName: "ChangePXCComponents", Handler: _Components_ChangePXCComponents_Handler, }, + { + MethodName: "CheckForOperatorUpdate", + Handler: _Components_CheckForOperatorUpdate_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "managementpb/dbaas/components.proto", diff --git a/api/managementpb/dbaas/components.pb.gw.go b/api/managementpb/dbaas/components.pb.gw.go index 47cbe9629f..d6312f7722 100644 --- a/api/managementpb/dbaas/components.pb.gw.go +++ b/api/managementpb/dbaas/components.pb.gw.go @@ -169,6 +169,40 @@ func local_request_Components_ChangePXCComponents_0(ctx context.Context, marshal } +func request_Components_CheckForOperatorUpdate_0(ctx context.Context, marshaler runtime.Marshaler, client ComponentsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckForOperatorUpdateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CheckForOperatorUpdate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Components_CheckForOperatorUpdate_0(ctx context.Context, marshaler runtime.Marshaler, server ComponentsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckForOperatorUpdateRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CheckForOperatorUpdate(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterComponentsHandlerServer registers the http handlers for service Components to "mux". // UnaryRPC :call ComponentsServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -267,6 +301,29 @@ func RegisterComponentsHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("POST", pattern_Components_CheckForOperatorUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Components_CheckForOperatorUpdate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Components_CheckForOperatorUpdate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -388,6 +445,26 @@ func RegisterComponentsHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("POST", pattern_Components_CheckForOperatorUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Components_CheckForOperatorUpdate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Components_CheckForOperatorUpdate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -399,6 +476,8 @@ var ( pattern_Components_ChangePSMDBComponents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Components", "ChangePSMDB"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Components_ChangePXCComponents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Components", "ChangePXC"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Components_CheckForOperatorUpdate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "management", "DBaaS", "Components", "CheckForOperatorUpdate"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -409,4 +488,6 @@ var ( forward_Components_ChangePSMDBComponents_0 = runtime.ForwardResponseMessage forward_Components_ChangePXCComponents_0 = runtime.ForwardResponseMessage + + forward_Components_CheckForOperatorUpdate_0 = runtime.ForwardResponseMessage ) diff --git a/api/managementpb/dbaas/components.proto b/api/managementpb/dbaas/components.proto index b3fa54eba3..e2a0a9f705 100644 --- a/api/managementpb/dbaas/components.proto +++ b/api/managementpb/dbaas/components.proto @@ -102,6 +102,25 @@ message ChangePXCComponentsRequest { message ChangePXCComponentsResponse {} +message CheckForOperatorUpdateRequest {} + +// ComponentUpdateInformation contains version we can update to for certain component. +message ComponentUpdateInformation { + string available_version = 1; +} + +// ComponentsUpdateInformation contains info about components and their available latest versions. +message ComponentsUpdateInformation { + // component_to_update_information stores, under the name of the component, information about the update. + // "pxc-operator", "psmdb-operator" are names used by backend for our operators. + map component_to_update_information = 1; +} + +message CheckForOperatorUpdateResponse { + // The cluster name is used as a key for this map, value contains components and their inforamtion about update. + map cluster_to_components = 1; +} + // Components service provides public methods for managing components. service Components { // GetPSMDBComponents returns list of available components for PSMDB Clusters. @@ -132,4 +151,11 @@ service Components { body: "*" }; } + // CheckForOperatorUpdate checks if a new version of an operator is available. + rpc CheckForOperatorUpdate(CheckForOperatorUpdateRequest) returns (CheckForOperatorUpdateResponse) { + option (google.api.http) = { + post: "/v1/management/DBaaS/Components/CheckForOperatorUpdate" + body: "*" + }; + } } diff --git a/api/managementpb/dbaas/components.validator.pb.go b/api/managementpb/dbaas/components.validator.pb.go index db4343fb38..d9e6a1ff2d 100644 --- a/api/managementpb/dbaas/components.validator.pb.go +++ b/api/managementpb/dbaas/components.validator.pb.go @@ -119,3 +119,17 @@ func (this *ChangePXCComponentsRequest) Validate() error { func (this *ChangePXCComponentsResponse) Validate() error { return nil } +func (this *CheckForOperatorUpdateRequest) Validate() error { + return nil +} +func (this *ComponentUpdateInformation) Validate() error { + return nil +} +func (this *ComponentsUpdateInformation) Validate() error { + // Validation of proto3 map<> fields is unsupported. + return nil +} +func (this *CheckForOperatorUpdateResponse) Validate() error { + // Validation of proto3 map<> fields is unsupported. + return nil +} diff --git a/api/managementpb/dbaas/json/client/components/check_for_operator_update_parameters.go b/api/managementpb/dbaas/json/client/components/check_for_operator_update_parameters.go new file mode 100644 index 0000000000..4f507d52c7 --- /dev/null +++ b/api/managementpb/dbaas/json/client/components/check_for_operator_update_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package components + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewCheckForOperatorUpdateParams creates a new CheckForOperatorUpdateParams object +// with the default values initialized. +func NewCheckForOperatorUpdateParams() *CheckForOperatorUpdateParams { + var () + return &CheckForOperatorUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewCheckForOperatorUpdateParamsWithTimeout creates a new CheckForOperatorUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewCheckForOperatorUpdateParamsWithTimeout(timeout time.Duration) *CheckForOperatorUpdateParams { + var () + return &CheckForOperatorUpdateParams{ + + timeout: timeout, + } +} + +// NewCheckForOperatorUpdateParamsWithContext creates a new CheckForOperatorUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewCheckForOperatorUpdateParamsWithContext(ctx context.Context) *CheckForOperatorUpdateParams { + var () + return &CheckForOperatorUpdateParams{ + + Context: ctx, + } +} + +// NewCheckForOperatorUpdateParamsWithHTTPClient creates a new CheckForOperatorUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewCheckForOperatorUpdateParamsWithHTTPClient(client *http.Client) *CheckForOperatorUpdateParams { + var () + return &CheckForOperatorUpdateParams{ + HTTPClient: client, + } +} + +/*CheckForOperatorUpdateParams contains all the parameters to send to the API endpoint +for the check for operator update operation typically these are written to a http.Request +*/ +type CheckForOperatorUpdateParams struct { + + /*Body*/ + Body interface{} + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the check for operator update params +func (o *CheckForOperatorUpdateParams) WithTimeout(timeout time.Duration) *CheckForOperatorUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the check for operator update params +func (o *CheckForOperatorUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the check for operator update params +func (o *CheckForOperatorUpdateParams) WithContext(ctx context.Context) *CheckForOperatorUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the check for operator update params +func (o *CheckForOperatorUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the check for operator update params +func (o *CheckForOperatorUpdateParams) WithHTTPClient(client *http.Client) *CheckForOperatorUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the check for operator update params +func (o *CheckForOperatorUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the check for operator update params +func (o *CheckForOperatorUpdateParams) WithBody(body interface{}) *CheckForOperatorUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the check for operator update params +func (o *CheckForOperatorUpdateParams) SetBody(body interface{}) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CheckForOperatorUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/managementpb/dbaas/json/client/components/check_for_operator_update_responses.go b/api/managementpb/dbaas/json/client/components/check_for_operator_update_responses.go new file mode 100644 index 0000000000..93a6f3d735 --- /dev/null +++ b/api/managementpb/dbaas/json/client/components/check_for_operator_update_responses.go @@ -0,0 +1,352 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package components + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// CheckForOperatorUpdateReader is a Reader for the CheckForOperatorUpdate structure. +type CheckForOperatorUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CheckForOperatorUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCheckForOperatorUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewCheckForOperatorUpdateDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCheckForOperatorUpdateOK creates a CheckForOperatorUpdateOK with default headers values +func NewCheckForOperatorUpdateOK() *CheckForOperatorUpdateOK { + return &CheckForOperatorUpdateOK{} +} + +/*CheckForOperatorUpdateOK handles this case with default header values. + +A successful response. +*/ +type CheckForOperatorUpdateOK struct { + Payload *CheckForOperatorUpdateOKBody +} + +func (o *CheckForOperatorUpdateOK) Error() string { + return fmt.Sprintf("[POST /v1/management/DBaaS/Components/CheckForOperatorUpdate][%d] checkForOperatorUpdateOk %+v", 200, o.Payload) +} + +func (o *CheckForOperatorUpdateOK) GetPayload() *CheckForOperatorUpdateOKBody { + return o.Payload +} + +func (o *CheckForOperatorUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(CheckForOperatorUpdateOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCheckForOperatorUpdateDefault creates a CheckForOperatorUpdateDefault with default headers values +func NewCheckForOperatorUpdateDefault(code int) *CheckForOperatorUpdateDefault { + return &CheckForOperatorUpdateDefault{ + _statusCode: code, + } +} + +/*CheckForOperatorUpdateDefault handles this case with default header values. + +An unexpected error response. +*/ +type CheckForOperatorUpdateDefault struct { + _statusCode int + + Payload *CheckForOperatorUpdateDefaultBody +} + +// Code gets the status code for the check for operator update default response +func (o *CheckForOperatorUpdateDefault) Code() int { + return o._statusCode +} + +func (o *CheckForOperatorUpdateDefault) Error() string { + return fmt.Sprintf("[POST /v1/management/DBaaS/Components/CheckForOperatorUpdate][%d] CheckForOperatorUpdate default %+v", o._statusCode, o.Payload) +} + +func (o *CheckForOperatorUpdateDefault) GetPayload() *CheckForOperatorUpdateDefaultBody { + return o.Payload +} + +func (o *CheckForOperatorUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(CheckForOperatorUpdateDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*CheckForOperatorUpdateDefaultBody check for operator update default body +swagger:model CheckForOperatorUpdateDefaultBody +*/ +type CheckForOperatorUpdateDefaultBody struct { + + // error + Error string `json:"error,omitempty"` + + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*DetailsItems0 `json:"details"` +} + +// Validate validates this check for operator update default body +func (o *CheckForOperatorUpdateDefaultBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *CheckForOperatorUpdateDefaultBody) validateDetails(formats strfmt.Registry) error { + + if swag.IsZero(o.Details) { // not required + return nil + } + + for i := 0; i < len(o.Details); i++ { + if swag.IsZero(o.Details[i]) { // not required + continue + } + + if o.Details[i] != nil { + if err := o.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("CheckForOperatorUpdate default" + "." + "details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *CheckForOperatorUpdateDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *CheckForOperatorUpdateDefaultBody) UnmarshalBinary(b []byte) error { + var res CheckForOperatorUpdateDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/*CheckForOperatorUpdateOKBody check for operator update OK body +swagger:model CheckForOperatorUpdateOKBody +*/ +type CheckForOperatorUpdateOKBody struct { + + // The cluster name is used as a key for this map, value contains components and their inforamtion about update. + ClusterToComponents map[string]ClusterToComponentsAnon `json:"cluster_to_components,omitempty"` +} + +// Validate validates this check for operator update OK body +func (o *CheckForOperatorUpdateOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateClusterToComponents(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *CheckForOperatorUpdateOKBody) validateClusterToComponents(formats strfmt.Registry) error { + + if swag.IsZero(o.ClusterToComponents) { // not required + return nil + } + + for k := range o.ClusterToComponents { + + if swag.IsZero(o.ClusterToComponents[k]) { // not required + continue + } + if val, ok := o.ClusterToComponents[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *CheckForOperatorUpdateOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *CheckForOperatorUpdateOKBody) UnmarshalBinary(b []byte) error { + var res CheckForOperatorUpdateOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/*ClusterToComponentsAnon ComponentsUpdateInformation contains info about components and their available latest versions. +swagger:model ClusterToComponentsAnon +*/ +type ClusterToComponentsAnon struct { + + // component_to_update_information stores, under the name of the component, information about the update. + // "pxc-operator", "psmdb-operator" are names used by backend for our operators. + ComponentToUpdateInformation map[string]ClusterToComponentsAnonComponentToUpdateInformationAnon `json:"component_to_update_information,omitempty"` +} + +// Validate validates this cluster to components anon +func (o *ClusterToComponentsAnon) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateComponentToUpdateInformation(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ClusterToComponentsAnon) validateComponentToUpdateInformation(formats strfmt.Registry) error { + + if swag.IsZero(o.ComponentToUpdateInformation) { // not required + return nil + } + + for k := range o.ComponentToUpdateInformation { + + if swag.IsZero(o.ComponentToUpdateInformation[k]) { // not required + continue + } + if val, ok := o.ComponentToUpdateInformation[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ClusterToComponentsAnon) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ClusterToComponentsAnon) UnmarshalBinary(b []byte) error { + var res ClusterToComponentsAnon + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/*ClusterToComponentsAnonComponentToUpdateInformationAnon ComponentUpdateInformation contains version we can update to for certain component. +swagger:model ClusterToComponentsAnonComponentToUpdateInformationAnon +*/ +type ClusterToComponentsAnonComponentToUpdateInformationAnon struct { + + // available version + AvailableVersion string `json:"available_version,omitempty"` +} + +// Validate validates this cluster to components anon component to update information anon +func (o *ClusterToComponentsAnonComponentToUpdateInformationAnon) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ClusterToComponentsAnonComponentToUpdateInformationAnon) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ClusterToComponentsAnonComponentToUpdateInformationAnon) UnmarshalBinary(b []byte) error { + var res ClusterToComponentsAnonComponentToUpdateInformationAnon + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/managementpb/dbaas/json/client/components/components_client.go b/api/managementpb/dbaas/json/client/components/components_client.go index d7857d31ad..5df11614ce 100644 --- a/api/managementpb/dbaas/json/client/components/components_client.go +++ b/api/managementpb/dbaas/json/client/components/components_client.go @@ -29,6 +29,8 @@ type ClientService interface { ChangePXCComponents(params *ChangePXCComponentsParams) (*ChangePXCComponentsOK, error) + CheckForOperatorUpdate(params *CheckForOperatorUpdateParams) (*CheckForOperatorUpdateOK, error) + GetPSMDBComponents(params *GetPSMDBComponentsParams) (*GetPSMDBComponentsOK, error) GetPXCComponents(params *GetPXCComponentsParams) (*GetPXCComponentsOK, error) @@ -102,6 +104,39 @@ func (a *Client) ChangePXCComponents(params *ChangePXCComponentsParams) (*Change return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* + CheckForOperatorUpdate checks for operator update checks if a new version of an operator is available +*/ +func (a *Client) CheckForOperatorUpdate(params *CheckForOperatorUpdateParams) (*CheckForOperatorUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCheckForOperatorUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "CheckForOperatorUpdate", + Method: "POST", + PathPattern: "/v1/management/DBaaS/Components/CheckForOperatorUpdate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &CheckForOperatorUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*CheckForOperatorUpdateOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CheckForOperatorUpdateDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* GetPSMDBComponents gets PSMDB components returns list of available components for PSMDB clusters */ diff --git a/api/managementpb/dbaas/json/dbaas.json b/api/managementpb/dbaas/json/dbaas.json index aec25a169a..b1439294b7 100644 --- a/api/managementpb/dbaas/json/dbaas.json +++ b/api/managementpb/dbaas/json/dbaas.json @@ -293,6 +293,100 @@ } } }, + "/v1/management/DBaaS/Components/CheckForOperatorUpdate": { + "post": { + "tags": [ + "Components" + ], + "summary": "CheckForOperatorUpdate checks if a new version of an operator is available.", + "operationId": "CheckForOperatorUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "cluster_to_components": { + "description": "The cluster name is used as a key for this map, value contains components and their inforamtion about update.", + "type": "object", + "additionalProperties": { + "description": "ComponentsUpdateInformation contains info about components and their available latest versions.", + "type": "object", + "properties": { + "component_to_update_information": { + "description": "component_to_update_information stores, under the name of the component, information about the update.\n\"pxc-operator\", \"psmdb-operator\" are names used by backend for our operators.", + "type": "object", + "additionalProperties": { + "description": "ComponentUpdateInformation contains version we can update to for certain component.", + "type": "object", + "properties": { + "available_version": { + "type": "string", + "x-order": 0 + } + } + }, + "x-order": 0 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type_url": { + "type": "string", + "x-order": 0 + }, + "value": { + "type": "string", + "format": "byte", + "x-order": 1 + } + } + }, + "x-order": 3 + }, + "error": { + "type": "string", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 2 + } + } + } + } + } + } + }, "/v1/management/DBaaS/Components/GetPSMDB": { "post": { "tags": [ diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index 1d9a1ca238..e3a1185190 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -16199,6 +16199,100 @@ } } }, + "/v1/management/DBaaS/Components/CheckForOperatorUpdate": { + "post": { + "tags": [ + "Components" + ], + "summary": "CheckForOperatorUpdate checks if a new version of an operator is available.", + "operationId": "CheckForOperatorUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "cluster_to_components": { + "description": "The cluster name is used as a key for this map, value contains components and their inforamtion about update.", + "type": "object", + "additionalProperties": { + "description": "ComponentsUpdateInformation contains info about components and their available latest versions.", + "type": "object", + "properties": { + "component_to_update_information": { + "description": "component_to_update_information stores, under the name of the component, information about the update.\n\"pxc-operator\", \"psmdb-operator\" are names used by backend for our operators.", + "type": "object", + "additionalProperties": { + "description": "ComponentUpdateInformation contains version we can update to for certain component.", + "type": "object", + "properties": { + "available_version": { + "type": "string", + "x-order": 0 + } + } + }, + "x-order": 0 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "x-order": 0 + }, + "code": { + "type": "integer", + "format": "int32", + "x-order": 1 + }, + "message": { + "type": "string", + "x-order": 2 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type_url": { + "type": "string", + "x-order": 0 + }, + "value": { + "type": "string", + "format": "byte", + "x-order": 1 + } + } + }, + "x-order": 3 + } + } + } + } + } + } + }, "/v1/management/DBaaS/Components/GetPSMDB": { "post": { "tags": [