models

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MPL-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func A

func A(data map[string]interface{}, key string, value interface{})

func G added in v0.1.9

func G(cont *container.Container, key string) string

func IsService added in v0.1.4

func IsService(path string) bool

func IsTemplate added in v0.1.11

func IsTemplate(path string) bool

func StripQuotes

func StripQuotes(word string) string

Types

type Interface added in v0.0.24

type Interface struct {
	Policy            string            `json:",omitempty"`
	Type              string            `json:",omitempty"`
	Interfaces        []InterfaceConfig `json:",omitempty"`
	SkipResourceCheck bool              `json:",omitempty"`
}

func NewInterface added in v0.0.24

func NewInterface(intf *Interface, intfConf *InterfaceConfig, nvPairs map[string]interface{}) *Interface

func (*Interface) ToMap added in v0.0.24

func (intf *Interface) ToMap() (map[string]interface{}, error)

type InterfaceConfig added in v0.0.24

type InterfaceConfig struct {
	SerialNumber  string      `json:",omitempty"`
	InterfaceType string      `json:",omitempty"`
	InterfaceName string      `json:",omitempty"`
	Fabric        string      `json:",omitempty"`
	NVPairs       interface{} `json:",omitempty"`
}

type InterfaceDelete added in v0.0.25

type InterfaceDelete struct {
	SerialNumber string `json:",omitempty"`
	Name         string `json:",omitempty"`
}

func (*InterfaceDelete) ToMap added in v0.0.25

func (intfDel *InterfaceDelete) ToMap() (map[string]interface{}, error)

type Inventory added in v0.0.8

type Inventory struct {
	SeedIP         string   `json:",omitempty"`
	V3auth         int      `json:",omitempty"`
	Username       string   `json:",omitempty"`
	Password       string   `json:",omitempty"`
	MaxHops        int      `json:",omitempty"`
	SecondTimeout  int      `json:",omitempty"`
	PreserveConfig string   `json:",omitempty"`
	Switches       []Switch `json:",omitempty"`
	Platform       string   `json:",omitempty"`
}

func NewSwitch added in v0.0.8

func NewSwitch(inv *Inventory, s []*Switch) *Inventory

func (*Inventory) ToMap added in v0.0.8

func (inv *Inventory) ToMap() (map[string]interface{}, error)

type Model

type Model interface {
	ToMap() (map[string]interface{}, error)
}

type Network added in v0.0.19

type Network struct {
	Fabric                 string `json:",omitempty"`
	Name                   string `json:",omitempty"`
	DisplayName            string `json:",omitempty"`
	NetworkId              string `json:",omitempty"`
	Template               string `json:",omitempty"`
	Config                 string `json:",omitempty"`
	ExtensionTemplate      string `json:",omitempty"`
	VRF                    string `json:",omitempty"`
	ServiceNetworkTemplate string `json:",omitempty"`
	Source                 string `json:",omitempty"`
}

func (*Network) ToMap added in v0.0.19

func (network *Network) ToMap() (map[string]interface{}, error)

type NetworkAttach added in v0.0.29

type NetworkAttach struct {
	Name       string      `json:",omitempty"`
	AttachList interface{} `json:",omitempty"`
}

func NewNetworkAttachment added in v0.0.29

func NewNetworkAttachment(networkName string, ianAttach []map[string]interface{}) *NetworkAttach

func (*NetworkAttach) ToMap added in v0.0.29

func (networkAttach *NetworkAttach) ToMap() (map[string]interface{}, error)

type NetworkProfileConfig added in v0.0.19

