ocpaths

package
v0.0.0-...-2661cfd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package ocpaths contains utilities and types for validating a set of OCPaths specified by ocpaths.proto.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClonePublicRepo

func ClonePublicRepo(downloadPath, branch string) (string, error)

ClonePublicRepo clones the openconfig/public repo at the given path.

  • branch is the branch to be downloaded (passed to git clone -b). If it is empty then the argument will be omitted.

Note

  • If the "public" folder already exists, then no additional downloads will be made.
  • A manual deletion of the downloadPath folder is required if no longer used.

func ValidatePaths

func ValidatePaths(ocpathsProto []*ppb.OCPath, publicPath string) (map[OCPathKey]*OCPath, map[OCPathKey]*OCPath, error)

ValidatePaths parses and validates ocpaths, and puts them into a more user-friendly Go structure.

The first set of paths contain only valid path, while the second contain only invalid paths.

Types

type OCPath

type OCPath struct {
	Key              OCPathKey
	FeatureprofileID string
}

OCPath is the parsed version of the spreadsheet's paths.

type OCPathKey

type OCPathKey struct {
	Path         string
	PlatformType string
}

OCPathKey contains the fields that uniquely identify an OC path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL