Skip to content
Snippets Groups Projects
Commit 8dc01bac authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

Merge branch 'develop' into 'master'

Develop

See merge request cocsn/gosdn!90
parents f09ee28f ab88d73c
No related branches found
No related tags found
1 merge request!90Develop
Pipeline #67513 passed
Showing
with 6322 additions and 153 deletions
author: da/net research group <danet.fbi.h-da.de>
year: 2021
license: BSD
......@@ -12,4 +12,6 @@ documentation/design/*.pdf
.idea/modules.xml
.idea/vcs.xml
.idea/workspace.xml
restconf/bin/bin
\ No newline at end of file
restconf/bin/bin
test/.terraform.local/
configs/gosdn.toml
\ No newline at end of file
......@@ -3,143 +3,22 @@ variables:
DOCKER_IMAGE_SHA: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
stages:
- .pre
- test
- build
- deploy
- documentation
- apply
- integration-test
- .post
before_script:
- git config --global url."https://$GO_MODULES_USER:$GO_MODULES_ACCESS_TOKEN@code.fbi.h-da.de".insteadOf "https://code.fbi.h-da.de"
code-quality-master:
image: golangci/golangci-lint:latest-alpine
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
- if: $CI_DEFAULT_BRANCH
script:
# writes golangci-lint output to gl-code-quality-report.json
- golangci-lint run --config .ci/.golangci-master.yml --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
code-quality:
image: golangci/golangci-lint:latest-alpine
stage: test
allow_failure: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
script:
# writes golangci-lint output to gl-code-quality-report.json
- golangci-lint run --config .ci/.golangci.yml --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
documentation:pdf:
default:
before_script:
- pwd
image:
name: pandoc/latex
entrypoint:
- ''
stage: documentation
rules:
- changes:
- documentation/design/*.md
script:
- cd documentation/design
- pandoc --filter pandoc-citeproc --bibliography=bibliography.bib --csl=acm-sig-proceedings.csl
--variable papersize=a4paper -s *.md -o documentation.pdf
artifacts:
paths:
- documentation/design/documentation.pdf
.mdbook_common: &rust
image:
name: $CI_REGISTRY/danet/internetworking/mdbook:latest
entrypoint:
- ''
stage: documentation
script:
- mdbook build documentation --dest-dir public
documentation:static:
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
artifacts:
paths:
- public
expire_in: 1 week
<<: *rust
documentation:test:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
<<: *rust
build:docker:
stage: build
tags:
- baremetal
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG
script:
- >
docker build \
--build-arg GITLAB_USER=$GO_MODULES_USER \
--build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN \
-t $DOCKER_IMAGE_SHA .
.deploy: &deploy
stage: deploy
needs: ["build:docker"]
tags:
- baremetal
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker tag $DOCKER_IMAGE_SHA $TAG
- docker push $TAG
- curl --insecure -X POST $HOOK
deploy:develop:
variables:
TAG: $CI_REGISTRY_IMAGE:develop
HOOK: $PORTAINER_HOOK_DEVELOP
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
<<: *deploy
deploy:tagged:
variables:
TAG: $CI_REGISTRY_IMAGE:CI_COMMIT_TAG
rules:
- if: $CI_COMMIT_TAG
<<: *deploy
deploy:latest:
variables:
TAG: $CI_REGISTRY_IMAGE:latest
HOOK: $PORTAINER_HOOK_LATEST
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
<<: *deploy
sast:
variables:
SAST_ANALYZER_IMAGE_TAG: '2'
SAST_EXCLUDED_PATHS: spec, test, tests, tmp
SEARCH_MAX_DEPTH: '4'
- git config --global url."https://$GO_MODULES_USER:$GO_MODULES_ACCESS_TOKEN@code.fbi.h-da.de".insteadOf "https://code.fbi.h-da.de"
include:
- template: Security/SAST.gitlab-ci.yml
- template: Dependency-Scanning.gitlab-ci.yml
- template: Security/License-Scanning.gitlab-ci.yml
- local: '/build/ci/.code-quality-ci.yml'
- local: '/build/ci/.documentation-ci.yml'
- local: '/build/ci/.security-and-compliance-ci.yml'
- local: '/build/ci/.build-container.yml'
- local: '/build/ci/.test.yml'
- local: '/build/ci/.terraform-ci.yml'
\ No newline at end of file
# goSDN Architecture
This document describes the the high-level architecture of the goSDN project. All contributors should familiarize themselves with it. To avoid too much divergence from the changing code this document does focus on high-level concepts instead of implementation details.
## Bird's Eye View
[<img src="documentation/architecture.png" style="height:50%; width:50%" > ](documentation/architecture.png)
On the highest level goSDn provides a gRPC northbound-interface and two types of southbound-interfaces: RESTCONF and gRPC-based. The northbound interface allows the interaction with a running goSDN daemon and may allow the stacking of multiple controllers in the future. The southbound interface (SBI) capabilities are split in `nucleus` models and plugins. The supported `nucleus` models are OpenConfig yang [openconfig-yang](https://github.com/openconfig/yang) and TAPI. Third party models and more SBI-transports can be attached using the go plugin architecture.
The internal data representation uses [ygot](https://github.com/openconfig/ygot) generated go-structs.
It is important to note that these go-structs are generated from yang models and thus are not generic data structures. This means that the `nucleus` code is organized in silos, i.e., one particular southbound-interface is visible in the `nucleus`, as the internal data representation depend on the used yang modes in the southbound-interface.
## Code Map
This section briefly describes important directories and data structures. It also introduces important API calls to relevant libraries.
It also mentions **architecture invariants** and **API boundaries**
### `api`
API specification for gRPC and protobuf definitions.
**Architecture invariant:** To import gRPC related protobuf definitions use `pb` as an import prefix. For gNMI related protobuf definitions use `gpb`
### `forks`
Forks of `google/gnxi/gnmi` and `arista/goarista/gnmi` for gNMI server and client respectively. Subject of change once we converge to own clients and servers.
### `nucleus/principalNetworkDomain`
`nucleus` is the core package of goSDN. The main data structure is the `principalNetworkDomain` (PND). It reflects one administrative entity, i.e., as set of connected network devices, and is the source of truth for network state and configuration. A PND is SBI agnostic and supports multiple SBI implementations simultaneously.
**API boundary:** The PND' is the only way to interact with an `orchestratedNetworkingDevice`
### `nucleus/device`
This is the representation of an `orchestratedNetworkingDevice` (OND). An `orchestratedNetworkingDevice` is the network device that is directly managed by goSDN. It holds a reference to the device's `transport` and `southboundInterface` implementation. It contains a fakeroot device based on its attached SBI.
**Architecture invariant:** The device is does not provide any functionality to upper API layers.
### `nucleus/southbound`
Implementation of SBI specifics. Provides SBI models to other callers and SBI specific function deviations.
**Architecture invariant:** Only SBIs defined by a YANG model will be supported by goSDN.
### `nucleus/transport` `nucleus/gnmi_transport` `nucleus/restconf_transport`
Transport between goSDN and ONDs. Current core implementations are gNMI and RESTCONF. Additionally to implementing the transports the packages also provide a mapping from general purpose goSDN API calls to diverging SBI API calls.
For example `gNMI::Subscribe` and `RESTCONF::Push` are mapped to `gosdn::Subscribe`.
The `gnmi_transport` implementation uses `ytypes.SetNode` to write to a device struct.
FROM golang:1.15-alpine AS builder
FROM golang:1.15-buster AS builder
ARG GITLAB_USER
ARG GITLAB_TOKEN
ARG BUILDARGS
WORKDIR /src/gosdn
COPY . .
RUN apk add git
RUN apt-get update && apt-get install -y git
RUN git config --global url."https://$GITLAB_USER:$GITLAB_TOKEN@code.fbi.h-da.de".insteadOf "https://code.fbi.h-da.de"
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build
RUN GOOS=linux go build $BUILDARGS ./cmd/gosdn
FROM alpine:latest
FROM debian:latest
EXPOSE 8080
EXPOSE 55055
COPY --from=builder /src/gosdn/gosdn .
COPY --from=builder /src/gosdn/gosdn.toml .
COPY --from=builder /src/gosdn/clients.toml .
COPY --from=builder /src/gosdn/configs ./configs
ENTRYPOINT [ "./gosdn" ]
CMD [""]
BSD 3-Clause License
Copyright (c) 2020, da/net
Copyright © 2021 da/net research group <danet.fbi.h-da.de>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
......
# GoSDN
### CI Status Master
[![coverage report](https://code.fbi.h-da.de/cocsn/gosdn/badges/master/coverage.svg)](https://code.fbi.h-da.de/cocsn/gosdn/-/commits/master)
[![pipeline status](https://code.fbi.h-da.de/cocsn/gosdn/badges/master/pipeline.svg)](https://code.fbi.h-da.de/cocsn/gosdn/-/commits/master)
### CI Status Develop
[![coverage report](https://code.fbi.h-da.de/cocsn/gosdn/badges/develop/coverage.svg)](https://code.fbi.h-da.de/cocsn/gosdn/-/commits/develop)
[![pipeline status](https://code.fbi.h-da.de/cocsn/gosdn/badges/develop/pipeline.svg)](https://code.fbi.h-da.de/cocsn/gosdn/-/commits/develop)
The GIT repo for the GoSDN design and implementation. GoSDN is intended to be controller for Software Defined Networks (SDN) that follows a modern software architecture design and a well-documented implementation in the go language.
## Generate Code Stubs
......@@ -15,4 +25,4 @@ gosdn
## Documentation
The latest documentatiion generated on the master branch can be downloaded [here](https://code.fbi.h-da.de/cocsn/gosdn/-/jobs).
\ No newline at end of file
The latest documentatiion generated on the master branch can be downloaded [here](https://code.fbi.h-da.de/cocsn/gosdn/-/jobs).
// 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"];
}
This diff is collapsed.
// 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"];
}
services:
- docker:19.03.12-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_IMAGE_SHA: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
.build: &build
before_script:
- echo "override global before script"
image: docker:19.03.12
stage: build
tags:
- dind
script:
- >
docker build \
--build-arg GITLAB_USER=$GO_MODULES_USER \
--build-arg GITLAB_TOKEN=$GO_MODULES_ACCESS_TOKEN \
--build-arg BUILDARGS=$BUILDARGS \
-t $DOCKER_IMAGE_SHA .
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker tag $DOCKER_IMAGE_SHA $TAG
- docker push $TAG
build:develop:
variables:
TAG: $CI_REGISTRY_IMAGE:develop
BUILDARGS: -race
rules:
- if: $CI_COMMIT_BRANCH == "develop"
<<: *build
build:merge-request:
variables:
TAG: $CI_REGISTRY_IMAGE:merge-request
BUILDARGS: -race
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
<<: *build
build:latest:
variables:
TAG: $CI_REGISTRY_IMAGE:latest
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
<<: *build
\ No newline at end of file
code-quality-master:
image: golangci/golangci-lint:latest-alpine
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
# writes golangci-lint output to gl-code-quality-report.json
- golangci-lint run --config build/ci/.golangci-config/.golangci-master.yml --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
code-quality:
image: golangci/golangci-lint:latest-alpine
stage: test
allow_failure: true
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
script:
# writes golangci-lint output to gl-code-quality-report.json
- golangci-lint run --config build/ci/.golangci-config/.golangci.yml --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
documentation:pdf:
before_script:
- pwd
image:
name: pandoc/latex
entrypoint:
- ''
stage: deploy
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
changes:
- documentation/design/*.md
script:
- cd documentation/design
- pandoc --citeproc --bibliography=bibliography.bib --csl=acm-sig-proceedings.csl
--variable papersize=a4paper -s *.md -o documentation.pdf
artifacts:
paths:
- documentation.pdf
.mdbook_common: &rust
image:
name: $CI_REGISTRY/danet/internetworking/mdbook:latest
entrypoint:
- ''
stage: deploy
script:
- mdbook build documentation --dest-dir public
documentation:website:
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
changes:
- documentation/design/*.md
artifacts:
paths:
- public
expire_in: 1 week
<<: *rust
\ No newline at end of file
run:
timeout: 5m
issues-exit-code: 1
# directories to be ignored by linters
skip-dirs:
- forks
- test
skip-dirs-default: true
skip-files:
- nucleus/http.go
# output settings -> code-climate for GitLab
output:
format: code-climate
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
path-prefix: ""
# custom settings for linters
linters-settings:
gocyclo:
min-complexity: 15
golint:
min-confidence: 0.8
# enable the specific needed linters
linters:
disable-all: true
enable:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment