metalgo

package module
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: MIT Imports: 28 Imported by: 23

README

metal-go

Actions GoDoc Go Report Card codecov License

Metal Go API Client.

Documentation

Index

Constants

View Source
const (
	// IPTypeEphemeral if specified a ip gets released after usage
	IPTypeEphemeral = "ephemeral"
	// IPTypeStatic if specified a ip must be released manually
	IPTypeStatic = "static"
)

Variables

This section is empty.

Functions

func AuthType added in v0.9.2

func AuthType(authType string) option

AuthType sets the authType for HMAC-Auth

func BoolDeref added in v0.9.0

func BoolDeref(b *bool) bool

func Int64Deref added in v0.9.0

func Int64Deref(i *int64) int64

func NewDriver

func NewDriver(baseURL, bearer, hmacKey string, options ...option) (Client, *Driver, error)

NewDriver Create a new Driver for Metal to given url. Either bearer OR hmacKey must be set. The returned *Driver will be deprecated at some point in time, please migrate to use the Client interface instead.

func StrDeref added in v0.9.0

func StrDeref(s *string) string

func ToV1Quota added in v0.8.2

func ToV1Quota(q *v1.Quota) *models.V1Quota

ToV1Quota convert a masterdata-api v1 Quota to a swagger V1Quota

func ToV1QuotaSet added in v0.8.2

func ToV1QuotaSet(q *v1.QuotaSet) *models.V1QuotaSet

ToV1QuotaSet convert a masterdata-api v1 QuotaSet to a swagger V1Quotaset

Types

type BootConfig

type BootConfig struct {
	Commandline string
	Imageurl    string
	Kernelurl   string
}

BootConfig in the partition

type ChassisIdentifyLEDPowerResponse

type ChassisIdentifyLEDPowerResponse struct {
	Machine *models.V1MachineResponse
}

ChassisIdentifyLEDPowerResponse contains the machine LED power result

type Client added in v0.18.1

type Client interface {
	Filesystemlayout() filesystemlayout.ClientService
	Firewall() firewall.ClientService
	Firmware() firmware.ClientService
	Health() health.ClientService
	Image() image.ClientService
	IP() ip.ClientService
	Machine() machine.ClientService
	Network() network.ClientService
	Partition() partition.ClientService
	Project() project.ClientService
	Size() size.ClientService
	Sizeimageconstraint() sizeimageconstraint.ClientService
	SwitchOperations() switch_operations.ClientService
	Tenant() tenant.ClientService
	User() user.ClientService
	Version() version.ClientService
}

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver holds the client connection to the metal api

func (*Driver) ChassisIdentifyLEDPowerOff

func (d *Driver) ChassisIdentifyLEDPowerOff(machineID, description string) (*ChassisIdentifyLEDPowerResponse, error)

ChassisIdentifyLEDPowerOff powers off the given machine

func (*Driver) ChassisIdentifyLEDPowerOn

func (d *Driver) ChassisIdentifyLEDPowerOn(machineID, description string) (*ChassisIdentifyLEDPowerResponse, error)

ChassisIdentifyLEDPowerOn powers on the given machine

func (*Driver) FilesystemLayoutCreate added in v0.15.0

FilesystemLayoutCreate create a filesystemlayout

func (*Driver) FilesystemLayoutDelete added in v0.15.0

func (d *Driver) FilesystemLayoutDelete(filesystemlayoutID string) (*models.V1FilesystemLayoutResponse, error)

FilesystemLayoutDelete return a filesystemlayout

func (*Driver) FilesystemLayoutGet added in v0.15.0

func (d *Driver) FilesystemLayoutGet(filesystemlayoutID string) (*models.V1FilesystemLayoutResponse, error)

FilesystemLayoutGet return a filesystemlayout

func (*Driver) FilesystemLayoutList added in v0.15.0

func (d *Driver) FilesystemLayoutList() ([]*models.V1FilesystemLayoutResponse, error)

FilesystemLayoutList return all machine filesystemlayouts

func (*Driver) FilesystemLayoutMatch added in v0.15.0

FilesystemLayoutMatch with machine and filesystemlayout

func (*Driver) FilesystemLayoutTry added in v0.15.0

FilesystemLayoutTry with size and image

func (*Driver) FilesystemLayoutUpdate added in v0.15.0

FilesystemLayoutUpdate create a filesystemlayout

func (*Driver) Filesystemlayout added in v0.18.1

func (d *Driver) Filesystemlayout() filesystemlayout.ClientService

func (*Driver) Firewall added in v0.18.1

func (d *Driver) Firewall() firewall.ClientService

func (*Driver) FirewallCreate

