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

started protobuf

parent d27df762
No related branches found
No related tags found
2 merge requests!406Draft: Add backup script,!404Enable export and import of SDN configuration
Pipeline #123823 passed
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc (unknown)
// source: gosdn/configurationmanagement/configurationmanagement.proto
package core
import (
_ "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Status int32
const (
Status_STATUS_UNSPECIFIED Status = 0
Status_STATUS_OK Status = 1
Status_STATUS_ERROR Status = 2
)
// Enum value maps for Status.
var (
Status_name = map[int32]string{
0: "STATUS_UNSPECIFIED",
1: "STATUS_OK",
2: "STATUS_ERROR",
}
Status_value = map[string]int32{
"STATUS_UNSPECIFIED": 0,
"STATUS_OK": 1,
"STATUS_ERROR": 2,
}
)
func (x Status) Enum() *Status {
p := new(Status)
*p = x
return p
}
func (x Status) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Status) Descriptor() protoreflect.EnumDescriptor {
return file_gosdn_configurationmanagement_configurationmanagement_proto_enumTypes[0].Descriptor()
}
func (Status) Type() protoreflect.EnumType {
return &file_gosdn_configurationmanagement_configurationmanagement_proto_enumTypes[0]
}
func (x Status) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Status.Descriptor instead.
func (Status) EnumDescriptor() ([]byte, []int) {
return file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescGZIP(), []int{0}
}
type ExportSDNConfigRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"`
}
func (x *ExportSDNConfigRequest) Reset() {
*x = ExportSDNConfigRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExportSDNConfigRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExportSDNConfigRequest) ProtoMessage() {}
func (x *ExportSDNConfigRequest) ProtoReflect() protoreflect.Message {
mi := &file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[0]
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 ExportSDNConfigRequest.ProtoReflect.Descriptor instead.
func (*ExportSDNConfigRequest) Descriptor() ([]byte, []int) {
return file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescGZIP(), []int{0}
}
func (x *ExportSDNConfigRequest) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *ExportSDNConfigRequest) GetPid() string {
if x != nil {
return x.Pid
}
return ""
}
type ExportSDNConfigResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
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"`
}
func (x *ExportSDNConfigResponse) Reset() {
*x = ExportSDNConfigResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ExportSDNConfigResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExportSDNConfigResponse) ProtoMessage() {}
func (x *ExportSDNConfigResponse) ProtoReflect() protoreflect.Message {
mi := &file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[1]
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 ExportSDNConfigResponse.ProtoReflect.Descriptor instead.
func (*ExportSDNConfigResponse) Descriptor() ([]byte, []int) {
return file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescGZIP(), []int{1}
}
func (x *ExportSDNConfigResponse) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *ExportSDNConfigResponse) GetSdnConfig() string {
if x != nil {
return x.SdnConfig
}
return ""
}
type ImportSDNConfigRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
Pid string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"`
}
func (x *ImportSDNConfigRequest) Reset() {
*x = ImportSDNConfigRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ImportSDNConfigRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ImportSDNConfigRequest) ProtoMessage() {}
func (x *ImportSDNConfigRequest) ProtoReflect() protoreflect.Message {
mi := &file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[2]
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 ImportSDNConfigRequest.ProtoReflect.Descriptor instead.
func (*ImportSDNConfigRequest) Descriptor() ([]byte, []int) {
return file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescGZIP(), []int{2}
}
func (x *ImportSDNConfigRequest) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *ImportSDNConfigRequest) GetPid() string {
if x != nil {
return x.Pid
}
return ""
}
type ImportSDNConfigResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // Timestamp in nanoseconds since Epoch.
Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=gosdn.configurationmanagement.Status" json:"status,omitempty"`
}
func (x *ImportSDNConfigResponse) Reset() {
*x = ImportSDNConfigResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ImportSDNConfigResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ImportSDNConfigResponse) ProtoMessage() {}
func (x *ImportSDNConfigResponse) ProtoReflect() protoreflect.Message {
mi := &file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[3]
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 ImportSDNConfigResponse.ProtoReflect.Descriptor instead.
func (*ImportSDNConfigResponse) Descriptor() ([]byte, []int) {
return file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescGZIP(), []int{3}
}
func (x *ImportSDNConfigResponse) GetTimestamp() int64 {
if x != nil {
return x.Timestamp
}
return 0
}
func (x *ImportSDNConfigResponse) GetStatus() Status {
if x != nil {
return x.Status
}
return Status_STATUS_UNSPECIFIED
}
var File_gosdn_configurationmanagement_configurationmanagement_proto protoreflect.FileDescriptor
var file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = []byte{
0x0a, 0x3b, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f,
0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x61, 0x6e,
0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 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, 0x1a, 0x1c, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x67, 0x6f, 0x73, 0x64,
0x6e, 0x2f, 0x70, 0x6e, 0x64, 0x2f, 0x70, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x48, 0x0a, 0x16, 0x45, 0x78, 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, 0x6d,
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,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x17, 0x45, 0x78, 0x70,
0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x12, 0x1c, 0x0a, 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,
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,
0x6d, 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, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69, 0x64, 0x22, 0x76, 0x0a, 0x17, 0x49, 0x6d,
0x70, 0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x12, 0x3d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 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, 0x2a, 0x41, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12,
0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f,
0x4b, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x52,
0x52, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xd4, 0x02, 0x0a, 0x1e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x70,
0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 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, 0x45, 0x78, 0x70,
0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x36, 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, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e, 0x43, 0x6f, 0x6e,
0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x70, 0x69,
0x64, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 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, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e,
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 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, 0x49, 0x6d,
0x70, 0x6f, 0x72, 0x74, 0x53, 0x44, 0x4e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x22, 0x0d, 0x2f,
0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x70, 0x69, 0x64, 0x7d, 0x42, 0x30, 0x5a, 0x2e,
0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65,
0x2f, 0x64, 0x61, 0x6e, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescOnce sync.Once
file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData = file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc
)
func file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescGZIP() []byte {
file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescOnce.Do(func() {
file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData)
})
return file_gosdn_configurationmanagement_configurationmanagement_proto_rawDescData
}
var file_gosdn_configurationmanagement_configurationmanagement_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_gosdn_configurationmanagement_configurationmanagement_proto_goTypes = []interface{}{
(Status)(0), // 0: gosdn.configurationmanagement.Status
(*ExportSDNConfigRequest)(nil), // 1: gosdn.configurationmanagement.ExportSDNConfigRequest
(*ExportSDNConfigResponse)(nil), // 2: gosdn.configurationmanagement.ExportSDNConfigResponse
(*ImportSDNConfigRequest)(nil), // 3: gosdn.configurationmanagement.ImportSDNConfigRequest
(*ImportSDNConfigResponse)(nil), // 4: gosdn.configurationmanagement.ImportSDNConfigResponse
}
var file_gosdn_configurationmanagement_configurationmanagement_proto_depIdxs = []int32{
0, // 0: gosdn.configurationmanagement.ImportSDNConfigResponse.status:type_name -> gosdn.configurationmanagement.Status
1, // 1: gosdn.configurationmanagement.ConfigurationManagementService.ExportSDNConfig:input_type -> gosdn.configurationmanagement.ExportSDNConfigRequest
3, // 2: gosdn.configurationmanagement.ConfigurationManagementService.ImportSDNConfig:input_type -> gosdn.configurationmanagement.ImportSDNConfigRequest
2, // 3: gosdn.configurationmanagement.ConfigurationManagementService.ExportSDNConfig:output_type -> gosdn.configurationmanagement.ExportSDNConfigResponse
4, // 4: gosdn.configurationmanagement.ConfigurationManagementService.ImportSDNConfig:output_type -> gosdn.configurationmanagement.ImportSDNConfigResponse
3, // [3:5] is the sub-list for method output_type
1, // [1:3] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_gosdn_configurationmanagement_configurationmanagement_proto_init() }
func file_gosdn_configurationmanagement_configurationmanagement_proto_init() {
if File_gosdn_configurationmanagement_configurationmanagement_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExportSDNConfigRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ExportSDNConfigResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ImportSDNConfigRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ImportSDNConfigResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc,
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_gosdn_configurationmanagement_configurationmanagement_proto_goTypes,
DependencyIndexes: file_gosdn_configurationmanagement_configurationmanagement_proto_depIdxs,
EnumInfos: file_gosdn_configurationmanagement_configurationmanagement_proto_enumTypes,
MessageInfos: file_gosdn_configurationmanagement_configurationmanagement_proto_msgTypes,
}.Build()
File_gosdn_configurationmanagement_configurationmanagement_proto = out.File
file_gosdn_configurationmanagement_configurationmanagement_proto_rawDesc = nil
file_gosdn_configurationmanagement_configurationmanagement_proto_goTypes = nil
file_gosdn_configurationmanagement_configurationmanagement_proto_depIdxs = nil
}
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: gosdn/configurationmanagement/configurationmanagement.proto
/*
Package core is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package core
import (
"context"
"io"
"net/http"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
var (
filter_ConfigurationManagementService_ExportSDNConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
)
func request_ConfigurationManagementService_ExportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigurationManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ExportSDNConfigRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["pid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid")
}
protoReq.Pid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ExportSDNConfig_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ExportSDNConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ConfigurationManagementService_ExportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigurationManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ExportSDNConfigRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["pid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid")
}
protoReq.Pid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ExportSDNConfig_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ExportSDNConfig(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_ConfigurationManagementService_ImportSDNConfig_0 = &utilities.DoubleArray{Encoding: map[string]int{"pid": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
)
func request_ConfigurationManagementService_ImportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigurationManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ImportSDNConfigRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["pid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid")
}
protoReq.Pid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ImportSDNConfig_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ImportSDNConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ConfigurationManagementService_ImportSDNConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigurationManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ImportSDNConfigRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["pid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pid")
}
protoReq.Pid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pid", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ConfigurationManagementService_ImportSDNConfig_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ImportSDNConfig(ctx, &protoReq)
return msg, metadata, err
}
// RegisterConfigurationManagementServiceHandlerServer registers the http handlers for service ConfigurationManagementService to "mux".
// UnaryRPC :call ConfigurationManagementServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterConfigurationManagementServiceHandlerFromEndpoint instead.
func RegisterConfigurationManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigurationManagementServiceServer) error {
mux.Handle("GET", pattern_ConfigurationManagementService_ExportSDNConfig_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, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", runtime.WithHTTPPathPattern("/export/{pid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ConfigurationManagementService_ExportSDNConfig_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_ConfigurationManagementService_ExportSDNConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_ConfigurationManagementService_ImportSDNConfig_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, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", runtime.WithHTTPPathPattern("/import/{pid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ConfigurationManagementService_ImportSDNConfig_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_ConfigurationManagementService_ImportSDNConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterConfigurationManagementServiceHandlerFromEndpoint is same as RegisterConfigurationManagementServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterConfigurationManagementServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterConfigurationManagementServiceHandler(ctx, mux, conn)
}
// RegisterConfigurationManagementServiceHandler registers the http handlers for service ConfigurationManagementService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterConfigurationManagementServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterConfigurationManagementServiceHandlerClient(ctx, mux, NewConfigurationManagementServiceClient(conn))
}
// RegisterConfigurationManagementServiceHandlerClient registers the http handlers for service ConfigurationManagementService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConfigurationManagementServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConfigurationManagementServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "ConfigurationManagementServiceClient" to call the correct interceptors.
func RegisterConfigurationManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigurationManagementServiceClient) error {
mux.Handle("GET", pattern_ConfigurationManagementService_ExportSDNConfig_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, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", runtime.WithHTTPPathPattern("/export/{pid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ConfigurationManagementService_ExportSDNConfig_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigurationManagementService_ExportSDNConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_ConfigurationManagementService_ImportSDNConfig_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, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", runtime.WithHTTPPathPattern("/import/{pid}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ConfigurationManagementService_ImportSDNConfig_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigurationManagementService_ImportSDNConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_ConfigurationManagementService_ExportSDNConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"export", "pid"}, ""))
pattern_ConfigurationManagementService_ImportSDNConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"import", "pid"}, ""))
)
var (
forward_ConfigurationManagementService_ExportSDNConfig_0 = runtime.ForwardResponseMessage
forward_ConfigurationManagementService_ImportSDNConfig_0 = runtime.ForwardResponseMessage
)
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package core
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ConfigurationManagementServiceClient is the client API for ConfigurationManagementService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ConfigurationManagementServiceClient interface {
// Allows for export of the whole SDN configuration
ExportSDNConfig(ctx context.Context, in *ExportSDNConfigRequest, opts ...grpc.CallOption) (*ExportSDNConfigResponse, error)
// Allows for import of the whole SDN configuration
ImportSDNConfig(ctx context.Context, in *ImportSDNConfigRequest, opts ...grpc.CallOption) (*ImportSDNConfigResponse, error)
}
type configurationManagementServiceClient struct {
cc grpc.ClientConnInterface
}
func NewConfigurationManagementServiceClient(cc grpc.ClientConnInterface) ConfigurationManagementServiceClient {
return &configurationManagementServiceClient{cc}
}
func (c *configurationManagementServiceClient) ExportSDNConfig(ctx context.Context, in *ExportSDNConfigRequest, opts ...grpc.CallOption) (*ExportSDNConfigResponse, error) {
out := new(ExportSDNConfigResponse)
err := c.cc.Invoke(ctx, "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *configurationManagementServiceClient) ImportSDNConfig(ctx context.Context, in *ImportSDNConfigRequest, opts ...grpc.CallOption) (*ImportSDNConfigResponse, error) {
out := new(ImportSDNConfigResponse)
err := c.cc.Invoke(ctx, "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ConfigurationManagementServiceServer is the server API for ConfigurationManagementService service.
// All implementations must embed UnimplementedConfigurationManagementServiceServer
// for forward compatibility
type ConfigurationManagementServiceServer interface {
// Allows for export of the whole SDN configuration
ExportSDNConfig(context.Context, *ExportSDNConfigRequest) (*ExportSDNConfigResponse, error)
// Allows for import of the whole SDN configuration
ImportSDNConfig(context.Context, *ImportSDNConfigRequest) (*ImportSDNConfigResponse, error)
mustEmbedUnimplementedConfigurationManagementServiceServer()
}
// UnimplementedConfigurationManagementServiceServer must be embedded to have forward compatible implementations.
type UnimplementedConfigurationManagementServiceServer struct {
}
func (UnimplementedConfigurationManagementServiceServer) ExportSDNConfig(context.Context, *ExportSDNConfigRequest) (*ExportSDNConfigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ExportSDNConfig not implemented")
}
func (UnimplementedConfigurationManagementServiceServer) ImportSDNConfig(context.Context, *ImportSDNConfigRequest) (*ImportSDNConfigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ImportSDNConfig not implemented")
}
func (UnimplementedConfigurationManagementServiceServer) mustEmbedUnimplementedConfigurationManagementServiceServer() {
}
// UnsafeConfigurationManagementServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ConfigurationManagementServiceServer will
// result in compilation errors.
type UnsafeConfigurationManagementServiceServer interface {
mustEmbedUnimplementedConfigurationManagementServiceServer()
}
func RegisterConfigurationManagementServiceServer(s grpc.ServiceRegistrar, srv ConfigurationManagementServiceServer) {
s.RegisterService(&ConfigurationManagementService_ServiceDesc, srv)
}
func _ConfigurationManagementService_ExportSDNConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ExportSDNConfigRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConfigurationManagementServiceServer).ExportSDNConfig(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gosdn.configurationmanagement.ConfigurationManagementService/ExportSDNConfig",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConfigurationManagementServiceServer).ExportSDNConfig(ctx, req.(*ExportSDNConfigRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ConfigurationManagementService_ImportSDNConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ImportSDNConfigRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConfigurationManagementServiceServer).ImportSDNConfig(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/gosdn.configurationmanagement.ConfigurationManagementService/ImportSDNConfig",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConfigurationManagementServiceServer).ImportSDNConfig(ctx, req.(*ImportSDNConfigRequest))
}
return interceptor(ctx, in, info, handler)
}
// ConfigurationManagementService_ServiceDesc is the grpc.ServiceDesc for ConfigurationManagementService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ConfigurationManagementService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "gosdn.configurationmanagement.ConfigurationManagementService",
HandlerType: (*ConfigurationManagementServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ExportSDNConfig",
Handler: _ConfigurationManagementService_ExportSDNConfig_Handler,
},
{
MethodName: "ImportSDNConfig",
Handler: _ConfigurationManagementService_ImportSDNConfig_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "gosdn/configurationmanagement/configurationmanagement.proto",
}
...@@ -32,6 +32,9 @@ ...@@ -32,6 +32,9 @@
{ {
"name": "SbiService" "name": "SbiService"
}, },
{
"name": "ConfigurationManagementService"
},
{ {
"name": "CoreService" "name": "CoreService"
}, },
...@@ -97,6 +100,82 @@ ...@@ -97,6 +100,82 @@
] ]
} }
}, },
"/export/{pid}": {
"get": {
"summary": "Allows for export of the whole SDN configuration",
"operationId": "ConfigurationManagementService_ExportSDNConfig",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/configurationmanagementExportSDNConfigResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "timestamp",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
}
],
"tags": [
"ConfigurationManagementService"
]
}
},
"/import/{pid}": {
"post": {
"summary": "Allows for import of the whole SDN configuration",
"operationId": "ConfigurationManagementService_ImportSDNConfig",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/configurationmanagementImportSDNConfigResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/googlerpcStatus"
}
}
},
"parameters": [
{
"name": "pid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "timestamp",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
}
],
"tags": [
"ConfigurationManagementService"
]
}
},
"/login": { "/login": {
"post": { "post": {
"summary": "Allows a user to login creating a session for further actions.", "summary": "Allows a user to login creating a session for further actions.",
...@@ -1750,6 +1829,30 @@ ...@@ -1750,6 +1829,30 @@
} }
} }
}, },
"configurationmanagementExportSDNConfigResponse": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "int64"
},
"sdnConfig": {
"type": "string"
}
}
},
"configurationmanagementImportSDNConfigResponse": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"format": "int64"
},
"status": {
"$ref": "#/definitions/gosdnconfigurationmanagementStatus"
}
}
},
"conflictMetadata": { "conflictMetadata": {
"type": "object", "type": "object",
"properties": { "properties": {
...@@ -2930,6 +3033,15 @@ ...@@ -2930,6 +3033,15 @@
], ],
"default": "STATUS_UNSPECIFIED" "default": "STATUS_UNSPECIFIED"
}, },
"gosdnconfigurationmanagementStatus": {
"type": "string",
"enum": [
"STATUS_UNSPECIFIED",
"STATUS_OK",
"STATUS_ERROR"
],
"default": "STATUS_UNSPECIFIED"
},
"gosdncoreStatus": { "gosdncoreStatus": {
"type": "string", "type": "string",
"enum": [ "enum": [
......
...@@ -4,8 +4,8 @@ deps: ...@@ -4,8 +4,8 @@ deps:
- remote: buf.build - remote: buf.build
owner: googleapis owner: googleapis
repository: googleapis repository: googleapis
commit: d1263fe26f8e430a967dc22a4d0cad18 commit: faacf837d7304c58b7c9020c7807fa6e
- remote: buf.build - remote: buf.build
owner: grpc-ecosystem owner: grpc-ecosystem
repository: grpc-gateway repository: grpc-gateway
commit: b96615cde70c403f8075c48e56178f88 commit: a1ecdc58eccd49aa8bea2a7a9022dc27
syntax = "proto3";
package gosdn.configurationmanagement;
import "google/api/annotations.proto";
import "gosdn/pnd/pnd.proto";
option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/core";
service ConfigurationManagementService{
// Allows for export of the whole SDN configuration
rpc ExportSDNConfig(ExportSDNConfigRequest) returns (ExportSDNConfigResponse) {
option (google.api.http) = {
get: "/export/{pid}"
};
}
// Allows for import of the whole SDN configuration
rpc ImportSDNConfig(ImportSDNConfigRequest) returns (ImportSDNConfigResponse) {
option (google.api.http) = {
post: "/import/{pid}"
};
}
}
message ExportSDNConfigRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string pid = 2;
}
message ExportSDNConfigResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string sdnConfig = 2;
}
message ImportSDNConfigRequest {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
string pid = 2;
}
message ImportSDNConfigResponse {
int64 timestamp = 1; // Timestamp in nanoseconds since Epoch.
Status status = 2;
}
enum Status {
STATUS_UNSPECIFIED = 0;
STATUS_OK = 1;
STATUS_ERROR = 2;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment