types

package
v0.3.11-8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 6 Imported by: 26

Documentation

Index

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

Functions

func ManufactureOemName

func ManufactureOemName(manufacture string) string

Types

type EFIBootEntry

type EFIBootEntry struct {
	BootNum     string `json:"boot_num"`
	Description string `json:"description"`
	IsActive    bool   `json:"is_active"`
}

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 SCPUInfo

type SCPUInfo struct {
	Count     int    `json:"count"`
	Model     string `json:"desc"`
	Freq      int    `json:"freq"`
	Cache     int    `json:"cache"`
	Microcode string `json:"microcode"`
}

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 SDiskInfo

type SDiskInfo struct {
	Dev        string `json:"dev"`
	Sector     int64  `json:"sector"`
	Block      int64  `json:"block"`
	Size       int64  `json:"size"`
	Rotate     bool   `json:"rotate"`
	ModuleInfo string `json:"module"`
	Kernel     string `json:"kernel"`
	PCIClass   string `json:"pci_class"`
	Driver     string `json:"driver"`
}

type SIPMIBootFlags

type SIPMIBootFlags struct {
	Dev string `json:"dev"`
	Sol *bool  `json:"sol"`
}

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 SIPMILanConfig struct {
	IPSrc   string           `json:"ipsrc"`
	IPAddr  string           `json:"ipaddr"`
	Netmask string           `json:"netmask"`
	Mac     net.HardwareAddr `json:"mac"`
	Gateway string           `json:"gateway"`

	VlanId    int `json:"vlan_id"`
	SpeedMbps int `json:"speed_mbps"`
}

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

func (n SNic) GetNetMask() string

type SNicDevInfo

type SNicDevInfo struct {
	Dev   string           `json:"dev"`
	Mac   net.HardwareAddr `json:"mac"`
	Speed int              `json:"speed"`
	Up    *bool            `json:"up"`
	Mtu   int              `json:"mtu"`
}

type SRoute

type SRoute []string

type SSHConfig

type SSHConfig struct {
	Username string `json:"username,omitempty"`
	RemoteIP string `json:"remote_ip"`
	Password string `json:"password"`
}

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

type SSystemInfo

type SSystemInfo struct {
	Manufacture string `json:"manufacture"`
	Model       string `json:"model"`
	SN          string `json:"sn"`
	Version     string `json:"version,omitempty"`
	BSN         string `json:"bsn"`

	OemName string `json:"oem_name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL