cmd

package
v1.0.0-...-8e6bd4c Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CMD_GLOBAL         = "global"
	CMD_NEIGHBOR       = "neighbor"
	CMD_POLICY         = "policy"
	CMD_RIB            = "rib"
	CMD_ADD            = "add"
	CMD_DEL            = "del"
	CMD_ALL            = "all"
	CMD_SET            = "set"
	CMD_LOCAL          = "local"
	CMD_ADJ_IN         = "adj-in"
	CMD_ADJ_OUT        = "adj-out"
	CMD_RESET          = "reset"
	CMD_SOFT_RESET     = "softreset"
	CMD_SOFT_RESET_IN  = "softresetin"
	CMD_SOFT_RESET_OUT = "softresetout"
	CMD_SHUTDOWN       = "shutdown"
	CMD_ENABLE         = "enable"
	CMD_DISABLE        = "disable"
	CMD_PREFIX         = "prefix"
	CMD_ASPATH         = "as-path"
	CMD_COMMUNITY      = "community"
	CMD_EXTCOMMUNITY   = "ext-community"
	CMD_IMPORT         = "import"
	CMD_EXPORT         = "export"
	CMD_IN             = "in"
	CMD_MONITOR        = "monitor"
	CMD_MRT            = "mrt"
	CMD_DUMP           = "dump"
	CMD_INJECT         = "inject"
	CMD_RPKI           = "rpki"
	CMD_RPKI_TABLE     = "table"
	CMD_RPKI_SERVER    = "server"
	CMD_VRF            = "vrf"
	CMD_ACCEPTED       = "accepted"
	CMD_REJECTED       = "rejected"
	CMD_STATEMENT      = "statement"
	CMD_CONDITION      = "condition"
	CMD_ACTION         = "action"
	CMD_UPDATE         = "update"
	CMD_ROTATE         = "rotate"
	CMD_BMP            = "bmp"
	CMD_LARGECOMMUNITY = "large-community"
	CMD_SUMMARY        = "summary"
	CMD_VALIDATION     = "validation"
)
View Source
const (
	PARAM_FLAG = iota
	PARAM_SINGLE
	PARAM_LIST
)

Variables

View Source
var ExtCommNameMap = map[ExtCommType]string{
	ACCEPT:          "accept",
	DISCARD:         "discard",
	RATE:            "rate-limit",
	REDIRECT:        "redirect",
	MARK:            "mark",
	ACTION:          "action",
	RT:              "rt",
	ENCAP:           "encap",
	ESI_LABEL:       "esi-label",
	ROUTER_MAC:      "router-mac",
	DEFAULT_GATEWAY: "default-gateway",
	VALID:           "valid",
	NOT_FOUND:       "not-found",
	INVALID:         "invalid",
}
View Source
var ExtCommParserMap = map[ExtCommType]func([]string) ([]bgp.ExtendedCommunityInterface, error){
	ACCEPT:          nil,
	DISCARD:         rateLimitParser,
	RATE:            rateLimitParser,
	REDIRECT:        redirectParser,
	MARK:            markParser,
	ACTION:          actionParser,
	RT:              rtParser,
	ENCAP:           encapParser,
	ESI_LABEL:       esiLabelParser,
	ROUTER_MAC:      routerMacParser,
	DEFAULT_GATEWAY: defaultGatewayParser,
	VALID:           validationParser,
	NOT_FOUND:       validationParser,
	INVALID:         validationParser,
}

Functions

func NewBmpCmd

func NewBmpCmd() *cobra.Command

func NewGlobalCmd

func NewGlobalCmd() *cobra.Command

func NewMonitorCmd

func NewMonitorCmd() *cobra.Command

func NewMrtCmd

func NewMrtCmd() *cobra.Command

func NewNeighborCmd

func NewNeighborCmd() *cobra.Command

func NewPolicyCmd

func NewPolicyCmd() *cobra.Command

func NewRPKICmd

func NewRPKICmd() *cobra.Command

func NewRootCmd

func NewRootCmd() *cobra.Command

func NewVrfCmd

func NewVrfCmd() *cobra.Command

func ParseEvpnArgs

func ParseEvpnArgs(args []string) (bgp.AddrPrefixInterface, []string, error)

func ParseEvpnEthernetAutoDiscoveryArgs

func ParseEvpnEthernetAutoDiscoveryArgs(args []string) (bgp.AddrPrefixInterface, []string, error)

func ParseEvpnEthernetSegmentArgs

func ParseEvpnEthernetSegmentArgs(args []string) (bgp.AddrPrefixInterface, []string, error)

func ParseEvpnIPPrefixArgs

func ParseEvpnIPPrefixArgs(args []string) (bgp.AddrPrefixInterface, []string, error)

func ParseEvpnMacAdvArgs

func ParseEvpnMacAdvArgs(args []string) (bgp.AddrPrefixInterface, []string, error)

func ParseEvpnMulticastArgs

func ParseEvpnMulticastArgs(args []string) (bgp.AddrPrefixInterface, []string, error)

func ParseExtendedCommunities

func ParseExtendedCommunities(args []string) ([]bgp.ExtendedCommunityInterface, error)

func ParseFlowSpecArgs

func ParseFlowSpecArgs(rf bgp.RouteFamily, args []string) (bgp.AddrPrefixInterface, []string, error)

func ParsePath

func ParsePath(rf bgp.RouteFamily, args []string) (*table.Path, error)

Types

type AsPathFormat

type AsPathFormat struct{}

type ExtCommType

type ExtCommType int
const (
	ACCEPT ExtCommType = iota
	DISCARD
	RATE
	REDIRECT
	MARK
	ACTION
	RT
	ENCAP
	ESI_LABEL
	ROUTER_MAC
	DEFAULT_GATEWAY
	VALID
	NOT_FOUND
	INVALID
)

Jump to

Keyboard shortcuts

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