func (d *Driver) FirewallCreate(fcr *FirewallCreateRequest) (*FirewallCreateResponse, error)

FirewallCreate will create a single metal machine

func (*Driver) FirewallFind

func (d *Driver) FirewallFind(ffr *FirewallFindRequest) (*FirewallListResponse, error)

FirewallFind will search for firewalls for given criteria

func (*Driver) FirewallGet

func (d *Driver) FirewallGet(machineID string) (*FirewallGetResponse, error)

FirewallGet will only return one machine

func (*Driver) FirewallList

func (d *Driver) FirewallList() (*FirewallListResponse, error)

FirewallList will list all machines

func (*Driver) Firmware added in v0.18.1

func (d *Driver) Firmware() firmware.ClientService

func (*Driver) Health added in v0.18.1

func (d *Driver) Health() health.ClientService

func (*Driver) HealthGet added in v0.12.2

func (d *Driver) HealthGet() (*HealthGetResponse, error)

HealthGet returns the health status

func (*Driver) IP added in v0.18.1

func (d *Driver) IP() ip.ClientService

func (*Driver) IPAllocate

func (d *Driver) IPAllocate(iar *IPAllocateRequest) (*IPDetailResponse, error)

IPAllocate allocates an IP in a network for a project

func (*Driver) IPFind

func (d *Driver) IPFind(ifr *IPFindRequest) (*IPListResponse, error)

IPFind returns all ips that match given properties

func (*Driver) IPFree

func (d *Driver) IPFree(id string) (*IPDetailResponse, error)

IPFree frees an IP

func (*Driver) IPGet

func (d *Driver) IPGet(ipaddress string) (*IPDetailResponse, error)

IPGet gets a given IP

func (*Driver) IPList

func (d *Driver) IPList() (*IPListResponse, error)

IPList lists all IPs

func (*Driver) IPUpdate

func (d *Driver) IPUpdate(iur *IPUpdateRequest) (*IPDetailResponse, error)

IPUpdate updates an IP

func (*Driver) Image added in v0.18.1

func (d *Driver) Image() image.ClientService

func (*Driver) ImageCreate

func (d *Driver) ImageCreate(icr ImageCreateRequest) (*ImageCreateResponse, error)

ImageCreate create a image

func (*Driver) ImageDelete

func (d *Driver) ImageDelete(imageID string) (*ImageGetResponse, error)

ImageDelete return a image

func (*Driver) ImageGet

func (d *Driver) ImageGet(imageID string) (*ImageGetResponse, error)

ImageGet return a image

func (*Driver) ImageGetLatest added in v0.7.5

func (d *Driver) ImageGetLatest(imageID string) (*ImageGetResponse, error)

ImageGetLatest returns the latest image to a given imageID if no patch version was specified.

func (*Driver) ImageList

func (d *Driver) ImageList() (*ImageListResponse, error)

ImageList return all machine images

func (*Driver) ImageListWithUsage added in v0.16.1

func (d *Driver) ImageListWithUsage() (*ImageListResponse, error)

ImageListWithUsage return all machine images with usage info

func (*Driver) ImageQueryByID added in v0.15.3

func (d *Driver) ImageQueryByID(imageID string) (*ImageListResponse, error)

ImageQueryByID return all machine images

func (*Driver) ImageUpdate

func (d *Driver) ImageUpdate(icr ImageCreateRequest) (*ImageCreateResponse, error)

ImageUpdate create a image

func (*Driver) ListFirmwares added in v0.13.1

func (d *Driver) ListFirmwares(kind FirmwareKind, vendor, board string) (*FirmwaresResponse, error)

ListFirmwares returns all firmwares of given kind that matches given vendor and board (if not empty).

func (*Driver) Machine added in v0.18.1

func (d *Driver) Machine() machine.ClientService

func (*Driver) MachineBootBios

func (d *Driver) MachineBootBios(machineID string) (*MachineFirmwareResponse, error)

MachineBootBios boots given machine into BIOS

func (*Driver) MachineBootDisk added in v0.11.2

func (d *Driver) MachineBootDisk(machineID string) (*MachineDiskResponse, error)

MachineBootDisk boots given machine from disk

func (*Driver) MachineBootPxe added in v0.11.2

func (d *Driver) MachineBootPxe(machineID string) (*MachinePxeResponse, error)

MachineBootPxe boots given machine from PXE

func (*Driver) MachineConsolePassword added in v0.14.3

func (d *Driver) MachineConsolePassword(id, reason string) (*models.V1MachineConsolePasswordResponse, error)

MachineConsolePassword returns the consolepassword of the machine

func (*Driver) MachineCreate

