gosnappi

package module
v0.11.14 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 24 Imported by: 14

README

snappi

license Build Total alerts

Test scripts written in gosnappi, an auto-generated Go SDK, can be executed against any traffic generator conforming to Open Traffic Generator API.

Ixia-c is one such reference implementation of Open Traffic Generator API.

The repository is under active development and is subject to updates. All efforts will be made to keep the updates backwards compatible.

Setup Client

go get github.com/open-traffic-generator/snappi/gosnappi

Start testing

package examples

import (
	"encoding/hex"
	"testing"
	"time"

	"github.com/open-traffic-generator/snappi/gosnappi"
)

func TestQuickstart(t *testing.T) {
	// Create a new API handle to make API calls against OTG
	api := gosnappi.NewApi()

	// Set the transport protocol to HTTP
	api.NewHttpTransport().SetLocation("https://localhost:8443")

	// Create a new traffic configuration that will be set on OTG
	config := api.NewConfig()

	// Add a test port to the configuration
	ptx := config.Ports().Add().SetName("ptx").SetLocation("veth-a")

	// Configure a flow and set previously created test port as one of endpoints
	flow := config.Flows().Add().SetName("f1")
	flow.TxRx().Port().SetTxName(ptx.Name())
	// and enable tracking flow metrics
	flow.Metrics().SetEnable(true)

	// Configure number of packets to transmit for previously configured flow
	flow.Duration().FixedPackets().SetPackets(100)
	// and fixed byte size of all packets in the flow
	flow.Size().SetFixed(128)

	// Configure protocol headers for all packets in the flow
	pkt := flow.Packet()
	eth := pkt.Add().Ethernet()
	ipv4 := pkt.Add().Ipv4()
	udp := pkt.Add().Udp()
	cus := pkt.Add().Custom()

	eth.Dst().SetValue("00:11:22:33:44:55")
	eth.Src().SetValue("00:11:22:33:44:66")

	ipv4.Src().SetValue("10.1.1.1")
	ipv4.Dst().SetValue("20.1.1.1")

	// Configure repeating patterns for source and destination UDP ports
	udp.SrcPort().SetValues([]int32{5010, 5015, 5020, 5025, 5030})
	udp.DstPort().Increment().SetStart(6010).SetStep(5).SetCount(5)

	// Configure custom bytes (hex string) in payload
	cus.SetBytes(hex.EncodeToString([]byte("..QUICKSTART SNAPPI..")))

	// Optionally, print JSON representation of config
	if j, err := config.ToJson(); err != nil {
		t.Fatal(err)
	} else {
		t.Log("Configuration: ", j)
	}

	// Push traffic configuration constructed so far to OTG
	if _, err := api.SetConfig(config); err != nil {
		t.Fatal(err)
	}

	// Start transmitting the packets from configured flow
	ts := api.NewTransmitState()
	ts.SetState(gosnappi.TransmitStateState.START)
	if _, err := api.SetTransmitState(ts); err != nil {
		t.Fatal(err)
	}

	// Fetch metrics for configured flow
	req := api.NewMetricsRequest()
	req.Flow().SetFlowNames([]string{flow.Name()})
	// and keep polling until either expectation is met or deadline exceeds
	deadline := time.Now().Add(10 * time.Second)
	for {
		metrics, err := api.GetMetrics(req)
		if err != nil || time.Now().After(deadline) {
			t.Fatalf("err = %v || deadline exceeded", err)
		}
		// print YAML representation of flow metrics
		t.Log(metrics)
		if metrics.FlowMetrics().Items()[0].Transmit() == gosnappi.FlowMetricTransmit.STOPPED {
			break
		}
		time.Sleep(100 * time.Millisecond)
	}
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActionProtocolBgpChoice = struct {
	NOTIFICATION              ActionProtocolBgpChoiceEnum
	INITIATE_GRACEFUL_RESTART ActionProtocolBgpChoiceEnum
}{
	NOTIFICATION:              ActionProtocolBgpChoiceEnum("notification"),
	INITIATE_GRACEFUL_RESTART: ActionProtocolBgpChoiceEnum("initiate_graceful_restart"),
}

Enum of Choice on ActionProtocolBgp

View Source
var ActionProtocolBgpNotificationChoice = struct {
	CEASE                      ActionProtocolBgpNotificationChoiceEnum
	MESSAGE_HEADER_ERROR       ActionProtocolBgpNotificationChoiceEnum
	OPEN_MESSAGE_ERROR         ActionProtocolBgpNotificationChoiceEnum
	UPDATE_MESSAGE_ERROR       ActionProtocolBgpNotificationChoiceEnum
	HOLD_TIMER_EXPIRED         ActionProtocolBgpNotificationChoiceEnum
	FINITE_STATE_MACHINE_ERROR ActionProtocolBgpNotificationChoiceEnum
	CUSTOM                     ActionProtocolBgpNotificationChoiceEnum
}{
	CEASE:                      ActionProtocolBgpNotificationChoiceEnum("cease"),
	MESSAGE_HEADER_ERROR:       ActionProtocolBgpNotificationChoiceEnum("message_header_error"),
	OPEN_MESSAGE_ERROR:         ActionProtocolBgpNotificationChoiceEnum("open_message_error"),
	UPDATE_MESSAGE_ERROR:       ActionProtocolBgpNotificationChoiceEnum("update_message_error"),
	HOLD_TIMER_EXPIRED:         ActionProtocolBgpNotificationChoiceEnum("hold_timer_expired"),
	FINITE_STATE_MACHINE_ERROR: ActionProtocolBgpNotificationChoiceEnum("finite_state_machine_error"),
	CUSTOM:                     ActionProtocolBgpNotificationChoiceEnum("custom"),
}

Enum of Choice on ActionProtocolBgpNotification

View Source
var ActionProtocolChoice = struct {
	IPV4 ActionProtocolChoiceEnum
	IPV6 ActionProtocolChoiceEnum
	BGP  ActionProtocolChoiceEnum
}{
	IPV4: ActionProtocolChoiceEnum("ipv4"),
	IPV6: ActionProtocolChoiceEnum("ipv6"),
	BGP:  ActionProtocolChoiceEnum("bgp"),
}

Enum of Choice on ActionProtocol

View Source
var ActionProtocolIpv4Choice = struct {
	PING ActionProtocolIpv4ChoiceEnum
}{
	PING: ActionProtocolIpv4ChoiceEnum("ping"),
}

Enum of Choice on ActionProtocolIpv4

View Source
var ActionProtocolIpv6Choice = struct {
	PING ActionProtocolIpv6ChoiceEnum
}{
	PING: ActionProtocolIpv6ChoiceEnum("ping"),
}

Enum of Choice on ActionProtocolIpv6

View Source
var ActionResponseChoice = struct {
	PROTOCOL ActionResponseChoiceEnum
}{
	PROTOCOL: ActionResponseChoiceEnum("protocol"),
}

Enum of Choice on ActionResponse

View Source
var ActionResponseProtocolChoice = struct {
	IPV4 ActionResponseProtocolChoiceEnum
	IPV6 ActionResponseProtocolChoiceEnum
}{
	IPV4: ActionResponseProtocolChoiceEnum("ipv4"),
	IPV6: ActionResponseProtocolChoiceEnum("ipv6"),
}

Enum of Choice on ActionResponseProtocol

View Source
var ActionResponseProtocolIpv4Choice = struct {
	PING ActionResponseProtocolIpv4ChoiceEnum
}{
	PING: ActionResponseProtocolIpv4ChoiceEnum("ping"),
}

Enum of Choice on ActionResponseProtocolIpv4

Enum of Result on ActionResponseProtocolIpv4PingResponse

View Source
var ActionResponseProtocolIpv6Choice = struct {
	PING ActionResponseProtocolIpv6ChoiceEnum
}{
	PING: ActionResponseProtocolIpv6ChoiceEnum("ping"),
}

Enum of Choice on ActionResponseProtocolIpv6

Enum of Result on ActionResponseProtocolIpv6PingResponse

View Source
var BgpAsPathAsSetMode = struct {
	DO_NOT_INCLUDE_LOCAL_AS  BgpAsPathAsSetModeEnum
	INCLUDE_AS_SEQ           BgpAsPathAsSetModeEnum
	INCLUDE_AS_SET           BgpAsPathAsSetModeEnum
	INCLUDE_AS_CONFED_SEQ    BgpAsPathAsSetModeEnum
	INCLUDE_AS_CONFED_SET    BgpAsPathAsSetModeEnum
	PREPEND_TO_FIRST_SEGMENT BgpAsPathAsSetModeEnum
}{
	DO_NOT_INCLUDE_LOCAL_AS:  BgpAsPathAsSetModeEnum("do_not_include_local_as"),
	INCLUDE_AS_SEQ:           BgpAsPathAsSetModeEnum("include_as_seq"),
	INCLUDE_AS_SET:           BgpAsPathAsSetModeEnum("include_as_set"),
	INCLUDE_AS_CONFED_SEQ:    BgpAsPathAsSetModeEnum("include_as_confed_seq"),
	INCLUDE_AS_CONFED_SET:    BgpAsPathAsSetModeEnum("include_as_confed_set"),
	PREPEND_TO_FIRST_SEGMENT: BgpAsPathAsSetModeEnum("prepend_to_first_segment"),
}

Enum of AsSetMode on BgpAsPath

View Source
var BgpAsPathSegmentType = struct {
	AS_SEQ        BgpAsPathSegmentTypeEnum
	AS_SET        BgpAsPathSegmentTypeEnum
	AS_CONFED_SEQ BgpAsPathSegmentTypeEnum
	AS_CONFED_SET BgpAsPathSegmentTypeEnum
}{
	AS_SEQ:        BgpAsPathSegmentTypeEnum("as_seq"),
	AS_SET:        BgpAsPathSegmentTypeEnum("as_set"),
	AS_CONFED_SEQ: BgpAsPathSegmentTypeEnum("as_confed_seq"),
	AS_CONFED_SET: BgpAsPathSegmentTypeEnum("as_confed_set"),
}

Enum of Type on BgpAsPathSegment

View Source
var BgpCommunityType = struct {
	MANUAL_AS_NUMBER    BgpCommunityTypeEnum
	NO_EXPORT           BgpCommunityTypeEnum
	NO_ADVERTISED       BgpCommunityTypeEnum
	NO_EXPORT_SUBCONFED BgpCommunityTypeEnum
	LLGR_STALE          BgpCommunityTypeEnum
	NO_LLGR             BgpCommunityTypeEnum
}{
	MANUAL_AS_NUMBER:    BgpCommunityTypeEnum("manual_as_number"),
	NO_EXPORT:           BgpCommunityTypeEnum("no_export"),
	NO_ADVERTISED:       BgpCommunityTypeEnum("no_advertised"),
	NO_EXPORT_SUBCONFED: BgpCommunityTypeEnum("no_export_subconfed"),
	LLGR_STALE:          BgpCommunityTypeEnum("llgr_stale"),
	NO_LLGR:             BgpCommunityTypeEnum("no_llgr"),
}

Enum of Type on BgpCommunity

View Source
var BgpExtCommunitySubtype = struct {
	ROUTE_TARGET       BgpExtCommunitySubtypeEnum
	ORIGIN             BgpExtCommunitySubtypeEnum
	EXTENDED_BANDWIDTH BgpExtCommunitySubtypeEnum
	COLOR              BgpExtCommunitySubtypeEnum
	ENCAPSULATION      BgpExtCommunitySubtypeEnum
	MAC_ADDRESS        BgpExtCommunitySubtypeEnum
}{
	ROUTE_TARGET:       BgpExtCommunitySubtypeEnum("route_target"),
	ORIGIN:             BgpExtCommunitySubtypeEnum("origin"),
	EXTENDED_BANDWIDTH: BgpExtCommunitySubtypeEnum("extended_bandwidth"),
	COLOR:              BgpExtCommunitySubtypeEnum("color"),
	ENCAPSULATION:      BgpExtCommunitySubtypeEnum("encapsulation"),
	MAC_ADDRESS:        BgpExtCommunitySubtypeEnum("mac_address"),
}

Enum of Subtype on BgpExtCommunity

View Source
var BgpExtCommunityType = struct {
	ADMINISTRATOR_AS_2OCTET                BgpExtCommunityTypeEnum
	ADMINISTRATOR_IPV4_ADDRESS             BgpExtCommunityTypeEnum
	ADMINISTRATOR_AS_4OCTET                BgpExtCommunityTypeEnum
	OPAQUE                                 BgpExtCommunityTypeEnum
	EVPN                                   BgpExtCommunityTypeEnum
	ADMINISTRATOR_AS_2OCTET_LINK_BANDWIDTH BgpExtCommunityTypeEnum
}{
	ADMINISTRATOR_AS_2OCTET:                BgpExtCommunityTypeEnum("administrator_as_2octet"),
	ADMINISTRATOR_IPV4_ADDRESS:             BgpExtCommunityTypeEnum("administrator_ipv4_address"),
	ADMINISTRATOR_AS_4OCTET:                BgpExtCommunityTypeEnum("administrator_as_4octet"),
	OPAQUE:                                 BgpExtCommunityTypeEnum("opaque"),
	EVPN:                                   BgpExtCommunityTypeEnum("evpn"),
	ADMINISTRATOR_AS_2OCTET_LINK_BANDWIDTH: BgpExtCommunityTypeEnum("administrator_as_2octet_link_bandwidth"),
}

Enum of Type on BgpExtCommunity

Enum of Origin on BgpPrefixIpv4UnicastFilter

Enum of Origin on BgpPrefixIpv4UnicastState

Enum of Origin on BgpPrefixIpv6UnicastFilter

Enum of Origin on BgpPrefixIpv6UnicastState

View Source
var BgpPrefixStateRequestPrefixFilters = struct {
	IPV4_UNICAST BgpPrefixStateRequestPrefixFiltersEnum
	IPV6_UNICAST BgpPrefixStateRequestPrefixFiltersEnum
}{
	IPV4_UNICAST: BgpPrefixStateRequestPrefixFiltersEnum("ipv4_unicast"),
	IPV6_UNICAST: BgpPrefixStateRequestPrefixFiltersEnum("ipv6_unicast"),
}

Enum of PrefixFilters on BgpPrefixStateRequest

View Source
var BgpRouteAdvancedOrigin = struct {
	IGP        BgpRouteAdvancedOriginEnum
	EGP        BgpRouteAdvancedOriginEnum
	INCOMPLETE BgpRouteAdvancedOriginEnum
}{
	IGP:        BgpRouteAdvancedOriginEnum("igp"),
	EGP:        BgpRouteAdvancedOriginEnum("egp"),
	INCOMPLETE: BgpRouteAdvancedOriginEnum("incomplete"),
}

Enum of Origin on BgpRouteAdvanced

View Source
var BgpRouteDistinguisherRdType = struct {
	AS_2OCTET    BgpRouteDistinguisherRdTypeEnum
	IPV4_ADDRESS BgpRouteDistinguisherRdTypeEnum
	AS_4OCTET    BgpRouteDistinguisherRdTypeEnum
}{
	AS_2OCTET:    BgpRouteDistinguisherRdTypeEnum("as_2octet"),
	IPV4_ADDRESS: BgpRouteDistinguisherRdTypeEnum("ipv4_address"),
	AS_4OCTET:    BgpRouteDistinguisherRdTypeEnum("as_4octet"),
}

Enum of RdType on BgpRouteDistinguisher

View Source
var BgpRouteTargetRtType = struct {
	AS_2OCTET    BgpRouteTargetRtTypeEnum
	IPV4_ADDRESS BgpRouteTargetRtTypeEnum
	AS_4OCTET    BgpRouteTargetRtTypeEnum
}{
	AS_2OCTET:    BgpRouteTargetRtTypeEnum("as_2octet"),
	IPV4_ADDRESS: BgpRouteTargetRtTypeEnum("ipv4_address"),
	AS_4OCTET:    BgpRouteTargetRtTypeEnum("as_4octet"),
}

Enum of RtType on BgpRouteTarget

View Source
var BgpSrteBindingSubTlvBindingSidType = struct {
	NO_BINDING     BgpSrteBindingSubTlvBindingSidTypeEnum
	FOUR_OCTET_SID BgpSrteBindingSubTlvBindingSidTypeEnum
	IPV6_SID       BgpSrteBindingSubTlvBindingSidTypeEnum
}{
	NO_BINDING:     BgpSrteBindingSubTlvBindingSidTypeEnum("no_binding"),
	FOUR_OCTET_SID: BgpSrteBindingSubTlvBindingSidTypeEnum("four_octet_sid"),
	IPV6_SID:       BgpSrteBindingSubTlvBindingSidTypeEnum("ipv6_sid"),
}

Enum of BindingSidType on BgpSrteBindingSubTlv

Enum of ExplicitNullLabelPolicy on BgpSrteExplicitNullLabelPolicySubTlv

Enum of AddressFamily on BgpSrteRemoteEndpointSubTlv

Enum of SegmentType on BgpSrteSegment

Enum of NextHopAddressType on BgpSrteV4Policy

View Source
var BgpSrteV4PolicyNextHopMode = struct {
	LOCAL_IP BgpSrteV4PolicyNextHopModeEnum
	MANUAL   BgpSrteV4PolicyNextHopModeEnum
}{
	LOCAL_IP: BgpSrteV4PolicyNextHopModeEnum("local_ip"),
	MANUAL:   BgpSrteV4PolicyNextHopModeEnum("manual"),
}

Enum of NextHopMode on BgpSrteV4Policy

Enum of NextHopAddressType on BgpSrteV6Policy

View Source
var BgpSrteV6PolicyNextHopMode = struct {
	LOCAL_IP BgpSrteV6PolicyNextHopModeEnum
	MANUAL   BgpSrteV6PolicyNextHopModeEnum
}{
	LOCAL_IP: BgpSrteV6PolicyNextHopModeEnum("local_ip"),
	MANUAL:   BgpSrteV6PolicyNextHopModeEnum("manual"),
}

Enum of NextHopMode on BgpSrteV6Policy

View Source
var BgpV4EthernetSegmentActiveMode = struct {
	SINGLE_ACTIVE BgpV4EthernetSegmentActiveModeEnum
	ALL_ACTIVE    BgpV4EthernetSegmentActiveModeEnum
}{
	SINGLE_ACTIVE: BgpV4EthernetSegmentActiveModeEnum("single_active"),
	ALL_ACTIVE:    BgpV4EthernetSegmentActiveModeEnum("all_active"),
}

Enum of ActiveMode on BgpV4EthernetSegment

View Source
var BgpV4EviVxlanReplicationType = struct {
	INGRESS_REPLICATION BgpV4EviVxlanReplicationTypeEnum
}{
	INGRESS_REPLICATION: BgpV4EviVxlanReplicationTypeEnum("ingress_replication"),
}

Enum of ReplicationType on BgpV4EviVxlan

View Source
var BgpV4EvpnEvisChoice = struct {
	EVI_VXLAN BgpV4EvpnEvisChoiceEnum
}{
	EVI_VXLAN: BgpV4EvpnEvisChoiceEnum("evi_vxlan"),
}

Enum of Choice on BgpV4EvpnEvis

View Source
var BgpV4PeerAsNumberWidth = struct {
	TWO  BgpV4PeerAsNumberWidthEnum
	FOUR BgpV4PeerAsNumberWidthEnum
}{
	TWO:  BgpV4PeerAsNumberWidthEnum("two"),
	FOUR: BgpV4PeerAsNumberWidthEnum("four"),
}

Enum of AsNumberWidth on BgpV4Peer

View Source
var BgpV4PeerAsType = struct {
	IBGP BgpV4PeerAsTypeEnum
	EBGP BgpV4PeerAsTypeEnum
}{
	IBGP: BgpV4PeerAsTypeEnum("ibgp"),
	EBGP: BgpV4PeerAsTypeEnum("ebgp"),
}

Enum of AsType on BgpV4Peer

Enum of NextHopAddressType on BgpV4RouteRange

View Source
var BgpV4RouteRangeNextHopMode = struct {
	LOCAL_IP BgpV4RouteRangeNextHopModeEnum
	MANUAL   BgpV4RouteRangeNextHopModeEnum
}{
	LOCAL_IP: BgpV4RouteRangeNextHopModeEnum("local_ip"),
	MANUAL:   BgpV4RouteRangeNextHopModeEnum("manual"),
}

Enum of NextHopMode on BgpV4RouteRange

View Source
var BgpV6EthernetSegmentActiveMode = struct {
	SINGLE_ACTIVE BgpV6EthernetSegmentActiveModeEnum
	ALL_ACTIVE    BgpV6EthernetSegmentActiveModeEnum
}{
	SINGLE_ACTIVE: BgpV6EthernetSegmentActiveModeEnum("single_active"),
	ALL_ACTIVE:    BgpV6EthernetSegmentActiveModeEnum("all_active"),
}

Enum of ActiveMode on BgpV6EthernetSegment

View Source
var BgpV6EviVxlanReplicationType = struct {
	INGRESS_REPLICATION BgpV6EviVxlanReplicationTypeEnum
}{
	INGRESS_REPLICATION: BgpV6EviVxlanReplicationTypeEnum("ingress_replication"),
}

Enum of ReplicationType on BgpV6EviVxlan

View Source
var BgpV6EvpnEvisChoice = struct {
	EVI_VXLAN BgpV6EvpnEvisChoiceEnum
}{
	EVI_VXLAN: BgpV6EvpnEvisChoiceEnum("evi_vxlan"),
}

Enum of Choice on BgpV6EvpnEvis

View Source
var BgpV6PeerAsNumberWidth = struct {
	TWO  BgpV6PeerAsNumberWidthEnum
	FOUR BgpV6PeerAsNumberWidthEnum
}{
	TWO:  BgpV6PeerAsNumberWidthEnum("two"),
	FOUR: BgpV6PeerAsNumberWidthEnum("four"),
}

Enum of AsNumberWidth on BgpV6Peer

View Source
var BgpV6PeerAsType = struct {
	IBGP BgpV6PeerAsTypeEnum
	EBGP BgpV6PeerAsTypeEnum
}{
	IBGP: BgpV6PeerAsTypeEnum("ibgp"),
	EBGP: BgpV6PeerAsTypeEnum("ebgp"),
}

Enum of AsType on BgpV6Peer

Enum of NextHopAddressType on BgpV6RouteRange

View Source
var BgpV6RouteRangeNextHopMode = struct {
	LOCAL_IP BgpV6RouteRangeNextHopModeEnum
	MANUAL   BgpV6RouteRangeNextHopModeEnum
}{
	LOCAL_IP: BgpV6RouteRangeNextHopModeEnum("local_ip"),
	MANUAL:   BgpV6RouteRangeNextHopModeEnum("manual"),
}

Enum of NextHopMode on BgpV6RouteRange

View Source
var Bgpv4MetricFsmState = struct {
	IDLE        Bgpv4MetricFsmStateEnum
	CONNECT     Bgpv4MetricFsmStateEnum
	ACTIVE      Bgpv4MetricFsmStateEnum
	OPENSENT    Bgpv4MetricFsmStateEnum
	OPENCONFIRM Bgpv4MetricFsmStateEnum
	ESTABLISHED Bgpv4MetricFsmStateEnum
}{
	IDLE:        Bgpv4MetricFsmStateEnum("idle"),
	CONNECT:     Bgpv4MetricFsmStateEnum("connect"),
	ACTIVE:      Bgpv4MetricFsmStateEnum("active"),
	OPENSENT:    Bgpv4MetricFsmStateEnum("opensent"),
	OPENCONFIRM: Bgpv4MetricFsmStateEnum("openconfirm"),
	ESTABLISHED: Bgpv4MetricFsmStateEnum("established"),
}

Enum of FsmState on Bgpv4Metric

View Source
var Bgpv4MetricSessionState = struct {
	UP   Bgpv4MetricSessionStateEnum
	DOWN Bgpv4MetricSessionStateEnum
}{
	UP:   Bgpv4MetricSessionStateEnum("up"),
	DOWN: Bgpv4MetricSessionStateEnum("down"),
}

Enum of SessionState on Bgpv4Metric

View Source
var Bgpv4MetricsRequestColumnNames = struct {
	SESSION_STATE            Bgpv4MetricsRequestColumnNamesEnum
	SESSION_FLAP_COUNT       Bgpv4MetricsRequestColumnNamesEnum
	ROUTES_ADVERTISED        Bgpv4MetricsRequestColumnNamesEnum
	ROUTES_RECEIVED          Bgpv4MetricsRequestColumnNamesEnum
	ROUTE_WITHDRAWS_SENT     Bgpv4MetricsRequestColumnNamesEnum
	ROUTE_WITHDRAWS_RECEIVED Bgpv4MetricsRequestColumnNamesEnum
	UPDATES_SENT             Bgpv4MetricsRequestColumnNamesEnum
	UPDATES_RECEIVED         Bgpv4MetricsRequestColumnNamesEnum
	OPENS_SENT               Bgpv4MetricsRequestColumnNamesEnum
	OPENS_RECEIVED           Bgpv4MetricsRequestColumnNamesEnum
	KEEPALIVES_SENT          Bgpv4MetricsRequestColumnNamesEnum
	KEEPALIVES_RECEIVED      Bgpv4MetricsRequestColumnNamesEnum
	NOTIFICATIONS_SENT       Bgpv4MetricsRequestColumnNamesEnum
	NOTIFICATIONS_RECEIVED   Bgpv4MetricsRequestColumnNamesEnum
	FSM_STATE                Bgpv4MetricsRequestColumnNamesEnum
}{
	SESSION_STATE:            Bgpv4MetricsRequestColumnNamesEnum("session_state"),
	SESSION_FLAP_COUNT:       Bgpv4MetricsRequestColumnNamesEnum("session_flap_count"),
	ROUTES_ADVERTISED:        Bgpv4MetricsRequestColumnNamesEnum("routes_advertised"),
	ROUTES_RECEIVED:          Bgpv4MetricsRequestColumnNamesEnum("routes_received"),
	ROUTE_WITHDRAWS_SENT:     Bgpv4MetricsRequestColumnNamesEnum("route_withdraws_sent"),
	ROUTE_WITHDRAWS_RECEIVED: Bgpv4MetricsRequestColumnNamesEnum("route_withdraws_received"),
	UPDATES_SENT:             Bgpv4MetricsRequestColumnNamesEnum("updates_sent"),
	UPDATES_RECEIVED:         Bgpv4MetricsRequestColumnNamesEnum("updates_received"),
	OPENS_SENT:               Bgpv4MetricsRequestColumnNamesEnum("opens_sent"),
	OPENS_RECEIVED:           Bgpv4MetricsRequestColumnNamesEnum("opens_received"),
	KEEPALIVES_SENT:          Bgpv4MetricsRequestColumnNamesEnum("keepalives_sent"),
	KEEPALIVES_RECEIVED:      Bgpv4MetricsRequestColumnNamesEnum("keepalives_received"),
	NOTIFICATIONS_SENT:       Bgpv4MetricsRequestColumnNamesEnum("notifications_sent"),
	NOTIFICATIONS_RECEIVED:   Bgpv4MetricsRequestColumnNamesEnum("notifications_received"),
	FSM_STATE:                Bgpv4MetricsRequestColumnNamesEnum("fsm_state"),
}

Enum of ColumnNames on Bgpv4MetricsRequest

View Source
var Bgpv6MetricFsmState = struct {
	IDLE        Bgpv6MetricFsmStateEnum
	CONNECT     Bgpv6MetricFsmStateEnum
	ACTIVE      Bgpv6MetricFsmStateEnum
	OPENSENT    Bgpv6MetricFsmStateEnum
	OPENCONFIRM Bgpv6MetricFsmStateEnum
	ESTABLISHED Bgpv6MetricFsmStateEnum
}{
	IDLE:        Bgpv6MetricFsmStateEnum("idle"),
	CONNECT:     Bgpv6MetricFsmStateEnum("connect"),
	ACTIVE:      Bgpv6MetricFsmStateEnum("active"),
	OPENSENT:    Bgpv6MetricFsmStateEnum("opensent"),
	OPENCONFIRM: Bgpv6MetricFsmStateEnum("openconfirm"),
	ESTABLISHED: Bgpv6MetricFsmStateEnum("established"),
}

Enum of FsmState on Bgpv6Metric

View Source
var Bgpv6MetricSessionState = struct {
	UP   Bgpv6MetricSessionStateEnum
	DOWN Bgpv6MetricSessionStateEnum
}{
	UP:   Bgpv6MetricSessionStateEnum("up"),
	DOWN: Bgpv6MetricSessionStateEnum("down"),
}

Enum of SessionState on Bgpv6Metric

View Source
var Bgpv6MetricsRequestColumnNames = struct {
	SESSION_STATE            Bgpv6MetricsRequestColumnNamesEnum
	SESSION_FLAP_COUNT       Bgpv6MetricsRequestColumnNamesEnum
	ROUTES_ADVERTISED        Bgpv6MetricsRequestColumnNamesEnum
	ROUTES_RECEIVED          Bgpv6MetricsRequestColumnNamesEnum
	ROUTE_WITHDRAWS_SENT     Bgpv6MetricsRequestColumnNamesEnum
	ROUTE_WITHDRAWS_RECEIVED Bgpv6MetricsRequestColumnNamesEnum
	UPDATES_SENT             Bgpv6MetricsRequestColumnNamesEnum
	UPDATES_RECEIVED         Bgpv6MetricsRequestColumnNamesEnum
	OPENS_SENT               Bgpv6MetricsRequestColumnNamesEnum
	OPENS_RECEIVED           Bgpv6MetricsRequestColumnNamesEnum
	KEEPALIVES_SENT          Bgpv6MetricsRequestColumnNamesEnum
	KEEPALIVES_RECEIVED      Bgpv6MetricsRequestColumnNamesEnum
	NOTIFICATIONS_SENT       Bgpv6MetricsRequestColumnNamesEnum
	NOTIFICATIONS_RECEIVED   Bgpv6MetricsRequestColumnNamesEnum
	FSM_STATE                Bgpv6MetricsRequestColumnNamesEnum
}{
	SESSION_STATE:            Bgpv6MetricsRequestColumnNamesEnum("session_state"),
	SESSION_FLAP_COUNT:       Bgpv6MetricsRequestColumnNamesEnum("session_flap_count"),
	ROUTES_ADVERTISED:        Bgpv6MetricsRequestColumnNamesEnum("routes_advertised"),
	ROUTES_RECEIVED:          Bgpv6MetricsRequestColumnNamesEnum("routes_received"),
	ROUTE_WITHDRAWS_SENT:     Bgpv6MetricsRequestColumnNamesEnum("route_withdraws_sent"),
	ROUTE_WITHDRAWS_RECEIVED: Bgpv6MetricsRequestColumnNamesEnum("route_withdraws_received"),
	UPDATES_SENT:             Bgpv6MetricsRequestColumnNamesEnum("updates_sent"),
	UPDATES_RECEIVED:         Bgpv6MetricsRequestColumnNamesEnum("updates_received"),
	OPENS_SENT:               Bgpv6MetricsRequestColumnNamesEnum("opens_sent"),
	OPENS_RECEIVED:           Bgpv6MetricsRequestColumnNamesEnum("opens_received"),
	KEEPALIVES_SENT: