Documentation
¶
Index ¶
Constants ¶
View Source
const ( LabelTopologyRegion = "topology.kubernetes.io/region" LabelTopologyZone = "topology.kubernetes.io/zone" )
Variables ¶
This section is empty.
Functions ¶
func InstanceID ¶ added in v1.0.0
InstanceID returns the simulated instance ID for a model hostname.
Types ¶
type CapacityBlock ¶
type CapacityBlock struct {
Switch string `yaml:"switch"`
Nodes []string `yaml:"nodes"`
Labels map[string]string `yaml:"labels"`
Annotations map[string]string `yaml:"annotations"`
}
CapacityBlock is the blocks entry shape in simulation model YAML.
type Model ¶
type Model struct {
Switches map[string]*Switch `yaml:"switches"`
Nodes map[string]*Node `yaml:"-"`
CapacityBlocks []CapacityBlock `yaml:"blocks"`
// derived
Instances []topology.ComputeInstances `yaml:"-"`
}
func NewModelFromData ¶ added in v0.3.0
func NewModelFromFile ¶
func (*Model) InstanceMap ¶ added in v0.5.0
type Node ¶
Node is a compute instance in a simulation model. Annotations hold provider-specific test inputs and are not exported as topology labels.
func (*Node) AcceleratorDomain ¶ added in v1.0.0
AcceleratorDomain returns the simulated accelerator-domain identifier.
func (*Node) AcceleratorSubDomain ¶ added in v1.0.0
AcceleratorSubDomain returns the simulated accelerator sub-domain identifier.
type Switch ¶
type Switch struct {
Name string `yaml:"name,omitempty"`
Labels map[string]string `yaml:"labels"`
Annotations map[string]string `yaml:"annotations"`
Switches []string `yaml:"switches"`
Nodes []string `yaml:"-"`
}
Switch is a switch vertex in a simulation model YAML tree (tests/models).
Click to show internal directories.
Click to hide internal directories.