func (d *Driver) MachineCreate(mcr *MachineCreateRequest) (*MachineCreateResponse, error)

MachineCreate creates a single metal machine

func (*Driver) MachineDelete

func (d *Driver) MachineDelete(machineID string) (*MachineDeleteResponse, error)

MachineDelete deletes a single metal machine

func (*Driver) MachineDeleteFromDatabase added in v0.11.5

func (d *Driver) MachineDeleteFromDatabase(machineID string) (*MachineDeleteResponse, error)

MachineDeleteFromDatabase deletes a single metal machine from the database

func (*Driver) MachineFind

func (d *Driver) MachineFind(mfr *MachineFindRequest) (*MachineListResponse, error)

MachineFind lists all machines that match the given properties

func (*Driver) MachineGet

func (d *Driver) MachineGet(id string) (*MachineGetResponse, error)

MachineGet returns the machine with the given ID

func (*Driver) MachineIPMIGet

func (d *Driver) MachineIPMIGet(id string) (*MachineIPMIGetResponse, error)

MachineIPMIGet returns the machine with the given ID including IPMI data

func (*Driver) MachineIPMIList

func (d *Driver) MachineIPMIList(mfr *MachineFindRequest) (*MachineIPMIListResponse, error)

MachineIPMIList returns the machine list of the given search query including IPMI data

func (*Driver) MachineIPMIReport added in v0.7.6

func (d *Driver) MachineIPMIReport(report MachineIPMIReports) (*MachineIPMIReportResponse, error)

MachineIPMIReport send leases of this partition to the metal-api

func (*Driver) MachineList

func (d *Driver) MachineList() (*MachineListResponse, error)

MachineList lists all machines

func (*Driver) MachineListFirmwares added in v0.13.1

func (d *Driver) MachineListFirmwares(kind FirmwareKind, machineID string) (*FirmwaresResponse, error)

MachineListFirmwares returns all firmwares of given kind for given machine

func (*Driver) MachineLock

func (d *Driver) MachineLock(machineID, description string) (*MachineStateResponse, error)

MachineLock locks a machine to prevent it from being destroyed

func (*Driver) MachinePowerCycle added in v0.15.2

func (d *Driver) MachinePowerCycle(machineID string) (*MachinePowerResponse, error)

MachinePowerCycle power-cycles the given machine

func (*Driver) MachinePowerOff

func (d *Driver) MachinePowerOff(machineID string) (*MachinePowerResponse, error)

MachinePowerOff powers off the given machine

func (*Driver) MachinePowerOn

func (d *Driver) MachinePowerOn(machineID string) (*MachinePowerResponse, error)

MachinePowerOn powers on the given machine

func (*Driver) MachinePowerReset

func (d *Driver) MachinePowerReset(machineID string) (*MachinePowerResponse, error)

MachinePowerReset power-resets the given machine

func (*Driver) MachineReinstall added in v0.4.0

func (d *Driver) MachineReinstall(machineID, imageID, description string) (*MachineGetResponse, error)

MachineReinstall installs given image on already allocated machine

func (*Driver) MachineReserve

func (d *Driver) MachineReserve(machineID, description string) (*MachineStateResponse, error)

MachineReserve reserves a machine for single allocation

func (*Driver) MachineUnLock

func (d *Driver) MachineUnLock(machineID string) (*MachineStateResponse, error)

MachineUnLock unlocks a machine

func (*Driver) MachineUnReserve

func (d *Driver) MachineUnReserve(machineID string) (*MachineStateResponse, error)

MachineUnReserve unreserves a machine

func (*Driver) MachineUpdate added in v0.17.0

func (d *Driver) MachineUpdate(mur *MachineUpdateRequest) (*MachineUpdateResponse, error)

MachineUpdate updated a single metal machine, be cautios that this can remove tags when empty tags are passed

func (*Driver) Me added in v0.15.7

func (d *Driver) Me() (*models.V1User, error)

Me return the connecting User

func (*Driver) Network added in v0.18.1

func (d *Driver) Network() network.ClientService

func (*Driver) NetworkAddPrefix

func (d *Driver) NetworkAddPrefix(nur *NetworkUpdateRequest) (*NetworkDetailResponse, error)

NetworkAddPrefix adds a prefix to a network

func (*Driver) NetworkAllocate

func (d *Driver) NetworkAllocate(ncr *NetworkAllocateRequest) (*NetworkDetailResponse, error)

NetworkAllocate creates a new network

func (*Driver) NetworkCreate

func (d *Driver) NetworkCreate(ncr *NetworkCreateRequest) (*NetworkDetailResponse, error)

NetworkCreate creates a new network

func (*Driver) NetworkDelete added in v0.3.3

