client

package
v1.4.17 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 23 Imported by: 2

README

Go API client for client

This Metal Client REST API provides access to bare metal as-a-service (BMaaS) within a single project context. Clients are able to create fully-provisioned hosts, storage volumes, and project-specific private networks in an isolated project environment.

Project-owned resources that can be accessed via this API include - Host, Volume, VolumeAttachment, Network (project private), and SSH Key. Each API call is done within a single project context. The specific Project identifier must be provided within the header of for each REST call. The server will validate that the provided authentication credentials (JWTs) are valid for the referenced project before any operation is performed. If a single credential is valid for multiple projects, the client must still reference a single project in the header for each API call.

Clients can also access information about available services and resources through the AvailableResources object. This object provides detailed information about the OS imaging options, the machine size options, the storage volume options, and data center locations which are needed when creating hosts and volumes.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: v1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional

Put the package under your project folder and add the following in import:

import "./client"

Documentation for API Endpoints

All URIs are relative to https://client.greenlake.hpe.com/api/metal/rest/v1

Class Method HTTP request Description
AllocationApi GetBySite Get /allocation/servers Get servers allocation
AllocationApi StorageGetBySite Get /allocation/storage Get storage allocation
AvailableResourcesApi List Get /available-resources Get lists of available resources for creating hosts and volumes
HostsApi Add Post /hosts Create a new Host
HostsApi BootHDD Post /hosts/{hostId}/boothdd Set HDD boot order on Host by ID
HostsApi BootPXE Post /hosts/{hostId}/bootpxe Set PXE boot order on Host by ID
HostsApi Delete Delete /hosts/{hostId} Delete a Host
HostsApi GetByID Get /hosts/{hostId} Retrieve Host by ID
HostsApi List Get /hosts List all Hosts in project
HostsApi Maintenance Post /hosts/{hostId}/maintenance Do maintenance on a Host by ID
HostsApi PowerOff Post /hosts/{hostId}/poweroff Power off Host by ID
HostsApi PowerOn Post /hosts/{hostId}/poweron Power on Host by ID
HostsApi PowerReset Post /hosts/{hostId}/powerreset Reset Host by ID
HostsApi Reimage Post /hosts/{hostId}/reimage Reimage Host by ID
HostsApi Replace Post /hosts/{hostId}/replace Replace Host by ID
HostsApi Update Put /hosts/{hostId} Update an existing Host
IppoolsApi AllocateIPs Post /ippools/{ippoolId}/allocation Allocate IPs from the pool
IppoolsApi GetByID Get /ippools/{ippoolId} Retrieve IP pool by ID
IppoolsApi List Get /ippools List all ip pools in project
IppoolsApi ReturnIPs Post /ippools/{ippoolId}/return Return IPs to the pool
IppoolsApi Update Put /ippools/{ippoolId} Update IP pool by ID
NetworksApi Add Post /networks Add a new network
NetworksApi Delete Delete /networks/{networkId} Delete a network
NetworksApi GetByID Get /networks/{networkId} Retrieve network by ID
NetworksApi List Get /networks List all networks in project
NetworksApi Update Put /networks/{networkId} Update an existing network.
ProjectsApi Add Post /projects Create a new project
ProjectsApi Delete Delete /projects/{projectId} Delete a Project
ProjectsApi GetByID Get /projects/{projectId} Retrieve a project by its ID
ProjectsApi List Get /projects List of all Projects within an organization or cluster
ProjectsApi Update Put /projects/{projectId} Update a project by its ID
ProjectsInfoApi List Get /projects-info List of all projects info within an organization or cluster for which user is authorized.
SshkeysApi Add Post /sshkeys Add a new SSH Key
SshkeysApi Delete Delete /sshkeys/{sshkeyId} Delete an SSH key
SshkeysApi GetByID Get /sshkeys/{sshkeyId} Retrieve SSH Key by ID
SshkeysApi List Get /sshkeys List all sshkeys in project
SshkeysApi Update Put /sshkeys/{sshkeyId} Update an existing SSH Key. Only 'Name' or 'Key' fields can be changed.
UsageReportsApi Get Get /usage-reports Get a usage report
VersionApi Get Get /version Get api server build version
VolumeAttachmentsApi Add Post /volume-attachments Create a new VolumeAttachment
VolumeAttachmentsApi Delete Delete /volume-attachments/{attachmentId} Delete a VolumeAttachment
VolumeAttachmentsApi GetByID Get /volume-attachments/{attachmentId} Retrieve volume attachment by ID
VolumeAttachmentsApi List Get /volume-attachments List all volume attachments in project
VolumesApi Add Post /volumes Add a new volume
VolumesApi Attach Post /volumes/{volumeId}/attach Attach existing volume to Host
VolumesApi Delete Delete /volumes/{volumeId} Delete a volume
VolumesApi Detach Post /volumes/{volumeId}/detach Detach existing volume from Host
VolumesApi GetByID Get /volumes/{volumeId} Retrieve volume by ID
VolumesApi List Get /volumes List all volumes in project
VolumesApi Update Put /volumes/{volumeId} Update an existing volume

Documentation For Models

Documentation For Authorization

BearerAuth

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Membership

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
    Key: "APIKEY",
    Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Project

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
    Key: "APIKEY",
    Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Author

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	AllocationApi AllocationAPI

	AvailableResourcesApi AvailableResourcesAPI

	HostsApi HostsAPI

	IppoolsApi IPPoolsAPI

	NetworksApi NetworksAPI

	ProjectsApi ProjectsAPI

	ProjectsInfoApi ProjectsInfoAPI

	SshkeysApi SshkeysAPI

	UsageReportsApi UsageReportsAPI

	VersionApi VersionAPI

	VolumeAttachmentsApi VolumeAttachmentsAPI

	VolumesApi VolumesAPI
	// contains filtered or unexported fields
}

APIClient manages communication with the HPE GreenLake for bare metal API API vv1 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

ChangeBasePath changes base path to allow switching to mocks

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResonse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type AddVolume

type AddVolume struct {
	Name        string `json:"Name,omitempty"`
	Description string `json:"Description,omitempty"`
	// This object is used for new volume creation in the host create operation. Since host create already has location ID that field is not provided in this object.
	FlavorID string `json:"FlavorID,omitempty"`
	// The size of the volume in GiB
	Capacity int64 `json:"Capacity,omitempty"`
	// Indicates if the volume can be attached to multiple hosts
	Shareable bool `json:"Shareable,omitempty"`
}

AddVolume struct for AddVolume

type Allocation added in v1.4.6

type Allocation struct {
	// Type of the resource the allocation information is listed for.
	ResourceType string `json:"ResourceType,omitempty"`
	// Total number of servers.
	Total int32 `json:"Total,omitempty"`
	// Instance type family name.
	InstanceFamily string `json:"InstanceFamily,omitempty"`
	// Server instance type
	InstanceType string `json:"InstanceType,omitempty"`
	// Available number of servers.
	Available int32 `json:"Available,omitempty"`
	// Array listing of server allocation information for each service type.
	AllocationInfo []ServiceServerInfo `json:"AllocationInfo,omitempty"`
}

Allocation allocation of servers for each PCE service.

type AllocationAPI added in v1.4.6

type AllocationAPI interface {
	/*
	   GetBySite Get servers allocation
	   Returns an array of allocation information for each server instance type. Each instance type's allocation information is further grouped by service type. When using a Metal token, the value in the 'Membership' header determines the scope of the response, i.e., Project or Hoster. However, the default scope is Tenant/Hoster when using the GL IAM token. If the allocation data is needed for a specific project, then the 'Project' header must be present in the request. If the 'siteID' query parameter is present, the information returned is specific to that site ID.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param optional nil or *AllocationApiGetBySiteOpts - Optional Parameters:
	     - @param "SiteID" (optional.String) -  site ID

	   @return []Allocation
	*/
	GetBySite(ctx _context.Context, localVarOptionals *AllocationApiGetBySiteOpts) ([]Allocation, *_nethttp.Response, error)
	/*
	   StorageGetBySite Get storage allocation
	   Returns an array of allocation information for each server instance type. Each instance type's allocation information is further grouped by service type. When using a Metal token, the value in the 'Membership' header determines the scope of the response, i.e., Project or Hoster. However, the default scope is Tenant/Hoster when using the GL IAM token. If the allocation data is needed for a specific project, then the 'Project' header must be present in the request. If the 'siteID' query parameter is present, the information returned is specific to that site ID.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param optional nil or *AllocationApiStorageGetBySiteOpts - Optional Parameters:
	     - @param "SiteID" (optional.String) -  site ID

	   @return []AllocationStorage
	*/
	StorageGetBySite(ctx _context.Context, localVarOptionals *AllocationApiStorageGetBySiteOpts) ([]AllocationStorage, *_nethttp.Response, error)
}

AllocationAPI defines the client functions provided for Allocation.

type AllocationApiGetBySiteOpts added in v1.4.10

type AllocationApiGetBySiteOpts struct {
	SiteID optional.String
}

AllocationApiGetBySiteOpts Optional parameters for the method 'GetBySite'

type AllocationApiService added in v1.4.6

type AllocationApiService service

AllocationApiService AllocationApi service

func (*AllocationApiService) GetBySite added in v1.4.6

GetBySite Get servers allocation Returns an array of allocation information for each server instance type. Each instance type's allocation information is further grouped by service type. When using a Metal token, the value in the 'Membership' header determines the scope of the response, i.e., Project or Hoster. However, the default scope is Tenant/Hoster when using the GL IAM token. If the allocation data is needed for a specific project, then the 'Project' header must be present in the request. If the 'siteID' query parameter is present, the information returned is specific to that site ID.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *AllocationApiGetBySiteOpts - Optional Parameters:
  • @param "SiteID" (optional.String) - site ID

@return []Allocation

func (*AllocationApiService) StorageGetBySite added in v1.4.6

StorageGetBySite Get storage allocation Returns an array of allocation information for each server instance type. Each instance type's allocation information is further grouped by service type. When using a Metal token, the value in the 'Membership' header determines the scope of the response, i.e., Project or Hoster. However, the default scope is Tenant/Hoster when using the GL IAM token. If the allocation data is needed for a specific project, then the 'Project' header must be present in the request. If the 'siteID' query parameter is present, the information returned is specific to that site ID.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *AllocationApiStorageGetBySiteOpts - Optional Parameters:
  • @param "SiteID" (optional.String) - site ID

@return []AllocationStorage

type AllocationApiStorageGetBySiteOpts added in v1.4.7

type AllocationApiStorageGetBySiteOpts struct {
	SiteID optional.String
}

AllocationApiStorageGetBySiteOpts Optional parameters for the method 'StorageGetBySite'

type AllocationStorage added in v1.4.7

type AllocationStorage struct {
	// Type of the resource the allocation information is listed for.
	ResourceType string `json:"ResourceType,omitempty"`
	// Total storage capacity in TB
	Total float32 `json:"Total,omitempty"`
	// Instance type family name.
	InstanceFamily string `json:"InstanceFamily,omitempty"`
	// volume type
	InstanceType string `json:"InstanceType,omitempty"`
	// Available storage space in TB
	Available float32 `json:"Available,omitempty"`
	// Array listing the storage allocation information for each service type.
	AllocationInfo []ServiceStorageInfo `json:"AllocationInfo,omitempty"`
}

AllocationStorage Allocation of storage for each PCE service.

type AvailableImage

type AvailableImage struct {
	// Unique ID for imaging service
	ID string `json:"ID,omitempty"`
	// Top-level grouping of imaging services that may reference an OS or application type
	Category string `json:"Category,omitempty"`
	// Second-level grouping of imaging services.  Typically references a specific OS or application.
	Flavor string `json:"Flavor,omitempty"`
	// Specific version of a imaging service flavor.
	Version string `json:"Version,omitempty"`
	// Additional image information for additional services added to the OS
	Description string `json:"Description,omitempty"`
}

AvailableImage Entry describing an available imaging service

type AvailableNetwork

type AvailableNetwork struct {
	// ID of the network
	ID string `json:"ID,omitempty"`
	// The name of the network
	Name string `json:"Name,omitempty"`
	// The location ID is the data center location of the resource.  The LocationID must be one of those provided by the LocationInfo array returned as part of the get /available-resources call.  The locations are typically described by country, region, and data center.
	LocationID  string         `json:"LocationID,omitempty"`
	Description string         `json:"Description,omitempty"`
	HostUse     NetworkHostUse `json:"HostUse,omitempty"`
	Purpose     NetworkPurpose `json:"Purpose,omitempty"`
	IPPoolID    string         `json:"IPPoolID,omitempty"`
	// VLAN ID of the network
	VLAN int32 `json:"VLAN,omitempty"`
	// VNI ID of the network
	VNI int32 `json:"VNI,omitempty"`
}

AvailableNetwork Entry of a network available within a data center location

type AvailableResources

type AvailableResources struct {
	// Array listing the available host imaging services
	Images []AvailableImage `json:"Images,omitempty"`
	// Array listing the data center locations with available resources
	Locations []LocationInfo `json:"Locations,omitempty"`
	// Array listing the networks available for host connections
	Networks []AvailableNetwork `json:"Networks,omitempty"`
	// Array listing the available machine (server) sizes
	MachineSizes []MachineSize `json:"MachineSizes,omitempty"`
	// Array listing the available volume flavors
	VolumeFlavors []VolumeFlavor `json:"VolumeFlavors,omitempty"`
	// Array listing the existing project volumes that could be attached to a host
	Volumes []VolumeInfo `json:"Volumes,omitempty"`
	// Array listing the number of machines of each size in each location
	MachineInventory []MachineInventory `json:"MachineInventory,omitempty"`
	// Array providing information on the amount of available storage of each flavor in each location
	StorageInventory []StorageInventory `json:"StorageInventory,omitempty"`
	// Array listing pre-defined SSH keys that could be referenced when creating a Host
	SSHKeys []SshKeyEntry `json:"SSHKeys,omitempty"`
}

AvailableResources struct for AvailableResources

type AvailableResourcesAPI

type AvailableResourcesAPI interface {
	/*
	   List Get lists of available resources for creating hosts and volumes
	   Used to get lists of options that are used when creating hosts and volumes. A get /available-resources will return an object that includes the following arrays: * Images - A list of image service IDs along with their category (Linux),    flavor (ubuntu), and version (18.04)  * MachineSizes - A list of machine size IDs along with the machine size    names and detailed descriptions  * Locations - A list of location IDs along with their country, region,    and data center.  * Networks - A list of available Network IDs along with the network name,   location ID, network kind, and host usage (Required, Default, Optional)  * MachineInventory - Information about the available inventory of machines    based on location ID and machine size ID.  While this information may    change rapidly, it can be used by GUIs and systems to restrict host   creates to locations with the desired machine size.  * StorageInventory - Information about the current available storage capacity    for a specific volume flavor by site.   * VolumeFlavors - A list of volume flavor IDs along with their name and    detailed description.  * Volumes - A list of current, existing volumes.  If the volume is in the   the right state, it could be attached to a new Host.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

	   @return AvailableResources
	*/
	List(ctx _context.Context) (AvailableResources, *_nethttp.Response, error)
}

AvailableResourcesAPI defines the client functions provided for AvailableResources.

type AvailableResourcesApiService

type AvailableResourcesApiService service

AvailableResourcesApiService AvailableResourcesApi service

func (*AvailableResourcesApiService) List

List Get lists of available resources for creating hosts and volumes Used to get lists of options that are used when creating hosts and volumes. A get /available-resources will return an object that includes the following arrays: * Images - A list of image service IDs along with their category (Linux), flavor (ubuntu), and version (18.04) * MachineSizes - A list of machine size IDs along with the machine size names and detailed descriptions * Locations - A list of location IDs along with their country, region, and data center. * Networks - A list of available Network IDs along with the network name, location ID, network kind, and host usage (Required, Default, Optional) * MachineInventory - Information about the available inventory of machines based on location ID and machine size ID. While this information may change rapidly, it can be used by GUIs and systems to restrict host creates to locations with the desired machine size. * StorageInventory - Information about the current available storage capacity for a specific volume flavor by site. * VolumeFlavors - A list of volume flavor IDs along with their name and detailed description. * Volumes - A list of current, existing volumes. If the volume is in the the right state, it could be attached to a new Host.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return AvailableResources

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	Servers       []ServerConfiguration
	HTTPClient    *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerUrl

func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error)

ServerUrl returns URL based on server settings

type Country

type Country string

Country the model 'Country'

const (
	COUNTRY_USA Country = "USA"
	COUNTRY_AFG Country = "AFG"
	COUNTRY_ALA Country = "ALA"
	COUNTRY_ALB Country = "ALB"
	COUNTRY_DZA Country = "DZA"
	COUNTRY_ASM Country = "ASM"
	COUNTRY_AND Country = "AND"
	COUNTRY_AGO Country = "AGO"
	COUNTRY_AIA Country = "AIA"
	COUNTRY_ATA Country = "ATA"
	COUNTRY_ATG Country = "ATG"
	COUNTRY_ARG Country = "ARG"
	COUNTRY_ARM Country = "ARM"
	COUNTRY_ABW Country = "ABW"
	COUNTRY_AUS Country = "AUS"
	COUNTRY_AUT Country = "AUT"
	COUNTRY_AZE Country = "AZE"
	COUNTRY_BHS Country = "BHS"
	COUNTRY_BHR Country = "BHR"
	COUNTRY_BGD Country = "BGD"
	COUNTRY_BRB Country = "BRB"
	COUNTRY_BLR Country = "BLR"
	COUNTRY_BEL Country = "BEL"
	COUNTRY_BLZ Country = "BLZ"
	COUNTRY_BEN Country = "BEN"
	COUNTRY_BMU Country = "BMU"
	COUNTRY_BTN Country = "BTN"
	COUNTRY_BOL Country = "BOL"
	COUNTRY_BES Country = "BES"
	COUNTRY_BIH Country = "BIH"
	COUNTRY_BWA Country = "BWA"
	COUNTRY_BVT Country = "BVT"
	COUNTRY_BRA Country = "BRA"
	COUNTRY_IOT Country = "IOT"
	COUNTRY_BRN Country = "BRN"
	COUNTRY_BGR Country = "BGR"
	COUNTRY_BFA Country = "BFA"
	COUNTRY_BDI Country = "BDI"
	COUNTRY_KHM Country = "KHM"
	COUNTRY_CMR Country = "CMR"
	COUNTRY_CAN Country = "CAN"
	COUNTRY_CPV Country = "CPV"
	COUNTRY_CYM Country = "CYM"
	COUNTRY_CAF Country = "CAF"
	COUNTRY_TCD Country = "TCD"
	COUNTRY_CHL Country = "CHL"
	COUNTRY_CHN Country = "CHN"
	COUNTRY_CXR Country = "CXR"
	COUNTRY_CCK Country = "CCK"
	COUNTRY_COL Country = "COL"
	COUNTRY_COM Country = "COM"
	COUNTRY_COG Country = "COG"
	COUNTRY_COD Country = "COD"
	COUNTRY_COK Country = "COK"
	COUNTRY_CRI Country = "CRI"
	COUNTRY_CIV Country = "CIV"
	COUNTRY_HRV Country = "HRV"
	COUNTRY_CUB Country = "CUB"
	COUNTRY_CUW Country = "CUW"
	COUNTRY_CYP Country = "CYP"
	COUNTRY_CZE Country = "CZE"
	COUNTRY_DNK Country = "DNK"
	COUNTRY_DJI Country = "DJI"
	COUNTRY_DMA Country = "DMA"
	COUNTRY_DOM Country = "DOM"
	COUNTRY_ECU Country = "ECU"
	COUNTRY_EGY Country = "EGY"
	COUNTRY_SLV Country = "SLV"
	COUNTRY_GNQ Country = "GNQ"
	COUNTRY_ERI Country = "ERI"
	COUNTRY_EST Country = "EST"
	COUNTRY_ETH Country = "ETH"
	COUNTRY_FLK Country = "FLK"
	COUNTRY_FRO Country = "FRO"
	COUNTRY_FJI Country = "FJI"
	COUNTRY_FIN Country = "FIN"
	COUNTRY_FRA Country = "FRA"
	COUNTRY_GUF Country = "GUF"
	COUNTRY_PYF Country = "PYF"
	COUNTRY_ATF Country = "ATF"
	COUNTRY_GAB Country = "GAB"
	COUNTRY_GMB Country = "GMB"
	COUNTRY_GEO Country = "GEO"
	COUNTRY_DEU Country = "DEU"
	COUNTRY_GHA Country = "GHA"
	COUNTRY_GIB Country = "GIB"
	COUNTRY_GRC Country = "GRC"
	COUNTRY_GRL Country = "GRL"
	COUNTRY_GRD Country = "GRD"
	COUNTRY_GLP Country = "GLP"
	COUNTRY_GUM Country = "GUM"
	COUNTRY_GTM Country = "GTM"
	COUNTRY_GGY Country = "GGY"
	COUNTRY_GIN Country = "GIN"
	COUNTRY_GNB Country = "GNB"
	COUNTRY_GUY Country = "GUY"
	COUNTRY_HTI Country = "HTI"
	COUNTRY_HMD Country = "HMD"
	COUNTRY_VAT Country = "VAT"
	COUNTRY_HND Country = "HND"
	COUNTRY_HKG Country = "HKG"
	COUNTRY_HUN Country = "HUN"
	COUNTRY_ISL Country = "ISL"
	COUNTRY_IND Country = "IND"
	COUNTRY_IDN Country = "IDN"
	COUNTRY_IRN Country = "IRN"
	COUNTRY_IRQ Country = "IRQ"
	COUNTRY_IRL Country = "IRL"
	COUNTRY_IMN Country = "IMN"
	COUNTRY_ISR Country = "ISR"
	COUNTRY_ITA Country = "ITA"
	COUNTRY_JAM Country = "JAM"
	COUNTRY_JPN Country = "JPN"
	COUNTRY_JEY Country = "JEY"
	COUNTRY_JOR Country = "JOR"
	COUNTRY_KAZ Country = "KAZ"
	COUNTRY_KEN Country = "KEN"
	COUNTRY_KIR Country = "KIR"
	COUNTRY_PRK Country = "PRK"
	COUNTRY_KOR Country = "KOR"
	COUNTRY_KWT Country = "KWT"
	COUNTRY_KGZ Country = "KGZ"
	COUNTRY_LAO Country = "LAO"
	COUNTRY_LVA Country = "LVA"
	COUNTRY_LBN Country = "LBN"
	COUNTRY_LSO Country = "LSO"
	COUNTRY_LBR Country = "LBR"
	COUNTRY_LBY Country = "LBY"
	COUNTRY_LIE Country = "LIE"
	COUNTRY_LTU Country = "LTU"
	COUNTRY_LUX Country = "LUX"
	COUNTRY_MAC Country = "MAC"
	COUNTRY_MKD Country = "MKD"
	COUNTRY_MDG Country = "MDG"
	COUNTRY_MWI Country = "MWI"
	COUNTRY_MYS Country = "MYS"
	COUNTRY_MDV Country = "MDV"
	COUNTRY_MLI Country = "MLI"
	COUNTRY_MLT Country = "MLT"
	COUNTRY_MHL Country = "MHL"
	COUNTRY_MTQ Country = "MTQ"
	COUNTRY_MRT Country = "MRT"
	COUNTRY_MUS Country = "MUS"
	COUNTRY_MYT Country = "MYT"
	COUNTRY_MEX Country = "MEX"
	COUNTRY_FSM Country = "FSM"
	COUNTRY_MDA Country = "MDA"
	COUNTRY_MCO Country = "MCO"
	COUNTRY_MNG Country = "MNG"
	COUNTRY_MNE Country = "MNE"
	COUNTRY_MSR Country = "MSR"
	COUNTRY_MAR Country = "MAR"
	COUNTRY_MOZ Country = "MOZ"
	COUNTRY_MMR Country = "MMR"
	COUNTRY_NAM Country = "NAM"
	COUNTRY_NRU Country = "NRU"
	COUNTRY_NPL Country = "NPL"
	COUNTRY_NLD Country = "NLD"
	COUNTRY_NCL Country = "NCL"
	COUNTRY_NZL Country = "NZL"
	COUNTRY_NIC Country = "NIC"
	COUNTRY_NER Country = "NER"
	COUNTRY_NGA Country = "NGA"
	COUNTRY_NIU Country = "NIU"
	COUNTRY_NFK Country = "NFK"
	COUNTRY_MNP Country = "MNP"
	COUNTRY_NOR Country = "NOR"
	COUNTRY_OMN Country = "OMN"
	COUNTRY_PAK Country = "PAK"
	COUNTRY_PLW Country = "PLW"
	COUNTRY_PSE Country = "PSE"
	COUNTRY_PAN Country = "PAN"
	COUNTRY_PNG Country = "PNG"
	COUNTRY_PRY Country = "PRY"
	COUNTRY_PER Country = "PER"
	COUNTRY_PHL Country = "PHL"
	COUNTRY_PCN Country = "PCN"
	COUNTRY_POL Country = "POL"
	COUNTRY_PRT Country = "PRT"
	COUNTRY_PRI Country = "PRI"
	COUNTRY_QAT Country = "QAT"
	COUNTRY_REU Country = "REU"
	COUNTRY_ROU Country = "ROU"
	COUNTRY_RUS Country = "RUS"
	COUNTRY_RWA Country = "RWA"
	COUNTRY_BLM Country = "BLM"
	COUNTRY_SHN Country = "SHN"
	COUNTRY_KNA Country = "KNA"
	COUNTRY_LCA Country = "LCA"
	COUNTRY_MAF Country = "MAF"
	COUNTRY_SPM Country = "SPM"
	COUNTRY_VCT Country = "VCT"
	COUNTRY_WSM Country = "WSM"
	COUNTRY_SMR Country = "SMR"
	COUNTRY_STP Country = "STP"
	COUNTRY_SAU Country = "SAU"
	COUNTRY_SEN Country = "SEN"
	COUNTRY_SRB Country = "SRB"
	COUNTRY_SYC Country = "SYC"
	COUNTRY_SLE Country = "SLE"
	COUNTRY_SGP Country = "SGP"
	COUNTRY_SXM Country = "SXM"
	COUNTRY_SVK Country = "SVK"
	COUNTRY_SVN Country = "SVN"
	COUNTRY_SLB Country = "SLB"
	COUNTRY_SOM Country = "SOM"
	COUNTRY_ZAF Country = "ZAF"
	COUNTRY_SGS Country = "SGS"
	COUNTRY_SSD Country = "SSD"
	COUNTRY_ESP Country = "ESP"
	COUNTRY_LKA Country = "LKA"
	COUNTRY_SDN Country = "SDN"
	COUNTRY_SUR Country = "SUR"
	COUNTRY_SJM Country = "SJM"
	COUNTRY_SWZ Country = "SWZ"
	COUNTRY_SWE Country = "SWE"
	COUNTRY_CHE Country = "CHE"
	COUNTRY_SYR Country = "SYR"
	COUNTRY_TWN Country = "TWN"
	COUNTRY_TJK Country = "TJK"
	COUNTRY_TZA Country = "TZA"
	COUNTRY_THA Country = "THA"
	COUNTRY_TLS Country = "TLS"
	COUNTRY_TGO Country = "TGO"
	COUNTRY_TKL Country = "TKL"
	COUNTRY_TON Country = "TON"
	COUNTRY_TTO Country = "TTO"
	COUNTRY_TUN Country = "TUN"
	COUNTRY_TUR Country = "TUR"
	COUNTRY_TKM Country = "TKM"
	COUNTRY_TCA Country = "TCA"
	COUNTRY_TUV Country = "TUV"
	COUNTRY_UGA Country = "UGA"
	COUNTRY_UKR Country = "UKR"
	COUNTRY_ARE Country = "ARE"
	COUNTRY_GBR Country = "GBR"
	COUNTRY_UMI Country = "UMI"
	COUNTRY_URY Country = "URY"
	COUNTRY_UZB Country = "UZB"
	COUNTRY_VUT Country = "VUT"
	COUNTRY_VEN Country = "VEN"
	COUNTRY_VNM Country = "VNM"
	COUNTRY_VGB Country = "VGB"
	COUNTRY_VIR Country = "VIR"
	COUNTRY_WLF Country = "WLF"
	COUNTRY_ESH Country = "ESH"
	COUNTRY_YEM Country = "YEM"
	COUNTRY_ZMB Country = "ZMB"
	COUNTRY_ZWE Country = "ZWE"
)

List of Country

type ErrorResponse

type ErrorResponse struct {
	// Description of the error condition
	Message string `json:"message"`
	// Optional verbose description of the error condition
	Details string `json:"details,omitempty"`
}

ErrorResponse struct for ErrorResponse

type FlavorDesc

type FlavorDesc struct {
	// Groups flavors together to make finding a specific flavor easier
	Collection string   `json:"Collection,omitempty"`
	Banner1    string   `json:"Banner1,omitempty"`
	Banner2    string   `json:"Banner2,omitempty"`
	Bullets    []string `json:"Bullets,omitempty"`
	// URI to more information about the specific machine size or volume flavor
	InfoLink string `json:"InfoLink,omitempty"`
	// Supplemental tooltip text to use in GUIs
	Tooltip string `json:"Tooltip,omitempty"`
}

FlavorDesc Describes the details of machine size or volume flavor

type GenericOpenAPIError

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

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func NewGenericOpenAPIError

func NewGenericOpenAPIError(body []byte, error string, model interface{}) GenericOpenAPIError

NewGenericOpenAPIError creates a GenericOpenAPIError from the provided parameters.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Message

func (e GenericOpenAPIError) Message() string

Message returns the short error message for display purpose If e.model is set and is of type ErrorResponse, then returns the value in ErrorResponse.Message, otherwise, returns the entire response body in string format.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type HealthStatus

type HealthStatus string

HealthStatus the model 'HealthStatus'

const (
	HEALTHSTATUS_OK       HealthStatus = "OK"
	HEALTHSTATUS_WARNING  HealthStatus = "Warning"
	HEALTHSTATUS_CRITICAL HealthStatus = "Critical"
	HEALTHSTATUS_UNKNOWN  HealthStatus = "Unknown"
)

List of HealthStatus

type Host

type Host struct {
	// Unique ID for the resource instance as generated by the Metal service
	ID string `json:"ID"`
	// Used to determine whether the DB entry has changed since it was last read. This value is updated each time the resource is updated.  Client must send this value unchanged for any update operation.
	ETag string `json:"ETag"`
	// Common name for the resource instance. Must be 128 or fewer printable characters
	Name string `json:"Name"`
	// Time when the resource was created in the database
	Created time.Time `json:"Created,omitempty"`
	// Time when the resource was last modified in the database
	Modified    time.Time `json:"Modified,omitempty"`
	Description string    `json:"Description"`
	// The image service identifier used to image the server. ServiceID is one of those listed by the Images array returned as part of the get /available-resources call.
	ServiceID string `json:"ServiceID,omitempty"`
	// Overall flavor of server image used to image the server
	ServiceFlavor string `json:"ServiceFlavor,omitempty"`
	// Version of the ServiceFlavor used to image the server
	ServiceVersion string `json:"ServiceVersion,omitempty"`
	// The location of the machine assigned to the host.  LocationID is one of those listed by the LocationInfo array returned as part of the get /available-resources call.
	LocationID string `json:"LocationID,omitempty"`
	// Name of the machine size used to identify and select the machine assigned to the host.  MachineSizes are described by the MachineSize array returned by the get /available-resources call.
	MachineSizeName string `json:"MachineSizeName,omitempty"`
	// UniqueID referring to the machine size used to identify and select the machine assigned to the host.  MachineSizes are described by the MachineSize array returned by the get /available-resources call.
	MachineSizeID string `json:"MachineSizeID,omitempty"`
	// UniqueID referring to the machine on which this host is running.
	MachineID string `json:"MachineID,omitempty"`
	// IDs of SSH Keys used when configuring the Host
	SSHKeyIDs []string `json:"SSHKeyIDs,omitempty"`
	// Specific SSH keys that were when configuring the host.
	SSHAuthorizedKeys []string `json:"SSHAuthorizedKeys,omitempty"`
	// The list of IDs corresponding to the networks that were provisioned to the host. These networks are among those listed in the Networks array returned by the get /available-resources call.
	NetworkIDs []string `json:"NetworkIDs"`
	// The host's default network ID. This needs to be one of the values in the  \"NetworkIDs\" list.
	NetworkForDefaultRoute string `json:"NetworkForDefaultRoute"`
	// ID of the network selected to be untagged. This needs to be one of the values in the  \"NetworkIDs\" list.
	NetworkUntagged string `json:"NetworkUntagged"`
	// The list of pre-allocated IP addresses corresponding to the list of NetworkIDs. Pre-allocated IP addresses are optional, but required when updating a host containing Pre-allocated IP addresses.
	PreAllocatedIPs []string `json:"PreAllocatedIPs,omitempty"`
	// The map of Service Network (Provider) ID to Provider MAC address.   The Service Network must be a provider network provisioned to this host. Any Service Networks not included here will default to the physical MAC learned during machine discovery.
	ServiceNetsProviderMAC map[string]string `json:"ServiceNetsProviderMAC,omitempty"`
	// User-provided data attached to the image configuration data when the host was provisioned
	UserData string `json:"UserData,omitempty"`
	// User-provided data to represent the identity of the host within an application environment. For example, this could be set to represent the Kubernetes node ID if the host is provisioned as a Kubernetes node.
	NodeID      string           `json:"NodeID,omitempty"`
	ISCSIConfig *HostIscsiConfig `json:"ISCSIConfig,omitempty"`
	// Details describing host network connections
	Connections []HostConnection `json:"Connections,omitempty"`
	// True if the Host has been deleted.
	Deleted bool `json:"Deleted,omitempty"`
	// Describes if the portal is in active communication to the device
	PortalCommOkay bool            `json:"PortalCommOkay,omitempty"`
	PowerStatus    HostPowerState  `json:"PowerStatus,omitempty"`
	State          HostState       `json:"State,omitempty"`
	Substate       HostSubstate    `json:"Substate,omitempty"`
	StateTime      time.Time       `json:"StateTime,omitempty"`
	SubstateTime   time.Time       `json:"SubstateTime,omitempty"`
	Progress       int64           `json:"Progress,omitempty"`
	Alert          bool            `json:"Alert,omitempty"`
	AlertInfo      []HostAlertInfo `json:"AlertInfo,omitempty"`
	// The current workflow the host is in
	Workflow      string       `json:"Workflow,omitempty"`
	SummaryStatus HealthStatus `json:"SummaryStatus,omitempty"`
	// The map of label name to label value for the host.
	Labels map[string]string `json:"Labels,omitempty"`
}

Host struct for Host

type HostAlertInfo

type HostAlertInfo struct {
	// Identifies the type of alert
	Alert    string       `json:"Alert,omitempty"`
	State    HostState    `json:"State,omitempty"`
	Substate HostSubstate `json:"Substate,omitempty"`
	// Provides some detailed description about the Alert
	Message string    `json:"Message,omitempty"`
	Time    time.Time `json:"Time,omitempty"`
	// Used to acknowledge the alert so that the UI can list only unacknowledged alerts
	Ack bool `json:"Ack,omitempty"`
}

HostAlertInfo struct for HostAlertInfo

type HostAllOf

type HostAllOf struct {
	Description string `json:"Description"`
	// The image service identifier used to image the server. ServiceID is one of those listed by the Images array returned as part of the get /available-resources call.
	ServiceID string `json:"ServiceID,omitempty"`
	// Overall flavor of server image used to image the server
	ServiceFlavor string `json:"ServiceFlavor,omitempty"`
	// Version of the ServiceFlavor used to image the server
	ServiceVersion string `json:"ServiceVersion,omitempty"`
	// The location of the machine assigned to the host.  LocationID is one of those listed by the LocationInfo array returned as part of the get /available-resources call.
	LocationID string `json:"LocationID,omitempty"`
	// Name of the machine size used to identify and select the machine assigned to the host.  MachineSizes are described by the MachineSize array returned by the get /available-resources call.
	MachineSizeName string `json:"MachineSizeName,omitempty"`
	// UniqueID referring to the machine size used to identify and select the machine assigned to the host.  MachineSizes are described by the MachineSize array returned by the get /available-resources call.
	MachineSizeID string `json:"MachineSizeID,omitempty"`
	// UniqueID referring to the machine on which this host is running.
	MachineID string `json:"MachineID,omitempty"`
	// IDs of SSH Keys used when configuring the Host
	SSHKeyIDs []string `json:"SSHKeyIDs,omitempty"`
	// Specific SSH keys that were when configuring the host.
	SSHAuthorizedKeys []string `json:"SSHAuthorizedKeys,omitempty"`
	// The list of IDs corresponding to the networks that were provisioned to the host. These networks are among those listed in the Networks array returned by the get /available-resources call.
	NetworkIDs []string `json:"NetworkIDs"`
	// The host's default network ID. This needs to be one of the values in the  \"NetworkIDs\" list.
	NetworkForDefaultRoute string `json:"NetworkForDefaultRoute"`
	// ID of the network selected to be untagged. This needs to be one of the values in the  \"NetworkIDs\" list.
	NetworkUntagged string `json:"NetworkUntagged"`
	// The list of pre-allocated IP addresses corresponding to the list of NetworkIDs. Pre-allocated IP addresses are optional, but required when updating a host containing Pre-allocated IP addresses.
	PreAllocatedIPs []string `json:"PreAllocatedIPs,omitempty"`
	// The map of Service Network (Provider) ID to Provider MAC address.   The Service Network must be a provider network provisioned to this host. Any Service Networks not included here will default to the physical MAC learned during machine discovery.
	ServiceNetsProviderMAC map[string]string `json:"ServiceNetsProviderMAC,omitempty"`
	// User-provided data attached to the image configuration data when the host was provisioned
	UserData string `json:"UserData,omitempty"`
	// User-provided data to represent the identity of the host within an application environment. For example, this could be set to represent the Kubernetes node ID if the host is provisioned as a Kubernetes node.
	NodeID      string           `json:"NodeID,omitempty"`
	ISCSIConfig *HostIscsiConfig `json:"ISCSIConfig,omitempty"`
	// Details describing host network connections
	Connections []HostConnection `json:"Connections,omitempty"`
	// True if the Host has been deleted.
	Deleted bool `json:"Deleted,omitempty"`
	// Describes if the portal is in active communication to the device
	PortalCommOkay bool            `json:"PortalCommOkay,omitempty"`
	PowerStatus    HostPowerState  `json:"PowerStatus,omitempty"`
	State          HostState       `json:"State,omitempty"`
	Substate       HostSubstate    `json:"Substate,omitempty"`
	StateTime      time.Time       `json:"StateTime,omitempty"`
	SubstateTime   time.Time       `json:"SubstateTime,omitempty"`
	Progress       int64           `json:"Progress,omitempty"`
	Alert          bool            `json:"Alert,omitempty"`
	AlertInfo      []HostAlertInfo `json:"AlertInfo,omitempty"`
	// The current workflow the host is in
	Workflow      string       `json:"Workflow,omitempty"`
	SummaryStatus HealthStatus `json:"SummaryStatus,omitempty"`
	// The map of label name to label value for the host.
	Labels map[string]string `json:"Labels,omitempty"`
}

HostAllOf struct for HostAllOf

type HostConnection

type HostConnection struct {
	Name  string           `json:"Name,omitempty"`
	Ports []HostServerPort `json:"Ports,omitempty"`
	// Indicates whether the network connection should be a link aggregation group (LAG)
	HA bool `json:"HA,omitempty"`
	// The speed of the physical connection from the server to the top of rack switch
	Speed    string                  `json:"Speed,omitempty"`
	Networks []HostNetworkConnection `json:"Networks,omitempty"`
}

HostConnection struct for HostConnection

type HostIscsiConfig

type HostIscsiConfig struct {
	// Fully qualified iSCSI intiator name of this host. This is generated when a host is created and the information is pushed to the new host
	InitiatorName string `json:"InitiatorName"`
	// CHAP secret as generated by the system when attaching a volume.   Visible in VolumeAttachment object.
	CHAPSecret string `json:"CHAPSecret,omitempty"`
	// CHAP user as generated by the system when attaching a volume.   Visible in VolumeAttachment object.
	CHAPUser              string `json:"CHAPUser,omitempty"`
	ISCSIDiscoveryAddress string `json:"ISCSIDiscoveryAddress,omitempty"`
}

HostIscsiConfig struct for HostIscsiConfig

type HostNetworkConnection

type HostNetworkConnection struct {
	// Name of the network connection
	Name string `json:"Name,omitempty"`
	// Unique ID corresponding to a network in the local data center
	NetworkID string `json:"NetworkID,omitempty"`
	// IP address for the network connection
	IP string `json:"IP,omitempty"`
	// The IP subnet address
	Subnet  string `json:"Subnet,omitempty"`
	Netmask string `json:"Netmask,omitempty"`
	// The IP subnet gateway address
	Gateway string `json:"Gateway,omitempty"`
	// List of DNS servers for the IP subnet
	DNS []string `json:"DNS,omitempty"`
	// VLAN ID of the network
	VLAN int32 `json:"VLAN,omitempty"`
	// VNI ID of the network
	VNI int32 `json:"VNI,omitempty"`
	// True if the network is untagged
	Untagged bool `json:"Untagged,omitempty"`
	// Optional web-proxy for external internet access should the IP subnet actually be behind a firewall
	Proxy string `json:"Proxy,omitempty"`
	// Addresses or CIDRs for which proxy requests are not made
	NoProxy string `json:"NoProxy,omitempty"`
}

HostNetworkConnection struct for HostNetworkConnection

type HostPowerState

type HostPowerState string

HostPowerState Current power status of the underlaying physical server (machine)

const (
	HOSTPOWERSTATE_ON      HostPowerState = "ON"
	HOSTPOWERSTATE_OFF     HostPowerState = "OFF"
	HOSTPOWERSTATE_UNKNOWN HostPowerState = "UNKNOWN"
)

List of HostPowerState

type HostServerPort

type HostServerPort struct {
	// Server port name
	Name string `json:"Name,omitempty"`
	// Hardware address for the Ethernet interface (MAC)
	HWAddr string `json:"HWAddr,omitempty"`
}

HostServerPort struct for HostServerPort

type HostState

type HostState string

HostState Overall host state

const (
	HOSTSTATE_NEW                  HostState = "New"
	HOSTSTATE_DELETING             HostState = "Deleting"
	HOSTSTATE_DELETED              HostState = "Deleted"
	HOSTSTATE_FAILED               HostState = "Failed"
	HOSTSTATE_FORCE_DELETING       HostState = "Force Deleting"
	HOSTSTATE_UPDATING_CONNECTIONS HostState = "Updating Connections"
	HOSTSTATE_IMAGING              HostState = "Imaging"
	HOSTSTATE_IMAGING_PREP         HostState = "Imaging Prep"
	HOSTSTATE_CONNECTING           HostState = "Connecting"
	HOSTSTATE_BOOTING              HostState = "Booting"
	HOSTSTATE_READY                HostState = "Ready"
	HOSTSTATE_REIMAGING_PREP       HostState = "Reimaging Prep"
	HOSTSTATE_REPLACING            HostState = "Replacing"
	HOSTSTATE_RELEASING            HostState = "Releasing"
	HOSTSTATE_ALLOCATING           HostState = "Allocating"
	HOSTSTATE_MAINTENANCE          HostState = "Maintenance"
)

List of HostState

type HostSubstate

type HostSubstate string

HostSubstate Host substate within HostState

const (
	HOSTSUBSTATE_EMPTY                 HostSubstate = ""
	HOSTSUBSTATE_ABORT_DEPLOY          HostSubstate = "Abort Deploy"
	HOSTSUBSTATE_ALLOCATE              HostSubstate = "Allocate"
	HOSTSUBSTATE_ATTACHING_VOLUMES     HostSubstate = "Attaching Volumes"
	HOSTSUBSTATE_BOOT_SERVICE_OS       HostSubstate = "Boot Service-OS"
	HOSTSUBSTATE_CLEAR_LOG             HostSubstate = "Clear Log"
	HOSTSUBSTATE_COMPLETE              HostSubstate = "Complete"
	HOSTSUBSTATE_CONFIRM_POST_COMPLETE HostSubstate = "Confirm Post Complete"
	HOSTSUBSTATE_CONNECT               HostSubstate = "Connect"
	HOSTSUBSTATE_CONNECT_PROVISIONING  HostSubstate = "Connect Provisioning"
	HOSTSUBSTATE_DNS_ADD               HostSubstate = "DNS Add"
	HOSTSUBSTATE_DNS_ADD_INIT          HostSubstate = "DNS Add Init"
	HOSTSUBSTATE_DNS_DELETE            HostSubstate = "DNS Delete"
	HOSTSUBSTATE_DEPLOY                HostSubstate = "Deploy"
	HOSTSUBSTATE_DETACH_VOLUMES        HostSubstate = "Detach Volumes"
	HOSTSUBSTATE_ERROR_RECOVERY        HostSubstate = "Error Recovery"
	HOSTSUBSTATE_FAIL_CLEANUP          HostSubstate = "Fail Cleanup"
	HOSTSUBSTATE_FAILED                HostSubstate = "Failed"
	HOSTSUBSTATE_IN_MAINTENANCE        HostSubstate = "In Maintenance"
	HOSTSUBSTATE_IN_OS_PREP            HostSubstate = "In OS Prep"
	HOSTSUBSTATE_INIT                  HostSubstate = "Init"
	HOSTSUBSTATE_INIT_ATTACH_VOLUMES   HostSubstate = "Init Attach Volumes"
	HOSTSUBSTATE_INIT_MAINTENANCE      HostSubstate = "Init Maintenance"
	HOSTSUBSTATE_INIT_OS_PREP          HostSubstate = "Init OS Prep"
	HOSTSUBSTATE_INIT_OFF              HostSubstate = "Init Off"
	HOSTSUBSTATE_ISOLATE               HostSubstate = "Isolate"
	HOSTSUBSTATE_POWER_OFF             HostSubstate = "Power Off"
	HOSTSUBSTATE_POWER_ON              HostSubstate = "Power On"
	HOSTSUBSTATE_RELEASE               HostSubstate = "Release"
	HOSTSUBSTATE_RELEASE_WITH_PROBLEM  HostSubstate = "Release With Problem"
	HOSTSUBSTATE_SET_BOOT_DISK         HostSubstate = "Set Boot Disk"
	HOSTSUBSTATE_SNAP_LOG              HostSubstate = "Snap Log"
	HOSTSUBSTATE_SNAP_LOG_OF_FAILURE   HostSubstate = "Snap Log of Failure"
	HOSTSUBSTATE_UPDATE                HostSubstate = "Update"
)

List of HostSubstate

type HostUsageEntry

type HostUsageEntry struct {
	// Project ID that contained the host
	ProjectID string `json:"ProjectID,omitempty"`
	// The location ID is the data center location of the resource.  The LocationID must be one of those provided by the LocationInfo array returned as part of the get /available-resources call.  The locations are typically described by country, region, and data center.
	LocationID string `json:"LocationID,omitempty"`
	// Timestamp of when resource (machine or storage) was allocated
	Allocated time.Time `json:"Allocated,omitempty"`
	// Timestamp of when resource (host or volume) was ready for use
	Ready time.Time `json:"Ready,omitempty"`
	// Timestamp of when resource (machine or storage) was freed
	Freed time.Time `json:"Freed,omitempty"`
	// The start of the usage reporting window or when the resource was allocated
	UsageStart time.Time `json:"UsageStart,omitempty"`
	// The end of the usage reporting window or when the resource was freed
	UsageEnd time.Time `json:"UsageEnd,omitempty"`
	// The difference between the UsageEnd and UsageStart rounded up to the UsageHours
	UsageHours int64 `json:"UsageHours,omitempty"`
	// Description of error that affected the usage reporting
	Error string `json:"Error,omitempty"`
	// Name of the MachineSize requested when host was created
	MachineSizeName string `json:"MachineSizeName,omitempty"`
	// Unique ID of the MachineSize requested when host was created
	MachineSizeID string `json:"MachineSizeID,omitempty"`
	// Name of the associated Host
	HostName string `json:"HostName,omitempty"`
	// Unique ID of the associated Host
	HostID string `json:"HostID,omitempty"`
}

