Documentation ¶
Index ¶
- Constants
- Variables
- func ManufactureOemName(manufacture string) string
- type EFIBootEntry
- type EFIBootMgrInfo
- type SCPUInfo
- type SDMICPUInfo
- type SDMIMemInfo
- type SDiskDesc
- type SDiskInfo
- type SIPMIBootFlags
- type SIPMIInfo
- type SIPMILanConfig
- type SNetworkConfig
- type SNic
- type SNicDevInfo
- type SRoute
- type SSHConfig
- type SServerNic
- type SSystemInfo
Constants ¶
View Source
const ( POWER_STATUS_ON = "on" POWER_STATUS_OFF = "off" )
View Source
const ( OEM_NAME_DELL = "dell" OEM_NAME_HPE = "hpe" OEM_NAME_HP = "hp" OEM_NAME_HUAWEI = "huawei" OEM_NAME_INSPUR = "inspur" OEM_NAME_LENOVO = "lenovo" OEM_NAME_FOXCONN = "foxconn" OEM_NAME_QEMU = "qemu" OEM_NAME_SUPERMICRO = "supermicro" OEM_NAME_H3C = "h3c" )
View Source
const (
ErrIPMIToolNull = errors.Error("IPMI tool is null")
)
Variables ¶
View Source
var ( OEM_NAMES = []string{ OEM_NAME_DELL, OEM_NAME_HPE, OEM_NAME_HP, OEM_NAME_HUAWEI, OEM_NAME_INSPUR, OEM_NAME_LENOVO, OEM_NAME_FOXCONN, OEM_NAME_QEMU, OEM_NAME_SUPERMICRO, OEM_NAME_H3C, } )
Functions ¶
func ManufactureOemName ¶
Types ¶
type EFIBootEntry ¶
type EFIBootMgrInfo ¶
type EFIBootMgrInfo struct { PxeBootNum string `json:"pxe_boot_num"` BootOrder []*EFIBootEntry `json:"boot_order"` }
func (*EFIBootMgrInfo) GetPXEEntry ¶
func (info *EFIBootMgrInfo) GetPXEEntry() *EFIBootEntry
type SDMICPUInfo ¶
type SDMICPUInfo struct {
Nodes int `json:"nodes"`
}
type SDMIMemInfo ¶
type SDMIMemInfo struct {
Total int `json:"total"`
}
type SDiskDesc ¶
type SDiskDesc struct { AioMode string `json:"aio_mode"` CacheMode string `json:"cache_mode"` DiskId string `json:"disk_id"` Driver string `json:"driver"` Format string `json:"format"` ImagePath string `json:"image_path"` Index int `json:"index"` Path string `json:"path"` Size int `json:"size"` StorageId string `json:"storage_id"` TempleteId string `json:"templete_id"` }
type SIPMIBootFlags ¶
type SIPMIInfo ¶
type SIPMIInfo struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` IpAddr string `json:"ip_addr,omitempty"` Present bool `json:"present,omitempty"` LanChannel uint8 `json:"lan_channel,omitzero"` Verified bool `json:"verified,omitfalse"` RedfishApi bool `json:"redfish_api,omitfalse"` CdromBoot bool `json:"cdrom_boot,omitfalse"` PxeBoot bool `json:"pxe_boot,omitfalse"` }
func (SIPMIInfo) ToPrepareParams ¶
func (info SIPMIInfo) ToPrepareParams() jsonutils.JSONObject
type SIPMILanConfig ¶
type SNetworkConfig ¶
type SNetworkConfig struct { GuestDhcp string `json:"guest_dhcp"` GuestGateway string `json:"guest_gateway"` GuestIpStart string `json:"guest_ip_start"` GuestIpEnd string `json:"guest_ip_end"` GuestIpMask int `json:"guest_ip_mask"` Id string `json:"id"` IsEmulated bool `json:"is_emulated"` IsPublic bool `json:"is_public"` IsSystem bool `json:"is_system"` Name string `json:"name"` ServerType string `json:"server_type"` Status string `json:"status"` ProjectId string `json:"tenant_id"` VlanId int `json:"vlan_id"` WireId string `json:"wire_id"` }
type SNic ¶
type SNic struct { Type compute.TNicType `json:"nic_type"` Domain string `json:"domain"` Wire string `json:"wire"` IpAddr string `json:"ip_addr"` WireId string `json:"wire_id"` NetId string `json:"net_id"` Rate int `json:"rate"` Mtu int16 `json:"mtu"` Mac string `json:"mac"` Dns string `json:"dns"` Ntp string `json:"ntp"` Masklen int8 `json:"masklen"` Net string `json:"net"` Gateway string `json:"gateway"` LinkUp bool `json:"link_up"` Routes []SRoute `json:"routes,omitempty"` Ip6Addr string `json:"ip6_addr"` Masklen6 uint8 `json:"masklen6"` Gateway6 string `json:"gateway6"` Interface string `json:"interface"` Bridge string `json:"bridge"` VlanId int `json:"vlan_id"` Bandwidth int `json:"bandwidth"` Index int `json:"index"` }
func (SNic) GetMac ¶
func (n SNic) GetMac() net.HardwareAddr
func (SNic) GetNetMask ¶
type SNicDevInfo ¶
type SServerNic ¶
type SServerNic struct { Name string `json:"name"` Index int `json:"index"` Bridge string `json:"bridge"` Domain string `json:"domain"` Ip string `json:"ip"` Vlan int `json:"vlan"` Driver string `json:"driver"` Masklen int `json:"masklen"` Virtual bool `json:"virtual"` Manual bool `json:"manual"` WireId string `json:"wire_id"` NetId string `json:"net_id"` Mac string `json:"mac"` BandWidth int `json:"bw"` Mtu int16 `json:"mtu,omitempty"` Dns string `json:"dns"` Ntp string `json:"ntp"` Net string `json:"net"` Interface string `json:"interface"` Gateway string `json:"gateway"` Ifname string `json:"ifname"` Routes []SRoute `json:"routes,omitempty"` Ip6 string `json:"ip6"` Masklen6 int `json:"masklen6"` Gateway6 string `json:"gateway6"` IsDefault bool `json:"is_default"` NicType compute.TNicType `json:"nic_type,omitempty"` LinkUp bool `json:"link_up,omitempty"` TeamWith string `json:"team_with,omitempty"` TeamingMaster *SServerNic `json:"-"` TeamingSlaves []*SServerNic `json:"-"` }
func (SServerNic) GetMac ¶
func (n SServerNic) GetMac() net.HardwareAddr
func (SServerNic) GetNetMask ¶
func (n SServerNic) GetNetMask() string
func (SServerNic) ToNic ¶
func (n SServerNic) ToNic() SNic
Click to show internal directories.
Click to hide internal directories.