Documentation ¶
Index ¶
- func OverwriteDevModelFromFile(fileName string, model DevModel) error
- type DevModel
- type DevModelGCP
- func (ctx *DevModelGCP) AdapterForSwitches() []string
- func (ctx *DevModelGCP) Adapters() []*config.SystemAdapter
- func (ctx *DevModelGCP) Config() map[string]interface{}
- func (ctx *DevModelGCP) DevModelType() string
- func (ctx *DevModelGCP) DiskFormat() string
- func (ctx *DevModelGCP) DiskReadyMessage() string
- func (ctx *DevModelGCP) GetPortConfig(_ string, _ string) string
- func (ctx *DevModelGCP) Networks() []*config.NetworkConfig
- func (ctx *DevModelGCP) PhysicalIOs() []*config.PhysicalIO
- func (ctx *DevModelGCP) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
- func (ctx *DevModelGCP) SetWiFiParams(_ string, _ string)
- type DevModelGeneral
- func (ctx *DevModelGeneral) AdapterForSwitches() []string
- func (ctx *DevModelGeneral) Adapters() []*config.SystemAdapter
- func (ctx *DevModelGeneral) Config() map[string]interface{}
- func (ctx *DevModelGeneral) DevModelType() string
- func (ctx *DevModelGeneral) DiskFormat() string
- func (ctx *DevModelGeneral) DiskReadyMessage() string
- func (ctx *DevModelGeneral) GetPortConfig(_ string, _ string) string
- func (ctx *DevModelGeneral) Networks() []*config.NetworkConfig
- func (ctx *DevModelGeneral) PhysicalIOs() []*config.PhysicalIO
- func (ctx *DevModelGeneral) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
- func (ctx *DevModelGeneral) SetWiFiParams(_ string, _ string)
- type DevModelParallels
- func (ctx *DevModelParallels) AdapterForSwitches() []string
- func (ctx *DevModelParallels) Adapters() []*config.SystemAdapter
- func (ctx *DevModelParallels) Config() map[string]interface{}
- func (ctx *DevModelParallels) DevModelType() string
- func (ctx *DevModelParallels) DiskFormat() string
- func (ctx *DevModelParallels) DiskReadyMessage() string
- func (ctx *DevModelParallels) GetPortConfig(_ string, _ string) string
- func (ctx *DevModelParallels) Networks() []*config.NetworkConfig
- func (ctx *DevModelParallels) PhysicalIOs() []*config.PhysicalIO
- func (ctx *DevModelParallels) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
- func (ctx *DevModelParallels) SetWiFiParams(_ string, _ string)
- type DevModelQemu
- func (ctx *DevModelQemu) AdapterForSwitches() []string
- func (ctx *DevModelQemu) Adapters() []*config.SystemAdapter
- func (ctx *DevModelQemu) Config() map[string]interface{}
- func (ctx *DevModelQemu) DevModelType() string
- func (ctx *DevModelQemu) DiskFormat() string
- func (ctx *DevModelQemu) DiskReadyMessage() string
- func (ctx *DevModelQemu) GetPortConfig(_ string, _ string) string
- func (ctx *DevModelQemu) Networks() []*config.NetworkConfig
- func (ctx *DevModelQemu) PhysicalIOs() []*config.PhysicalIO
- func (ctx *DevModelQemu) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
- func (ctx *DevModelQemu) SetWiFiParams(_ string, _ string)
- type DevModelRpi
- func (ctx *DevModelRpi) AdapterForSwitches() []string
- func (ctx *DevModelRpi) Adapters() []*config.SystemAdapter
- func (ctx *DevModelRpi) Config() map[string]interface{}
- func (ctx *DevModelRpi) DevModelType() string
- func (ctx *DevModelRpi) DiskFormat() string
- func (ctx *DevModelRpi) DiskReadyMessage() string
- func (ctx *DevModelRpi) GetPortConfig(ssid string, psk string) string
- func (ctx *DevModelRpi) Networks() []*config.NetworkConfig
- func (ctx *DevModelRpi) PhysicalIOs() []*config.PhysicalIO
- func (ctx *DevModelRpi) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
- func (ctx *DevModelRpi) SetWiFiParams(ssid string, psk string)
- type DevModelVBox
- func (ctx *DevModelVBox) AdapterForSwitches() []string
- func (ctx *DevModelVBox) Adapters() []*config.SystemAdapter
- func (ctx *DevModelVBox) Config() map[string]interface{}
- func (ctx *DevModelVBox) DevModelType() string
- func (ctx *DevModelVBox) DiskFormat() string
- func (ctx *DevModelVBox) DiskReadyMessage() string
- func (ctx *DevModelVBox) GetPortConfig(_ string, _ string) string
- func (ctx *DevModelVBox) Networks() []*config.NetworkConfig
- func (ctx *DevModelVBox) PhysicalIOs() []*config.PhysicalIO
- func (ctx *DevModelVBox) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
- func (ctx *DevModelVBox) SetWiFiParams(_ string, _ string)
- type ModelFile
- type PhysicalIO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OverwriteDevModelFromFile ¶
OverwriteDevModelFromFile replace default config with config from provided file
Types ¶
type DevModel ¶
type DevModel interface { Adapters() []*config.SystemAdapter Networks() []*config.NetworkConfig PhysicalIOs() []*config.PhysicalIO SetPhysicalIOs([]*config.PhysicalIO) AdapterForSwitches() []string DevModelType() string SetWiFiParams(ssid string, psk string) GetPortConfig(ssid string, psk string) string DiskFormat() string DiskReadyMessage() string Config() map[string]interface{} }
DevModel is an interface to use for describe device
func GetDevModel ¶
GetDevModel return DevModel object by DevModelType
func GetDevModelByName ¶
GetDevModelByName return DevModel object by DevModelType string
type DevModelGCP ¶
type DevModelGCP struct {
// contains filtered or unexported fields
}
DevModelGCP is dev model fields
func (*DevModelGCP) AdapterForSwitches ¶
func (ctx *DevModelGCP) AdapterForSwitches() []string
AdapterForSwitches returns adapterForSwitches of devModel
func (*DevModelGCP) Adapters ¶
func (ctx *DevModelGCP) Adapters() []*config.SystemAdapter
Adapters returns adapters of devModel
func (*DevModelGCP) Config ¶
func (ctx *DevModelGCP) Config() map[string]interface{}
Config returns map with config overwrites
func (*DevModelGCP) DevModelType ¶
func (ctx *DevModelGCP) DevModelType() string
DevModelType returns devModelType of devModel
func (*DevModelGCP) DiskFormat ¶
func (ctx *DevModelGCP) DiskFormat() string
DiskFormat to use for build image
func (*DevModelGCP) DiskReadyMessage ¶
func (ctx *DevModelGCP) DiskReadyMessage() string
DiskReadyMessage to show when image is ready
func (*DevModelGCP) GetPortConfig ¶
func (ctx *DevModelGCP) GetPortConfig(_ string, _ string) string
GetPortConfig returns PortConfig overwrite
func (*DevModelGCP) Networks ¶
func (ctx *DevModelGCP) Networks() []*config.NetworkConfig
Networks returns networks of devModel
func (*DevModelGCP) PhysicalIOs ¶
func (ctx *DevModelGCP) PhysicalIOs() []*config.PhysicalIO
PhysicalIOs returns physicalIOs of devModel
func (*DevModelGCP) SetPhysicalIOs ¶
func (ctx *DevModelGCP) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
SetPhysicalIOs sets physicalIOs of devModel
func (*DevModelGCP) SetWiFiParams ¶
func (ctx *DevModelGCP) SetWiFiParams(_ string, _ string)
SetWiFiParams not implemented for Qemu
type DevModelGeneral ¶
type DevModelGeneral struct {
// contains filtered or unexported fields
}
DevModelGeneral is dev model fields
func (*DevModelGeneral) AdapterForSwitches ¶
func (ctx *DevModelGeneral) AdapterForSwitches() []string
AdapterForSwitches returns adapterForSwitches of devModel
func (*DevModelGeneral) Adapters ¶
func (ctx *DevModelGeneral) Adapters() []*config.SystemAdapter
Adapters returns adapters of devModel
func (*DevModelGeneral) Config ¶
func (ctx *DevModelGeneral) Config() map[string]interface{}
Config returns map with config overwrites
func (*DevModelGeneral) DevModelType ¶
func (ctx *DevModelGeneral) DevModelType() string
DevModelType returns devModelType of devModel
func (*DevModelGeneral) DiskFormat ¶
func (ctx *DevModelGeneral) DiskFormat() string
DiskFormat to use for build image
func (*DevModelGeneral) DiskReadyMessage ¶
func (ctx *DevModelGeneral) DiskReadyMessage() string
DiskReadyMessage to show when image is ready
func (*DevModelGeneral) GetPortConfig ¶
func (ctx *DevModelGeneral) GetPortConfig(_ string, _ string) string
GetPortConfig returns PortConfig overwrite
func (*DevModelGeneral) Networks ¶
func (ctx *DevModelGeneral) Networks() []*config.NetworkConfig
Networks returns networks of devModel
func (*DevModelGeneral) PhysicalIOs ¶
func (ctx *DevModelGeneral) PhysicalIOs() []*config.PhysicalIO
PhysicalIOs returns physicalIOs of devModel
func (*DevModelGeneral) SetPhysicalIOs ¶
func (ctx *DevModelGeneral) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
SetPhysicalIOs sets physicalIOs of devModel
func (*DevModelGeneral) SetWiFiParams ¶
func (ctx *DevModelGeneral) SetWiFiParams(_ string, _ string)
SetWiFiParams not implemented for Qemu
type DevModelParallels ¶
type DevModelParallels struct {
// contains filtered or unexported fields
}
DevModelParallels is dev model fields
func (*DevModelParallels) AdapterForSwitches ¶
func (ctx *DevModelParallels) AdapterForSwitches() []string
AdapterForSwitches returns adapterForSwitches of devModel
func (*DevModelParallels) Adapters ¶
func (ctx *DevModelParallels) Adapters() []*config.SystemAdapter
Adapters returns adapters of devModel
func (*DevModelParallels) Config ¶
func (ctx *DevModelParallels) Config() map[string]interface{}
Config returns map with config overwrites
func (*DevModelParallels) DevModelType ¶
func (ctx *DevModelParallels) DevModelType() string
DevModelType returns devModelType of devModel
func (*DevModelParallels) DiskFormat ¶
func (ctx *DevModelParallels) DiskFormat() string
DiskFormat to use for build image
func (*DevModelParallels) DiskReadyMessage ¶
func (ctx *DevModelParallels) DiskReadyMessage() string
DiskReadyMessage ready message
func (*DevModelParallels) GetPortConfig ¶
func (ctx *DevModelParallels) GetPortConfig(_ string, _ string) string
GetPortConfig not implemented for parallels
func (*DevModelParallels) Networks ¶
func (ctx *DevModelParallels) Networks() []*config.NetworkConfig
Networks returns networks of devModel
func (*DevModelParallels) PhysicalIOs ¶
func (ctx *DevModelParallels) PhysicalIOs() []*config.PhysicalIO
PhysicalIOs returns physicalIOs of devModel
func (*DevModelParallels) SetPhysicalIOs ¶
func (ctx *DevModelParallels) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
SetPhysicalIOs sets physicalIOs of devModel
func (*DevModelParallels) SetWiFiParams ¶
func (ctx *DevModelParallels) SetWiFiParams(_ string, _ string)
SetWiFiParams not implemented for parallels
type DevModelQemu ¶
type DevModelQemu struct {
// contains filtered or unexported fields
}
DevModelQemu is dev model fields
func (*DevModelQemu) AdapterForSwitches ¶
func (ctx *DevModelQemu) AdapterForSwitches() []string
AdapterForSwitches returns adapterForSwitches of devModel
func (*DevModelQemu) Adapters ¶
func (ctx *DevModelQemu) Adapters() []*config.SystemAdapter
Adapters returns adapters of devModel
func (*DevModelQemu) Config ¶
func (ctx *DevModelQemu) Config() map[string]interface{}
Config returns map with config overwrites
func (*DevModelQemu) DevModelType ¶
func (ctx *DevModelQemu) DevModelType() string
DevModelType returns devModelType of devModel
func (*DevModelQemu) DiskFormat ¶
func (ctx *DevModelQemu) DiskFormat() string
DiskFormat to use for build image
func (*DevModelQemu) DiskReadyMessage ¶
func (ctx *DevModelQemu) DiskReadyMessage() string
DiskReadyMessage to show when image is ready
func (*DevModelQemu) GetPortConfig ¶
func (ctx *DevModelQemu) GetPortConfig(_ string, _ string) string
GetPortConfig returns PortConfig overwrite
func (*DevModelQemu) Networks ¶
func (ctx *DevModelQemu) Networks() []*config.NetworkConfig
Networks returns networks of devModel
func (*DevModelQemu) PhysicalIOs ¶
func (ctx *DevModelQemu) PhysicalIOs() []*config.PhysicalIO
PhysicalIOs returns physicalIOs of devModel
func (*DevModelQemu) SetPhysicalIOs ¶
func (ctx *DevModelQemu) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
SetPhysicalIOs sets physicalIOs of devModel
func (*DevModelQemu) SetWiFiParams ¶
func (ctx *DevModelQemu) SetWiFiParams(_ string, _ string)
SetWiFiParams not implemented for Qemu
type DevModelRpi ¶
type DevModelRpi struct {
// contains filtered or unexported fields
}
DevModelRpi is dev model fields
func (*DevModelRpi) AdapterForSwitches ¶
func (ctx *DevModelRpi) AdapterForSwitches() []string
AdapterForSwitches returns adapterForSwitches of devModel
func (*DevModelRpi) Adapters ¶
func (ctx *DevModelRpi) Adapters() []*config.SystemAdapter
Adapters returns adapters of devModel
func (*DevModelRpi) Config ¶
func (ctx *DevModelRpi) Config() map[string]interface{}
Config returns map with config overwrites
func (*DevModelRpi) DevModelType ¶
func (ctx *DevModelRpi) DevModelType() string
DevModelType returns devModelType of devModel
func (*DevModelRpi) DiskFormat ¶
func (ctx *DevModelRpi) DiskFormat() string
DiskFormat to use for build image
func (*DevModelRpi) DiskReadyMessage ¶
func (ctx *DevModelRpi) DiskReadyMessage() string
DiskReadyMessage to show when image is ready
func (*DevModelRpi) GetPortConfig ¶
func (ctx *DevModelRpi) GetPortConfig(ssid string, psk string) string
GetPortConfig returns PortConfig overwrite
func (*DevModelRpi) Networks ¶
func (ctx *DevModelRpi) Networks() []*config.NetworkConfig
Networks returns networks of devModel
func (*DevModelRpi) PhysicalIOs ¶
func (ctx *DevModelRpi) PhysicalIOs() []*config.PhysicalIO
PhysicalIOs returns physicalIOs of devModel
func (*DevModelRpi) SetPhysicalIOs ¶
func (ctx *DevModelRpi) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
SetPhysicalIOs sets physicalIOs of devModel
func (*DevModelRpi) SetWiFiParams ¶
func (ctx *DevModelRpi) SetWiFiParams(ssid string, psk string)
SetWiFiParams set ssid and psk for RPI
type DevModelVBox ¶
type DevModelVBox struct {
// contains filtered or unexported fields
}
DevModelVBox is dev model fields
func (*DevModelVBox) AdapterForSwitches ¶
func (ctx *DevModelVBox) AdapterForSwitches() []string
AdapterForSwitches returns adapterForSwitches of DevModelVBox
func (*DevModelVBox) Adapters ¶
func (ctx *DevModelVBox) Adapters() []*config.SystemAdapter
Adapters returns adapters of DevModelVBox
func (*DevModelVBox) Config ¶
func (ctx *DevModelVBox) Config() map[string]interface{}
Config returns map with config overwrites
func (*DevModelVBox) DevModelType ¶
func (ctx *DevModelVBox) DevModelType() string
DevModelType returns devModelType of DevModelVBox
func (*DevModelVBox) DiskFormat ¶
func (ctx *DevModelVBox) DiskFormat() string
DiskFormat to use for build image
func (*DevModelVBox) DiskReadyMessage ¶
func (ctx *DevModelVBox) DiskReadyMessage() string
DiskReadyMessage to show when image is ready
func (*DevModelVBox) GetPortConfig ¶
func (ctx *DevModelVBox) GetPortConfig(_ string, _ string) string
GetPortConfig returns PortConfig overwrite
func (*DevModelVBox) Networks ¶
func (ctx *DevModelVBox) Networks() []*config.NetworkConfig
Networks returns networks of DevModelVBox
func (*DevModelVBox) PhysicalIOs ¶
func (ctx *DevModelVBox) PhysicalIOs() []*config.PhysicalIO
PhysicalIOs returns physicalIOs of DevModelVBox
func (*DevModelVBox) SetPhysicalIOs ¶
func (ctx *DevModelVBox) SetPhysicalIOs(physicalIOs []*config.PhysicalIO)
SetPhysicalIOs sets physicalIOs of devModel
func (*DevModelVBox) SetWiFiParams ¶
func (ctx *DevModelVBox) SetWiFiParams(_ string, _ string)
SetWiFiParams not implemented for VBox
type ModelFile ¶
type ModelFile struct {
IOMemberList []*PhysicalIO `json:"ioMemberList,omitempty"`
}
ModelFile for loading model from file
type PhysicalIO ¶
type PhysicalIO struct { Ztype evecommon.PhyIoType `json:"ztype,omitempty"` Phylabel string `json:"phylabel,omitempty"` Phyaddrs map[string]string `json:"phyaddrs,omitempty"` Logicallabel string `json:"logicallabel,omitempty"` Assigngrp string `json:"assigngrp,omitempty"` Usage evecommon.PhyIoMemberUsage `json:"usage,omitempty"` UsagePolicy *config.PhyIOUsagePolicy `json:"usagePolicy,omitempty"` Cbattr map[string]string `json:"cbattr,omitempty"` }
PhysicalIO type for translation models into format of EVE`s config.PhysicalIO