HostUsageEntry struct for HostUsageEntry

type HostUsageEntryAllOf

type HostUsageEntryAllOf struct {
	// Name of the MachineSize requested when host was created
	MachineSizeName string `json:"MachineSizeName,omitempty"`
	// Unique ID of the MachineSize requested when host was created
	MachineSizeID string `json:"MachineSizeID,omitempty"`
	// Name of the associated Host
	HostName string `json:"HostName,omitempty"`
	// Unique ID of the associated Host
	HostID string `json:"HostID,omitempty"`
}

HostUsageEntryAllOf struct for HostUsageEntryAllOf

type HostsAPI

type HostsAPI interface {
	/*
	   Add Create a new Host
	   Creates a new host object which kicks off the provisioning of a physical server in accordance to the attributes provided for the Host object.  Most values for these options must be selected from the set of options provided by the get available-resources API call. The SvcFlavor, SvcVersion, LocationID, SSHKeyIDs, and Network attribute must all be set with appropriate ID values from the available-resources call.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param newHost Defines the configuration of the desired host. See the schema for descriptions of individual attributes.

	   @return Host
	*/
	Add(ctx _context.Context, newHost NewHost) (Host, *_nethttp.Response, error)
	/*
	   BootHDD Set HDD boot order on Host by ID
	   Sets a single Host with matching ID to attempt HDD boot
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of Host to set to HDD boot

	   @return Host
	*/
	BootHDD(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)
	/*
	   BootPXE Set PXE boot order on Host by ID
	   Sets a single Host with matching ID to attempt PXE boot when next booting
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of Host to set to PXE boot

	   @return Host
	*/
	BootPXE(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)
	/*
	   Delete Delete a Host
	   Deletes the Host with the matching ID.  A host in the 'Ready' state must first be powered-off before a delete will be permitted.  Deletes to hosts in other states is permitted regardless of the power state
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of Host to delete
	*/
	Delete(ctx _context.Context, hostId string) (*_nethttp.Response, error)
	/*
	   GetByID Retrieve Host by ID
	   Returns a single Host with matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of Host to return

	   @return Host
	*/
	GetByID(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)
	/*
	   List List all Hosts in project
	   Returns an array of all Host objects defined within the project.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param optional nil or *HostsApiListOpts - Optional Parameters:
	     - @param "All" (optional.String) -  Includes deleted Host objects in the response when set to \"true\".

	   @return []Host
	*/
	List(ctx _context.Context, localVarOptionals *HostsApiListOpts) ([]Host, *_nethttp.Response, error)
	/*
	   Maintenance Do maintenance on a Host by ID
	   Do maintenance on a host by executing pre-defined operations. The host must be powered off.  The host must also be in the Ready state or in the Failed state and in the Maintenance workflow.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of Host to do maintenance on

	   @return Host
	*/
	Maintenance(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)
	/*
	   PowerOff Power off Host by ID
	   Powers off a single Host with matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of Host to power off

	   @return Host
	*/
	PowerOff(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)
	/*
	   PowerOn Power on Host by ID
	   Powers on a single Host with matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of Host to power on

	   @return Host
	*/
	PowerOn(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)
	/*
	   PowerReset Reset Host by ID
	   Resets a single Host with matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of Host to reset

	   @return Host
	*/
	PowerReset(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)
	/*
	   Reimage Reimage Host by ID
	   Re-deploys a host to the same machine. Only the Host OS is reinstalled, IP addresses, volumes, etc are not changed. The host must be powered off.  The host must also be in the Ready state.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of Host to reimage

	   @return Host
	*/
	Reimage(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)
	/*
	   Replace Replace Host by ID
	   Re-deploys a host with a new machine that satisfies the current host settings. Only the machine is replaced, IP addresses, volumes, etc are not changed. The host must be powered off.  The host must also be in the Ready state or in the Failed state and in the Replace or Maintenace workflow.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of Host to replace

	   @return Host
	*/
	Replace(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)
	/*
	   Update Update an existing Host
	   Updates the Host with the matching ID.  Update is permitted only if the host is in the 'Ready' or 'Connection Updating Failed' state.  Only the Host 'Description', 'Networks', 'NetworkForDefaultRoute', 'NetworkUntagged' and 'ISCSIConfig:InitiatorName' can be updated. 'ISCSIConfig:InitiatorName' can be updated only if the host has no volumes attached.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param hostId ID of host to update
	     - @param host Updated Host

	   @return Host
	*/
	Update(ctx _context.Context, hostId string, host Host) (Host, *_nethttp.Response, error)
}

HostsAPI defines the client functions provided for Hosts.

type HostsApiListOpts

type HostsApiListOpts struct {
	All optional.String
}

HostsApiListOpts Optional parameters for the method 'List'

type HostsApiService

type HostsApiService service

HostsApiService HostsApi service

func (*HostsApiService) Add

func (a *HostsApiService) Add(ctx _context.Context, newHost NewHost) (Host, *_nethttp.Response, error)

Add Create a new Host Creates a new host object which kicks off the provisioning of a physical server in accordance to the attributes provided for the Host object. Most values for these options must be selected from the set of options provided by the get available-resources API call. The SvcFlavor, SvcVersion, LocationID, SSHKeyIDs, and Network attribute must all be set with appropriate ID values from the available-resources call.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param newHost Defines the configuration of the desired host. See the schema for descriptions of individual attributes.

@return Host

func (*HostsApiService) BootHDD

func (a *HostsApiService) BootHDD(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)

BootHDD Set HDD boot order on Host by ID Sets a single Host with matching ID to attempt HDD boot

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of Host to set to HDD boot

@return Host

func (*HostsApiService) BootPXE

func (a *HostsApiService) BootPXE(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)

BootPXE Set PXE boot order on Host by ID Sets a single Host with matching ID to attempt PXE boot when next booting

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of Host to set to PXE boot

@return Host

func (*HostsApiService) Delete

func (a *HostsApiService) Delete(ctx _context.Context, hostId string) (*_nethttp.Response, error)

Delete Delete a Host Deletes the Host with the matching ID. A host in the 'Ready' state must first be powered-off before a delete will be permitted. Deletes to hosts in other states is permitted regardless of the power state

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of Host to delete

func (*HostsApiService) GetByID

func (a *HostsApiService) GetByID(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)

GetByID Retrieve Host by ID Returns a single Host with matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of Host to return

@return Host

func (*HostsApiService) List

func (a *HostsApiService) List(ctx _context.Context, localVarOptionals *HostsApiListOpts) ([]Host, *_nethttp.Response, error)

List List all Hosts in project Returns an array of all Host objects defined within the project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *HostsApiListOpts - Optional Parameters:
  • @param "All" (optional.String) - Includes deleted Host objects in the response when set to \"true\".

@return []Host

func (*HostsApiService) Maintenance

func (a *HostsApiService) Maintenance(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)

Maintenance Do maintenance on a Host by ID Do maintenance on a host by executing pre-defined operations. The host must be powered off. The host must also be in the Ready state or in the Failed state and in the Maintenance workflow.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of Host to do maintenance on

@return Host

func (*HostsApiService) PowerOff

func (a *HostsApiService) PowerOff(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)

PowerOff Power off Host by ID Powers off a single Host with matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of Host to power off

@return Host

func (*HostsApiService) PowerOn

func (a *HostsApiService) PowerOn(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)

PowerOn Power on Host by ID Powers on a single Host with matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of Host to power on

@return Host

func (*HostsApiService) PowerReset

func (a *HostsApiService) PowerReset(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)

PowerReset Reset Host by ID Resets a single Host with matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of Host to reset

@return Host

func (*HostsApiService) Reimage added in v1.4.17

func (a *HostsApiService) Reimage(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)

Reimage Reimage Host by ID Re-deploys a host to the same machine. Only the Host OS is reinstalled, IP addresses, volumes, etc are not changed. The host must be powered off. The host must also be in the Ready state.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of Host to reimage

@return Host

func (*HostsApiService) Replace

func (a *HostsApiService) Replace(ctx _context.Context, hostId string) (Host, *_nethttp.Response, error)

Replace Replace Host by ID Re-deploys a host with a new machine that satisfies the current host settings. Only the machine is replaced, IP addresses, volumes, etc are not changed. The host must be powered off. The host must also be in the Ready state or in the Failed state and in the Replace or Maintenace workflow.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of Host to replace

@return Host

func (*HostsApiService) Update

func (a *HostsApiService) Update(ctx _context.Context, hostId string, host Host) (Host, *_nethttp.Response, error)

Update Update an existing Host Updates the Host with the matching ID. Update is permitted only if the host is in the 'Ready' or 'Connection Updating Failed' state. Only the Host 'Description', 'Networks', 'NetworkForDefaultRoute', 'NetworkUntagged' and 'ISCSIConfig:InitiatorName' can be updated. 'ISCSIConfig:InitiatorName' can be updated only if the host has no volumes attached.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param hostId ID of host to update
  • @param host Updated Host

@return Host

type IPPoolsAPI

type IPPoolsAPI interface {
	/*
	   AllocateIPs Allocate IPs from the pool
	   Allocate IPs from the pool
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param ippoolId ID of IP pool to allocate IPs
	     - @param iPAllocation IPs being requested starting from an optional base IP and their usage

	   @return IpPool
	*/
	AllocateIPs(ctx _context.Context, ippoolId string, iPAllocation []IpAllocation) (IpPool, *_nethttp.Response, error)
	/*
	   GetByID Retrieve IP pool by ID
	   Returns a single ip pool with matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param ippoolId ID of IP pool to return

	   @return IpPool
	*/
	GetByID(ctx _context.Context, ippoolId string) (IpPool, *_nethttp.Response, error)
	/*
	   List List all ip pools in project
	   Returns an array of all ip pool objects defined within the project.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

	   @return []IpPool
	*/
	List(ctx _context.Context) ([]IpPool, *_nethttp.Response, error)
	/*
	   ReturnIPs Return IPs to the pool
	   Return IPs to the pool
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param ippoolId ID of IP pool to return IPs
	     - @param requestBody IP returned to the pool

	   @return IpPool
	*/
	ReturnIPs(ctx _context.Context, ippoolId string, requestBody []string) (IpPool, *_nethttp.Response, error)
	/*
	   Update Update IP pool by ID
	   Update a single ip pool with matching ID. 'DefaultRoute' can only be updated if ip pool is not currently in-use.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param ippoolId ID of IP pool to update
	     - @param ipPool Update IPPool

	   @return IpPool
	*/
	Update(ctx _context.Context, ippoolId string, ipPool IpPool) (IpPool, *_nethttp.Response, error)
}

IPPoolsAPI defines the client functions provided for Ippools.

type IpAllocation

type IpAllocation struct {
	// An optional base address for the allocation, if not specified first available address from the pool will be the base
	Base string `json:"Base"`
	// Number of addresses to allocate starting from the base
	Count int32 `json:"Count"`
	// A short description for the allocation
	Usage string `json:"Usage"`
}

IpAllocation struct for IpAllocation

type IpPool

type IpPool struct {
	// Unique ID for the resource instance as generated by the Metal service
	ID string `json:"ID"`
	// Used to determine whether the DB entry has changed since it was last read. This value is updated each time the resource is updated.  Client must send this value unchanged for any update operation.
	ETag string `json:"ETag"`
	// Common name for the resource instance. Must be 128 or fewer printable characters
	Name string `json:"Name"`
	// Time when the resource was created in the database
	Created time.Time `json:"Created,omitempty"`
	// Time when the resource was last modified in the database
	Modified    time.Time `json:"Modified,omitempty"`
	Description string    `json:"Description"`
	IPVersion   IpVer     `json:"IPVersion,omitempty"`
	// Unique ID of the network associated with the IP pool
	NetworkID string `json:"NetworkID,omitempty"`
	// Base address of the IP pool
	BaseIP  string  `json:"BaseIP,omitempty"`
	Netmask Netmask `json:"Netmask,omitempty"`
	// Default route associated with the IP pool
	DefaultRoute string      `json:"DefaultRoute"`
	Sources      []IpSource  `json:"Sources,omitempty"`
	UseRecords   []UseRecord `json:"UseRecords,omitempty"`
	// List of DNS servers for the IP pool
	DNS []string `json:"DNS"`
	// Optional web-proxy for external internet access should the pool actually be behind a firewall
	Proxy string `json:"Proxy"`
	// Addresses or CIDRs for which proxy requests are not made
	NoProxy string `json:"NoProxy"`
	// List of NTP servers for the IP pool
	NTP  []string `json:"NTP"`
	Pool Pool     `json:"Pool,omitempty"`
}

IpPool struct for IpPool

type IpPoolAllOf

type IpPoolAllOf struct {
	Description string `json:"Description"`
	IPVersion   IpVer  `json:"IPVersion,omitempty"`
	// Unique ID of the network associated with the IP pool
	NetworkID string `json:"NetworkID,omitempty"`
	// Base address of the IP pool
	BaseIP  string  `json:"BaseIP,omitempty"`
	Netmask Netmask `json:"Netmask,omitempty"`
	// Default route associated with the IP pool
	DefaultRoute string      `json:"DefaultRoute"`
	Sources      []IpSource  `json:"Sources,omitempty"`
	UseRecords   []UseRecord `json:"UseRecords,omitempty"`
	// List of DNS servers for the IP pool
	DNS []string `json:"DNS"`
	// Optional web-proxy for external internet access should the pool actually be behind a firewall
	Proxy string `json:"Proxy"`
	// Addresses or CIDRs for which proxy requests are not made
	NoProxy string `json:"NoProxy"`
	// List of NTP servers for the IP pool
	NTP  []string `json:"NTP"`
	Pool Pool     `json:"Pool,omitempty"`
}

IpPoolAllOf struct for IpPoolAllOf

type IpPoolStats

type IpPoolStats struct {
	// Total number of IPs (pool capacity)
	Total int32 `json:"Total,omitempty"`
	// Number of non allocated IPs
	Available int32 `json:"Available,omitempty"`
	// Number of allocated IPs
	InUse int32 `json:"InUse,omitempty"`
}

IpPoolStats struct for IpPoolStats

type IpRange

type IpRange struct {
	// Base address for the IP range
	Base string `json:"Base,omitempty"`
	// Number of IPs to count from the base
	Count int32 `json:"Count,omitempty"`
	// Default route for the IP range
	DefaultRoute string  `json:"DefaultRoute,omitempty"`
	Netmask      Netmask `json:"Netmask,omitempty"`
	// Base address of the Source the IPRange was allocated from
	SourceBase string `json:"SourceBase,omitempty"`
}

IpRange struct for IpRange

type IpSource

type IpSource struct {
	// Base address for the IP source
	Base string `json:"Base,omitempty"`
	// Number of IPs to count from the base
	Count int32 `json:"Count,omitempty"`
}

IpSource struct for IpSource

type IpVer

type IpVer string

IpVer Describes the IP version

const (
	IPVER_I_PV4 IpVer = "IPv4"
	IPVER_I_PV6 IpVer = "IPv6"
)

List of IPVer

type IppoolsApiService

type IppoolsApiService service

IppoolsApiService IppoolsApi service

func (*IppoolsApiService) AllocateIPs

func (a *IppoolsApiService) AllocateIPs(ctx _context.Context, ippoolId string, iPAllocation []IpAllocation) (IpPool, *_nethttp.Response, error)

AllocateIPs Allocate IPs from the pool Allocate IPs from the pool

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param ippoolId ID of IP pool to allocate IPs
  • @param iPAllocation IPs being requested starting from an optional base IP and their usage

@return IpPool

func (*IppoolsApiService) GetByID

func (a *IppoolsApiService) GetByID(ctx _context.Context, ippoolId string) (IpPool, *_nethttp.Response, error)

GetByID Retrieve IP pool by ID Returns a single ip pool with matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param ippoolId ID of IP pool to return

@return IpPool

func (*IppoolsApiService) List

List List all ip pools in project Returns an array of all ip pool objects defined within the project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []IpPool

func (*IppoolsApiService) ReturnIPs

