Documentation ¶
Index ¶
- Constants
- Variables
- func NewUnderlay(subnet string, asnbegin uint32) (*underlay, error)
- func PrintMaterials(tw *tabwriter.Writer, lom LOM, parentQuantity int, depth int)
- func Run(fa *xir.Facility)
- type AllocMod
- type AllocModeMod
- type BreakoutConnectorMod
- type Builder
- func (tb *Builder) Breakout(nic *xir.NIC, single *xir.Port, multi []*xir.Port, mods ...Modifier) []*xir.Cable
- func (tb *Builder) BreakoutMultiTrunk(nic *xir.NIC, single *xir.Port, multi []*xir.Port, ...) []*xir.Cable
- func (tb *Builder) BreakoutTrunk(nic *xir.NIC, single *xir.Port, multi []*xir.Port, ...) []*xir.Cable
- func (tb *Builder) Connect(a, b *xir.Port, mods ...Modifier) *xir.Cable
- func (b *Builder) Facility() *xir.Facility
- func (b *Builder) Gateway(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) Gateways(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) GetResource(id string) *xir.Resource
- func (b *Builder) InfraLeaf(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) InfraLeaves(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) InfraSpine(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) InfraSpines(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) InfraStem(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) InfraStems(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) InfrapodServer(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) InfrapodServers(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) Infraserver(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) Infraservers(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) MgmtLeaf(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) MgmtLeaves(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) MgmtSpine(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) MgmtSpines(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) NetworkEmulator(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) NetworkEmulators(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) Node(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) NodeWithBGP(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) Nodes(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) NodesWithBGP(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) OpsServer(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) OpsServers(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) PhysicsSimulator(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) PhysicsSimulators(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) StorageServer(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) StorageServers(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (tb *Builder) Trunk(as, bs []*xir.Port, bondNameA, bondNameB string, mods ...Modifier) []*xir.Cable
- func (b *Builder) XpLeaf(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) XpLeaves(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) XpSpine(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) XpSpines(count int, idprefix string, mods ...Modifier) []*xir.Resource
- func (b *Builder) XpStem(id string, mods ...Modifier) *xir.Resource
- func (b *Builder) XpStems(count int, idprefix string, mods ...Modifier) []*xir.Resource
- type CableKindMod
- type CapacityMod
- type ConnectorMod
- type CoresMod
- type DefaultImageMod
- type DimmConstructor
- type DimmTypeMod
- type DimmsConstructor
- type DiskConstructor
- type DiskInterfaceMod
- type DiskRoleMod
- type DisksConstructor
- type FirmwareMod
- type GraphologyEdge
- type GraphologyNode
- type GraphologySpec
- type IPCounter
- type IpmiPowerControlMod
- type LOM
- type LinkRoleMod
- type Material
- type Modifier
- func ACC() Modifier
- func ACCBreakout() Modifier
- func AOC() Modifier
- func AOCBreakout() Modifier
- func BareMetal() Modifier
- func Bios() Modifier
- func Combo(count uint, mods ...Modifier) Modifier
- func Cores(count uint32) Modifier
- func DAC() Modifier
- func DACBreakout() Modifier
- func DDR3() Modifier
- func DDR4() Modifier
- func Dimms(count uint, mods ...Modifier) Modifier
- func Disks(count uint, mods ...Modifier) Modifier
- func Emu(indices ...uint) Modifier
- func Eno(count uint, mods ...Modifier) Modifier
- func Enp(count uint, start uint32, mods ...Modifier) Modifier
- func Ens(count uint, mods ...Modifier) Modifier
- func EtcdDisk() Modifier
- func Eth(count uint, mods ...Modifier) Modifier
- func Gbps(value uint64) Modifier
- func Gw(indices ...uint) Modifier
- func HDDs(count uint, mods ...Modifier) Modifier
- func Hypervisor() Modifier
- func Infranet(indices ...uint) Modifier
- func Ipmi(count uint, mods ...Modifier) Modifier
- func MarinerDisk() Modifier
- func Mbps(value uint64) Modifier
- func Mgmt(indices ...uint) Modifier
- func MinioDisk() Modifier
- func NVMEs(count, controllerIndex uint, mods ...Modifier) Modifier
- func NVMEsController(count, controllerIndex uint, mods ...Modifier) Modifier
- func PortNames(names ...string) Modifier
- func Procs(count uint, mods ...Modifier) Modifier
- func QSFP28() Modifier
- func QSFP28_2xQSFP28() Modifier
- func QSFP28_4xSFP28() Modifier
- func QSFP56() Modifier
- func QSFP56_2xQSFP56() Modifier
- func QSFP56_2xSFP56() Modifier
- func QSFP56_4xSFP56() Modifier
- func QSFPDD() Modifier
- func QSFPDD_2xQSFP28() Modifier
- func QSFPDD_2xQSFP56() Modifier
- func QSFPDD_4xQSFP28() Modifier
- func QSFPDD_4xQSFP56() Modifier
- func QSFPDD_8xLC() Modifier
- func QSFPDD_8xSFP28() Modifier
- func QSFPDD_8xSFP56() Modifier
- func QSFPP() Modifier
- func QSFPP_4xSFPP() Modifier
- func RJ45() Modifier
- func RallyDisk() Modifier
- func Reserved(value uint64) Modifier
- func SFP28() Modifier
- func SFP56() Modifier
- func SFPP() Modifier
- func SSDs(count uint, mods ...Modifier) Modifier
- func Sata3() Modifier
- func Swp(count uint, mods ...Modifier) Modifier
- func SysDisk() Modifier
- func Uefi() Modifier
- func VFs(vfcnt uint32) Modifier
- func Virtio() Modifier
- func Xpnet(indices ...uint) Modifier
- type NICConstructor
- type PortNameMod
- type ProcConstructor
- type ProcsConstructor
- type ProductInfo
- type ProductManufacturer
- type ProductModel
- type ProductSKU
- type RavenPowerControlMod
- type ReservedMod
- type RoleAddMod
- type RoleMod
- type RootdevMod
- type ServiceEndpointMod
- type TBLOM
- type VFCountMod
Constants ¶
const ( ImagenetVNI uint32 = 3 StornetVNI uint32 = 4 )
Variables ¶
var (
IndexPad = 0
)
Functions ¶
func NewUnderlay ¶ added in v0.3.5
func PrintMaterials ¶
Types ¶
type AllocModeMod ¶
type AllocModeMod struct {
Modes []xir.AllocMode
}
func AllocModes ¶
func AllocModes(modes ...xir.AllocMode) AllocModeMod
func (AllocModeMod) Modify ¶
func (a AllocModeMod) Modify(x interface{})
type BreakoutConnectorMod ¶
type BreakoutConnectorMod struct { Single xir.ConnectorKind Multi xir.ConnectorKind }
func (*BreakoutConnectorMod) Modify ¶
func (m *BreakoutConnectorMod) Modify(x interface{})
type Builder ¶
type Builder struct { Id string FQDN string Underlay map[string]*underlay Resources []*xir.Resource Cables []*xir.Cable Cache *cache.Cache }
func NewBuilder ¶
func (*Builder) BreakoutMultiTrunk ¶ added in v0.3.2
func (*Builder) BreakoutTrunk ¶ added in v0.3.1
func (*Builder) GetResource ¶ added in v0.3.1
func (*Builder) InfraLeaves ¶
func (*Builder) InfraSpine ¶
func (*Builder) InfraSpines ¶
func (*Builder) InfraStems ¶
func (*Builder) InfrapodServer ¶ added in v0.3.20
func (*Builder) InfrapodServers ¶ added in v0.3.20
func (*Builder) Infraserver ¶
func (*Builder) Infraservers ¶
func (*Builder) MgmtLeaves ¶
func (*Builder) MgmtSpines ¶
func (*Builder) NetworkEmulator ¶
func (*Builder) NetworkEmulators ¶
func (*Builder) NodeWithBGP ¶ added in v0.3.1
func (*Builder) NodesWithBGP ¶ added in v0.3.1
These next two functions are currently only used in testing models to test pathfinding between devices with a VTEP on it.
These aren't expected to be actually useful in a production model, as no realization process currently places a VTEP on a node.
In a production model, use the regular Node/Nodes builders instead to avoid allocating BGP addresses for devices that won't use it.
func (*Builder) OpsServers ¶ added in v0.3.5
func (*Builder) PhysicsSimulator ¶
func (*Builder) PhysicsSimulators ¶
func (*Builder) StorageServer ¶
func (*Builder) StorageServers ¶
type CableKindMod ¶
type CableKindMod struct {
Value xir.CableKind
}
func (*CableKindMod) Modify ¶
func (m *CableKindMod) Modify(x interface{})
type CapacityMod ¶
type CapacityMod struct {
Value uint64
}
func GB ¶
func GB(value uint64) *CapacityMod
func TB ¶
func TB(value uint64) *CapacityMod
func (*CapacityMod) Modify ¶
func (m *CapacityMod) Modify(x interface{})
type ConnectorMod ¶
type ConnectorMod struct {
Value xir.ConnectorKind
}
func (*ConnectorMod) Modify ¶
func (m *ConnectorMod) Modify(x interface{})
type DefaultImageMod ¶
type DefaultImageMod struct {
Image string
}
func DefaultImage ¶
func DefaultImage(img string) DefaultImageMod
func (DefaultImageMod) Modify ¶
func (i DefaultImageMod) Modify(x interface{})
type DimmConstructor ¶
type DimmConstructor func() *xir.Dimm
func (DimmConstructor) Modify ¶
func (ctor DimmConstructor) Modify(x interface{})
type DimmTypeMod ¶
type DimmTypeMod struct {
Value xir.MemoryType
}
func (*DimmTypeMod) Modify ¶
func (m *DimmTypeMod) Modify(x interface{})
type DimmsConstructor ¶
type DimmsConstructor func() []*xir.Dimm
func (DimmsConstructor) Modify ¶
func (ctor DimmsConstructor) Modify(x interface{})
type DiskConstructor ¶
type DiskConstructor func() *xir.Disk
func (DiskConstructor) Modify ¶
func (ctor DiskConstructor) Modify(x interface{})
type DiskInterfaceMod ¶
type DiskInterfaceMod struct {
Value xir.DiskInterface
}
func (*DiskInterfaceMod) Modify ¶
func (m *DiskInterfaceMod) Modify(x interface{})
type DiskRoleMod ¶
type DiskRoleMod struct {
Value xir.DiskRole
}
func (*DiskRoleMod) Modify ¶
func (m *DiskRoleMod) Modify(x interface{})
type DisksConstructor ¶
type DisksConstructor func() []*xir.Disk
func (DisksConstructor) Modify ¶
func (ctor DisksConstructor) Modify(x interface{})
type FirmwareMod ¶
type FirmwareMod struct {
Value xir.Firmware_Kind
}
func (*FirmwareMod) Modify ¶
func (m *FirmwareMod) Modify(x interface{})
type GraphologyEdge ¶
type GraphologyNode ¶
type GraphologySpec ¶
type GraphologySpec struct { Nodes []GraphologyNode `json:"nodes"` Edges []GraphologyEdge `json:"edges"` }
type IPCounter ¶
type IPCounter struct {
// contains filtered or unexported fields
}
func NewIPCounter ¶
type IpmiPowerControlMod ¶ added in v0.3.1
type IpmiPowerControlMod struct { }
func BMCIpmi ¶ added in v0.3.1
func BMCIpmi() IpmiPowerControlMod
func (IpmiPowerControlMod) Modify ¶ added in v0.3.1
func (ipcm IpmiPowerControlMod) Modify(x interface{})
type LinkRoleMod ¶
type LinkRoleMod struct { Value xir.LinkRole Indices []uint }
LinkRoleMod is a Modifier for changing LinkRole
func (*LinkRoleMod) Modify ¶
func (m *LinkRoleMod) Modify(nic interface{})
type Material ¶
func (*Material) ConfigItems ¶
type Modifier ¶
type Modifier interface {
Modify(x interface{})
}
func ACCBreakout ¶ added in v0.3.22
func ACCBreakout() Modifier
func AOCBreakout ¶ added in v0.3.11
func AOCBreakout() Modifier
func DACBreakout ¶ added in v0.3.11
func DACBreakout() Modifier
func Hypervisor ¶
func Hypervisor() Modifier
func MarinerDisk ¶ added in v0.3.8
func MarinerDisk() Modifier
func NVMEsController ¶ added in v0.3.8
"count" NVMEs on controller "controllerIndex"
func QSFP28_2xQSFP28 ¶
func QSFP28_2xQSFP28() Modifier
func QSFP28_4xSFP28 ¶
func QSFP28_4xSFP28() Modifier
func QSFP56_2xQSFP56 ¶ added in v0.3.22
func QSFP56_2xQSFP56() Modifier
func QSFP56_2xSFP56 ¶ added in v0.3.22
func QSFP56_2xSFP56() Modifier
func QSFP56_4xSFP56 ¶ added in v0.3.22
func QSFP56_4xSFP56() Modifier
func QSFPDD_2xQSFP28 ¶ added in v0.3.22
func QSFPDD_2xQSFP28() Modifier
func QSFPDD_2xQSFP56 ¶ added in v0.3.22
func QSFPDD_2xQSFP56() Modifier
func QSFPDD_4xQSFP28 ¶ added in v0.3.22
func QSFPDD_4xQSFP28() Modifier
func QSFPDD_4xQSFP56 ¶ added in v0.3.22
func QSFPDD_4xQSFP56() Modifier
func QSFPDD_8xLC ¶ added in v0.3.22
func QSFPDD_8xLC() Modifier
func QSFPDD_8xSFP28 ¶ added in v0.3.22
func QSFPDD_8xSFP28() Modifier
func QSFPDD_8xSFP56 ¶ added in v0.3.22
func QSFPDD_8xSFP56() Modifier
func QSFPP_4xSFPP ¶
func QSFPP_4xSFPP() Modifier
type NICConstructor ¶
type NICConstructor func() *xir.NIC
func (NICConstructor) Modify ¶
func (ctor NICConstructor) Modify(x interface{})
type PortNameMod ¶ added in v0.3.16
type PortNameMod struct {
Names []string
}
func (*PortNameMod) Modify ¶ added in v0.3.16
func (m *PortNameMod) Modify(nic interface{})
type ProcConstructor ¶
type ProcConstructor func() *xir.Proc
func (ProcConstructor) Modify ¶
func (ctor ProcConstructor) Modify(x interface{})
type ProcsConstructor ¶
type ProcsConstructor func() []*xir.Proc
func (ProcsConstructor) Modify ¶
func (ctor ProcsConstructor) Modify(x interface{})
type ProductInfo ¶
type ProductInfo struct {
// contains filtered or unexported fields
}
func Product ¶
func Product(args ...string) ProductInfo
func (ProductInfo) Modify ¶
func (p ProductInfo) Modify(x interface{})
type ProductManufacturer ¶
type ProductManufacturer struct {
// contains filtered or unexported fields
}
func Manufacturer ¶
func Manufacturer(x string) ProductManufacturer
func (ProductManufacturer) Modify ¶
func (p ProductManufacturer) Modify(x interface{})
type ProductModel ¶
type ProductModel struct {
// contains filtered or unexported fields
}
func Model ¶
func Model(x string) ProductModel
func (ProductModel) Modify ¶
func (p ProductModel) Modify(x interface{})
type ProductSKU ¶
type ProductSKU struct {
// contains filtered or unexported fields
}
func SKU ¶
func SKU(x string) ProductSKU
func (ProductSKU) Modify ¶
func (p ProductSKU) Modify(x interface{})
type RavenPowerControlMod ¶
type RavenPowerControlMod struct {
Host string
}
func Raven ¶
func Raven(host string) RavenPowerControlMod
func (RavenPowerControlMod) Modify ¶
func (rpcm RavenPowerControlMod) Modify(x interface{})
type ReservedMod ¶ added in v0.3.19
type ReservedMod struct {
Value uint64
}
ReservedMod is a mod for reserving things: marking them as not for allocation, or non-commissionable
func (*ReservedMod) Modify ¶ added in v0.3.19
func (m *ReservedMod) Modify(x interface{})
type RoleAddMod ¶
type RoleAddMod struct {
Roles []xir.Role
}
func RoleAdd ¶
func RoleAdd(roles ...xir.Role) RoleAddMod
func (RoleAddMod) Modify ¶
func (a RoleAddMod) Modify(x interface{})
type RootdevMod ¶
type RootdevMod struct {
Rootdev string
}
func Rootdev ¶
func Rootdev(dev string) RootdevMod
func (RootdevMod) Modify ¶
func (m RootdevMod) Modify(x interface{})
type ServiceEndpointMod ¶
func ServiceEndpoint ¶
func ServiceEndpoint(vni uint32, address string) ServiceEndpointMod
func (ServiceEndpointMod) Modify ¶
func (a ServiceEndpointMod) Modify(x interface{})
type VFCountMod ¶ added in v0.3.16
type VFCountMod struct {
VFCount uint32
}
VFMod is a Modifier for marking this port as as supporting Value VFs
func (*VFCountMod) Modify ¶ added in v0.3.16
func (m *VFCountMod) Modify(nic interface{})
Modify appends a given number of VF-ports to the NIC (for each existing port)