• Stars
    star
    211
  • Rank 186,867 (Top 4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

YANG parser and compiler to produce Go language objects

Go Coverage Status

Current support for goyang is for the latest 3 Go releases.

goyang

YANG parser and compiler for Go programs.

The yang package (pkg/yang) is used to convert a YANG schema into either an in memory abstract syntax trees (ast) or more fully resolved, in memory, "Entry" trees. An Entry tree consists only of Entry structures and has had augmentation, imports, and includes all applied.

goyang is a sample program that uses the yang (pkg/yang) package.

goyang uses the yang package to create an in-memory tree representation of schemas defined in YANG and then dumps out the contents in several forms. The forms include:

  • tree - a simple tree representation
  • types - list understood types extracted from the schema

The yang package, and the goyang program, are not complete and are a work in progress.

For more complex output types, such as Go structs, and protobuf messages please use the openconfig/ygot package, which uses this package as its backend.

Getting started

To build goyang, ensure you have go language tools installed (available at golang.org) and that the GOPATH environment variable is set to your Go workspace.

  1. go get github.com/openconfig/goyang

    • This will download goyang code and dependencies into the src subdirectory in your workspace.
  2. cd <workspace>/src/github.com/openconfig/goyang

  3. go build

    • This will build the goyang binary and place it in the bin subdirectory in your workspace.

Contributing to goyang

goyang is still a work-in-progress and we welcome contributions. Please see the CONTRIBUTING file for information about how to contribute to the codebase.

Disclaimer

This is not an official Google product.

More Repositories

1

public

Repository for publishing OpenConfig models, documentation, and other material for the community.
Shell
830
star
2

gnmi

gRPC Network Management Interface
Go
396
star
3

ygot

A YANG-centric Go toolkit - Go/Protobuf Code Generation; Validation; Marshaling/Unmarshaling
Go
251
star
4

kne

Go
214
star
5

gnmic

gNMIc is a gNMI CLI client and collector
Go
177
star
6

reference

This repository contains reference implementations, specifications and tooling related to OpenConfig-based network management.
Python
146
star
7

gnoi

gRPC Network Operations Interface (gNOI) defines a set of gRPC-based microservices for executing operational commands on network devices.
Starlark
141
star
8

gnmi-gateway

A modular, distributed, and highly available service for modern network telemetry via OpenConfig and gNMI
Go
120
star
9

grpctunnel

A TCP-over-gRPC Tunnel
Go
60
star
10

gribi

A gRPC Interface to a Network Element RIB.
Shell
49
star
11

featureprofiles

Feature Profiles are groups of OpenConfig paths and tests which verify their behavior
Go
49
star
12

ondatra

Go
38
star
13

oc-pyang

OpenConfig plugins for the pyang validator
Python
31
star
14

lemming

An OpenConfig reference device implementation
Go
30
star
15

bootz

OpenConfig network device bootstrap APIs and services
Go
16
star
16

gnmitest

Test framework for gNMI
Go
14
star
17

hercules

Published data models for the Hercules vendor-agnostic SDN switch
Go
12
star
18

gnsi

HTML
12
star
19

gribigo

Go implementation of gRIBI.
Go
11
star
20

gnpsi

C++
11
star
21

attestz

API for TPM attestation and enrollment for certificates
Go
8
star
22

ygnmi

A Go gNMI client library based on ygot-generated code
Go
7
star
23

lsdbparse

An IS-IS LSP to OpenConfig Schema Library
Go
4
star
24

magna

Go
4
star
25

containerz

containerz is a reference implementation for the containerz gNOI service.
Go
2
star
26

ovgs

API for accessing ownership voucher artifacts for bootstrapping network devices
Shell
2
star
27

catalog-server

Go
1
star
28

replayer

A replay tool for g* (gNMI, gRIBI, gNOI... events).
Go
1
star
29

models-ci

Continuous integration for OpenConfig models.
Go
1
star