osutils

package
v0.0.0-...-4cccea2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIronicCapacity

func CheckIronicCapacity(provider *gophercloud.ProviderClient, request IronicOnIronicRequest) (bool, error)

func CreateNetworkPort

func CreateNetworkPort(provider *gophercloud.ProviderClient, networkName string, labName string) (ports.Port, error)

func DeleteExtNetworkPortByLabName

func DeleteExtNetworkPortByLabName(provider *gophercloud.ProviderClient, labName string) error

func DeleteNetworkPort

func DeleteNetworkPort(provider *gophercloud.ProviderClient, portID string) error

func GetAvailableIronicNodeListByCapability

func GetAvailableIronicNodeListByCapability(provider *gophercloud.ProviderClient, ckey string, cval string) ([]nodes.Node, error)

func GetDetailedIronicNodeList

func GetDetailedIronicNodeList(provider *gophercloud.ProviderClient) ([]nodes.Node, error)

func GetDetailedIronicPortList

func GetDetailedIronicPortList(provider *gophercloud.ProviderClient) ([]ports.Port, error)

func GetFlavorCapability

func GetFlavorCapability(provider *gophercloud.ProviderClient, flavorName string, key string) (string, error)

func GetFlavorToSystemTypeMappings

func GetFlavorToSystemTypeMappings(provider *gophercloud.ProviderClient) (map[string]string, error)

func GetIronicNodeListByCapability

func GetIronicNodeListByCapability(provider *gophercloud.ProviderClient, ckey string, cval string) ([]nodes.Node, error)

func GetIronicPXEMacs

func GetIronicPXEMacs(provider *gophercloud.ProviderClient, nodeID string) ([]string, error)

func GetMyProjectID

func GetMyProjectID(provider *gophercloud.ProviderClient) (string, error)

func NetworkNameToID

func NetworkNameToID(provider *gophercloud.ProviderClient, networkName string) (string, error)

func NodeDataToJSONString

func NodeDataToJSONString(nodeData IronicNodeDetailsList, b64encode bool) (string, error)

func OpenstackLogin

func OpenstackLogin(cloud string) (gophercloud.ProviderClient, error)

func OverrideLogWriter

func OverrideLogWriter(logWriter *syslog.Writer)

func ReleaseIronicNodes

func ReleaseIronicNodes(provider *gophercloud.ProviderClient, nodeList IronicNodeDetailsList, cycleClean bool) error

Types

type IronicCapacityData

type IronicCapacityData struct {
	NodesByType    []IronicNodeCapInfo
	CountByProject []IronicProjectCount
	CountByUser    []IronicUserCount
}

structs used to hold capacity info for user

func GetIronicCapacity

func GetIronicCapacity(provider *gophercloud.ProviderClient) (IronicCapacityData, error)

Pull and format the data for display use

func (*IronicCapacityData) UpdateIronicNodeCapInfo

func (icd *IronicCapacityData) UpdateIronicNodeCapInfo(capType string, flavor string, status string)

Methods

type IronicNodeCapInfo

type IronicNodeCapInfo struct {
	CapacityType string
	Flavor       string
	Used         int
	Free         int
}

type IronicNodeDetails

type IronicNodeDetails struct {
	ID           string   `json:"id"`
	Name         string   `json:"name"`
	CPUArch      string   `json:"cpu_arch"`
	Cpus         float64  `json:"cpus"`
	MemoryMb     float64  `json:"memory_mb"`
	LocalGb      float64  `json:"local_gb"`
	Size         float64  `json:"size"`
	IpmiAddress  string   `json:"impi_address"`
	IpmiPassword string   `json:"impi_password"`
	IpmiUsername string   `json:"impi_username"`
	Macs         []string `json:"macs"`
	Flavor       string   `json:"flavor"`
	SystemType   string   `json:"system_type"`
}

type IronicNodeDetailsList

type IronicNodeDetailsList struct {
	IronicNodeDetails []IronicNodeDetails
}

Structures for checked-out node data converted to json for theforeman domain parameter

func CheckOutIronicNodes

func CheckOutIronicNodes(provider *gophercloud.ProviderClient, request IronicOnIronicRequest, reason string) (IronicNodeDetailsList, error)

func JSONStringToNodeData

func JSONStringToNodeData(nodeJSON string, b64decode bool) (IronicNodeDetailsList, error)

type IronicOnIronicNodeRequest

type IronicOnIronicNodeRequest struct {
	Flavor string
	Count  int
}

type IronicOnIronicRequest

type IronicOnIronicRequest struct {
	IronicOnIronicNodeRequests []IronicOnIronicNodeRequest
}

Structures for the ironic-on-ironic request

type IronicProjectCount

type IronicProjectCount struct {
	Project string
	Total   int
}

type IronicUserCount

type IronicUserCount struct {
	User  string
	Total int
}

Jump to

Keyboard shortcuts

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