menu

package
v0.0.0-...-1eec387 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(r io.Reader, menuFileDir string) (*menu, error)

Parse reads a yaml document and create menu

Types

type BirdCoreArgs

type BirdCoreArgs struct {
	Internet string
	ASNCore  int
	ASNSpine int
	Spines   []*SpineArgs
}

type BirdRackArgs

type BirdRackArgs struct {
	ASNSpine int
	Spines   []*SpineArgs
	Rack     *RackArgs
}

type BirdSpineArgs

type BirdSpineArgs struct {
	SpineIdx         int
	ASNCore          int
	ASNSpine         int
	LoadBalancer     string
	Bastion          string
	Ingress          string
	Global           string
	Pod              string
	CoreSpineAddress string
	Racks            []*RackArgs
}

type ChronyIgnitionArgs

type ChronyIgnitionArgs struct {
	NTPServers []string
	Gateway    string
	ChronyTag  string
}

type Cluster

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

Cluster is the config file generator for Placemat

func NewCluster

func NewCluster(menu *menu) (*Cluster, error)

NewCluster creates a Cluster instance

func (*Cluster) Generate

func (c *Cluster) Generate(inputDir, outputDir string, opt *GenerateOption) error

Generate generates config files for Placemat

type GenerateOption

type GenerateOption struct {
	ChronyTag string
}

GenerateOption is a option for Cluster.Generate().

type MachinesYamlArgs

type MachinesYamlArgs struct {
	Racks []*RackArgs
}

type NodeArgs

type NodeArgs struct {
	Name           string
	BastionAddress string
	Node1Address   string
	Node2Address   string
}

type RackArgs

type RackArgs struct {
	Name     string
	Index    int
	ASN      int
	ToR1     ToRArgs
	ToR2     ToRArgs
	BootNode NodeArgs
	CSList   []*NodeArgs
	SSList   []*NodeArgs
}

type SeedYamlArgs

type SeedYamlArgs struct {
	Name string
	Rack *RackArgs
}

type SetupIPTablesArgs

type SetupIPTablesArgs struct {
	Internet string
	NTP      string
}

type SpineArgs

type SpineArgs struct {
	Name        string
	CoreAddress string
	ToR1Address string
	ToR2Address string
}

type ToRArgs

type ToRArgs struct {
	NodeInterface  string
	SpineAddresses []string
}

Jump to

Keyboard shortcuts

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