metalcloud

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 13 Imported by: 3 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Metal Cloud Go SDK

GoDoc Build Status

This SDK allows control of the Bigstep Metal Cloud from Go.

GoDoc documentation available here

Getting started

package main
import "github.com/bigstepinc/metal-cloud-sdk-go"
import "os"
import "log"

func main(){
  user := os.Getenv("METALCLOUD_USER")
  apiKey := os.Getenv("METALCLOUD_API_KEY")
  endpoint := os.Getenv("METALCLOUD_ENDPOINT")

  if(user=="" || apiKey=="" || endpoint==""){
    log.Fatal("METALCLOUD_USER, METALCLOUD_API_KEY, METALCLOUD_ENDPOINT environment variables must be set")
  }

  client, err := metalcloud.GetMetalcloudClient(user, apiKey, endpoint)
  if err != nil {
    log.Fatal("Error initiating client: %s", err)
  }

  infras,err :=client.Infrastructures()
  if err != nil {
    log.Fatal("Error retrieving a list of infrastructures: %s", err)
  }

  for _,infra := range *infras{
    log.Printf("%s(%d)",infra.InfrastructureLabel, infra.InfrastructureID)
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultEndpoint

func DefaultEndpoint() string

DefaultEndpoint returns the default Bigstep Metalcloud endpoint

Types

type Client

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

Client sruct defines a metalcloud client

func GetMetalcloudClient

func GetMetalcloudClient(user string, apiKey string, endpoint string, loggingEnabled bool) (*Client, error)

GetMetalcloudClient returns a metal cloud client

func (*Client) DriveArrayCreate

func (c *Client) DriveArrayCreate(infrastructureID ID, driveArray DriveArray) (*DriveArray, error)

DriveArrayCreate creates a drive array. Requires deploy.

func (*Client) DriveArrayDelete

func (c *Client) DriveArrayDelete(driveArrayID ID) error

DriveArrayDelete deletes a Drive Array with specified id

func (*Client) DriveArrayEdit

func (c *Client) DriveArrayEdit(driveArrayID ID, driveArrayOperation DriveArrayOperation) (*DriveArray, error)

DriveArrayEdit alters a deployed drive array. Requires deploy.

func (*Client) DriveArrayGet

func (c *Client) DriveArrayGet(driveArrayID ID) (*DriveArray, error)

DriveArrayGet retrieves a DriveArray object with specified ids

func (*Client) DriveArrays

func (c *Client) DriveArrays(infrastructureID ID) (*map[string]DriveArray, error)

DriveArrays retrieves the list of drives arrays of an infrastructure

func (*Client) GetEndpoint

func (c *Client) GetEndpoint() string

GetEndpoint returns the endpoint configured for this connection

func (*Client) GetUserEmail

func (c *Client) GetUserEmail() string

GetUserEmail returns the user configured for this connection

func (*Client) InfrastructureCreate

func (c *Client) InfrastructureCreate(infrastructure Infrastructure) (*Infrastructure, error)

InfrastructureCreate creates an infrastructure

func (*Client) InfrastructureDelete

func (c *Client) InfrastructureDelete(infrastructureID ID) error

InfrastructureDelete deletes an infrastructure and all associated elements. Requires deploy

func (*Client) InfrastructureDeploy

func (c *Client) InfrastructureDeploy(infrastructureID ID, shutdownOptions ShutdownOptions, allowDataLoss bool, skipAnsible bool) error

InfrastructureDeploy initiates a deploy operation that will apply all registered changes for the respective infrastructure

func (*Client) InfrastructureEdit

func (c *Client) InfrastructureEdit(infrastructureID ID, infrastructureOperation InfrastructureOperation) (*Infrastructure, error)

InfrastructureEdit alters an infrastructure

func (*Client) InfrastructureGet

func (c *Client) InfrastructureGet(infrastructureID ID) (*Infrastructure, error)

InfrastructureGet returns a specific infrastructure

func (*Client) InfrastructureOperationCancel

func (c *Client) InfrastructureOperationCancel(infrastructureID ID) error

InfrastructureOperationCancel reverts (undos) alterations done before deploy

func (*Client) InfrastructureUserLimits

func (c *Client) InfrastructureUserLimits(infrastructureID ID) (*map[string]interface{}, error)

InfrastructureUserLimits returns user metadata

func (*Client) Infrastructures

func (c *Client) Infrastructures() (*map[string]Infrastructure, error)

Infrastructures returns a list of infrastructures

func (*Client) InstanceArrayCreate

func (c *Client) InstanceArrayCreate(infrastructureID ID, instanceArray InstanceArray) (*InstanceArray, error)

InstanceArrayCreate creates an instance array (colletion of identical instances). Requires Deploy.

func (*Client) InstanceArrayDelete

func (c *Client) InstanceArrayDelete(instanceArrayID ID) error

InstanceArrayDelete deletes an instance array. Requires deploy.

func (*Client) InstanceArrayEdit

func (c *Client) InstanceArrayEdit(instanceArrayID ID, instanceArrayOperation InstanceArrayOperation, bSwapExistingInstancesHardware *bool, bKeepDetachingDrives *bool, objServerTypeMatches *[]ServerType, arrInstancesToBeDeleted *[]int) (*InstanceArray, error)

InstanceArrayEdit alterns a deployed instance array. Requires deploy.

func (*Client) InstanceArrayGet

func (c *Client) InstanceArrayGet(instanceArrayID ID) (*InstanceArray, error)

InstanceArrayGet returns an InstanceArray with specified id

func (*Client) InstanceArrayInterfaceAttachNetwork

func (c *Client) InstanceArrayInterfaceAttachNetwork(instanceArrayID int, instanceArrayInterfaceIndex int, networkID int) (*InstanceArray, error)

InstanceArrayInterfaceAttachNetwork attaches an InstanceArrayInterface to a Network

func (*Client) InstanceArrayInterfaceDetach

func (c *Client) InstanceArrayInterfaceDetach(instanceArrayID int, instanceArrayInterfaceIndex int) (*InstanceArray, error)

InstanceArrayInterfaceDetach detaches an InstanceArrayInterface from any Network element that is attached to.

func (*Client) InstanceArrays

func (c *Client) InstanceArrays(infrastructureID ID) (*map[string]InstanceArray, error)

InstanceArrays returns list of instance arrays of specified infrastructure

func (*Client) NetworkCreate

func (c *Client) NetworkCreate(infrastructureID ID, network Network) (*Network, error)

NetworkCreate creates a network

func (*Client) NetworkDelete

func (c *Client) NetworkDelete(networkID ID) error

NetworkDelete deletes a network.

func (*Client) NetworkEdit

func (c *Client) NetworkEdit(networkID ID, networkOperation NetworkOperation) (*Network, error)

NetworkEdit applies a change to an existing network

func (*Client) NetworkGet

func (c *Client) NetworkGet(networkID ID) (*Network, error)

NetworkGet retrieves a network object

func (*Client) NetworkJoin

func (c *Client) NetworkJoin(networkID ID, networkToBeDeletedID ID) error

NetworkJoin merges two specified Network objects.

func (*Client) Networks

func (c *Client) Networks(infrastructureID ID) (*map[string]Network, error)

Networks returns a list of all network objects of an infrastructure

func (*Client) ServerTypeDatacenter

func (c *Client) ServerTypeDatacenter(datacenterName string) (*[]int, error)

ServerTypeDatacenter retrieves all the server type IDs for servers found in a specified Datacenter

func (*Client) ServerTypeGet

func (c *Client) ServerTypeGet(serverTypeID ID) (*ServerType, error)

ServerTypeGet retrieves a server type by id

func (*Client) ServerTypes

func (c *Client) ServerTypes(datacenterName string, bOnlyAvailable bool) (*map[int]ServerType, error)

ServerTypes retrieves all ServerType objects from the database.

func (*Client) ServerTypesMatchHardwareConfiguration

func (c *Client) ServerTypesMatchHardwareConfiguration(datacenterName string, hardwareConfiguration HardwareConfiguration) (*map[int]ServerType, error)

ServerTypesMatchHardwareConfiguration Retrieves a list of server types that match the provided hardware configuration. The function does not check for availability, only compatibility, so physical servers associated with the returned server types might be unavailable.

func (*Client) ServerTypesMatches

func (c *Client) ServerTypesMatches(infrastructureID ID, hardwareConfiguration HardwareConfiguration, instanceArrayID *int, bAllowServerSwap bool) (*map[string]ServerType, error)

ServerTypesMatches matches available servers with a certain Instance's configuration, using the properties specified in the objHardwareConfiguration object, and returns the number of compatible servers for each server_type_id.

func (*Client) VolumeTemplateGet

func (c *Client) VolumeTemplateGet(volumeTemplateID ID) (*VolumeTemplate, error)

VolumeTemplateGet returns the specified volume template

func (*Client) VolumeTemplates

func (c *Client) VolumeTemplates() (*map[string]VolumeTemplate, error)

VolumeTemplates retrives the list of available templates

type DriveArray

type DriveArray struct {
	DriveArrayID                      int    `json:"drive_array_id,omitempty"`
	DriveArrayLabel                   string `json:"drive_array_label,omitempty"`
	VolumeTemplateID                  int    `json:"volume_template_id,omitempty"`
	DriveArrayStorageType             string `json:"drive_array_storage_type,omitempty"`
	DriveSizeMBytesDefault            int    `json:"drive_size_mbytes_default,omitempty"`
	InstanceArrayID                   int    `json:"instance_array_id,omitempty"`
	InfrastructureID                  int    `json:"infrastructure_id,omitempty"`
	DriveArrayServiceStatus           string `json:"drive_array_service_status,omitempty"`
	DriveArrayCount                   int    `json:"drive_array_count,omitempty"`
	DriveArrayExpandWithInstanceArray bool   `json:"drive_array_expand_with_instance_array,omitempty"`

	DriveArrayOperation *DriveArrayOperation `json:"drive_array_operation,omitempty"`
}

DriveArray represents a collection of identical drives

type DriveArrayOperation

type DriveArrayOperation struct {
	DriveArrayID                      int    `json:"drive_array_id,omitempty"`
	DriveArrayLabel                   string `json:"drive_array_label,omitempty"`
	VolumeTemplateID                  int    `json:"volume_template_id,omitempty"`
	DriveArrayStorageType             string `json:"drive_array_storage_type,omitempty"`
	DriveSizeMBytesDefault            int    `json:"drive_size_mbytes_default,omitempty"`
	InstanceArrayID                   int    `json:"instance_array_id,omitempty"`
	InfrastructureID                  int    `json:"infrastructure_id,omitempty"`
	DriveArrayCount                   int    `json:"drive_array_count,omitempty"`
	DriveArrayExpandWithInstanceArray bool   `json:"drive_array_expand_with_instance_array,omitempty"`

	DriveArrayDeployType   string `json:"drive_array_deploy_type,omitempty"`
	DriveArrayDeployStatus string `json:"drive_array_deploy_status,omitempty"`
	DriveArrayChangeID     int    `json:"drive_array_change_id,omitempty"`
}

DriveArrayOperation defines changes to be applied to a DriveArray

type FirewallRule

type FirewallRule struct {
	FirewallRuleDescription                    string `json:"firewall_rule_description,omitempty"`
	FirewallRulePortRangeStart                 int    `json:"firewall_rule_port_range_start,omitempty"`
	FirewallRulePortRangeEnd                   int    `json:"firewall_rule_port_range_end,omitempty"`
	FirewallRuleSourceIPAddressRangeStart      string `json:"firewall_rule_source_ip_address_range_start,omitempty"`
	FirewallRuleSourceIPAddressRangeEnd        string `json:"firewall_rule_source_ip_address_range_end,omitempty"`
	FirewallRuleDestinationIPAddressRangeStart string `json:"firewall_rule_destination_ip_address_range_start,omitempty"`
	FirewallRuleDestinationIPAddressRangeEnd   string `json:"firewall_rule_destination_ip_address_range_end,omitempty"`
	FirewallRuleProtocol                       string `json:"firewall_rule_protocol,omitempty"`
	FirewallRuleIPAddressType                  string `json:"firewall_rule_ip_address_type,omitempty"`
	FirewallRuleEnabled                        bool   `json:"firewall_rule_enabled,omitempty"`
}

FirewallRule describes a firewall rule that is to be applied on all instances of an array

type HardwareConfiguration

type HardwareConfiguration struct {
	InstanceArrayRAMGbytes          int      `json:"instance_array_ram_gbytes,omitempty"`
	InstanceArrayProcessorCount     int      `json:"instance_array_processor_count,omitempty"`
	InstanceArrayProcessorCoreMHZ   int      `json:"instance_array_processor_core_mhz,omitempty"`
	InstanceArrayProcessorCoreCount int      `json:"instance_array_processor_core_count,omitempty"`
	InstanceArrayDiskCount          int      `json:"instance_array_disk_count,omitempty"`
	InstanceArrayDiskSizeMBytes     int      `json:"instance_array_disk_size_mbytes,omitempty"`
	InstanceArrayTotalMhz           int      `json:"instance_array_total_mhz,omitempty"`
	InstanceArrayDiskTypes          []string `json:"instance_array_disk_types,omitempty"`
	InstanceArrayInstanceCount      int      `json:"instance_array_instance_count,omitempty"`
}

HardwareConfiguration holds the desired hardware configuration when trying to find available servers for provisioning.

type ID

type ID interface{}

ID interface is used where the type of the ID can be either an int or a string

type Infrastructure

type Infrastructure struct {
	InfrastructureID               int                     `json:"infrastructure_id,omitempty"`
	InfrastructureLabel            string                  `json:"infrastructure_label"`
	DatacenterName                 string                  `json:"datacenter_name"`
	InfrastructureSubdomain        string                  `json:"infrastructure_subdomain,omitempty"`
	UserIDowner                    int                     `json:"user_id_owner,omitempty"`
	UserEmailOwner                 string                  `json:"user_email_owner,omitempty"`
	InfrastructureTouchUnixtime    string                  `json:"infrastructure_touch_unixtime,omitempty"`
	InfrastructureServiceStatus    string                  `json:"infrastructure_service_status,omitempty"`
	InfrastructureCreatedTimestamp string                  `json:"infrastructure_created_timestamp,omitempty"`
	InfrastructureUpdatedTimestamp string                  `json:"infrastructure_updated_timestamp,omitempty"`
	InfrastructureChangeID         int                     `json:"infrastructure_change_id,omitempty"`
	InfrastructureDeployID         int                     `json:"infrastructure_deploy_id,omitempty"`
	InfrastructureDesignIsLocked   bool                    `json:"infrastructure_design_is_locked,omitempty"`
	InfrastructureOperation        InfrastructureOperation `json:"infrastructure_operation,omitempty"`
}

Infrastructure - the main infrastructure object

type InfrastructureOperation

type InfrastructureOperation struct {
	InfrastructureID               int    `json:"infrastructure_id,omitempty"`
	InfrastructureLabel            string `json:"infrastructure_label"`
	DatacenterName                 string `json:"datacenter_name"`
	InfrastructureDeployStatus     string `json:"infrastructure_deploy_status,omitempty"`
	InfrastructureDeployType       string `json:"infrastructure_deploy_type,omitempty"`
	InfrastructureSubdomain        string `json:"infrastructure_subdomain,omitempty"`
	UserIDOwner                    int    `json:"user_id_owner,omitempty"`
	InfrastructureUpdatedTimestamp string `json:"infrastructure_updated_timestamp,omitempty"`
	InfrastructureChangeID         int    `json:"infrastructure_change_id,omitempty"`
	InfrastructureDeployID         int    `json:"infrastructure_deploy_id,omitempty"`
}

InfrastructureOperation - object with alternations to be applied

type InstanceArray

type InstanceArray struct {
	InstanceArrayID                 int                      `json:"instance_array_id,omitempty"`
	InstanceArrayLabel              string                   `json:"instance_array_label,omitempty"`
	InstanceArraySubdomain          string                   `json:"instance_array_subdomain,omitempty"`
	InstanceArrayBootMethod         string                   `json:"instance_array_boot_method,omitempty"`
	InstanceArrayInstanceCount      int                      `json:"instance_array_instance_count,omitempty"`
	InstanceArrayRAMGbytes          int                      `json:"instance_array_ram_gbytes,omitempty"`
	InstanceArrayProcessorCount     int                      `json:"instance_array_processor_count,omitempty"`
	InstanceArrayProcessorCoreMHZ   int                      `json:"instance_array_processor_core_mhz,omitempty"`
	InstanceArrayProcessorCoreCount int                      `json:"instance_array_processor_core_count,omitempty"`
	InstanceArrayDiskCount          int                      `json:"instance_array_disk_count,omitempty"`
	InstanceArrayDiskSizeMBytes     int                      `json:"instance_array_disk_size_mbytes,omitempty"`
	InstanceArrayDiskTypes          []string                 `json:"instance_array_disk_types,omitempty"`
	InfrastructureID                int                      `json:"infrastructure_id,omitempty"`
	InstanceArrayServiceStatus      string                   `json:"instance_array_service_status,omitempty"`
	InstanceArrayInterfaces         []InstanceArrayInterface `json:"instance_array_interfaces,omitempty"`
	ClusterID                       int                      `json:"cluster_id,omitempty"`
	ClusterRoleGroup                string                   `json:"cluster_role_group,omitempty"`
	InstanceArrayFirewallManaged    bool                     `json:"instance_array_firewall_managed,omitempty"`
	InstanceArrayFirewallRules      []FirewallRule           `json:"instance_array_firewall_rules,omitempty"`
	VolumeTemplateID                int                      `json:"volume_template_id,omitempty"`
	InstanceArrayOperation          *InstanceArrayOperation  `json:"instance_array_operation,omitempty"`
}

InstanceArray object describes a collection of identical instances

type InstanceArrayInterface

type InstanceArrayInterface struct {
	InstanceArrayInterfaceLabel            string                           `json:"instance_array_interface_label,omitempty"`
	InstanceArrayInterfaceSubdomain        string                           `json:"instance_array_interface_subdomain,omitempty"`
	InstanceArrayInterfaceID               int                              `json:"instance_array_interface_id,omitempty"`
	InstanceArrayID                        int                              `json:"instance_array_id,omitempty"`
	NetworkID                              int                              `json:"network_id,omitempty"`
	InstanceArrayInterfaceLAGGIndexes      []interface{}                    `json:"instance_array_interface_lagg_indexes,omitempty"`
	InstanceArrayInterfaceIndex            int                              `json:"instance_array_interface_index,omitempty"`
	InstanceArrayInterfaceServiceStatus    string                           `json:"instance_array_interface_service_status,omitempty"`
	InstanceArrayInterfaceCreatedTimestamp string                           `json:"instance_array_interface_created_timestamp,omitempty"`
	InstanceArrayInterfaceUpdatedTimestamp string                           `json:"instance_array_interface_updated_timestamp,omitempty"`
	InstanceArrayInterfaceOperation        *InstanceArrayInterfaceOperation `json:"instance_array_interface_operation,omitempty"`
}

InstanceArrayInterface describes a network interface of the array. It's properties will be applied to all InstanceInterfaces of the array's instances.

type InstanceArrayInterfaceOperation

type InstanceArrayInterfaceOperation struct {
	InstanceArrayInterfaceLabel            string        `json:"instance_array_interface_label,omitempty"`
	InstanceArrayInterfaceSubdomain        string        `json:"instance_array_interface_subdomain,omitempty"`
	InstanceArrayInterfaceID               int           `json:"instance_array_interface_id,omitempty"`
	InstanceArrayID                        int           `json:"instance_array_id,omitempty"`
	NetworkID                              int           `json:"network_id,omitempty"`
	InstanceArrayInterfaceLAGGIndexes      []interface{} `json:"instance_array_interface_lagg_indexes,omitempty"`
	InstanceArrayInterfaceIndex            int           `json:"instance_array_interface_index,omitempty"`
	InstanceArrayInterfaceServiceStatus    string        `json:"instance_array_interface_service_status,omitempty"`
	InstanceArrayInterfaceCreatedTimestamp string        `json:"instance_array_interface_created_timestamp,omitempty"`
	InstanceArrayInterfaceUpdatedTimestamp string        `json:"instance_array_interface_updated_timestamp,omitempty"`
	InstanceArrayInterfaceChangeID         int           `json:"instance_array_interface_change_id,omitempty"`
}

InstanceArrayInterfaceOperation describes changes to a network array interface

type InstanceArrayOperation

type InstanceArrayOperation struct {
	InstanceArrayID                 int                               `json:"instance_array_id,omitempty"`
	InstanceArrayLabel              string                            `json:"instance_array_label,omitempty"`
	InstanceArraySubdomain          string                            `json:"instance_array_subdomain,omitempty"`
	InstanceArrayBootMethod         string                            `json:"instance_array_boot_method,omitempty"`
	InstanceArrayInstanceCount      int                               `json:"instance_array_instance_count,omitempty"`
	InstanceArrayRAMGbytes          int                               `json:"instance_array_ram_gbytes,omitempty"`
	InstanceArrayProcessorCount     int                               `json:"instance_array_processor_count,omitempty"`
	InstanceArrayProcessorCoreMHZ   int                               `json:"instance_array_processor_core_mhz,omitempty"`
	InstanceArrayProcessorCoreCount int                               `json:"instance_array_processor_core_count,omitempty"`
	InstanceArrayDiskCount          int                               `json:"instance_array_disk_count,omitempty"`
	InstanceArrayDiskSizeMBytes     int                               `json:"instance_array_disk_size_mbytes,omitempty"`
	InstanceArrayDiskTypes          []string                          `json:"instance_array_disk_types,omitempty"`
	InstanceArrayServiceStatus      string                            `json:"instance_array_service_status,omitempty"`
	InstanceArrayInterfaces         []InstanceArrayInterfaceOperation `json:"instance_array_interfaces,omitempty"`
	ClusterID                       int                               `json:"cluster_id,omitempty"`
	ClusterRoleGroup                string                            `json:"cluster_role_group,omitempty"`
	InstanceArrayFirewallManaged    bool                              `json:"instance_array_firewall_managed,omitempty"`
	InstanceArrayFirewallRules      []FirewallRule                    `json:"instance_array_firewall_rules,omitempty"`
	VolumeTemplateID                int                               `json:"volume_template_id,omitempty"`
	InstanceArrayDeployType         string                            `json:"instance_array_deploy_type,omitempty"`
	InstanceArrayDeployStatus       string                            `json:"instance_array_deploy_status,omitempty"`
	InstanceArrayChangeID           int                               `json:"instance_array_change_id,omitempty"`
}

InstanceArrayOperation object describes the changes that will be applied to an instance array

type Network

type Network struct {
	NetworkID                 int               `json:"network_id,omitempty"`
	NetworkLabel              string            `json:"network_label,omitempty"`
	NetworkSubdomain          string            `json:"network_subdomain,omitempty"`
	NetworkType               string            `json:"network_type,omitempty"`
	InfrastructureID          int               `json:"infrastructure_id,omitempty"`
	NetworkCreatedTimestamp   string            `json:"network_created_timestamp,omitempty"`
	NetworkUpdatedTimestamp   string            `json:"network_updated_timestamp,omitempty"`
	NetworkLANAutoAllocateIPs bool              `json:"network_lan_autoallocate_ips,omitempty"`
	NetworkOperation          *NetworkOperation `json:"network_operation,omitempty"`
}

Network object describes an high level connection construct

type NetworkOperation

type NetworkOperation struct {
	NetworkID                 int    `json:"network_id,omitempty"`
	NetworkLabel              string `json:"network_label,omitempty"`
	NetworkSubdomain          string `json:"network_subdomain,omitempty"`
	NetworkType               string `json:"network_type,omitempty"`
	InfrastructureID          int    `json:"infrastructure_id,omitempty"`
	NetworkLANAutoAllocateIPs bool   `json:"network_lan_autoallocate_ips,omitempty"`
	NetworkDeployType         string `json:"network_deploy_type,omitempty"`
	NetworkChangeID           int    `json:"network_change_id,omitempty"`
}

NetworkOperation object describes the change(s) required to be applied to a Network

type OperatingSystem

type OperatingSystem struct {
	OperatingSystemType         string `json:"operating_system_type,omitempty"`
	OperatingSystemVersion      string `json:"operating_system_version,omitempty"`
	OperatingSystemArchitecture string `json:"operating_system_architecture,omitempty"`
}

OperatingSystem describes an OS

type ServerType

type ServerType struct {
	ServerTypeID                   int    `json:"server_type_id,omitempty"`
	ServerNetworkTotalCapacityMBps int    `json:"server_network_total_capacity_mbps,omitempty"`
	ServerTypeName                 string `json:"server_type_name,omitempty"`
	ServerTypeDisplayName          string `json:"server_type_display_name,omitempty"`
	ServerTypeLabel                string `json:"server_type_label,omitempty"`
	ServerProcessorCoreCount       int    `json:"server_processor_core_count,omitempty"`
	ServerProcessorCoreMHz         int    `json:"server_processor_core_mhz,omitempty"`
	ServerProcessorCount           int    `json:"server_processor_count,omitempty"`
	ServerRAMGbytes                int    `json:"server_ram_gbytes,omitempty"`
	ServerDiskCount                int    `json:"server_disk_count,omitempty"`
	ServerDiskType                 string `json:"server_disk_type,omitempty"`
	ServerDiskSizeMBytes           int    `json:"server_disk_size_mbytes,omitempty"`
	ServerProcessorNamesJSON       string `json:"server_processor_names_json,omitempty"`
	ServerProcessorName            string `json:"server_processor_name,omitempty"`
	ServerClass                    string `json:"server_class,omitempty"`
	ServerTypeIsExperimental       bool   `json:"server_type_is_experimental,omitempty"`
	ServerCount                    int    `json:"server_count,omitempty"`
}

ServerType struct defines a server type

type ShutdownOptions

type ShutdownOptions struct {
	HardShutdownAfterTimeout   bool `json:"hard_shutdown_after_timeout"`
	AttemptSoftShutdown        bool `json:"attempt_soft_shutdown"`
	SoftShutdownTimeoutSeconds int  `json:"soft_shutdown_timeout_seconds"`
}

ShutdownOptions controls how the deploy engine handles running instances

type VolumeTemplate

type VolumeTemplate struct {
	VolumeTemplateID                   int             `json:"volume_template_id,omitempty"`
	VolumeTemplateLabel                string          `json:"volume_template_label,omitempty"`
	VolumeTemplateSizeMBytes           int             `json:"volume_template_size_mbytes,omitempty"`
	VolumeTemplateDisplayName          string          `json:"volume_template_display_name,omitempty"`
	VolumeTemplateDescription          string          `json:"volume_template_description,omitempty"`
	VolumeTemplateLocalDiskSupported   bool            `json:"volume_template_local_supported,omitempty"`
	VolumeTemplateBootMethodsSupported string          `json:"volume_template_boot_methods_supported,omitempty"`
	VolumeTemplateDeprecationStatus    string          `json:"volume_template_deprecation_status,omitempty"`
	VolumeTemplateRepoURL              string          `json:"volume_template_repo_url,omitempty"`
	VolumeTemplateOperatingSystem      OperatingSystem `json:"volume_template_operating_system,omitempty"`
}

VolumeTemplate describes an OS template

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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