func (d *Driver) NetworkDelete(id string) (*NetworkDetailResponse, error)

NetworkDelete delete a network

func (*Driver) NetworkFind

func (d *Driver) NetworkFind(nfr *NetworkFindRequest) (*NetworkListResponse, error)

NetworkFind returns all networks that match given properties

func (*Driver) NetworkFree

func (d *Driver) NetworkFree(id string) (*NetworkDetailResponse, error)

NetworkFree frees a network

func (*Driver) NetworkGet

func (d *Driver) NetworkGet(id string) (*NetworkGetResponse, error)

NetworkGet returns the network with the given ID

func (*Driver) NetworkList

func (d *Driver) NetworkList() (*NetworkListResponse, error)

NetworkList returns all networks

func (*Driver) NetworkRemovePrefix

func (d *Driver) NetworkRemovePrefix(nur *NetworkUpdateRequest) (*NetworkDetailResponse, error)

NetworkRemovePrefix removes a prefix from a network

func (*Driver) NetworkUpdate

func (d *Driver) NetworkUpdate(ncr *NetworkCreateRequest) (*NetworkDetailResponse, error)

NetworkUpdate updates a network

func (*Driver) Partition added in v0.18.1

func (d *Driver) Partition() partition.ClientService

func (*Driver) PartitionCapacity

func (d *Driver) PartitionCapacity(pcr PartitionCapacityRequest) (*PartitionCapacityResponse, error)

PartitionCapacity return a partition

func (*Driver) PartitionCreate

func (d *Driver) PartitionCreate(pcr PartitionCreateRequest) (*PartitionCreateResponse, error)

PartitionCreate create a partition

func (*Driver) PartitionDelete

func (d *Driver) PartitionDelete(partitionID string) (*PartitionGetResponse, error)

PartitionDelete return a partition

func (*Driver) PartitionGet

func (d *Driver) PartitionGet(partitionID string) (*PartitionGetResponse, error)

PartitionGet return a partition

func (*Driver) PartitionList

func (d *Driver) PartitionList() (*PartitionListResponse, error)

PartitionList return all partitions

func (*Driver) PartitionUpdate

func (d *Driver) PartitionUpdate(pcr PartitionCreateRequest) (*PartitionCreateResponse, error)

PartitionUpdate create a partition

func (*Driver) Project added in v0.18.1

func (d *Driver) Project() project.ClientService

func (*Driver) ProjectCreate added in v0.8.2

func (d *Driver) ProjectCreate(pcr v1.ProjectCreateRequest) (*ProjectGetResponse, error)

ProjectCreate a new Project

func (*Driver) ProjectDelete added in v0.8.2

func (d *Driver) ProjectDelete(projectID string) (*ProjectGetResponse, error)

ProjectDelete delete a Project

func (*Driver) ProjectFind

func (d *Driver) ProjectFind(pfr v1.ProjectFindRequest) (*ProjectListResponse, error)

ProjectFind return projects by given findRequest

func (*Driver) ProjectGet

func (d *Driver) ProjectGet(projectID string) (*ProjectGetResponse, error)

ProjectGet return a Project

func (*Driver) ProjectList

func (d *Driver) ProjectList() (*ProjectListResponse, error)

ProjectList return all projects

func (*Driver) ProjectUpdate added in v0.8.2

func (d *Driver) ProjectUpdate(pur v1.ProjectUpdateRequest) (*ProjectGetResponse, error)

ProjectUpdate update a Project

func (*Driver) RemoveFirmware added in v0.13.1

func (d *Driver) RemoveFirmware(kind FirmwareKind, vendor, board, revision string) (*firmware.RemoveFirmwareOK, error)

RemoveFirmware removes the given firmware revision of the given vendor and board

func (*Driver) Size added in v0.16.3

func (d *Driver) Size() size.ClientService

func (*Driver) SizeCreate

func (d *Driver) SizeCreate(pcr SizeCreateRequest) (*SizeCreateResponse, error)

SizeCreate create a size

func (*Driver) SizeDelete

func (d *Driver) SizeDelete(sizeID string) (*SizeGetResponse, error)

SizeDelete return a size

func (*Driver) SizeGet

func (d *Driver) SizeGet(sizeID string) (*SizeGetResponse, error)

SizeGet return a size

func (*Driver) SizeList

func (d *Driver) SizeList() (*SizeListResponse, error)

SizeList return all machine sizes

func (*Driver) SizeTry

func (d *Driver) SizeTry(cores int32, memory, storage uint64) (*SizeTryResponse, error)

SizeTry will return the chosen size with given Hardware specs.

func (*Driver) SizeUpdate

