entname

package
v0.0.0-...-27d53d3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Overview

Package entname provides entity-naming functions.

Index

Constants

View Source
const (
	VendorArista  = Vendor("Arista")
	VendorCisco   = Vendor("Cisco")
	VendorJuniper = Vendor("Juniper")
	VendorNokia   = Vendor("Nokia")
	VendorCiena   = Vendor("Ciena")
)

Vendor enum constants.

View Source
const (
	// QoSNC1 is the NC1 QoS class.
	QoSNC1 = QoSClass("NC1")
	// QoSAF4 is the AF4 QoS class.
	QoSAF4 = QoSClass("AF4")
	// QoSAF3 is the AF3 QoS class.
	QoSAF3 = QoSClass("AF3")
	// QoSAF2 is the AF2 QoS class.
	QoSAF2 = QoSClass("AF2")
	// QoSAF1 is the AF1 QoS class.
	QoSAF1 = QoSClass("AF1")
	// QoSBE1 is the BE1 QoS class.
	QoSBE1 = QoSClass("BE1")
	// QoSBE0 is the BE0 QoS class.
	QoSBE0 = QoSClass("BE0")
)

Variables

This section is empty.

Functions

func AggregateInterface

func AggregateInterface(dp *DeviceParams, index int) (string, error)

AggregateInterface returns the vendor-specific name of the aggregate interface with the given zero-based index.

func AggregateMemberInterface

func AggregateMemberInterface(dp *DeviceParams, index int) (string, error)

AggregateMemberInterface returns the vendor-specific name of the member interface bound to the aggregate interface with the given zero-based index.

func ControllerCard

func ControllerCard(dp *DeviceParams, index int) (string, error)

ControllerCard returns the vendor-specific name of the controller card with the given zero-based index.

func Fabric

func Fabric(dp *DeviceParams, index int) (string, error)

Fabric returns the vendor-specific name of the fabric with the given zero-based index.

func Linecard

func Linecard(dp *DeviceParams, index int) (string, error)

Linecard returns the vendor-specific name of the linecard with the given zero-based index.

func LoopbackInterface

func LoopbackInterface(dp *DeviceParams, index int) (string, error)

LoopbackInterface returns the vendor-specific name of the loopback interface with the given zero-based index.

func Port

func Port(dp *DeviceParams, pp *PortParams) (string, error)

Port returns the vendor-specific name of the physical interface with the given port parameters.

Types

type CommonQoSQueueNames

type CommonQoSQueueNames struct {
	// contains filtered or unexported fields
}

CommonQoSQueueNames are the queue names for the common QoS classes.

func CommonQoSQueues

func CommonQoSQueues(dev *DeviceParams, qos *QoSParams) (*CommonQoSQueueNames, error)

CommonQoSQueues returns the vendors-specific queues names for the common QoS classes. See the common QoS class definitions here: https://github.com/openconfig/entity-naming/blob/main/README.md#common-qos-queues

func (*CommonQoSQueueNames) Name

func (qn *CommonQoSQueueNames) Name(q QoSClass) string

Name returns the name of the queue for the specified QoS class.

func (*CommonQoSQueueNames) String

func (qn *CommonQoSQueueNames) String() string

type CommonTrafficQueueNames

type CommonTrafficQueueNames struct {
	NC1, AF4, AF3, AF2, AF1, BE1, BE0 string
}

CommonTrafficQueueNames are the names of common traffic class queues.

func CommonTrafficQueues

func CommonTrafficQueues(dev *DeviceParams) (*CommonTrafficQueueNames, error)

CommonTrafficQueues returns the vendors-specific names of common traffic class queues. See the forwarding group definitions here: Deprecated: Use the CommonQoSQueues function instead.

func (*CommonTrafficQueueNames) String

func (qn *CommonTrafficQueueNames) String() string

type DeviceParams

type DeviceParams struct {
	Vendor        Vendor
	HardwareModel string
}

DeviceParams are parameters of a network device.

func (*DeviceParams) String

func (dp *DeviceParams) String() string

type PortChannelState

type PortChannelState int

PortChannelState indicates whether the port is channelized and channelizable.

const (
	// Unchannelized means the port can be channelized but is not.
	Unchannelized PortChannelState = iota
	// Channelized means the port is channelized.
	Channelized
	// Unchannelizable means the port cannot be channelized.
	Unchannelizable
)

type PortParams

type PortParams struct {
	SlotIndex, PICIndex, PortIndex, ChannelIndex int
	ChannelState                                 PortChannelState
	Speed                                        oc.E_IfEthernet_ETHERNET_SPEED
}

PortParams are parameters of a network port.

func (*PortParams) String

func (pp *PortParams) String() string

type QoSClass

type QoSClass string

QoSClass represents a common QoS class. See the common QoS class definitions here: https://github.com/openconfig/entity-naming/blob/main/README.md#common-qos-queues

type QoSParams

type QoSParams struct {
	NumStrictPriority, NumWeightedRoundRobin int
}

QoSParams are parameters of a QoS configuration.

type Vendor

type Vendor string

Vendor is an enum of network device suppliers.

Jump to

Keyboard shortcuts

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