func (a *IppoolsApiService) ReturnIPs(ctx _context.Context, ippoolId string, requestBody []string) (IpPool, *_nethttp.Response, error)

ReturnIPs Return IPs to the pool Return IPs to the pool

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param ippoolId ID of IP pool to return IPs
  • @param requestBody IP returned to the pool

@return IpPool

func (*IppoolsApiService) Update

func (a *IppoolsApiService) Update(ctx _context.Context, ippoolId string, ipPool IpPool) (IpPool, *_nethttp.Response, error)

Update Update IP pool by ID Update a single ip pool with matching ID. 'DefaultRoute' can only be updated if ip pool is not currently in-use.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param ippoolId ID of IP pool to update
  • @param ipPool Update IPPool

@return IpPool

type IscsiParameters

type IscsiParameters struct {
	// The IP address of the host in dotted notation.
	HostIPAddress string `json:"HostIPAddress"`
	// The full initiator name to be created. The name must be at least 12 characters in length and begin with \"iqn.\".
	InitiatorName string `json:"InitiatorName"`
	// CHAPSecret is the Challenge Authentication Protocol secret to be shared between array and initiator. If empty, no CHAP login is enabled; if set it must be a string between 12 and 16 characters.
	CHAPSecret string `json:"CHAPSecret,omitempty"`
	// CHAPUserName is the CHAP username to use for CHAP authentication. If CHAPSecret is specified, CHAPUserName must also be specified.
	CHAPUserName string `json:"CHAPUserName,omitempty"`
}

IscsiParameters struct for IscsiParameters

type Limits

type Limits struct {
	// Maximum number of hosts to allow
	Hosts int32 `json:"Hosts"`
	// Maximum number of volumes to allow
	Volumes int32 `json:"Volumes"`
	// Maximum capacity to allow in TiB
	VolumeCapacity int64 `json:"VolumeCapacity"`
	// Maximum number of private networks to allow
	PrivateNetworks int32 `json:"PrivateNetworks"`
	// Map of instance type ID to maximum number of hosts that can be created with that instance type
	InstanceTypes map[string]int32 `json:"InstanceTypes,omitempty"`
}

Limits struct for Limits

type LocationInfo

type LocationInfo struct {
	// Unique ID for data center location
	ID      string  `json:"ID,omitempty"`
	Country Country `json:"Country,omitempty"`
	// Region within the indicated country
	Region string `json:"Region,omitempty"`
	// Data center descriptor
	DataCenter string `json:"DataCenter,omitempty"`
}

LocationInfo Entry on data center with its location ID and country, region, and data center description strings

type MachineInventory

type MachineInventory struct {
	// Unique ID of the data center location
	LocationID string `json:"LocationID,omitempty"`
	// ID of a MachineSize as listed in the MachineSizes array
	SizeID string `json:"SizeID,omitempty"`
	// The number of machines in inventory with indicated machine size at the indicated location
	Number int32 `json:"Number,omitempty"`
}

MachineInventory An entry describing the number of machines of a particular machine size at a specific location

type MachineSize

type MachineSize struct {
	// Unique ID for the machine size offering
	ID string `json:"ID,omitempty"`
	// Typical user-visible name for a machine size offering
	Name    string     `json:"Name,omitempty"`
	Details FlavorDesc `json:"Details,omitempty"`
}

MachineSize Description of a specific machine size offering

type MachineSizeInfo

type MachineSizeInfo struct {
	Name         string `json:"Name,omitempty"`
	ProjectsUsed int32  `json:"ProjectsUsed,omitempty"`
	OtherUsed    int32  `json:"OtherUsed,omitempty"`
	Available    int32  `json:"Available,omitempty"`
	ID           string `json:"ID,omitempty"`
	// True if the usage of this machine size is restricted  to selected projects, false if the machine size is available to anyone.
	Restricted bool `json:"Restricted,omitempty"`
}

MachineSizeInfo struct for MachineSizeInfo

type Netmask

type Netmask string

Netmask the model 'Netmask'

const (
	NETMASK__8   Netmask = "/8"
	NETMASK__9   Netmask = "/9"
	NETMASK__10  Netmask = "/10"
	NETMASK__11  Netmask = "/11"
	NETMASK__12  Netmask = "/12"
	NETMASK__13  Netmask = "/13"
	NETMASK__14  Netmask = "/14"
	NETMASK__15  Netmask = "/15"
	NETMASK__16  Netmask = "/16"
	NETMASK__17  Netmask = "/17"
	NETMASK__18  Netmask = "/18"
	NETMASK__19  Netmask = "/19"
	NETMASK__20  Netmask = "/20"
	NETMASK__21  Netmask = "/21"
	NETMASK__22  Netmask = "/22"
	NETMASK__23  Netmask = "/23"
	NETMASK__24  Netmask = "/24"
	NETMASK__25  Netmask = "/25"
	NETMASK__26  Netmask = "/26"
	NETMASK__27  Netmask = "/27"
	NETMASK__28  Netmask = "/28"
	NETMASK__29  Netmask = "/29"
	NETMASK__30  Netmask = "/30"
	NETMASK__31  Netmask = "/31"
	NETMASK__104 Netmask = "/104"
	NETMASK__105 Netmask = "/105"
	NETMASK__106 Netmask = "/106"
	NETMASK__107 Netmask = "/107"
	NETMASK__108 Netmask = "/108"
	NETMASK__109 Netmask = "/109"
	NETMASK__110 Netmask = "/110"
	NETMASK__111 Netmask = "/111"
	NETMASK__112 Netmask = "/112"
	NETMASK__113 Netmask = "/113"
	NETMASK__114 Netmask = "/114"
	NETMASK__115 Netmask = "/115"
	NETMASK__116 Netmask = "/116"
	NETMASK__117 Netmask = "/117"
	NETMASK__118 Netmask = "/118"
	NETMASK__119 Netmask = "/119"
	NETMASK__120 Netmask = "/120"
	NETMASK__121 Netmask = "/121"
	NETMASK__122 Netmask = "/122"
	NETMASK__123 Netmask = "/123"
	NETMASK__124 Netmask = "/124"
	NETMASK__125 Netmask = "/125"
	NETMASK__126 Netmask = "/126"
	NETMASK__127 Netmask = "/127"
)

List of Netmask

type Network

type Network struct {
	// Unique ID for the resource instance as generated by the Metal service
	ID string `json:"ID"`
	// Used to determine whether the DB entry has changed since it was last read. This value is updated each time the resource is updated.  Client must send this value unchanged for any update operation.
	ETag string `json:"ETag"`
	// Common name for the resource instance. Must be 128 or fewer printable characters
	Name string `json:"Name"`
	// Time when the resource was created in the database
	Created time.Time `json:"Created,omitempty"`
	// Time when the resource was last modified in the database
	Modified time.Time `json:"Modified,omitempty"`
	// The location ID is the data center location of the resource.  The LocationID must be one of those provided by the LocationInfo array returned as part of the get /available-resources call.  The locations are typically described by country, region, and data center.
	LocationID  string         `json:"LocationID,omitempty"`
	Description string         `json:"Description,omitempty"`
	HostUse     NetworkHostUse `json:"HostUse,omitempty"`
	Purpose     NetworkPurpose `json:"Purpose,omitempty"`
	IPPoolID    string         `json:"IPPoolID,omitempty"`
	// VLAN ID of the network
	VLAN int32 `json:"VLAN,omitempty"`
	// VNI ID of the network
	VNI int32 `json:"VNI,omitempty"`
}

Network struct for Network

type NetworkAllOf

type NetworkAllOf struct {
	// The location ID is the data center location of the resource.  The LocationID must be one of those provided by the LocationInfo array returned as part of the get /available-resources call.  The locations are typically described by country, region, and data center.
	LocationID  string         `json:"LocationID,omitempty"`
	Description string         `json:"Description,omitempty"`
	HostUse     NetworkHostUse `json:"HostUse,omitempty"`
	Purpose     NetworkPurpose `json:"Purpose,omitempty"`
	IPPoolID    string         `json:"IPPoolID,omitempty"`
	// VLAN ID of the network
	VLAN int32 `json:"VLAN,omitempty"`
	// VNI ID of the network
	VNI int32 `json:"VNI,omitempty"`
}

NetworkAllOf struct for NetworkAllOf

type NetworkHostUse

type NetworkHostUse string

NetworkHostUse Indicates whether use of the network is required, default, or optional. If the network is required, any new create host request for that location must include this network among the requested networks. Default and Optional are both optional networks, but imply whether they should show up initially in pre-populated fields in a graphical user interface.

const (
	NETWORKHOSTUSE_REQUIRED NetworkHostUse = "Required"
	NETWORKHOSTUSE_DEFAULT  NetworkHostUse = "Default"
	NETWORKHOSTUSE_OPTIONAL NetworkHostUse = "Optional"
)

List of NetworkHostUse

type NetworkPurpose added in v1.4.2

type NetworkPurpose string

NetworkPurpose Indicates the purpose of the network.

const (
	NETWORKPURPOSE_BACKUP    NetworkPurpose = "Backup"
	NETWORKPURPOSE_STORAGE   NetworkPurpose = "Storage"
	NETWORKPURPOSE_VM_KERNEL NetworkPurpose = "vmKernel"
	NETWORKPURPOSE_VM_NSX_T  NetworkPurpose = "vmNSX-T"
	NETWORKPURPOSE_V_MOTION  NetworkPurpose = "vMotion"
	NETWORKPURPOSE_V_CHA     NetworkPurpose = "vCHA"
	NETWORKPURPOSE_VM_FT     NetworkPurpose = "vmFT"
	NETWORKPURPOSE_I_SCSI_A  NetworkPurpose = "iSCSI-A"
	NETWORKPURPOSE_I_SCSI_B  NetworkPurpose = "iSCSI-B"
	NETWORKPURPOSE_TELEMETRY NetworkPurpose = "Telemetry"
	NETWORKPURPOSE_EXTERNAL  NetworkPurpose = "External"
)

List of NetworkPurpose

type NetworksAPI

type NetworksAPI interface {
	/*
	   Add Add a new network
	   Adds a new network that can be referenced when creating a Host
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param newNetwork Network that is to be added to the project

	   @return Network
	*/
	Add(ctx _context.Context, newNetwork NewNetwork) (Network, *_nethttp.Response, error)
	/*
	   Delete Delete a network
	   Deletes the network with the matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param networkId ID of network to delete
	*/
	Delete(ctx _context.Context, networkId string) (*_nethttp.Response, error)
	/*
	   GetByID Retrieve network by ID
	   Returns a single network with matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param networkId ID of network to return

	   @return Network
	*/
	GetByID(ctx _context.Context, networkId string) (Network, *_nethttp.Response, error)
	/*
	   List List all networks in project
	   Returns an array of all network objects defined within the project.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

	   @return []Network
	*/
	List(ctx _context.Context) ([]Network, *_nethttp.Response, error)
	/*
	   Update Update an existing network.

	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param networkId ID of network to update
	     - @param network Updated network

	   @return Network
	*/
	Update(ctx _context.Context, networkId string, network Network) (Network, *_nethttp.Response, error)
}

NetworksAPI defines the client functions provided for Networks.

type NetworksApiService

type NetworksApiService service

NetworksApiService NetworksApi service

func (*NetworksApiService) Add

Add Add a new network Adds a new network that can be referenced when creating a Host

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param newNetwork Network that is to be added to the project

@return Network

func (*NetworksApiService) Delete

func (a *NetworksApiService) Delete(ctx _context.Context, networkId string) (*_nethttp.Response, error)

Delete Delete a network Deletes the network with the matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param networkId ID of network to delete

func (*NetworksApiService) GetByID

func (a *NetworksApiService) GetByID(ctx _context.Context, networkId string) (Network, *_nethttp.Response, error)

GetByID Retrieve network by ID Returns a single network with matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param networkId ID of network to return

@return Network

func (*NetworksApiService) List

List List all networks in project Returns an array of all network objects defined within the project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Network

func (*NetworksApiService) Update

func (a *NetworksApiService) Update(ctx _context.Context, networkId string, network Network) (Network, *_nethttp.Response, error)

Update Update an existing network.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param networkId ID of network to update
  • @param network Updated network

@return Network

type NewHost

type NewHost struct {
	// The host name used when installing the host operating system.  Note that some OS implementations may require the name to be formatted as a fully qualified domain name.
	Name        string `json:"Name"`
	Description string `json:"Description,omitempty"`
	// The image service identifier must be identifer of one of the available imaging services provided by the AvailableImage array returned as part of the get /available-resources call. Images are typically described by category (e.g. Linux), flavor (e.g. ubuntu) and version (e.g. 18.04-20190807)
	ServiceID string `json:"ServiceID"`
	// The location ID must be one of those provided by the LocationInfo array returned as part of the get /available-resources call.  The locations are typically described by country, region, and data center. The location ID must also be one that has sufficient inventory for the selected MachineSize.  See the MachineInventory array as returned by the get /available-resources call to select a location that has machines available with the correct machine size.
	LocationID string `json:"LocationID"`
	// The machine size ID must be one of those listed in the MachineSizes array returned as part of the get /available-resources call.  This array provides the name and detailed description for each machine size.  Use the MachineInventory array provided by the get /available-resources call to find a location with an adequate inventory of machines with the desired machine size.
	MachineSizeID string `json:"MachineSizeID"`
	// The machine ID is normally not used.
	MachineID string `json:"MachineID,omitempty"`
	// These IDs must correspond to the IDs for SSH keys already created within the context of the project.  These SSH keys and those included as SSHAuthorizedKeys will be used together to provision SSH keys when the machine is imaged.
	SSHKeyIDs []string `json:"SSHKeyIDs"`
	// The list of IDs corresponding to the networks that will be provisioned to the host. These networks must be among those listed in the Networks array returned by the get /available-resources call.  This list must include the ID for any network identified by the HostUseEnum as Required.
	NetworkIDs []string `json:"NetworkIDs"`
	// A list of pre-allocated IP addresses to be used for corresponding networks. This array of IP addresses, if present, is in one-to-one correspondence with Networks.
	PreAllocatedIPs []string `json:"PreAllocatedIPs,omitempty"`
	// The host's default network ID. This needs to be one of the values in the  \"NetworkIDs\" list.
	NetworkForDefaultRoute string `json:"NetworkForDefaultRoute"`
	// ID of the network selected to be untagged. This needs to be one of the values in the  \"NetworkIDs\" list.
	NetworkUntagged string `json:"NetworkUntagged,omitempty"`
	// The list of IDs corresponding to existing, unattached volumes that should be attached to the new host.  The volume must be one of those listed in the Volumes array returned by the get /available-resources call.  In addition, the volume must be in the visible state and not a part of any current VolumeAttachment (see get volume-attachments)
	VolumeIDs []string `json:"VolumeIDs,omitempty"`
	// The map of Service Network (Provider) ID to Provider MAC address.   The Service Network must be a provider network provisioned to this host. Any Service Networks not included here will default to the physical MAC learned during machine discovery.
	ServiceNetsProviderMAC map[string]string `json:"ServiceNetsProviderMAC,omitempty"`
	// New volumes may be created and connected to the Host when the host is provisioned. The information provided here to create a host is the same as required when doing a post /volumes call
	NewVolumes []AddVolume `json:"NewVolumes,omitempty"`
	// User-provided data to be attached to the image configuration data.
	UserData string `json:"UserData,omitempty"`
	// User-provided data to represent the identity of the host within an application environment. For example, this could be set to represent the Kubernetes node ID if the host is provisioned as a Kubernetes node.
	NodeID string `json:"NodeID,omitempty"`
	// The map of label name to label value for this host.
	Labels map[string]string `json:"Labels,omitempty"`
}

NewHost struct for NewHost

type NewIpPool

type NewIpPool struct {
	// Name for the IP pool
	Name string `json:"Name,omitempty"`
	// Description for the IP pool
	Description string `json:"Description,omitempty"`
	IPVersion   IpVer  `json:"IPVersion"`
	// Base address of the IP pool
	BaseIP  string  `json:"BaseIP"`
	Netmask Netmask `json:"Netmask"`
	// Default route associated with the IP pool
	DefaultRoute string     `json:"DefaultRoute,omitempty"`
	Sources      []IpSource `json:"Sources,omitempty"`
	// List of DNS servers for the IP pool
	DNS []string `json:"DNS,omitempty"`
	// Optional web-proxy for external internet access should the pool actually be behind a firewall
	Proxy string `json:"Proxy,omitempty"`
	// Addresses or CIDRs for which proxy requests are not made
	NoProxy string `json:"NoProxy,omitempty"`
	// List of NTP servers for the IP pool
	NTP []string `json:"NTP,omitempty"`
}

NewIpPool struct for NewIpPool

type NewNetwork

type NewNetwork struct {
	// Name of the network
	Name string `json:"Name"`
	// The location ID is the data center location of the resource.  The LocationID must be one of those provided by the LocationInfo array returned as part of the get /available-resources call.  The locations are typically described by country, region, and data center.
	LocationID  string         `json:"LocationID"`
	Description string         `json:"Description,omitempty"`
	HostUse     NetworkHostUse `json:"HostUse,omitempty"`
	Purpose     NetworkPurpose `json:"Purpose,omitempty"`
	NewIPPool   *NewIpPool     `json:"NewIPPool,omitempty"`
}

NewNetwork struct for NewNetwork

type NewProject

type NewProject struct {
	Name    string  `json:"Name"`
	Profile Profile `json:"Profile"`
	Limits  Limits  `json:"Limits"`
	// Array listing the permitted site IDs
	PermittedSites []string `json:"PermittedSites,omitempty"`
}

NewProject struct for NewProject

type NewSshKey

type NewSshKey struct {
	Name string `json:"Name"`
	// SSH key value
	Key string `json:"Key"`
}

NewSshKey struct for NewSshKey

type NewVolume

type NewVolume struct {
	Name        string `json:"Name"`
	Description string `json:"Description,omitempty"`
	// Adds a new volume to the project.  This object requires the LocationID and is used when a new volume is created independently from the host creation therefore requiring a specified location.
	FlavorID string `json:"FlavorID"`
	// The size of the volume in GiB
	Capacity int64 `json:"Capacity"`
	// Indicates if the volume can be attached to multiple hosts
	Shareable bool `json:"Shareable,omitempty"`
	// The location of the volume (and the storage array) LocationID is one of those listed by the LocationInfo array returned as part of the get /available-resources call. Any volumes must be in the same location as their attached Host.
	LocationID string `json:"LocationID"`
	// The map of label name to label value for this volume.
	Labels map[string]string `json:"Labels,omitempty"`
}

NewVolume struct for NewVolume

type NewVolumeAttachment

type NewVolumeAttachment struct {
	// Name for the volume attachment. Must be 128 or fewer printable characters
	Name string `json:"Name,omitempty"`
	// Unique ID of the volume attached to the host
	VolumeID string             `json:"VolumeID"`
	Protocol ProtocolParameters `json:"Protocol"`
}

NewVolumeAttachment struct for NewVolumeAttachment

type Pool

type Pool struct {
	// List of fragments for the IP pool
	Fragments []IpRange   `json:"Fragments,omitempty"`
	Stats     IpPoolStats `json:"Stats,omitempty"`
}

Pool struct for Pool

type Profile

type Profile struct {
	// Name of the Project Team. Must not be empty, maximum 128 printable characters
	TeamName string `json:"TeamName,omitempty"`
	// Optional description of the Project Team, maximum 256 printable characters
	TeamDesc string `json:"TeamDesc,omitempty"`
	// Optional name of the company, maximum 256 printable characters
	Company string `json:"Company,omitempty"`
	// Optional address of the company, maximum 256 printable characters
	Address string `json:"Address,omitempty"`
	// Optional email address of the contact person for the team, maximum 256 printable characters
	Email string `json:"Email,omitempty"`
	// Currently always false
	EmailVerified bool `json:"EmailVerified,omitempty"`
	// Optional phone number of the contact person for the team, maximum 32 printable characters
	PhoneNumber string `json:"PhoneNumber,omitempty"`
	// Currently always false
	PhoneVerified bool `json:"PhoneVerified,omitempty"`
}

Profile struct for Profile

type Project

type Project struct {
	// Unique ID for the resource instance as generated by the Metal service
	ID string `json:"ID"`
	// Used to determine whether the DB entry has changed since it was last read. This value is updated each time the resource is updated.  Client must send this value unchanged for any update operation.
	ETag string `json:"ETag"`
	// Common name for the resource instance. Must be 128 or fewer printable characters
	Name string `json:"Name"`
	// Time when the resource was created in the database
	Created time.Time `json:"Created,omitempty"`
	// Time when the resource was last modified in the database
	Modified  time.Time        `json:"Modified,omitempty"`
	Profile   Profile          `json:"Profile"`
	Limits    Limits           `json:"Limits"`
	Resources ProjectResources `json:"Resources,omitempty"`
	// Array listing the permitted site IDs
	PermittedSites []string `json:"PermittedSites,omitempty"`
}

Project struct for Project

type ProjectAllOf

type ProjectAllOf struct {
	Profile   Profile          `json:"Profile"`
	Limits    Limits           `json:"Limits"`
	Resources ProjectResources `json:"Resources,omitempty"`
	// Array listing the permitted site IDs
	PermittedSites []string `json:"PermittedSites,omitempty"`
}

ProjectAllOf struct for ProjectAllOf

type ProjectInfo

type ProjectInfo struct {
	ID             string `json:"ID,omitempty"`
	Name           string `json:"Name,omitempty"`
	Description    string `json:"Description,omitempty"`
	NumHosts       int32  `json:"NumHosts,omitempty"`
	NumVolumes     int32  `json:"NumVolumes,omitempty"`
	TotalStorageGB int32  `json:"TotalStorageGB,omitempty"`
	Status         string `json:"Status,omitempty"`
	// Number of project networks
	NumNetworks   int32        `json:"NumNetworks,omitempty"`
	SummaryStatus HealthStatus `json:"SummaryStatus,omitempty"`
	// Locations where project resources exist
	Locations []LocationInfo `json:"Locations,omitempty"`
}

ProjectInfo struct for ProjectInfo

type ProjectResources added in v1.4.6

type ProjectResources struct {
	// Number of hosts in use
	Hosts int32 `json:"Hosts,omitempty"`
	// Number of volumes in use
	Volumes int32 `json:"Volumes,omitempty"`
	// Volume capacity in use in TiB
	VolumeCapacity int64 `json:"VolumeCapacity,omitempty"`
	// Number of private networks in use
	PrivateNetworks int32 `json:"PrivateNetworks,omitempty"`
	// Number of hosts with the instance type in use
	InstanceTypes map[string]int32 `json:"InstanceTypes,omitempty"`
}

ProjectResources struct for ProjectResources

type ProjectsAPI

type ProjectsAPI interface {
	/*
	   Add Create a new project
	   Adds a new Project which creates an isolated space for creating Hosts, Volumes, and private Networks. A project is often aligned to a specific team within an organization or a cluster. If GreenLake IAM issued token is used for authentication, then it is required to pass either 'Space' or 'spaceid' header. When both are set, 'Space' header is ignored. Note that Hoster or BMaaS Access Owner role is required for this operation.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param newProject NewProject parameters to create a new Project
	     - @param optional nil or *ProjectsApiAddOpts - Optional Parameters:
	     - @param "Space" (optional.String) -  GreenLake space name
	     - @param "Spaceid" (optional.String) -  GreenLake space ID

	   @return Project
	*/
	Add(ctx _context.Context, newProject NewProject, localVarOptionals *ProjectsApiAddOpts) (Project, *_nethttp.Response, error)
	/*
	   Delete Delete a Project
	   Deletes the Project with the matching ID. Note that Hoster or BMaaS Access Owner role is required for this operation.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param projectId ID of project to delete
	*/
	Delete(ctx _context.Context, projectId string) (*_nethttp.Response, error)
	/*
	   GetByID Retrieve a project by its ID
	   Returns a single Project object with its matching ID This includes profile information for the project and project limits on resouces like hosts, private networks, volumes, and volume capacity.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param projectId ID of project to return

	   @return Project
	*/
	GetByID(ctx _context.Context, projectId string) (Project, *_nethttp.Response, error)
	/*
	   List List of all Projects within an organization or cluster
	   Returns an array of all Project objects that have been created. This includes profile information for the project and project limits on resouces like hosts, private networks, volumes, and volume capacity. If GreenLake IAM issued token is used for authentication, then it is required to pass either 'Space' or 'spaceid' header. When both are set, 'Space' header is ignored.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param optional nil or *ProjectsApiListOpts - Optional Parameters:
	     - @param "Spaceid" (optional.String) -  GreenLake space ID
	     - @param "Space" (optional.String) -  GreenLake space name

	   @return []Project
	*/
	List(ctx _context.Context, localVarOptionals *ProjectsApiListOpts) ([]Project, *_nethttp.Response, error)
	/*
	   Update Update a project by its ID
	   Updates a project with a matching ID. Only Project 'Name', 'Profile' and 'Limits' can be updated with this operation. Note that Hoster or BMaaS Access Owner role is required for this operation.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param projectId ID of project to update
	     - @param project Project parameters to update an existing Project

	   @return Project
	*/
	Update(ctx _context.Context, projectId string, project Project) (Project, *_nethttp.Response, error)
}

ProjectsAPI defines the client functions provided for Projects.

type ProjectsApiAddOpts

type ProjectsApiAddOpts struct {
	Space   optional.String
	Spaceid optional.String
}

ProjectsApiAddOpts Optional parameters for the method 'Add'

type ProjectsApiListOpts

type ProjectsApiListOpts struct {
	Spaceid optional.String
	Space   optional.String
}

ProjectsApiListOpts Optional parameters for the method 'List'

type ProjectsApiService

type ProjectsApiService service

ProjectsApiService ProjectsApi service

func (*ProjectsApiService) Add

func (a *ProjectsApiService) Add(ctx _context.Context, newProject NewProject, localVarOptionals *ProjectsApiAddOpts) (Project, *_nethttp.Response, error)

Add Create a new project Adds a new Project which creates an isolated space for creating Hosts, Volumes, and private Networks. A project is often aligned to a specific team within an organization or a cluster. If GreenLake IAM issued token is used for authentication, then it is required to pass either 'Space' or 'spaceid' header. When both are set, 'Space' header is ignored. Note that Hoster or BMaaS Access Owner role is required for this operation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param newProject NewProject parameters to create a new Project
  • @param optional nil or *ProjectsApiAddOpts - Optional Parameters:
  • @param "Space" (optional.String) - GreenLake space name
  • @param "Spaceid" (optional.String) - GreenLake space ID

@return Project

func (*ProjectsApiService) Delete

func (a *ProjectsApiService) Delete(ctx _context.Context, projectId string) (*_nethttp.Response, error)

Delete Delete a Project Deletes the Project with the matching ID. Note that Hoster or BMaaS Access Owner role is required for this operation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId ID of project to delete

func (*ProjectsApiService) GetByID

func (a *ProjectsApiService) GetByID(ctx _context.Context, projectId string) (Project, *_nethttp.Response, error)

GetByID Retrieve a project by its ID Returns a single Project object with its matching ID This includes profile information for the project and project limits on resouces like hosts, private networks, volumes, and volume capacity.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId ID of project to return

@return Project

func (*ProjectsApiService) List

func (a *ProjectsApiService) List(ctx _context.Context, localVarOptionals *ProjectsApiListOpts) ([]Project, *_nethttp.Response, error)

List List of all Projects within an organization or cluster Returns an array of all Project objects that have been created. This includes profile information for the project and project limits on resouces like hosts, private networks, volumes, and volume capacity. If GreenLake IAM issued token is used for authentication, then it is required to pass either 'Space' or 'spaceid' header. When both are set, 'Space' header is ignored.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ProjectsApiListOpts - Optional Parameters:
  • @param "Spaceid" (optional.String) - GreenLake space ID
  • @param "Space" (optional.String) - GreenLake space name

@return []Project

func (*ProjectsApiService) Update

func (a *ProjectsApiService) Update(ctx _context.Context, projectId string, project Project) (Project, *_nethttp.Response, error)

Update Update a project by its ID Updates a project with a matching ID. Only Project 'Name', 'Profile' and 'Limits' can be updated with this operation. Note that Hoster or BMaaS Access Owner role is required for this operation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId ID of project to update
  • @param project Project parameters to update an existing Project

@return Project

type ProjectsInfo

type ProjectsInfo struct {
	Projects      []ProjectInfo       `json:"Projects,omitempty"`
	MachineSizes  []MachineSizeInfo   `json:"MachineSizes,omitempty"`
	VolumeFlavors []VolumeFlavorsInfo `json:"VolumeFlavors,omitempty"`
	Summary       SummaryInfo         `json:"Summary,omitempty"`
}

ProjectsInfo struct for ProjectsInfo

type ProjectsInfoAPI

type ProjectsInfoAPI interface {
	/*
	   List List of all projects info within an organization or cluster for which user is authorized.
	   Returns an object with information on projects, machine sizes, and volume flavors.  The 'Projects' list includes projects authorized for a user, and the 'MachineSizes' and  'VolumeFlavors' list include only those machine sizes and volume flavors permitted for projects.  When GreenLake IAM issued token is used for authentication, it is required to  pass either 'Space' or 'spaceid' header. When both are set, 'Space' header is ignored.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param optional nil or *ProjectsInfoApiListOpts - Optional Parameters:
	     - @param "Space" (optional.String) -  GreenLake space name
	     - @param "Spaceid" (optional.String) -  GreenLake space ID
	     - @param "Siteid" (optional.String) -  GreenLake site ID

	   @return ProjectsInfo
	*/
	List(ctx _context.Context, localVarOptionals *ProjectsInfoApiListOpts) (ProjectsInfo, *_nethttp.Response, error)
}

ProjectsInfoAPI defines the client functions provided for ProjectsInfo.

type ProjectsInfoApiListOpts

type ProjectsInfoApiListOpts struct {
	Space   optional.String
	Spaceid optional.String
	Siteid  optional.String
}

ProjectsInfoApiListOpts Optional parameters for the method 'List'

type ProjectsInfoApiService

type ProjectsInfoApiService service

ProjectsInfoApiService ProjectsInfoApi service

func (*ProjectsInfoApiService) List

List List of all projects info within an organization or cluster for which user is authorized. Returns an object with information on projects, machine sizes, and volume flavors. The 'Projects' list includes projects authorized for a user, and the 'MachineSizes' and 'VolumeFlavors' list include only those machine sizes and volume flavors permitted for projects. When GreenLake IAM issued token is used for authentication, it is required to pass either 'Space' or 'spaceid' header. When both are set, 'Space' header is ignored.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ProjectsInfoApiListOpts - Optional Parameters:
  • @param "Space" (optional.String) - GreenLake space name
  • @param "Spaceid" (optional.String) - GreenLake space ID
  • @param "Siteid" (optional.String) - GreenLake site ID

@return ProjectsInfo

type ProtocolKind

type ProtocolKind string

ProtocolKind The protocol to be used to attach the volume

const (
	PROTOCOLKIND_UNKNOWN ProtocolKind = "unknown"
	PROTOCOLKIND_ISCSI   ProtocolKind = "iscsi"
)

List of ProtocolKind

type ProtocolParameters

type ProtocolParameters struct {
	Protocol ProtocolKind    `json:"Protocol,omitempty"`
	ISCSI    IscsiParameters `json:"ISCSI,omitempty"`
}

ProtocolParameters struct for ProtocolParameters

type ResourceBase

type ResourceBase struct {
	// Unique ID for the resource instance as generated by the Metal service
	ID string `json:"ID"`
	// Used to determine whether the DB entry has changed since it was last read. This value is updated each time the resource is updated.  Client must send this value unchanged for any update operation.
	ETag string `json:"ETag"`
	// Common name for the resource instance. Must be 128 or fewer printable characters
	Name string `json:"Name"`
	// Time when the resource was created in the database
	Created time.Time `json:"Created,omitempty"`
	// Time when the resource was last modified in the database
	Modified time.Time `json:"Modified,omitempty"`
}

ResourceBase struct for ResourceBase

type ServerConfiguration