type NetworkProfileConfig struct {
	NetworkName        string `json:"networkName"`
	VRFName            string `json:"vrfName"`
	SegmentID          string `json:"segmentId"`
	Vlan               string `json:"vlanId"`
	MTU                string `json:"mtu"`
	GatewayIpv4        string `json:"gatewayIpAddress"`
	GatewayIPv6        string `json:"gatewayIpV6Address"`
	VlanName           string `json:"vlanName"`
	Description        string `json:"intfDescription"`
	SecondaryGate1     string `json:"secondaryGW1"`
	SecondaryGate2     string `json:"secondaryGW2"`
	SecondaryGate3     string `json:"secondaryGW3"`
	SecondaryGate4     string `json:"secondaryGW4"`
	ARPSuppFlag        bool   `json:"suppressArp"`
	IRFlag             bool   `json:"enableIR"`
	McastGroup         string `json:"mcastGroup"`
	DHCPServer1        string `json:"dhcpServerAddr1"`
	DHCPServer2        string `json:"dhcpServerAddr2"`
	DHCPServer3        string `json:"dhcpServerAddr3"`
	DHCPServerVRF      string `json:"vrfDhcp"`
	DHCPServerVRF2     string `json:"vrfDhcp2"`
	DHCPServerVRF3     string `json:"vrfDhcp3"`
	LookbackID         string `json:"loopbackId"`
	Tag                string `json:"tag"`
	TRMEnable          bool   `json:"trmEnabled"`
	RTBothFlag         bool   `json:"rtBothAuto"`
	L3GatewayEnable    bool   `json:"enableL3OnBorder"`
	L2OnlyFlag         bool   `json:"isLayer2Only"`
	EnableNetflow      bool   `json:"ENABLE_NETFLOW"`
	SVINetflowMonitor  string `json:"SVI_NETFLOW_MONITOR"`
	VLANNetflowMonitor string `json:"VLAN_NETFLOW_MONITOR"`
	NVEId              string `json:"nveId"`
}

type Policy added in v0.1.4

type Policy struct {
	Id                  string      `json:"id,omitempty"`
	PolicyId            string      `json:"policyId,omitempty"`
	Source              string      `json:"source,omitempty"`
	Description         string      `json:"description,omitempty"`
	SerialNumber        string      `json:"serialNumber,omitempty"`
	EntityType          string      `json:"entityType,omitempty"`
	EntityName          string      `json:"entityName,omitempty"`
	Priority            string      `json:"priority,omitempty"`
	TemplateName        string      `json:"templateName,omitempty"`
	TemplateContentType string      `json:"templateContentType,omitempty"`
	Deleted             bool        `json:"deleted,omitempty"`
	NVPairs             interface{} `json:"nvpairs,omitempty"`
}

func (*Policy) ToMap added in v0.1.4

func (policy *Policy) ToMap() (map[string]interface{}, error)

type RouteConfig added in v0.1.6

type RouteConfig struct {
	TemplateName string      `json:"templateName,omitempty"`
	VrfName      string      `json:"vrfName,omitempty"`
	NVPairs      interface{} `json:"nvPairs,omitempty"`
}

type RoutePeering added in v0.1.6

type RoutePeering struct {
	AttachedFabricName string           `json:"attachedFabricName,omitempty"`
	DeploymentMode     string           `json:"deploymentMode,omitempty"`
	FabricName         string           `json:"fabricName,omitempty"`
	NextHopIP          string           `json:"nextHopIp,omitempty"`
	Name               string           `json:"peeringName,omitempty"`
	Option             string           `json:"peeringOption,omitempty"`
	ReverseNextHopIp   string           `json:"reverseNextHopIp,omitempty"`
	ServiceNetworks    []ServiceNetwork `json:"serviceNetworks,omitempty"`
	Routes             []RouteConfig    `json:"routes,omitempty"`
	ServiceNodeName    string           `json:"serviceNodeName,omitempty"`
	ServiceNodeType    string           `json:"serviceNodeType,omitempty"`
}

func NewNetwork added in v0.1.6

func NewNetwork(rp *RoutePeering, sn []*ServiceNetwork) *RoutePeering

func NewRoute added in v0.1.6

func NewRoute(rp *RoutePeering, route []*RouteConfig) *RoutePeering

func (*RoutePeering) ToMap added in v0.1.6

func (routePeering *RoutePeering) ToMap() (map[string]interface{}, error)

type RoutePeeringDeploy added in v0.1.6

type RoutePeeringDeploy struct {
	PeeringNames []string `json:"peeringNames,omitempty"`
}

func (*RoutePeeringDeploy) ToMap added in v0.1.6

func (deploy *RoutePeeringDeploy) ToMap() (map[string]interface{}, error)

type ServiceNetwork added in v0.1.6

type ServiceNetwork struct {
	NetworkName  string      `json:"networkName,omitempty"`
	NetworkType  string      `json:"networkType,omitempty"`
	NVPairs      interface{} `json:"nvPairs,omitempty"`
	TemplateName string      `json:"templateName,omitempty"`
	Vlan         int         `json:"vlanId,omitempty"`
	VrfName      string      `json:"vrfName,omitempty"`
}

type ServiceNode added in v0.1.5

type ServiceNode struct {
	Name                        string      `json:",omitempty"`
	Type                        string      `json:",omitempty"`
	FormFactor                  string      `json:",omitempty"`
	FabricName                  string      `json:",omitempty"`
	InterfaceName               string      `json:",omitempty"`
	LinkTemplateName            string      `json:",omitempty"`
	AttachedSwitchSn            string      `json:",omitempty"`
	AttachedSwitchInterfaceName string      `json:",omitempty"`
	AttachedFabricName          string      `json:",omitempty"`
	NVPairs                     interface{} `json:",omitempty"`
}

func NewServiceNode added in v0.1.5

func NewServiceNode(serviceNode *ServiceNode, nvPairs map[string]interface{}) *ServiceNode

func (*ServiceNode) ToMap added in v0.1.5

func (servicenode *ServiceNode) ToMap() (map[string]interface{}, error)

type ServicePolicy added in v0.1.9

type ServicePolicy struct {
	PolicyName         string      `json:",omitempty"`
	FabricName         string      `json:",omitempty"`
	AttachedFabricName string      `json:",omitempty"`
	DestinationNetwork string      `json:",omitempty"`
	DestinationVrfName string      `json:",omitempty"`
	Enabled            bool        `json:",omitempty"`
	NextHopIp          string      `json:",omitempty"`
	PeeringName        string      `json:",omitempty"`
	PolicyTemplateName string      `json:",omitempty"`
	ReverseEnabled     bool        `json:",omitempty"`
	ReverseNextHopIp   string      `json:",omitempty"`
	ServiceNodeName    string      `json:",omitempty"`
	ServiceNodeType    string      `json:",omitempty"`
	SourceNetwork      string      `json:",omitempty"`
	SourceVrfName      string      `json:",omitempty"`
	Status             string      `json:",omitempty"`
	NvPairs            interface{} `json:",omitempty"`
}

func (*ServicePolicy) ToMap added in v0.1.9

func (servicepolicy *ServicePolicy) ToMap() (map[string]interface{}, error)

type ServicePolicyDeploy added in v0.1.9

type ServicePolicyDeploy struct {
	PolicyNames []string `json:"policyNames,omitempty"`
}

func (*ServicePolicyDeploy) ToMap added in v0.1.9

func (deploy *ServicePolicyDeploy) ToMap() (map[string]interface{}, error)

type Switch added in v0.0.8

type Switch struct {
	Reachable   string `json:",omitempty"`
	Auth        string `json:",omitempty"`
	Known       string `json:",omitempty"`
	Valid       string `json:",omitempty"`
	Selectable  string `json:",omitempty"`
	SysName     string `json:",omitempty"`
	IP          string `json:",omitempty"`
	Platform    string `json:",omitempty"`
	Version     string `json:",omitempty"`
	LastChange  string `json:",omitempty"`
	Hops        int    `json:",omitempty"`
	DeviceIndex string `json:",omitempty"`
	StatReason  string `json:",omitempty"`
}

func (*Switch) MakeMap added in v0.0.8

func (s *Switch) MakeMap() (map[string]interface{}, error)

type SwitchRole added in v0.0.31

type SwitchRole struct {
	SerialNumber string `json:",omitempty"`
	Role         string `json:",omitempty"`
}

func (*SwitchRole) ToMap added in v0.0.31

func (sRole *SwitchRole) ToMap() (map[string]interface{}, error)

type Template added in v0.1.11

type Template struct {
	Name    string `json:"templatename,omitempty"`
	Content string `json:"content,omitempty"`
}

func (*Template) ToMap added in v0.1.11

func (temp *Template) ToMap() (map[string]interface{}, error)

type TemplateUpdate added in v0.1.11

type TemplateUpdate struct {
	Content string `json:"content,omitempty"`
}

func (*TemplateUpdate) ToMap added in v0.1.11

func (temp *TemplateUpdate) ToMap() (map[string]interface{}, error)

type VRF

type VRF struct {
	Fabric             string `json:",omitempty"`
	Name               string `json:",omitempty"`
	Id                 string `json:",omitempty"`
	Template           string `json:",omitempty"`
	Config             string `json:",omitempty"`
	ExtensionTemplate  string `json:",omitempty"`
	ServiceVRFTemplate string `json:",omitempty"`
	Source             string `json:",omitempty"`
}

func (*VRF) ToMap

func (vrf *VRF) ToMap() (map[string]interface{}, error)

type VRFAttach added in v0.0.21

type VRFAttach struct {
	Name       string      `json:",omitempty"`
	AttachList interface{} `json:",omitempty"`
}

func NewVRFAttachment added in v0.0.21

func NewVRFAttachment(vrfName string, ianAttach []map[string]interface{}) *VRFAttach

func (*VRFAttach) ToMap added in v0.0.21

func (vrfAttach *VRFAttach) ToMap() (map[string]interface{}, error)

type VRFDeploy added in v0.0.21

type VRFDeploy struct {
	Name string `json:",omitempty"`
}

func (*VRFDeploy) ToMap added in v0.0.21

func (vrfDeploy *VRFDeploy) ToMap() (map[string]interface{}, error)

type VRFDot1qID added in v0.1.10

type VRFDot1qID struct {
	ScopeType    string `json:"scopeType,omitempty"`
	UsageType    string `json:"usageType,omitempty"`
	AllocatedTo  string `json:"allocatedTo,omitempty"`
	SerialNumber string `json:"serialNumber,omitempty"`
	IfName       string `json:"ifName,omitempty"`
}

func (*VRFDot1qID) ToMap added in v0.1.10

func (vrfDot1qID *VRFDot1qID) ToMap() (map[string]interface{}, error)

type VRFInstance added in v0.0.21

type VRFInstance struct {
	LookbackID   int    `json:"loopbackId,omitempty"`
	LoopbackIpv4 string `json:"loopbackIpAddress,omitempty"`
	LoopbackIpv6 string `json:"loopbackIpV6Address,omitempty"`
}

type VRFProfileConfig added in v0.0.6

type VRFProfileConfig struct {
	VrfName         string `json:"vrfName"`
	SegmentID       string `json:"vrfSegmentId"`
	Vlan            int    `json:"vrfVlanId,omitempty"`
	Mtu             int    `json:"mtu,omitempty"`
	Tag             string `json:"tag,omitempty"`
	VlanName        string `json:"vrfVlanName,omitempty"`
	Description     string `json:"vrfDescription,omitempty"`
	IntfDescription string `json:"vrfIntfDescription,omitempty"`
	BGP             int    `json:"maxBgpPaths,omitempty"`
	IBGP            int    `json:"maxIbgpPaths,omitempty"`
	TRM             string `json:"trmEnabled,omitempty"`
	RPexternal      string `json:"isRPExternal,omitempty"`
	Lookback        int    `json:"loopbackNumber,omitempty"`
	RPaddress       string `json:"rpAddress,omitempty"`
	Mcastaddr       string `json:"L3VniMcastGroup,omitempty"`
	IPv6Link        string `json:"ipv6LinkLocalFlag,omitempty"`
	Mcastgroup      string `json:"multicastGroup,omitempty"`
	TRMBGW          string `json:"trmBGWMSiteEnabled,omitempty"`
	AdhostRoute     string `json:"advertiseHostRouteFlag,omitempty"`
	AdDefaultRoute  string `json:"advertiseDefaultRouteFlag,omitempty"`
	StaticRoute     string `json:"configureStaticDefaultRouteFlag,omitempty"`
}

Jump to

Keyboard shortcuts

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