Documentation
¶
Index ¶
- Variables
- func BuildCSMNetworks(internalNetConfigs map[string]NetworkLayoutConfiguration, ...) (map[string]*networking.IPV4Network, error)
- func ConvertIPV4NetworksToSLS(networks *[]networking.IPV4Network) map[string]slsCommon.Network
- func ConvertManagementSwitchToSLS(s *networking.ManagementSwitch) (slsCommon.GenericHardware, error)
- func ExtractSwitchesfromReservations(subnet *networking.IPV4Subnet) ([]networking.ManagementSwitch, error)
- func GenCabinetMap(cd []sls.CabinetGroupDetail, shastaNetworks map[string]*networking.IPV4Network) map[slsCommon.CabinetType]map[string]CabinetTemplate
- func GenerateSLSState(inputState GeneratorInputState, hmnRows []shcdParser.HMNRow) slsCommon.SLSState
- func NewCommand() *cobra.Command
- type CabinetTemplate
- type GeneratorApplicationNodeConfig
- type GeneratorInputState
- type NetworkLayoutConfiguration
- func GenDefaultBICANConfig(systemDefaultRoute string) NetworkLayoutConfiguration
- func GenDefaultCANConfig() NetworkLayoutConfiguration
- func GenDefaultCHNConfig() NetworkLayoutConfiguration
- func GenDefaultCMNConfig(ncns int, switches int) NetworkLayoutConfiguration
- func GenDefaultHMNConfig() NetworkLayoutConfiguration
- func GenDefaultHSNConfig() NetworkLayoutConfiguration
- func GenDefaultMTLConfig() NetworkLayoutConfiguration
- func GenDefaultNMNConfig() NetworkLayoutConfiguration
- type StateGenerator
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultMountainChassisList contains the default list of liquid cooled chassis for a TODO MODEL cabinet DefaultMountainChassisList = []int{ 0, 1, 2, 3, 4, 5, 6, 7, } // DefaultHillChassisList contains the default list of liquid cooled chassis for a TODO MODEL cabinet DefaultHillChassisList = []int{ 1, 3, } // DefaultRiverChassisList contains the default list of air cooled chassis for standard 19 inch rack DefaultRiverChassisList = []int{0} )
Functions ¶
func BuildCSMNetworks ¶
func BuildCSMNetworks( internalNetConfigs map[string]NetworkLayoutConfiguration, internalCabinetDetails []sls.CabinetGroupDetail, switches []*networking.ManagementSwitch, ) (map[string]*networking.IPV4Network, error)
BuildCSMNetworks creates an array of IPv4 Networks based on the supplied system configuration
func ConvertIPV4NetworksToSLS ¶
func ConvertIPV4NetworksToSLS(networks *[]networking.IPV4Network) map[string]slsCommon.Network
ConvertIPV4NetworksToSLS converts IPV4 network definitions to a compatible format for SLS.
func ConvertManagementSwitchToSLS ¶
func ConvertManagementSwitchToSLS(s *networking.ManagementSwitch) (slsCommon.GenericHardware, error)
ConvertManagementSwitchToSLS converts a management switch to a format compatible with SLS.
func ExtractSwitchesfromReservations ¶
func ExtractSwitchesfromReservations(subnet *networking.IPV4Subnet) ([]networking.ManagementSwitch, error)
ExtractSwitchesfromReservations extracts all the switches from a IP network.
func GenCabinetMap ¶
func GenCabinetMap( cd []sls.CabinetGroupDetail, shastaNetworks map[string]*networking.IPV4Network, ) map[slsCommon.CabinetType]map[string]CabinetTemplate
GenCabinetMap creates a map of cabinets.
func GenerateSLSState ¶
func GenerateSLSState(inputState GeneratorInputState, hmnRows []shcdParser.HMNRow) slsCommon.SLSState
GenerateSLSState generates new SLSState object from an input state and hmn-connections file.
Types ¶
type CabinetTemplate ¶
type CabinetTemplate struct { Xname xnames.Cabinet Model string Class slsCommon.CabinetType CabinetNetworks map[string]map[string]slsCommon.CabinetNetworks LiquidCooledChassisList []int AirCooledChassisList []int }
CabinetTemplate Should this be merged with Cabinet detail?
type GeneratorApplicationNodeConfig ¶
type GeneratorApplicationNodeConfig struct { Prefixes []string `yaml:"prefixes"` PrefixHSMSubroles map[string]string `yaml:"prefix_hsm_subroles"` Aliases map[string][]string `yaml:"aliases"` }
GeneratorApplicationNodeConfig is given to the SLS config generator to control the application node generation in SLS
func (*GeneratorApplicationNodeConfig) Normalize ¶
func (applicationNodeConfig *GeneratorApplicationNodeConfig) Normalize() error
Normalize the values of the GeneratorApplicationNodeConfig structure
func (*GeneratorApplicationNodeConfig) Validate ¶
func (applicationNodeConfig *GeneratorApplicationNodeConfig) Validate() error
Validate GeneratorApplicationNodeConfig contents
type GeneratorInputState ¶
type GeneratorInputState struct { ApplicationNodeConfig GeneratorApplicationNodeConfig `json:"ApplicationNodeConfig"` ManagementSwitches map[string]slsCommon.GenericHardware `json:"ManagementSwitches"` // SLS Type: comptype_mgmt_switch RiverCabinets map[string]CabinetTemplate `json:"RiverCabinets"` // SLS Type: comptype_cabinet HillCabinets map[string]CabinetTemplate `json:"HillCabinets"` // SLS Type: comptype_cabinet MountainCabinets map[string]CabinetTemplate `json:"MountainCabinets"` // SLS Type: comptype_cabinet MountainStartingNid int `json:"MountainStartingNid"` Networks map[string]slsCommon.Network `json:"Networks"` }
GeneratorInputState is given to the SLS config generator in order to generate the SLS config file
type NetworkLayoutConfiguration ¶
type NetworkLayoutConfiguration struct { Template networking.IPV4Network ReservationHostnames []string IncludeBootstrapDHCP bool DesiredBootstrapDHCPMask net.IPMask IncludeNetworkingHardwareSubnet bool SuperNetHack bool AdditionalNetworkingSpace int NetworkingHardwareNetmask net.IPMask BaseVlan int16 SubdivideByCabinet bool GroupNetworksByCabinetType bool IncludeUAISubnet bool CabinetDetails []sls.CabinetGroupDetail CabinetCIDR net.IPMask ManagementSwitches []*networking.ManagementSwitch }
NetworkLayoutConfiguration is the internal configuration structure for shasta networks
func GenDefaultBICANConfig ¶
func GenDefaultBICANConfig(systemDefaultRoute string) NetworkLayoutConfiguration
GenDefaultBICANConfig returns the set of defaults for mapping the BICAN toggle
func GenDefaultCANConfig ¶
func GenDefaultCANConfig() NetworkLayoutConfiguration
GenDefaultCANConfig returns the set of defaults for mapping the CAN
func GenDefaultCHNConfig ¶
func GenDefaultCHNConfig() NetworkLayoutConfiguration
GenDefaultCHNConfig returns the set of defaults for mapping the CHN
func GenDefaultCMNConfig ¶
func GenDefaultCMNConfig(ncns int, switches int) NetworkLayoutConfiguration
GenDefaultCMNConfig returns the set of defaults for mapping the CMN
func GenDefaultHMNConfig ¶
func GenDefaultHMNConfig() NetworkLayoutConfiguration
GenDefaultHMNConfig is the set of defaults for mapping the HMN
func GenDefaultHSNConfig ¶
func GenDefaultHSNConfig() NetworkLayoutConfiguration
GenDefaultHSNConfig returns the set of defaults for mapping the HSN
func GenDefaultMTLConfig ¶
func GenDefaultMTLConfig() NetworkLayoutConfiguration
GenDefaultMTLConfig returns the set of defaults for mapping the MTL
func GenDefaultNMNConfig ¶
func GenDefaultNMNConfig() NetworkLayoutConfiguration
GenDefaultNMNConfig returns the set of defaults for mapping the NMN
type StateGenerator ¶
type StateGenerator struct {
// contains filtered or unexported fields
}
StateGenerator is a utility that can take an GeneratorInputState to create a valid SLSState
func NewStateGenerator ¶
func NewStateGenerator(logger *zap.Logger, inputState GeneratorInputState, hmnRows []shcdParser.HMNRow) StateGenerator
NewStateGenerator create a new instances of the state generator
func (*StateGenerator) GenerateSLSState ¶
func (g *StateGenerator) GenerateSLSState() slsCommon.SLSState
GenerateSLSState will generate the SLSState