type ServerConfiguration struct {
	Url         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type ServiceServerInfo added in v1.4.12

type ServiceServerInfo struct {
	// Service type consuming the resource
	ServiceType string `json:"ServiceType,omitempty"`
	// Allocated number of servers.
	AllocatedCount int32 `json:"AllocatedCount,omitempty"`
	// Total available CPU cores.
	CoresCapacity int32 `json:"CoresCapacity,omitempty"`
	// Total allocated CPU cores.
	CoresAllocated int32 `json:"CoresAllocated,omitempty"`
	// Total available memory in GiB.
	RAMCapacity float64 `json:"RAMCapacity,omitempty"`
	// Total allocated memory in GiB.
	RAMAllocated float64 `json:"RAMAllocated,omitempty"`
}

ServiceServerInfo Server allocation information for a service type.

type ServiceStorageInfo added in v1.4.12

type ServiceStorageInfo struct {
	// Service type consuming the resource
	ServiceType string `json:"ServiceType,omitempty"`
	// Allocated number of volumes.
	AllocatedCount int32 `json:"AllocatedCount,omitempty"`
	// Total capacity of all allocated volumes in TB for a service type.
	AllocatedCapacity float32 `json:"AllocatedCapacity,omitempty"`
}

ServiceStorageInfo Storage allocation information for service type.

type SshKey

type SshKey struct {
	// Unique ID for the resource instance as generated by the Metal service
	ID string `json:"ID"`
	// Used to determine whether the DB entry has changed since it was last read. This value is updated each time the resource is updated.  Client must send this value unchanged for any update operation.
	ETag string `json:"ETag"`
	// Common name for the resource instance. Must be 128 or fewer printable characters
	Name string `json:"Name"`
	// Time when the resource was created in the database
	Created time.Time `json:"Created,omitempty"`
	// Time when the resource was last modified in the database
	Modified time.Time `json:"Modified,omitempty"`
	// SSH key value
	Key string `json:"Key"`
}

SshKey struct for SshKey

type SshKeyAllOf

type SshKeyAllOf struct {
	// SSH key value
	Key string `json:"Key"`
}

SshKeyAllOf struct for SshKeyAllOf

type SshKeyEntry

type SshKeyEntry struct {
	// Unique ID of the SSH key entry
	ID string `json:"ID,omitempty"`
	// Name or description of the stored SSH key
	Name string `json:"Name,omitempty"`
	// SSH key value
	Key string `json:"Key,omitempty"`
}

SshKeyEntry An entry listing an SSH key that is available for use when creating HostState

type SshkeysAPI

type SshkeysAPI interface {
	/*
	   Add Add a new SSH Key
	   Adds a new SSH Key that can be referenced when creating a Host
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param newSshKey SSH Key that is to be added to the project

	   @return SshKey
	*/
	Add(ctx _context.Context, newSshKey NewSshKey) (SshKey, *_nethttp.Response, error)
	/*
	   Delete Delete an SSH key
	   Deletes the SSH key with the matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param sshkeyId ID of sshkey to delete
	*/
	Delete(ctx _context.Context, sshkeyId string) (*_nethttp.Response, error)
	/*
	   GetByID Retrieve SSH Key by ID
	   Returns a single SSH key with matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param sshkeyId ID of sshkey to return

	   @return SshKey
	*/
	GetByID(ctx _context.Context, sshkeyId string) (SshKey, *_nethttp.Response, error)
	/*
	   List List all sshkeys in project
	   Returns an array of all SSHKey objects defined within the project.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

	   @return []SshKey
	*/
	List(ctx _context.Context) ([]SshKey, *_nethttp.Response, error)
	/*
	   Update Update an existing SSH Key.  Only 'Name' or 'Key' fields can be changed.

	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param sshkeyId ID of sshkey to update
	     - @param sshKey Updated SSH key

	   @return SshKey
	*/
	Update(ctx _context.Context, sshkeyId string, sshKey SshKey) (SshKey, *_nethttp.Response, error)
}

SshkeysAPI defines the client functions provided for Sshkeys.

type SshkeysApiService

type SshkeysApiService service

SshkeysApiService SshkeysApi service

func (*SshkeysApiService) Add

Add Add a new SSH Key Adds a new SSH Key that can be referenced when creating a Host

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param newSshKey SSH Key that is to be added to the project

@return SshKey

func (*SshkeysApiService) Delete

func (a *SshkeysApiService) Delete(ctx _context.Context, sshkeyId string) (*_nethttp.Response, error)

Delete Delete an SSH key Deletes the SSH key with the matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param sshkeyId ID of sshkey to delete

func (*SshkeysApiService) GetByID

func (a *SshkeysApiService) GetByID(ctx _context.Context, sshkeyId string) (SshKey, *_nethttp.Response, error)

GetByID Retrieve SSH Key by ID Returns a single SSH key with matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param sshkeyId ID of sshkey to return

@return SshKey

func (*SshkeysApiService) List

List List all sshkeys in project Returns an array of all SSHKey objects defined within the project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []SshKey

func (*SshkeysApiService) Update

func (a *SshkeysApiService) Update(ctx _context.Context, sshkeyId string, sshKey SshKey) (SshKey, *_nethttp.Response, error)

Update Update an existing SSH Key. Only 'Name' or 'Key' fields can be changed.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param sshkeyId ID of sshkey to update
  • @param sshKey Updated SSH key

@return SshKey

type StorageInventory

type StorageInventory struct {
	// Unique ID of a volume flavor as listed in the the VolumeFlavors array
	FlavorID string `json:"FlavorID,omitempty"`
	// Unique ID of a data center location
	LocationID string `json:"LocationID,omitempty"`
	// Total capacity available (in GiB) to create new volumes of the indicated flavor at the indicated location
	Capacity int64 `json:"Capacity,omitempty"`
}

StorageInventory An entry describing the amount of storage available to create volumes of a specific flavor

type SummaryInfo

type SummaryInfo struct {
	// Locations where resources exist for all listed projects
	Locations []LocationInfo `json:"Locations,omitempty"`
	// Number of hosts for all listed projects
	NumHosts int32 `json:"NumHosts,omitempty"`
	// Number of volumes for all listed projects
	NumVolumes int32 `json:"NumVolumes,omitempty"`
	// Total storage for all listed projects
	TotalStorageGB int32 `json:"TotalStorageGB,omitempty"`
	// Number of projects with OK health summary status
	NumOK int32 `json:"NumOK,omitempty"`
	// Number of projects with Warning health summary status
	NumWarning int32 `json:"NumWarning,omitempty"`
	// Number of projects with Critical health summary status
	NumCritical int32 `json:"NumCritical,omitempty"`
	// Number of projects with Unknown health summary status
	NumUnknown int32 `json:"NumUnknown,omitempty"`
}

SummaryInfo struct for SummaryInfo

type UsageEntryBase

type UsageEntryBase struct {
	// Project ID that contained the host
	ProjectID string `json:"ProjectID,omitempty"`
	// The location ID is the data center location of the resource.  The LocationID must be one of those provided by the LocationInfo array returned as part of the get /available-resources call.  The locations are typically described by country, region, and data center.
	LocationID string `json:"LocationID,omitempty"`
	// Timestamp of when resource (machine or storage) was allocated
	Allocated time.Time `json:"Allocated,omitempty"`
	// Timestamp of when resource (host or volume) was ready for use
	Ready time.Time `json:"Ready,omitempty"`
	// Timestamp of when resource (machine or storage) was freed
	Freed time.Time `json:"Freed,omitempty"`
	// The start of the usage reporting window or when the resource was allocated
	UsageStart time.Time `json:"UsageStart,omitempty"`
	// The end of the usage reporting window or when the resource was freed
	UsageEnd time.Time `json:"UsageEnd,omitempty"`
	// The difference between the UsageEnd and UsageStart rounded up to the UsageHours
	UsageHours int64 `json:"UsageHours,omitempty"`
	// Description of error that affected the usage reporting
	Error string `json:"Error,omitempty"`
}

UsageEntryBase struct for UsageEntryBase

type UsageReport

type UsageReport struct {
	// list of Host usage entries for the report window
	Hosts []HostUsageEntry `json:"Hosts,omitempty"`
	// list of Volume usage entries for the report window
	Volumes []VolumeUsageEntry `json:"Volumes,omitempty"`
}

UsageReport The composite usage report

type UsageReportsAPI

type UsageReportsAPI interface {
	/*
	   Get Get a usage report
	   Creates and returns a usage report based on the parameters passed in the request body
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param start Start of the billing period
	     - @param optional nil or *UsageReportsApiGetOpts - Optional Parameters:
	     - @param "End" (optional.String) -  End of the billing period, default to now if omitted

	   @return UsageReport
	*/
	Get(ctx _context.Context, start string, localVarOptionals *UsageReportsApiGetOpts) (UsageReport, *_nethttp.Response, error)
}

UsageReportsAPI defines the client functions provided for UsageReports.

type UsageReportsApiGetOpts

type UsageReportsApiGetOpts struct {
	End optional.String
}

UsageReportsApiGetOpts Optional parameters for the method 'Get'

type UsageReportsApiService

type UsageReportsApiService service

UsageReportsApiService UsageReportsApi service

func (*UsageReportsApiService) Get

Get Get a usage report Creates and returns a usage report based on the parameters passed in the request body

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param start Start of the billing period
  • @param optional nil or *UsageReportsApiGetOpts - Optional Parameters:
  • @param "End" (optional.String) - End of the billing period, default to now if omitted

@return UsageReport

type UseRecord

type UseRecord struct {
	// Address of the record
	Base string `json:"Base,omitempty"`
	// Unique ID of the host associated with the record
	HostID string `json:"HostID,omitempty"`
	// Unique ID of the rack associated with the record
	RackID string `json:"RackID,omitempty"`
	// Unique ID of the device associated with the record
	DeviceID string `json:"DeviceID,omitempty"`
	// Indicates if the record is used for non Metal scope
	External bool `json:"External,omitempty"`
	// Usage of the record
	Usage string `json:"Usage,omitempty"`
	// User which performed the allocation of the record
	AllocatedBy string `json:"AllocatedBy,omitempty"`
}

UseRecord struct for UseRecord

type VaStateEnum

type VaStateEnum string

VaStateEnum Current volume attachment state expressed as a string enum value (new, exporting, attaching, ready, detaching, unexporting, deleted, failed)

const (
	VASTATEENUM_NEW         VaStateEnum = "new"
	VASTATEENUM_EXPORTING   VaStateEnum = "exporting"
	VASTATEENUM_ATTACHING   VaStateEnum = "attaching"
	VASTATEENUM_READY       VaStateEnum = "ready"
	VASTATEENUM_DETACHING   VaStateEnum = "detaching"
	VASTATEENUM_UNEXPORTING VaStateEnum = "unexporting"
	VASTATEENUM_DELETED     VaStateEnum = "deleted"
	VASTATEENUM_FAILED      VaStateEnum = "failed"
)

List of VaStateEnum

type VafsConfig

type VafsConfig struct {
	// Storage identifier for an array or a SDS
	StorageID string `json:"StorageID,omitempty"`
	// Storage array or SDS user
	UserName string `json:"UserName,omitempty"`
	// SDS token acquired by login into the SDS for a given user. This is required by the FUSE client to mount volumes on host.
	Ticket string `json:"Ticket,omitempty"`
	// Ticket expiry time to help client to refresh the ticket.
	TicketExpiryTime string `json:"TicketExpiryTime,omitempty"`
}

VafsConfig struct for VafsConfig

type Version

type Version struct {
	Build string `json:"Build,omitempty"`
}

Version struct for Version

type VersionAPI

type VersionAPI interface {
	/*
	   Get Get api server build version
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

	   @return Version
	*/
	Get(ctx _context.Context) (Version, *_nethttp.Response, error)
}

VersionAPI defines the client functions provided for Version.

type VersionApiService

type VersionApiService service

VersionApiService VersionApi service

func (*VersionApiService) Get

Get Get api server build version

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return Version

type Volume

type Volume struct {
	// Unique ID for the resource instance as generated by the Metal service
	ID string `json:"ID"`
	// Used to determine whether the DB entry has changed since it was last read. This value is updated each time the resource is updated.  Client must send this value unchanged for any update operation.
	ETag string `json:"ETag"`
	// Common name for the resource instance. Must be 128 or fewer printable characters
	Name string `json:"Name"`
	// Time when the resource was created in the database
	Created time.Time `json:"Created,omitempty"`
	// Time when the resource was last modified in the database
	Modified    time.Time `json:"Modified,omitempty"`
	Description string    `json:"Description,omitempty"`
	// The VolumeFlavorID matching an entry in the VolumeFlavors array returned as part of the get /available-resources call
	FlavorID string `json:"FlavorID,omitempty"`
	// The size of the volume in KiB
	Capacity int64 `json:"Capacity,omitempty"`
	// Indicates if the volume can be attached to multiple hosts
	Shareable bool `json:"Shareable,omitempty"`
	// The location of the volume (and the storage array) LocationID is one of those listed by the LocationInfo array returned as part of the get /available-resources call. Any volumes must be in the same location as their attached Host.
	LocationID string         `json:"LocationID,omitempty"`
	State      VolumeState    `json:"State,omitempty"`
	SubState   VolumeSubState `json:"SubState,omitempty"`
	Status     VolumeStatus   `json:"Status,omitempty"`
	// The map of label name to label value for the volume.
	Labels map[string]string `json:"Labels,omitempty"`
	// Serial number of the volume.
	WWN string `json:"WWN,omitempty"`
}

Volume struct for Volume

type VolumeAllOf

type VolumeAllOf struct {
	Description string `json:"Description,omitempty"`
	// The VolumeFlavorID matching an entry in the VolumeFlavors array returned as part of the get /available-resources call
	FlavorID string `json:"FlavorID,omitempty"`
	// The size of the volume in KiB
	Capacity int64 `json:"Capacity,omitempty"`
	// Indicates if the volume can be attached to multiple hosts
	Shareable bool `json:"Shareable,omitempty"`
	// The location of the volume (and the storage array) LocationID is one of those listed by the LocationInfo array returned as part of the get /available-resources call. Any volumes must be in the same location as their attached Host.
	LocationID string         `json:"LocationID,omitempty"`
	State      VolumeState    `json:"State,omitempty"`
	SubState   VolumeSubState `json:"SubState,omitempty"`
	Status     VolumeStatus   `json:"Status,omitempty"`
	// The map of label name to label value for the volume.
	Labels map[string]string `json:"Labels,omitempty"`
	// Serial number of the volume.
	WWN string `json:"WWN,omitempty"`
}

VolumeAllOf struct for VolumeAllOf

type VolumeAttachHostUuid

type VolumeAttachHostUuid struct {
	// Unique ID of the Host to attach or detach volume
	HostID string `json:"HostID"`
}

VolumeAttachHostUuid struct for VolumeAttachHostUuid

type VolumeAttachment

type VolumeAttachment struct {
	// Unique ID for the resource instance as generated by the Metal service
	ID string `json:"ID"`
	// Used to determine whether the DB entry has changed since it was last read. This value is updated each time the resource is updated.  Client must send this value unchanged for any update operation.
	ETag string `json:"ETag"`
	// Common name for the resource instance. Must be 128 or fewer printable characters
	Name string `json:"Name"`
	// Time when the resource was created in the database
	Created time.Time `json:"Created,omitempty"`
	// Time when the resource was last modified in the database
	Modified time.Time `json:"Modified,omitempty"`
	// Unique ID of the volume attached to the host
	VolumeID string `json:"VolumeID,omitempty"`
	// Unique ID of the host connected to the volume
	HostID string `json:"HostID,omitempty"`
	// Host IP address for the network connection that connects to the storage array
	HostIPAddress string `json:"HostIPAddress,omitempty"`
	// IQN is the full initiator name used for identification during iSCSI login
	IQN string `json:"IQN,omitempty"`
	// CHAPSecret is the Challenge Authentication Protocol secret to be shared between array and initiator.
	CHAPSecret string `json:"CHAPSecret,omitempty"`
	// CHAPUserName is the CHAP username to use for CHAP authentication
	CHAPUserName string `json:"CHAPUserName,omitempty"`
	// LUN is the Logical Unit Number to be assigned to the volume on export
	LUN int32 `json:"LUN,omitempty"`
	// VolumeTargetIQN is the iQN for the volume, assigned by the array corresponding to the volume
	VolumeTargetIQN string `json:"VolumeTargetIQN,omitempty"`
	// VolumeTargetIPAddress is the IPV4 address of the iSCSI volume export
	VolumeTargetIPAddress string      `json:"VolumeTargetIPAddress,omitempty"`
	State                 VaStateEnum `json:"State,omitempty"`
	// File share specific configuration parameters
	FSConfig *VafsConfig `json:"FSConfig,omitempty"`
}

VolumeAttachment struct for VolumeAttachment

type VolumeAttachmentAllOf

type VolumeAttachmentAllOf struct {
	// Unique ID of the volume attached to the host
	VolumeID string `json:"VolumeID,omitempty"`
	// Unique ID of the host connected to the volume
	HostID string `json:"HostID,omitempty"`
	// Host IP address for the network connection that connects to the storage array
	HostIPAddress string `json:"HostIPAddress,omitempty"`
	// IQN is the full initiator name used for identification during iSCSI login
	IQN string `json:"IQN,omitempty"`
	// CHAPSecret is the Challenge Authentication Protocol secret to be shared between array and initiator.
	CHAPSecret string `json:"CHAPSecret,omitempty"`
	// CHAPUserName is the CHAP username to use for CHAP authentication
	CHAPUserName string `json:"CHAPUserName,omitempty"`
	// LUN is the Logical Unit Number to be assigned to the volume on export
	LUN int32 `json:"LUN,omitempty"`
	// VolumeTargetIQN is the iQN for the volume, assigned by the array corresponding to the volume
	VolumeTargetIQN string `json:"VolumeTargetIQN,omitempty"`
	// VolumeTargetIPAddress is the IPV4 address of the iSCSI volume export
	VolumeTargetIPAddress string      `json:"VolumeTargetIPAddress,omitempty"`
	State                 VaStateEnum `json:"State,omitempty"`
	// File share specific configuration parameters
	FSConfig *VafsConfig `json:"FSConfig,omitempty"`
}

VolumeAttachmentAllOf struct for VolumeAttachmentAllOf

type VolumeAttachmentsAPI

type VolumeAttachmentsAPI interface {
	/*
	   Add Create a new VolumeAttachment
	   Adds a new VolumeAttachment which enables a machine to use a volume. Note that this API is for creation of a VolumeAttachment for non-Hosts. A VolumeAttachment resource must be deleted using the 'DELETE /volume-attachments/{attachmentId}' API. For regular hosts, a VolumeAttachment is created via the 'POST /volumes/{volumeId}/attach' API.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param newVolumeAttachment NewVolumeAttachement parameters to create a new VolumeAttachment.

	   @return VolumeAttachment
	*/
	Add(ctx _context.Context, newVolumeAttachment NewVolumeAttachment) (VolumeAttachment, *_nethttp.Response, error)
	/*
	   Delete Delete a VolumeAttachment
	   Deletes the VolumeAttachment with the matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param attachmentId ID of VolumeAttachment to delete
	*/
	Delete(ctx _context.Context, attachmentId string) (*_nethttp.Response, error)
	/*
	   GetByID Retrieve volume attachment by ID
	   Returns a single volume attachment with matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param attachmentId ID of volume attachment to return

	   @return VolumeAttachment
	*/
	GetByID(ctx _context.Context, attachmentId string) (VolumeAttachment, *_nethttp.Response, error)
	/*
	   List List all volume attachments in project
	   Returns an array of all VolumeAttachments defined within the project.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

	   @return []VolumeAttachment
	*/
	List(ctx _context.Context) ([]VolumeAttachment, *_nethttp.Response, error)
}

VolumeAttachmentsAPI defines the client functions provided for VolumeAttachments.

type VolumeAttachmentsApiService

type VolumeAttachmentsApiService service

VolumeAttachmentsApiService VolumeAttachmentsApi service

func (*VolumeAttachmentsApiService) Add

Add Create a new VolumeAttachment Adds a new VolumeAttachment which enables a machine to use a volume. Note that this API is for creation of a VolumeAttachment for non-Hosts. A VolumeAttachment resource must be deleted using the 'DELETE /volume-attachments/{attachmentId}' API. For regular hosts, a VolumeAttachment is created via the 'POST /volumes/{volumeId}/attach' API.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param newVolumeAttachment NewVolumeAttachement parameters to create a new VolumeAttachment.

@return VolumeAttachment

func (*VolumeAttachmentsApiService) Delete

func (a *VolumeAttachmentsApiService) Delete(ctx _context.Context, attachmentId string) (*_nethttp.Response, error)

Delete Delete a VolumeAttachment Deletes the VolumeAttachment with the matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param attachmentId ID of VolumeAttachment to delete

func (*VolumeAttachmentsApiService) GetByID

GetByID Retrieve volume attachment by ID Returns a single volume attachment with matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param attachmentId ID of volume attachment to return

@return VolumeAttachment

func (*VolumeAttachmentsApiService) List

List List all volume attachments in project Returns an array of all VolumeAttachments defined within the project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []VolumeAttachment

type VolumeFlavor

type VolumeFlavor struct {
	// Volume flavor unique ID
	ID string `json:"ID,omitempty"`
	// Typical user-visible name for a volume flavor
	Name    string     `json:"Name,omitempty"`
	Details FlavorDesc `json:"Details,omitempty"`
}

VolumeFlavor Description of a specific volume flavor offering. A volume flavor will typically refer to a specific level of performance and durability as defined in the Details

type VolumeFlavorsInfo

type VolumeFlavorsInfo struct {
	Name         string `json:"Name,omitempty"`
	ProjectsUsed int32  `json:"ProjectsUsed,omitempty"`
	OtherUsed    int32  `json:"OtherUsed,omitempty"`
	Available    int32  `json:"Available,omitempty"`
}

VolumeFlavorsInfo struct for VolumeFlavorsInfo

type VolumeInfo

type VolumeInfo struct {
	// Unique ID for the volume.  Referenced if the volume is to be attached to a new Host
	ID string `json:"ID,omitempty"`
	// User-provided name for the volume
	Name string `json:"Name,omitempty"`
	// User-provided description of the volume
	Description string `json:"Description,omitempty"`
	// The ID of the volume flavor requested when creating the volume
	FlavorID string `json:"FlavorID,omitempty"`
	// The size of the volume in KiB
	Capacity int64 `json:"Capacity,omitempty"`
	// Indicates if the volume can be attached to multiple hosts
	Shareable bool `json:"Shareable,omitempty"`
	// The location ID of the data center where the volume exists
	LocationID string `json:"LocationID,omitempty"`
	// The discovery IP for the iSCSI volume
	DiscoveryIP string `json:"DiscoveryIP,omitempty"`
	// The target IQN for the iSCSI volume
	TargetIQN string       `json:"TargetIQN,omitempty"`
	State     VolumeState  `json:"State,omitempty"`
	Status    VolumeStatus `json:"Status,omitempty"`
}

VolumeInfo Description of the details about a pre-existing volume

type VolumeState

type VolumeState string

VolumeState Current volume state expressed as a string enum value (new, allocating, allocated, visible, deleting, deleted, failed)

const (
	VOLUMESTATE_NEW        VolumeState = "new"
	VOLUMESTATE_ALLOCATING VolumeState = "allocating"
	VOLUMESTATE_ALLOCATED  VolumeState = "allocated"
	VOLUMESTATE_VISIBLE    VolumeState = "visible"
	VOLUMESTATE_DELETING   VolumeState = "deleting"
	VOLUMESTATE_DELETED    VolumeState = "deleted"
	VOLUMESTATE_FAILED     VolumeState = "failed"
)

List of VolumeState

type VolumeStatus

type VolumeStatus string

VolumeStatus Current volume status expressed as a string enum values (ok, error, degraded)

const (
	VOLUMESTATUS_OK       VolumeStatus = "ok"
	VOLUMESTATUS_ERROR    VolumeStatus = "error"
	VOLUMESTATUS_DEGRADED VolumeStatus = "degraded"
)

List of VolumeStatus

type VolumeSubState added in v1.4.5

type VolumeSubState string

VolumeSubState Current update state of volume expressed as a string enum value (idle, update-requested, updating)

const (
	VOLUMESUBSTATE_IDLE             VolumeSubState = "idle"
	VOLUMESUBSTATE_UPDATE_REQUESTED VolumeSubState = "update-requested"
	VOLUMESUBSTATE_UPDATING         VolumeSubState = "updating"
)

List of VolumeSubState

type VolumeUsageEntry

type VolumeUsageEntry struct {
	// Project ID that contained the host
	ProjectID string `json:"ProjectID,omitempty"`
	// The location ID is the data center location of the resource.  The LocationID must be one of those provided by the LocationInfo array returned as part of the get /available-resources call.  The locations are typically described by country, region, and data center.
	LocationID string `json:"LocationID,omitempty"`
	// Timestamp of when resource (machine or storage) was allocated
	Allocated time.Time `json:"Allocated,omitempty"`
	// Timestamp of when resource (host or volume) was ready for use
	Ready time.Time `json:"Ready,omitempty"`
	// Timestamp of when resource (machine or storage) was freed
	Freed time.Time `json:"Freed,omitempty"`
	// The start of the usage reporting window or when the resource was allocated
	UsageStart time.Time `json:"UsageStart,omitempty"`
	// The end of the usage reporting window or when the resource was freed
	UsageEnd time.Time `json:"UsageEnd,omitempty"`
	// The difference between the UsageEnd and UsageStart rounded up to the UsageHours
	UsageHours int64 `json:"UsageHours,omitempty"`
	// Description of error that affected the usage reporting
	Error string `json:"Error,omitempty"`
	// Name of the volume
	VolumeName string `json:"VolumeName,omitempty"`
	// Unique ID of the volume
	VolumeID string `json:"VolumeID,omitempty"`
	// Name of the volume flavor used when creating the volume
	FlavorName string `json:"FlavorName,omitempty"`
	// Unique ID of the volume flavor used when creating the volume
	FlavorID string `json:"FlavorID,omitempty"`
	// The size of the volume in MB
	Capacity int64 `json:"Capacity,omitempty"`
}

VolumeUsageEntry struct for VolumeUsageEntry

type VolumeUsageEntryAllOf

type VolumeUsageEntryAllOf struct {
	// Name of the volume
	VolumeName string `json:"VolumeName,omitempty"`
	// Unique ID of the volume
	VolumeID string `json:"VolumeID,omitempty"`
	// Name of the volume flavor used when creating the volume
	FlavorName string `json:"FlavorName,omitempty"`
	// Unique ID of the volume flavor used when creating the volume
	FlavorID string `json:"FlavorID,omitempty"`
	// The size of the volume in MB
	Capacity int64 `json:"Capacity,omitempty"`
}

VolumeUsageEntryAllOf struct for VolumeUsageEntryAllOf

type VolumesAPI

type VolumesAPI interface {
	/*
	   Add Add a new volume
	   Adds a new volume to the project.  Volumes may be created separately and then referenced in the create Host call; or volumes may be created directly within the create Host call.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param newVolume Volume that is to be added to the project

	   @return Volume
	*/
	Add(ctx _context.Context, newVolume NewVolume) (Volume, *_nethttp.Response, error)
	/*
	   Attach Attach existing volume to Host
	   Attaches the indicated volume to a host identified in the requestBody.   This attachment will create a VolumeAttachment object that contains  details about the connection of the volume and will update the Host  with iSCSI configuration information.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param volumeId ID of volume to attach
	     - @param volumeAttachHostUuid Unique ID of the Host to which the volume will be attached

	   @return VolumeAttachment
	*/
	Attach(ctx _context.Context, volumeId string, volumeAttachHostUuid VolumeAttachHostUuid) (VolumeAttachment, *_nethttp.Response, error)
	/*
	   Delete Delete a volume
	   Deletes the volume with the matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param volumeId ID of volume to delete
	*/
	Delete(ctx _context.Context, volumeId string) (*_nethttp.Response, error)
	/*
	   Detach Detach existing volume from Host
	   Detaches the indicated volume from the host identified in the requestBody.   This detachment will delete the VolumeAttachment object that contains  details about the connection of the volume and will update the Host  to remove selected iSCSI configuration information. Note that the HostID is required in the body of the request to ensure that the operation is well understood and that a volume is not accidently being removed from the wrong host.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param volumeId ID of volume to attach
	     - @param volumeAttachHostUuid Unique ID of the Host from which a volume will be detached
	*/
	Detach(ctx _context.Context, volumeId string, volumeAttachHostUuid VolumeAttachHostUuid) (*_nethttp.Response, error)
	/*
	   GetByID Retrieve volume by ID
	   Returns a single volume with matching ID
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param volumeId ID of volume to return

	   @return Volume
	*/
	GetByID(ctx _context.Context, volumeId string) (Volume, *_nethttp.Response, error)
	/*
	   List List all volumes in project
	   Returns an array of all volumes defined within the project.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

	   @return []Volume
	*/
	List(ctx _context.Context) ([]Volume, *_nethttp.Response, error)
	/*
	   Update Update an existing volume
	   Updates volume with matching ID. Update is permitted only when volume is in 'Allocated' or 'Visible' state. Only the Volume 'Capacity' can be updated with a value greater than the existing one to expand the volume.
	     - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
	     - @param volume Volume object with its ID and Capacity in GiB indicating the expanded size to be specified.

	   @return Volume
	*/
	Update(ctx _context.Context, volume Volume) (Volume, *_nethttp.Response, error)
}

VolumesAPI defines the client functions provided for Volumes.

type VolumesApiService

type VolumesApiService service

VolumesApiService VolumesApi service

func (*VolumesApiService) Add

Add Add a new volume Adds a new volume to the project. Volumes may be created separately and then referenced in the create Host call; or volumes may be created directly within the create Host call.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param newVolume Volume that is to be added to the project

@return Volume

func (*VolumesApiService) Attach

func (a *VolumesApiService) Attach(ctx _context.Context, volumeId string, volumeAttachHostUuid VolumeAttachHostUuid) (VolumeAttachment, *_nethttp.Response, error)

Attach Attach existing volume to Host Attaches the indicated volume to a host identified in the requestBody. This attachment will create a VolumeAttachment object that contains details about the connection of the volume and will update the Host with iSCSI configuration information.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param volumeId ID of volume to attach
  • @param volumeAttachHostUuid Unique ID of the Host to which the volume will be attached

@return VolumeAttachment

func (*VolumesApiService) Delete

func (a *VolumesApiService) Delete(ctx _context.Context, volumeId string) (*_nethttp.Response, error)

Delete Delete a volume Deletes the volume with the matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param volumeId ID of volume to delete

func (*VolumesApiService) Detach

func (a *VolumesApiService) Detach(ctx _context.Context, volumeId string, volumeAttachHostUuid VolumeAttachHostUuid) (*_nethttp.Response, error)

Detach Detach existing volume from Host Detaches the indicated volume from the host identified in the requestBody. This detachment will delete the VolumeAttachment object that contains details about the connection of the volume and will update the Host to remove selected iSCSI configuration information. Note that the HostID is required in the body of the request to ensure that the operation is well understood and that a volume is not accidently being removed from the wrong host.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param volumeId ID of volume to attach
  • @param volumeAttachHostUuid Unique ID of the Host from which a volume will be detached

func (*VolumesApiService) GetByID

func (a *VolumesApiService) GetByID(ctx _context.Context, volumeId string) (Volume, *_nethttp.Response, error)

GetByID Retrieve volume by ID Returns a single volume with matching ID

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param volumeId ID of volume to return

@return Volume

func (*VolumesApiService) List

List List all volumes in project Returns an array of all volumes defined within the project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

@return []Volume

func (*VolumesApiService) Update

func (a *VolumesApiService) Update(ctx _context.Context, volume Volume) (Volume, *_nethttp.Response, error)

Update Update an existing volume Updates volume with matching ID. Update is permitted only when volume is in 'Allocated' or 'Visible' state. Only the Volume 'Capacity' can be updated with a value greater than the existing one to expand the volume.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param volume Volume object with its ID and Capacity in GiB indicating the expanded size to be specified.

@return Volume

Source Files

Jump to

Keyboard shortcuts

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