func (d *Driver) SizeUpdate(pcr SizeCreateRequest) (*SizeCreateResponse, error)

SizeUpdate create a size

func (*Driver) Sizeimageconstraint added in v0.18.1

func (d *Driver) Sizeimageconstraint() sizeimageconstraint.ClientService

func (*Driver) SwitchGet added in v0.8.1

func (d *Driver) SwitchGet(switchID string) (*SwitchGetResponse, error)

SwitchGet return a switch

func (*Driver) SwitchList

func (d *Driver) SwitchList() (*SwitchListResponse, error)

SwitchList return all switches

func (*Driver) SwitchOperations added in v0.18.1

func (d *Driver) SwitchOperations() switch_operations.ClientService

func (*Driver) SwitchUpdate added in v0.8.1

func (d *Driver) SwitchUpdate(sur SwitchUpdateRequest) (*SwitchGetResponse, error)

SwitchUpdate updates a switch

func (*Driver) Tenant added in v0.18.1

func (d *Driver) Tenant() tenant.ClientService

func (*Driver) TenantGet added in v0.14.0

func (d *Driver) TenantGet(tenantID string) (*TenantGetResponse, error)

TenantGet return a Tenant

func (*Driver) TenantList added in v0.14.0

func (d *Driver) TenantList() (*TenantListResponse, error)

TenantList return all Tenants

func (*Driver) TrySizeImageConstraint added in v0.16.3

func (d *Driver) TrySizeImageConstraint(size, image string) error

TrySizeImageConstraint try if size and image can be used for a allocation

func (*Driver) UpdateFirmware added in v0.18.1

func (d *Driver) UpdateFirmware(kind FirmwareKind, machineID, revision, description string) (*MachineUpdateFirmwareResponse, error)

MachineUpdateFirmware updates given firmware of given machine

func (*Driver) UploadFirmware added in v0.13.1

func (d *Driver) UploadFirmware(kind FirmwareKind, vendor, board, revision, file string) (*firmware.UploadFirmwareOK, error)

UploadFirmware uploads the given firmware for the given vendor and board, which is tagged as specified revision

func (*Driver) User added in v0.18.1

func (d *Driver) User() user.ClientService

func (*Driver) Version added in v0.18.1

func (d *Driver) Version() version.ClientService

func (*Driver) VersionGet added in v0.12.2

func (d *Driver) VersionGet() (*VersionGetResponse, error)

VersionGet return a Version

type FirewallCreateRequest

type FirewallCreateRequest struct {
	MachineCreateRequest
}

FirewallCreateRequest contains data for a machine creation

type FirewallCreateResponse

type FirewallCreateResponse struct {
	Firewall *models.V1FirewallResponse
}

FirewallCreateResponse is returned when a machine was created

type FirewallFindRequest

type FirewallFindRequest struct {
	MachineFindRequest
}

FirewallFindRequest contains criteria for a machine listing

type FirewallGetResponse

type FirewallGetResponse struct {
	Firewall *models.V1FirewallResponse
}

FirewallGetResponse contains the machine get result

type FirewallListResponse

type FirewallListResponse struct {
	Firewalls []*models.V1FirewallResponse
}

FirewallListResponse contains the machine list result

type FirmwareKind added in v0.13.1

type FirmwareKind string
const (
	Bios FirmwareKind = "bios"
	Bmc  FirmwareKind = "bmc"
)

type FirmwaresResponse added in v0.13.1

type FirmwaresResponse struct {
	Firmwares *models.V1FirmwaresResponse
}

FirmwaresResponse contains all firmwares matching the requested parameters

type HealthGetResponse added in v0.12.2

type HealthGetResponse struct {
	Health *models.RestHealthResponse
}

HealthGetResponse is the response of a HealthGet action

type IPAllocateRequest

type IPAllocateRequest struct {

	// SpecificIP tries to acquire this ip.
	// Required: false
	IPAddress string `json:"ipaddress"`

	// a description for this entity
	Description string `json:"description,omitempty"`

	// the readable name
	Name string `json:"name,omitempty"`

	// the network this ip acquire request belongs to, required.
	// Required: true
	Networkid string `json:"networkid"`

	// the project this ip acquire request belongs to, required.
	// Required: true
	Projectid string `json:"projectid"`

	// the machine this ip acquire request belongs to
	Machineid *string `json:"machineid"`

	// the type of the ip
	Type string `json:"type,omitempty"`

	// tags for the ip
	Tags []string `json:"tags,omitempty"`
}

IPAllocateRequest is the request to allocate an IP

type IPDetailResponse

type IPDetailResponse struct {
	IP *models.V1IPResponse
}

