Skip to content
Snippets Groups Projects
Commit e0790856 authored by André Sterba's avatar André Sterba
Browse files

Merge branch 'develop' into istaester/autogenerate-device-names

parents 1636b4d5 3405158a
No related branches found
No related tags found
1 merge request!150Let user set a name for a device or autogenerate it
Showing
with 212 additions and 6307 deletions
// openconfig.enums is generated by proto_generator as a protobuf
// representation of a YANG schema.
//
// Input schema modules:
// - ../yang-models/models/openconfig/release/models/interfaces/openconfig-interfaces.yang
// Include paths:
// - ../yang-models/models/...
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.13.0
// source: openconfig/enums/enums.proto
package gosdn
import (
proto "github.com/golang/protobuf/proto"
_ "github.com/openconfig/ygot/proto/yext"
_ "github.com/openconfig/ygot/proto/ywrapper"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// IETFInterfacesInterfaceType represents an enumerated type generated for the YANG identity interface-type.
type IETFInterfacesInterfaceType int32
const (
IETFInterfacesInterfaceType_IETFINTERFACESINTERFACETYPE_UNSET IETFInterfacesInterfaceType = 0
)
// Enum value maps for IETFInterfacesInterfaceType.
var (
IETFInterfacesInterfaceType_name = map[int32]string{
0: "IETFINTERFACESINTERFACETYPE_UNSET",
}
IETFInterfacesInterfaceType_value = map[string]int32{
"IETFINTERFACESINTERFACETYPE_UNSET": 0,
}
)
func (x IETFInterfacesInterfaceType) Enum() *IETFInterfacesInterfaceType {
p := new(IETFInterfacesInterfaceType)
*p = x
return p
}
func (x IETFInterfacesInterfaceType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (IETFInterfacesInterfaceType) Descriptor() protoreflect.EnumDescriptor {
return file_openconfig_enums_enums_proto_enumTypes[0].Descriptor()
}
func (IETFInterfacesInterfaceType) Type() protoreflect.EnumType {
return &file_openconfig_enums_enums_proto_enumTypes[0]
}
func (x IETFInterfacesInterfaceType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use IETFInterfacesInterfaceType.Descriptor instead.
func (IETFInterfacesInterfaceType) EnumDescriptor() ([]byte, []int) {
return file_openconfig_enums_enums_proto_rawDescGZIP(), []int{0}
}
var File_openconfig_enums_enums_proto protoreflect.FileDescriptor
var file_openconfig_enums_enums_proto_rawDesc = []byte{
0x0a, 0x1c, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x75,
0x6d, 0x73, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10,
0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x75, 0x6d, 0x73,
0x1a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65,
0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2f, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x79, 0x77, 0x72, 0x61,
0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x79, 0x65, 0x78,
0x74, 0x2f, 0x79, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x44, 0x0a, 0x1b,
0x49, 0x45, 0x54, 0x46, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x49, 0x6e,
0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x21, 0x49,
0x45, 0x54, 0x46, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x46, 0x41, 0x43, 0x45, 0x53, 0x49, 0x4e, 0x54,
0x45, 0x52, 0x46, 0x41, 0x43, 0x45, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54,
0x10, 0x00, 0x42, 0x20, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x66, 0x62, 0x69,
0x2e, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x63, 0x73, 0x6e, 0x2f, 0x67,
0x6f, 0x73, 0x64, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_openconfig_enums_enums_proto_rawDescOnce sync.Once
file_openconfig_enums_enums_proto_rawDescData = file_openconfig_enums_enums_proto_rawDesc
)
func file_openconfig_enums_enums_proto_rawDescGZIP() []byte {
file_openconfig_enums_enums_proto_rawDescOnce.Do(func() {
file_openconfig_enums_enums_proto_rawDescData = protoimpl.X.CompressGZIP(file_openconfig_enums_enums_proto_rawDescData)
})
return file_openconfig_enums_enums_proto_rawDescData
}
var file_openconfig_enums_enums_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_openconfig_enums_enums_proto_goTypes = []interface{}{
(IETFInterfacesInterfaceType)(0), // 0: openconfig.enums.IETFInterfacesInterfaceType
}
var file_openconfig_enums_enums_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_openconfig_enums_enums_proto_init() }
func file_openconfig_enums_enums_proto_init() {
if File_openconfig_enums_enums_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_openconfig_enums_enums_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_openconfig_enums_enums_proto_goTypes,
DependencyIndexes: file_openconfig_enums_enums_proto_depIdxs,
EnumInfos: file_openconfig_enums_enums_proto_enumTypes,
}.Build()
File_openconfig_enums_enums_proto = out.File
file_openconfig_enums_enums_proto_rawDesc = nil
file_openconfig_enums_enums_proto_goTypes = nil
file_openconfig_enums_enums_proto_depIdxs = nil
}
// openconfig is generated by proto_generator as a protobuf
// representation of a YANG schema.
//
// Input schema modules:
// - ../yang-models/models/openconfig/release/models/interfaces/openconfig-interfaces.yang
// Include paths:
// - ../yang-models/models/...
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.13.0
// source: openconfig/openconfig.proto
package gosdn
import (
proto "github.com/golang/protobuf/proto"
_ "github.com/openconfig/ygot/proto/yext"
_ "github.com/openconfig/ygot/proto/ywrapper"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Device struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Interfaces *Interfaces `protobuf:"bytes,85031486,opt,name=interfaces,proto3" json:"interfaces,omitempty"`
}
func (x *Device) Reset() {
*x = Device{}
if protoimpl.UnsafeEnabled {
mi := &file_openconfig_openconfig_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Device) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Device) ProtoMessage() {}
func (x *Device) ProtoReflect() protoreflect.Message {
mi := &file_openconfig_openconfig_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 Device.ProtoReflect.Descriptor instead.
func (*Device) Descriptor() ([]byte, []int) {
return file_openconfig_openconfig_proto_rawDescGZIP(), []int{0}
}
func (x *Device) GetInterfaces() *Interfaces {
if x != nil {
return x.Interfaces
}
return nil
}
var File_openconfig_openconfig_proto protoreflect.FileDescriptor
var file_openconfig_openconfig_proto_rawDesc = []byte{
0x0a, 0x1b, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x70, 0x65,
0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6f,
0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x79, 0x77, 0x72, 0x61,
0x70, 0x70, 0x65, 0x72, 0x2f, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x79, 0x65, 0x78, 0x74, 0x2f, 0x79, 0x65, 0x78, 0x74, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3c, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x69, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a,
0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0xbe, 0xf4, 0xc5, 0x28,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,
0x65, 0x73, 0x42, 0x0e, 0x82, 0x41, 0x0b, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,
0x65, 0x73, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x42, 0x20,
0x5a, 0x1e, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x68, 0x2d, 0x64,
0x61, 0x2e, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x63, 0x73, 0x6e, 0x2f, 0x67, 0x6f, 0x73, 0x64, 0x6e,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_openconfig_openconfig_proto_rawDescOnce sync.Once
file_openconfig_openconfig_proto_rawDescData = file_openconfig_openconfig_proto_rawDesc
)
func file_openconfig_openconfig_proto_rawDescGZIP() []byte {
file_openconfig_openconfig_proto_rawDescOnce.Do(func() {
file_openconfig_openconfig_proto_rawDescData = protoimpl.X.CompressGZIP(file_openconfig_openconfig_proto_rawDescData)
})
return file_openconfig_openconfig_proto_rawDescData
}
var file_openconfig_openconfig_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_openconfig_openconfig_proto_goTypes = []interface{}{
(*Device)(nil), // 0: openconfig.Device
(*Interfaces)(nil), // 1: openconfig.openconfig_interfaces.Interfaces
}
var file_openconfig_openconfig_proto_depIdxs = []int32{
1, // 0: openconfig.Device.interfaces:type_name -> openconfig.openconfig_interfaces.Interfaces
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_openconfig_openconfig_proto_init() }
func file_openconfig_openconfig_proto_init() {
if File_openconfig_openconfig_proto != nil {
return
}
file_openconfig_openconfig_interfaces_openconfig_interfaces_proto_init()
if !protoimpl.UnsafeEnabled {
file_openconfig_openconfig_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Device); 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_openconfig_openconfig_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_openconfig_openconfig_proto_goTypes,
DependencyIndexes: file_openconfig_openconfig_proto_depIdxs,
MessageInfos: file_openconfig_openconfig_proto_msgTypes,
}.Build()
File_openconfig_openconfig_proto = out.File
file_openconfig_openconfig_proto_rawDesc = nil
file_openconfig_openconfig_proto_goTypes = nil
file_openconfig_openconfig_proto_depIdxs = nil
}
This diff is collapsed.
// openconfig.enums is generated by proto_generator as a protobuf
// representation of a YANG schema.
//
// Input schema modules:
// - ../yang-models/models/openconfig/release/models/interfaces/openconfig-interfaces.yang
// Include paths:
// - ../yang-models/models/...
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.13.0
// source: openconfig/enums/enums.proto
package openconfig_enums
import (
proto "github.com/golang/protobuf/proto"
_ "github.com/openconfig/ygot/proto/yext"
_ "github.com/openconfig/ygot/proto/ywrapper"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// IETFInterfacesInterfaceType represents an enumerated type generated for the YANG identity interface-type.
type IETFInterfacesInterfaceType int32
const (
IETFInterfacesInterfaceType_IETFINTERFACESINTERFACETYPE_UNSET IETFInterfacesInterfaceType = 0
)
// Enum value maps for IETFInterfacesInterfaceType.
var (
IETFInterfacesInterfaceType_name = map[int32]string{
0: "IETFINTERFACESINTERFACETYPE_UNSET",
}
IETFInterfacesInterfaceType_value = map[string]int32{
"IETFINTERFACESINTERFACETYPE_UNSET": 0,
}
)
func (x IETFInterfacesInterfaceType) Enum() *IETFInterfacesInterfaceType {
p := new(IETFInterfacesInterfaceType)
*p = x
return p
}
func (x IETFInterfacesInterfaceType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (IETFInterfacesInterfaceType) Descriptor() protoreflect.EnumDescriptor {
return file_openconfig_enums_enums_proto_enumTypes[0].Descriptor()
}
func (IETFInterfacesInterfaceType) Type() protoreflect.EnumType {
return &file_openconfig_enums_enums_proto_enumTypes[0]
}
func (x IETFInterfacesInterfaceType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use IETFInterfacesInterfaceType.Descriptor instead.
func (IETFInterfacesInterfaceType) EnumDescriptor() ([]byte, []int) {
return file_openconfig_enums_enums_proto_rawDescGZIP(), []int{0}
}
var File_openconfig_enums_enums_proto protoreflect.FileDescriptor
var file_openconfig_enums_enums_proto_rawDesc = []byte{
0x0a, 0x1c, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x75,
0x6d, 0x73, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10,
0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65, 0x6e, 0x75, 0x6d, 0x73,
0x1a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65,
0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2f, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2f, 0x79, 0x77, 0x72, 0x61,
0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x69, 0x74, 0x68,
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x79, 0x65, 0x78,
0x74, 0x2f, 0x79, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x44, 0x0a, 0x1b,
0x49, 0x45, 0x54, 0x46, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x49, 0x6e,
0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x21, 0x49,
0x45, 0x54, 0x46, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x46, 0x41, 0x43, 0x45, 0x53, 0x49, 0x4e, 0x54,
0x45, 0x52, 0x46, 0x41, 0x43, 0x45, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x45, 0x54,
0x10, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_openconfig_enums_enums_proto_rawDescOnce sync.Once
file_openconfig_enums_enums_proto_rawDescData = file_openconfig_enums_enums_proto_rawDesc
)
func file_openconfig_enums_enums_proto_rawDescGZIP() []byte {
file_openconfig_enums_enums_proto_rawDescOnce.Do(func() {
file_openconfig_enums_enums_proto_rawDescData = protoimpl.X.CompressGZIP(file_openconfig_enums_enums_proto_rawDescData)
})
return file_openconfig_enums_enums_proto_rawDescData
}
var file_openconfig_enums_enums_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_openconfig_enums_enums_proto_goTypes = []interface{}{
(IETFInterfacesInterfaceType)(0), // 0: openconfig.enums.IETFInterfacesInterfaceType
}
var file_openconfig_enums_enums_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_openconfig_enums_enums_proto_init() }
func file_openconfig_enums_enums_proto_init() {
if File_openconfig_enums_enums_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_openconfig_enums_enums_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_openconfig_enums_enums_proto_goTypes,
DependencyIndexes: file_openconfig_enums_enums_proto_depIdxs,
EnumInfos: file_openconfig_enums_enums_proto_enumTypes,
}.Build()
File_openconfig_enums_enums_proto = out.File
file_openconfig_enums_enums_proto_rawDesc = nil
file_openconfig_enums_enums_proto_goTypes = nil
file_openconfig_enums_enums_proto_depIdxs = nil
}
// openconfig.enums is generated by proto_generator as a protobuf
// representation of a YANG schema.
//
// Input schema modules:
// - ../yang-models/models/openconfig/release/models/interfaces/openconfig-interfaces.yang
// Include paths:
// - ../yang-models/models/...
syntax = "proto3";
package openconfig.enums;
option go_package = "code.fbi.h-da.de/cocsn/gosdn";
import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto";
import "github.com/openconfig/ygot/proto/yext/yext.proto";
// IETFInterfacesInterfaceType represents an enumerated type generated for the YANG identity interface-type.
enum IETFInterfacesInterfaceType {
IETFINTERFACESINTERFACETYPE_UNSET = 0;
}
// openconfig is generated by proto_generator as a protobuf
// representation of a YANG schema.
//
// Input schema modules:
// - ../yang-models/models/openconfig/release/models/interfaces/openconfig-interfaces.yang
// Include paths:
// - ../yang-models/models/...
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.13.0
// source: openconfig/openconfig.proto
package openconfig
import (
openconfig_interfaces "code.fbi.h-da.de/cocsn/gosdn/api/proto/openconfig/openconfig_interfaces"
proto "github.com/golang/protobuf/proto"
_ "github.com/openconfig/ygot/proto/yext"
_ "github.com/openconfig/ygot/proto/ywrapper"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Device struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Interfaces *openconfig_interfaces.Interfaces `protobuf:"bytes,85031486,opt,name=interfaces,proto3" json:"interfaces,omitempty"`
}
func (x *Device) Reset() {
*x = Device{}
if protoimpl.UnsafeEnabled {
mi := &file_openconfig_openconfig_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Device) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Device) ProtoMessage() {}
func (x *Device) ProtoReflect() protoreflect.Message {
mi := &file_openconfig_openconfig_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 Device.ProtoReflect.Descriptor instead.
func (*Device) Descriptor() ([]byte, []int) {
return file_openconfig_openconfig_proto_rawDescGZIP(), []int{0}
}
func (x *Device) GetInterfaces() *openconfig_interfaces.Interfaces {
if x != nil {
return x.Interfaces
}
return nil
}
var File_openconfig_openconfig_proto protoreflect.FileDescriptor
var file_openconfig_openconfig_proto_rawDesc = []byte{
0x0a, 0x1b, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6f, 0x70, 0x65,
0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6f,
0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x79, 0x77, 0x72, 0x61,
0x70, 0x70, 0x65, 0x72, 0x2f, 0x79, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x79, 0x67, 0x6f, 0x74, 0x2f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x79, 0x65, 0x78, 0x74, 0x2f, 0x79, 0x65, 0x78, 0x74, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3c, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x69, 0x0a, 0x06, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a,
0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0xbe, 0xf4, 0xc5, 0x28,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,
0x65, 0x73, 0x42, 0x0e, 0x82, 0x41, 0x0b, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,
0x65, 0x73, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_openconfig_openconfig_proto_rawDescOnce sync.Once
file_openconfig_openconfig_proto_rawDescData = file_openconfig_openconfig_proto_rawDesc
)
func file_openconfig_openconfig_proto_rawDescGZIP() []byte {
file_openconfig_openconfig_proto_rawDescOnce.Do(func() {
file_openconfig_openconfig_proto_rawDescData = protoimpl.X.CompressGZIP(file_openconfig_openconfig_proto_rawDescData)
})
return file_openconfig_openconfig_proto_rawDescData
}
var file_openconfig_openconfig_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_openconfig_openconfig_proto_goTypes = []interface{}{
(*Device)(nil), // 0: openconfig.Device
(*openconfig_interfaces.Interfaces)(nil), // 1: openconfig.openconfig_interfaces.Interfaces
}
var file_openconfig_openconfig_proto_depIdxs = []int32{
1, // 0: openconfig.Device.interfaces:type_name -> openconfig.openconfig_interfaces.Interfaces
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_openconfig_openconfig_proto_init() }
func file_openconfig_openconfig_proto_init() {
if File_openconfig_openconfig_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_openconfig_openconfig_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Device); 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_openconfig_openconfig_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_openconfig_openconfig_proto_goTypes,
DependencyIndexes: file_openconfig_openconfig_proto_depIdxs,
MessageInfos: file_openconfig_openconfig_proto_msgTypes,
}.Build()
File_openconfig_openconfig_proto = out.File
file_openconfig_openconfig_proto_rawDesc = nil
file_openconfig_openconfig_proto_goTypes = nil
file_openconfig_openconfig_proto_depIdxs = nil
}
// openconfig is generated by proto_generator as a protobuf
// representation of a YANG schema.
//
// Input schema modules:
// - ../yang-models/models/openconfig/release/models/interfaces/openconfig-interfaces.yang
// Include paths:
// - ../yang-models/models/...
syntax = "proto3";
package openconfig;
option go_package = "code.fbi.h-da.de/cocsn/gosdn";
import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto";
import "github.com/openconfig/ygot/proto/yext/yext.proto";
import "openconfig/openconfig_interfaces/openconfig_interfaces.proto";
message Device {
openconfig_interfaces.Interfaces interfaces = 85031486 [(yext.schemapath) = "/interfaces"];
}
// openconfig.openconfig_interfaces is generated by proto_generator as a protobuf
// representation of a YANG schema.
//
// Input schema modules:
// - ../yang-models/models/openconfig/release/models/interfaces/openconfig-interfaces.yang
// Include paths:
// - ../yang-models/models/...
syntax = "proto3";
package openconfig.openconfig_interfaces;
option go_package = "code.fbi.h-da.de/cocsn/gosdn";
import "github.com/openconfig/ygot/proto/ywrapper/ywrapper.proto";
import "github.com/openconfig/ygot/proto/yext/yext.proto";
import "openconfig/enums/enums.proto";
message Interfaces {
message Interface {
message Config {
ywrapper.StringValue description = 418535860 [(yext.schemapath) = "/interfaces/interface/config/description"];
ywrapper.BoolValue enabled = 37224301 [(yext.schemapath) = "/interfaces/interface/config/enabled"];
ywrapper.BoolValue loopback_mode = 253516347 [(yext.schemapath) = "/interfaces/interface/config/loopback-mode"];
ywrapper.UintValue mtu = 376210342 [(yext.schemapath) = "/interfaces/interface/config/mtu"];
ywrapper.StringValue name = 51804187 [(yext.schemapath) = "/interfaces/interface/config/name"];
openconfig.enums.IETFInterfacesInterfaceType type = 144596894 [(yext.schemapath) = "/interfaces/interface/config/type"];
}
message HoldTime {
message Config {
ywrapper.UintValue down = 171181656 [(yext.schemapath) = "/interfaces/interface/hold-time/config/down"];
ywrapper.UintValue up = 62026235 [(yext.schemapath) = "/interfaces/interface/hold-time/config/up"];
}
message State {
ywrapper.UintValue down = 167887721 [(yext.schemapath) = "/interfaces/interface/hold-time/state/down"];
ywrapper.UintValue up = 223847598 [(yext.schemapath) = "/interfaces/interface/hold-time/state/up"];
}
Config config = 316512729 [(yext.schemapath) = "/interfaces/interface/hold-time/config"];
State state = 483010990 [(yext.schemapath) = "/interfaces/interface/hold-time/state"];
}
message State {
message Counters {
ywrapper.UintValue carrier_transitions = 270803130 [(yext.schemapath) = "/interfaces/interface/state/counters/carrier-transitions"];
ywrapper.UintValue in_broadcast_pkts = 280201989 [(yext.schemapath) = "/interfaces/interface/state/counters/in-broadcast-pkts"];
ywrapper.UintValue in_discards = 11979514 [(yext.schemapath) = "/interfaces/interface/state/counters/in-discards"];
ywrapper.UintValue in_errors = 456697578 [(yext.schemapath) = "/interfaces/interface/state/counters/in-errors"];
ywrapper.UintValue in_fcs_errors = 501559027 [(yext.schemapath) = "/interfaces/interface/state/counters/in-fcs-errors"];
ywrapper.UintValue in_multicast_pkts = 113269128 [(yext.schemapath) = "/interfaces/interface/state/counters/in-multicast-pkts"];
ywrapper.UintValue in_octets = 333138891 [(yext.schemapath) = "/interfaces/interface/state/counters/in-octets"];
ywrapper.UintValue in_pkts = 412843491 [(yext.schemapath) = "/interfaces/interface/state/counters/in-pkts"];
ywrapper.UintValue in_unicast_pkts = 272792307 [(yext.schemapath) = "/interfaces/interface/state/counters/in-unicast-pkts"];
ywrapper.UintValue in_unknown_protos = 241475497 [(yext.schemapath) = "/interfaces/interface/state/counters/in-unknown-protos"];
ywrapper.UintValue last_clear = 186014919 [(yext.schemapath) = "/interfaces/interface/state/counters/last-clear"];
ywrapper.UintValue out_broadcast_pkts = 338589668 [(yext.schemapath) = "/interfaces/interface/state/counters/out-broadcast-pkts"];
ywrapper.UintValue out_discards = 254055111 [(yext.schemapath) = "/interfaces/interface/state/counters/out-discards"];
ywrapper.UintValue out_errors = 471103047 [(yext.schemapath) = "/interfaces/interface/state/counters/out-errors"];
ywrapper.UintValue out_multicast_pkts = 457840757 [(yext.schemapath) = "/interfaces/interface/state/counters/out-multicast-pkts"];
ywrapper.UintValue out_octets = 201005514 [(yext.schemapath) = "/interfaces/interface/state/counters/out-octets"];
ywrapper.UintValue out_pkts = 437582090 [(yext.schemapath) = "/interfaces/interface/state/counters/out-pkts"];
ywrapper.UintValue out_unicast_pkts = 36542246 [(yext.schemapath) = "/interfaces/interface/state/counters/out-unicast-pkts"];
}
enum AdminStatus {
ADMINSTATUS_UNSET = 0;
ADMINSTATUS_UP = 1 [(yext.yang_name) = "UP"];
ADMINSTATUS_DOWN = 2 [(yext.yang_name) = "DOWN"];
ADMINSTATUS_TESTING = 3 [(yext.yang_name) = "TESTING"];
}
enum OperStatus {
OPERSTATUS_UNSET = 0;
OPERSTATUS_UP = 2 [(yext.yang_name) = "UP"];
OPERSTATUS_DOWN = 3 [(yext.yang_name) = "DOWN"];
OPERSTATUS_TESTING = 4 [(yext.yang_name) = "TESTING"];
OPERSTATUS_UNKNOWN = 5 [(yext.yang_name) = "UNKNOWN"];
OPERSTATUS_DORMANT = 6 [(yext.yang_name) = "DORMANT"];
OPERSTATUS_NOT_PRESENT = 7 [(yext.yang_name) = "NOT_PRESENT"];
OPERSTATUS_LOWER_LAYER_DOWN = 8 [(yext.yang_name) = "LOWER_LAYER_DOWN"];
}
AdminStatus admin_status = 474494763 [(yext.schemapath) = "/interfaces/interface/state/admin-status"];
Counters counters = 83645964 [(yext.schemapath) = "/interfaces/interface/state/counters"];
ywrapper.StringValue description = 389435287 [(yext.schemapath) = "/interfaces/interface/state/description"];
ywrapper.BoolValue enabled = 330927518 [(yext.schemapath) = "/interfaces/interface/state/enabled"];
ywrapper.UintValue ifindex = 116108202 [(yext.schemapath) = "/interfaces/interface/state/ifindex"];
ywrapper.UintValue last_change = 127348880 [(yext.schemapath) = "/interfaces/interface/state/last-change"];
ywrapper.BoolValue logical = 440460216 [(yext.schemapath) = "/interfaces/interface/state/logical"];
ywrapper.BoolValue loopback_mode = 372935512 [(yext.schemapath) = "/interfaces/interface/state/loopback-mode"];
ywrapper.UintValue mtu = 96390485 [(yext.schemapath) = "/interfaces/interface/state/mtu"];
ywrapper.StringValue name = 503495278 [(yext.schemapath) = "/interfaces/interface/state/name"];
OperStatus oper_status = 470394226 [(yext.schemapath) = "/interfaces/interface/state/oper-status"];
openconfig.enums.IETFInterfacesInterfaceType type = 358148579 [(yext.schemapath) = "/interfaces/interface/state/type"];
}
message Subinterfaces {
message Subinterface {
message Config {
ywrapper.StringValue description = 280671199 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/config/description"];
ywrapper.BoolValue enabled = 297236390 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/config/enabled"];
ywrapper.UintValue index = 279269781 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/config/index"];
}
message State {
message Counters {
ywrapper.UintValue carrier_transitions = 141120277 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/carrier-transitions"];
ywrapper.UintValue in_broadcast_pkts = 120244022 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/in-broadcast-pkts"];
ywrapper.UintValue in_discards = 307490461 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/in-discards"];
ywrapper.UintValue in_errors = 319720873 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/in-errors"];
ywrapper.UintValue in_fcs_errors = 169858424 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/in-fcs-errors"];
ywrapper.UintValue in_multicast_pkts = 320618859 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/in-multicast-pkts"];
ywrapper.UintValue in_octets = 530205868 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/in-octets"];
ywrapper.UintValue in_pkts = 441153352 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/in-pkts"];
ywrapper.UintValue in_unicast_pkts = 177838880 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/in-unicast-pkts"];
ywrapper.UintValue in_unknown_protos = 146059814 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/in-unknown-protos"];
ywrapper.UintValue last_clear = 518046966 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/last-clear"];
ywrapper.UintValue out_broadcast_pkts = 501221245 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/out-broadcast-pkts"];
ywrapper.UintValue out_discards = 159539762 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/out-discards"];
ywrapper.UintValue out_errors = 466636898 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/out-errors"];
ywrapper.UintValue out_multicast_pkts = 326155776 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/out-multicast-pkts"];
ywrapper.UintValue out_octets = 50579235 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/out-octets"];
ywrapper.UintValue out_pkts = 29497115 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/out-pkts"];
ywrapper.UintValue out_unicast_pkts = 297910971 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters/out-unicast-pkts"];
}
enum AdminStatus {
ADMINSTATUS_UNSET = 0;
ADMINSTATUS_UP = 1 [(yext.yang_name) = "UP"];
ADMINSTATUS_DOWN = 2 [(yext.yang_name) = "DOWN"];
ADMINSTATUS_TESTING = 3 [(yext.yang_name) = "TESTING"];
}
enum OperStatus {
OPERSTATUS_UNSET = 0;
OPERSTATUS_UP = 2 [(yext.yang_name) = "UP"];
OPERSTATUS_DOWN = 3 [(yext.yang_name) = "DOWN"];
OPERSTATUS_TESTING = 4 [(yext.yang_name) = "TESTING"];
OPERSTATUS_UNKNOWN = 5 [(yext.yang_name) = "UNKNOWN"];
OPERSTATUS_DORMANT = 6 [(yext.yang_name) = "DORMANT"];
OPERSTATUS_NOT_PRESENT = 7 [(yext.yang_name) = "NOT_PRESENT"];
OPERSTATUS_LOWER_LAYER_DOWN = 8 [(yext.yang_name) = "LOWER_LAYER_DOWN"];
}
AdminStatus admin_status = 250658952 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/admin-status"];
Counters counters = 483442783 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/counters"];
ywrapper.StringValue description = 49943526 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/description"];
ywrapper.BoolValue enabled = 468513843 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/enabled"];
ywrapper.UintValue ifindex = 511987815 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/ifindex"];
ywrapper.UintValue index = 80745756 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/index"];
ywrapper.UintValue last_change = 29904521 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/last-change"];
ywrapper.BoolValue logical = 294124401 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/logical"];
ywrapper.StringValue name = 279346681 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/name"];
OperStatus oper_status = 401969247 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state/oper-status"];
}
Config config = 175001476 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/config"];
State state = 501974173 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/state"];
}
message SubinterfaceKey {
uint64 index = 1 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface/index"];
Subinterface subinterface = 2;
}
repeated SubinterfaceKey subinterface = 464802819 [(yext.schemapath) = "/interfaces/interface/subinterfaces/subinterface"];
}
Config config = 334174827 [(yext.schemapath) = "/interfaces/interface/config"];
HoldTime hold_time = 175931092 [(yext.schemapath) = "/interfaces/interface/hold-time"];
State state = 387556140 [(yext.schemapath) = "/interfaces/interface/state"];
Subinterfaces subinterfaces = 327798165 [(yext.schemapath) = "/interfaces/interface/subinterfaces"];
}
message InterfaceKey {
string name = 1 [(yext.schemapath) = "/interfaces/interface/name"];
Interface interface = 2;
}
repeated InterfaceKey interface = 422482938 [(yext.schemapath) = "/interfaces/interface"];
}
...@@ -10,17 +10,17 @@ require ( ...@@ -10,17 +10,17 @@ require (
github.com/google/gnxi v0.0.0-20201221102247-c26672548161 github.com/google/gnxi v0.0.0-20201221102247-c26672548161
github.com/google/uuid v1.1.2 github.com/google/uuid v1.1.2
github.com/neo4j/neo4j-go-driver v1.8.3 github.com/neo4j/neo4j-go-driver v1.8.3
github.com/openconfig/gnmi v0.0.0-20200617225440-d2b4e6a45802 github.com/openconfig/gnmi v0.0.0-20210428141518-ae4d850000ab
github.com/openconfig/goyang v0.2.3 github.com/openconfig/goyang v0.2.4
github.com/openconfig/ygot v0.10.4 github.com/openconfig/ygot v0.10.5
github.com/sirupsen/logrus v1.8.0 github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.1.1 github.com/spf13/cobra v1.1.3
github.com/spf13/viper v1.7.1 github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.6.1 github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20201216054612-986b41b23924 golang.org/x/net v0.0.0-20210428140749-89ef3d95e781
google.golang.org/grpc v1.34.0 google.golang.org/grpc v1.37.0
google.golang.org/protobuf v1.26.0 google.golang.org/protobuf v1.26.0
k8s.io/api v0.20.5 k8s.io/api v0.21.0
k8s.io/apimachinery v0.20.5 k8s.io/apimachinery v0.21.0
k8s.io/client-go v0.20.5 k8s.io/client-go v0.21.0
) )
This diff is collapsed.
...@@ -113,6 +113,11 @@ func (g *Gnmi) Set(ctx context.Context, args ...interface{}) error { ...@@ -113,6 +113,11 @@ func (g *Gnmi) Set(ctx context.Context, args ...interface{}) error {
v: o, v: o,
t: reflect.TypeOf("placeholder"), t: reflect.TypeOf("placeholder"),
} }
} else if attrs == nil || len(attrs) == 0 {
return &ErrInvalidParameters{
f: "gnmi.Set()",
r: "no parameters provided",
}
} }
opts = append(opts, &gnmi.Operation{ opts = append(opts, &gnmi.Operation{
// Hardcoded TransportUpdate until multiple operations are supported // Hardcoded TransportUpdate until multiple operations are supported
......
...@@ -15,18 +15,18 @@ func testSetupHTTP() { ...@@ -15,18 +15,18 @@ func testSetupHTTP() {
sbi = &OpenConfig{id: defaultSbiID} sbi = &OpenConfig{id: defaultSbiID}
sbi.Schema() sbi.Schema()
var err error var err error
pnd, err = NewPND("test", "test pnd", defaultPndID, sbi) httpTestPND, err = NewPND("test", "test pnd", defaultPndID, sbi)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
d = mockDevice() httpTestDevice = mockDevice()
tr := d.Transport.(*mocks.Transport) tr := httpTestDevice.Transport.(*mocks.Transport)
mockError := errors.New("mock error") mockError := errors.New("mock error")
tr.On("Get", mockContext, "/system/config/hostname").Return(mock.Anything, nil) tr.On("Get", mockContext, "/system/config/hostname").Return(mock.Anything, nil)
tr.On("Get", mockContext, "error").Return(mock.Anything, mockError) tr.On("Get", mockContext, "error").Return(mock.Anything, mockError)
tr.On("Set", mockContext, mock.Anything).Return(mock.Anything, nil) tr.On("Set", mockContext, mock.Anything).Return(mock.Anything, nil)
tr.On("ProcessResponse", mock.Anything, mock.Anything, mock.Anything).Return(nil) tr.On("ProcessResponse", mock.Anything, mock.Anything, mock.Anything).Return(nil)
if err := pnd.AddDevice(&d); err != nil { if err := httpTestPND.AddDevice(&httpTestDevice); err != nil {
log.Fatal(err) log.Fatal(err)
} }
args = "&uuid=" + mdid.String() + "&pnd=" + defaultPndID.String() + "&sbi=" + defaultSbiID.String() args = "&uuid=" + mdid.String() + "&pnd=" + defaultPndID.String() + "&sbi=" + defaultSbiID.String()
...@@ -35,7 +35,7 @@ func testSetupHTTP() { ...@@ -35,7 +35,7 @@ func testSetupHTTP() {
if err := c.sbic.add(sbi); err != nil { if err := c.sbic.add(sbi); err != nil {
log.Fatal(err) log.Fatal(err)
} }
if err := c.pndc.add(pnd); err != nil { if err := c.pndc.add(httpTestPND); err != nil {
log.Fatal(err) log.Fatal(err)
} }
} }
...@@ -200,9 +200,9 @@ func Test_httpApi(t *testing.T) { ...@@ -200,9 +200,9 @@ func Test_httpApi(t *testing.T) {
t.Errorf("httpApi() got: %v, want %v", got.StatusCode, tt.want.StatusCode) t.Errorf("httpApi() got: %v, want %v", got.StatusCode, tt.want.StatusCode)
} }
if tt.name == "add-device" { if tt.name == "add-device" {
for k := range pnd.(*pndImplementation).devices.store { for k := range httpTestPND.(*pndImplementation).devices.store {
if k != mdid { if k != mdid {
if err := pnd.RemoveDevice(k); err != nil { if err := httpTestPND.RemoveDevice(k); err != nil {
t.Error(err) t.Error(err)
return return
} }
......
...@@ -29,10 +29,10 @@ var altIid uuid.UUID ...@@ -29,10 +29,10 @@ var altIid uuid.UUID
var cuid uuid.UUID var cuid uuid.UUID
var sbi SouthboundInterface var sbi SouthboundInterface
var pnd PrincipalNetworkDomain var httpTestPND PrincipalNetworkDomain
var gnmiMessages map[string]pb.Message var gnmiMessages map[string]pb.Message
var gnmiConfig *gnmi.Config var gnmiConfig *gnmi.Config
var d Device var httpTestDevice Device
var startGnmiTarget chan string var startGnmiTarget chan string
var stopGnmiTarget chan bool var stopGnmiTarget chan bool
......
...@@ -93,7 +93,9 @@ func (pnd *pndImplementation) Commit(u uuid.UUID) error { ...@@ -93,7 +93,9 @@ func (pnd *pndImplementation) Commit(u uuid.UUID) error {
for { for {
select { select {
case err := <-pnd.errChans[u]: case err := <-pnd.errChans[u]:
if err != nil {
handleRollbackError(change.ID(), err) handleRollbackError(change.ID(), err)
}
case <-change.Done: case <-change.Done:
} }
} }
...@@ -115,7 +117,6 @@ func (pnd *pndImplementation) Confirm(u uuid.UUID) error { ...@@ -115,7 +117,6 @@ func (pnd *pndImplementation) Confirm(u uuid.UUID) error {
if err := pnd.confirmedChanges.add(change); err != nil { if err := pnd.confirmedChanges.add(change); err != nil {
return err return err
} }
close(pnd.errChans[u])
return pnd.committedChanges.delete(u) return pnd.committedChanges.delete(u)
} }
...@@ -322,7 +323,7 @@ func (pnd *pndImplementation) ChangeOND(uuid uuid.UUID, operation interface{}, p ...@@ -322,7 +323,7 @@ func (pnd *pndImplementation) ChangeOND(uuid uuid.UUID, operation interface{}, p
return err return err
} }
if len(value) > 1 { if operation != TransportDelete && len(value) != 1 {
return &ErrInvalidParameters{ return &ErrInvalidParameters{
f: pnd.ChangeOND, f: pnd.ChangeOND,
r: value, r: value,
......
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"code.fbi.h-da.de/cocsn/yang-models/generated/openconfig" "code.fbi.h-da.de/cocsn/yang-models/generated/openconfig"
"errors" "errors"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/openconfig/ygot/ygot"
"github.com/stretchr/testify/mock" "github.com/stretchr/testify/mock"
"reflect" "reflect"
"testing" "testing"
...@@ -603,6 +604,26 @@ func Test_pndImplementation_ChangeOND(t *testing.T) { ...@@ -603,6 +604,26 @@ func Test_pndImplementation_ChangeOND(t *testing.T) {
}, },
wantErr: true, wantErr: true,
}, },
{
name: "invalid arg count - update, no args",
fields: fields{},
args: args{
uuid: mdid,
operation: TransportUpdate,
path: "/system/config/hostname",
},
wantErr: true,
},
{
name: "invalid arg count - replace, no args",
fields: fields{},
args: args{
uuid: mdid,
operation: TransportUpdate,
path: "/system/config/hostname",
},
wantErr: true,
},
{ {
name: "device not found", name: "device not found",
fields: fields{}, fields: fields{},
...@@ -633,3 +654,92 @@ func Test_pndImplementation_ChangeOND(t *testing.T) { ...@@ -633,3 +654,92 @@ func Test_pndImplementation_ChangeOND(t *testing.T) {
}) })
} }
} }
func Test_pndImplementation_GetDevice(t *testing.T) {
p := newPnd()
d, err := NewDevice(sbi, &GnmiTransportOptions{})
if err != nil {
t.Error(err)
return
}
if err = p.addDevice(d); err != nil {
t.Error(err)
return
}
type args struct {
uuid uuid.UUID
}
tests := []struct {
name string
args args
want ygot.GoStruct
wantErr bool
}{
{
name: "default",
args: args{uuid: d.ID()},
want: sbi.Schema().Root,
wantErr: false,
},
{
name: "device not found",
args: args{uuid: mdid},
want: nil,
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := p.GetDevice(tt.args.uuid)
if (err != nil) != tt.wantErr {
t.Errorf("GetDevice() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("GetDevice() got = %v, want %v", got, tt.want)
}
})
}
}
func Test_pndImplementation_Confirm(t *testing.T) {
tests := []struct {
name string
wantErr bool
}{
{
name: "default",
wantErr: false,
},
{
name: "uncommitted",
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
pnd := newPnd()
d := mockDevice()
tr := d.Transport.(*mocks.Transport)
tr.On("Set", mockContext, mock.Anything, mock.Anything).Return(nil)
if err := pnd.addDevice(&d); err != nil {
t.Error(err)
return
}
if err := pnd.ChangeOND(d.ID(), TransportUpdate, "system/config/hostname", "ceos3000"); err != nil {
t.Error(err)
return
}
u := pnd.Pending()[0]
if tt.name != "uncommitted" {
if err := pnd.Commit(u); (err != nil) != tt.wantErr {
t.Errorf("Confirm() error = %v, wantErr %v", err, tt.wantErr)
return
}
}
if err := pnd.Confirm(u); (err != nil) != tt.wantErr {
t.Errorf("Confirm() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
...@@ -16,7 +16,7 @@ import ( ...@@ -16,7 +16,7 @@ import (
const unreachable = "203.0.113.10:6030" const unreachable = "203.0.113.10:6030"
var testAddress = "141.100.67.238:6030" var testAddress = "141.100.70.171:6030"
var testAPIEndpoint = "http://gosdn-latest.apps.ocp.fbi.h-da.de/api" var testAPIEndpoint = "http://gosdn-latest.apps.ocp.fbi.h-da.de/api"
var testUsername = "admin" var testUsername = "admin"
var testPassword = "arista" var testPassword = "arista"
...@@ -85,7 +85,7 @@ func testSetupIntegration() { ...@@ -85,7 +85,7 @@ func testSetupIntegration() {
} }
} }
func TestCliIntegration(t *testing.T) { func TestCmdIntegration(t *testing.T) {
if testing.Short() { if testing.Short() {
t.Skip("skipping integration test") t.Skip("skipping integration test")
} }
...@@ -153,7 +153,7 @@ func TestCliIntegration(t *testing.T) { ...@@ -153,7 +153,7 @@ func TestCliIntegration(t *testing.T) {
hostname := guuid.New().String() hostname := guuid.New().String()
if err := cli.HTTPGet( if err := cli.HTTPGet(
testAPIEndpoint, testAPIEndpoint,
"set", "update",
"address="+testAddress, "address="+testAddress,
"uuid="+did, "uuid="+did,
"sbi="+cliSbi, "sbi="+cliSbi,
......
...@@ -41,7 +41,7 @@ func TestGnmi_SetIntegration(t *testing.T) { ...@@ -41,7 +41,7 @@ func TestGnmi_SetIntegration(t *testing.T) {
}, },
args: args{ args: args{
ctx: context.Background(), ctx: context.Background(),
params: []string{}, params: []string{"/system/config/hostname", "ceos3000"},
}, },
wantErr: true, wantErr: true,
}, },
...@@ -54,6 +54,15 @@ func TestGnmi_SetIntegration(t *testing.T) { ...@@ -54,6 +54,15 @@ func TestGnmi_SetIntegration(t *testing.T) {
}, },
wantErr: false, wantErr: false,
}, },
{
name: "invalid update",
fields: fields{opt: opt},
args: args{
ctx: context.Background(),
params: nil,
},
wantErr: true,
},
} }
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment