Skip to content
Snippets Groups Projects
Commit 829a982d authored by Neil Schark's avatar Neil Schark
Browse files

add status to return

parent 58d50daf
Branches
No related tags found
2 merge requests!406Draft: Add backup script,!404Enable export and import of SDN configuration
Pipeline #123835 passed
...@@ -133,6 +133,7 @@ type ExportSDNConfigResponse struct { ...@@ -133,6 +133,7 @@ type ExportSDNConfigResponse struct {
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch. Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
SdnConfig string `protobuf:"bytes,2,opt,name=sdnConfig,proto3" json:"sdnConfig,omitempty"` SdnConfig string `protobuf:"bytes,2,opt,name=sdnConfig,proto3" json:"sdnConfig,omitempty"`
Status Status `protobuf:"varint,3,opt,name=status,proto3,enum=gosdn.configurationmanagement.Status" json:"status,omitempty"`
} }
func (x *ExportSDNConfigResponse) Reset() { func (x *ExportSDNConfigResponse) Reset() {
...@@ -181,6 +182,13 @@ func (x *ExportSDNConfigResponse) GetSdnConfig() string { ...@@ -181,6 +182,13 @@ func (x *ExportSDNConfigResponse) GetSdnConfig() string {
return "" return ""
} }
func (x *ExportSDNConfigResponse) GetStatus() Status {
if x != nil {
return x.Status
}
return Status_STATUS_UNSPECIFIED
}
type ImportSDNConfigRequest struct { type ImportSDNConfigRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
...@@ -307,12 +315,16 @@ var file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = [ ...@@ -307,12 +315,16 @@ var file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = [
0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x17, 0x45, 0x78, 0x70, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x94, 0x01, 0x0a, 0x17, 0x45, 0x78,
0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x64, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x64, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x64, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x64, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e,
0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x22, 0x48, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e, 0x43, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e, 0x43, 0x6f, 0x6e,
0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74,
...@@ -379,16 +391,17 @@ var file_gosdn_configurationmanagement_configurationmanagement_proto_goTypes = [ ...@@ -379,16 +391,17 @@ var file_gosdn_configurationmanagement_configurationmanagement_proto_goTypes = [
(*ImportSDNConfigResponse)(nil), // 4: gosdn.configurationmanagement.ImportSDNConfigResponse (*ImportSDNConfigResponse)(nil), // 4: gosdn.configurationmanagement.ImportSDNConfigResponse
} }
var file_gosdn_configurationmanagement_configurationmanagement_proto_depIdxs = []int32{ var file_gosdn_configurationmanagement_configurationmanagement_proto_depIdxs = []int32{
0, // 0: gosdn.configurationmanagement.ImportSDNConfigResponse.status:type_name -> gosdn.configurationmanagement.Status 0, // 0: gosdn.configurationmanagement.ExportSDNConfigResponse.status:type_name -> gosdn.configurationmanagement.Status
1, // 1: gosdn.configurationmanagement.ConfigurationManagementService.ExportSDNConfig:input_type -> gosdn.configurationmanagement.ExportSDNConfigRequest 0, // 1: gosdn.configurationmanagement.ImportSDNConfigResponse.status:type_name -> gosdn.configurationmanagement.Status
3, // 2: gosdn.configurationmanagement.ConfigurationManagementService.ImportSDNConfig:input_type -> gosdn.configurationmanagement.ImportSDNConfigRequest 1, // 2: gosdn.configurationmanagement.ConfigurationManagementService.ExportSDNConfig:input_type -> gosdn.configurationmanagement.ExportSDNConfigRequest
2, // 3: gosdn.configurationmanagement.ConfigurationManagementService.ExportSDNConfig:output_type -> gosdn.configurationmanagement.ExportSDNConfigResponse 3, // 3: gosdn.configurationmanagement.ConfigurationManagementService.ImportSDNConfig:input_type -> gosdn.configurationmanagement.ImportSDNConfigRequest
4, // 4: gosdn.configurationmanagement.ConfigurationManagementService.ImportSDNConfig:output_type -> gosdn.configurationmanagement.ImportSDNConfigResponse 2, // 4: gosdn.configurationmanagement.ConfigurationManagementService.ExportSDNConfig:output_type -> gosdn.configurationmanagement.ExportSDNConfigResponse
3, // [3:5] is the sub-list for method output_type 4, // 5: gosdn.configurationmanagement.ConfigurationManagementService.ImportSDNConfig:output_type -> gosdn.configurationmanagement.ImportSDNConfigResponse
1, // [1:3] is the sub-list for method input_type 4, // [4:6] is the sub-list for method output_type
1, // [1:1] is the sub-list for extension type_name 2, // [2:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension extendee 2, // [2:2] is the sub-list for extension type_name
0, // [0:1] is the sub-list for field type_name 2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
} }
func init() { file_gosdn_configurationmanagement_configurationmanagement_proto_init() } func init() { file_gosdn_configurationmanagement_configurationmanagement_proto_init() }
......
...@@ -1838,6 +1838,9 @@ ...@@ -1838,6 +1838,9 @@
}, },
"sdnConfig": { "sdnConfig": {
"type": "string" "type": "string"
},
"status": {
"$ref": "#/definitions/gosdnconfigurationmanagementStatus"
} }
} }
}, },
......
...@@ -30,6 +30,7 @@ message ExportSDNConfigRequest { ...@@ -30,6 +30,7 @@ message ExportSDNConfigRequest {
message ExportSDNConfigResponse { message ExportSDNConfigResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch. int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string sdnConfig = 2; string sdnConfig = 2;
Status status = 3;
} }
message ImportSDNConfigRequest { message ImportSDNConfigRequest {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment