Documentation ¶
Index ¶
- Constants
- func NewFilesystemLayout(f FilesystemLayoutCreateRequest) (*metal.FilesystemLayout, error)
- func NewMetalIPMI(r *MachineIPMI) metal.IPMI
- func NewMetalMachineHardware(r *MachineHardware) metal.MachineHardware
- func NewSizeImageConstraint(s SizeImageConstraintCreateRequest) *metal.SizeImageConstraint
- func NewSwitch(r SwitchRegisterRequest) *metal.Switch
- type AuditFindRequest
- type AuditResponse
- type BGPFilter
- type BoardRevisions
- type BootInfo
- type ChassisIdentifyLEDState
- type Common
- type Describable
- type Disk
- type DiskPartition
- type EmptyBody
- type Filesystem
- type FilesystemLayoutBase
- type FilesystemLayoutConstraints
- type FilesystemLayoutCreateRequest
- type FilesystemLayoutMatchRequest
- type FilesystemLayoutResponse
- type FilesystemLayoutTryRequest
- type FilesystemLayoutUpdateRequest
- type FirewallAllocateRequest
- type FirewallCreateRequest
- type FirewallEgressRule
- type FirewallFindRequest
- type FirewallIngressRule
- type FirewallResponse
- type FirewallRules
- type Firmware
- type FirmwaresResponse
- type IPAllocateRequest
- type IPBase
- type IPFindRequest
- type IPIdentifiable
- type IPResponse
- type IPUpdateRequest
- type Identifiable
- type ImageBase
- type ImageCreateRequest
- type ImageFindRequest
- type ImageResponse
- type ImageUpdateRequest
- type LogicalVolume
- type MachineAbortReinstallRequest
- type MachineAllocateRequest
- type MachineAllocation
- type MachineAllocationNetwork
- type MachineAllocationNetworks
- type MachineBIOS
- type MachineBase
- type MachineBlockDevice
- type MachineConsolePasswordRequest
- type MachineConsolePasswordResponse
- type MachineFindRequest
- type MachineFru
- type MachineHardware
- type MachineHardwareBase
- type MachineIPMI
- type MachineIPMIResponse
- type MachineIpmiReport
- type MachineIpmiReportResponse
- type MachineIpmiReports
- type MachineIssue
- type MachineIssueResponse
- type MachineIssuesRequest
- type MachineNetwork
- type MachineNic
- type MachineNics
- type MachineProvisioningEvent
- type MachineProvisioningEvents
- type MachineRecentProvisioningEvents
- type MachineRecentProvisioningEventsResponse
- type MachineReinstallRequest
- type MachineResponse
- type MachineState
- type MachineUpdateFirmwareRequest
- type MachineUpdateRequest
- type MachineVPN
- type MetalCPU
- type MetalGPU
- type NetworkAllocateRequest
- type NetworkBase
- type NetworkCreateRequest
- type NetworkFindRequest
- type NetworkImmutable
- type NetworkResponse
- type NetworkUpdateRequest
- type NetworkUsage
- type PartitionBase
- type PartitionBootConfiguration
- type PartitionCapacity
- type PartitionCapacityRequest
- type PartitionCreateRequest
- type PartitionResponse
- type PartitionUpdateRequest
- type PowerMetric
- type Raid
- type ServerCapacities
- type ServerCapacity
- type SizeConstraint
- type SizeConstraintMatchingLog
- type SizeCreateRequest
- type SizeImageConstraintBase
- type SizeImageConstraintCreateRequest
- type SizeImageConstraintResponse
- type SizeImageConstraintTryRequest
- type SizeImageConstraintUpdateRequest
- type SizeMatchingLog
- type SizeReservation
- type SizeReservationResponse
- type SizeResponse
- type SizeSuggestRequest
- type SizeUpdateRequest
- type SwitchBase
- type SwitchConnection
- type SwitchFindRequest
- type SwitchNic
- type SwitchNics
- type SwitchNotifyRequest
- type SwitchNotifyResponse
- type SwitchOS
- type SwitchPortStatus
- type SwitchPortToggleRequest
- type SwitchRegisterRequest
- type SwitchResponse
- type SwitchSync
- type SwitchUpdateRequest
- type Timestamps
- type User
- type VPNRequest
- type VPNResponse
- type VendorRevisions
- type VolumeGroup
Constants ¶
const RecentProvisioningEventsLimit = 20
RecentProvisioningEventsLimit defines how many recent events are added to the MachineRecentProvisioningEvents struct
Variables ¶
This section is empty.
Functions ¶
func NewFilesystemLayout ¶ added in v0.15.0
func NewFilesystemLayout(f FilesystemLayoutCreateRequest) (*metal.FilesystemLayout, error)
func NewMetalIPMI ¶
func NewMetalIPMI(r *MachineIPMI) metal.IPMI
func NewMetalMachineHardware ¶
func NewMetalMachineHardware(r *MachineHardware) metal.MachineHardware
func NewSizeImageConstraint ¶ added in v0.16.3
func NewSizeImageConstraint(s SizeImageConstraintCreateRequest) *metal.SizeImageConstraint
func NewSwitch ¶
func NewSwitch(r SwitchRegisterRequest) *metal.Switch
Types ¶
type AuditFindRequest ¶ added in v0.22.4
type AuditFindRequest struct { Limit int64 `json:"limit" optional:"true"` From time.Time `json:"from" optional:"true"` To time.Time `json:"to" optional:"true"` Component string `json:"component" optional:"true"` RequestId string `json:"rqid" optional:"true"` Type string `json:"type" optional:"true"` User string `json:"user" optional:"true"` Tenant string `json:"tenant" optional:"true"` Detail string `json:"detail" optional:"true"` Phase string `json:"phase" optional:"true"` Path string `json:"path" optional:"true"` ForwardedFor string `json:"forwarded_for" optional:"true"` RemoteAddr string `json:"remote_addr" optional:"true"` Body string `json:"body" optional:"true"` StatusCode int `json:"status_code" optional:"true"` Error string `json:"error" optional:"true"` }
type AuditResponse ¶ added in v0.22.4
type AuditResponse struct { Component string `json:"component" optional:"true"` RequestId string `json:"rqid" optional:"true"` Type string `json:"type" optional:"true"` Timestamp time.Time `json:"timestamp" optional:"true"` User string `json:"user" optional:"true"` Tenant string `json:"tenant" optional:"true"` // HTTP method get, post, put, delete, ... // or for grpc unary, stream Detail string `json:"detail" optional:"true"` // e.g. Request, Response, Error, Opened, Close Phase string `json:"phase" optional:"true"` // /api/v1/... or the method name Path string `json:"path" optional:"true"` ForwardedFor string `json:"forwarded_for" optional:"true"` RemoteAddr string `json:"remote_addr" optional:"true"` Body string `json:"body" optional:"true"` StatusCode int `json:"status_code" optional:"true"` // Internal errors Error string `json:"error" optional:"true"` }
func NewAuditResponse ¶ added in v0.22.4
func NewAuditResponse(e auditing.Entry) *AuditResponse
type BGPFilter ¶
type BGPFilter struct { CIDRs []string `json:"cidrs" description:"the cidr addresses that are allowed to be announced at this switch port"` VNIs []string `json:"vnis" description:"the virtual networks that are exposed at this switch port" optional:"true"` }
func NewBGPFilter ¶
type BoardRevisions ¶ added in v0.13.2
type BootInfo ¶ added in v0.6.0
type BootInfo struct { ImageID string `json:"image_id" description:"the ID of the current image"` PrimaryDisk string `json:"primary_disk" description:"the primary disk"` OSPartition string `json:"os_partition" description:"the partition containing the OS"` Initrd string `json:"initrd" description:"the initrd image"` Cmdline string `json:"cmdline" description:"the cmdline"` Kernel string `json:"kernel" description:"the kernel"` BootloaderID string `json:"bootloaderid" description:"the bootloader ID"` }
type ChassisIdentifyLEDState ¶
type Common ¶
type Common struct { Identifiable Describable }
type Describable ¶
type Disk ¶ added in v0.15.0
type Disk struct { Device string `json:"device" description:"the device to create the partitions"` Partitions []DiskPartition `json:"partitions" description:"list of partitions to create on this disk" optional:"true"` WipeOnReinstall bool `json:"wipeonreinstall" description:"if set to true, this disk will be wiped before reinstallation"` }
type DiskPartition ¶ added in v0.15.0
type DiskPartition struct { Number uint8 `json:"number" description:"partition number, will be appended to partitionprefix to create the final devicename"` Label *string `json:"label" description:"optional label for this this partition" optional:"true"` Size uint64 `json:"size" description:"size in mebibytes (MiB) of this partition"` GPTType *string `json:"gpttype" description:"the gpt partition table type of this partition"` }
type EmptyBody ¶
type EmptyBody struct{}
emptyBody is useful because with go-restful you cannot define an insert / update endpoint without specifying a payload for reading. it would immediately intercept the request and return 406: Not Acceptable to the client.
type Filesystem ¶ added in v0.15.0
type Filesystem struct { Path *string `json:"path" description:"the mountpoint where this filesystem should be mounted on" optional:"true"` Device string `json:"device" description:"the underlying device where this filesystem should be created"` Format string `json:"format" description:"the filesystem format"` Label *string `json:"label" description:"optional label for this this filesystem" optional:"true"` MountOptions []string `json:"mountoptions" description:"the options to use to mount this filesystem" optional:"true"` CreateOptions []string `json:"createoptions" description:"the options to use to create (mkfs) this filesystem" optional:"true"` }
type FilesystemLayoutBase ¶ added in v0.15.0
type FilesystemLayoutBase struct { Filesystems []Filesystem `json:"filesystems" description:"list of filesystems to create" optional:"true"` Disks []Disk `json:"disks" description:"list of disks that belong to this layout" optional:"true"` Raid []Raid `json:"raid" description:"list of raid arrays to create" optional:"true"` VolumeGroups []VolumeGroup `json:"volumegroups" description:"list of volumegroups to create" optional:"true"` LogicalVolumes []LogicalVolume `json:"logicalvolumes" description:"list of logicalvolumes to create" optional:"true"` Constraints FilesystemLayoutConstraints `` /* 144-byte string literal not displayed */ }
type FilesystemLayoutConstraints ¶ added in v0.15.0
type FilesystemLayoutCreateRequest ¶ added in v0.15.0
type FilesystemLayoutCreateRequest struct { Common FilesystemLayoutBase }
type FilesystemLayoutMatchRequest ¶ added in v0.15.0
type FilesystemLayoutResponse ¶ added in v0.15.0
type FilesystemLayoutResponse struct { Common FilesystemLayoutBase }
func NewFilesystemLayoutResponse ¶ added in v0.15.0
func NewFilesystemLayoutResponse(f *metal.FilesystemLayout) *FilesystemLayoutResponse
type FilesystemLayoutTryRequest ¶ added in v0.15.0
type FilesystemLayoutUpdateRequest ¶ added in v0.15.0
type FilesystemLayoutUpdateRequest struct { Common FilesystemLayoutBase }
type FirewallAllocateRequest ¶ added in v0.27.0
type FirewallAllocateRequest struct {
FirewallRules *FirewallRules `` /* 131-byte string literal not displayed */
}
type FirewallCreateRequest ¶
type FirewallCreateRequest struct { MachineAllocateRequest FirewallAllocateRequest }
type FirewallEgressRule ¶ added in v0.27.0
type FirewallEgressRule struct { Protocol string `json:"protocol,omitempty" description:"the protocol for the rule, defaults to tcp" enum:"tcp|udp" optional:"true"` Ports []int `json:"ports" description:"the ports affected by this rule"` To []string `json:"to" description:"the cidrs affected by this rule"` Comment string `json:"comment,omitempty" description:"an optional comment describing what this rule is used for" optional:"true"` }
type FirewallFindRequest ¶
type FirewallFindRequest struct {
MachineFindRequest
}
type FirewallIngressRule ¶ added in v0.27.0
type FirewallIngressRule struct { Protocol string `json:"protocol,omitempty" description:"the protocol for the rule, defaults to tcp" enum:"tcp|udp" optional:"true"` Ports []int `json:"ports" description:"the ports affected by this rule"` To []string `json:"to,omitempty" description:"the cidrs affected by this rule" optional:"true"` From []string `json:"from" description:"the cidrs affected by this rule"` Comment string `json:"comment,omitempty" description:"an optional comment describing what this rule is used for" optional:"true"` }
type FirewallResponse ¶
type FirewallResponse struct {
MachineResponse
}
type FirewallRules ¶ added in v0.27.0
type FirewallRules struct { Egress []FirewallEgressRule `json:"egress,omitempty" description:"list of egress rules to be deployed during firewall allocation" optional:"true"` Ingress []FirewallIngressRule `json:"ingress,omitempty" description:"list of ingress rules to be deployed during firewall allocation" optional:"true"` }
type FirmwaresResponse ¶ added in v0.13.1
type FirmwaresResponse struct {
Revisions map[string]VendorRevisions `json:"revisions" description:"list of firmwares per board per vendor per kind"`
}
type IPAllocateRequest ¶
type IPAllocateRequest struct { Describable IPBase MachineID *string `json:"machineid" description:"the machine id this ip should be associated with" optional:"true"` }
type IPBase ¶
type IPBase struct { ProjectID string `json:"projectid" description:"the project this ip address belongs to"` NetworkID string `json:"networkid" description:"the network this ip allocate request address belongs to"` Type metal.IPType `` /* 179-byte string literal not displayed */ Tags []string `json:"tags" description:"free tags that you associate with this ip." optional:"true"` }
type IPFindRequest ¶
type IPFindRequest struct {
datastore.IPSearchQuery
}
type IPIdentifiable ¶
type IPResponse ¶
type IPResponse struct { Describable IPBase IPIdentifiable Timestamps }
func NewIPResponse ¶
func NewIPResponse(ip *metal.IP) *IPResponse
type IPUpdateRequest ¶
type IPUpdateRequest struct { IPAddress string `` /* 151-byte string literal not displayed */ Describable Type metal.IPType `` /* 179-byte string literal not displayed */ Tags []string `json:"tags" description:"free tags that you associate with this ip." optional:"true"` }
type Identifiable ¶
type Identifiable struct {
ID string `json:"id" description:"the unique ID of this entity" required:"true"`
}
type ImageBase ¶
type ImageBase struct { URL *string `json:"url" modelDescription:"an image that can be attached to a machine" description:"the url of this image" optional:"true"` Features []string `json:"features" description:"features of this image" optional:"true"` ExpirationDate time.Time `json:"expirationDate" description:"expirationDate of this image" optional:"false"` Classification string `json:"classification" description:"classification of this image" optional:"true"` UsedBy []string `json:"usedby" description:"machines where this image is in use" optional:"true"` }
type ImageCreateRequest ¶
type ImageCreateRequest struct { Common URL string `json:"url" description:"the url of this image"` Features []string `json:"features" description:"features of this image" optional:"true"` ExpirationDate *time.Time `json:"expirationDate" description:"expirationDate of this image" optional:"true"` Classification *string `json:"classification" description:"classification of this image" optional:"true"` }
type ImageFindRequest ¶ added in v0.22.2
type ImageFindRequest struct {
datastore.ImageSearchQuery
}
ImageFindRequest is used to find a image with different criteria.
type ImageResponse ¶
type ImageResponse struct { Common ImageBase Timestamps }
func NewImageResponse ¶
func NewImageResponse(img *metal.Image) *ImageResponse
type ImageUpdateRequest ¶
type LogicalVolume ¶ added in v0.15.0
type LogicalVolume struct { Name string `json:"name" description:"the name of the logical volume"` VolumeGroup string `json:"volumegroup" description:"the name of the volume group where to create the logical volume onto"` Size uint64 `json:"size" description:"size in mebibytes (MiB) of this volume"` LVMType string `json:"lvmtype" description:"the type of this logical volume can be either linear|striped|raid1"` }
type MachineAbortReinstallRequest ¶ added in v0.6.0
type MachineAbortReinstallRequest struct {
PrimaryDiskWiped bool `json:"primary_disk_wiped" description:"indicates whether the primary disk is already wiped"`
}
type MachineAllocateRequest ¶
type MachineAllocateRequest struct { UUID *string `` /* 204-byte string literal not displayed */ Describable Hostname *string `json:"hostname" description:"the hostname for the allocated machine (defaults to metal)" optional:"true"` ProjectID string `json:"projectid" description:"the project id to assign this machine to"` PartitionID string `json:"partitionid" description:"the partition id to assign this machine to"` SizeID string `json:"sizeid" description:"the size id to assign this machine to"` ImageID string `json:"imageid" description:"the image id to assign this machine to"` FilesystemLayoutID *string `json:"filesystemlayoutid" description:"the filesystemlayout id to assign to this machine" optional:"true"` SSHPubKeys []string `json:"ssh_pub_keys" description:"the public ssh keys to access the machine with"` UserData *string `json:"user_data" description:"cloud-init.io compatible userdata must be base64 encoded" optional:"true"` Tags []string `json:"tags" description:"tags for this machine" optional:"true"` Networks MachineAllocationNetworks `json:"networks" description:"the networks that this machine will be placed in." optional:"true"` IPs []string `json:"ips" description:"the ips to attach to this machine additionally" optional:"true"` PlacementTags []string `` /* 256-byte string literal not displayed */ }
type MachineAllocation ¶
type MachineAllocation struct { Creator string `json:"creator" description:"email of machine creator"` Created time.Time `json:"created" description:"the time when the machine was created"` Name string `json:"name" description:"the name of the machine"` Description string `json:"description,omitempty" description:"a description for this machine" optional:"true"` Project string `json:"project" description:"the project id that this machine is assigned to" ` Image *ImageResponse `json:"image" description:"the image assigned to this machine" readOnly:"true" optional:"true"` FilesystemLayout *FilesystemLayoutResponse `json:"filesystemlayout" description:"filesystemlayout to create on this machine" optional:"true"` MachineNetworks []MachineNetwork `json:"networks" description:"the networks of this machine"` Hostname string `json:"hostname" description:"the hostname which will be used when creating the machine"` SSHPubKeys []string `json:"ssh_pub_keys" description:"the public ssh keys to access the machine with"` UserData string `json:"user_data,omitempty" description:"userdata to execute post installation tasks" optional:"true"` Succeeded bool `json:"succeeded" description:"if the allocation of the machine was successful, this is set to true"` Reinstall bool `json:"reinstall" description:"indicates whether to reinstall the machine"` BootInfo *BootInfo `json:"boot_info" description:"information required for booting the machine from HD" optional:"true"` Role string `json:"role" enum:"machine|firewall" description:"the role of the machine"` VPN *MachineVPN `json:"vpn" description:"vpn connection info for machine" optional:"true"` AllocationUUID string `` /* 150-byte string literal not displayed */ FirewallRules *FirewallRules `json:"firewall_rules,omitempty" description:"a set of firewall rules to apply" optional:"true"` }
type MachineAllocationNetworks ¶
type MachineAllocationNetworks []MachineAllocationNetwork
type MachineBIOS ¶
type MachineBase ¶
type MachineBase struct { Partition *PartitionResponse `` /* 165-byte string literal not displayed */ RackID string `json:"rackid" description:"the rack assigned to this machine" readOnly:"true" optional:"true"` Size *SizeResponse `json:"size" description:"the size of this machine" readOnly:"true" optional:"true"` Hardware MachineHardware `json:"hardware" description:"the hardware of this machine"` BIOS MachineBIOS `json:"bios" description:"bios information of this machine"` Allocation *MachineAllocation `json:"allocation" description:"the allocation data of an allocated machine" optional:"true"` State MachineState `json:"state" rethinkdb:"state" description:"the state of this machine"` LEDState ChassisIdentifyLEDState `json:"ledstate" rethinkdb:"ledstate" description:"the state of this chassis identify LED"` Liveliness string `json:"liveliness" description:"the liveliness of this machine"` RecentProvisioningEvents MachineRecentProvisioningEvents `json:"events" description:"recent events of this machine during provisioning"` Tags []string `json:"tags" description:"tags for this machine"` }
type MachineBlockDevice ¶
type MachineConsolePasswordRequest ¶ added in v0.14.3
type MachineConsolePasswordResponse ¶ added in v0.14.3
type MachineFindRequest ¶
type MachineFindRequest struct {
datastore.MachineSearchQuery
}
type MachineFru ¶
type MachineFru struct { ChassisPartNumber *string `` /* 141-byte string literal not displayed */ ChassisPartSerial *string `json:"chassis_part_serial,omitempty" description:"the chassis part serial" optional:"true"` BoardMfg *string `json:"board_mfg,omitempty" description:"the board mfg" optional:"true"` BoardMfgSerial *string `json:"board_mfg_serial,omitempty" description:"the board mfg serial" optional:"true"` BoardPartNumber *string `json:"board_part_number,omitempty" description:"the board part number" optional:"true"` ProductManufacturer *string `json:"product_manufacturer,omitempty" description:"the product manufacturer" optional:"true"` ProductPartNumber *string `json:"product_part_number,omitempty" description:"the product part number" optional:"true"` ProductSerial *string `json:"product_serial,omitempty" description:"the product serial" optional:"true"` }
type MachineHardware ¶
type MachineHardware struct { MachineHardwareBase Nics MachineNics `json:"nics" description:"the list of network interfaces of this machine"` }
type MachineHardwareBase ¶
type MachineHardwareBase struct { Memory uint64 `json:"memory" description:"the total memory of the machine"` CPUCores int `json:"cpu_cores" description:"the number of cpu cores"` Disks []MachineBlockDevice `json:"disks" description:"the list of block devices of this machine"` MetalCPUs []MetalCPU `json:"cpus,omitempty" optional:"true" description:"the cpu details"` MetalGPUs []MetalGPU `json:"gpus,omitempty" optional:"true" description:"the gpu details"` }
type MachineIPMI ¶
type MachineIPMI struct { Address string `json:"address" modelDescription:"The IPMI connection data"` MacAddress string `json:"mac"` User string `json:"user"` Password string `json:"password"` Interface string `json:"interface"` Fru MachineFru `json:"fru"` BMCVersion string `json:"bmcversion"` PowerState string `json:"powerstate"` PowerMetric *PowerMetric `json:"powermetric"` LastUpdated time.Time `json:"last_updated"` }
type MachineIPMIResponse ¶
type MachineIPMIResponse struct { Common MachineBase IPMI MachineIPMI `json:"ipmi" description:"ipmi information of this machine"` Timestamps }
func NewMachineIPMIResponse ¶
type MachineIpmiReport ¶
type MachineIpmiReport struct { BMCIp string FRU *MachineFru BIOSVersion string BMCVersion string PowerState string IndicatorLEDState string PowerMetric *PowerMetric }
type MachineIpmiReports ¶ added in v0.10.3
type MachineIpmiReports struct { PartitionID string `json:"partitionid,omitempty" description:"the partition id for the ipmi report"` Reports map[string]MachineIpmiReport `json:"reports,omitempty" description:"uuid to machinereport"` }
type MachineIssue ¶ added in v0.24.2
type MachineIssue struct { ID string `json:"id" description:"the id of the issue"` Severity string `json:"severity" description:"the severity of the issue"` Description string `json:"description" description:"a description of the issue"` RefURL string `json:"ref_url" description:"an issue reference to the issue in metal-stack docs"` Details string `json:"details" description:"details of the issue"` }
type MachineIssueResponse ¶ added in v0.24.2
type MachineIssuesRequest ¶ added in v0.24.2
type MachineIssuesRequest struct { datastore.MachineSearchQuery Only []issues.Type `json:"only" description:"a list of machine issues to include"` Omit []issues.Type `json:"omit" description:"a list of machine issues to omit"` Severity string `json:"severity" description:"filters issue for given severity"` LastErrorThreshold time.Duration `json:"last_error_threshold" description:"defines the last error threshold"` }
type MachineNetwork ¶
type MachineNetwork struct { NetworkID string `json:"networkid" description:"the networkID of the allocated machine in this vrf"` Prefixes []string `json:"prefixes" description:"the prefixes of this network"` IPs []string `json:"ips" description:"the ip addresses of the allocated machine in this vrf"` DestinationPrefixes []string `` /* 148-byte string literal not displayed */ NetworkType string `json:"networktype" description:"the network type, types can be looked up in the network package of metal-lib"` Vrf uint `json:"vrf" description:"the vrf of the allocated machine"` // Attention, uint32 is converted to integer by swagger which is int32 which is to small to hold a asn ASN int64 `json:"asn" description:"ASN number for this network in the bgp configuration"` Nat bool `json:"nat" description:"if set to true, packets leaving this network get masqueraded behind interface ip"` // Private flag to indicate this is a private network // // Deprecated: can be removed once old machine images without NetworkType are not supported anymore Private bool `json:"private" description:"indicates whether this network is the private network of this machine"` // Underlay flag to indicate this is a underlay network // // Deprecated: can be removed once old machine images without NetworkType are not supported anymore Underlay bool `json:"underlay" description:"if set to true, this network can be used for underlay communication"` }
type MachineNic ¶
type MachineNic struct { MacAddress string `json:"mac" description:"the mac address of this network interface"` Name string `json:"name" description:"the name of this network interface"` Identifier string `json:"identifier" description:"the unique identifier of this network interface"` Neighbors MachineNics `json:"neighbors" description:"the neighbors visible to this network interface"` }
type MachineNics ¶
type MachineNics []MachineNic
type MachineProvisioningEvent ¶
type MachineProvisioningEvent struct { Time time.Time `json:"time" description:"the time that this event was received" optional:"true" readOnly:"true"` Event string `json:"event" description:"the event emitted by the machine"` Message string `json:"message" description:"an additional message to add to the event" optional:"true"` }
type MachineProvisioningEvents ¶ added in v0.16.6
type MachineProvisioningEvents map[string]MachineProvisioningEvent
type MachineRecentProvisioningEvents ¶
type MachineRecentProvisioningEvents struct { Events []MachineProvisioningEvent `json:"log" description:"the log of recent machine provisioning events"` LastEventTime *time.Time `json:"last_event_time" description:"the time where the last event was received" optional:"true"` LastErrorEvent *MachineProvisioningEvent `json:"last_error_event,omitempty" description:"the last erroneous event received" optional:"true"` CrashLoop bool `json:"crash_loop" description:"indicates that machine is provisioning crash loop"` FailedMachineReclaim bool `json:"failed_machine_reclaim" description:"indicates that machine reclaim has failed"` }
func NewMachineRecentProvisioningEvents ¶
func NewMachineRecentProvisioningEvents(ec *metal.ProvisioningEventContainer) *MachineRecentProvisioningEvents
type MachineRecentProvisioningEventsResponse ¶ added in v0.16.6
type MachineReinstallRequest ¶ added in v0.6.0
type MachineResponse ¶
type MachineResponse struct { Common MachineBase Timestamps }
func NewMachineResponse ¶
type MachineState ¶
type MachineState struct { Value string `json:"value" enum:"RESERVED|LOCKED|" description:"the state of this machine. empty means available for all"` Description string `json:"description" description:"a description why this machine is in the given state"` Issuer string `json:"issuer,omitempty" optional:"true" description:"the user that changed the state"` MetalHammerVersion string `json:"metal_hammer_version" description:"the version of metal hammer which put the machine in waiting state"` }
type MachineUpdateFirmwareRequest ¶ added in v0.13.1
type MachineUpdateFirmwareRequest struct { Kind string `json:"kind" enum:"bios|bmc" description:"the firmware kind, i.e. [bios|bmc]"` Revision string `json:"revision" description:"the update revision"` Description string `json:"description" description:"a description why the machine has been updated"` }
type MachineUpdateRequest ¶ added in v0.17.0
type MachineUpdateRequest struct { Identifiable Description *string `json:"description" description:"a description for this machine"` Tags []string `json:"tags" description:"tags for this machine." optional:"true"` SSHPubKeys []string `json:"ssh_pub_keys" description:"the public ssh keys to access the machine with" optional:"true"` }
MachineUpdateRequest defines the properties of a machine which can be updated.
type MachineVPN ¶ added in v0.20.0
type MachineVPN struct { ControlPlaneAddress string `json:"address" description:"address of VPN control plane"` AuthKey string `json:"auth_key" description:"auth key used to connect to VPN"` Connected bool `json:"connected" description:"connected to the VPN"` }
func NewMachineVPN ¶ added in v0.20.0
func NewMachineVPN(m *metal.MachineVPN) *MachineVPN
type NetworkAllocateRequest ¶
type NetworkAllocateRequest struct { Describable NetworkBase DestinationPrefixes []string `json:"destinationprefixes" description:"the destination prefixes of this network" optional:"true"` Nat *bool `json:"nat" description:"if set to true, packets leaving this network get masqueraded behind interface ip" optional:"true"` }
NetworkAllocateRequest is used to allocate a Network prefix from a given Network.
type NetworkBase ¶
type NetworkBase struct { PartitionID *string `json:"partitionid" description:"the partition this network belongs to" optional:"true"` ProjectID *string `json:"projectid" description:"the project id this network belongs to, can be empty if globally available" optional:"true"` Labels map[string]string `json:"labels" description:"free labels that you associate with this network." optional:"true"` }
NetworkBase defines properties common for all Network structs.
type NetworkCreateRequest ¶
type NetworkCreateRequest struct { ID *string `json:"id" description:"the unique ID of this entity, auto-generated if left empty"` Describable NetworkBase NetworkImmutable }
NetworkCreateRequest is used to create a new Network.
type NetworkFindRequest ¶
type NetworkFindRequest struct {
datastore.NetworkSearchQuery
}
NetworkFindRequest is used to find a Network with different criteria.
type NetworkImmutable ¶
type NetworkImmutable struct { Prefixes []string `` /* 152-byte string literal not displayed */ DestinationPrefixes []string `` /* 148-byte string literal not displayed */ Nat bool `json:"nat" description:"if set to true, packets leaving this network get masqueraded behind interface ip"` PrivateSuper bool `` /* 195-byte string literal not displayed */ Underlay bool `json:"underlay" description:"if set to true, this network can be used for underlay communication"` Vrf *uint `json:"vrf" description:"the vrf this network is associated with" optional:"true"` ParentNetworkID *string `json:"parentnetworkid" description:"the id of the parent network" optional:"true"` }
NetworkImmutable defines the properties which are immutable in the Network.
type NetworkResponse ¶
type NetworkResponse struct { Common NetworkBase NetworkImmutable Usage NetworkUsage `json:"usage" description:"usage of ips and prefixes in this network" readonly:"true"` Timestamps }
NetworkResponse holds all properties returned in a FindNetwork or GetNetwork request.
func NewNetworkResponse ¶
func NewNetworkResponse(network *metal.Network, usage *metal.NetworkUsage) *NetworkResponse
NewNetworkResponse converts the metal Network in the NetworkResponse visible from the API.
type NetworkUpdateRequest ¶
type NetworkUpdateRequest struct { Common Prefixes []string `json:"prefixes" description:"the prefixes of this network" optional:"true"` DestinationPrefixes []string `json:"destinationprefixes" description:"the destination prefixes of this network" optional:"true"` Labels map[string]string `json:"labels" description:"free labels that you associate with this network." optional:"true"` }
NetworkUpdateRequest defines the properties of a Network which can be updated.
type NetworkUsage ¶
type NetworkUsage struct { AvailableIPs uint64 `json:"available_ips" description:"the total available IPs" readonly:"true"` UsedIPs uint64 `json:"used_ips" description:"the total used IPs" readonly:"true"` AvailablePrefixes uint64 `json:"available_prefixes" description:"the total available Prefixes" readonly:"true"` UsedPrefixes uint64 `json:"used_prefixes" description:"the total used Prefixes" readonly:"true"` }
NetworkUsage reports core metrics about available and used IPs or Prefixes in a Network.
type PartitionBase ¶
type PartitionBase struct { MgmtServiceAddress *string `json:"mgmtserviceaddress" description:"the address to the management service of this partition" optional:"true"` PrivateNetworkPrefixLength *int `` /* 183-byte string literal not displayed */ Labels map[string]string `json:"labels" description:"free labels that you associate with this partition" optional:"true"` }
type PartitionBootConfiguration ¶
type PartitionBootConfiguration struct { ImageURL *string `` /* 210-byte string literal not displayed */ KernelURL *string `json:"kernelurl" description:"the url to download the kernel for the boot image" optional:"true"` CommandLine *string `json:"commandline" description:"the cmdline to the kernel for the boot image" optional:"true"` }
type PartitionCapacity ¶
type PartitionCapacity struct { Common ServerCapacities ServerCapacities `json:"servers" description:"servers available in this partition"` }
type PartitionCapacityRequest ¶ added in v0.15.6
type PartitionCreateRequest ¶
type PartitionCreateRequest struct { Common PartitionBase PartitionBootConfiguration PartitionBootConfiguration `json:"bootconfig" description:"the boot configuration of this partition"` }
type PartitionResponse ¶
type PartitionResponse struct { Common PartitionBase PartitionBootConfiguration PartitionBootConfiguration `json:"bootconfig" description:"the boot configuration of this partition"` Timestamps Labels map[string]string `json:"labels" description:"free labels that you associate with this partition" optional:"true"` }
func NewPartitionResponse ¶
func NewPartitionResponse(p *metal.Partition) *PartitionResponse
type PartitionUpdateRequest ¶
type PartitionUpdateRequest struct { Common MgmtServiceAddress *string `json:"mgmtserviceaddress" description:"the address to the management service of this partition" optional:"true"` PartitionBootConfiguration *PartitionBootConfiguration `json:"bootconfig" description:"the boot configuration of this partition" optional:"true"` Labels map[string]string `json:"labels" description:"free labels that you associate with this partition" optional:"true"` }
type PowerMetric ¶ added in v0.21.5
type PowerMetric struct { // AverageConsumedWatts shall represent the // average power level that occurred averaged over the last IntervalInMin // minutes. AverageConsumedWatts float32 `json:"averageconsumedwatts"` // IntervalInMin shall represent the time // interval (or window), in minutes, in which the PowerMetrics properties // are measured over. // Should be an integer, but some Dell implementations return as a float. IntervalInMin float32 `json:"intervalinmin"` // MaxConsumedWatts shall represent the // maximum power level in watts that occurred within the last // IntervalInMin minutes. MaxConsumedWatts float32 `json:"maxconsumedwatts"` // MinConsumedWatts shall represent the // minimum power level in watts that occurred within the last // IntervalInMin minutes. MinConsumedWatts float32 `json:"minconsumedwatts"` }
type Raid ¶ added in v0.15.0
type Raid struct { ArrayName string `json:"arrayname" description:"the name of the resulting array device"` Devices []string `json:"devices" description:"list of devices to form the raid array from" optional:"true"` Level string `json:"level" description:"raid level to create, should be 0 or 1"` CreateOptions []string `json:"createoptions" description:"the options to use to create the raid array" optional:"true"` Spares int `json:"spares" description:"number of spares for the raid array"` }
type ServerCapacities ¶ added in v0.24.2
type ServerCapacities []*ServerCapacity
func (ServerCapacities) FindBySize ¶ added in v0.24.2
func (s ServerCapacities) FindBySize(size string) *ServerCapacity
type ServerCapacity ¶
type ServerCapacity struct { Size string `json:"size" description:"the size of the server"` Total int `json:"total" description:"total amount of servers with this size"` Free int `json:"free" description:"free servers with this size"` Allocated int `json:"allocated" description:"allocated servers with this size"` Reservations int `json:"reservations" description:"the amount of reservations for this size"` UsedReservations int `json:"usedreservations" description:"the amount of used reservations for this size"` Faulty int `json:"faulty" description:"servers with issues with this size"` FaultyMachines []string `json:"faultymachines" description:"servers with issues with this size"` Other int `json:"other" description:"servers neither free, allocated or faulty with this size"` OtherMachines []string `json:"othermachines" description:"servers neither free, allocated or faulty with this size"` }
type SizeConstraint ¶
type SizeConstraint struct { Type metal.ConstraintType `` /* 174-byte string literal not displayed */ Min uint64 `json:"min,omitempty" description:"the minimum value of the constraint"` Max uint64 `json:"max,omitempty" description:"the maximum value of the constraint"` Identifier string `json:"identifier,omitempty" description:"glob pattern which matches to the given type, for example gpu pci id"` }
type SizeConstraintMatchingLog ¶
type SizeConstraintMatchingLog struct { Constraint SizeConstraint `json:"constraint" description:"the size constraint to which this log relates to"` Match bool `json:"match" description:"indicates whether the constraint matched or not"` Log string `json:"log" description:"a string representation of the matching condition"` }
type SizeCreateRequest ¶
type SizeCreateRequest struct { Common SizeConstraints []SizeConstraint `json:"constraints" description:"a list of constraints that defines this size"` SizeReservations []SizeReservation `` /* 134-byte string literal not displayed */ Labels map[string]string `json:"labels" description:"free labels that you associate with this size." optional:"true"` }
type SizeImageConstraintBase ¶ added in v0.16.3
type SizeImageConstraintCreateRequest ¶ added in v0.16.3
type SizeImageConstraintCreateRequest struct { Common SizeImageConstraintBase `json:"constraints" description:"a list of constraints that for this size" optional:"true"` }
type SizeImageConstraintResponse ¶ added in v0.16.3
type SizeImageConstraintResponse struct { Common SizeImageConstraintBase `json:"constraints" description:"a list of constraints that for this size"` }
func NewSizeImageConstraintResponse ¶ added in v0.16.3
func NewSizeImageConstraintResponse(s *metal.SizeImageConstraint) *SizeImageConstraintResponse
type SizeImageConstraintTryRequest ¶ added in v0.16.3
type SizeImageConstraintUpdateRequest ¶ added in v0.16.3
type SizeImageConstraintUpdateRequest struct { Common SizeImageConstraintBase `json:"constraints" description:"a list of constraints that for this size" optional:"true"` }
type SizeMatchingLog ¶
type SizeMatchingLog struct { Name string `json:"name"` Log string `json:"log"` Match bool `json:"match"` Constraints []SizeConstraintMatchingLog `json:"constraints"` }
func NewSizeMatchingLog ¶
func NewSizeMatchingLog(m *metal.SizeMatchingLog) *SizeMatchingLog
type SizeReservation ¶ added in v0.26.0
type SizeReservation struct { Amount int `json:"amount" description:"the amount of reserved machine allocations for this size"` Description string `json:"description,omitempty" description:"a description for this reservation"` ProjectID string `json:"projectid" description:"the project for which this size reservation is considered"` PartitionIDs []string `` /* 134-byte string literal not displayed */ }
type SizeReservationResponse ¶ added in v0.26.0
type SizeReservationResponse struct { SizeID string `json:"sizeid" description:"the size id of this size reservation"` PartitionID string `json:"partitionid" description:"the partition id of this size reservation"` Tenant string `json:"tenant" description:"the tenant of this size reservation"` ProjectID string `json:"projectid" description:"the project id of this size reservation"` ProjectName string `json:"projectname" description:"the project name of this size reservation"` Reservations int `json:"reservations" description:"the amount of reservations of this size reservation"` UsedReservations int `json:"usedreservations" description:"the used amount of reservations of this size reservation"` ProjectAllocations int `json:"projectallocations" description:"the amount of allocations of this project referenced by this size reservation"` }
type SizeResponse ¶
type SizeResponse struct { Common SizeConstraints []SizeConstraint `json:"constraints" description:"a list of constraints that defines this size"` SizeReservations []SizeReservation `` /* 134-byte string literal not displayed */ Labels map[string]string `json:"labels" description:"free labels that you associate with this size."` Timestamps }
func NewSizeResponse ¶
func NewSizeResponse(s *metal.Size) *SizeResponse
type SizeSuggestRequest ¶ added in v0.24.3
type SizeSuggestRequest struct {
MachineID string `json:"machineID" description:"machineID to retrieve size suggestion for"`
}
type SizeUpdateRequest ¶
type SizeUpdateRequest struct { Common SizeConstraints *[]SizeConstraint `json:"constraints" description:"a list of constraints that defines this size" optional:"true"` SizeReservations []SizeReservation `` /* 134-byte string literal not displayed */ Labels map[string]string `json:"labels" description:"free labels that you associate with this size." optional:"true"` }
type SwitchBase ¶
type SwitchBase struct { RackID string `` /* 137-byte string literal not displayed */ Mode string `json:"mode" description:"the mode the switch currently has" optional:"true"` OS *SwitchOS `json:"os" description:"the operating system the switch currently has" optional:"true"` ManagementIP string `json:"management_ip" description:"the ip address of the management interface of the switch" optional:"true"` ManagementUser string `json:"management_user" description:"the user to connect to the switch" optional:"true"` ConsoleCommand string `json:"console_command" description:"command to access the console of the switch" optional:"true"` }
type SwitchConnection ¶
type SwitchFindRequest ¶ added in v0.22.1
type SwitchFindRequest struct {
datastore.SwitchSearchQuery
}
SwitchFindRequest is used to find a switch with different criteria.
type SwitchNic ¶
type SwitchNic struct { MacAddress string `json:"mac" description:"the mac address of this network interface"` Name string `json:"name" description:"the name of this network interface"` Identifier string `json:"identifier" description:"the identifier of this network interface"` Vrf string `json:"vrf" description:"the vrf this network interface is part of" optional:"true"` BGPFilter *BGPFilter `json:"filter" description:"configures the bgp filter applied at the switch port" optional:"true"` Actual SwitchPortStatus `json:"actual" description:"the current state of the nic" enum:"UP|DOWN|UNKNOWN"` }
type SwitchNics ¶
type SwitchNics []SwitchNic
type SwitchNotifyRequest ¶ added in v0.7.1
type SwitchNotifyRequest struct { Duration time.Duration `json:"sync_duration" description:"the duration of the switch synchronization"` Error *string `json:"error"` PortStates map[string]SwitchPortStatus `json:"port_states" description:"the current switch port states"` }
SwitchNotifyRequest represents the notification sent from the switch to the metal-api after a sync operation. It contains the duration of the sync, any error that occurred, and the updated switch port states.
type SwitchNotifyResponse ¶ added in v0.22.8
type SwitchNotifyResponse struct { Common LastSync *SwitchSync `json:"last_sync" description:"last successful synchronization to the switch" optional:"true"` LastSyncError *SwitchSync `json:"last_sync_error" description:"last synchronization to the switch that was erroneous" optional:"true"` }
func NewSwitchNotifyResponse ¶ added in v0.22.12
func NewSwitchNotifyResponse(s *metal.SwitchStatus) *SwitchNotifyResponse
type SwitchOS ¶ added in v0.22.1
type SwitchOS struct { Vendor string `json:"vendor" description:"the operating system vendor the switch currently has" optional:"true"` Version string `json:"version" description:"the operating system version the switch currently has" optional:"true"` MetalCoreVersion string `json:"metal_core_version" description:"the version of metal-core running" optional:"true"` }
type SwitchPortStatus ¶ added in v0.28.5
type SwitchPortStatus string
SwitchPortStatus is a type alias for a string that represents the status of a switch port. Valid values are defined as constants in this package.
const ( SwitchPortStatusUnknown SwitchPortStatus = "UNKNOWN" SwitchPortStatusUp SwitchPortStatus = "UP" SwitchPortStatusDown SwitchPortStatus = "DOWN" )
SwitchPortStatus defines the possible statuses for a switch port. UNKNOWN indicates the status is not known. UP indicates the port is up and operational. DOWN indicates the port is down and not operational.
type SwitchPortToggleRequest ¶ added in v0.28.5
type SwitchPortToggleRequest struct { NicName string `json:"nic" description:"the nic of the switch you want to change"` Status SwitchPortStatus `json:"status" description:"sets the port status" enum:"UP|DOWN"` }
type SwitchRegisterRequest ¶
type SwitchRegisterRequest struct { Common Nics SwitchNics `json:"nics" description:"the list of network interfaces on the switch"` PartitionID string `json:"partition_id" description:"the partition in which this switch is located"` SwitchBase }
type SwitchResponse ¶
type SwitchResponse struct { Common SwitchBase Nics SwitchNics `json:"nics" description:"the list of network interfaces on the switch with the desired nic states"` Partition PartitionResponse `json:"partition" description:"the partition in which this switch is located"` Connections []SwitchConnection `json:"connections" description:"a connection between a switch port and a machine with the real nic states"` LastSync *SwitchSync `json:"last_sync" description:"last successful synchronization to the switch" optional:"true"` LastSyncError *SwitchSync `json:"last_sync_error" description:"last synchronization to the switch that was erroneous" optional:"true"` Timestamps }
func NewSwitchResponse ¶
func NewSwitchResponse(s *metal.Switch, ss *metal.SwitchStatus, p *metal.Partition, nics SwitchNics, cons []SwitchConnection) *SwitchResponse
type SwitchSync ¶ added in v0.9.2
type SwitchSync struct { Time time.Time `json:"time" description:"point in time when the last switch sync happened"` Duration time.Duration `json:"duration" description:"the duration that lat switch sync took"` Error *string `json:"error" description:"shows the error occurred during the sync" optional:"true"` }
type SwitchUpdateRequest ¶ added in v0.8.0
type SwitchUpdateRequest struct { Common SwitchBase }
type Timestamps ¶
type VPNRequest ¶ added in v0.20.0
type VPNResponse ¶ added in v0.20.0
type VendorRevisions ¶ added in v0.13.2
type VendorRevisions struct {
VendorRevisions map[string]BoardRevisions
}
type VolumeGroup ¶ added in v0.15.0
type VolumeGroup struct { Name string `json:"name" description:"the name of the resulting volume group"` Devices []string `json:"devices" description:"list of devices to form the volume group from" optional:"true"` Tags []string `json:"tags" description:"list of tags to add to the volume group" optional:"true"` }