Documentation
¶
Index ¶
- func AllocateAppIndex(app, lpName *string, index *int, ipv4Net, ipv6Net *net.IPNet, ...) (*string, *string, error)
- func AllocateIP(ipAddresses *map[string]map[int]map[string][]*AllocatedIPInfo, cnfName *string, ...) (*string, *string)
- func BoolPtr(b bool) *bool
- func GetIndexedIP(subnet *net.IPNet, index int) (net.IP, error)
- func GetLastIP(subnet *net.IPNet) (net.IP, error)
- func IntPtr(i int) *int
- func ParseTemplates(path string) *template.Template
- func RangeSize(subnet *net.IPNet) int64
- func StringPtr(s string) *string
- func StringSlicePtr(s []string) *[]string
- func Uint32Ptr(i uint32) *uint32
- type AllocatedIPInfo
- type AntiAffinity
- type AppConfig
- func (a *AppConfig) AssignNetworkInfoItfce(group *int, itfceType, wlName, multusGenericWlName *string, ...)
- func (a *AppConfig) AssignNetworkInfoLoopback(group *int, itfceType, wlName, multusGenericWlName *string, ...)
- func (a *AppConfig) InitializeCnfContainerData(c *ContainerRegistry, pods map[string]map[string]interface{})
- func (a *AppConfig) InitializeCnfNetworkData(cnfName string, cnfInfo *CnfInfo, p *Parser, appIPMap *AppIPMap, ...)
- func (a *AppConfig) UpdateWorkloadShortNames(multusGenericWlName *string)
- type AppIPMap
- type AttachDef
- type BGPPeerInfo
- type ClientGroup
- type ClientLinkInfo
- type Cluster
- type CnfInfo
- type Config
- type ConfigFile
- type ContainerInfo
- type ContainerRegistry
- type ContainerRepo
- type Credentials
- type Enable
- type Endpoint
- type GlobalParameters
- type IPinfo
- type Infrastructure
- type InterfaceDetails
- type Ipam
- func (ipam *Ipam) IPAMAllocPrefixPerLink(version, prefix *string, link *Link) (err error)
- func (ipam *Ipam) IPAMAllocateAddress(kind *string, ipv4Cidrs, ipv6Cidrs []*string) (*Endpoint, error)
- func (ipam *Ipam) IPAMAllocateLinkPrefix(link *Link, ipv4Cidr, ipv6Cidr *string) (err error)
- func (ipam *Ipam) IPEndpointAlloc(kind, version, prefix string, e *Endpoint) error
- type IpamAlloc
- type IpamApp
- type KciKpi
- type KcikpiInfo
- type Link
- type LinkConfig
- type Multus
- type MultusCnfInfo
- type MultusDataPlaneInfo
- type MultusInfo
- type Neighbor
- type NetworkInfo
- type NetworkInstance
- type Node
- type NodeConfig
- type NodeSelector
- type PacoDeploymentInfo
- type PacoInfo
- type PacoNetworkInfo
- type Parser
- func (p *Parser) AssignSwitchBgpLoopback(version, ipcidr, wlName, netwType *string, bgpidx int)
- func (p *Parser) AssignSwitchGWs(version, ipcidr, wlName, netwType *string, idx, gwidx int, ...)
- func (p *Parser) CreateDirectory(path string, perm os.FileMode)
- func (p *Parser) GetApplicationIndex(itfceType, element, kind *string) *int
- func (p *Parser) GetConfig(file *string) error
- func (p *Parser) InitializeIPAMWorkloads() (err error)
- func (p *Parser) InitializeSwitchToServerInformation()
- func (p *Parser) NewEndpoint(nodeShortName, epShortName *string, l *Link, peerNode *Node) *Endpoint
- func (p *Parser) NewLink(l *LinkConfig) error
- func (p *Parser) NewNode(nodeName string, nodeCfg *NodeConfig) (*Node, error)
- func (p *Parser) ParseApplicationData()
- func (p *Parser) ParseClientGroup() (err error)
- func (p *Parser) ParseCnfKustomize(cnfName *string, appc *AppConfig, appIPMap *AppIPMap)
- func (p *Parser) ParseServerData()
- func (p *Parser) ParseTopology() (err error)
- func (p *Parser) RenderNetworkAttachement(t *template.Template, dirName *string, values *Values) error
- func (p *Parser) RenderSriovConfigMap(t *template.Template, dirName *string, ...) error
- func (p *Parser) RenderStatefulSet(t *template.Template, dirName *string, values *Values) error
- func (p *Parser) RenderToActiveConfigMap(t *template.Template, dirName *string, values *Values) error
- func (p *Parser) ShowClientGroup() error
- func (p *Parser) ShowTopology()
- func (p *Parser) UpdateUniqueClientLink(cnfInfo *CnfInfo, podName, connType *string, ...) *ClientLinkInfo
- func (p *Parser) WriteApplicationDeploymentIPAM(dirName *string)
- func (p *Parser) WriteBase()
- func (p *Parser) WriteClientsGroups() (kuztomizedirs []string)
- func (p *Parser) WriteCnfValues(t *template.Template, dirName, cnfName *string, appc *AppConfig, ...) error
- func (p *Parser) WriteFinalBase(kdirs []string)
- func (p *Parser) WriteInfrastructure() (kuztomizedirs []string)
- func (p *Parser) WriteKustomize(dirName, fileName *string, resources []string) error
- func (p *Parser) WriteSrlInterface(dirName, fileName, resName, target *string, interfaces []*k8ssrlinterface) error
- func (p *Parser) WriteSrlIrbSubInterface(dirName, fileName, resName, target *string, ...) error
- func (p *Parser) WriteSrlNetworkInstance(dirName, fileName, resName, target *string, ...) error
- func (p *Parser) WriteSrlNetworkInstanceBgpEvpn(dirName, fileName, resName, target *string, ...) error
- func (p *Parser) WriteSrlNetworkInstanceBgpVpn(dirName, fileName, resName, target *string, ...) error
- func (p *Parser) WriteSrlNetworkInstanceLinux(dirName, fileName, resName, target *string, ...) error
- func (p *Parser) WriteSrlProtocolsBgp(dirName, fileName, resName, target *string, protocolsbgp *k8ssrlprotocolsbgp) error
- func (p *Parser) WriteSrlRoutingPolicy(dirName, fileName, resName, target *string, routingPolicy *k8ssrlRoutingPolicy) error
- func (p *Parser) WriteSrlSubInterface(dirName, fileName, resName, target *string, ...) error
- func (p *Parser) WriteSrlSystemNetworkInstance(dirName, fileName, resName, target *string, esis []*k8ssrlESI) error
- func (p *Parser) WriteSrlTunnelInterface(dirName, fileName, resName, target *string, ...) error
- func (p *Parser) WriteSrlVxlanInterface(dirName, fileName, resName, target *string, ...) error
- func (p *Parser) WriteWorkloads() (kuztomizedirs []string)
- type ParserOption
- type PeerGroup
- type PodInfo
- type PodResources
- type PodRootInfo
- type PodSecurityPolicy
- type Protocols
- type Redundancy
- type RenderedNetworkInfo
- type Resource
- type RtScheduling
- type Scale
- type ScrapeInterval
- type SliceInfo
- type Storage
- type Topology
- type Values
- type Workload
- type WorkloadInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocateAppIndex ¶
func AllocateIP ¶
func GetIndexedIP ¶
GetIndexedIP returns a net.IP that is subnet.IP + index in the contiguous IP space.
func ParseTemplates ¶
func StringSlicePtr ¶
Types ¶
type AllocatedIPInfo ¶
type AllocatedIPInfo struct {
IPAddress *string // allocated IP address
Application *string // allocated application
Usage *string // allocated usage
}
func AllocateIPIndex ¶
type AntiAffinity ¶
type AntiAffinity struct{}
type AppConfig ¶
type AppConfig struct {
ConnectivityMode *string
Amms bool
Dbs bool
Emms bool
Ipds bool
Ipps bool
Necc bool
Paps bool
Aws bool
NetworkName string
NetworkShortName string
Mcc *int
Mnc *int
Supi [][]*string
Dnn []*string
Slices map[string]*SliceInfo // key string = slice type; element is slice differentiator
TrackingArea []*string
K8sApiServer string
K8sDns string
StorageClass string
ContainerRepo *ContainerRepo
Containers map[string]*ContainerInfo
// key1 is wlGenericName, key2 is group, key3 is swithIndex key4 is loopback or interfce, key6 is kind/type
// group: 0 is used for control plane; group 1, etc for LMG user plane
Networks map[string]map[int]map[int]map[string]map[string][]*RenderedNetworkInfo
SwitchesPerServer *int
UePoolCidr *string
Apn *string
// key1: sriov or ipvlan,
// key2: ServerLogicalInterfacename (bondx),
// key3: numa,
// key4: switch-name,
// value list of pfNames
UniqueClientServer2NetworkLinks map[string]map[string]map[int]map[string][]*string
//Switches []string
//ClientLinks map[string]map[string]*ClientLinkInfo
//UniqueClientLinks map[string][]*ClientLinkInfo
WorkloadShortNames map[string]*string
ConnType *string
Llbs *int
Lmgs *int
K *int
}
func (*AppConfig) AssignNetworkInfoItfce ¶
func (a *AppConfig) AssignNetworkInfoItfce(group *int, itfceType, wlName, multusGenericWlName *string, netwInfo *NetworkInfo, ipv4PrefixLength, ipv6PrefixLength *int, ipAddresses *map[string]map[int]map[string][]*AllocatedIPInfo, switchInfo *switchInfo, cnfInfo *CnfInfo, cnfName *string, networkIndex, switchIndex *int, clientLinkInfo *ClientLinkInfo, fipv4, fipv6, connType, netwType *string, multusInfo map[string]*MultusInfo)
func (*AppConfig) AssignNetworkInfoLoopback ¶
func (a *AppConfig) AssignNetworkInfoLoopback(group *int, itfceType, wlName, multusGenericWlName *string, netwInfo *NetworkInfo, ipv4PrefixLength, ipv6PrefixLength *int, ipAddresses *map[string]map[int]map[string][]*AllocatedIPInfo, switchInfo *switchInfo, cnfInfo *CnfInfo, cnfName, ipv4BGPAddress, ipv6BGPAddress *string, multusInfo map[string]*MultusInfo)
func (*AppConfig) InitializeCnfContainerData ¶
func (a *AppConfig) InitializeCnfContainerData(c *ContainerRegistry, pods map[string]map[string]interface{})
initializes the POD/Container information per CNF
func (*AppConfig) InitializeCnfNetworkData ¶
func (a *AppConfig) InitializeCnfNetworkData(cnfName string, cnfInfo *CnfInfo, p *Parser, appIPMap *AppIPMap, clientServer2NetworkLinks map[string]map[string]map[int]map[string][]*string, switchInfo *switchInfo)
initialize the network data per cnf
func (*AppConfig) UpdateWorkloadShortNames ¶
type AppIPMap ¶
AppIPMap per workload list of IP information that is relevant for the deployment and application
type AttachDef ¶
type AttachDef struct {
Name *string
CniVersion *string
ResourceName *string
Vlan *int
Type *string
PciBusID *string
DeviceID *string
Device *string
}
AttachDef
type BGPPeerInfo ¶
type ClientGroup ¶
type ClientGroup struct {
TargetGroup *string
Interfaces map[string][]*InterfaceDetails // string index contains the leaf switch name
}
type ClientLinkInfo ¶
type Cluster ¶
type Cluster struct {
ProjectId *string `yaml:"project_id,omitempty"`
ClusterName *string `yaml:"cluster_name,omitempty"`
Networks map[string]*NetworkInfo `yaml:"networks,omitempty"`
Kind *string `yaml:"kind,omitempty"`
Region *string `yaml:"region,omitempty"`
AnthosDir *string `yaml:"anthos_dir,omitempty"`
AnthosVersion *string `yaml:"anthos_version,omitempty"`
}
Cluster
type CnfInfo ¶
type CnfInfo struct {
Enabled *bool `yaml:"enabled,omitempty"`
Deployment *string `yaml:"deployment,omitempty"`
K *int `yaml:"k,omitempty"`
NameSpace *string `yaml:"namespace,omitempty"`
StorageClass *string `yaml:"storage_class,omitempty"`
PrometheusIP *string `yaml:"prometheus_ip,omitempty"`
Networking *PacoNetworkInfo `yaml:"networking,omitempty"`
Pods map[string]map[string]interface{} `yaml:"pods,omitempty"`
}
CnfInfo
type Config ¶
type Config struct {
Name *string `yaml:"name,omitempty"`
Credentials *Credentials `yaml:"credentials,omitempty"`
Topology *Topology `yaml:"topology,omitempty"`
Cluster *Cluster `yaml:"cluster,omitempty"`
ContainerRegistry *ContainerRegistry `yaml:"container_registry,omitempty"`
Infrastructure *Infrastructure `yaml:"infrastructure,omitempty"`
Workloads map[string]map[string]*WorkloadInfo `yaml:"workloads,omitempty"`
Application map[string]*PacoInfo `yaml:"application,omitempty"`
AppNetworkIndexes map[string]map[string]map[string]*int `yaml:"appnetwindexes,omitempty"`
}
Config defines lab configuration as it is provided in the YAML file
type ConfigFile ¶
type ConfigFile struct {
// contains filtered or unexported fields
}
ConfigFile type is a struct which defines parameters of the config file
type ContainerInfo ¶
type ContainerRegistry ¶
type ContainerRegistry struct {
Kind *string `yaml:"kind,omitempty"`
Name *string `yaml:"name,omitempty"`
Url *string `yaml:"url,omitempty"`
Server *string `yaml:"server,omitempty"`
ImageDir *string `yaml:"image_dir,omitempty"`
Email *string `yaml:"email,omitempty"`
Username *string `yaml:"username,omitempty"`
Secret *string `yaml:"secret,omitempty"`
}
ContainerRegistry
type ContainerRepo ¶
type Credentials ¶
type Credentials struct {
AnsibleUser *string `yaml:"ansible_user,omitempty"`
AnsibleSshPrivateKeyFile *string `yaml:"ansible_ssh_private_key_file,omitempty"`
AnsibleSshExtraArgs *string `yaml:"ansible_ssh_extra_args,omitempty"`
}
Credentials
type Endpoint ¶
type Endpoint struct {
Node *Node
PeerNode *Node
ShortName *string // e1-1
RealName *string // ethernet-1/1
Kind *string // loopback, isl, access
IPv4Prefix *string
IPv4NeighborPrefix *string
IPv4Address *string
IPv4NeighborAddress *string
IPv4PrefixLength *int
IPv6Prefix *string
IPv6NeighborPrefix *string
IPv6Address *string
IPv6NeighborAddress *string
IPv6PrefixLength *int
PeerAS *uint32
VlanTagging *bool // VLANid, used only for isl links
VlanID *string // VLANid, used only for isl links
Lag *bool // inidcation if the link is part of a LAG
LagMemberLink *bool // indication if a link is a member link of a LAG; e.g. ethernet-1/1 is a memer of lag1
LagName *string // name of a lag, clientname is used on linux
Sriov *bool // inidcation if the link is sriov enabled
IPVlan *bool // inidcation if the link is ipvlan enabled
Speed *string // link speed
Pxe *bool // used to drive lacp-fallback
}
Endpoint is a struct that contains information of a link endpoint
type GlobalParameters ¶
type GlobalParameters struct {
Multus map[string]*MultusInfo `yaml:"multus,omitempty"`
}
type IPinfo ¶
type IPinfo struct {
N2Ipv4 *string
N2Ipv6 *string
N8Ipv4 *string
N8Ipv6 *string
N11Ipv4 *string
N11Ipv6 *string
N12Ipv4 *string
N12Ipv6 *string
N14Ipv4 *string
N14Ipv6 *string
N15Ipv4 *string
N15Ipv6 *string
N17Ipv4 *string
N17Ipv6 *string
N22Ipv4 *string
N22Ipv6 *string
N20Ipv4 *string
N20Ipv6 *string
N26Ipv4 *string
N26Ipv6 *string
NnrfIpv4 *string
NnrfIpv6 *string
NsmsIPv4 *string
NsmsIPv6 *string
AmfSvcDefaultIPv4 *string
AmfSvcDefaultIPv6 *string
AmfSvcLocIPv4 *string
AmfSvcLocIPv6 *string
AmfSvcComIPv4 *string
AmfSvcComIPv6 *string
AmfSvcEeIPv4 *string
AmfSvcEeIPv6 *string
AmfSvcMtIPv4 *string
AmfSvcMtIPv6 *string
NfyEirIPv4 *string
NfyEirIPv6 *string
NfyAmfIPv4 *string
NfyAmfIPv6 *string
NfyAusfIPv4 *string
NfyAusfIPv6 *string
NfyNrfIPv4 *string
NfyNrfIPv6 *string
NfyNssfIPv4 *string
NfyNssfIPv6 *string
NfyPcfIPv4 *string
NfyPcfIPv6 *string
NfySmfIPv4 *string
NfySmfIPv6 *string
NfyUdmIPv4 *string
NfyUdmIPv6 *string
DnsIpdsIPv41 *string
DnsIpdsIPv61 *string
DnsIpdsIPv42 *string
DnsIpdsIPv62 *string
InternetDNS *string
PrimaryDnsIP *string
AusfIPv4 *string
AusfIPv6 *string
AusfPort *string
UdmIPv4 *string
UdmIPv6 *string
UdmPort *string
SmfIPv4 *string
SmfIPv6 *string
SmfPort *string
UpfCpIPv4 *string
UpfCpIPv6 *string
UpfUpIPv4 *string
UpfUpIPv6 *string
UpfPort *string
PrometheusIP *string
}
type Infrastructure ¶
type Infrastructure struct {
InternetDns *string `yaml:"internet_dns,omitempty"`
Protocols *Protocols `yaml:"protocols,omitempty"`
AddressingSchema *string `yaml:"addressing_schema,omitempty"`
Networks map[string]*NetworkInfo `yaml:"networks,omitempty"`
}
Infrastructure
type InterfaceDetails ¶
type InterfaceDetails struct {
Endpoint *Endpoint
}
type Ipam ¶
Ipam struct with index isl or lo, etc
func NewIPAM ¶
func NewIPAM(netwInfo *NetworkInfo) (*Ipam, error)
Allocates a new IPAM struct per link Kind (network, loopback, access, etc)
func (*Ipam) IPAMAllocPrefixPerLink ¶
IPAMLinkPrefixAlloc function allocates the ipv4 or ipv6 prefixes per link
func (*Ipam) IPAMAllocateAddress ¶
func (ipam *Ipam) IPAMAllocateAddress(kind *string, ipv4Cidrs, ipv6Cidrs []*string) (*Endpoint, error)
IPAMAllocateAddress - allocated address kind = network, access, loopback typically being used for loopback address allocation of the network elements
func (*Ipam) IPAMAllocateLinkPrefix ¶
IPAMAllocateLinkPrefix allocates a link prefix
type IpamAlloc ¶
type IpamAlloc struct {
PrefixLength *int
AllocatedSubnets map[string]*Link
NextFreeSubnet *net.IPNet
NextFreeAddress *string
}
IpamAlloc struct that holds the allocation of the prefix
type IpamApp ¶
type IpamApp struct {
Gateway *string
VlanID *int
AllocatedIPs []*AllocatedIPInfo
}
type KcikpiInfo ¶
type KcikpiInfo struct {
// contains filtered or unexported fields
}
type Link ¶
type Link struct {
A *Endpoint
B *Endpoint
MTU *int
Labels map[string]*string
Kind *string // isl: inter switch links, access: links to clients
VlanTagging *bool // VLANid, used only for isl links
VlanID *string // VLANid, used only for isl links
Lag *bool // inidcation if the link is part of a LAG
LagMemberLink *bool // indication if a link is a member link of a LAG; e.g. ethernet-1/1 is a memer of lag1
LagName *string // name of a lag, clientname is used on linux
ClientName *string // used in linux as the lag name
Numa *int // used to describe the numa
Sriov *bool // inidcation if the link is sriov enabled
IPVlan *bool // inidcation if the link is ipvlan enabled
Speed *string // link speed
Pxe *bool // used to drive lacp-fallback
// contains filtered or unexported fields
}
Link is a struct that contains the information of a link between 2 containers
type LinkConfig ¶
type Multus ¶
type Multus struct {
Lmg *MultusCnfInfo
Llb *MultusCnfInfo
AttachDef []*AttachDef `yaml:"attachDef"`
GroFlag *int
Dsf *MultusDataPlaneInfo
Xdp *MultusDataPlaneInfo
Dpdk *MultusDataPlaneInfo
}
Multus
type MultusCnfInfo ¶
MultusCnfInfo
type MultusDataPlaneInfo ¶
MultusDataPlaneInfo
type MultusInfo ¶
type NetworkInfo ¶
type NetworkInfo struct {
Ipv4Cidr []*string `yaml:"ipv4_cidr,omitempty"`
Ipv4ItfcePrefixLength *int `yaml:"ipv4_itfce_prefix_length,omitempty"`
Ipv6Cidr []*string `yaml:"ipv6_cidr,omitempty"`
Ipv6ItfcePrefixLength *int `yaml:"ipv6_itfce_prefix_length,omitempty"`
AddressingSchema *string `yaml:"addressing_schema,omitempty"`
Type *string `yaml:"type,omitempty"`
VlanID *int `yaml:"vlan_id,omitempty"`
Kind *string `yaml:"kind,omitempty"`
Target *string `yaml:"target,omitempty"`
NetworkIndex *int
SwitchIndex *int
TemplateKind string
Ipv4ItfceAddresses []*AllocatedIPInfo
Ipv6ItfceAddresses []*AllocatedIPInfo
//Ipv4UpItfceAddresses map[int][]*AllocatedIPInfo // key is the group
//Ipv6UpItfceAddresses map[int][]*AllocatedIPInfo // key is the group
Ipv4CpAddresses []*AllocatedIPInfo
Ipv6CpAddresses []*AllocatedIPInfo
Ipv4UpAddresses map[int][]*AllocatedIPInfo // key is the group
Ipv6UpAddresses map[int][]*AllocatedIPInfo // key is the group
Ipv4FloatingIP *string
Ipv6FloatingIP *string
Ipv4Gw *string
Ipv6Gw *string
Ipv4GwPerWl map[int][]string
Ipv6GwPerWl map[int][]string
InterfaceName *string
InterfaceEthernetName *string
Cni *string
NetworkShortName *string
ResShortName *string
IPv4BGPPeers map[int]*BGPPeerInfo
IPv6BGPPeers map[int]*BGPPeerInfo
IPv4BGPAddress *string
IPv6BGPAddress *string
VrfCpId *int
VrfUpId *int
AS *uint32
}
NetworkInfo
type NetworkInstance ¶
type Node ¶
type Node struct {
ShortName *string
Kind *string
Type *string
Labels map[string]*string
Group *string
Position *string
Topology *string
MgmtIPv4Address *string
MgmtIPv4PrefixLength *int
MgmtIPv6Address *string
MgmtIPv6PrefixLength *int
AS *uint32
Endpoints map[string]*Endpoint
Target *string
}
Node is a struct that contains the information of a node element
type NodeConfig ¶
type NodeConfig struct {
Kind *string `yaml:"kind,omitempty"` // srl, vr-sros, linux
Labels map[string]*string `yaml:"labels,omitempty"` // Labels are attributes
Group *string `yaml:"group,omitempty"`
Type *string `yaml:"type,omitempty"` // ixrd2, sr-1s, etc
Position *string `yaml:"position,omitempty"`
MgmtIPv4 *string `yaml:"mgmt_ipv4,omitempty"` // user-defined IPv4 address in the management network
MgmtIPv6 *string `yaml:"mgmt_ipv6,omitempty"` // user-defined IPv6 address in the management network
AS *uint32 `yaml:"as,omitempty"`
}
NodeConfig represents a configuration a given node can have in the lab definition file
type NodeSelector ¶
type NodeSelector struct{}
type PacoDeploymentInfo ¶
type PacoDeploymentInfo struct {
ConnectivityMode *string `yaml:"connectivitymode,omitempty"`
NetworkName *string `yaml:"networkname,omitempty"`
NetworkShortName *string `yaml:"networkshortname,omitempty"`
Nat *bool `yaml:"nat,omitempty"`
SigRefPoints *string `yaml:"sigrefpoints,omitempty"`
UePoolCidr *string `yaml:"uepoolcidr,omitempty"`
Supi [][]*string `yaml:"supi,omitempty"`
Plmn map[string]*int `yaml:"plmn,omitempty"`
Dnn []*string `yaml:"dnn,omitempty"`
TrackingArea []*string `yaml:"tac,omitempty"`
Slices map[string]*SliceInfo `yaml:"slices,omitempty"`
Apn *string `yaml:"apn,omitempty"`
}
PacoDeployemntInfo
type PacoInfo ¶
type PacoInfo struct {
Global *GlobalParameters `yaml:"global,omitempty"`
Deployment *PacoDeploymentInfo `yaml:"deployment,omitempty"`
Cnfs map[string]*CnfInfo `yaml:"cnfs,omitempty"`
}
PacoInfo
type PacoNetworkInfo ¶
type PacoNetworkInfo struct {
Type *string `yaml:"type,omitempty"`
AS *uint32 `yaml:"as,omitempty"`
Multus map[string]*MultusInfo `yaml:"multus,omitempty"`
}
type Parser ¶
type Parser struct {
BaseSwitchDir *string
BaseAppValuesDir *string
BaseAppKustomizesDir *string
BaseServerDir *string
BaseAppIpamDir *string
ConfigFile *ConfigFile
Config *Config
Nodes map[string]*Node
Links []*Link
IPAM map[string]*Ipam
NextAS *uint32
Workloads map[string]*Workload
ClientGroups map[string]*ClientGroup
// DeploymentIPAM is a map where
// first string key = multusNetworkName
// 2nd Key string = ipvlan, sriov1, sriov2
// 3rd key string = IP subnet, could be v4 or v6
DeploymentIPAM map[string]map[string]map[string]*IpamApp
// get the sriov and ipvlan networks and naming, etc
// clientLinks["ipvlan"] -> map with sriov/ipvlan -> interface name of the server (bond0 or bond1 or multiple bonds
// e.g. map[ipvlan:[bond0] sriov:[bond0]]
// clientSriovInfo -> map[key=servername] with list fo switches
// e.g. map[master0:[leaf1 leaf2]]
//ClientLinks map[string][]*ClientLinkInfo
// identify the server nodes and its respective leaf/tor switches
//ClientSriovInfo map[string][]string
// key1: sriov or ipvlan,
// key2: ServerLogicalInterfacename (bondx),
// key3: numa,
// key4: switch-name,
// value list of pfNames
ClientServer2NetworkLinks map[string]map[string]map[int]map[string][]*string
SwitchInfo *switchInfo
// contains filtered or unexported fields
}
func NewParser ¶
func NewParser(opts ...ParserOption) *Parser
NewParser function defines a new parser
func (*Parser) AssignSwitchBgpLoopback ¶
func (*Parser) AssignSwitchGWs ¶
func (p *Parser) AssignSwitchGWs(version, ipcidr, wlName, netwType *string, idx, gwidx int, netwInfo *NetworkInfo)
func (*Parser) CreateDirectory ¶
CreateDirectory creates a directory
func (*Parser) GetApplicationIndex ¶
func (*Parser) GetConfig ¶
GetConfig parses the configuration file into p.Config structure as well as populates the ConfigFile structure with the config-file related information
func (*Parser) InitializeIPAMWorkloads ¶
func (*Parser) InitializeSwitchToServerInformation ¶
func (p *Parser) InitializeSwitchToServerInformation()
func (*Parser) NewEndpoint ¶
NewEndpoint initializes a new endpoint object
func (*Parser) NewLink ¶
func (p *Parser) NewLink(l *LinkConfig) error
NewLink initializes a new link object
func (*Parser) NewNode ¶
func (p *Parser) NewNode(nodeName string, nodeCfg *NodeConfig) (*Node, error)
NewNode initializes a new node object
func (*Parser) ParseApplicationData ¶
func (p *Parser) ParseApplicationData()
func (*Parser) ParseClientGroup ¶
ParseClientGroup parses the client group part of the configuration file which client groups do we have and which device, interfaces are connected
func (*Parser) ParseCnfKustomize ¶
func (*Parser) ParseServerData ¶
func (p *Parser) ParseServerData()
func (*Parser) ParseTopology ¶
ParseTopology parses the topology part of the configuration file
func (*Parser) RenderNetworkAttachement ¶
func (p *Parser) RenderNetworkAttachement(t *template.Template, dirName *string, values *Values) error
RenderNetworkAttachement function writes the network Attachement file
func (*Parser) RenderSriovConfigMap ¶
func (p *Parser) RenderSriovConfigMap(t *template.Template, dirName *string, sriovc map[string]map[string]map[int]map[string][]*string) error
RenderSriovConfigMap function writes the sriov config map to be used for the cluster
func (*Parser) RenderStatefulSet ¶
RenderStatefulSet function writes the StatefulSet file
func (*Parser) RenderToActiveConfigMap ¶
func (p *Parser) RenderToActiveConfigMap(t *template.Template, dirName *string, values *Values) error
RenderToActiveConfigMap function writes the ActiveConfigMap file
func (*Parser) ShowClientGroup ¶
func (*Parser) ShowTopology ¶
func (p *Parser) ShowTopology()
ShowTopology show the topology that was initialized
func (*Parser) UpdateUniqueClientLink ¶
func (*Parser) WriteApplicationDeploymentIPAM ¶
func (*Parser) WriteClientsGroups ¶
func (*Parser) WriteCnfValues ¶
func (p *Parser) WriteCnfValues(t *template.Template, dirName, cnfName *string, appc *AppConfig, appIPMap *AppIPMap) error
WriteUpfValues function writes the amf values file
func (*Parser) WriteFinalBase ¶
func (*Parser) WriteInfrastructure ¶
func (*Parser) WriteKustomize ¶
WriteKustomize function writes the kustomize resource file
func (*Parser) WriteSrlInterface ¶
func (p *Parser) WriteSrlInterface(dirName, fileName, resName, target *string, interfaces []*k8ssrlinterface) error
WriteSrlInterface function writes the k8s srl interface resource
func (*Parser) WriteSrlIrbSubInterface ¶
func (p *Parser) WriteSrlIrbSubInterface(dirName, fileName, resName, target *string, irbsubinterfaces []*k8ssrlirbsubinterface) error
WriteSrlIrbSubInterface function writes the k8s srl subinterface resource
func (*Parser) WriteSrlNetworkInstance ¶
func (p *Parser) WriteSrlNetworkInstance(dirName, fileName, resName, target *string, netwinstance *k8ssrlNetworkInstance) error
WriteSrlNetworkInstance function writes the k8s srl network-instance resource
func (*Parser) WriteSrlNetworkInstanceBgpEvpn ¶
func (p *Parser) WriteSrlNetworkInstanceBgpEvpn(dirName, fileName, resName, target *string, netwInstanceProtocol *k8ssrlNetworkInstance) error
WriteSrlNetworkInstanceBgpEvpn function writes the k8s srl network-instance bgpevpn protocol resource
func (*Parser) WriteSrlNetworkInstanceBgpVpn ¶
func (p *Parser) WriteSrlNetworkInstanceBgpVpn(dirName, fileName, resName, target *string, netwInstanceProtocol *k8ssrlNetworkInstance) error
WriteSrlNetworkInstanceBgpVpn function writes the k8s srl network-instance bgpvpn protocol resource
func (*Parser) WriteSrlNetworkInstanceLinux ¶
func (p *Parser) WriteSrlNetworkInstanceLinux(dirName, fileName, resName, target *string, netwInstanceProtocol *k8ssrlNetworkInstance) error
WriteSrlNetworkInstanceLinux function writes the k8s srl network-instance bgpevpn protocol resource
func (*Parser) WriteSrlProtocolsBgp ¶
func (p *Parser) WriteSrlProtocolsBgp(dirName, fileName, resName, target *string, protocolsbgp *k8ssrlprotocolsbgp) error
WriteSrlNetworkInstance function writes the k8s srl protocols bgp resource
func (*Parser) WriteSrlRoutingPolicy ¶
func (p *Parser) WriteSrlRoutingPolicy(dirName, fileName, resName, target *string, routingPolicy *k8ssrlRoutingPolicy) error
WriteSrlNetworkInstanceLinux function writes the k8s srl network-instance bgpevpn protocol resource
func (*Parser) WriteSrlSubInterface ¶
func (p *Parser) WriteSrlSubInterface(dirName, fileName, resName, target *string, subinterfaces []*k8ssrlsubinterface) error
WriteSrlInterface function writes the k8s srl subinterface resource
func (*Parser) WriteSrlSystemNetworkInstance ¶
func (*Parser) WriteSrlTunnelInterface ¶
func (p *Parser) WriteSrlTunnelInterface(dirName, fileName, resName, target *string, tunnelinterfaces []*k8ssrlTunnelInterface) error
WriteSrlTunnelInterface function writes the k8s srl tunnel-interface resource
func (*Parser) WriteSrlVxlanInterface ¶
func (p *Parser) WriteSrlVxlanInterface(dirName, fileName, resName, target *string, vxlaninterfaces []*k8ssrlVxlanInterface) error
WriteSrlVxlanInterface function writes the k8s srl vxlan interface within the tunnelinterface resource
func (*Parser) WriteWorkloads ¶
type ParserOption ¶
type ParserOption func(p *Parser)
func WithConfigFile ¶
func WithConfigFile(file *string) ParserOption
WithConfigFile initializes and marshals the config file
func WithOutput ¶
func WithOutput(o *string) ParserOption
WithOutput initializes the output variable
type PodResources ¶
type PodRootInfo ¶
type PodSecurityPolicy ¶
type Protocols ¶
type Protocols struct {
Protocol *string `yaml:"protocol,omitempty"`
AsPool []*uint32 `yaml:"as_pool,omitempty"`
OverlayAs *uint32 `yaml:"overlay_as,omitempty"`
OverlayProtocol *string `yaml:"overlay_protocol,omitempty"`
}
Protocols
type Redundancy ¶
type Redundancy struct {
Active *int
}
type RenderedNetworkInfo ¶
type RenderedNetworkInfo struct {
Ipv4Cidr *string
Ipv6Cidr *string
Ipv4PrefixLength *int
Ipv6PrefixLength *int
VlanID *int
Target *string
NetworkIndex *int
SwitchIndex *int
Ipv4Addresses []*AllocatedIPInfo
Ipv6Addresses []*AllocatedIPInfo
Ipv4FloatingIP *string
Ipv6FloatingIP *string
Ipv4Gw *string
Ipv6Gw *string
Ipv4GwPerWl map[int][]string
Ipv6GwPerWl map[int][]string
InterfaceName *string
InterfaceEthernetName *string
Numa *int
Cni *string
NetworkShortName *string
ResShortName *string
IPv4BGPPeers map[int]*BGPPeerInfo
IPv6BGPPeers map[int]*BGPPeerInfo
IPv4BGPAddress *string
IPv6BGPAddress *string
VrfCpId *int
VrfUpId *int
AS *uint32
}
type Resource ¶
type Resource struct {
Cpu *int
Memory *string
Hugepages1Gi *string
Multus []*MultusCnfInfo
NodeSelector *NodeSelector
}
type RtScheduling ¶
type ScrapeInterval ¶
type ScrapeInterval struct {
// contains filtered or unexported fields
}
type SliceInfo ¶
type SliceInfo struct {
Value int `yaml:"value,omitempty"`
Diff []map[string]string `yaml:"diff,omitempty"`
}
SliceInfo
type Topology ¶
type Topology struct {
Defaults *NodeConfig `yaml:"defaults,omitempty"`
Kinds map[string]*NodeConfig `yaml:"kinds,omitempty"`
Nodes map[string]*NodeConfig `yaml:"nodes,omitempty"`
Links []*LinkConfig `yaml:"links,omitempty"`
}
Topology represents a lab topology
type Values ¶
type Values struct {
Namespace *string
NodeSelector *NodeSelector
AntiAffinity *AntiAffinity
Uuid *string
ImagePullSecret *string
Image *PodRootInfo
AwsSideCar *PodInfo
Logging *PodInfo
Nasc *PodInfo
Multus *Multus
LmgScale *Scale
LlbScale *Scale
Resources *PodResources
GwConfig *string
GwRedundancy *Redundancy
Storage *Storage
RtScheduling *RtScheduling
LoamB *Enable
PodSecurityPolicy *PodSecurityPolicy
}
type Workload ¶
type Workload struct {
NetworkInstance map[string]*NetworkInstance
}
type WorkloadInfo ¶
type WorkloadInfo struct {
Itfces map[string]*NetworkInfo `yaml:"itfces,omitempty"`
Loopbacks map[string]*NetworkInfo `yaml:"loopbacks,omitempty"`
}
WorkloadInfo