IPDetailResponse is the response to an IP detail request.

type IPFindRequest

type IPFindRequest struct {
	IPAddress        *string
	AllocationUUID   *string
	ProjectID        *string
	ParentPrefixCidr *string
	NetworkID        *string
	MachineID        *string
	Type             *string
	Tags             []string
	Name             *string
}

IPFindRequest contains criteria for a ip listing

type IPListResponse

type IPListResponse struct {
	IPs []*models.V1IPResponse
}

IPListResponse is the response when ips are listed

type IPUpdateRequest

type IPUpdateRequest struct {
	// the ip address for this ip update request.
	IPAddress string `json:"ipaddress"`
	// a description for this entity
	Description string `json:"description,omitempty"`
	// the readable name
	Name string `json:"name,omitempty"`
	// the type of the ip
	Type string `json:"type,omitempty"`
	// tags for the ip
	Tags []string `json:"tags,omitempty"`
}

IPUpdateRequest is the request to update an IP

type ImageCreateRequest

type ImageCreateRequest struct {
	ID             string
	Name           string
	Description    string
	URL            string
	Features       []string
	ExpirationDate *time.Time
	Classification *string
}

ImageCreateRequest is the response of a ImageList action

type ImageCreateResponse

type ImageCreateResponse struct {
	Image *models.V1ImageResponse
}

ImageCreateResponse is the response of a ImageList action

type ImageGetResponse

type ImageGetResponse struct {
	Image *models.V1ImageResponse
}

ImageGetResponse is the response of a ImageList action

type ImageListResponse

type ImageListResponse struct {
	Image []*models.V1ImageResponse
}

ImageListResponse is the response of a ImageList action

type MachineAllocationNetwork

type MachineAllocationNetwork struct {
	Autoacquire bool
	NetworkID   string
}

MachineAllocationNetwork contains configuration for machine networks

type MachineCreateRequest

type MachineCreateRequest struct {
	Description      string
	Hostname         string
	Name             string
	UserData         string
	Size             string
	FilesystemLayout string
	Project          string
	Partition        string
	Image            string
	Tags             []string
	SSHPublicKeys    []string
	UUID             string
	Networks         []MachineAllocationNetwork
	IPs              []string
}

MachineCreateRequest contains data for a machine creation

type MachineCreateResponse

type MachineCreateResponse struct {
	Machine *models.V1MachineResponse
}

MachineCreateResponse is returned when a machine was created

type MachineDeleteResponse

type MachineDeleteResponse struct {
	Machine *models.V1MachineResponse
}

MachineDeleteResponse contains the machine delete result

type MachineDiskResponse added in v0.11.2

type MachineDiskResponse struct {
	Machine *models.V1MachineResponse
}

MachineDiskResponse contains the machine Disk result

type MachineFindRequest

type MachineFindRequest struct {
	ID          *string
	Name        *string
	PartitionID *string
	SizeID      *string
	RackID      *string
	Tags        []string

	// allocation
	AllocationName      *string
	AllocationProject   *string
	AllocationImageID   *string
	AllocationHostname  *string
	AllocationSucceeded *bool
	AllocationRole      *string

	// network
	NetworkIDs                 []string
	NetworkPrefixes            []string
	NetworkIPs                 []string
	NetworkDestinationPrefixes []string
	NetworkVrfs                []int64
	NetworkPrivate             *bool
	NetworkASNs                []int64
	NetworkNat                 *bool
	NetworkUnderlay            *bool

	// hardware
	HardwareMemory   *int64
	HardwareCPUCores *int64

	// nics
	NicsMacAddresses         []string
	NicsNames                []string
	NicsVrfs                 []string
	NicsNeighborMacAddresses []string
	NicsNeighborNames        []string
	NicsNeighborVrfs         []string

	// disks
	DiskNames []string
	DiskSizes []int64

	// state
	StateValue *string

	// ipmi
	IpmiAddress    *string
	IpmiMacAddress *string
	IpmiUser       *string
	IpmiInterface  *string

	// fru
	FruChassisPartNumber   *string
	FruChassisPartSerial   *string
	FruBoardMfg            *string
	FruBoardMfgSerial      *string
	FruBoardPartNumber     *string
	FruProductManufacturer *string
	FruProductPartNumber   *string
	FruProductSerial       *string
}

MachineFindRequest contains criteria for a machine listing

type MachineFirmwareResponse added in v0.13.1

type MachineFirmwareResponse struct {
	Kind    FirmwareKind
	Machine *models.V1MachineResponse
}

MachineFirmwareResponse contains the machine firmware result

type MachineGetResponse

type MachineGetResponse struct {
	Machine *models.V1MachineResponse
}

