Documentation
¶
Overview ¶
Package util contain utility functions for doing YANG model validation.
Index ¶
Constants ¶
View Source
const ( // PYANG_MSG_TEMPLATE_STRING sets up an output template for pyang using // its commandline option --msg-template. PYANG_MSG_TEMPLATE_STRING = `PYANG_MSG_TEMPLATE='messages:{{path:"{file}" line:{line} code:"{code}" type:"{type}" level:{level} message:'"'{msg}'}}"` )
Variables ¶
This section is empty.
Functions ¶
func ParsePyangTextprotoOutput ¶
func ParsePyangTextprotoOutput(textprotoOut string) (*pb.PyangOutput, error)
ParsePyangTextprotoOutput parses textproto-formatted pyang output into a proto message. It assumes that the input string has format defined by PYANG_MSG_TEMPLATE_STRING.
Types ¶
type StandardErrorLine ¶
StandardErrorLine contains a parsed commandline output from pyang.
type StandardOutput ¶
type StandardOutput struct { ErrorLines []*StandardErrorLine WarningLines []*StandardErrorLine OtherLines []string }
StandardOutput contains the parsed commandline outputs from pyang.
func ParseStandardOutput ¶
func ParseStandardOutput(rawOut string) StandardOutput
ParseStandardOutput parses raw pyang/confd output into a structured format. It recognizes two formats of output from pyang and confD: <file path>:<line no>:<error/warning>:<message> <file path>:<line#>(<import file path>:<line#>):<error/warning>:<message>
Click to show internal directories.
Click to hide internal directories.