diff --git a/api/go/gosdn/topology/link.pb.go b/api/go/gosdn/topology/link.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..a6ccea7d9d76de9798d2f27d4c5548b430d0b33b --- /dev/null +++ b/api/go/gosdn/topology/link.pb.go @@ -0,0 +1,221 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: gosdn/topology/link.proto + +package topology + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + 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 Link struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + SourceNode *Node `protobuf:"bytes,3,opt,name=sourceNode,proto3" json:"sourceNode,omitempty"` + TargetNode *Node `protobuf:"bytes,4,opt,name=targetNode,proto3" json:"targetNode,omitempty"` + SourcePort *Port `protobuf:"bytes,5,opt,name=sourcePort,proto3" json:"sourcePort,omitempty"` + TargetPort *Port `protobuf:"bytes,6,opt,name=targetPort,proto3" json:"targetPort,omitempty"` +} + +func (x *Link) Reset() { + *x = Link{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_topology_link_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Link) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Link) ProtoMessage() {} + +func (x *Link) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_topology_link_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 Link.ProtoReflect.Descriptor instead. +func (*Link) Descriptor() ([]byte, []int) { + return file_gosdn_topology_link_proto_rawDescGZIP(), []int{0} +} + +func (x *Link) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Link) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Link) GetSourceNode() *Node { + if x != nil { + return x.SourceNode + } + return nil +} + +func (x *Link) GetTargetNode() *Node { + if x != nil { + return x.TargetNode + } + return nil +} + +func (x *Link) GetSourcePort() *Port { + if x != nil { + return x.SourcePort + } + return nil +} + +func (x *Link) GetTargetPort() *Port { + if x != nil { + return x.TargetPort + } + return nil +} + +var File_gosdn_topology_link_proto protoreflect.FileDescriptor + +var file_gosdn_topology_link_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x2f, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 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, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x82, 0x02, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, + 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, + 0x6f, 0x67, 0x79, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0a, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, + 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x72, 0x74, + 0x12, 0x34, 0x0a, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, + 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x42, 0x34, 0x5a, 0x32, 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, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gosdn_topology_link_proto_rawDescOnce sync.Once + file_gosdn_topology_link_proto_rawDescData = file_gosdn_topology_link_proto_rawDesc +) + +func file_gosdn_topology_link_proto_rawDescGZIP() []byte { + file_gosdn_topology_link_proto_rawDescOnce.Do(func() { + file_gosdn_topology_link_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_link_proto_rawDescData) + }) + return file_gosdn_topology_link_proto_rawDescData +} + +var file_gosdn_topology_link_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_gosdn_topology_link_proto_goTypes = []interface{}{ + (*Link)(nil), // 0: gosdn.topology.Link + (*Node)(nil), // 1: gosdn.topology.Node + (*Port)(nil), // 2: gosdn.topology.Port +} +var file_gosdn_topology_link_proto_depIdxs = []int32{ + 1, // 0: gosdn.topology.Link.sourceNode:type_name -> gosdn.topology.Node + 1, // 1: gosdn.topology.Link.targetNode:type_name -> gosdn.topology.Node + 2, // 2: gosdn.topology.Link.sourcePort:type_name -> gosdn.topology.Port + 2, // 3: gosdn.topology.Link.targetPort:type_name -> gosdn.topology.Port + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_gosdn_topology_link_proto_init() } +func file_gosdn_topology_link_proto_init() { + if File_gosdn_topology_link_proto != nil { + return + } + file_gosdn_topology_node_proto_init() + file_gosdn_topology_port_proto_init() + if !protoimpl.UnsafeEnabled { + file_gosdn_topology_link_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Link); 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_topology_link_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_gosdn_topology_link_proto_goTypes, + DependencyIndexes: file_gosdn_topology_link_proto_depIdxs, + MessageInfos: file_gosdn_topology_link_proto_msgTypes, + }.Build() + File_gosdn_topology_link_proto = out.File + file_gosdn_topology_link_proto_rawDesc = nil + file_gosdn_topology_link_proto_goTypes = nil + file_gosdn_topology_link_proto_depIdxs = nil +} diff --git a/api/go/gosdn/topology/node.pb.go b/api/go/gosdn/topology/node.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..0c9330271dd3e7d66d7f8454d254091c32961090 --- /dev/null +++ b/api/go/gosdn/topology/node.pb.go @@ -0,0 +1,164 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: gosdn/topology/node.proto + +package topology + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + 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 Node struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Node) Reset() { + *x = Node{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_topology_node_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Node) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Node) ProtoMessage() {} + +func (x *Node) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_topology_node_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 Node.ProtoReflect.Descriptor instead. +func (*Node) Descriptor() ([]byte, []int) { + return file_gosdn_topology_node_proto_rawDescGZIP(), []int{0} +} + +func (x *Node) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Node) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_gosdn_topology_node_proto protoreflect.FileDescriptor + +var file_gosdn_topology_node_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 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, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2a, 0x0a, 0x04, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x34, 0x5a, 0x32, 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, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gosdn_topology_node_proto_rawDescOnce sync.Once + file_gosdn_topology_node_proto_rawDescData = file_gosdn_topology_node_proto_rawDesc +) + +func file_gosdn_topology_node_proto_rawDescGZIP() []byte { + file_gosdn_topology_node_proto_rawDescOnce.Do(func() { + file_gosdn_topology_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_node_proto_rawDescData) + }) + return file_gosdn_topology_node_proto_rawDescData +} + +var file_gosdn_topology_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_gosdn_topology_node_proto_goTypes = []interface{}{ + (*Node)(nil), // 0: gosdn.topology.Node +} +var file_gosdn_topology_node_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_gosdn_topology_node_proto_init() } +func file_gosdn_topology_node_proto_init() { + if File_gosdn_topology_node_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gosdn_topology_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Node); 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_topology_node_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_gosdn_topology_node_proto_goTypes, + DependencyIndexes: file_gosdn_topology_node_proto_depIdxs, + MessageInfos: file_gosdn_topology_node_proto_msgTypes, + }.Build() + File_gosdn_topology_node_proto = out.File + file_gosdn_topology_node_proto_rawDesc = nil + file_gosdn_topology_node_proto_goTypes = nil + file_gosdn_topology_node_proto_depIdxs = nil +} diff --git a/api/go/gosdn/topology/port.pb.go b/api/go/gosdn/topology/port.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..f1583e32a7081da933a17ad45b41ba8f3e3e1dc3 --- /dev/null +++ b/api/go/gosdn/topology/port.pb.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: gosdn/topology/port.proto + +package topology + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + 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 Port struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *Port) Reset() { + *x = Port{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_topology_port_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Port) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Port) ProtoMessage() {} + +func (x *Port) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_topology_port_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 Port.ProtoReflect.Descriptor instead. +func (*Port) Descriptor() ([]byte, []int) { + return file_gosdn_topology_port_proto_rawDescGZIP(), []int{0} +} + +func (x *Port) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +var File_gosdn_topology_port_proto protoreflect.FileDescriptor + +var file_gosdn_topology_port_proto_rawDesc = []byte{ + 0x0a, 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x2f, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 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, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x16, 0x0a, 0x04, 0x50, + 0x6f, 0x72, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x42, 0x34, 0x5a, 0x32, 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, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_gosdn_topology_port_proto_rawDescOnce sync.Once + file_gosdn_topology_port_proto_rawDescData = file_gosdn_topology_port_proto_rawDesc +) + +func file_gosdn_topology_port_proto_rawDescGZIP() []byte { + file_gosdn_topology_port_proto_rawDescOnce.Do(func() { + file_gosdn_topology_port_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_port_proto_rawDescData) + }) + return file_gosdn_topology_port_proto_rawDescData +} + +var file_gosdn_topology_port_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_gosdn_topology_port_proto_goTypes = []interface{}{ + (*Port)(nil), // 0: gosdn.topology.Port +} +var file_gosdn_topology_port_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_gosdn_topology_port_proto_init() } +func file_gosdn_topology_port_proto_init() { + if File_gosdn_topology_port_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gosdn_topology_port_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Port); 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_topology_port_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_gosdn_topology_port_proto_goTypes, + DependencyIndexes: file_gosdn_topology_port_proto_depIdxs, + MessageInfos: file_gosdn_topology_port_proto_msgTypes, + }.Build() + File_gosdn_topology_port_proto = out.File + file_gosdn_topology_port_proto_rawDesc = nil + file_gosdn_topology_port_proto_goTypes = nil + file_gosdn_topology_port_proto_depIdxs = nil +} diff --git a/api/go/gosdn/topology/topology.pb.go b/api/go/gosdn/topology/topology.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..9119f79b6fa8e77fdd44a9ce358ef434382937f8 --- /dev/null +++ b/api/go/gosdn/topology/topology.pb.go @@ -0,0 +1,539 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc (unknown) +// source: gosdn/topology/topology.proto + +package topology + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + 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_topology_topology_proto_enumTypes[0].Descriptor() +} + +func (Status) Type() protoreflect.EnumType { + return &file_gosdn_topology_topology_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_topology_topology_proto_rawDescGZIP(), []int{0} +} + +type Topology struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Links []*Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` +} + +func (x *Topology) Reset() { + *x = Topology{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_topology_topology_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Topology) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Topology) ProtoMessage() {} + +func (x *Topology) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_topology_topology_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 Topology.ProtoReflect.Descriptor instead. +func (*Topology) Descriptor() ([]byte, []int) { + return file_gosdn_topology_topology_proto_rawDescGZIP(), []int{0} +} + +func (x *Topology) GetLinks() []*Link { + if x != nil { + return x.Links + } + return nil +} + +// AddLink +type AddLinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Link *Link `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"` +} + +func (x *AddLinkRequest) Reset() { + *x = AddLinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_topology_topology_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddLinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddLinkRequest) ProtoMessage() {} + +func (x *AddLinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_topology_topology_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 AddLinkRequest.ProtoReflect.Descriptor instead. +func (*AddLinkRequest) Descriptor() ([]byte, []int) { + return file_gosdn_topology_topology_proto_rawDescGZIP(), []int{1} +} + +func (x *AddLinkRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *AddLinkRequest) GetLink() *Link { + if x != nil { + return x.Link + } + return nil +} + +type AddLinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=gosdn.topology.Status" json:"status,omitempty"` +} + +func (x *AddLinkResponse) Reset() { + *x = AddLinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_topology_topology_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddLinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddLinkResponse) ProtoMessage() {} + +func (x *AddLinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_topology_topology_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 AddLinkResponse.ProtoReflect.Descriptor instead. +func (*AddLinkResponse) Descriptor() ([]byte, []int) { + return file_gosdn_topology_topology_proto_rawDescGZIP(), []int{2} +} + +func (x *AddLinkResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *AddLinkResponse) GetStatus() Status { + if x != nil { + return x.Status + } + return Status_STATUS_UNSPECIFIED +} + +// GetTopology +type GetTopologyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *GetTopologyRequest) Reset() { + *x = GetTopologyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_topology_topology_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTopologyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTopologyRequest) ProtoMessage() {} + +func (x *GetTopologyRequest) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_topology_topology_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 GetTopologyRequest.ProtoReflect.Descriptor instead. +func (*GetTopologyRequest) Descriptor() ([]byte, []int) { + return file_gosdn_topology_topology_proto_rawDescGZIP(), []int{3} +} + +func (x *GetTopologyRequest) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +type GetTopologyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=gosdn.topology.Status" json:"status,omitempty"` + Toplogy *Topology `protobuf:"bytes,3,opt,name=toplogy,proto3" json:"toplogy,omitempty"` +} + +func (x *GetTopologyResponse) Reset() { + *x = GetTopologyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gosdn_topology_topology_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTopologyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTopologyResponse) ProtoMessage() {} + +func (x *GetTopologyResponse) ProtoReflect() protoreflect.Message { + mi := &file_gosdn_topology_topology_proto_msgTypes[4] + 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 GetTopologyResponse.ProtoReflect.Descriptor instead. +func (*GetTopologyResponse) Descriptor() ([]byte, []int) { + return file_gosdn_topology_topology_proto_rawDescGZIP(), []int{4} +} + +func (x *GetTopologyResponse) GetTimestamp() int64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *GetTopologyResponse) GetStatus() Status { + if x != nil { + return x.Status + } + return Status_STATUS_UNSPECIFIED +} + +func (x *GetTopologyResponse) GetToplogy() *Topology { + if x != nil { + return x.Toplogy + } + return nil +} + +var File_gosdn_topology_topology_proto protoreflect.FileDescriptor + +var file_gosdn_topology_topology_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, + 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 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, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x19, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2f, + 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x36, 0x0a, 0x08, 0x54, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, 0x69, 0x6e, + 0x6b, 0x73, 0x22, 0x58, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 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, 0x28, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, + 0x79, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x5f, 0x0a, 0x0f, + 0x41, 0x64, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 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, 0x2e, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x32, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 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, 0x22, 0x97, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, + 0x79, 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, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, + 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x74, 0x6f, 0x70, 0x6c, 0x6f, + 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, + 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x52, 0x07, 0x74, 0x6f, 0x70, 0x6c, 0x6f, 0x67, 0x79, 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, 0xe5, + 0x01, 0x0a, 0x0f, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x67, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x1e, 0x2e, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x41, + 0x64, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x41, + 0x64, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x74, 0x6f, 0x70, 0x6f, + 0x6c, 0x6f, 0x67, 0x79, 0x2f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x69, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x22, 0x2e, 0x67, 0x6f, 0x73, + 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x67, 0x6f, 0x73, 0x64, 0x6e, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x74, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x42, 0x34, 0x5a, 0x32, 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, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_gosdn_topology_topology_proto_rawDescOnce sync.Once + file_gosdn_topology_topology_proto_rawDescData = file_gosdn_topology_topology_proto_rawDesc +) + +func file_gosdn_topology_topology_proto_rawDescGZIP() []byte { + file_gosdn_topology_topology_proto_rawDescOnce.Do(func() { + file_gosdn_topology_topology_proto_rawDescData = protoimpl.X.CompressGZIP(file_gosdn_topology_topology_proto_rawDescData) + }) + return file_gosdn_topology_topology_proto_rawDescData +} + +var file_gosdn_topology_topology_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_gosdn_topology_topology_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_gosdn_topology_topology_proto_goTypes = []interface{}{ + (Status)(0), // 0: gosdn.topology.Status + (*Topology)(nil), // 1: gosdn.topology.Topology + (*AddLinkRequest)(nil), // 2: gosdn.topology.AddLinkRequest + (*AddLinkResponse)(nil), // 3: gosdn.topology.AddLinkResponse + (*GetTopologyRequest)(nil), // 4: gosdn.topology.GetTopologyRequest + (*GetTopologyResponse)(nil), // 5: gosdn.topology.GetTopologyResponse + (*Link)(nil), // 6: gosdn.topology.Link +} +var file_gosdn_topology_topology_proto_depIdxs = []int32{ + 6, // 0: gosdn.topology.Topology.links:type_name -> gosdn.topology.Link + 6, // 1: gosdn.topology.AddLinkRequest.link:type_name -> gosdn.topology.Link + 0, // 2: gosdn.topology.AddLinkResponse.status:type_name -> gosdn.topology.Status + 0, // 3: gosdn.topology.GetTopologyResponse.status:type_name -> gosdn.topology.Status + 1, // 4: gosdn.topology.GetTopologyResponse.toplogy:type_name -> gosdn.topology.Topology + 2, // 5: gosdn.topology.TopologyService.AddLink:input_type -> gosdn.topology.AddLinkRequest + 4, // 6: gosdn.topology.TopologyService.GetTopology:input_type -> gosdn.topology.GetTopologyRequest + 3, // 7: gosdn.topology.TopologyService.AddLink:output_type -> gosdn.topology.AddLinkResponse + 5, // 8: gosdn.topology.TopologyService.GetTopology:output_type -> gosdn.topology.GetTopologyResponse + 7, // [7:9] is the sub-list for method output_type + 5, // [5:7] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_gosdn_topology_topology_proto_init() } +func file_gosdn_topology_topology_proto_init() { + if File_gosdn_topology_topology_proto != nil { + return + } + file_gosdn_topology_link_proto_init() + if !protoimpl.UnsafeEnabled { + file_gosdn_topology_topology_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Topology); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_topology_topology_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddLinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_topology_topology_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddLinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_topology_topology_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTopologyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gosdn_topology_topology_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTopologyResponse); 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_topology_topology_proto_rawDesc, + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_gosdn_topology_topology_proto_goTypes, + DependencyIndexes: file_gosdn_topology_topology_proto_depIdxs, + EnumInfos: file_gosdn_topology_topology_proto_enumTypes, + MessageInfos: file_gosdn_topology_topology_proto_msgTypes, + }.Build() + File_gosdn_topology_topology_proto = out.File + file_gosdn_topology_topology_proto_rawDesc = nil + file_gosdn_topology_topology_proto_goTypes = nil + file_gosdn_topology_topology_proto_depIdxs = nil +} diff --git a/api/go/gosdn/topology/topology.pb.gw.go b/api/go/gosdn/topology/topology.pb.gw.go new file mode 100644 index 0000000000000000000000000000000000000000..0bd7ba238d02ab3d564dd579a3fc89a28623642d --- /dev/null +++ b/api/go/gosdn/topology/topology.pb.gw.go @@ -0,0 +1,250 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: gosdn/topology/topology.proto + +/* +Package topology is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package topology + +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 + +func request_TopologyService_AddLink_0(ctx context.Context, marshaler runtime.Marshaler, client TopologyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddLinkRequest + 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.AddLink(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TopologyService_AddLink_0(ctx context.Context, marshaler runtime.Marshaler, server TopologyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddLinkRequest + 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.AddLink(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_TopologyService_GetTopology_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TopologyService_GetTopology_0(ctx context.Context, marshaler runtime.Marshaler, client TopologyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTopologyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TopologyService_GetTopology_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTopology(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TopologyService_GetTopology_0(ctx context.Context, marshaler runtime.Marshaler, server TopologyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTopologyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TopologyService_GetTopology_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTopology(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterTopologyServiceHandlerServer registers the http handlers for service TopologyService to "mux". +// UnaryRPC :call TopologyServiceServer 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 RegisterTopologyServiceHandlerFromEndpoint instead. +func RegisterTopologyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TopologyServiceServer) error { + + mux.Handle("POST", pattern_TopologyService_AddLink_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.topology.TopologyService/AddLink", runtime.WithHTTPPathPattern("/topology/create")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TopologyService_AddLink_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_TopologyService_AddLink_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TopologyService_GetTopology_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.topology.TopologyService/GetTopology", runtime.WithHTTPPathPattern("/topology")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TopologyService_GetTopology_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_TopologyService_GetTopology_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterTopologyServiceHandlerFromEndpoint is same as RegisterTopologyServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterTopologyServiceHandlerFromEndpoint(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 RegisterTopologyServiceHandler(ctx, mux, conn) +} + +// RegisterTopologyServiceHandler registers the http handlers for service TopologyService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterTopologyServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterTopologyServiceHandlerClient(ctx, mux, NewTopologyServiceClient(conn)) +} + +// RegisterTopologyServiceHandlerClient registers the http handlers for service TopologyService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TopologyServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TopologyServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "TopologyServiceClient" to call the correct interceptors. +func RegisterTopologyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TopologyServiceClient) error { + + mux.Handle("POST", pattern_TopologyService_AddLink_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.topology.TopologyService/AddLink", runtime.WithHTTPPathPattern("/topology/create")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TopologyService_AddLink_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TopologyService_AddLink_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_TopologyService_GetTopology_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.topology.TopologyService/GetTopology", runtime.WithHTTPPathPattern("/topology")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TopologyService_GetTopology_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_TopologyService_GetTopology_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_TopologyService_AddLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"topology", "create"}, "")) + + pattern_TopologyService_GetTopology_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"topology"}, "")) +) + +var ( + forward_TopologyService_AddLink_0 = runtime.ForwardResponseMessage + + forward_TopologyService_GetTopology_0 = runtime.ForwardResponseMessage +) diff --git a/api/go/gosdn/topology/topology_grpc.pb.go b/api/go/gosdn/topology/topology_grpc.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..646a8ebf30a472792a1af1e4267fbf8b65fdd054 --- /dev/null +++ b/api/go/gosdn/topology/topology_grpc.pb.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package topology + +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 + +// TopologyServiceClient is the client API for TopologyService 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 TopologyServiceClient interface { + // Creates roles, requires login beforehand. + // Requires highest permissions. + AddLink(ctx context.Context, in *AddLinkRequest, opts ...grpc.CallOption) (*AddLinkResponse, error) + // Requests all roles with their permissions, requires login beforehand. + // Requires highest permissions. + GetTopology(ctx context.Context, in *GetTopologyRequest, opts ...grpc.CallOption) (*GetTopologyResponse, error) +} + +type topologyServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTopologyServiceClient(cc grpc.ClientConnInterface) TopologyServiceClient { + return &topologyServiceClient{cc} +} + +func (c *topologyServiceClient) AddLink(ctx context.Context, in *AddLinkRequest, opts ...grpc.CallOption) (*AddLinkResponse, error) { + out := new(AddLinkResponse) + err := c.cc.Invoke(ctx, "/gosdn.topology.TopologyService/AddLink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *topologyServiceClient) GetTopology(ctx context.Context, in *GetTopologyRequest, opts ...grpc.CallOption) (*GetTopologyResponse, error) { + out := new(GetTopologyResponse) + err := c.cc.Invoke(ctx, "/gosdn.topology.TopologyService/GetTopology", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TopologyServiceServer is the server API for TopologyService service. +// All implementations must embed UnimplementedTopologyServiceServer +// for forward compatibility +type TopologyServiceServer interface { + // Creates roles, requires login beforehand. + // Requires highest permissions. + AddLink(context.Context, *AddLinkRequest) (*AddLinkResponse, error) + // Requests all roles with their permissions, requires login beforehand. + // Requires highest permissions. + GetTopology(context.Context, *GetTopologyRequest) (*GetTopologyResponse, error) + mustEmbedUnimplementedTopologyServiceServer() +} + +// UnimplementedTopologyServiceServer must be embedded to have forward compatible implementations. +type UnimplementedTopologyServiceServer struct { +} + +func (UnimplementedTopologyServiceServer) AddLink(context.Context, *AddLinkRequest) (*AddLinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddLink not implemented") +} +func (UnimplementedTopologyServiceServer) GetTopology(context.Context, *GetTopologyRequest) (*GetTopologyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTopology not implemented") +} +func (UnimplementedTopologyServiceServer) mustEmbedUnimplementedTopologyServiceServer() {} + +// UnsafeTopologyServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TopologyServiceServer will +// result in compilation errors. +type UnsafeTopologyServiceServer interface { + mustEmbedUnimplementedTopologyServiceServer() +} + +func RegisterTopologyServiceServer(s grpc.ServiceRegistrar, srv TopologyServiceServer) { + s.RegisterService(&TopologyService_ServiceDesc, srv) +} + +func _TopologyService_AddLink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddLinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TopologyServiceServer).AddLink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.topology.TopologyService/AddLink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TopologyServiceServer).AddLink(ctx, req.(*AddLinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TopologyService_GetTopology_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTopologyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TopologyServiceServer).GetTopology(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gosdn.topology.TopologyService/GetTopology", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TopologyServiceServer).GetTopology(ctx, req.(*GetTopologyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TopologyService_ServiceDesc is the grpc.ServiceDesc for TopologyService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TopologyService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "gosdn.topology.TopologyService", + HandlerType: (*TopologyServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AddLink", + Handler: _TopologyService_AddLink_Handler, + }, + { + MethodName: "GetTopology", + Handler: _TopologyService_GetTopology_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gosdn/topology/topology.proto", +} diff --git a/api/openapiv2/gosdn_northbound.swagger.json b/api/openapiv2/gosdn_northbound.swagger.json index 9db819cb09f428c5d726f85f3e0e199d7a0ec429..4cd6a8a702f29bb36f5dbbcddcf980b41106a996 100644 --- a/api/openapiv2/gosdn_northbound.swagger.json +++ b/api/openapiv2/gosdn_northbound.swagger.json @@ -17,6 +17,9 @@ { "name": "PndService" }, + { + "name": "Collector" + }, { "name": "gNMI" }, @@ -30,19 +33,19 @@ "name": "CoreService" }, { - "name": "Collector" + "name": "CsbiService" }, { "name": "AuthService" }, { - "name": "UserService" + "name": "RoleService" }, { - "name": "CsbiService" + "name": "UserService" }, { - "name": "RoleService" + "name": "TopologyService" } ], "consumes": [ @@ -1031,6 +1034,71 @@ ] } }, + "/topology": { + "get": { + "summary": "Requests all roles with their permissions, requires login beforehand.\nRequires highest permissions.", + "operationId": "TopologyService_GetTopology", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/topologyGetTopologyResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "timestamp", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + } + ], + "tags": [ + "TopologyService" + ] + } + }, + "/topology/create": { + "post": { + "summary": "Creates roles, requires login beforehand.\nRequires highest permissions.", + "operationId": "TopologyService_AddLink", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/topologyAddLinkResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/topologyAddLinkRequest" + } + } + ], + "tags": [ + "TopologyService" + ] + } + }, "/users": { "get": { "summary": "Requests information about available users, requires login beforehand.\nRequires highest possible permissions.", @@ -2532,6 +2600,15 @@ "default": "TYPE_UNSPECIFIED", "title": "Changed according to style guide:\nhttps://docs.buf.build/best-practices/style-guide#enums" }, + "gosdntopologyStatus": { + "type": "string", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_OK", + "STATUS_ERROR" + ], + "default": "STATUS_UNSPECIFIED" + }, "pndApiOperation": { "type": "string", "enum": [ @@ -2889,7 +2966,7 @@ } }, "additionalProperties": {}, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "rbacCreateRolesRequest": { "type": "object", @@ -3182,6 +3259,99 @@ } } }, + "topologyAddLinkRequest": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "int64" + }, + "link": { + "$ref": "#/definitions/topologyLink" + } + }, + "title": "AddLink" + }, + "topologyAddLinkResponse": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "int64" + }, + "status": { + "$ref": "#/definitions/gosdntopologyStatus" + } + } + }, + "topologyGetTopologyResponse": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "int64" + }, + "status": { + "$ref": "#/definitions/gosdntopologyStatus" + }, + "toplogy": { + "$ref": "#/definitions/topologyTopology" + } + } + }, + "topologyLink": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "sourceNode": { + "$ref": "#/definitions/topologyNode" + }, + "targetNode": { + "$ref": "#/definitions/topologyNode" + }, + "sourcePort": { + "$ref": "#/definitions/topologyPort" + }, + "targetPort": { + "$ref": "#/definitions/topologyPort" + } + } + }, + "topologyNode": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "topologyPort": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "topologyTopology": { + "type": "object", + "properties": { + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/topologyLink" + } + } + } + }, "transportGnmiTransportOption": { "type": "object", "properties": { diff --git a/api/proto/buf.lock b/api/proto/buf.lock index 7cb8f4758341bcff9abc299cf94495c376ebc368..609ccb0d975e8a80f3bd3e50c1df57a05dfc26b0 100644 --- a/api/proto/buf.lock +++ b/api/proto/buf.lock @@ -4,14 +4,8 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - branch: main - commit: ebc3077fbae84b63a71f742dd72f7101 - digest: b1-gGcU24imC8L2I93v0LRssRMDGX0Fw9yrqgptNqVsTAU= - create_time: 2022-05-12T15:09:22.684487Z + commit: 7529bb85c9cd4c489dba05e04769c547 - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway - branch: main - commit: febd9e8be39b4f4b878b9c64bcc203fd - digest: b1-K5jSHBrJ24jZXRgQgkmphZuP-cAL2b90ssKrgvDK2hU= - create_time: 2022-04-17T01:28:07.574665Z + commit: 00116f302b12478b85deb33b734e026c diff --git a/api/proto/gosdn/topology/link.proto b/api/proto/gosdn/topology/link.proto new file mode 100644 index 0000000000000000000000000000000000000000..70aee027733179856e95c9fc92c51670126d51fe --- /dev/null +++ b/api/proto/gosdn/topology/link.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package gosdn.topology; + +import "google/api/annotations.proto"; +import "google/protobuf/descriptor.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + +import "gosdn/topology/node.proto"; +import "gosdn/topology/port.proto"; + +option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology"; + +message Link { + string id = 1; + string name = 2; + Node sourceNode = 3; + Node targetNode = 4; + Port sourcePort = 5; + Port targetPort = 6; +} diff --git a/api/proto/gosdn/topology/node.proto b/api/proto/gosdn/topology/node.proto new file mode 100644 index 0000000000000000000000000000000000000000..ca06fab019f59cd8584b2dbe4f6b4d40b34dd267 --- /dev/null +++ b/api/proto/gosdn/topology/node.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package gosdn.topology; + +import "google/api/annotations.proto"; +import "google/protobuf/descriptor.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + + +option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology"; + +message Node { + string id = 1; + string name = 2; +} diff --git a/api/proto/gosdn/topology/port.proto b/api/proto/gosdn/topology/port.proto new file mode 100644 index 0000000000000000000000000000000000000000..5124283b92784a55ddcf709f0548827edff4b4b1 --- /dev/null +++ b/api/proto/gosdn/topology/port.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package gosdn.topology; + +import "google/api/annotations.proto"; +import "google/protobuf/descriptor.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + + +option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology"; + +message Port { + string id = 1; +} diff --git a/api/proto/gosdn/topology/topology.proto b/api/proto/gosdn/topology/topology.proto new file mode 100644 index 0000000000000000000000000000000000000000..d4a71d696d68bca0f5190152043e0afae64bea93 --- /dev/null +++ b/api/proto/gosdn/topology/topology.proto @@ -0,0 +1,134 @@ +syntax = "proto3"; + +package gosdn.topology; + +import "google/api/annotations.proto"; +import "google/protobuf/descriptor.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + +import "gosdn/topology/link.proto"; + + +option go_package = "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology"; + +service TopologyService { + // Creates roles, requires login beforehand. + // Requires highest permissions. + rpc AddLink(AddLinkRequest) returns (AddLinkResponse) { + option (google.api.http) = { + post: "/topology/create" + body: "*" + }; + } + + // Requests one role with its permissions, requires login beforehand. + // Requires highest permissions. + // rpc GetRole(GetRoleRequest) returns (GetRoleResponse) { + // option (google.api.http) = { + // get: "/roles/get" + // }; + // } + + // Requests all roles with their permissions, requires login beforehand. + // Requires highest permissions. + rpc GetTopology(GetTopologyRequest) returns (GetTopologyResponse) { + option (google.api.http) = { + get: "/topology" + }; + } + + // // Updates roles by setting the provided permissions, requires login beforehand. + // // Requires highest permissions. + // rpc UpdateLink(UpdateRolesRequest) returns (UpdateRolesResponse) { + // option (google.api.http) = { + // post: "/topology/update" + // body: "*" + // }; + // } + + // // Deletes roles with their permissions, requires login beforehand. + // // Requires highest permissions. + // rpc DeleteLink(DeleteRolesRequest) returns (DeleteRolesResponse) { + // option (google.api.http) = { + // delete: "/topology/delete" + // }; + // } +} + +enum Status { + STATUS_UNSPECIFIED = 0; + STATUS_OK = 1; + STATUS_ERROR = 2; +} + +message Topology { + repeated Link links = 1; +} + +// AddLink +message AddLinkRequest { + int64 timestamp = 1; + Link link = 2; +} + +message AddLinkResponse { + int64 timestamp = 1; + Status status = 2; +} + +// // GetRole +// message GetRoleRequest { +// int64 timestamp = 1; +// string role_name = 2; +// } + +// message GetRoleResponse { +// int64 timestamp = 1; +// Status status = 2; +// Role role = 3; +// } + +// GetTopology +message GetTopologyRequest { + int64 timestamp = 1; +} + +message GetTopologyResponse { + int64 timestamp = 1; + Status status = 2; + Topology toplogy = 3; +} + +// // UpdateRoles +// message UpdateRolesRequest { +// int64 timestamp = 1; +// repeated Role roles = 2; +// } + +// message UpdateRolesResponse { +// int64 timestamp = 1; +// Status status = 2; +// } + +// // DeletePermissionsForRole +// message DeletePermissionsForRoleRequest { +// int64 timestamp = 1; +// string role_name = 2; +// repeated string permissions_to_delete = 3; +// } + +// message DeletePermissionsForRoleResponse { +// int64 timestamp = 1; +// Status status = 2; +// } + +// // DeleteRoles +// message DeleteRolesRequest { +// int64 timestamp = 1; +// repeated string role_name = 2; +// } + +// message DeleteRolesResponse { +// int64 timestamp = 1; +// Status status = 2; +// } diff --git a/controller/api/initialise_test.go b/controller/api/initialise_test.go index 21fc210175207bc3ccd3a766c040aada357f9184..0c5bf313e5258a0a47e270c073c4265b023a7541 100644 --- a/controller/api/initialise_test.go +++ b/controller/api/initialise_test.go @@ -22,6 +22,10 @@ import ( "code.fbi.h-da.de/danet/gosdn/controller/nucleus" "code.fbi.h-da.de/danet/gosdn/controller/nucleus/util/proto" rbacImpl "code.fbi.h-da.de/danet/gosdn/controller/rbac" + "code.fbi.h-da.de/danet/gosdn/controller/topology" + "code.fbi.h-da.de/danet/gosdn/controller/topology/links" + "code.fbi.h-da.de/danet/gosdn/controller/topology/nodes" + "code.fbi.h-da.de/danet/gosdn/controller/topology/ports" "code.fbi.h-da.de/danet/gosdn/models/generated/openconfig" "github.com/google/uuid" log "github.com/sirupsen/logrus" @@ -142,7 +146,16 @@ func bootstrapUnitTest() { jwtManager := rbacImpl.NewJWTManager("", (10000 * time.Hour)) - northbound := nbi.NewNBI(pndStore, userService, roleService, *jwtManager) + topoloyStore := topology.NewGenericStore[links.Link]() + topologyService := topology.NewTopologyService(&topoloyStore) + + nodeStore := topology.NewGenericStore[nodes.Node]() + nodeService := nodes.NewNodeService(&nodeStore) + + portStore := topology.NewGenericStore[ports.Port]() + portService := ports.NewPortService(&portStore) + + northbound := nbi.NewNBI(pndStore, userService, roleService, *jwtManager, topologyService, nodeService, portService) cpb.RegisterCoreServiceServer(s, northbound.Core) ppb.RegisterPndServiceServer(s, northbound.Pnd) diff --git a/controller/controller.go b/controller/controller.go index cb853c45d6b94fc97552340672830dfad5706de3..869ced18067536346736dadb5d8476a753124fb8 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -24,6 +24,7 @@ import ( ppb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" apb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/rbac" spb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/southbound" + tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology" "code.fbi.h-da.de/danet/gosdn/controller/config" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" @@ -32,6 +33,9 @@ import ( nbi "code.fbi.h-da.de/danet/gosdn/controller/northbound/server" rbacImpl "code.fbi.h-da.de/danet/gosdn/controller/rbac" "code.fbi.h-da.de/danet/gosdn/controller/store" + "code.fbi.h-da.de/danet/gosdn/controller/topology" + "code.fbi.h-da.de/danet/gosdn/controller/topology/nodes" + "code.fbi.h-da.de/danet/gosdn/controller/topology/ports" "code.fbi.h-da.de/danet/gosdn/controller/nucleus" ) @@ -41,13 +45,16 @@ var coreOnce sync.Once // Core is the representation of the controller's core type Core struct { - pndStore networkdomain.PndStore - userService rbac.UserService - roleService rbac.RoleService - httpServer *http.Server - grpcServer *grpc.Server - nbi *nbi.NorthboundInterface - stopChan chan os.Signal + pndStore networkdomain.PndStore + userService rbac.UserService + roleService rbac.RoleService + topologyService topology.TService + nodeService nodes.Service + portService ports.Service + httpServer *http.Server + grpcServer *grpc.Server + nbi *nbi.NorthboundInterface + stopChan chan os.Signal csbiClient cpb.CsbiServiceClient } @@ -62,10 +69,13 @@ func initialize() error { } c = &Core{ - pndStore: nucleus.NewPndStore(), - userService: rbacImpl.NewUserService(rbacImpl.NewUserStore()), - roleService: rbacImpl.NewRoleService(rbacImpl.NewRoleStore()), - stopChan: make(chan os.Signal, 1), + pndStore: nucleus.NewPndStore(), + userService: rbacImpl.NewUserService(rbacImpl.NewUserStore()), + roleService: rbacImpl.NewRoleService(rbacImpl.NewRoleStore()), + topologyService: topology.NewTopologyService(topology.NewDatabaseTopologyStore()), + nodeService: nodes.NewNodeService(nodes.NewDatabaseNodeStore()), + portService: ports.NewPortService(ports.NewDatabasePortStore()), + stopChan: make(chan os.Signal, 1), } // Setting up signal capturing @@ -108,7 +118,15 @@ func startGrpc() error { jwtManager := rbacImpl.NewJWTManager(config.JWTSecret, config.JWTDuration) setupGRPCServerWithCorrectSecurityLevel(jwtManager, c.userService, c.roleService) - c.nbi = nbi.NewNBI(c.pndStore, c.userService, c.roleService, *jwtManager) + c.nbi = nbi.NewNBI( + c.pndStore, + c.userService, + c.roleService, + *jwtManager, + c.topologyService, + c.nodeService, + c.portService, + ) pb.RegisterCoreServiceServer(c.grpcServer, c.nbi.Core) ppb.RegisterPndServiceServer(c.grpcServer, c.nbi.Pnd) @@ -117,6 +135,8 @@ func startGrpc() error { apb.RegisterAuthServiceServer(c.grpcServer, c.nbi.Auth) apb.RegisterUserServiceServer(c.grpcServer, c.nbi.User) apb.RegisterRoleServiceServer(c.grpcServer, c.nbi.Role) + tpb.RegisterTopologyServiceServer(c.grpcServer, c.nbi.Topology) + go func() { if err := c.grpcServer.Serve(lislisten); err != nil { log.Fatal(err) diff --git a/controller/http.go b/controller/http.go index 58d6d47d6486cecbe55e1858951fdfc7e622a164..f0a04a9b69452a61a18f45037657d68c382cd849 100644 --- a/controller/http.go +++ b/controller/http.go @@ -18,6 +18,7 @@ import ( cgw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/core" pgw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd" agw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/rbac" + tgw "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology" ) var ( @@ -75,6 +76,11 @@ func run() error { return err } + err = tgw.RegisterTopologyServiceHandlerFromEndpoint(ctx, mux, *grpcServerEndpoint, opts) + if err != nil { + return err + } + // Set the HTTP server of core to the new server c.httpServer = &http.Server{Addr: ":8080", Handler: mux} // Start HTTP server (and proxy calls to gRPC server endpoint) diff --git a/controller/northbound/server/nbi.go b/controller/northbound/server/nbi.go index cd4e983516f8ef4d498ebdf7fb956333e796a0be..2837d930510738c78828adfb9671801b0d67ffed 100644 --- a/controller/northbound/server/nbi.go +++ b/controller/northbound/server/nbi.go @@ -4,6 +4,9 @@ import ( "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" rbacInterfaces "code.fbi.h-da.de/danet/gosdn/controller/interfaces/rbac" "code.fbi.h-da.de/danet/gosdn/controller/rbac" + "code.fbi.h-da.de/danet/gosdn/controller/topology" + "code.fbi.h-da.de/danet/gosdn/controller/topology/nodes" + "code.fbi.h-da.de/danet/gosdn/controller/topology/ports" "code.fbi.h-da.de/danet/gosdn/controller/metrics" "github.com/prometheus/client_golang/prometheus" @@ -15,25 +18,36 @@ import ( // NorthboundInterface is the representation of the // gRPC services used provided. type NorthboundInterface struct { - Pnd *PndServer - Core *Core - Csbi *Csbi - Sbi *SbiServer - Auth *Auth - User *User - Role *Role + Pnd *PndServer + Core *Core + Csbi *Csbi + Sbi *SbiServer + Auth *Auth + User *User + Role *Role + Topology *Topology } // NewNBI receives a PndStore and returns a new gRPC *NorthboundInterface -func NewNBI(pnds networkdomain.PndStore, users rbacInterfaces.UserService, roles rbacInterfaces.RoleService, jwt rbac.JWTManager) *NorthboundInterface { +func NewNBI( + pnds networkdomain.PndStore, + users rbacInterfaces.UserService, + roles rbacInterfaces.RoleService, + jwt rbac.JWTManager, + topologyService topology.TService, + nodeService nodes.Service, + portService ports.Service, + +) *NorthboundInterface { return &NorthboundInterface{ - Pnd: NewPndServer(pnds), - Core: NewCoreServer(pnds), - Csbi: NewCsbiServer(pnds), - Sbi: NewSbiServer(pnds), - Auth: NewAuthServer(&jwt, users), - User: NewUserServer(&jwt, users), - Role: NewRoleServer(&jwt, roles), + Pnd: NewPndServer(pnds), + Core: NewCoreServer(pnds), + Csbi: NewCsbiServer(pnds), + Sbi: NewSbiServer(pnds), + Auth: NewAuthServer(&jwt, users), + User: NewUserServer(&jwt, users), + Role: NewRoleServer(&jwt, roles), + Topology: NewTopologyServer(topologyService, nodeService, portService), } } diff --git a/controller/northbound/server/topology.go b/controller/northbound/server/topology.go new file mode 100644 index 0000000000000000000000000000000000000000..21e9f5df72da9ad5261cc38e09d94a4651e5ee90 --- /dev/null +++ b/controller/northbound/server/topology.go @@ -0,0 +1,135 @@ +package server + +import ( + "context" + "time" + + apb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/topology" + "code.fbi.h-da.de/danet/gosdn/controller/topology" + "code.fbi.h-da.de/danet/gosdn/controller/topology/links" + "code.fbi.h-da.de/danet/gosdn/controller/topology/nodes" + "code.fbi.h-da.de/danet/gosdn/controller/topology/ports" + "github.com/google/uuid" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// Topology holds a topologyService and represents a TopologyServiceServer. +type Topology struct { + apb.UnimplementedTopologyServiceServer + topologyService topology.TService + nodeService nodes.Service + portService ports.Service +} + +// NewTopologyServer receives a topologyService and returns a new TopologyServer. +func NewTopologyServer( + service topology.TService, + nodeService nodes.Service, + portService ports.Service, +) *Topology { + return &Topology{ + topologyService: service, + nodeService: nodeService, + portService: portService, + } +} + +// AddLink adds a new link to the topology +func (t Topology) AddLink(ctx context.Context, request *apb.AddLinkRequest) (*apb.AddLinkResponse, error) { + sourceNode, sourcePort, err := t.ensureNodeAndPortExists(request.Link.SourceNode, request.Link.SourcePort) + if err != nil { + return nil, status.Errorf(codes.Aborted, "%v", err) + } + + targetNode, targetPort, err := t.ensureNodeAndPortExists(request.Link.TargetNode, request.Link.TargetPort) + if err != nil { + return nil, status.Errorf(codes.Aborted, "%v", err) + } + + link := links.Link{ + ID: uuid.New(), + Name: request.Link.Name, + SourceNode: sourceNode, + SourcePort: sourcePort, + TargetNode: targetNode, + TargetPort: targetPort, + } + err = t.topologyService.AddLink(link) + if err != nil { + return nil, status.Errorf(codes.Aborted, "%v", err) + } + + return &apb.AddLinkResponse{ + Timestamp: time.Now().UnixNano(), + Status: apb.Status_STATUS_OK, + }, nil +} + +// GetTopology returns the current topology in the form of all links +func (t Topology) GetTopology(ctx context.Context, request *apb.GetTopologyRequest) (*apb.GetTopologyResponse, error) { + topo, err := t.topologyService.GetAll() + if err != nil { + return nil, status.Errorf(codes.Aborted, "%v", err) + } + + topology := &apb.Topology{} + + for _, link := range topo { + topology.Links = append(topology.Links, &apb.Link{ + Id: link.ID.String(), + Name: link.Name, + SourceNode: &apb.Node{ + Id: link.SourceNode.ID.String(), + Name: link.SourceNode.Name, + }, + SourcePort: &apb.Port{ + Id: link.SourcePort.ID.String(), + }, + TargetNode: &apb.Node{ + Id: link.TargetNode.ID.String(), + Name: link.TargetNode.Name, + }, + TargetPort: &apb.Port{ + Id: link.TargetPort.ID.String(), + }, + }) + } + + return &apb.GetTopologyResponse{ + Timestamp: time.Now().UnixNano(), + Status: apb.Status_STATUS_OK, + Toplogy: topology, + }, nil +} + +func (t Topology) ensureNodeAndPortExists(incomingNode *apb.Node, incomingPort *apb.Port) (nodes.Node, ports.Port, error) { + node, err := t.nodeService.EnsureExists( + nodes.Node{ + ID: getExistingOrCreateNewUUIDFromString(incomingNode.Id), + }, + ) + if err != nil { + return node, ports.Port{}, status.Errorf(codes.Aborted, "%v", err) + } + + port, err := t.portService.EnsureExists( + ports.Port{ + ID: getExistingOrCreateNewUUIDFromString(incomingPort.Id), + }, + ) + if err != nil { + return nodes.Node{}, port, status.Errorf(codes.Aborted, "%v", err) + } + + return node, port, nil +} + +func getExistingOrCreateNewUUIDFromString(id string) uuid.UUID { + parsedID, err := uuid.Parse(id) + if err != nil { + return uuid.Nil + } + + return parsedID +} diff --git a/controller/nucleus/database/mongo-connection.go b/controller/nucleus/database/mongo-connection.go index 1db8205ae25d0b4d72737dd0f8c12d2bb3718e4c..7ed9c40d24416d3c39365b2a9ced1f700f77bd4a 100644 --- a/controller/nucleus/database/mongo-connection.go +++ b/controller/nucleus/database/mongo-connection.go @@ -5,7 +5,6 @@ import ( "log" "time" - "code.fbi.h-da.de/danet/gosdn/controller/config" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" ) @@ -14,13 +13,14 @@ const ( // Timeout operations after N seconds connectTimeout = 5 // DatabaseName is the name of the mongoDB database used. - DatabaseName = "gosdn" - //mongoConnection = "mongodb://root:example@localhost" + DatabaseName = "gosdn" + mongoConnection = "mongodb://root:example@localhost:27017" ) // GetMongoConnection Retrieves a client to the MongoDB func GetMongoConnection() (*mongo.Client, context.Context, context.CancelFunc) { - mongoConnection := config.DatabaseConnection + // TODO: Fix getting connection from config package + // mongoConnection := config.DatabaseConnection client, err := mongo.NewClient(options.Client().ApplyURI(mongoConnection)) if err != nil { log.Printf("Failed to create client: %v", err) diff --git a/controller/topology/genericStore.go b/controller/topology/genericStore.go new file mode 100644 index 0000000000000000000000000000000000000000..c4f0d6683b7d978496f998b26adf882c65e5e883 --- /dev/null +++ b/controller/topology/genericStore.go @@ -0,0 +1,72 @@ +package topology + +import ( + "errors" + + "code.fbi.h-da.de/danet/gosdn/controller/store" + "github.com/google/uuid" +) + +type storableConstraint interface { + GetID() uuid.UUID +} + +// GenericStore provides a in-memory implementation for multiple stores. +type GenericStore[T storableConstraint] struct { + Store map[uuid.UUID]T +} + +// NewGenericStore returns a specific in-memory store for a type T. +func NewGenericStore[T storableConstraint]() GenericStore[T] { + return GenericStore[T]{ + Store: make(map[uuid.UUID]T), + } +} + +func (t *GenericStore[T]) Add(item T) error { + _, ok := t.Store[item.GetID()] + if ok { + return errors.New("item not found") + } + + t.Store[item.GetID()] = item + + return nil +} + +func (t *GenericStore[T]) Update(item T) error { + _, ok := t.Store[item.GetID()] + if ok { + return nil + } + + t.Store[item.GetID()] = item + + return nil +} + +func (t *GenericStore[T]) Delete(item T) error { + delete(t.Store, item.GetID()) + + return nil +} + +func (t *GenericStore[T]) Get(query store.Query) (T, error) { + // First search for direct hit on UUID. + item, ok := t.Store[query.ID] + if !ok { + return *new(T), errors.New("item not found") + } + + return item, nil +} + +func (t *GenericStore[T]) GetAll() ([]T, error) { + var allItems []T + + for _, item := range t.Store { + allItems = append(allItems, item) + } + + return allItems, nil +} diff --git a/controller/topology/links/link.go b/controller/topology/links/link.go new file mode 100644 index 0000000000000000000000000000000000000000..b90faf44acb9f65ab9fe0acef0fee4a4d937da18 --- /dev/null +++ b/controller/topology/links/link.go @@ -0,0 +1,22 @@ +package links + +import ( + "code.fbi.h-da.de/danet/gosdn/controller/topology/nodes" + "code.fbi.h-da.de/danet/gosdn/controller/topology/ports" + "github.com/google/uuid" +) + +// Link is a representation of a physical or virtual link between two nodes and their ports +type Link struct { + ID uuid.UUID `bson:"_id"` + Name string `bson:"name,omitempty"` + SourceNode nodes.Node `bson:"source_node,omitempty"` + TargetNode nodes.Node `bson:"target_node,omitempty"` + SourcePort ports.Port `bson:"source_port,omitempty"` + TargetPort ports.Port `bson:"target_port,omitempty"` +} + +// GetID returns the id of a link +func (l Link) GetID() uuid.UUID { + return l.ID +} diff --git a/controller/topology/nodes/node.go b/controller/topology/nodes/node.go new file mode 100644 index 0000000000000000000000000000000000000000..8a34da38b6c3a0b31ff9515052d2a5e786c376b0 --- /dev/null +++ b/controller/topology/nodes/node.go @@ -0,0 +1,14 @@ +package nodes + +import "github.com/google/uuid" + +// Node is a representation of a network element +type Node struct { + ID uuid.UUID `bson:"_id"` + Name string `bson:"name"` +} + +// GetID returns the id of a node +func (n Node) GetID() uuid.UUID { + return n.ID +} diff --git a/controller/topology/nodes/nodeService.go b/controller/topology/nodes/nodeService.go new file mode 100644 index 0000000000000000000000000000000000000000..c540f85c6f7fea907f60ca960ddcd77b077147bf --- /dev/null +++ b/controller/topology/nodes/nodeService.go @@ -0,0 +1,86 @@ +package nodes + +import ( + "code.fbi.h-da.de/danet/gosdn/controller/store" + "github.com/google/uuid" +) + +// Service defines a interface for a NodeService +type Service interface { + EnsureExists(Node) (Node, error) + Update(Node) error + Delete(Node) error + Get(store.Query) (Node, error) + GetAll() ([]Node, error) +} + +// NodeService is a NodeService +type NodeService struct { + store Store +} + +// NewNodeService creates a NodeService +func NewNodeService(store Store) Service { + return &NodeService{ + store: store, + } +} + +// EnsureExists either creates a new node or returns an already existing node +func (p *NodeService) EnsureExists(node Node) (Node, error) { + if node.ID == uuid.Nil { + node.ID = uuid.New() + err := p.store.Add(node) + if err != nil { + return node, err + } + + return node, nil + } + + node, err := p.Get(store.Query{ID: node.ID}) + if err != nil { + return node, err + } + + return node, nil +} + +// Update updates an existing node +func (p *NodeService) Update(node Node) error { + err := p.store.Update(node) + if err != nil { + return err + } + + return nil +} + +// Delete deletes a node +func (p *NodeService) Delete(node Node) error { + err := p.store.Delete(node) + if err != nil { + return err + } + + return nil +} + +// Get gets a node +func (p *NodeService) Get(query store.Query) (Node, error) { + node, err := p.store.Get(query) + if err != nil { + return node, err + } + + return node, nil +} + +// GetAll gets all existing nodes +func (p *NodeService) GetAll() ([]Node, error) { + nodes, err := p.store.GetAll() + if err != nil { + return nodes, err + } + return nodes, nil +} diff --git a/controller/topology/nodes/nodeStore.go b/controller/topology/nodes/nodeStore.go new file mode 100644 index 0000000000000000000000000000000000000000..517c4f74db054d650718c8df0aacfc696c733b55 --- /dev/null +++ b/controller/topology/nodes/nodeStore.go @@ -0,0 +1,192 @@ +package nodes + +import ( + "fmt" + "log" + + "code.fbi.h-da.de/danet/gosdn/controller/nucleus/database" + "code.fbi.h-da.de/danet/gosdn/controller/nucleus/errors" + "code.fbi.h-da.de/danet/gosdn/controller/store" + "github.com/google/uuid" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo/options" +) + +// Store defines a NodeStore interface +type Store interface { + Add(Node) error + Update(Node) error + Delete(Node) error + Get(store.Query) (Node, error) + GetAll() ([]Node, error) +} + +// DatabaseNodeStore is a database store for nodes +type DatabaseNodeStore struct { + storeName string +} + +// NewDatabaseNodeStore returns a NodeStore +func NewDatabaseNodeStore() Store { + return &DatabaseNodeStore{ + storeName: fmt.Sprintf("node-store.json"), + } +} + +// Get takes a nodes's UUID or name and returns the nodes. +func (s *DatabaseNodeStore) Get(query store.Query) (Node, error) { + var loadedNode Node + + if query.ID.String() != "" { + loadedNode, err := s.getByID(query.ID) + if err != nil { + return loadedNode, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedNode, nil + } + + loadedNode, err := s.getByName(query.Name) + if err != nil { + return loadedNode, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedNode, nil +} + +func (s *DatabaseNodeStore) getByID(idOfLink uuid.UUID) (Node, error) { + var loadedNode Node + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + result := collection.FindOne(ctx, bson.D{primitive.E{Key: "_id", Value: idOfLink.String()}}) + if result == nil { + return loadedNode, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + err := result.Decode(&loadedNode) + if err != nil { + log.Printf("Failed marshalling %v", err) + return loadedNode, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedNode, nil +} + +func (s *DatabaseNodeStore) getByName(nameOfDevice string) (Node, error) { + var loadedNode Node + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + result := collection.FindOne(ctx, bson.D{primitive.E{Key: "name", Value: nameOfDevice}}) + if result == nil { + return loadedNode, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + err := result.Decode(&loadedNode) + if err != nil { + log.Printf("Failed marshalling %v", err) + return loadedNode, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedNode, nil +} + +// GetAll returns all stored nodes. +func (s *DatabaseNodeStore) GetAll() ([]Node, error) { + var loadedNode []Node + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + + cursor, err := collection.Find(ctx, bson.D{}) + if err != nil { + return []Node{}, err + } + defer cursor.Close(ctx) + + err = cursor.All(ctx, &loadedNode) + if err != nil { + log.Printf("Failed marshalling %v", err) + + return loadedNode, errors.ErrCouldNotMarshall{StoreName: s.storeName} + } + + return loadedNode, nil +} + +// Add adds a node to the node store. +func (s *DatabaseNodeStore) Add(node Node) error { + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + _, err := client.Database(database.DatabaseName). + Collection(s.storeName). + InsertOne(ctx, node) + if err != nil { + log.Printf("Could not add Node: %v", err) + return errors.ErrCouldNotCreate{StoreName: s.storeName} + } + + return nil +} + +// Update updates a existing node. +func (s *DatabaseNodeStore) Update(node Node) error { + var updatedLoadedNodes Node + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + update := bson.D{primitive.E{Key: "$set", Value: node}} + + upsert := false + after := options.After + opt := options.FindOneAndUpdateOptions{ + Upsert: &upsert, + ReturnDocument: &after, + } + + err := client.Database(database.DatabaseName). + Collection(s.storeName). + FindOneAndUpdate( + ctx, bson.M{"_id": node.ID.String()}, update, &opt). + Decode(&updatedLoadedNodes) + if err != nil { + log.Printf("Could not update Node: %v", err) + + return errors.ErrCouldNotUpdate{StoreName: s.storeName} + } + + return nil +} + +// Delete deletes a node from the node store. +func (s *DatabaseNodeStore) Delete(node Node) error { + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + _, err := collection.DeleteOne(ctx, bson.D{primitive.E{Key: node.ID.String()}}) + if err != nil { + return err + } + + return nil +} diff --git a/controller/topology/ports/port.go b/controller/topology/ports/port.go new file mode 100644 index 0000000000000000000000000000000000000000..9062f1e51f72b83b08985fdb78c3618c484995f6 --- /dev/null +++ b/controller/topology/ports/port.go @@ -0,0 +1,14 @@ +package ports + +import "github.com/google/uuid" + +// Port is a representation of physical port on a network element +type Port struct { + ID uuid.UUID `bson:"_id"` + Name string `bson:"name,omitempty"` +} + +// GetID returns the id of a port +func (p Port) GetID() uuid.UUID { + return p.ID +} diff --git a/controller/topology/ports/portService.go b/controller/topology/ports/portService.go new file mode 100644 index 0000000000000000000000000000000000000000..fadf319349df12714c5eefee9dff176dc596ade4 --- /dev/null +++ b/controller/topology/ports/portService.go @@ -0,0 +1,86 @@ +package ports + +import ( + "code.fbi.h-da.de/danet/gosdn/controller/store" + "github.com/google/uuid" +) + +// Service defines an interface for a PortService +type Service interface { + EnsureExists(Port) (Port, error) + Update(Port) error + Delete(Port) error + Get(store.Query) (Port, error) + GetAll() ([]Port, error) +} + +// PortService is a service for ports +type PortService struct { + store Store +} + +// NewPortService creates a new PortService +func NewPortService(store Store) Service { + return &PortService{ + store: store, + } +} + +// EnsureExists either creates a new port or returns an already existing port +func (p *PortService) EnsureExists(port Port) (Port, error) { + if port.ID == uuid.Nil { + port.ID = uuid.New() + err := p.store.Add(port) + if err != nil { + return port, err + } + + return port, nil + } + + port, err := p.Get(store.Query{ID: port.ID}) + if err != nil { + return port, err + } + + return port, nil +} + +// Update updates an existing port +func (p *PortService) Update(port Port) error { + err := p.store.Update(port) + if err != nil { + return err + } + + return nil +} + +// Delete deletes a port +func (p *PortService) Delete(port Port) error { + err := p.store.Delete(port) + if err != nil { + return err + } + + return nil +} + +// Get gets a port +func (p *PortService) Get(query store.Query) (Port, error) { + port, err := p.store.Get(query) + if err != nil { + return port, err + } + + return port, nil +} + +// GetAll gets all existing ports +func (p *PortService) GetAll() ([]Port, error) { + nodes, err := p.store.GetAll() + if err != nil { + return nodes, err + } + return nodes, nil +} diff --git a/controller/topology/ports/portStore.go b/controller/topology/ports/portStore.go new file mode 100644 index 0000000000000000000000000000000000000000..7b2b6bc43c901d68f1752a7e27ccd3be3f597740 --- /dev/null +++ b/controller/topology/ports/portStore.go @@ -0,0 +1,193 @@ +package ports + +import ( + "fmt" + "log" + + "code.fbi.h-da.de/danet/gosdn/controller/interfaces/device" + "code.fbi.h-da.de/danet/gosdn/controller/nucleus/database" + "code.fbi.h-da.de/danet/gosdn/controller/nucleus/errors" + "code.fbi.h-da.de/danet/gosdn/controller/store" + "github.com/google/uuid" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo/options" +) + +// Store defines a PortStore interface +type Store interface { + Add(Port) error + Update(Port) error + Delete(Port) error + Get(store.Query) (Port, error) + GetAll() ([]Port, error) +} + +// DatabasePortStore is a database store for ports +type DatabasePortStore struct { + storeName string +} + +// NewDatabasePortStore returns a PortStore +func NewDatabasePortStore() Store { + return &DatabasePortStore{ + storeName: fmt.Sprintf("port-store.json"), + } +} + +// Get takes a Ports's UUID or name and returns the port. +func (s *DatabasePortStore) Get(query store.Query) (Port, error) { + var loadedPort Port + + if query.ID.String() != "" { + loadedPort, err := s.getByID(query.ID) + if err != nil { + return loadedPort, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedPort, nil + } + + loadedPort, err := s.getByName(query.Name) + if err != nil { + return loadedPort, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedPort, nil +} + +func (s *DatabasePortStore) getByID(idOfLink uuid.UUID) (Port, error) { + var loadedPort Port + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + result := collection.FindOne(ctx, bson.D{primitive.E{Key: "_id", Value: idOfLink.String()}}) + if result == nil { + return loadedPort, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + err := result.Decode(&loadedPort) + if err != nil { + log.Printf("Failed marshalling %v", err) + return loadedPort, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedPort, nil +} + +func (s *DatabasePortStore) getByName(nameOfDevice string) (Port, error) { + var loadedDevice Port + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + result := collection.FindOne(ctx, bson.D{primitive.E{Key: "name", Value: nameOfDevice}}) + if result == nil { + return loadedDevice, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + err := result.Decode(&loadedDevice) + if err != nil { + log.Printf("Failed marshalling %v", err) + return loadedDevice, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedDevice, nil +} + +// GetAll returns all stored ports. +func (s *DatabasePortStore) GetAll() ([]Port, error) { + var loadedPort []Port + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + + cursor, err := collection.Find(ctx, bson.D{}) + if err != nil { + return []Port{}, err + } + defer cursor.Close(ctx) + + err = cursor.All(ctx, &loadedPort) + if err != nil { + log.Printf("Failed marshalling %v", err) + + return loadedPort, errors.ErrCouldNotMarshall{StoreName: s.storeName} + } + + return loadedPort, nil +} + +// Add adds a port to the port store. +func (s *DatabasePortStore) Add(port Port) error { + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + _, err := client.Database(database.DatabaseName). + Collection(s.storeName). + InsertOne(ctx, port) + if err != nil { + log.Printf("Could not add Port: %v", err) + return errors.ErrCouldNotCreate{StoreName: s.storeName} + } + + return nil +} + +// Update updates a existing port. +func (s *DatabasePortStore) Update(port Port) error { + var updatedLoadedDevice device.LoadedDevice + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + update := bson.D{primitive.E{Key: "$set", Value: port}} + + upsert := false + after := options.After + opt := options.FindOneAndUpdateOptions{ + Upsert: &upsert, + ReturnDocument: &after, + } + + err := client.Database(database.DatabaseName). + Collection(s.storeName). + FindOneAndUpdate( + ctx, bson.M{"_id": port.ID.String()}, update, &opt). + Decode(&updatedLoadedDevice) + if err != nil { + log.Printf("Could not update Port: %v", err) + + return errors.ErrCouldNotUpdate{StoreName: s.storeName} + } + + return nil +} + +// Delete deletes a port from the port store. +func (s *DatabasePortStore) Delete(port Port) error { + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + _, err := collection.DeleteOne(ctx, bson.D{primitive.E{Key: port.ID.String()}}) + if err != nil { + return err + } + + return nil +} diff --git a/controller/topology/topology.go b/controller/topology/topology.go new file mode 100644 index 0000000000000000000000000000000000000000..18f8a87cb9ac71f1df15f450796b8e42ba62059d --- /dev/null +++ b/controller/topology/topology.go @@ -0,0 +1 @@ +package topology diff --git a/controller/topology/topologyService.go b/controller/topology/topologyService.go new file mode 100644 index 0000000000000000000000000000000000000000..0061f874f5ee5fce5f250f075b32786e5df44fb2 --- /dev/null +++ b/controller/topology/topologyService.go @@ -0,0 +1,62 @@ +package topology + +import "code.fbi.h-da.de/danet/gosdn/controller/topology/links" + +// TService defines an interface for a TopologyService +type TService interface { + AddLink(links.Link) error + UpdateLink(links.Link) error + DeleteLink(links.Link) error + GetAll() ([]links.Link, error) +} + +// Service is a service for ports +type Service struct { + store Store +} + +// NewTopologyService creates a new TopologyService +func NewTopologyService(store Store) TService { + return &Service{ + store: store, + } +} + +// AddLink adds a new link to the topology +func (t *Service) AddLink(link links.Link) error { + err := t.store.Add(link) + if err != nil { + return err + } + + return nil +} + +// UpdateLink updates an existing link +func (t *Service) UpdateLink(link links.Link) error { + err := t.store.Update(link) + if err != nil { + return err + } + + return nil +} + +// DeleteLink deletes a link +func (t *Service) DeleteLink(link links.Link) error { + err := t.store.Delete(link) + if err != nil { + return err + } + + return nil +} + +// GetAll returns the current topology +func (t *Service) GetAll() ([]links.Link, error) { + topo, err := t.store.GetAll() + if err != nil { + return topo, err + } + return topo, nil +} diff --git a/controller/topology/topologyStore.go b/controller/topology/topologyStore.go new file mode 100644 index 0000000000000000000000000000000000000000..5c27c0c7e1fb5ab6ff5106caf1aa74e0b5c8a6ac --- /dev/null +++ b/controller/topology/topologyStore.go @@ -0,0 +1,193 @@ +package topology + +import ( + "fmt" + "log" + + "code.fbi.h-da.de/danet/gosdn/controller/nucleus/database" + "code.fbi.h-da.de/danet/gosdn/controller/nucleus/errors" + "code.fbi.h-da.de/danet/gosdn/controller/store" + "code.fbi.h-da.de/danet/gosdn/controller/topology/links" + "github.com/google/uuid" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/bson/primitive" + "go.mongodb.org/mongo-driver/mongo/options" +) + +// Store defines a Topology store interface +type Store interface { + Add(links.Link) error + Update(links.Link) error + Delete(links.Link) error + Get(store.Query) (links.Link, error) + GetAll() ([]links.Link, error) +} + +// DatabaseTopologyStore is a database store for the topology +type DatabaseTopologyStore struct { + storeName string +} + +// NewDatabaseTopologyStore returns a TopologyStore +func NewDatabaseTopologyStore() Store { + return &DatabaseTopologyStore{ + storeName: fmt.Sprintf("topology-store.json"), + } +} + +// Get takes a link's UUID or name and returns the link. +func (s *DatabaseTopologyStore) Get(query store.Query) (links.Link, error) { + var loadedTopology links.Link + + if query.ID.String() != "" { + loadedDevice, err := s.getByID(query.ID) + if err != nil { + return loadedDevice, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedDevice, nil + } + + loadedTopology, err := s.getByName(query.Name) + if err != nil { + return loadedTopology, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedTopology, nil +} + +func (s *DatabaseTopologyStore) getByID(idOfLink uuid.UUID) (links.Link, error) { + var loadedTopology links.Link + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + result := collection.FindOne(ctx, bson.D{primitive.E{Key: "_id", Value: idOfLink.String()}}) + if result == nil { + return loadedTopology, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + err := result.Decode(&loadedTopology) + if err != nil { + log.Printf("Failed marshalling %v", err) + return loadedTopology, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedTopology, nil +} + +func (s *DatabaseTopologyStore) getByName(nameOfDevice string) (links.Link, error) { + var loadedTopology links.Link + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + result := collection.FindOne(ctx, bson.D{primitive.E{Key: "name", Value: nameOfDevice}}) + if result == nil { + return loadedTopology, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + err := result.Decode(&loadedTopology) + if err != nil { + log.Printf("Failed marshalling %v", err) + return loadedTopology, errors.ErrCouldNotFind{StoreName: s.storeName} + } + + return loadedTopology, nil +} + +// GetAll returns all stored links. +func (s *DatabaseTopologyStore) GetAll() ([]links.Link, error) { + var loadedTopology []links.Link + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + + cursor, err := collection.Find(ctx, bson.D{}) + if err != nil { + return loadedTopology, err + } + defer cursor.Close(ctx) + + err = cursor.All(ctx, &loadedTopology) + if err != nil { + log.Printf("Failed marshalling %v", err) + + return loadedTopology, errors.ErrCouldNotMarshall{StoreName: s.storeName} + } + + return loadedTopology, nil +} + +// Add adds a link to the link store. +func (s *DatabaseTopologyStore) Add(link links.Link) error { + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + _, err := client.Database(database.DatabaseName). + Collection(s.storeName). + InsertOne(ctx, link) + if err != nil { + log.Printf("Could not add Link: %v", err) + return errors.ErrCouldNotCreate{StoreName: s.storeName} + } + + return nil +} + +// Update updates a existing link. +func (s *DatabaseTopologyStore) Update(linkToUpdate links.Link) error { + var updatedLink links.Link + + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + update := bson.D{primitive.E{Key: "$set", Value: linkToUpdate}} + + upsert := false + after := options.After + opt := options.FindOneAndUpdateOptions{ + Upsert: &upsert, + ReturnDocument: &after, + } + + err := client.Database(database.DatabaseName). + Collection(s.storeName). + FindOneAndUpdate( + ctx, bson.M{"_id": linkToUpdate.ID.String()}, update, &opt). + Decode(&updatedLink) + if err != nil { + log.Printf("Could not update link: %v", err) + + return errors.ErrCouldNotUpdate{StoreName: s.storeName} + } + + return nil +} + +// Delete deletes a link from the link store. +func (s *DatabaseTopologyStore) Delete(linkToDelete links.Link) error { + client, ctx, cancel := database.GetMongoConnection() + defer cancel() + defer client.Disconnect(ctx) + + db := client.Database(database.DatabaseName) + collection := db.Collection(s.storeName) + _, err := collection.DeleteOne(ctx, bson.D{primitive.E{Key: linkToDelete.ID.String()}}) + if err != nil { + return err + } + + return nil +} diff --git a/scripts/goSDN Northbound.postman_collection.json b/scripts/goSDN Northbound.postman_collection.json new file mode 100644 index 0000000000000000000000000000000000000000..f7e16f2e3f434d33663dec7d44bbdb33467bcd0a --- /dev/null +++ b/scripts/goSDN Northbound.postman_collection.json @@ -0,0 +1,3669 @@ +{ + "info": { + "_postman_id": "4f71d639-b072-4f6c-be19-79bf76365d6d", + "name": "goSDN Northbound", + "description": "Protocol Buffer specifications and Go code for the goSDN northbound Interface\n\nContact Support:\n Name: goSDN Northbound project", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "pnds", + "item": [ + { + "name": "{pid}", + "item": [ + { + "name": "changes", + "item": [ + { + "name": "Allows to request all Changes registered for a specific Principal Network Domain.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/changes?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "changes" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/changes?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "changes" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"occaecat officia ullamco amet\",\n \"pnd\": {\n \"id\": \"Lorem deserunt enim nulla\",\n \"name\": \"ut dolor proident\",\n \"description\": \"tempor amet\"\n },\n \"change\": [\n {\n \"id\": \"ea mollit\",\n \"age\": \"eu velit\",\n \"state\": \"CHANGE_STATE_UNSPECIFIED\"\n },\n {\n \"id\": \"ex laborum\",\n \"age\": \"Lorem\",\n \"state\": \"CHANGE_STATE_UNSPECIFIED\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/changes?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "changes" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows to operate on multiple Changes registered for a specific Principal Network Domain.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"deserunt culpa labore irure\",\n \"change\": [\n {\n \"cuid\": \"mollit aliquip\",\n \"op\": \"OPERATION_UNSPECIFIED\"\n },\n {\n \"cuid\": \"nulla dolore et elit reprehenderit\",\n \"op\": \"OPERATION_UNSPECIFIED\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/changes", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "changes" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"qui aliquip\",\n \"change\": [\n {\n \"cuid\": \"Excepteur ex eius\",\n \"op\": \"OPERATION_UNSPECIFIED\"\n },\n {\n \"cuid\": \"in id enim consequat\",\n \"op\": \"OPERATION_UNSPECIFIED\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/changes", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "changes" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"culpa ut elit Lorem veniam\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"responses\": [\n {\n \"timestamp\": \"eu consectetur\",\n \"status\": \"STATUS_UNSPECIFIED\"\n },\n {\n \"timestamp\": \"aute officia consequat\",\n \"status\": \"STATUS_UNSPECIFIED\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"qui aliquip\",\n \"change\": [\n {\n \"cuid\": \"Excepteur ex eius\",\n \"op\": \"OPERATION_UNSPECIFIED\"\n },\n {\n \"cuid\": \"in id enim consequat\",\n \"op\": \"OPERATION_UNSPECIFIED\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/changes", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "changes" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows to request a specific Change registered for a specific Principal Network Domain.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/changes/:cuid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "changes", + ":cuid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "cuid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/changes/:cuid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "changes", + ":cuid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "cuid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"occaecat officia ullamco amet\",\n \"pnd\": {\n \"id\": \"Lorem deserunt enim nulla\",\n \"name\": \"ut dolor proident\",\n \"description\": \"tempor amet\"\n },\n \"change\": [\n {\n \"id\": \"ea mollit\",\n \"age\": \"eu velit\",\n \"state\": \"CHANGE_STATE_UNSPECIFIED\"\n },\n {\n \"id\": \"ex laborum\",\n \"age\": \"Lorem\",\n \"state\": \"CHANGE_STATE_UNSPECIFIED\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/changes/:cuid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "changes", + ":cuid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "cuid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "onds", + "item": [ + { + "name": "{did}", + "item": [ + { + "name": "Allows to delete a specific Orchestrated Networking Device which is managed by a\nspecific Principal Network Domain.", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds/:did?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds", + ":did" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "did", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds/:did?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds", + ":did" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "did", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds/:did?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds", + ":did" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "did", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows to request a specific Path of a Orchestrated Networking Device,\nmanaged by a specific Principal Network Domain.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds/:did/paths/:path?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds", + ":did", + "paths", + ":path" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "did", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "path", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds/:did/paths/:path?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds", + ":did", + "paths", + ":path" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "did", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "path", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"dolor commodo nulla\",\n \"pnd\": {\n \"id\": \"aute ut aliqua\",\n \"name\": \"in incidid\",\n \"description\": \"in\"\n },\n \"device\": [\n {\n \"timestamp\": \"ut\",\n \"prefix\": {\n \"element\": [\n \"quis irure\",\n \"pariatur proident\"\n ],\n \"origin\": \"aliquip Duis\",\n \"elem\": [\n {\n \"name\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"key\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n {\n \"name\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"key\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n ],\n \"target\": \"ut officia\"\n },\n \"alias\": \"mollit aute deserunt exercitation\",\n \"update\": [\n {\n \"path\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"value\": {\n \"value\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"type\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"val\": {\n \"stringVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"intVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"uintVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"boolVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"bytesVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"floatVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"decimalVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"leaflistVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"anyVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"jsonVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"jsonIetfVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"asciiVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"protoBytes\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"duplicates\": -69897824\n },\n {\n \"path\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"value\": {\n \"value\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"type\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"val\": {\n \"stringVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"intVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"uintVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"boolVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"bytesVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"floatVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"decimalVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"leaflistVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"anyVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"jsonVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"jsonIetfVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"asciiVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"protoBytes\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"duplicates\": -55695713\n }\n ],\n \"delete\": [\n {\n \"element\": [\n \"adipisicing deserunt sunt\",\n \"sint amet\"\n ],\n \"origin\": \"eu Ut velit et\",\n \"elem\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"target\": \"dolor veniam id pariatur\"\n },\n {\n \"element\": [\n \"adipisicing culpa Except\",\n \"do culpa dolore eiusmod\"\n ],\n \"origin\": \"Lorem\",\n \"elem\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"target\": \"anim cillu\"\n }\n ],\n \"atomic\": false\n },\n {\n \"timestamp\": \"enim nulla id Ut\",\n \"prefix\": {\n \"element\": [\n \"magna aute\",\n \"ut qui\"\n ],\n \"origin\": \"et nostrud\",\n \"elem\": [\n {\n \"name\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"key\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n {\n \"name\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"key\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n }\n ],\n \"target\": \"dolore enim ipsum\"\n },\n \"alias\": \"aliquip\",\n \"update\": [\n {\n \"path\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"value\": {\n \"value\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"type\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"val\": {\n \"stringVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"intVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"uintVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"boolVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"bytesVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"floatVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"decimalVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"leaflistVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"anyVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"jsonVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"jsonIetfVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"asciiVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"protoBytes\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"duplicates\": -36471971\n },\n {\n \"path\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"value\": {\n \"value\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"type\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"val\": {\n \"stringVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"intVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"uintVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"boolVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"bytesVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"floatVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"decimalVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"leaflistVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"anyVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"jsonVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"jsonIetfVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"asciiVal\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"protoBytes\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"duplicates\": 61328\n }\n ],\n \"delete\": [\n {\n \"element\": [\n \"in sint adipisicing\",\n \"velit irur\"\n ],\n \"origin\": \"commodo in cillum Lorem\",\n \"elem\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"target\": \"qui\"\n },\n {\n \"element\": [\n \"ex proident\",\n \"sunt commodo Duis quis dolor\"\n ],\n \"origin\": \"ipsum magna id adipisicing\",\n \"elem\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"target\": \"ullamco laborum cillum cupidatat\"\n }\n ],\n \"atomic\": false\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds/:did/paths/:path?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds", + ":did", + "paths", + ":path" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "did", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "path", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Allows to request all Orchestrated Networking Devices which are managed by a\nspecific Principal Network Domain.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"adipisicing ad\",\n \"pnd\": {\n \"id\": \"qui cillum nostrud quis\",\n \"name\": \"nisi\",\n \"description\": \"mollit proident dolor esse\"\n },\n \"ond\": [\n {\n \"id\": \"id exercitation\",\n \"name\": \"reprehenderit consequat voluptate commodo\",\n \"device\": [\n {\n \"timestamp\": \"deserunt non dolore\",\n \"prefix\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"alias\": \"elit\",\n \"update\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"delete\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"atomic\": false\n },\n {\n \"timestamp\": \"ad\",\n \"prefix\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"alias\": \"Excepteur\",\n \"update\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"delete\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"atomic\": true\n }\n ],\n \"sbi\": {\n \"id\": \"do\",\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n },\n {\n \"id\": \"culpa commodo non\",\n \"name\": \"laborum aliquip ad\",\n \"device\": [\n {\n \"timestamp\": \"anim dolor sed ex velit\",\n \"prefix\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"alias\": \"ipsum sunt ad\",\n \"update\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"delete\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"atomic\": true\n },\n {\n \"timestamp\": \"aliqua pr\",\n \"prefix\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"alias\": \"Excepteur sed veniam Lorem\",\n \"update\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"delete\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"atomic\": true\n }\n ],\n \"sbi\": {\n \"id\": \"ut dolore in magna in\",\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows add multiple Orchestrated Networking Devices to be managed by a\nspecific Principal Network Domain.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"dolore sint consequat Ut\",\n \"ond\": [\n {\n \"address\": \"ex\",\n \"sbi\": {\n \"id\": \"cillum fugiat\",\n \"type\": \"TYPE_UNSPECIFIED\"\n },\n \"deviceName\": \"Duis laboris\",\n \"transportOption\": {\n \"address\": \"in commodo ea\",\n \"username\": \"labore Excepteur dolore\",\n \"password\": \"consectetur nisi adipisicing velit\",\n \"tls\": true,\n \"gnmiTransportOption\": {\n \"compression\": \"Ut lab\",\n \"grpcDialOptions\": {\n \"eu_259\": \"ut\"\n },\n \"token\": \"Ut amet id nostrud sit\",\n \"encoding\": \"JSON\"\n },\n \"restconfTransportOption\": {},\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n },\n {\n \"address\": \"sunt velit laborum\",\n \"sbi\": {\n \"id\": \"reprehenderit labore Excepteur ut\",\n \"type\": \"TYPE_UNSPECIFIED\"\n },\n \"deviceName\": \"culpa sint Lorem Ut\",\n \"transportOption\": {\n \"address\": \"amet in sint\",\n \"username\": \"incididunt \",\n \"password\": \"eiusmod eu non veniam\",\n \"tls\": true,\n \"gnmiTransportOption\": {\n \"compression\": \"ex aute dolor\",\n \"grpcDialOptions\": {\n \"consectetura\": \"in ea quis voluptate labore\"\n },\n \"token\": \"mollit dolore enim\",\n \"encoding\": \"JSON\"\n },\n \"restconfTransportOption\": {},\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"dolor consequat\",\n \"ond\": [\n {\n \"address\": \"anim pariatur Excepteur eu ea\",\n \"sbi\": {\n \"id\": \"et ad labore dolore\",\n \"type\": \"TYPE_UNSPECIFIED\"\n },\n \"deviceName\": \"enim ad\",\n \"transportOption\": {\n \"address\": \"occaecat reprehenderit veniam qui adipisicing\",\n \"username\": \"in\",\n \"password\": \"consectetur cupidatat\",\n \"tls\": false,\n \"gnmiTransportOption\": {\n \"compression\": \"in cupidatat consectetur do ex\",\n \"grpcDialOptions\": {\n \"dolor_47\": \"occaecat eiusmod dolore cil\",\n \"mollit554\": \"fugiat proident ea\"\n },\n \"token\": \"deserunt anim\",\n \"encoding\": \"JSON\"\n },\n \"restconfTransportOption\": {},\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n },\n {\n \"address\": \"adipisicing sit off\",\n \"sbi\": {\n \"id\": \"cupidatat sunt laborum incididunt\",\n \"type\": \"TYPE_UNSPECIFIED\"\n },\n \"deviceName\": \"ex reprehenderit proident labore\",\n \"transportOption\": {\n \"address\": \"dolor laboris magna sed sint\",\n \"username\": \"dol\",\n \"password\": \"dolore sed\",\n \"tls\": false,\n \"gnmiTransportOption\": {\n \"compression\": \"amet cillum aliqua\",\n \"grpcDialOptions\": {\n \"amet_d4a\": \"labore laborum est\"\n },\n \"token\": \"dolor consectetur elit veniam ut\",\n \"encoding\": \"JSON\"\n },\n \"restconfTransportOption\": {},\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"culpa ut elit Lorem veniam\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"responses\": [\n {\n \"timestamp\": \"eu consectetur\",\n \"status\": \"STATUS_UNSPECIFIED\"\n },\n {\n \"timestamp\": \"aute officia consequat\",\n \"status\": \"STATUS_UNSPECIFIED\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"dolor consequat\",\n \"ond\": [\n {\n \"address\": \"anim pariatur Excepteur eu ea\",\n \"sbi\": {\n \"id\": \"et ad labore dolore\",\n \"type\": \"TYPE_UNSPECIFIED\"\n },\n \"deviceName\": \"enim ad\",\n \"transportOption\": {\n \"address\": \"occaecat reprehenderit veniam qui adipisicing\",\n \"username\": \"in\",\n \"password\": \"consectetur cupidatat\",\n \"tls\": false,\n \"gnmiTransportOption\": {\n \"compression\": \"in cupidatat consectetur do ex\",\n \"grpcDialOptions\": {\n \"dolor_47\": \"occaecat eiusmod dolore cil\",\n \"mollit554\": \"fugiat proident ea\"\n },\n \"token\": \"deserunt anim\",\n \"encoding\": \"JSON\"\n },\n \"restconfTransportOption\": {},\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n },\n {\n \"address\": \"adipisicing sit off\",\n \"sbi\": {\n \"id\": \"cupidatat sunt laborum incididunt\",\n \"type\": \"TYPE_UNSPECIFIED\"\n },\n \"deviceName\": \"ex reprehenderit proident labore\",\n \"transportOption\": {\n \"address\": \"dolor laboris magna sed sint\",\n \"username\": \"dol\",\n \"password\": \"dolore sed\",\n \"tls\": false,\n \"gnmiTransportOption\": {\n \"compression\": \"amet cillum aliqua\",\n \"grpcDialOptions\": {\n \"amet_d4a\": \"labore laborum est\"\n },\n \"token\": \"dolor consectetur elit veniam ut\",\n \"encoding\": \"JSON\"\n },\n \"restconfTransportOption\": {},\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows to set a specific Path of a Orchestrated Networking Device,\nmanaged by a specific Principal Network Domain.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"culpa reprehenderit\",\n \"changeRequest\": [\n {\n \"did\": \"eiusmod dolore aliquip ex Lorem\",\n \"path\": \"aute amet aliqua ea\",\n \"value\": \"nisi in minim occaecat\",\n \"apiOp\": \"API_OPERATION_UNSPECIFIED\"\n },\n {\n \"did\": \"voluptate consectetur aliqua nisi\",\n \"path\": \"dolor exercitation et ut\",\n \"value\": \"dolore non dolor\",\n \"apiOp\": \"API_OPERATION_UNSPECIFIED\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds/paths", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds", + "paths" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"ad\",\n \"changeRequest\": [\n {\n \"did\": \"dolore\",\n \"path\": \"occaecat aute sunt consequat nisi\",\n \"value\": \"exercitation co\",\n \"apiOp\": \"API_OPERATION_UNSPECIFIED\"\n },\n {\n \"did\": \"Duis mollit in Lorem si\",\n \"path\": \"consequat nisi\",\n \"value\": \"dolor Excepteur magna nulla sunt\",\n \"apiOp\": \"API_OPERATION_UNSPECIFIED\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds/paths", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds", + "paths" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"culpa ut elit Lorem veniam\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"responses\": [\n {\n \"timestamp\": \"eu consectetur\",\n \"status\": \"STATUS_UNSPECIFIED\"\n },\n {\n \"timestamp\": \"aute officia consequat\",\n \"status\": \"STATUS_UNSPECIFIED\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"ad\",\n \"changeRequest\": [\n {\n \"did\": \"dolore\",\n \"path\": \"occaecat aute sunt consequat nisi\",\n \"value\": \"exercitation co\",\n \"apiOp\": \"API_OPERATION_UNSPECIFIED\"\n },\n {\n \"did\": \"Duis mollit in Lorem si\",\n \"path\": \"consequat nisi\",\n \"value\": \"dolor Excepteur magna nulla sunt\",\n \"apiOp\": \"API_OPERATION_UNSPECIFIED\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/onds/paths", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "onds", + "paths" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "sbis", + "item": [ + { + "name": "Allows to request all Southbound Interfaces a specific Principal Network\nDomain supports.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/sbis?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "sbis" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/sbis?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "sbis" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"qui dolore\",\n \"pnd\": {\n \"id\": \"nostrud proident cupidatat aute\",\n \"name\": \"aute ea consequat incididunt ipsum\",\n \"description\": \"deserunt ci\"\n },\n \"sbi\": [\n {\n \"id\": \"est nostrud reprehenderit a\",\n \"type\": \"TYPE_UNSPECIFIED\"\n },\n {\n \"id\": \"dolore Ut do\",\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/sbis?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "sbis" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows to add multiple specific Southbound Interfaces a specific Principal Network\nDomain supports.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"irure occaecat esse deserunt\",\n \"sbi\": [\n {\n \"sbiType\": \"SBI_TYPE_UNSPECIFIED\"\n },\n {\n \"sbiType\": \"SBI_TYPE_UNSPECIFIED\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/sbis", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "sbis" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"proident exercitation nulla fugiat\",\n \"sbi\": [\n {\n \"sbiType\": \"SBI_TYPE_UNSPECIFIED\"\n },\n {\n \"sbiType\": \"SBI_TYPE_UNSPECIFIED\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/sbis", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "sbis" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"culpa ut elit Lorem veniam\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"responses\": [\n {\n \"timestamp\": \"eu consectetur\",\n \"status\": \"STATUS_UNSPECIFIED\"\n },\n {\n \"timestamp\": \"aute officia consequat\",\n \"status\": \"STATUS_UNSPECIFIED\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"proident exercitation nulla fugiat\",\n \"sbi\": [\n {\n \"sbiType\": \"SBI_TYPE_UNSPECIFIED\"\n },\n {\n \"sbiType\": \"SBI_TYPE_UNSPECIFIED\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds/:pid/sbis", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "sbis" + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows to request a specific Southbound Interfaces a specific Principal Network\nDomain supports.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/sbis/:sid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "sbis", + ":sid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "sid", + "value": "minim eu sunt tempor", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/sbis/:sid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "sbis", + ":sid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "sid", + "value": "minim eu sunt tempor", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"qui dolore\",\n \"pnd\": {\n \"id\": \"nostrud proident cupidatat aute\",\n \"name\": \"aute ea consequat incididunt ipsum\",\n \"description\": \"deserunt ci\"\n },\n \"sbi\": [\n {\n \"id\": \"est nostrud reprehenderit a\",\n \"type\": \"TYPE_UNSPECIFIED\"\n },\n {\n \"id\": \"dolore Ut do\",\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/sbis/:sid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "sbis", + ":sid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "sid", + "value": "minim eu sunt tempor", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Allows to delete a specific Principal Network Domain.", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnds/:pid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows to request a specific Orchestrated Networking Device which is managed by a\nspecific Principal Network Domain.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/ond/:did?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "ond", + ":did" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "did", + "value": "minim eu sunt tempor", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/ond/:did?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "ond", + ":did" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "did", + "value": "minim eu sunt tempor", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"et eiusmod adipisicing\",\n \"pnd\": {\n \"id\": \"est enim elit exercitation\",\n \"name\": \"est tempor consequat\",\n \"description\": \"irure proident aliquip reprehenderit\"\n },\n \"ond\": [\n {\n \"id\": \"id velit\",\n \"name\": \"eu dolor dolore elit\",\n \"device\": [\n {\n \"timestamp\": \"cillum consectetur\",\n \"prefix\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"alias\": \"aute exercitation sunt\",\n \"update\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"delete\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"atomic\": false\n },\n {\n \"timestamp\": \"Excepteur laboris\",\n \"prefix\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"alias\": \"ut\",\n \"update\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"delete\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"atomic\": false\n }\n ],\n \"sbi\": {\n \"id\": \"magna\",\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n },\n {\n \"id\": \"par\",\n \"name\": \"sit Lorem\",\n \"device\": [\n {\n \"timestamp\": \"laboris mollit\",\n \"prefix\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"alias\": \"ut reprehenderit in culpa\",\n \"update\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"delete\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"atomic\": true\n },\n {\n \"timestamp\": \"ea id incididunt\",\n \"prefix\": {\n \"element\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"origin\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"elem\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n \"target\": {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n },\n \"alias\": \"pariatur\",\n \"update\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"delete\": [\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n },\n {\n \"value\": \"<Error: Too many levels of nesting to fake this schema>\"\n }\n ],\n \"atomic\": true\n }\n ],\n \"sbi\": {\n \"id\": \"nisi occaecat\",\n \"type\": \"TYPE_UNSPECIFIED\"\n }\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds/:pid/ond/:did?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds", + ":pid", + "ond", + ":did" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "Lorem quis cillum of", + "description": "(Required) " + }, + { + "key": "did", + "value": "minim eu sunt tempor", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Allows to request all Principal Network Domains.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnds?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"officia esse quis eu magna\",\n \"pnd\": [\n {\n \"id\": \"ad ullamco ut nulla\",\n \"name\": \"mollit dolore\",\n \"description\": \"nulla voluptate Lorem incididunt\"\n },\n {\n \"id\": \"cillum tempor qui\",\n \"name\": \"cillum\",\n \"description\": \"id nisi in quis\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnds?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows create a Principal Network Domain.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"id\",\n \"pnd\": [\n {\n \"name\": \"non sit\",\n \"description\": \"irure in culpa\",\n \"sbi\": \"sint\"\n },\n {\n \"name\": \"ad sed sit id nostrud\",\n \"description\": \"Duis\",\n \"sbi\": \"magna amet\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds" + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"sint Excepteur eu incididunt amet\",\n \"pnd\": [\n {\n \"name\": \"exercitation\",\n \"description\": \"minim dolore anim\",\n \"sbi\": \"nul\"\n },\n {\n \"name\": \"sit sint\",\n \"description\": \"sit Ut in\",\n \"sbi\": \"cupidatat quis\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"sint Excepteur eu incididunt amet\",\n \"pnd\": [\n {\n \"name\": \"exercitation\",\n \"description\": \"minim dolore anim\",\n \"sbi\": \"nul\"\n },\n {\n \"name\": \"sit sint\",\n \"description\": \"sit Ut in\",\n \"sbi\": \"cupidatat quis\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/pnds", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnds" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "roles", + "item": [ + { + "name": "delete", + "item": [ + { + "name": "Deletes roles with their permissions, requires login beforehand.\nRequires highest permissions.", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "localhost:8080/roles/delete?timestamp=1649937652996000000&roleName=user", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "roles", + "delete" + ], + "query": [ + { + "key": "timestamp", + "value": "1649937652996000000" + }, + { + "key": "roleName", + "value": "user" + }, + { + "key": "roleName", + "value": "proident", + "disabled": true + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/roles/delete?timestamp=Lorem quis cillum of&roleName=qui eu&roleName=id sint", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "delete" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "roleName", + "value": "qui eu" + }, + { + "key": "roleName", + "value": "id sint" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/roles/delete?timestamp=Lorem quis cillum of&roleName=qui eu&roleName=id sint", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "delete" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "roleName", + "value": "qui eu" + }, + { + "key": "roleName", + "value": "id sint" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Deletes permissions from given role, requires login beforehand.\nRequires highest permissions.", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "localhost:8080/roles/delete/permissions?timestamp=1649937652996000000&roleName=user&permissionsToDelete=/gosdn.pnd.PndService/GetOndList&permissionsToDelete=/gosdn.pnd.PndService/GetSbi", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "roles", + "delete", + "permissions" + ], + "query": [ + { + "key": "timestamp", + "value": "1649937652996000000" + }, + { + "key": "roleName", + "value": "user" + }, + { + "key": "permissionsToDelete", + "value": "/gosdn.pnd.PndService/GetOndList" + }, + { + "key": "permissionsToDelete", + "value": "/gosdn.pnd.PndService/GetSbi" + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/roles/delete/permissions?timestamp=Lorem quis cillum of&roleName=Lorem quis cillum of&permissionsToDelete=qui eu&permissionsToDelete=id sint", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "delete", + "permissions" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "roleName", + "value": "Lorem quis cillum of" + }, + { + "key": "permissionsToDelete", + "value": "qui eu" + }, + { + "key": "permissionsToDelete", + "value": "id sint" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/roles/delete/permissions?timestamp=Lorem quis cillum of&roleName=Lorem quis cillum of&permissionsToDelete=qui eu&permissionsToDelete=id sint", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "delete", + "permissions" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "roleName", + "value": "Lorem quis cillum of" + }, + { + "key": "permissionsToDelete", + "value": "qui eu" + }, + { + "key": "permissionsToDelete", + "value": "id sint" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Requests all roles with their permissions, requires login beforehand.\nRequires highest permissions.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "localhost:8080/roles?timestamp=1649937652996000000", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "roles" + ], + "query": [ + { + "key": "timestamp", + "value": "1649937652996000000" + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/roles?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"consectetur dolor\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"roles\": [\n {\n \"id\": \"ea amet laboris pariatur\",\n \"name\": \"proident tempor elit Duis dolore\",\n \"description\": \"aute laboris est pariatur dolore\",\n \"permissions\": [\n \"veniam \",\n \"cupidatat\"\n ]\n },\n {\n \"id\": \"sit nisi cillum laborum aute\",\n \"name\": \"magna\",\n \"description\": \"labore sit reprehenderit\",\n \"permissions\": [\n \"consequat id\",\n \"ea in\"\n ]\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/roles?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Creates roles, requires login beforehand.\nRequires highest permissions.", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODU5Mjg1MzYsInVzZXJuYW1lIjoiYSJ9.9KVf8JiQNYAyaXnSENp7FGyPpPlUNknVinO3saNTfgI", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + }, + { + "key": "authorize", + "value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2ODU5Mjg1MzYsInVzZXJuYW1lIjoiYSJ9.9KVf8JiQNYAyaXnSENp7FGyPpPlUNknVinO3saNTfgI", + "type": "default" + } + ], + "body": { + "mode": "raw", + "raw": "{\n\t\"timestamp\": \"1649929667405420000\",\n\t\"roles\": [{\n\t\t\t\"name\": \"admin\",\n\t\t\t\"description\": \"Admin\",\n\t\t\t\"permissions\": [\n\t\t\t\t\"/gosdn.core.CoreService/GetPnd\",\n\t\t\t\t\"/gosdn.core.CoreService/GetPndList\",\n\t\t\t\t\"/gosdn.core.CoreService/CreatePndList\",\n\t\t\t\t\"/gosdn.core.CoreService/DeletePnd\",\n\t\t\t\t\"/gosdn.rbac.AuthService/CreateUsers\",\n\t\t\t\t\"/gosdn.rbac.AuthService/GetUser\",\n\t\t\t\t\"/gosdn.rbac.AuthService/GetUsers\",\n\t\t\t\t\"/gosdn.rbac.AuthService/UpdateUsers\",\n\t\t\t\t\"/gosdn.rbac.AuthService/DeleteUsers\",\n\t\t\t\t\"/gosdn.rbac.AuthService/CreateRoles\",\n\t\t\t\t\"/gosdn.rbac.AuthService/GetRole\",\n\t\t\t\t\"/gosdn.rbac.AuthService/GetRoles\",\n\t\t\t\t\"/gosdn.rbac.AuthService/UpdateRoles\",\n\t\t\t\t\"/gosdn.rbac.AuthService/DeletePermissionsForRole\",\n\t\t\t\t\"/gosdn.rbac.AuthService/DeleteRoles\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetOnd\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetOndList\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetSbi\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetSbiList\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetPath\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetChange\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetChangeList\",\n\t\t\t\t\"/gosdn.pnd.PndService/SetOndList\",\n\t\t\t\t\"/gosdn.pnd.PndService/SetChangeList\",\n\t\t\t\t\"/gosdn.pnd.PndService/SetPathList\",\n\t\t\t\t\"/gosdn.pnd.PndService/SetSbiList\",\n\t\t\t\t\"/gosdn.pnd.PndService/DeleteOnd\",\n \"/gosdn.southbound.SbiService/GetSchema\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"user\",\n\t\t\t\"description\": \"User\",\n\t\t\t\"permissions\": [\n\t\t\t\t\"/gosdn.core.CoreService/GetPnd\",\n\t\t\t\t\"/gosdn.core.CoreService/GetPndList\",\n\t\t\t\t\"/gosdn.rbac.AuthService/CreateUsers\",\n\t\t\t\t\"/gosdn.rbac.AuthService/GetUser\",\n\t\t\t\t\"/gosdn.rbac.AuthService/UpdateUsers\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetOnd\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetOndList\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetSbi\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetSbiList\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetPath\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetChange\",\n\t\t\t\t\"/gosdn.pnd.PndService/GetChangeList\"\n\t\t\t]\n\t\t}\n\t]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "localhost:8080/roles/create", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "roles", + "create" + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"reprehenderit aliquip elit\",\n \"roles\": [\n {\n \"id\": \"veniam\",\n \"name\": \"sunt enim\",\n \"description\": \"in\",\n \"permissions\": [\n \"deserunt laboris\",\n \"mollit\"\n ]\n },\n {\n \"id\": \"tempor\",\n \"name\": \"id aliquip consequat proident\",\n \"description\": \"sunt adipisicing\",\n \"permissions\": [\n \"Ut Duis reprehenderit incididunt esse\",\n \"eiusmod ullamco dolor\"\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/roles/create", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "create" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"reprehenderit aliquip elit\",\n \"roles\": [\n {\n \"id\": \"veniam\",\n \"name\": \"sunt enim\",\n \"description\": \"in\",\n \"permissions\": [\n \"deserunt laboris\",\n \"mollit\"\n ]\n },\n {\n \"id\": \"tempor\",\n \"name\": \"id aliquip consequat proident\",\n \"description\": \"sunt adipisicing\",\n \"permissions\": [\n \"Ut Duis reprehenderit incididunt esse\",\n \"eiusmod ullamco dolor\"\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/roles/create", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "create" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Requests one role with its permissions, requires login beforehand.\nRequires highest permissions.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/roles/get?timestamp=Lorem quis cillum of&roleName=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "get" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "roleName", + "value": "Lorem quis cillum of" + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/roles/get?timestamp=Lorem quis cillum of&roleName=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "get" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "roleName", + "value": "Lorem quis cillum of" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"ex ad reprehenderit\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"role\": {\n \"id\": \"aliquip do consequat Excepteur\",\n \"name\": \"non Ut\",\n \"description\": \"laborum in\",\n \"permissions\": [\n \"et minim sit\",\n \"commodo pariatur\"\n ]\n }\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/roles/get?timestamp=Lorem quis cillum of&roleName=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "get" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "roleName", + "value": "Lorem quis cillum of" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Updates roles by setting the provided permissions, requires login beforehand.\nRequires highest permissions.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"1649937652996000000\",\n \"roles\": [\n {\n \"id\": \"110fc2ae-b36e-4ff4-8a44-a4489fba9e8c\",\n \"name\": \"user\",\n \"description\": \"User role\",\n \"permissions\": [\n \"/gosdn.core.CoreService/GetPnd\",\n \"/gosdn.core.CoreService/GetPndList\",\n \"/gosdn.rbac.AuthService/CreateUsers\",\n \"/gosdn.rbac.AuthService/GetUser\",\n \"/gosdn.rbac.AuthService/UpdateUsers\",\n \"/gosdn.pnd.PndService/GetOnd\",\n \"/gosdn.pnd.PndService/GetOndList\",\n \"/gosdn.pnd.PndService/GetSbi\",\n \"/gosdn.pnd.PndService/GetSbiList\",\n \"/gosdn.pnd.PndService/GetPath\",\n \"/gosdn.pnd.PndService/GetChange\",\n \"/gosdn.pnd.PndService/GetChangeList\"\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "localhost:8080/roles/update", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "roles", + "update" + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"elit culpa do\",\n \"roles\": [\n {\n \"id\": \"nulla ullamco ad Excepteur incididunt\",\n \"name\": \"do laborum dolore cupidatat\",\n \"description\": \"Ut\",\n \"permissions\": [\n \"non aliqua\",\n \"cupidata\"\n ]\n },\n {\n \"id\": \"amet commodo nostrud\",\n \"name\": \"nisi nostrud\",\n \"description\": \"esse ex laborum\",\n \"permissions\": [\n \"reprehenderit in Lorem\",\n \"sunt cupidat\"\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/roles/update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "update" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"elit culpa do\",\n \"roles\": [\n {\n \"id\": \"nulla ullamco ad Excepteur incididunt\",\n \"name\": \"do laborum dolore cupidatat\",\n \"description\": \"Ut\",\n \"permissions\": [\n \"non aliqua\",\n \"cupidata\"\n ]\n },\n {\n \"id\": \"amet commodo nostrud\",\n \"name\": \"nisi nostrud\",\n \"description\": \"esse ex laborum\",\n \"permissions\": [\n \"reprehenderit in Lorem\",\n \"sunt cupidat\"\n ]\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/roles/update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "roles", + "update" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "users", + "item": [ + { + "name": "Requests information about available users, requires login beforehand.\nRequires highest possible permissions.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "localhost:8080/users?timestamp=1649937652996000000", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "users" + ], + "query": [ + { + "key": "timestamp", + "value": "1649937652996000000" + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/users?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"Ut\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"user\": [\n {\n \"id\": \"irure ut cillum sint\",\n \"name\": \"sit ea\",\n \"roles\": {\n \"Lorem0\": \"commodo\",\n \"amet_238\": \"in eiusmod sed\"\n },\n \"password\": \"officia aute\",\n \"token\": \"dolor ut in\"\n },\n {\n \"id\": \"et\",\n \"name\": \"esse qui dolore proident\",\n \"roles\": {\n \"sit17\": \"proident tempor irure\",\n \"laboris94\": \"in U\"\n },\n \"password\": \"sed\",\n \"token\": \"non\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/users?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Create users with the provided parameters, creation of multiple users requires login beforehand.\nHighest possible permissions of new users is of current permission level.\nIf not logged in: Created user has lowest possible permissions, only one user can be created this way.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"1649937652996000000\",\n \"user\": [\n {\n \"name\": \"test 1\",\n \"roles\": {\n \"110fc2ae-b36e-4ff4-8a44-a4489fba9e8c\": \"aliqua ut aute consequat nulla\"\n },\n \"password\": \"culpa Lorem exercitation non nis\",\n \"token\": \"fugiat ex non do dolor\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "localhost:8080/users/create", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "users", + "create" + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"Duis sit exer\",\n \"user\": [\n {\n \"id\": \"cupidatat Duis nisi\",\n \"name\": \"veniam qui Lorem\",\n \"roles\": {\n \"mollit_0d\": \"non do occaecat Lorem laboris\",\n \"exda2\": \"minim cupidatat tempor\"\n },\n \"password\": \"laboris ut\",\n \"token\": \"culpa est nisi eiusmod\"\n },\n {\n \"id\": \"id proident Lorem labore\",\n \"name\": \"eu in non\",\n \"roles\": {\n \"ad2\": \"sunt officia velit\",\n \"proident_2ee\": \"aliquip dolor\"\n },\n \"password\": \"officia et dolore in\",\n \"token\": \"laborum magna fugiat\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/users/create", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "create" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"Duis sit exer\",\n \"user\": [\n {\n \"id\": \"cupidatat Duis nisi\",\n \"name\": \"veniam qui Lorem\",\n \"roles\": {\n \"mollit_0d\": \"non do occaecat Lorem laboris\",\n \"exda2\": \"minim cupidatat tempor\"\n },\n \"password\": \"laboris ut\",\n \"token\": \"culpa est nisi eiusmod\"\n },\n {\n \"id\": \"id proident Lorem labore\",\n \"name\": \"eu in non\",\n \"roles\": {\n \"ad2\": \"sunt officia velit\",\n \"proident_2ee\": \"aliquip dolor\"\n },\n \"password\": \"officia et dolore in\",\n \"token\": \"laborum magna fugiat\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/users/create", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "create" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Deletes users, requires login beforehand.\nRequires highest permissions.", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/users/delete?timestamp=Lorem quis cillum of&username=deserunt qui&username=proident", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "delete" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "username", + "value": "deserunt qui" + }, + { + "key": "username", + "value": "proident" + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/users/delete?timestamp=Lorem quis cillum of&username=qui eu&username=id sint", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "delete" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "username", + "value": "qui eu" + }, + { + "key": "username", + "value": "id sint" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/users/delete?timestamp=Lorem quis cillum of&username=qui eu&username=id sint", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "delete" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "username", + "value": "qui eu" + }, + { + "key": "username", + "value": "id sint" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Requests information about one user, requires login beforehand.option", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/users/get?timestamp=Lorem quis cillum of&name=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "get" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "name", + "value": "Lorem quis cillum of" + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/users/get?timestamp=Lorem quis cillum of&name=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "get" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "name", + "value": "Lorem quis cillum of" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"pariatur rep\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"user\": {\n \"id\": \"officia aliquip\",\n \"name\": \"eiusmod Lorem\",\n \"roles\": {\n \"consecteture\": \"in Ut sed\",\n \"aliqua_f\": \"magna qui eiusmod sed\"\n },\n \"password\": \"Duis est mollit\",\n \"token\": \"nisi dolor deserunt fugiat\"\n }\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/users/get?timestamp=Lorem quis cillum of&name=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "get" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + }, + { + "key": "name", + "value": "Lorem quis cillum of" + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Updates users with the provided parameters, requires login beforehand.\nRequires highest permissions to change other users, everyone else can only update their own account.\nRequires highest permissions to change multiple users at the same time.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"eu mollit est\",\n \"user\": [\n {\n \"id\": \"dolore velit\",\n \"name\": \"elit pariatur exercit\",\n \"roles\": {\n \"Ut_7\": \"velit sint adipisicing occaecat\"\n },\n \"password\": \"dolore reprehenderit\",\n \"token\": \"magna\"\n },\n {\n \"id\": \"ex commodo\",\n \"name\": \"ea magna\",\n \"roles\": {\n \"deserunt_7a5\": \"dolor ex\",\n \"dolor_74_\": \"adipisicing cupidatat id\",\n \"anim61\": \"cillum qui sunt \",\n \"fugiat_8\": \"dolore elit U\"\n },\n \"password\": \"eu pariatur\",\n \"token\": \"cillum anim dolore\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/users/update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "update" + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"sunt et ipsum\",\n \"user\": [\n {\n \"id\": \"dolor occaecat pariatur\",\n \"name\": \"culpa\",\n \"roles\": {\n \"ullamco_0_\": \"cupidatat nisi mollit\",\n \"in_3\": \"enim laboris ipsum\"\n },\n \"password\": \"in\",\n \"token\": \"tempor eiusmod dol\"\n },\n {\n \"id\": \"minim\",\n \"name\": \"dolore d\",\n \"roles\": {\n \"amet3d\": \"ex irur\"\n },\n \"password\": \"dolore nost\",\n \"token\": \"exercitation ipsum ut qui laboris\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/users/update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "update" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"sunt et ipsum\",\n \"user\": [\n {\n \"id\": \"dolor occaecat pariatur\",\n \"name\": \"culpa\",\n \"roles\": {\n \"ullamco_0_\": \"cupidatat nisi mollit\",\n \"in_3\": \"enim laboris ipsum\"\n },\n \"password\": \"in\",\n \"token\": \"tempor eiusmod dol\"\n },\n {\n \"id\": \"minim\",\n \"name\": \"dolore d\",\n \"roles\": {\n \"amet3d\": \"ex irur\"\n },\n \"password\": \"dolore nost\",\n \"token\": \"exercitation ipsum ut qui laboris\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/users/update", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "users", + "update" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "toplogy", + "item": [ + { + "name": "Add link to topology", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"1649929667405420000\",\n \"link\": {\n \"name\": \"test\",\n \"sourceNode\": {\n \"name\": \"source-node\"\n },\n \"targetNode\": {\n \"name\": \"target-node\"\n },\n \"sourcePort\": {\n \"name\": \"source-port\"\n },\n \"targetPort\": {\n \"name\": \"target-port\"\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "localhost:8080/topology/create", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "topology", + "create" + ] + } + }, + "response": [] + }, + { + "name": "Get toplogy", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "localhost:8080/topology", + "host": [ + "localhost" + ], + "port": "8080", + "path": [ + "topology" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Allows a user to login creating a session for further actions.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"sed aliquip\",\n \"username\": \"in consequat\",\n \"pwd\": \"in cillum\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/login", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "login" + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"sed aliquip\",\n \"username\": \"in consequat\",\n \"pwd\": \"in cillum\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/login", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "login" + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"aliquip ex ut ad pro\",\n \"status\": \"STATUS_UNSPECIFIED\",\n \"token\": \"qui\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"timestamp\": \"sed aliquip\",\n \"username\": \"in consequat\",\n \"pwd\": \"in cillum\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/login", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "login" + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -13235423,\n \"message\": \"officia aute occaecat tempor\",\n \"details\": [\n {\n \"@type\": \"reprehenderit dolore in\",\n \"inc\": {}\n },\n {\n \"@type\": \"incididunt\",\n \"non__0\": {},\n \"officia_\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows a user to log out from an existing session.", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/logout/:username?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "logout", + ":username" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "username", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/logout/:username?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "logout", + ":username" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "username", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"sunt sed tempor\",\n \"status\": \"STATUS_UNSPECIFIED\"\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "POST", + "header": [], + "url": { + "raw": "{{baseUrl}}/logout/:username?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "logout", + ":username" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "username", + "value": "Lorem quis cillum of", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + }, + { + "name": "Allows to request a specific Principal Network Domain.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/pnd/:pid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnd", + ":pid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "minim eu sunt tempor", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "A successful response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnd/:pid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnd", + ":pid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "minim eu sunt tempor", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"timestamp\": \"officia esse quis eu magna\",\n \"pnd\": [\n {\n \"id\": \"ad ullamco ut nulla\",\n \"name\": \"mollit dolore\",\n \"description\": \"nulla voluptate Lorem incididunt\"\n },\n {\n \"id\": \"cillum tempor qui\",\n \"name\": \"cillum\",\n \"description\": \"id nisi in quis\"\n }\n ]\n}" + }, + { + "name": "An unexpected error response.", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/pnd/:pid?timestamp=Lorem quis cillum of", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "pnd", + ":pid" + ], + "query": [ + { + "key": "timestamp", + "value": "Lorem quis cillum of" + } + ], + "variable": [ + { + "key": "pid", + "value": "minim eu sunt tempor", + "description": "(Required) " + } + ] + } + }, + "status": "Internal Server Error", + "code": 500, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"code\": -51398528,\n \"message\": \"est nostrud incididunt\",\n \"details\": [\n {\n \"@type\": \"id ea cillum\"\n },\n {\n \"@type\": \"non labore\",\n \"incididunt5b0\": {},\n \"nulla_d\": {},\n \"quis_5e\": {}\n }\n ]\n}" + } + ] + } + ], + "variable": [ + { + "key": "baseUrl", + "value": "/", + "type": "string" + } + ] +} \ No newline at end of file