MachineGetResponse contains the machine get result

type MachineIPMIGetResponse

type MachineIPMIGetResponse struct {
	Machine *models.V1MachineIPMIResponse
}

MachineIPMIGetResponse contains the machine ipmi get result

type MachineIPMIListResponse

type MachineIPMIListResponse struct {
	Machines []*models.V1MachineIPMIResponse
}

MachineIPMIListResponse contains the machine ipmi list result

type MachineIPMIReportResponse added in v0.7.6

type MachineIPMIReportResponse struct {
	Response *models.V1MachineIpmiReportResponse
}

MachineIPMIReportResponse contains the machine ipmi report result

type MachineIPMIReports added in v0.10.3

type MachineIPMIReports struct {
	Reports *models.V1MachineIpmiReports
}

MachineIPMIReports contains the machine ipmi report

type MachineListResponse

type MachineListResponse struct {
	Machines []*models.V1MachineResponse
}

MachineListResponse contains the machine list result

type MachinePowerResponse

type MachinePowerResponse struct {
	Machine *models.V1MachineResponse
}

MachinePowerResponse contains the machine power result

type MachinePxeResponse added in v0.11.2

type MachinePxeResponse struct {
	Machine *models.V1MachineResponse
}

MachinePxeResponse contains the machine Pxe result

type MachineStateResponse

type MachineStateResponse struct {
	Machine *models.V1MachineResponse
}

MachineStateResponse contains the machine bios result

type MachineUpdateFirmwareResponse added in v0.13.1

type MachineUpdateFirmwareResponse struct {
	Kind    FirmwareKind
	Machine *models.V1MachineResponse
}

MachineUpdateFirmwareResponse contains the firmware update result

type MachineUpdateRequest added in v0.17.0

type MachineUpdateRequest struct {
	ID          string
	Description *string
	Tags        []string
}

MachineCreateRequest contains data for a machine update

type MachineUpdateResponse added in v0.17.0

type MachineUpdateResponse struct {
	Machine *models.V1MachineResponse
}

MachineUpdateResponse is returned when a machine was updated

type NetworkAllocateRequest

type NetworkAllocateRequest struct {
	// a description for this entity
	Description string `json:"description,omitempty"`

	// the readable name
	Name string `json:"name,omitempty"`

	// the partition this network belongs to, TODO: can be empty ?
	// Required: true
	PartitionID string `json:"partitionid"`

	// the project this network belongs to, can be empty if globally available.
	// Required: true
	ProjectID string `json:"projectid,omitempty"`

	// marks a network as shareable.
	// Required: false
	Shared bool `json:"shared,omitempty"`

	// Packets leaving this network get masqueraded
	// Required: false
	Nat bool `json:"nat,omitempty"`

	// A map of key/value pairs treated as labels.
	// Required: false
	Labels map[string]string `json:"labels"`

	// the destination prefixes of this network
	// Required: false
	Destinationprefixes []string `json:"destinationprefixes,omitempty"`
}

NetworkAllocateRequest is the request to allocate a new private network

type NetworkCreateRequest

type NetworkCreateRequest struct {
	ID *string `json:"id"`
	// a description for this entity
	Description string `json:"description,omitempty"`

	// the readable name
	Name string `json:"name,omitempty"`

	// if set to true, packets leaving this network get masqueraded behind interface network.
	// Required: true
	Nat bool `json:"nat"`

	// the partition this network belongs to, TODO: can be empty ?
	// Required: true
	Partitionid string `json:"partitionid"`

	// the prefixes of this network, required.
	// Required: true
	Prefixes []string `json:"prefixes"`

	// the destination prefixes of this network
	// Required: true
	Destinationprefixes []string `json:"destinationprefixes"`

	// if set to true, this network acts a supernetwork for private networks
	// Required: true
	PrivateSuper bool `json:"privatesuper"`

	// the project this network belongs to, can be empty if globally available.
	// Required: true
	Projectid string `json:"projectid"`

	// if set to true, this network can be used for underlay communication
	// Required: true
	Underlay bool `json:"underlay"`

	// the vrf this network is associated with
	Vrf int64 `json:"vrf,omitempty"`

	// if set to true, the network can share the vrf with other networks
	// Required: false
	VrfShared bool `json:"vrfshared,omitempty"`

	// A map of key/value pairs treated as labels.
	// Required: false
	Labels map[string]string `json:"labels"`
}

NetworkCreateRequest is the request for create a new network

type NetworkDetailResponse

type NetworkDetailResponse struct {
	Network *models.V1NetworkResponse
}

NetworkDetailResponse is the response of a NetworkList action

type NetworkFindRequest

type NetworkFindRequest struct {
	ID                  *string
	Name                *string
	PartitionID         *string
	ProjectID           *string
	Prefixes            []string
	DestinationPrefixes []string
	Nat                 *bool
	PrivateSuper        *bool
	Underlay            *bool
	Vrf                 *int64
	ParentNetworkID     *string
	Labels              map[string]string
}

NetworkFindRequest contains criteria for a network listing

type NetworkGetResponse

type NetworkGetResponse struct {
	Network *models.V1NetworkResponse
}

NetworkGetResponse contains the network get result

type NetworkListResponse

type NetworkListResponse struct {
	Networks []*models.V1NetworkResponse
}

NetworkListResponse is the response of a NetworkList action

type NetworkUpdateRequest

type NetworkUpdateRequest struct {
	// the network id for this update request.
	Networkid string `json:"networkid"`
	// Prefix the prefix to add/remove
	Prefix string
}

NetworkUpdateRequest is the request to update the Network

type PartitionCapacityRequest added in v0.15.6

type PartitionCapacityRequest struct {
	ID   *string
	Size *string
}

type PartitionCapacityResponse

type PartitionCapacityResponse struct {
	Capacity []*models.V1PartitionCapacity
}

PartitionCapacityResponse is the response of a PartitionGet action

type PartitionCreateRequest

type PartitionCreateRequest struct {
	ID                         string
	Name                       string
	Description                string
	Bootconfig                 BootConfig
	Mgmtserviceaddress         string
	Privatenetworkprefixlength int32
}

PartitionCreateRequest is the response of a ImageList action

type PartitionCreateResponse

type PartitionCreateResponse struct {
	Partition *models.V1PartitionResponse
}

PartitionCreateResponse is the response of a ImageList action

type PartitionGetResponse

type PartitionGetResponse struct {
	Partition *models.V1PartitionResponse
}

PartitionGetResponse is the response of a PartitionGet action

type PartitionListResponse

type PartitionListResponse struct {
	Partition []*models.V1PartitionResponse
}

PartitionListResponse is the response of a PartitionList action

type ProjectFindRequest

type ProjectFindRequest struct {
	ID     string
	Name   string
	Tenant string
}

ProjectFindRequest is the find request struct

type ProjectGetResponse

type ProjectGetResponse struct {
	Project *models.V1ProjectResponse
}

ProjectGetResponse is the response of a ProjectGet action

type ProjectListResponse

type ProjectListResponse struct {
	Project []*models.V1ProjectResponse
}

ProjectListResponse is the response of a ProjectList action

type SizeCreateRequest

type SizeCreateRequest struct {
	ID          string
	Name        string
	Description string
	Constraints []*models.V1SizeConstraint
}

SizeCreateRequest is the request to create a new Size

type SizeCreateResponse

type SizeCreateResponse struct {
	Size *models.V1SizeResponse
}

SizeCreateResponse is the response of a SizeList action

type SizeGetResponse

type SizeGetResponse struct {
	Size *models.V1SizeResponse
}

SizeGetResponse is the response of a SizeGet action

type SizeListResponse

type SizeListResponse struct {
	Size []*models.V1SizeResponse
}

SizeListResponse is the response of a SizeList action

type SizeTryResponse

type SizeTryResponse struct {
	Logs []*models.V1SizeMatchingLog
}

SizeTryResponse is the response of a SizeTry action

type SwitchGetResponse added in v0.8.1

type SwitchGetResponse struct {
	Switch *models.V1SwitchResponse
}

SwitchGetResponse is the response of a SwitchGet action

type SwitchListResponse

type SwitchListResponse struct {
	Switch []*models.V1SwitchResponse
}

SwitchListResponse is the response of a SwitchList action

type SwitchUpdateRequest added in v0.8.1

type SwitchUpdateRequest struct {
	ID          string
	Name        string
	Description string
	RackID      string
	Mode        string
}

SwitchUpdateRequest contains properties to update a switch

type TenantFindRequest added in v0.14.0

type TenantFindRequest struct {
	ID     string
	Name   string
	Tenant string
}

TenantFindRequest is the find request struct

type TenantGetResponse added in v0.14.0

type TenantGetResponse struct {
	Tenant *models.V1TenantResponse
}

TenantGetResponse is the response of a TenantGet action

type TenantListResponse added in v0.14.0

type TenantListResponse struct {
	Tenant []*models.V1TenantResponse
}

TenantListResponse is the response of a TenantList action

type VersionGetResponse added in v0.12.2

type VersionGetResponse struct {
	Version *models.RestVersion
}

VersionGetResponse is the response of a VersionGet action

Jump to

Keyboard shortcuts

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