metalcloud

package module
v2.2.20 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

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

func GetObjectByKind

func GetObjectByKind(name string) (reflect.Value, error)

GetObjectByKind creates an object of type <name>

Types

type AnsibleBundle

type AnsibleBundle struct {
	AnsibleBundleArchiveFilename       string `json:"ansible_bundle_archive_filename,omitempty"`
	AnsibleBundleArchiveContentsBase64 string `json:"ansible_bundle_archive_contents_base64,omitempty"`
	Type                               string `json:"type,omitempty"`
}

AnsibleBundle contains an Ansible project as a single archive file, usually .zip

type Applier

type Applier interface {
	CreateOrUpdate(MetalCloudClient) error
	Delete(MetalCloudClient) error
	Validate() error
}

Applier should create or update an object.

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) DatacenterAgentsConfigJSONDownloadURL

func (c *Client) DatacenterAgentsConfigJSONDownloadURL(datacenterName string, decrypt bool) (string, error)

DatacenterAgentsConfigJSONDownloadURL returns the agent url (and automatically decrypts it)

func (*Client) DatacenterConfigGet

func (c *Client) DatacenterConfigGet(datacenterName string) (*DatacenterConfig, error)

DatacenterConfigGet returns details of a specific datacenter

func (*Client) DatacenterConfigUpdate

func (c *Client) DatacenterConfigUpdate(datacenterName string, datacenterConfig DatacenterConfig) error

DatacenterConfigUpdate Updates configuration information for a specified Datacenter.

func (*Client) DatacenterCreate

func (c *Client) DatacenterCreate(datacenter Datacenter, datacenterConfig DatacenterConfig) (*Datacenter, error)

DatacenterCreate creates a new Datacenter

func (*Client) DatacenterGet

func (c *Client) DatacenterGet(datacenterName string) (*Datacenter, error)

DatacenterGet returns details of a specific datacenter

func (*Client) DatacenterGetForUserByEmail

func (c *Client) DatacenterGetForUserByEmail(datacenterName string, userID string) (*Datacenter, error)

DatacenterGetForUserByEmail returns details of a specific datacenter

func (*Client) DatacenterGetForUserByID

func (c *Client) DatacenterGetForUserByID(datacenterName string, userID int) (*Datacenter, error)

DatacenterGetForUserByID returns details of a specific datacenter

func (*Client) Datacenters

func (c *Client) Datacenters(onlyActive bool) (*map[string]Datacenter, error)

Datacenters returns datacenters for all users

func (*Client) DatacentersByUserEmail

func (c *Client) DatacentersByUserEmail(userEmail string, onlyActive bool) (*map[string]Datacenter, error)

DatacentersByUserEmail returns datacenters by email

func (*Client) DatacentersByUserID

func (c *Client) DatacentersByUserID(userID int, onlyActive bool) (*map[string]Datacenter, error)

DatacentersByUserID returns datacenters for specific user

func (*Client) DriveArrayCreate

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

DriveArrayCreate creates a drive array. Requires deploy.

func (*Client) DriveArrayCreateByLabel

func (c *Client) DriveArrayCreateByLabel(infrastructureLabel string, driveArray DriveArray) (*DriveArray, error)

DriveArrayCreateByLabel creates a drive array. Requires deploy.

func (*Client) DriveArrayDelete

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

DriveArrayDelete deletes a Drive Array with specified id

func (*Client) DriveArrayDeleteByLabel

func (c *Client) DriveArrayDeleteByLabel(driveArrayLabel string) error

DriveArrayDeleteByLabel deletes a Drive Array with specified id

func (*Client) DriveArrayDrives

func (c *Client) DriveArrayDrives(driveArray int) (*map[string]Drive, error)

DriveArrayDrives returns the drives of a drive array

func (*Client) DriveArrayDrivesByLabel

func (c *Client) DriveArrayDrivesByLabel(driveArrLabel string) (*map[string]Drive, error)

DriveArrayDrivesByLabel returns the drives of a drive array

func (*Client) DriveArrayEdit

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

DriveArrayEdit alters a deployed drive array. Requires deploy.

func (*Client) DriveArrayEditByLabel

func (c *Client) DriveArrayEditByLabel(driveArrayLabel string, driveArrayOperation DriveArrayOperation) (*DriveArray, error)

DriveArrayEditByLabel alters a deployed drive array. Requires deploy.

func (*Client) DriveArrayGet

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

DriveArrayGet retrieves a DriveArray object with specified ids

func (*Client) DriveArrayGetByLabel

func (c *Client) DriveArrayGetByLabel(driveArrayLabel string) (*DriveArray, error)

DriveArrayGetByLabel retrieves a DriveArray object with specified ids

func (*Client) DriveArrays

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

DriveArrays retrieves the list of drives arrays of an infrastructure

func (*Client) DriveArraysByLabel

func (c *Client) DriveArraysByLabel(infrastructureLabel string) (*map[string]DriveArray, error)

DriveArraysByLabel retrieves the list of drives arrays of an infrastructure

func (*Client) DriveSnapshotCreate

func (c *Client) DriveSnapshotCreate(driveID int) (*Snapshot, error)

DriveSnapshotCreate creates a drive snapshot

func (*Client) DriveSnapshotDelete

func (c *Client) DriveSnapshotDelete(driveSnapshotID int) error

DriveSnapshotDelete creates a drive snapshot

func (*Client) DriveSnapshotGet

func (c *Client) DriveSnapshotGet(driveSnapshotID int) (*Snapshot, error)

DriveSnapshotGet gets a drive snapshot

func (*Client) DriveSnapshotRollback

func (c *Client) DriveSnapshotRollback(driveSnapshotID int) error

DriveSnapshotRollback rolls a Drive back to a specified DriveSnapshot. The specified snapshot is not destroyed and can be reused.

func (*Client) DriveSnapshots

func (c *Client) DriveSnapshots(driveID int) (*map[string]Snapshot, error)

DriveSnapshots retrieves a list of all the snapshot objects

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) GetUserID

func (c *Client) GetUserID() int

GetUserID returns the ID of the user extracted from the API key

func (*Client) InfrastructureCreate

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

InfrastructureCreate creates an infrastructure

func (*Client) InfrastructureDelete

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

InfrastructureDelete deletes an infrastructure and all associated elements. Requires deploy

func (*Client) InfrastructureDeleteByLabel

func (c *Client) InfrastructureDeleteByLabel(infrastructureLabel string) error

InfrastructureDeleteByLabel deletes an infrastructure and all associated elements. Requires deploy

func (*Client) InfrastructureDeploy

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

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

func (*Client) InfrastructureDeployByLabel

func (c *Client) InfrastructureDeployByLabel(infrastructureLabel string, shutdownOptions ShutdownOptions, allowDataLoss bool, skipAnsible bool) error

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

func (*Client) InfrastructureDeployCustomStageAddIntoRunlevel

func (c *Client) InfrastructureDeployCustomStageAddIntoRunlevel(infraID int, stageID int, runLevel int, stageRunMoment string) error

InfrastructureDeployCustomStageAddIntoRunlevel adds a stage into a runlevel

func (*Client) InfrastructureDeployCustomStageDeleteIntoRunlevel

func (c *Client) InfrastructureDeployCustomStageDeleteIntoRunlevel(infraID int, stageID int, runLevel int, stageRunMoment string) error

InfrastructureDeployCustomStageDeleteIntoRunlevel delete a stage into a runlevel

func (*Client) InfrastructureDeployCustomStages

func (c *Client) InfrastructureDeployCustomStages(infraID int, stageDefinitionType string) (*[]WorkflowStageAssociation, error)

InfrastructureDeployCustomStages retrieves a list of all the StageDefinition objects which a specified User is allowed to see through ownership or delegation. The stageDefinition objects never return the actual protected stageDefinition value.

func (*Client) InfrastructureDeployWithOptions added in v2.0.2

func (c *Client) InfrastructureDeployWithOptions(infrastructureID int, shutdownOptions ShutdownOptions, deployOptions *DeployOptions, allowDataLoss bool, skipAnsible bool) error

InfrastructureDeployWithOptions initiates a deploy operation that will apply all registered changes for the respective infrastructure. With options.

func (*Client) InfrastructureDeployWithOptionsByLabel added in v2.0.2

func (c *Client) InfrastructureDeployWithOptionsByLabel(infrastructureLabel string, shutdownOptions ShutdownOptions, deployOptions *DeployOptions, allowDataLoss bool, skipAnsible bool) error

InfrastructureDeployWithOptionsByLabel initiates a deploy operation that will apply all registered changes for the respective infrastructure. With options.

func (*Client) InfrastructureEdit

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

InfrastructureEdit alters an infrastructure

func (*Client) InfrastructureEditByLabel

func (c *Client) InfrastructureEditByLabel(infrastructureLabel string, infrastructureOperation InfrastructureOperation) (*Infrastructure, error)

InfrastructureEditByLabel alters an infrastructure

func (*Client) InfrastructureGet

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

InfrastructureGet returns a specific infrastructure by id

func (*Client) InfrastructureGetByLabel

func (c *Client) InfrastructureGetByLabel(infrastructureLabel string) (*Infrastructure, error)

InfrastructureGetByLabel returns a specific infrastructure by id

func (*Client) InfrastructureOperationCancel

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

InfrastructureOperationCancel reverts (undos) alterations done before deploy

func (*Client) InfrastructureOperationCancelByLabel

func (c *Client) InfrastructureOperationCancelByLabel(infrastructureLabel string) error

InfrastructureOperationCancelByLabel reverts (undos) alterations done before deploy

func (*Client) InfrastructureUserLimits

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

InfrastructureUserLimits returns user metadata

func (*Client) InfrastructureUserLimitsByLabel

func (c *Client) InfrastructureUserLimitsByLabel(infrastructureLabel string) (*map[string]interface{}, error)

InfrastructureUserLimitsByLabel 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 int, instanceArray InstanceArray) (*InstanceArray, error)

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

func (*Client) InstanceArrayCreateByLabel

func (c *Client) InstanceArrayCreateByLabel(infrastructureLabel string, instanceArray InstanceArray) (*InstanceArray, error)

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

func (*Client) InstanceArrayDelete

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

InstanceArrayDelete deletes an instance array. Requires deploy.

func (*Client) InstanceArrayDeleteByLabel

func (c *Client) InstanceArrayDeleteByLabel(instanceArrayLabel string) error

InstanceArrayDeleteByLabel deletes an instance array. Requires deploy.

func (*Client) InstanceArrayEdit

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

InstanceArrayEdit alterns a deployed instance array. Requires deploy.

func (*Client) InstanceArrayEditByLabel

func (c *Client) InstanceArrayEditByLabel(instanceArrayLabel string, instanceArrayOperation InstanceArrayOperation, bSwapExistingInstancesHardware *bool, bKeepDetachingDrives *bool, objServerTypeMatches *ServerTypeMatches, arrInstancesToBeDeleted *[]int) (*InstanceArray, error)

InstanceArrayEditByLabel alterns a deployed instance array. Requires deploy.

func (*Client) InstanceArrayGet

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

InstanceArrayGet returns an InstanceArray with specified id

func (*Client) InstanceArrayGetByLabel

func (c *Client) InstanceArrayGetByLabel(instanceArrayLabel string) (*InstanceArray, error)

InstanceArrayGetByLabel returns an InstanceArray with specified id

func (*Client) InstanceArrayInstances

func (c *Client) InstanceArrayInstances(instanceArrayID int) (*map[string]Instance, error)

InstanceArrayInstances retrieves a list of all the Instance objects associated with a specified InstanceArray.

func (*Client) InstanceArrayInstancesByLabel

func (c *Client) InstanceArrayInstancesByLabel(instanceArrayLabel string) (*map[string]Instance, error)

InstanceArrayInstancesByLabel retrieves a list of all the Instance objects associated with a specified InstanceArray.

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) InstanceArrayStart

func (c *Client) InstanceArrayStart(instanceArrayID int) (*InstanceArray, error)

InstanceArrayStart starts a specified InstanceArray.

func (*Client) InstanceArrayStartByLabel

func (c *Client) InstanceArrayStartByLabel(instanceArrayLabel string) (*InstanceArray, error)

InstanceArrayStartByLabel starts a specified InstanceArray.

func (*Client) InstanceArrayStop

func (c *Client) InstanceArrayStop(instanceArrayID int) (*InstanceArray, error)

InstanceArrayStop stops a specified InstanceArray.

func (*Client) InstanceArrayStopByLabel

func (c *Client) InstanceArrayStopByLabel(instanceArrayLabel string) (*InstanceArray, error)

InstanceArrayStopByLabel stops a specified InstanceArray.

func (*Client) InstanceArrays

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

InstanceArrays returns list of instance arrays of specified infrastructure

func (*Client) InstanceArraysByLabel

func (c *Client) InstanceArraysByLabel(infrastructureLabel string) (*map[string]InstanceArray, error)

InstanceArraysByLabel returns list of instance arrays of specified infrastructure

func (*Client) InstanceGet

func (c *Client) InstanceGet(instanceID int) (*Instance, error)

InstanceGet returns a specific instance by id

func (*Client) InstanceGetByLabel

func (c *Client) InstanceGetByLabel(instanceLabel string) (*Instance, error)

InstanceGetByLabel returns a specific instance by id

func (*Client) InstanceServerPowerGet

func (c *Client) InstanceServerPowerGet(instanceID int) (*string, error)

InstanceServerPowerGet returns the power status of an instance

func (*Client) InstanceServerPowerGetBatch

func (c *Client) InstanceServerPowerGetBatch(infrastructureID int, instanceIDs []int) (*map[string]string, error)

InstanceServerPowerGetBatch returns the power status of multiple instances

func (*Client) InstanceServerPowerGetBatchByLabel

func (c *Client) InstanceServerPowerGetBatchByLabel(infrastructureLabel string, instanceIDs []int) (*map[string]string, error)

InstanceServerPowerGetBatchByLabel returns the power status of multiple instances

func (*Client) InstanceServerPowerGetByLabel

func (c *Client) InstanceServerPowerGetByLabel(instanceLabel string) (*string, error)

InstanceServerPowerGetByLabel returns the power status of an instance

func (*Client) InstanceServerPowerSet

func (c *Client) InstanceServerPowerSet(instanceID int, operation string) error

InstanceServerPowerSet reboots or powers on an instance

func (*Client) InstanceServerPowerSetByLabel

func (c *Client) InstanceServerPowerSetByLabel(instanceLabel string, operation string) error

InstanceServerPowerSetByLabel reboots or powers on an instance

func (*Client) NetworkCreate

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

NetworkCreate creates a network

func (*Client) NetworkCreateByLabel

func (c *Client) NetworkCreateByLabel(infrastructureLabel string, network Network) (*Network, error)

NetworkCreateByLabel creates a network

func (*Client) NetworkDelete

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

NetworkDelete deletes a network.

func (*Client) NetworkDeleteByLabel

func (c *Client) NetworkDeleteByLabel(networkLabel string) error

NetworkDeleteByLabel deletes a network.

func (*Client) NetworkEdit

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

NetworkEdit applies a change to an existing network

func (*Client) NetworkEditByLabel

func (c *Client) NetworkEditByLabel(networkLabel string, networkOperation NetworkOperation) (*Network, error)

NetworkEditByLabel applies a change to an existing network

func (*Client) NetworkGet

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

NetworkGet retrieves a network object

func (*Client) NetworkGetByLabel

func (c *Client) NetworkGetByLabel(networkLabel string) (*Network, error)

NetworkGetByLabel retrieves a network object

func (*Client) NetworkJoin

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

NetworkJoin merges two specified Network objects.

func (*Client) NetworkJoinByLabel

func (c *Client) NetworkJoinByLabel(networkLabel string, networkToBeDeletedID int) error

NetworkJoinByLabel merges two specified Network objects.

func (*Client) Networks

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

Networks returns a list of all network objects of an infrastructure

func (*Client) NetworksByLabel

func (c *Client) NetworksByLabel(infrastructureLabel string) (*map[string]Network, error)

NetworksByLabel returns a list of all network objects of an infrastructure

func (*Client) OSAssetCreate

func (c *Client) OSAssetCreate(osAsset OSAsset) (*OSAsset, error)

OSAssetCreate creates a osAsset object

func (*Client) OSAssetDelete

func (c *Client) OSAssetDelete(osAssetID int) error

OSAssetDelete permanently destroys a OSAsset.

func (*Client) OSAssetGet

func (c *Client) OSAssetGet(osAssetID int) (*OSAsset, error)

OSAssetGet returns a OSAsset specified by nOSAssetID. The OSAsset's protected value is never returned.

func (*Client) OSAssetMakePrivate added in v2.1.0

func (c *Client) OSAssetMakePrivate(osAssetID int, userID int) (*OSAsset, error)

OSAssetMakePrivate makes an OS Asset private and owned by the current user

func (*Client) OSAssetMakePublic added in v2.1.0

func (c *Client) OSAssetMakePublic(osAssetID int) (*OSAsset, error)

OSAssetMakePublic makes an OS Asset public

func (*Client) OSAssetUpdate

func (c *Client) OSAssetUpdate(osAssetID int, osAsset OSAsset) (*OSAsset, error)

OSAssetUpdate updates a osAsset

func (*Client) OSAssets

func (c *Client) OSAssets() (*map[string]OSAsset, error)

OSAssets retrieves a list of all the OSAsset objects which a specified User is allowed to see through ownership or delegation. The OSAsset objects never return the actual protected OSAsset value.

func (*Client) OSTemplateAddOSAsset

func (c *Client) OSTemplateAddOSAsset(osTemplateID int, osAssetID int, path string, variablesJSON string) error

OSTemplateAddOSAsset adds an asset to a template

func (*Client) OSTemplateCreate

func (c *Client) OSTemplateCreate(osTemplate OSTemplate) (*OSTemplate, error)

OSTemplateCreate creates a osTemplate object

func (*Client) OSTemplateDelete

func (c *Client) OSTemplateDelete(osTemplateID int) error

OSTemplateDelete permanently destroys a OSTemplate.

func (*Client) OSTemplateGet

func (c *Client) OSTemplateGet(osTemplateID int, decryptPasswd bool) (*OSTemplate, error)

OSTemplateGet returns a OSTemplate specified by nOSTemplateID. The OSTemplate's protected value is never returned.

func (*Client) OSTemplateMakePrivate

func (c *Client) OSTemplateMakePrivate(osTemplateID int, userID int) error

OSTemplateMakePrivate makes a template private

func (*Client) OSTemplateMakePublic

func (c *Client) OSTemplateMakePublic(osTemplateID int) error

OSTemplateMakePublic makes a template public

func (*Client) OSTemplateOSAssets

func (c *Client) OSTemplateOSAssets(osTemplateID int) (*map[string]OSTemplateOSAssetData, error)

OSTemplateOSAssets returns the OSAssets assigned to an OSTemplate.

func (*Client) OSTemplateRemoveOSAsset

func (c *Client) OSTemplateRemoveOSAsset(osTemplateID int, osAssetID int) error

OSTemplateRemoveOSAsset removes an asset from a template

func (*Client) OSTemplateUpdate

func (c *Client) OSTemplateUpdate(osTemplateID int, osTemplate OSTemplate) (*OSTemplate, error)

OSTemplateUpdate updates a osTemplate

func (*Client) OSTemplateUpdateOSAssetPath

func (c *Client) OSTemplateUpdateOSAssetPath(osTemplateID int, osAssetID int, path string) error

OSTemplateUpdateOSAssetPath updates an asset mapping

func (*Client) OSTemplateUpdateOSAssetVariables

func (c *Client) OSTemplateUpdateOSAssetVariables(osTemplateID int, osAssetID int, variablesJSON string) error

OSTemplateUpdateOSAssetVariables updates an asset variable

func (*Client) OSTemplates

func (c *Client) OSTemplates() (*map[string]OSTemplate, error)

OSTemplates retrieves a list of all the OSTemplate objects which a specified User is allowed to see through ownership or delegation. The OSTemplate objects never return the actual protected OSTemplate value.

func (*Client) SecretCreate

func (c *Client) SecretCreate(secret Secret) (*Secret, error)

SecretCreate creates a secret

func (*Client) SecretDelete

func (c *Client) SecretDelete(secretID int) error

SecretDelete Permanently destroys a Secret.

func (*Client) SecretGet

func (c *Client) SecretGet(secretID int) (*Secret, error)

SecretGet returns a Secret specified by nSecretID. The secret's protected value is never returned.

func (*Client) SecretUpdate

func (c *Client) SecretUpdate(secretID int, secret Secret) (*Secret, error)

SecretUpdate This function allows updating the secret_usage, secret_label and secret_base64 of a Secret

func (*Client) Secrets

func (c *Client) Secrets(usage string) (*map[string]Secret, error)

Secrets retrieves a list of all the Secret objects which a specified User is allowed to see through ownership or delegation. The secret objects never return the actual protected secret value.

func (*Client) ServerComponentGet

func (c *Client) ServerComponentGet(serverComponentID int) (*ServerComponent, error)

ServerComponentGet returns a server's component's details

func (*Client) ServerComponents

func (c *Client) ServerComponents(serverID int, filter string) (*[]ServerComponent, error)

ServerComponents searches for servers matching certain filter

func (*Client) ServerCreate

func (c *Client) ServerCreate(server Server, autoGenerate bool) (int, error)

ServerCreate manually creates a server record

func (*Client) ServerDecomission

func (c *Client) ServerDecomission(serverID int, skipIPMI bool) error

ServerDecomission decomissions the server row and deletes all child rows.

func (*Client) ServerDelete

func (c *Client) ServerDelete(serverID int, skipIPMI bool) error

ServerDelete deletes all the information about a specified Server.

func (*Client) ServerEdit

func (c *Client) ServerEdit(serverID int, serverEditType string, server Server) (*Server, error)

ServerEdit edits a server record

func (*Client) ServerEditAvailability

func (c *Client) ServerEditAvailability(serverID int, server Server) (*Server, error)

ServerEditAvailability - edit only server availability settings

func (*Client) ServerEditComplete

func (c *Client) ServerEditComplete(serverID int, server Server) (*Server, error)

ServerEditComplete - perform a complete edit

func (*Client) ServerEditIPMI

func (c *Client) ServerEditIPMI(serverID int, server Server) (*Server, error)

ServerEditIPMI - edit only IPMI settings

func (*Client) ServerFirmwareComponentTargetVersionAdd

func (c *Client) ServerFirmwareComponentTargetVersionAdd(serverComponentID int, version string, firmareBinaryURL string) error

ServerFirmwareComponentTargetVersionAdd Adds a new available firmware version for a server component along with the url of the binary. If the version already exists the old url will be overwritten.

func (*Client) ServerFirmwareComponentTargetVersionSet

func (c *Client) ServerFirmwareComponentTargetVersionSet(serverComponentID int, serverComponentFirmwareNewVersion string) error

ServerFirmwareComponentTargetVersionSet Sets a firmware target version for the upgrading process. The system will apply the upgrade at the next upgrading session.

func (*Client) ServerFirmwareComponentTargetVersionUpdate

func (c *Client) ServerFirmwareComponentTargetVersionUpdate(serverComponentID int) error

ServerFirmwareComponentTargetVersionUpdate Updates for every component of the specified server the available firmware versions that can be used as target by the firmware upgrading process. The available versions are extracted from a vendor specific catalog.

func (*Client) ServerFirmwareComponentUpgrade

func (c *Client) ServerFirmwareComponentUpgrade(serverID int, serverComponentID int, serverComponentFirmwareNewVersion string, firmwareBinaryURL string) error

ServerFirmwareComponentUpgrade Creates a firmware upgrading session for the specified component. If no strServerComponentFirmwareNewVersion or strFirmwareBinaryURL are provided the system will use the values from the database which should have been previously added

func (*Client) ServerFirmwareUpgrade

func (c *Client) ServerFirmwareUpgrade(serverID int) error

ServerFirmwareUpgrade creates a firmware upgrading session that affects all components from the specified server that have a target version set and are updatable.

func (*Client) ServerGet

func (c *Client) ServerGet(serverID int, decryptPasswd bool) (*Server, error)

ServerGet returns a server's details

func (*Client) ServerGetByUUID

func (c *Client) ServerGetByUUID(serverUUID string, decryptPasswd bool) (*Server, error)

ServerGetByUUID retrieves information about a specified Server by using the server's UUID

func (*Client) ServerPowerSet

func (c *Client) ServerPowerSet(serverID int, operation string) error

ServerPowerSet reboots or powers on a server

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 int) (*ServerType, error)

ServerTypeGet retrieves a server type by id

func (*Client) ServerTypeGetByLabel

func (c *Client) ServerTypeGetByLabel(serverTypeLabel string) (*ServerType, error)

ServerTypeGetByLabel retrieves a server type by id

func (*Client) ServerTypes

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

ServerTypes retrieves all ServerType objects from the database.

func (*Client) ServerTypesForDatacenter

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

ServerTypesForDatacenter 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 int, hardwareConfiguration HardwareConfiguration, instanceArrayID *int, bAllowServerSwap bool) (*map[string]ServerType, error)

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

func (*Client) ServerTypesMatchesByLabel

func (c *Client) ServerTypesMatchesByLabel(infrastructureLabel string, hardwareConfiguration HardwareConfiguration, instanceArrayID *int, bAllowServerSwap bool) (*map[string]ServerType, error)

ServerTypesMatchesByLabel matches available servers with a certain Instance&#39;s configuration, using the properties specified in the objHardwareConfiguration object, and returns the number of compatible servers for each server_type_id.

func (*Client) ServersSearch

func (c *Client) ServersSearch(filter string) (*[]ServerSearchResult, error)

ServersSearch searches for servers matching certain filter

func (*Client) SharedDriveAttachInstanceArray added in v2.2.9

func (c *Client) SharedDriveAttachInstanceArray(sharedDriveID int, instanceArrayID int) (*SharedDrive, error)

func (*Client) SharedDriveCreate

func (c *Client) SharedDriveCreate(infrastructureID int, sharedDrive SharedDrive) (*SharedDrive, error)

SharedDriveCreate creates a shared drive array. Requires deploy.

func (*Client) SharedDriveCreateByLabel

func (c *Client) SharedDriveCreateByLabel(infrastructureLabel string, sharedDrive SharedDrive) (*SharedDrive, error)

SharedDriveCreateByLabel creates a shared drive array. Requires deploy.

func (*Client) SharedDriveDelete

func (c *Client) SharedDriveDelete(sharedDriveID int) error

SharedDriveDelete deletes a shared drive.

func (*Client) SharedDriveDeleteByLabel

func (c *Client) SharedDriveDeleteByLabel(sharedDriveLabel string) error

SharedDriveDeleteByLabel deletes a shared drive.

func (*Client) SharedDriveDetachInstanceArray added in v2.2.9

func (c *Client) SharedDriveDetachInstanceArray(sharedDriveID int, instanceArrayID int) (*SharedDrive, error)

func (*Client) SharedDriveEdit

func (c *Client) SharedDriveEdit(sharedDriveID int, sharedDriveOperation SharedDriveOperation) (*SharedDrive, error)

SharedDriveEdit alters a deployed drive array. Requires deploy.

func (*Client) SharedDriveEditByLabel

func (c *Client) SharedDriveEditByLabel(sharedDriveLabel string, sharedDriveOperation SharedDriveOperation) (*SharedDrive, error)

SharedDriveEditByLabel alters a deployed drive array. Requires deploy.

func (*Client) SharedDriveGet

func (c *Client) SharedDriveGet(sharedDriveID int) (*SharedDrive, error)

SharedDriveGet Retrieves a shared drive

func (*Client) SharedDriveGetByLabel

func (c *Client) SharedDriveGetByLabel(sharedDriveLabel string) (*SharedDrive, error)

SharedDriveGetByLabel Retrieves a shared drive

func (*Client) SharedDrives added in v2.2.8

func (c *Client) SharedDrives(infrastructureID int) (*map[string]SharedDrive, error)

SharedDrives retrieves the list of shared drives of an infrastructure

func (*Client) StageDefinitionCreate

func (c *Client) StageDefinitionCreate(stageDefinition StageDefinition) (*StageDefinition, error)

StageDefinitionCreate creates a stageDefinition

func (*Client) StageDefinitionDelete

func (c *Client) StageDefinitionDelete(stageDefinitionID int) error

StageDefinitionDelete Permanently destroys a StageDefinition.

func (*Client) StageDefinitionGet

func (c *Client) StageDefinitionGet(stageDefinitionID int) (*StageDefinition, error)

StageDefinitionGet returns a StageDefinition specified by nStageDefinitionID. The stageDefinition's protected value is never returned.

func (*Client) StageDefinitionUpdate

func (c *Client) StageDefinitionUpdate(stageDefinitionID int, stageDefinition StageDefinition) (*StageDefinition, error)

StageDefinitionUpdate This function allows updating the stageDefinition_usage, stageDefinition_label and stageDefinition_base64 of a StageDefinition

func (*Client) StageDefinitions

func (c *Client) StageDefinitions() (*map[string]StageDefinition, error)

StageDefinitions retrieves a list of all the StageDefinition objects which a specified User is allowed to see through ownership or delegation. The stageDefinition objects never return the actual protected stageDefinition value.

func (*Client) SubnetPoolCreate

func (c *Client) SubnetPoolCreate(subnetPool SubnetPool) (*SubnetPool, error)

SubnetPoolCreate creates a new SubnetPool.

func (*Client) SubnetPoolDelete

func (c *Client) SubnetPoolDelete(subnetPoolID int) error

SubnetPoolDelete deletes the specified SubnetPool

func (*Client) SubnetPoolGet

func (c *Client) SubnetPoolGet(subnetPoolID int) (*SubnetPool, error)

SubnetPoolGet retrieves information regarding a specified SubnetPool.

func (*Client) SubnetPoolPrefixSizesStats

func (c *Client) SubnetPoolPrefixSizesStats(subnetPoolID int) (*SubnetPoolUtilization, error)

SubnetPoolPrefixSizesStats retrieves information regarding the utilization of a specified SubnetPool.

func (*Client) SubnetPoolSearch

func (c *Client) SubnetPoolSearch(filter string) (*[]SubnetPool, error)

SubnetPoolSearch retrieves all switch devices registered in the database with the specified filter

func (*Client) SubnetPools

func (c *Client) SubnetPools() (*[]SubnetPool, error)

SubnetPools retrieves all switch devices registered in the database.

func (*Client) SwitchDeviceCreate

func (c *Client) SwitchDeviceCreate(switchDevice SwitchDevice, bOverwriteWithHostnameFromFetchedSwitch bool) (*SwitchDevice, error)

SwitchDeviceCreate Creates a record for a new SwitchDevice.

func (*Client) SwitchDeviceDelete

func (c *Client) SwitchDeviceDelete(networkEquipmentID int) error

SwitchDeviceDelete deletes a specified switch device and its registered interfaces.

func (*Client) SwitchDeviceGet

func (c *Client) SwitchDeviceGet(networkEquipmentID int, decryptPasswd bool) (*SwitchDevice, error)

SwitchDeviceGet Retrieves information regarding a specified SwitchDevice.

func (*Client) SwitchDeviceGetByIdentifierString

func (c *Client) SwitchDeviceGetByIdentifierString(networkEquipmentIdentifierString string, decryptPasswd bool) (*SwitchDevice, error)

SwitchDeviceGetByIdentifierString Retrieves information regarding a specified SwitchDevice by identifier string.

func (*Client) SwitchDeviceUpdate

func (c *Client) SwitchDeviceUpdate(networkEquipmentID int, switchDevice SwitchDevice, bOverwriteWithHostnameFromFetchedSwitch bool) (*SwitchDevice, error)

SwitchDeviceUpdate updates an existing switch configuration

func (*Client) SwitchDevices

func (c *Client) SwitchDevices(datacenter string, switchType string) (*map[string]SwitchDevice, error)

SwitchDevices retrieves all switch devices registered in the database.

func (*Client) SwitchDevicesInDatacenter

func (c *Client) SwitchDevicesInDatacenter(datacenter string) (*map[string]SwitchDevice, error)

SwitchDevicesInDatacenter retrieves all switch devices in a datacenter

func (*Client) UserEmailToUserID

func (c *Client) UserEmailToUserID(userEmail string) (*int, error)

UserEmailToUserID returns the user id of an user given an email

func (*Client) UserGet

func (c *Client) UserGet(userID int) (*User, error)

UserGet describes returns user account specifications.

func (*Client) UserGetByEmail

func (c *Client) UserGetByEmail(userLabel string) (*User, error)

UserGetByEmail describes returns user account specifications.

func (*Client) VariableCreate

func (c *Client) VariableCreate(variable Variable) (*Variable, error)

VariableCreate creates a variable object

func (*Client) VariableDelete

func (c *Client) VariableDelete(variableID int) error

VariableDelete permanently destroys a Variable.

func (*Client) VariableGet

func (c *Client) VariableGet(variableID int) (*Variable, error)

VariableGet returns a Variable specified by nVariableID. The Variable's protected value is never returned.

func (*Client) VariableUpdate

func (c *Client) VariableUpdate(variableID int, variable Variable) (*Variable, error)

VariableUpdate updates a variable

func (*Client) Variables

func (c *Client) Variables(usage string) (*map[string]Variable, error)

Variables retrieves a list of all the Variable objects which a specified User is allowed to see through ownership or delegation. The Variable objects never return the actual protected Variable value.

func (*Client) VolumeTemplateCreateFromDrive

func (c *Client) VolumeTemplateCreateFromDrive(driveID int, objVolumeTemplate VolumeTemplate) (*VolumeTemplate, error)

VolumeTemplateCreateFromDrive creates a private volume template from a drive

func (*Client) VolumeTemplateCreateFromDriveByLabel

func (c *Client) VolumeTemplateCreateFromDriveByLabel(driveLabel string, objVolumeTemplate VolumeTemplate) (*VolumeTemplate, error)

VolumeTemplateCreateFromDriveByLabel creates a private volume template from a drive

func (*Client) VolumeTemplateGet

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

VolumeTemplateGet returns the specified volume template

func (*Client) VolumeTemplateGetByLabel

func (c *Client) VolumeTemplateGetByLabel(volumeTemplateLabel string) (*VolumeTemplate, error)

VolumeTemplateGetByLabel returns the specified volume template

func (*Client) VolumeTemplateMakePrivate

func (c *Client) VolumeTemplateMakePrivate(volumeTemplateID int, userID int) error

VolumeTemplateMakePrivate makes a template private

func (*Client) VolumeTemplateMakePublic

func (c *Client) VolumeTemplateMakePublic(volumeTemplateID int) error

VolumeTemplateMakePublic makes a template public

func (*Client) VolumeTemplates

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

VolumeTemplates retrives the list of available templates

func (*Client) WorkflowCreate

func (c *Client) WorkflowCreate(workflow Workflow) (*Workflow, error)

WorkflowCreate creates a workflow

func (*Client) WorkflowDelete

func (c *Client) WorkflowDelete(workflowID int) error

WorkflowDelete Permanently destroys a Workflow.

func (*Client) WorkflowGet

func (c *Client) WorkflowGet(workflowID int) (*Workflow, error)

WorkflowGet returns a Workflow specified by nWorkflowID. The workflow's protected value is never returned.

func (*Client) WorkflowMoveAsNewRunLevel

func (c *Client) WorkflowMoveAsNewRunLevel(workflowID int, stageDefinitionID int, sourceRunLevel int, destinationRunLevel int) error

WorkflowMoveAsNewRunLevel moves a stage in this workflow from a runlevel to another

func (*Client) WorkflowMoveIntoRunLevel

func (c *Client) WorkflowMoveIntoRunLevel(workflowID int, stageDefinitionID int, sourceRunLevel int, destinationRunLevel int) error

WorkflowMoveIntoRunLevel moves a stage in this workflow from a runlevel to another

func (*Client) WorkflowStageAddAsNewRunLevel

func (c *Client) WorkflowStageAddAsNewRunLevel(workflowID int, stageDefinitionID int, destinationRunLevel int) error

WorkflowStageAddAsNewRunLevel adds a new stage in this workflow

func (*Client) WorkflowStageAddIntoRunLevel

func (c *Client) WorkflowStageAddIntoRunLevel(workflowID int, stageDefinitionID int, destinationRunLevel int) error

WorkflowStageAddIntoRunLevel adds a new stage in this workflow

func (*Client) WorkflowStageDelete

func (c *Client) WorkflowStageDelete(workflowStageID int) error

WorkflowStageDelete deletes a stage from a workflow entirelly

func (*Client) WorkflowStageGet

func (c *Client) WorkflowStageGet(workflowStageID int) (*WorkflowStageDefinitionReference, error)

WorkflowStageGet returns a StageDefinition specified by workflowStageID.

func (*Client) WorkflowStages

func (c *Client) WorkflowStages(workflowID int) (*[]WorkflowStageDefinitionReference, error)

WorkflowStages retrieves a list of all the StageDefinitions objects in this workflow

func (*Client) WorkflowUpdate

func (c *Client) WorkflowUpdate(workflowID int, workflow Workflow) (*Workflow, error)

WorkflowUpdate This function allows updating the workflow_usage, workflow_label and workflow_base64 of a Workflow

func (*Client) Workflows

func (c *Client) Workflows() (*map[string]Workflow, error)

Workflows retrieves a list of all the Workflow objects which a specified User is allowed to see through ownership or delegation.

func (*Client) WorkflowsWithUsage

func (c *Client) WorkflowsWithUsage(usage string) (*map[string]Workflow, error)

WorkflowsWithUsage retrieves a list of all the Workflow objects which the current User is allowed to see through ownership or delegation with a specific usage.

type Copy

type Copy struct {
	Source                     interface{}         `json:"source,omitempty"`
	Destination                SCPResourceLocation `json:"destination,omitempty"`
	TimeoutMinutes             int                 `json:"timeoutMinutes,omitempty"`
	IfDestinationAlreadyExists string              `json:"ifDestinationAlreadyExists,omitempty"`
	Type                       string              `json:"type,omitempty"`
}

Copy defines the source and destination of a SCP operation. The source may be of various types. SCP and HTTP requests are streamed so they are recommended as sources. The destination has to be a SCP resource.

type Datacenter

type Datacenter struct {
	DatacenterID               int               `json:"datacenter_id,omitempty" yaml:"id,omitempty"`
	DatacenterName             string            `json:"datacenter_name,omitempty" yaml:"name,omitempty"`
	DatacenterNameParent       string            `json:"datacenter_name_parent,omitempty" yaml:"parentName,omitempty"`
	UserID                     int               `json:"user_id,omitempty" yaml:"userid,omitempty"`
	DatacenterDisplayName      string            `json:"datacenter_display_name,omitempty" yaml:"displayname,omitempty"`
	DatacenterIsMaster         bool              `json:"datacenter_is_master,omitempty" yaml:"ismaster,omitempty"`
	DatacenterIsMaintenance    bool              `json:"datacenter_is_maintenance,omitempty" yaml:"ismaintenance,omitempty"`
	DatacenterType             string            `json:"datacenter_type,omitempty" yaml:"type,omitempty"`
	DatacenterCreatedTimestamp string            `json:"datacenter_created_timestamp,omitempty" yaml:"createdtimestamp,omitempty"`
	DatacenterUpdatedTimestamp string            `json:"datacenter_updated_timestamp,omitempty" yaml:"updatedtimestamp,omitempty"`
	DatacenterHidden           bool              `json:"datacenter_hidden,omitempty" yaml:"ishidden,omitempty"`
	DatacenterTags             []string          `json:"datacenter_tags,omitempty" yaml:"tags,omitempty"`
	DatacenterConfig           *DatacenterConfig `json:"datacenter_config_json,omitempty" yaml:"config,omitempty"`
}

Datacenter - datacenter description

func (Datacenter) CreateOrUpdate

func (dc Datacenter) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (Datacenter) Delete

func (dc Datacenter) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (Datacenter) Validate

func (dc Datacenter) Validate() error

Validate implements interface Applier

type DatacenterConfig

type DatacenterConfig struct {
	BSIMachinesSubnetIPv4CIDR                          string                 `json:"BSIMachinesSubnetIPv4CIDR,omitempty" yaml:"BSIMachinesSubnetIPv4CIDR,omitempty"`
	BSIVRRPListenIPv4                                  string                 `json:"BSIVRRPListenIPv4,omitempty" yaml:"BSIVRRPListenIPv4,omitempty"`
	BSIMachineListenIPv4List                           []string               `json:"BSIMachineListenIPv4List,omitempty" yaml:"BSIMachineListenIPv4List,omitempty"`
	BSIExternallyVisibleIPv4                           string                 `json:"BSIExternallyVisibleIPv4,omitempty" yaml:"BSIExternallyVisibleIPv4,omitempty"`
	RepoURLRoot                                        string                 `json:"repoURLRoot,omitempty" yaml:"repoURLRoot,omitempty"`
	RepoURLRootQuarantineNetwork                       string                 `json:"repoURLRootQuarantineNetwork,omitempty" yaml:"repoURLRootQuarantineNetwork,omitempty"`
	SANRoutedSubnet                                    string                 `json:"SANRoutedSubnet,omitempty" yaml:"SANRoutedSubnet,omitempty"`
	NTPServers                                         []string               `json:"NTPServers,omitempty" yaml:"NTPServers,omitempty"`
	DNSServers                                         []string               `json:"DNSServers,omitempty" yaml:"DNSServers,omitempty"`
	KMS                                                string                 `json:"KMS,omitempty" yaml:"KMS,omitempty"`
	TFTPServerWANVRRPListenIPv4                        string                 `json:"TFTPServerWANVRRPListenIPv4,omitempty" yaml:"TFTPServerWANVRRPListenIPv4,omitempty"`
	DataLakeEnabled                                    bool                   `json:"dataLakeEnabled" yaml:"dataLakeEnabled"`
	MonitoringGraphitePlainTextSocketHost              string                 `json:"monitoringGraphitePlainTextSocketHost,omitempty" yaml:"monitoringGraphitePlainTextSocketHost,omitempty"`
	MonitoringGraphiteRenderURLHost                    string                 `json:"monitoringGraphiteRenderURLHost,omitempty" yaml:"monitoringGraphiteRenderURLHost,omitempty"`
	Latitude                                           float64                `json:"latitude,omitempty" yaml:"latitude,omitempty"`
	Longitude                                          float64                `json:"longitude,omitempty" yaml:"longitude,omitempty"`
	Address                                            string                 `json:"address,omitempty" yaml:"address,omitempty"`
	ServerRegisterUsingGeneratedIPMICredentialsEnabled bool                   `json:"serverRegisterUsingGeneratedIPMICredentialsEnabled" yaml:"serverRegisterUsingGeneratedIPMICredentialsEnabled"`
	DatacenterNetworksLayer2Only                       bool                   `json:"datacenterNetworkIsLayer2Only" yaml:"datacenterNetworkIsLayer2Only"`
	SwitchProvisioner                                  map[string]interface{} `json:"switchProvisioner,omitempty" yaml:"switchProvisioner,omitempty"`
	EnableTenantAccessToIPMI                           bool                   `json:"enableTenantAccessToIPMI" yaml:"enableTenantAccessToIPMI"`
	AllowVLANOverrides                                 bool                   `json:"allowVLANOverrides" yaml:"allowVLANOverrides"`
	ExtraInternalIPsPerSubnet                          int                    `json:"extraInternalIPsPerSubnet" yaml:"extraInternalIPsPerSubnet"`
	ServerRAIDConfigurationEnabled                     bool                   `json:"serverRAIDConfigurationEnabled" yaml:"serverRAIDConfigurationEnabled"`
	WebProxy                                           *WebProxy              `json:"webProxy" yaml:"webProxy"`
	IsKubernetesDeployment                             bool                   `json:"isKubernetesDeployment" yaml:"isKubernetesDeployment"`
}

DatacenterConfig - datacenter configuration

type DeployOptions added in v2.0.2

type DeployOptions struct {
	InstanceArrayMapping map[int]map[string]DeployOptionsServerTypeMappingObject `json:"instance_array"`
}

DeployOptions controls server allocation

type DeployOptionsServerTypeMappingObject added in v2.0.2

type DeployOptionsServerTypeMappingObject struct {
	ServerCount int   `json:"server_count"`
	ServerIDs   []int `json:"server_ids"`
}

DeployOptionsServerTypeMappingObject respresents one of the server type mappings

type Drive

type Drive struct {
	DriveID               int               `json:"drive_id,omitempty"`
	DriveLabel            string            `json:"drive_label,omitempty"`
	DriveSubdomain        string            `json:"drive_subdomain,omitempty"`
	DriveArrayID          int               `json:"drive_array_id,omitempty"`
	InstanceID            int               `json:"instance_id,omitempty"`
	DriveSizeMBytes       int               `json:"drive_size_mbytes,omitempty"`
	DriveStorageType      string            `json:"drive_storage_type,omitempty"`
	InfrastructureID      int               `json:"infrastructure_id,omitempty"`
	TemplateIDOrigin      int               `json:"template_id_origin,omitempty"`
	DriveCredentials      *DriveCredentials `json:"drive_credentials,omitempty"`
	DriveServiceStatus    string            `json:"drive_service_status,omitempty"`
	DriveCreatedTimestamp string            `json:"drive_created_timestamp,omitempty"`
	DriveUpdatedTimestamp string            `json:"drive_updated_timestamp,omitempty"`
	DriveOperatingSystem  *OperatingSystem  `json:"drive_operating_system,omitempty"`
	DriveFileSystem       *DriveFileSystem  `json:"drive_filesystem,omitempty"`
}

Drive represents a drive

type DriveArray

type DriveArray struct {
	DriveArrayID                      int                  `json:"drive_array_id,omitempty" yaml:"id,omitempty"`
	DriveArrayLabel                   string               `json:"drive_array_label,omitempty" yaml:"label,omitempty"`
	VolumeTemplateID                  int                  `json:"volume_template_id,omitempty" yaml:"volumeTemplateID,omitempty"`
	DriveArrayStorageType             string               `json:"drive_array_storage_type,omitempty" yaml:"storageType,omitempty"`
	DriveSizeMBytesDefault            int                  `json:"drive_size_mbytes_default,omitempty" yaml:"sizeMBytesDefault,omitempty"`
	InstanceArrayID                   int                  `json:"instance_array_id,omitempty" yaml:"instanceArrayID,omitempty"`
	InfrastructureID                  int                  `json:"infrastructure_id,omitempty" yaml:"infrastructureID,omitempty"`
	DriveArrayServiceStatus           string               `json:"drive_array_service_status,omitempty" yaml:"serviceStatus,omitempty"`
	DriveArrayCount                   int                  `json:"drive_array_count,omitempty" yaml:"count,omitempty"`
	DriveArrayExpandWithInstanceArray bool                 `json:"drive_array_expand_with_instance_array,omitempty" yaml:"expandWithInstanceArray,omitempty"`
	DriveArrayOperation               *DriveArrayOperation `json:"drive_array_operation,omitempty" yaml:"operation,omitempty"`
}

DriveArray represents a collection of identical drives

func (DriveArray) CreateOrUpdate

func (da DriveArray) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (DriveArray) Delete

func (da DriveArray) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (DriveArray) Validate

func (da DriveArray) Validate() error

Validate implements interface Applier

type DriveArrayOperation

type DriveArrayOperation struct {
	DriveArrayID                      int    `json:"drive_array_id,omitempty" yaml:"id,omitempty"`
	DriveArrayLabel                   string `json:"drive_array_label,omitempty" yaml:"label,omitempty"`
	VolumeTemplateID                  int    `json:"volume_template_id,omitempty" yaml:"volumeTemplateID,omitempty"`
	DriveArrayStorageType             string `json:"drive_array_storage_type,omitempty" yaml:"storageType,omitempty"`
	DriveSizeMBytesDefault            int    `json:"drive_size_mbytes_default,omitempty" yaml:"sizeMBytes,omitempty"`
	InstanceArrayID                   int    `json:"instance_array_id,omitempty" yaml:"instanceArrayID,omitempty"`
	InfrastructureID                  int    `json:"infrastructure_id,omitempty" yaml:"infrastructureID,omitempty"`
	DriveArrayCount                   int    `json:"drive_array_count,omitempty" yaml:"count,omitempty"`
	DriveArrayExpandWithInstanceArray bool   `json:"drive_array_expand_with_instance_array,omitempty" yaml:"expandWithInstanceArray,omitempty"`
	DriveArrayDeployType              string `json:"drive_array_deploy_type,omitempty" yaml:"deployType,omitempty"`
	DriveArrayDeployStatus            string `json:"drive_array_deploy_status,omitempty" yaml:"deployStatus,omitempty"`
	DriveArrayChangeID                int    `json:"drive_array_change_id,omitempty" yaml:"changeID,omitempty"`
}

DriveArrayOperation defines changes to be applied to a DriveArray

type DriveCredentials

type DriveCredentials struct {
	ISCSI ISCSI `json:"iscsi,omitempty"`
}

DriveCredentials credentials to connect to the drive

type DriveFileSystem

type DriveFileSystem struct {
	DriveFilesystemType           string `json:"drive_filesystem_type,omitempty"`
	DriveFilesystemBlockSizeBytes int    `json:"drive_filesystem_block_size_bytes,omitempty"`
	DriveFilesystemMountPath      string `json:"drive_filesystem_mount_path,omitempty"`
}

DriveFileSystem filesystem details

type FirewallRule

type FirewallRule struct {
	FirewallRuleDescription                    string `json:"firewall_rule_description,omitempty" yaml:"description,omitempty"`
	FirewallRulePortRangeStart                 int    `json:"firewall_rule_port_range_start,omitempty" yaml:"portRangeStart,omitempty"`
	FirewallRulePortRangeEnd                   int    `json:"firewall_rule_port_range_end,omitempty" yaml:"portRangeEnd,omitempty"`
	FirewallRuleSourceIPAddressRangeStart      string `json:"firewall_rule_source_ip_address_range_start,omitempty" yaml:"sourceIPAddressRangeStart,omitempty"`
	FirewallRuleSourceIPAddressRangeEnd        string `json:"firewall_rule_source_ip_address_range_end,omitempty" yaml:"sourceIPAddressRangeEnd,omitempty"`
	FirewallRuleDestinationIPAddressRangeStart string `json:"firewall_rule_destination_ip_address_range_start,omitempty" yaml:"destinationIPAddressRangeStart,omitempty"`
	FirewallRuleDestinationIPAddressRangeEnd   string `json:"firewall_rule_destination_ip_address_range_end,omitempty" yaml:"destinationIPAddressRangeEnd,omitempty"`
	FirewallRuleProtocol                       string `json:"firewall_rule_protocol,omitempty" yaml:"protocol,omitempty"`
	FirewallRuleIPAddressType                  string `json:"firewall_rule_ip_address_type,omitempty" yaml:"IPAddressType,omitempty"`
	FirewallRuleEnabled                        bool   `json:"firewall_rule_enabled,omitempty" yaml:"enabled,omitempty"`
}

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

type HTTPRequest

type HTTPRequest struct {
	URL     string              `json:"url,omitempty"`
	Options WebFetchAAPIOptions `json:"options,omitempty"`
	Type    string              `json:"type,omitempty"`
}

HTTPRequest represents an HTTP request definition compatible with the standard Web Fetch API.

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 IDRAC

type IDRAC struct {
	ControlPanelURL string `json:"control_panel_url,omitempty"`
	Username        string `json:"username,omitempty"`
	InitialPassword string `json:"initial_password,omitempty"`
}

IDRAC control panel credentials.

type ILO

type ILO struct {
	ControlPanelURL string `json:"control_panel_url,omitempty"`
	Username        string `json:"username,omitempty"`
	InitialPassword string `json:"initial_password,omitempty"`
}

ILO control panel credentials

type IP

type IP struct {
	IPID                       int         `json:"ip_id,omitempty"`
	IPType                     string      `json:"ip_type,omitempty"`
	IPHumanReadable            string      `json:"ip_human_readable,omitempty"`
	IPHex                      string      `json:"ip_hex,omitempty"`
	IPLeaseExpires             string      `json:"ip_lease_expires,omitempty"`
	IPOperation                IPOperation `json:"ip_operation,omitempty"`
	SubnetID                   int         `json:"subnet_id,omitempty"`
	SubnetDestination          string      `json:"subnet_destination,omitempty"`
	SubnetGatewayHumanReadable string      `json:"subnet_gateway_human_readable,omitempty"`
	SubnetNetmaskHumanReadable string      `json:"subnet_netmask_human_readable,omitempty"`
	InstanceInterfaceID        int         `json:"instance_interface_id,omitempty"`
	IPChangeID                 int         `json:"ip_change_id,omitempty"`
}

IP object contains information regarding an IP address.

type IPMI

type IPMI struct {
	IPAddress       string `json:"ip_address,omitempty"`
	Version         string `json:"version,omitempty"`
	Username        string `json:"username,omitempty"`
	InitialPassword string `json:"initial_password,omitempty"`
}

IPMI credentials.

type IPOperation

type IPOperation struct {
	InstanceInterfaceID int    `json:"instance_interface_id,omitempty"`
	IPDeployStatus      string `json:"ip_deploy_status,omitempty"`
	IPDeployType        string `json:"ip_deploy_type,omitempty"`
	IPID                int    `json:"ip_id,omitempty"`
	IPType              string `json:"ip_type,omitempty"`
	IPHumanReadable     string `json:"ip_human_readable,omitempty"`
	IPHex               string `json:"ip_hex,omitempty"`
	IPLabel             string `json:"ip_label,omitempty"`
	IPSubdomain         string `json:"ip_subdomain,omitempty"`
	IPLeaseExpires      string `json:"ip_lease_expires,omitempty"`
	IPUpdatedTimestamp  string `json:"ip_updated_timestamp,omitempty"`
	SubnetID            int    `json:"subnet_id,omitempty"`
	IPChangeID          int    `json:"ip_change_id,omitempty"`
}

IPOperation contains information regarding the changes that are to be made to a product. Edit and deploy functions have to be called in order to apply the changes. The operation type and status are unique to each operation object.

type ISCSI

type ISCSI struct {
	TargetIQN        string `json:"target_iqn,omitempty" yaml:"targetIQN,omitempty"`
	StorageIPAddress string `json:"storage_ip_address,omitempty" yaml:"storageIPAddress,omitempty"`
	StoragePort      int    `json:"storage_port,omitempty" yaml:"storagePort,omitempty"`
	LunID            int    `json:"lun_id,omitempty" yaml:"LunID,omitempty"`
}

ISCSI provides target IQN, IP address, port number and the LUN ID.

type ISCSIInitiator

type ISCSIInitiator struct {
	Username           string `json:"username,omitempty"`
	Password           string `json:"password,omitempty"`
	InitiatorIQN       string `json:"initiator_iqn,omitempty"`
	Gateway            string `json:"gateway,omitempty"`
	Netmask            string `json:"netmask,omitempty"`
	InitiatorIPAddress string `json:"initiator_ip_address,omitempty"`
}

ISCSIInitiator provides initiator IQN, username and password and other iSCSI connection details.

type Infrastructure

type Infrastructure struct {
	InfrastructureID                   int                     `json:"infrastructure_id,omitempty" yaml:"id,omitempty"`
	InfrastructureLabel                string                  `json:"infrastructure_label" yaml:"label"`
	DatacenterName                     string                  `json:"datacenter_name" yaml:"datacenter"`
	InfrastructureSubdomain            string                  `json:"infrastructure_subdomain,omitempty" yaml:"subdomain,omitempty"`
	UserIDowner                        int                     `json:"user_id_owner,omitempty" yaml:"ownerID,omitempty"`
	UserEmailOwner                     string                  `json:"user_email_owner,omitempty" yaml:"ownerEmail,omitempty"`
	InfrastructureTouchUnixtime        string                  `json:"infrastructure_touch_unixtime,omitempty" yaml:"touchUnixTime,omitempty"`
	InfrastructureServiceStatus        string                  `json:"infrastructure_service_status,omitempty" yaml:"serviceStatus,omitempty"`
	InfrastructureCreatedTimestamp     string                  `json:"infrastructure_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	InfrastructureUpdatedTimestamp     string                  `json:"infrastructure_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
	InfrastructureChangeID             int                     `json:"infrastructure_change_id,omitempty" yaml:"changeID,omitempty"`
	InfrastructureDeployID             int                     `json:"infrastructure_deploy_id,omitempty" yaml:"deployID,omitempty"`
	InfrastructureDesignIsLocked       bool                    `json:"infrastructure_design_is_locked,omitempty" yaml:"designIsLocked,omitempty"`
	InfrastructureOperation            InfrastructureOperation `json:"infrastructure_operation,omitempty" yaml:"operation,omitempty"`
	InfrastructureExperimentalPriority string                  `json:"infrastructure_experimental_priority,omitempty"`
}

Infrastructure - the main infrastructure object

func (Infrastructure) CreateOrUpdate

func (i Infrastructure) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (Infrastructure) Delete

func (i Infrastructure) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (Infrastructure) Validate

func (i Infrastructure) Validate() error

Validate implements interface Applier

type InfrastructureOperation

type InfrastructureOperation struct {
	InfrastructureID               int    `json:"infrastructure_id,omitempty" yaml:"id,omitempty"`
	InfrastructureLabel            string `json:"infrastructure_label" yaml:"label"`
	DatacenterName                 string `json:"datacenter_name" yaml:"datacenter"`
	InfrastructureDeployStatus     string `json:"infrastructure_deploy_status,omitempty" yaml:"deployStatus,omitempty"`
	InfrastructureDeployType       string `json:"infrastructure_deploy_type,omitempty" yaml:"deployType,omitempty"`
	InfrastructureSubdomain        string `json:"infrastructure_subdomain,omitempty" yaml:"subdomain,omitempty"`
	UserIDOwner                    int    `json:"user_id_owner,omitempty" yaml:"ownerID,omitempty"`
	InfrastructureUpdatedTimestamp string `json:"infrastructure_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
	InfrastructureChangeID         int    `json:"infrastructure_change_id,omitempty" yaml:"changeID,omitempty"`
	InfrastructureDeployID         int    `json:"infrastructure_deploy_id,omitempty" yaml:"deployID,omitempty"`
}

InfrastructureOperation - object with alternations to be applied

type Instance

type Instance struct {
	InstanceID                 int                 `json:"instance_id,omitempty"`
	InstanceLabel              string              `json:"instance_label,omitempty"`
	InstanceSubdomain          string              `json:"instance_subdomain,omitempty"`
	InstanceSubdomainPermanent string              `json:"instance_subdomain_permanent,omitempty"`
	InstanceArrayID            int                 `json:"instance_array_id,omitempty"`
	ServerID                   int                 `json:"server_id,omitempty"`
	ServerTypeID               int                 `json:"server_type_id,omitempty"`
	InstanceServiceStatus      string              `json:"instance_service_status,omitempty"`
	InstanceCredentials        InstanceCredentials `json:"instance_credentials,omitempty"`
	InstanceOperation          InstanceOperation   `json:"instance_operation,omitempty"`
	InstanceInterfaces         []InstanceInterface `json:"instance_interfaces,omitempty"`
	InstanceCreatedTimestamp   string              `json:"instance_created_timestamp,omitempty"`
	InstanceUpdatedTimestamp   string              `json:"instance_updated_timestamp,omitempty"`
	DriveIDBootable            int                 `json:"drive_id_bootable,omitempty"`
	InstanceChangeID           int                 `json:"instance_change_id,omitempty"`
	TemplateIDOrigin           int                 `json:"template_id_origin,omitempty"`
}

Instance object describes an instance

type InstanceArray

type InstanceArray struct {
	InstanceArrayID                    int                      `json:"instance_array_id,omitempty" yaml:"instanceID,omitempty"`
	InstanceArrayLabel                 string                   `json:"instance_array_label,omitempty" yaml:"label,omitempty"`
	InstanceArraySubdomain             string                   `json:"instance_array_subdomain,omitempty" yaml:"subdomain,omitempty"`
	InstanceArrayBootMethod            string                   `json:"instance_array_boot_method,omitempty" yaml:"bootMethod,omitempty"`
	InstanceArrayInstanceCount         int                      `json:"instance_array_instance_count" yaml:"instanceCount"`
	InstanceArrayRAMGbytes             int                      `json:"instance_array_ram_gbytes,omitempty" yaml:"ramGBytes,omitempty"`
	InstanceArrayProcessorCount        int                      `json:"instance_array_processor_count" yaml:"processorCount"`
	InstanceArrayProcessorCoreMHZ      int                      `json:"instance_array_processor_core_mhz,omitempty" yaml:"processorCoreMhz,omitempty"`
	InstanceArrayProcessorCoreCount    int                      `json:"instance_array_processor_core_count" yaml:"processorCoreCount"`
	InstanceArrayDiskCount             int                      `json:"instance_array_disk_count" yaml:"diskCount"`
	InstanceArrayDiskSizeMBytes        int                      `json:"instance_array_disk_size_mbytes,omitempty" yaml:"diskSizeMBytes,omitempty"`
	InstanceArrayDiskTypes             []string                 `json:"instance_array_disk_types,omitempty" yaml:"diskTypes,omitempty"`
	InfrastructureID                   int                      `json:"infrastructure_id,omitempty" yaml:"infrastructureID,omitempty"`
	InstanceArrayServiceStatus         string                   `json:"instance_array_service_status,omitempty" yaml:"serviceStatus,omitempty"`
	InstanceArrayInterfaces            []InstanceArrayInterface `json:"instance_array_interfaces,omitempty" yaml:"interfaces,omitempty"`
	ClusterID                          int                      `json:"cluster_id,omitempty" yaml:"clusterID,omitempty"`
	ClusterRoleGroup                   string                   `json:"cluster_role_group,omitempty" yaml:"clusterRoleGroup,omitempty"`
	InstanceArrayFirewallManaged       bool                     `json:"instance_array_firewall_managed" yaml:"firewallManaged,omitempty"`
	InstanceArrayFirewallRules         []FirewallRule           `json:"instance_array_firewall_rules,omitempty" yaml:"firewallRules,omitempty"`
	VolumeTemplateID                   int                      `json:"volume_template_id,omitempty" yaml:"volumeTemplateID,omitempty"`
	InstanceArrayOperation             *InstanceArrayOperation  `json:"instance_array_operation,omitempty" yaml:"operation,omitempty"`
	InstanceArrayAdditionalWanIPv4JSON string                   `json:"instance_array_additional_wan_ipv4_json,omitempty" yaml:"additionalWanIPv4,omitempty"`
}

InstanceArray object describes a collection of identical instances

func (InstanceArray) CreateOrUpdate

func (ia InstanceArray) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (InstanceArray) Delete

func (ia InstanceArray) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (InstanceArray) Validate

func (ia InstanceArray) Validate() error

Validate implements interface Applier

type InstanceArrayInterface

type InstanceArrayInterface struct {
	InstanceArrayInterfaceLabel            string                           `json:"instance_array_interface_label,omitempty" yaml:"label,omitempty"`
	InstanceArrayInterfaceSubdomain        string                           `json:"instance_array_interface_subdomain,omitempty" yaml:"subdomain,omitempty"`
	InstanceArrayInterfaceID               int                              `json:"instance_array_interface_id,omitempty" yaml:"id,omitempty"`
	InstanceArrayID                        int                              `json:"instance_array_id,omitempty" yaml:"instanceArrayID,omitempty"`
	NetworkID                              int                              `json:"network_id,omitempty" yaml:"networkID,omitempty"`
	InstanceArrayInterfaceLAGGIndexes      []interface{}                    `json:"instance_array_interface_lagg_indexes,omitempty" yaml:"LAGGIndexes,omitempty"`
	InstanceArrayInterfaceIndex            int                              `json:"instance_array_interface_index,omitempty" yaml:"index,omitempty"`
	InstanceArrayInterfaceServiceStatus    string                           `json:"instance_array_interface_service_status,omitempty" yaml:"serviceStatus,omitempty"`
	InstanceArrayInterfaceCreatedTimestamp string                           `json:"instance_array_interface_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	InstanceArrayInterfaceUpdatedTimestamp string                           `json:"instance_array_interface_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
	InstanceArrayInterfaceOperation        *InstanceArrayInterfaceOperation `json:"instance_array_interface_operation,omitempty" yaml:"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" yaml:"label,omitempty"`
	InstanceArrayInterfaceSubdomain        string        `json:"instance_array_interface_subdomain,omitempty" yaml:"subdomain,omitempty"`
	InstanceArrayInterfaceID               int           `json:"instance_array_interface_id,omitempty" yaml:"id,omitempty"`
	InstanceArrayID                        int           `json:"instance_array_id,omitempty" yaml:"instanceArrayID,omitempty"`
	NetworkID                              int           `json:"network_id,omitempty" yaml:"networkID,omitempty"`
	InstanceArrayInterfaceLAGGIndexes      []interface{} `json:"instance_array_interface_lagg_indexes,omitempty" yaml:"LAGGIndexes,omitempty"`
	InstanceArrayInterfaceIndex            int           `json:"instance_array_interface_index,omitempty" yaml:"index,omitempty"`
	InstanceArrayInterfaceServiceStatus    string        `json:"instance_array_interface_service_status,omitempty" yaml:"serviceStatus,omitempty"`
	InstanceArrayInterfaceCreatedTimestamp string        `json:"instance_array_interface_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	InstanceArrayInterfaceUpdatedTimestamp string        `json:"instance_array_interface_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
	InstanceArrayInterfaceChangeID         int           `json:"instance_array_interface_change_id,omitempty" yaml:"changeID,omitempty"`
}

InstanceArrayInterfaceOperation describes changes to a network array interface

type InstanceArrayOperation

type InstanceArrayOperation struct {
	InstanceArrayID                    int                               `json:"instance_array_id,omitempty" yaml:"id,omitempty"`
	InstanceArrayLabel                 string                            `json:"instance_array_label,omitempty" yaml:"label,omitempty"`
	InstanceArraySubdomain             string                            `json:"instance_array_subdomain,omitempty" yaml:"subdomain,omitempty"`
	InstanceArrayBootMethod            string                            `json:"instance_array_boot_method,omitempty" yaml:"bootMethod,omitempty"`
	InstanceArrayInstanceCount         int                               `json:"instance_array_instance_count" yaml:"instanceCount"`
	InstanceArrayRAMGbytes             int                               `json:"instance_array_ram_gbytes,omitempty" yaml:"ramGBytes,omitempty"`
	InstanceArrayProcessorCount        int                               `json:"instance_array_processor_count" yaml:"processorCount"`
	InstanceArrayProcessorCoreMHZ      int                               `json:"instance_array_processor_core_mhz,omitempty" yaml:"processorCoreMhz,omitempty"`
	InstanceArrayProcessorCoreCount    int                               `json:"instance_array_processor_core_count" yaml:"processorCoreCount"`
	InstanceArrayDiskCount             int                               `json:"instance_array_disk_count" yaml:"diskCount"`
	InstanceArrayDiskSizeMBytes        int                               `json:"instance_array_disk_size_mbytes,omitempty" yaml:"diskSizeMBytes,omitempty"`
	InstanceArrayDiskTypes             []string                          `json:"instance_array_disk_types,omitempty" yaml:"diskTypes,omitempty"`
	InstanceArrayServiceStatus         string                            `json:"instance_array_service_status,omitempty" yaml:"serviceStatus,omitempty"`
	InstanceArrayInterfaces            []InstanceArrayInterfaceOperation `json:"instance_array_interfaces,omitempty" yaml:"interfaces,omitempty"`
	ClusterID                          int                               `json:"cluster_id,omitempty" yaml:"clusterID,omitempty"`
	ClusterRoleGroup                   string                            `json:"cluster_role_group,omitempty" yaml:"clusterRoleGroup,omitempty"`
	InstanceArrayFirewallManaged       bool                              `json:"instance_array_firewall_managed" yaml:"firewallManaged,omitempty"`
	InstanceArrayFirewallRules         []FirewallRule                    `json:"instance_array_firewall_rules,omitempty" yaml:"firewallRules,omitempty"`
	VolumeTemplateID                   int                               `json:"volume_template_id,omitempty" yaml:"volumeTemplateID,omitempty"`
	InstanceArrayDeployType            string                            `json:"instance_array_deploy_type,omitempty" yaml:"deployType,omitempty"`
	InstanceArrayDeployStatus          string                            `json:"instance_array_deploy_status,omitempty" yaml:"deployStatus,omitempty"`
	InstanceArrayChangeID              int                               `json:"instance_array_change_id,omitempty" yaml:"changeID,omitempty"`
	InstanceArrayAdditionalWanIPv4JSON string                            `json:"instance_array_additional_wan_ipv4_json,omitempty" yaml:"additionalWanIPv4,omitempty"`
}

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

type InstanceCredentials

type InstanceCredentials struct {
	SSH                *SSH            `json:"ssh,omitempty"`
	RDP                *RDP            `json:"rdp,omitempty"`
	IPMI               *IPMI           `json:"ipmi,omitempty"`
	ILO                *ILO            `json:"ilo,omitempty"`
	IDRAC              *IDRAC          `json:"idrac,omitempty"`
	ISCSI              *ISCSIInitiator `json:"iscsi,omitempty"`
	RemoteConsole      *RemoteConsole  `json:"remote_console,omitempty"`
	IPAddressesPublic  []IP            `json:"ip_addresses_public,omitempty"`
	IPAddressesPrivate []IP            `json:"ip_addresses_private,omitempty"`
	SharedDrives       map[string]ISCSI
}

InstanceCredentials contains information needed to connect to the server via IPMI, iLO etc.

func (*InstanceCredentials) UnmarshalJSON

func (b *InstanceCredentials) UnmarshalJSON(data []byte) error

UnmarshalJSON custom InstanceCredentials unmarshaling

type InstanceInterface

type InstanceInterface struct {
	InstanceInterfaceLabel         string                     `json:"instance_interface_label,omitempty"`
	InstanceInterfaceSubdomain     string                     `json:"instance_interface_subdomain,omitempty"`
	InstanceInterfaceID            int                        `json:"instance_interface_id,omitempty"`
	InstanceID                     int                        `json:"instance_id,omitempty"`
	NetworkID                      int                        `json:"network_id,omitempty"`
	InstanceInterfaceLaggIndexes   []string                   `json:"instance_interface_lagg_indexes,omitempty"`
	InstanceInterfaceIndex         int                        `json:"instance_interface_index,omitempty"`
	InstanceInterfaceCapacityMbps  int                        `json:"instance_interface_capacity_mbps,omitempty"`
	InstanceInterfaceServiceStatus string                     `json:"instance_interface_service_status,omitempty"`
	ServerInterface                ServerInterface            `json:"server_interface,omitempty"`
	InstanceInterfaceOperation     InstanceInterfaceOperation `json:"instance_interface_operation,omitempty"`
	InstanceInterfaceIPs           []IP                       `json:"instance_interface_ips,omitempty"`
	InstanceInterfaceChangeID      int                        `json:"instance_interface_change_id,omitempty"`
}

InstanceInterface objects are created automatically when instances are created. Subnets are added on networks and then IP addresses are associated automatically or manually through the API to instance interfaces.

type InstanceInterfaceOperation

type InstanceInterfaceOperation struct {
	InstanceInterfaceLabel        string   `json:"instance_interface_label,omitempty"`
	InstanceInterfaceSubdomain    string   `json:"instance_interface_subdomain,omitempty"`
	InstanceInterfaceDeployStatus string   `json:"instance_interface_deploy_status,omitempty"`
	InstanceInterfaceDeployType   string   `json:"instance_interface_deploy_type,omitempty"`
	InstanceInterfaceID           int      `json:"instance_interface_id,omitempty"`
	InstanceID                    int      `json:"instance_id,omitempty"`
	NetworkID                     int      `json:"network_id,omitempty"`
	InstanceInterfaceLaggIndexes  []string `json:"instance_interface_lagg_indexes,omitempty"`
	InstanceInterfaceIndex        int      `json:"instance_interface_index,omitempty"`
	InstanceInterfaceCapacityMbps int      `json:"instance_interface_capacity_mbps,omitempty"`
	InstanceInterfaceChangeID     int      `json:"instance_interface_change_id,omitempty"`
}

InstanceInterfaceOperation objects are created automatically when instances are created. Subnets are added on networks and then IP addresses are associated automatically or manually through the API to instance interfaces.

type InstanceOperation

type InstanceOperation struct {
	InstanceID                 int    `json:"instance_id,omitempty"`
	InstanceDeployType         string `json:"instance_deploy_type,omitempty"`
	InstanceDeployStatus       string `json:"instance_deploy_status,omitempty"`
	InstanceLabel              string `json:"instance_label,omitempty"`
	InstanceSubdomain          string `json:"instance_subdomain,omitempty"`
	InstanceSubdomainPermanent string `json:"instance_subdomain_permanent,omitempty"`
	InstanceArrayID            int    `json:"instance_array_id,omitempty"`
	ServerID                   int    `json:"server_id,omitempty"`
	ServerTypeID               int    `json:"server_type_id,omitempty"`
	InstanceChangeID           int    `json:"instance_change_id,omitempty"`
	TemplateIDOrigin           int    `json:"template_id_origin,omitempty"`
}

InstanceOperation contains information regarding the changes that are to be made to a product. Edit and deploy functions have to be called in order to apply the changes. The operation type and status are unique to each operation object.

type MetalCloudClient

type MetalCloudClient interface {
	//Datacenters returns datacenters for all users
	Datacenters(onlyActive bool) (*map[string]Datacenter, error)
	//DatacentersByUserID returns datacenters for specific user
	DatacentersByUserID(userID int, onlyActive bool) (*map[string]Datacenter, error)
	//DatacentersByUserEmail returns datacenters by email
	DatacentersByUserEmail(userEmail string, onlyActive bool) (*map[string]Datacenter, error)
	//DatacenterGet returns details of a specific datacenter
	DatacenterGet(datacenterName string) (*Datacenter, error)
	//DatacenterGetForUserByEmail returns details of a specific datacenter
	DatacenterGetForUserByEmail(datacenterName string, userID string) (*Datacenter, error)
	//DatacenterGetForUserByID returns details of a specific datacenter
	DatacenterGetForUserByID(datacenterName string, userID int) (*Datacenter, error)
	//DatacenterConfigGet returns details of a specific datacenter
	DatacenterConfigGet(datacenterName string) (*DatacenterConfig, error)
	//DatacenterConfigUpdate Updates configuration information for a specified Datacenter.
	DatacenterConfigUpdate(datacenterName string, datacenterConfig DatacenterConfig) error
	//DatacenterCreate creates a new Datacenter
	DatacenterCreate(datacenter Datacenter, datacenterConfig DatacenterConfig) (*Datacenter, error)
	//DatacenterAgentsConfigJSONDownloadURL returns the agent url (and automatically decrypts it)
	DatacenterAgentsConfigJSONDownloadURL(datacenterName string, decrypt bool) (string, error)
	//DriveArrays retrieves the list of drives arrays of an infrastructure
	DriveArrays(infrastructureID int) (*map[string]DriveArray, error)
	//DriveArraysByLabel retrieves the list of drives arrays of an infrastructure
	DriveArraysByLabel(infrastructureLabel string) (*map[string]DriveArray, error)
	//DriveArrayGet retrieves a DriveArray object with specified ids
	DriveArrayGet(driveArrayID int) (*DriveArray, error)
	//DriveArrayGetByLabel retrieves a DriveArray object with specified ids
	DriveArrayGetByLabel(driveArrayLabel string) (*DriveArray, error)
	//DriveArrayCreate creates a drive array. Requires deploy.
	DriveArrayCreate(infrastructureID int, driveArray DriveArray) (*DriveArray, error)
	//DriveArrayCreateByLabel creates a drive array. Requires deploy.
	DriveArrayCreateByLabel(infrastructureLabel string, driveArray DriveArray) (*DriveArray, error)
	//DriveArrayEdit alters a deployed drive array. Requires deploy.
	DriveArrayEdit(driveArrayID int, driveArrayOperation DriveArrayOperation) (*DriveArray, error)
	//DriveArrayEditByLabel alters a deployed drive array. Requires deploy.
	DriveArrayEditByLabel(driveArrayLabel string, driveArrayOperation DriveArrayOperation) (*DriveArray, error)
	//DriveArrayDelete deletes a Drive Array with specified id
	DriveArrayDelete(driveArrayID int) error
	//DriveArrayDeleteByLabel deletes a Drive Array with specified id
	DriveArrayDeleteByLabel(driveArrayLabel string) error
	//DriveArrayDrives returns the drives of a drive array
	DriveArrayDrives(driveArray int) (*map[string]Drive, error)
	//DriveArrayDrivesByLabel returns the drives of a drive array
	DriveArrayDrivesByLabel(driveArrLabel string) (*map[string]Drive, error)
	//DriveSnapshotCreate creates a drive snapshot
	DriveSnapshotCreate(driveID int) (*Snapshot, error)
	//DriveSnapshotDelete creates a drive snapshot
	DriveSnapshotDelete(driveSnapshotID int) error
	//DriveSnapshotRollback rolls a Drive back to a specified DriveSnapshot. The specified snapshot is not destroyed and can be reused.
	DriveSnapshotRollback(driveSnapshotID int) error
	//DriveSnapshotGet gets a drive snapshot
	DriveSnapshotGet(driveSnapshotID int) (*Snapshot, error)
	//DriveSnapshots retrieves a list of all the snapshot objects
	DriveSnapshots(driveID int) (*map[string]Snapshot, error)
	//InfrastructureCreate creates an infrastructure
	InfrastructureCreate(infrastructure Infrastructure) (*Infrastructure, error)
	//Infrastructures returns a list of infrastructures
	Infrastructures() (*map[string]Infrastructure, error)
	//InfrastructureEdit alters an infrastructure
	InfrastructureEdit(infrastructureID int, infrastructureOperation InfrastructureOperation) (*Infrastructure, error)
	//InfrastructureEditByLabel alters an infrastructure
	InfrastructureEditByLabel(infrastructureLabel string, infrastructureOperation InfrastructureOperation) (*Infrastructure, error)
	//InfrastructureDelete deletes an infrastructure and all associated elements. Requires deploy
	InfrastructureDelete(infrastructureID int) error
	//InfrastructureDeleteByLabel deletes an infrastructure and all associated elements. Requires deploy
	InfrastructureDeleteByLabel(infrastructureLabel string) error
	//InfrastructureOperationCancel reverts (undos) alterations done before deploy
	InfrastructureOperationCancel(infrastructureID int) error
	//InfrastructureOperationCancelByLabel reverts (undos) alterations done before deploy
	InfrastructureOperationCancelByLabel(infrastructureLabel string) error
	//InfrastructureDeploy initiates a deploy operation that will apply all registered changes for the respective infrastructure
	InfrastructureDeploy(infrastructureID int, shutdownOptions ShutdownOptions, allowDataLoss bool, skipAnsible bool) error
	//InfrastructureDeployByLabel initiates a deploy operation that will apply all registered changes for the respective infrastructure
	InfrastructureDeployByLabel(infrastructureLabel string, shutdownOptions ShutdownOptions, allowDataLoss bool, skipAnsible bool) error
	//InfrastructureDeployWithOptions initiates a deploy operation that will apply all registered changes for the respective infrastructure. With options.
	InfrastructureDeployWithOptions(infrastructureID int, shutdownOptions ShutdownOptions, deployOptions *DeployOptions, allowDataLoss bool, skipAnsible bool) error
	//InfrastructureDeployWithOptionsByLabel initiates a deploy operation that will apply all registered changes for the respective infrastructure. With options.
	InfrastructureDeployWithOptionsByLabel(infrastructureLabel string, shutdownOptions ShutdownOptions, deployOptions *DeployOptions, allowDataLoss bool, skipAnsible bool) error
	//InfrastructureGet returns a specific infrastructure by id
	InfrastructureGet(infrastructureID int) (*Infrastructure, error)
	//InfrastructureGetByLabel returns a specific infrastructure by id
	InfrastructureGetByLabel(infrastructureLabel string) (*Infrastructure, error)
	//InfrastructureUserLimits returns user metadata
	InfrastructureUserLimits(infrastructureID int) (*map[string]interface{}, error)
	//InfrastructureUserLimitsByLabel returns user metadata
	InfrastructureUserLimitsByLabel(infrastructureLabel string) (*map[string]interface{}, error)
	//InstanceArrayInterfaceAttachNetwork attaches an InstanceArrayInterface to a Network
	InstanceArrayInterfaceAttachNetwork(instanceArrayID int, instanceArrayInterfaceIndex int, networkID int) (*InstanceArray, error)
	//InstanceArrayInterfaceDetach detaches an InstanceArrayInterface from any Network element that is attached to.
	InstanceArrayInterfaceDetach(instanceArrayID int, instanceArrayInterfaceIndex int) (*InstanceArray, error)
	//InstanceArrayGet returns an InstanceArray with specified id
	InstanceArrayGet(instanceArrayID int) (*InstanceArray, error)
	//InstanceArrayGetByLabel returns an InstanceArray with specified id
	InstanceArrayGetByLabel(instanceArrayLabel string) (*InstanceArray, error)
	//InstanceArrays returns list of instance arrays of specified infrastructure
	InstanceArrays(infrastructureID int) (*map[string]InstanceArray, error)
	//InstanceArraysByLabel returns list of instance arrays of specified infrastructure
	InstanceArraysByLabel(infrastructureLabel string) (*map[string]InstanceArray, error)
	//InstanceArrayCreate creates an instance array (colletion of identical instances). Requires Deploy.
	InstanceArrayCreate(infrastructureID int, instanceArray InstanceArray) (*InstanceArray, error)
	//InstanceArrayCreateByLabel creates an instance array (colletion of identical instances). Requires Deploy.
	InstanceArrayCreateByLabel(infrastructureLabel string, instanceArray InstanceArray) (*InstanceArray, error)
	//InstanceArrayEdit alterns a deployed instance array. Requires deploy.
	InstanceArrayEdit(instanceArrayID int, instanceArrayOperation InstanceArrayOperation, bSwapExistingInstancesHardware *bool, bKeepDetachingDrives *bool, objServerTypeMatches *ServerTypeMatches, arrInstancesToBeDeleted *[]int) (*InstanceArray, error)
	//InstanceArrayEditByLabel alterns a deployed instance array. Requires deploy.
	InstanceArrayEditByLabel(instanceArrayLabel string, instanceArrayOperation InstanceArrayOperation, bSwapExistingInstancesHardware *bool, bKeepDetachingDrives *bool, objServerTypeMatches *ServerTypeMatches, arrInstancesToBeDeleted *[]int) (*InstanceArray, error)
	//InstanceArrayDelete deletes an instance array. Requires deploy.
	InstanceArrayDelete(instanceArrayID int) error
	//InstanceArrayDeleteByLabel deletes an instance array. Requires deploy.
	InstanceArrayDeleteByLabel(instanceArrayLabel string) error
	//InstanceArrayStop stops a specified InstanceArray.
	InstanceArrayStop(instanceArrayID int) (*InstanceArray, error)
	//InstanceArrayStopByLabel stops a specified InstanceArray.
	InstanceArrayStopByLabel(instanceArrayLabel string) (*InstanceArray, error)
	//InstanceArrayStart starts a specified InstanceArray.
	InstanceArrayStart(instanceArrayID int) (*InstanceArray, error)
	//InstanceArrayStartByLabel starts a specified InstanceArray.
	InstanceArrayStartByLabel(instanceArrayLabel string) (*InstanceArray, error)
	//InstanceArrayInstances retrieves a list of all the Instance objects associated with a specified InstanceArray.
	InstanceArrayInstances(instanceArrayID int) (*map[string]Instance, error)
	//InstanceArrayInstancesByLabel retrieves a list of all the Instance objects associated with a specified InstanceArray.
	InstanceArrayInstancesByLabel(instanceArrayLabel string) (*map[string]Instance, error)
	//InstanceGet returns a specific instance by id
	InstanceGet(instanceID int) (*Instance, error)
	//InstanceGetByLabel returns a specific instance by id
	InstanceGetByLabel(instanceLabel string) (*Instance, error)
	//InstanceServerPowerSet reboots or powers on an instance
	InstanceServerPowerSet(instanceID int, operation string) error
	//InstanceServerPowerSetByLabel reboots or powers on an instance
	InstanceServerPowerSetByLabel(instanceLabel string, operation string) error
	//InstanceServerPowerGet returns the power status of an instance
	InstanceServerPowerGet(instanceID int) (*string, error)
	//InstanceServerPowerGetByLabel returns the power status of an instance
	InstanceServerPowerGetByLabel(instanceLabel string) (*string, error)
	//InstanceServerPowerGetBatch returns the power status of multiple instances
	InstanceServerPowerGetBatch(infrastructureID int, instanceIDs []int) (*map[string]string, error)
	//InstanceServerPowerGetBatchByLabel returns the power status of multiple instances
	InstanceServerPowerGetBatchByLabel(infrastructureLabel string, instanceIDs []int) (*map[string]string, error)
	//GetUserEmail returns the user configured for this connection
	GetUserEmail() string
	//GetEndpoint returns the endpoint configured for this connection
	GetEndpoint() string
	//GetUserID returns the ID of the user extracted from the API key
	GetUserID() int
	//NetworkGet retrieves a network object
	NetworkGet(networkID int) (*Network, error)
	//NetworkGetByLabel retrieves a network object
	NetworkGetByLabel(networkLabel string) (*Network, error)
	//Networks returns a list of all network objects of an infrastructure
	Networks(infrastructureID int) (*map[string]Network, error)
	//NetworksByLabel returns a list of all network objects of an infrastructure
	NetworksByLabel(infrastructureLabel string) (*map[string]Network, error)
	//NetworkCreate creates a network
	NetworkCreate(infrastructureID int, network Network) (*Network, error)
	//NetworkCreateByLabel creates a network
	NetworkCreateByLabel(infrastructureLabel string, network Network) (*Network, error)
	//NetworkEdit applies a change to an existing network
	NetworkEdit(networkID int, networkOperation NetworkOperation) (*Network, error)
	//NetworkEditByLabel applies a change to an existing network
	NetworkEditByLabel(networkLabel string, networkOperation NetworkOperation) (*Network, error)
	//NetworkDelete deletes a network.
	NetworkDelete(networkID int) error
	//NetworkDeleteByLabel deletes a network.
	NetworkDeleteByLabel(networkLabel string) error
	//NetworkJoin merges two specified Network objects.
	NetworkJoin(networkID int, networkToBeDeletedID int) error
	//NetworkJoinByLabel merges two specified Network objects.
	NetworkJoinByLabel(networkLabel string, networkToBeDeletedID int) error
	//OSAssetCreate creates a osAsset object
	OSAssetCreate(osAsset OSAsset) (*OSAsset, error)
	//OSAssetDelete permanently destroys a OSAsset.
	OSAssetDelete(osAssetID int) error
	//OSAssetUpdate updates a osAsset
	OSAssetUpdate(osAssetID int, osAsset OSAsset) (*OSAsset, error)
	//OSAssetGet returns a OSAsset specified by nOSAssetID. The OSAsset's protected value is never returned.
	OSAssetGet(osAssetID int) (*OSAsset, error)
	//OSAssets retrieves a list of all the OSAsset objects which a specified User is allowed to see through ownership or delegation. The OSAsset objects never return the actual protected OSAsset value.
	OSAssets() (*map[string]OSAsset, error)
	//OSAssetMakePublic makes an OS Asset public
	OSAssetMakePublic(osAssetID int) (*OSAsset, error)
	//OSAssetMakePrivate makes an OS Asset private and owned by the current user
	OSAssetMakePrivate(osAssetID int, userID int) (*OSAsset, error)
	//OSTemplateCreate creates a osTemplate object
	OSTemplateCreate(osTemplate OSTemplate) (*OSTemplate, error)
	//OSTemplateDelete permanently destroys a OSTemplate.
	OSTemplateDelete(osTemplateID int) error
	//OSTemplateUpdate updates a osTemplate
	OSTemplateUpdate(osTemplateID int, osTemplate OSTemplate) (*OSTemplate, error)
	//OSTemplateGet returns a OSTemplate specified by nOSTemplateID. The OSTemplate's protected value is never returned.
	OSTemplateGet(osTemplateID int, decryptPasswd bool) (*OSTemplate, error)
	//OSTemplates retrieves a list of all the OSTemplate objects which a specified User is allowed to see through ownership or delegation. The OSTemplate objects never return the actual protected OSTemplate value.
	OSTemplates() (*map[string]OSTemplate, error)
	//OSTemplateOSAssets returns the OSAssets assigned to an OSTemplate.
	OSTemplateOSAssets(osTemplateID int) (*map[string]OSTemplateOSAssetData, error)
	//OSTemplateAddOSAsset adds an asset to a template
	OSTemplateAddOSAsset(osTemplateID int, osAssetID int, path string, variablesJSON string) error
	//OSTemplateRemoveOSAsset removes an asset from a template
	OSTemplateRemoveOSAsset(osTemplateID int, osAssetID int) error
	//OSTemplateUpdateOSAssetPath updates an asset mapping
	OSTemplateUpdateOSAssetPath(osTemplateID int, osAssetID int, path string) error
	//OSTemplateUpdateOSAssetVariables updates an asset variable
	OSTemplateUpdateOSAssetVariables(osTemplateID int, osAssetID int, variablesJSON string) error
	//OSTemplateMakePublic makes a template public
	OSTemplateMakePublic(osTemplateID int) error
	//OSTemplateMakePrivate makes a template private
	OSTemplateMakePrivate(osTemplateID int, userID int) error
	//SecretCreate creates a secret
	SecretCreate(secret Secret) (*Secret, error)
	//SecretDelete Permanently destroys a Secret.
	SecretDelete(secretID int) error
	//SecretUpdate This function allows updating the secret_usage, secret_label and secret_base64 of a Secret
	SecretUpdate(secretID int, secret Secret) (*Secret, error)
	//SecretGet returns a Secret specified by nSecretID. The secret's protected value is never returned.
	SecretGet(secretID int) (*Secret, error)
	//Secrets retrieves a list of all the Secret objects which a specified User is allowed to see through ownership or delegation. The secret objects never return the actual protected secret value.
	Secrets(usage string) (*map[string]Secret, error)
	//ServersSearch searches for servers matching certain filter
	ServersSearch(filter string) (*[]ServerSearchResult, error)
	//ServerGetByUUID retrieves information about a specified Server by using the server's UUID
	ServerGetByUUID(serverUUID string, decryptPasswd bool) (*Server, error)
	//ServerGet returns a server's details
	ServerGet(serverID int, decryptPasswd bool) (*Server, error)
	//ServerCreate manually creates a server record
	ServerCreate(server Server, autoGenerate bool) (int, error)
	//ServerEditComplete - perform a complete edit
	ServerEditComplete(serverID int, server Server) (*Server, error)
	//ServerEditIPMI - edit only IPMI settings
	ServerEditIPMI(serverID int, server Server) (*Server, error)
	//ServerEditAvailability - edit only server availability settings
	ServerEditAvailability(serverID int, server Server) (*Server, error)
	//ServerEdit edits a server record
	ServerEdit(serverID int, serverEditType string, server Server) (*Server, error)
	//ServerDelete deletes all the information about a specified Server.
	ServerDelete(serverID int, skipIPMI bool) error
	//ServerDecomission decomissions the server row and deletes all child rows.
	ServerDecomission(serverID int, skipIPMI bool) error
	//ServerFirmwareComponentUpgrade Creates a firmware upgrading session for the specified component.
	//If no strServerComponentFirmwareNewVersion or strFirmwareBinaryURL are provided the system will use the values from the database which should have been previously added
	ServerFirmwareComponentUpgrade(serverID int, serverComponentID int, serverComponentFirmwareNewVersion string, firmwareBinaryURL string) error
	//ServerFirmwareUpgrade creates a firmware upgrading session that affects all components from the specified server that have a target version set and are updatable.
	ServerFirmwareUpgrade(serverID int) error
	//ServerFirmwareComponentTargetVersionSet Sets a firmware target version for the upgrading process. The system will apply the upgrade at the next upgrading session.
	ServerFirmwareComponentTargetVersionSet(serverComponentID int, serverComponentFirmwareNewVersion string) error
	//ServerFirmwareComponentTargetVersionUpdate Updates for every component of the specified server the available firmware versions that can be used as target by the firmware upgrading process. The available versions are extracted from a vendor specific catalog.
	ServerFirmwareComponentTargetVersionUpdate(serverComponentID int) error
	//ServerFirmwareComponentTargetVersionAdd Adds a new available firmware version for a server component along with the url of the binary. If the version already exists the old url will be overwritten.
	ServerFirmwareComponentTargetVersionAdd(serverComponentID int, version string, firmareBinaryURL string) error
	//ServerComponentGet returns a server's component's details
	ServerComponentGet(serverComponentID int) (*ServerComponent, error)
	//ServerComponents searches for servers matching certain filter
	ServerComponents(serverID int, filter string) (*[]ServerComponent, error)
	//ServerPowerSet reboots or powers on a server
	ServerPowerSet(serverID int, operation string) 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.
	ServerTypesMatchHardwareConfiguration(datacenterName string, hardwareConfiguration HardwareConfiguration) (*map[int]ServerType, error)
	//ServerTypeDatacenter retrieves all the server type IDs for servers found in a specified Datacenter
	ServerTypeDatacenter(datacenterName string) (*[]int, error)
	//ServerTypes retrieves all ServerType objects from the database.
	ServerTypes(bOnlyAvailable bool) (*map[int]ServerType, error)
	//ServerTypesForDatacenter retrieves all ServerType objects from the database.
	ServerTypesForDatacenter(datacenterName string, bOnlyAvailable bool) (*map[int]ServerType, error)
	//ServerTypeGet retrieves a server type by id
	ServerTypeGet(serverTypeID int) (*ServerType, error)
	//ServerTypeGetByLabel retrieves a server type by id
	ServerTypeGetByLabel(serverTypeLabel string) (*ServerType, error)
	//ServerTypesMatches matches available servers with a certain Instance&#39;s configuration, using the properties specified in the objHardwareConfiguration object, and returns the number of compatible servers for each server_type_id.
	ServerTypesMatches(infrastructureID int, hardwareConfiguration HardwareConfiguration, instanceArrayID *int, bAllowServerSwap bool) (*map[string]ServerType, error)
	//ServerTypesMatchesByLabel matches available servers with a certain Instance&#39;s configuration, using the properties specified in the objHardwareConfiguration object, and returns the number of compatible servers for each server_type_id.
	ServerTypesMatchesByLabel(infrastructureLabel string, hardwareConfiguration HardwareConfiguration, instanceArrayID *int, bAllowServerSwap bool) (*map[string]ServerType, error)
	//SharedDriveCreate creates a shared drive array. Requires deploy.
	SharedDriveCreate(infrastructureID int, sharedDrive SharedDrive) (*SharedDrive, error)
	//SharedDriveCreateByLabel creates a shared drive array. Requires deploy.
	SharedDriveCreateByLabel(infrastructureLabel string, sharedDrive SharedDrive) (*SharedDrive, error)
	//SharedDriveGet Retrieves a shared drive
	SharedDriveGet(sharedDriveID int) (*SharedDrive, error)
	//SharedDriveGetByLabel Retrieves a shared drive
	SharedDriveGetByLabel(sharedDriveLabel string) (*SharedDrive, error)
	//SharedDriveEdit alters a deployed drive array. Requires deploy.
	SharedDriveEdit(sharedDriveID int, sharedDriveOperation SharedDriveOperation) (*SharedDrive, error)
	//SharedDriveEditByLabel alters a deployed drive array. Requires deploy.
	SharedDriveEditByLabel(sharedDriveLabel string, sharedDriveOperation SharedDriveOperation) (*SharedDrive, error)
	//SharedDriveDelete deletes a shared drive.
	SharedDriveDelete(sharedDriveID int) error
	//SharedDriveDeleteByLabel deletes a shared drive.
	SharedDriveDeleteByLabel(sharedDriveLabel string) error
	//StageDefinitionCreate creates a stageDefinition
	StageDefinitionCreate(stageDefinition StageDefinition) (*StageDefinition, error)
	//StageDefinitionDelete Permanently destroys a StageDefinition.
	StageDefinitionDelete(stageDefinitionID int) error
	//StageDefinitionUpdate This function allows updating the stageDefinition_usage, stageDefinition_label and stageDefinition_base64 of a StageDefinition
	StageDefinitionUpdate(stageDefinitionID int, stageDefinition StageDefinition) (*StageDefinition, error)
	//StageDefinitionGet returns a StageDefinition specified by nStageDefinitionID. The stageDefinition's protected value is never returned.
	StageDefinitionGet(stageDefinitionID int) (*StageDefinition, error)
	//StageDefinitions retrieves a list of all the StageDefinition objects which a specified User is allowed to see through ownership or delegation. The stageDefinition objects never return the actual protected stageDefinition value.
	StageDefinitions() (*map[string]StageDefinition, error)
	//SubnetPoolCreate creates a new SubnetPool.
	SubnetPoolCreate(subnetPool SubnetPool) (*SubnetPool, error)
	//SubnetPoolGet retrieves information regarding a specified SubnetPool.
	SubnetPoolGet(subnetPoolID int) (*SubnetPool, error)
	//SubnetPoolPrefixSizesStats retrieves information regarding the utilization of a specified SubnetPool.
	SubnetPoolPrefixSizesStats(subnetPoolID int) (*SubnetPoolUtilization, error)
	//SubnetPoolDelete deletes the specified SubnetPool
	SubnetPoolDelete(subnetPoolID int) error
	//SubnetPools retrieves all switch devices registered in the database.
	SubnetPools() (*[]SubnetPool, error)
	//SubnetPoolSearch retrieves all switch devices registered in the database with the specified filter
	SubnetPoolSearch(filter string) (*[]SubnetPool, error)
	//SwitchDeviceGet Retrieves information regarding a specified SwitchDevice.
	SwitchDeviceGet(networkEquipmentID int, decryptPasswd bool) (*SwitchDevice, error)
	//SwitchDeviceGetByIdentifierString Retrieves information regarding a specified SwitchDevice by identifier string.
	SwitchDeviceGetByIdentifierString(networkEquipmentIdentifierString string, decryptPasswd bool) (*SwitchDevice, error)
	//SwitchDeviceCreate Creates a record for a new SwitchDevice.
	SwitchDeviceCreate(switchDevice SwitchDevice, bOverwriteWithHostnameFromFetchedSwitch bool) (*SwitchDevice, error)
	//SwitchDeviceDelete deletes a specified switch device and its registered interfaces.
	SwitchDeviceDelete(networkEquipmentID int) error
	//SwitchDevices retrieves all switch devices registered in the database.
	SwitchDevices(datacenter string, switchType string) (*map[string]SwitchDevice, error)
	//SwitchDevicesInDatacenter retrieves all switch devices in a datacenter
	SwitchDevicesInDatacenter(datacenter string) (*map[string]SwitchDevice, error)
	//SwitchDeviceUpdate updates an existing switch configuration
	SwitchDeviceUpdate(networkEquipmentID int, switchDevice SwitchDevice, bOverwriteWithHostnameFromFetchedSwitch bool) (*SwitchDevice, error)
	//UserGet describes returns user account specifications.
	UserGet(userID int) (*User, error)
	//UserGetByEmail describes returns user account specifications.
	UserGetByEmail(userLabel string) (*User, error)
	//UserEmailToUserID returns the user id of an user given an email
	UserEmailToUserID(userEmail string) (*int, error)
	//VariableCreate creates a variable object
	VariableCreate(variable Variable) (*Variable, error)
	//VariableDelete permanently destroys a Variable.
	VariableDelete(variableID int) error
	//VariableUpdate updates a variable
	VariableUpdate(variableID int, variable Variable) (*Variable, error)
	//VariableGet returns a Variable specified by nVariableID. The Variable's protected value is never returned.
	VariableGet(variableID int) (*Variable, error)
	//Variables retrieves a list of all the Variable objects which a specified User is allowed to see through ownership or delegation. The Variable objects never return the actual protected Variable value.
	Variables(usage string) (*map[string]Variable, error)
	//VolumeTemplates retrives the list of available templates
	VolumeTemplates() (*map[string]VolumeTemplate, error)
	//VolumeTemplateMakePublic makes a template public
	VolumeTemplateMakePublic(volumeTemplateID int) error
	//VolumeTemplateMakePrivate makes a template private
	VolumeTemplateMakePrivate(volumeTemplateID int, userID int) error
	//VolumeTemplateGet returns the specified volume template
	VolumeTemplateGet(volumeTemplateID int) (*VolumeTemplate, error)
	//VolumeTemplateGetByLabel returns the specified volume template
	VolumeTemplateGetByLabel(volumeTemplateLabel string) (*VolumeTemplate, error)
	//VolumeTemplateCreateFromDrive creates a private volume template from a drive
	VolumeTemplateCreateFromDrive(driveID int, objVolumeTemplate VolumeTemplate) (*VolumeTemplate, error)
	//VolumeTemplateCreateFromDriveByLabel creates a private volume template from a drive
	VolumeTemplateCreateFromDriveByLabel(driveLabel string, objVolumeTemplate VolumeTemplate) (*VolumeTemplate, error)
	//WorkflowCreate creates a workflow
	WorkflowCreate(workflow Workflow) (*Workflow, error)
	//WorkflowDelete Permanently destroys a Workflow.
	WorkflowDelete(workflowID int) error
	//WorkflowUpdate This function allows updating the workflow_usage, workflow_label and workflow_base64 of a Workflow
	WorkflowUpdate(workflowID int, workflow Workflow) (*Workflow, error)
	//WorkflowGet returns a Workflow specified by nWorkflowID. The workflow's protected value is never returned.
	WorkflowGet(workflowID int) (*Workflow, error)
	//Workflows retrieves a list of all the Workflow objects which a specified User is allowed to see through ownership or delegation.
	Workflows() (*map[string]Workflow, error)
	//WorkflowsWithUsage retrieves a list of all the Workflow objects which the current User is allowed to see through ownership or delegation with a specific usage.
	WorkflowsWithUsage(usage string) (*map[string]Workflow, error)
	//WorkflowStages retrieves a list of all the StageDefinitions objects in this workflow
	WorkflowStages(workflowID int) (*[]WorkflowStageDefinitionReference, error)
	//WorkflowStageGet returns a StageDefinition specified by workflowStageID.
	WorkflowStageGet(workflowStageID int) (*WorkflowStageDefinitionReference, error)
	//WorkflowStageAddAsNewRunLevel adds a new stage in this workflow
	WorkflowStageAddAsNewRunLevel(workflowID int, stageDefinitionID int, destinationRunLevel int) error
	//WorkflowStageAddIntoRunLevel adds a new stage in this workflow
	WorkflowStageAddIntoRunLevel(workflowID int, stageDefinitionID int, destinationRunLevel int) error
	//WorkflowMoveAsNewRunLevel moves a stage in this workflow from a runlevel to another
	WorkflowMoveAsNewRunLevel(workflowID int, stageDefinitionID int, sourceRunLevel int, destinationRunLevel int) error
	//WorkflowMoveIntoRunLevel moves a stage in this workflow from a runlevel to another
	WorkflowMoveIntoRunLevel(workflowID int, stageDefinitionID int, sourceRunLevel int, destinationRunLevel int) error
	//WorkflowStageDelete deletes a stage from a workflow entirelly
	WorkflowStageDelete(workflowStageID int) error
	//InfrastructureDeployCustomStageAddIntoRunlevel adds a stage into a runlevel
	InfrastructureDeployCustomStageAddIntoRunlevel(infraID int, stageID int, runLevel int, stageRunMoment string) error
	//InfrastructureDeployCustomStageDeleteIntoRunlevel delete a stage into a runlevel
	InfrastructureDeployCustomStageDeleteIntoRunlevel(infraID int, stageID int, runLevel int, stageRunMoment string) error
	//InfrastructureDeployCustomStages retrieves a list of all the StageDefinition objects which a specified User is allowed to see through ownership or delegation. The stageDefinition objects never return the actual protected stageDefinition value.
	InfrastructureDeployCustomStages(infraID int, stageDefinitionType string) (*[]WorkflowStageAssociation, error)
}

MetalCloudClient interface used for mocking and abstracting the backend

type Network

type Network struct {
	NetworkID                 int               `json:"network_id,omitempty" yaml:"id,omitempty"`
	NetworkLabel              string            `json:"network_label,omitempty" yaml:"label,omitempty"`
	NetworkSubdomain          string            `json:"network_subdomain,omitempty" yaml:"subdomain,omitempty"`
	NetworkType               string            `json:"network_type,omitempty" yaml:"type,omitempty"`
	InfrastructureID          int               `json:"infrastructure_id,omitempty" yaml:"infrastructureID,omitempty"`
	NetworkCreatedTimestamp   string            `json:"network_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	NetworkUpdatedTimestamp   string            `json:"network_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
	NetworkLANAutoAllocateIPs bool              `json:"network_lan_autoallocate_ips,omitempty" yaml:"LANAutoAllocateIPs,omitempty"`
	NetworkOperation          *NetworkOperation `json:"network_operation,omitempty" yaml:"operation,omitempty"`
}

Network object describes an high level connection construct

func (Network) CreateOrUpdate

func (n Network) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (Network) Delete

func (n Network) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (Network) Validate

func (n Network) Validate() error

Validate implements interface Applier

type NetworkOperatingSystem added in v2.0.3

type NetworkOperatingSystem struct {
	OperatingSystemType            string `json:"operating_system_type,omitempty" yaml:"type,omitempty"`
	OperatingSystemVersion         string `json:"operating_system_version,omitempty" yaml:"version,omitempty"`
	OperatingSystemArchitecture    string `json:"operating_system_architecture,omitempty" yaml:"architecture,omitempty"`
	OperatingSystemVendor          string `json:"operating_system_vendor,omitempty" yaml:"vendor,omitempty"`
	OperatingSystemMachine         string `json:"operating_system_machine,omitempty" yaml:"machine,omitempty"`
	OperatingSystemMachineRevision string `json:"operating_system_machine_revision,omitempty" yaml:"revisionMachine,omitempty"`
}

type NetworkOperation

type NetworkOperation struct {
	NetworkID                 int    `json:"network_id,omitempty" yaml:"id,omitempty"`
	NetworkLabel              string `json:"network_label,omitempty" yaml:"label,omitempty"`
	NetworkSubdomain          string `json:"network_subdomain,omitempty" yaml:"subdomain,omitempty"`
	NetworkType               string `json:"network_type,omitempty" yaml:"type,omitempty"`
	InfrastructureID          int    `json:"infrastructure_id,omitempty" yaml:"infrastructureID,omitempty"`
	NetworkLANAutoAllocateIPs bool   `json:"network_lan_autoallocate_ips,omitempty" yaml:"LANAutoAllocateIPs,omitempty"`
	NetworkDeployType         string `json:"network_deploy_type,omitempty" yaml:"deployType,omitempty"`
	NetworkChangeID           int    `json:"network_change_id,omitempty" yaml:"changeID,omitempty"`
}

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

type OSAsset

type OSAsset struct {
	OSAssetID                    int      `json:"os_asset_id,omitempty" yaml:"id,omitempty"`
	UserIDOwner                  int      `json:"user_id_owner,omitempty" yaml:"ownerID,omitempty"`
	UserIDAuthenticated          int      `json:"user_id_authenticated,omitempty" yaml:"userIDAuthenticated,omitempty"`
	OSAssetFileName              string   `json:"os_asset_filename,omitempty" yaml:"fileName,omitempty"`
	OSAssetFileSizeBytes         int      `json:"os_asset_file_size_bytes,omitempty" yaml:"fileSizeBytes,omitempty"`
	OSAssetFileMime              string   `json:"os_asset_file_mime,omitempty" yaml:"fileMime,omitempty"`
	OSAssetContentsBase64        string   `json:"os_asset_contents_base64,omitempty" yaml:"contentBase64,omitempty"`
	OSAssetContentsSHA256Hex     string   `json:"os_asset_contents_sha256_hex,omitempty" yaml:"contentSHA256Hex,omitempty"`
	OSAssetUsage                 string   `json:"os_asset_usage,omitempty" yaml:"usage,omitempty"`
	OSAssetSourceURL             string   `json:"os_asset_source_url,omitempty" yaml:"sourceURL,omitempty"`
	OSAssetVariableNamesRequired []string `json:"os_asset_variable_names_required,omitempty" yaml:"variables,omitempty"`
	OSAssetTags                  []string `json:"os_asset_tags,omitempty" yaml:"tags,omitempty"`
	OSAssetCreatedTimestamp      string   `json:"os_asset_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	OSAssetUpdatedTimestamp      string   `json:"os_asset_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
}

OSAsset struct defines a server type

func (OSAsset) CreateOrUpdate

func (asset OSAsset) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (OSAsset) Delete

func (asset OSAsset) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (OSAsset) Validate

func (asset OSAsset) Validate() error

Validate implements interface Applier

type OSTemplate

type OSTemplate struct {
	VolumeTemplateID                      int                     `json:"volume_template_id,omitempty" yaml:"id,omitempty"`
	VolumeTemplateLabel                   string                  `json:"volume_template_label,omitempty" yaml:"label,omitempty"`
	VolumeTemplateDisplayName             string                  `json:"volume_template_display_name,omitempty" yaml:"name,omitempty"`
	VolumeTemplateSizeMBytes              int                     `json:"volume_template_size_mbytes,omitempty" yaml:"sizeMBytes,omitempty"`
	VolumeTemplateLocalDiskSupported      bool                    `json:"volume_template_local_disk_supported,omitempty" yaml:"localDisk,omitempty"`
	VolumeTemplateIsOSTemplate            bool                    `json:"volume_template_is_os_template,omitempty" yaml:"isOsTemplate,omitempty"`
	VolumeTemplateBootMethodsSupported    string                  `json:"volume_template_boot_methods_supported,omitempty" yaml:"bootMethods,omitempty"`
	VolumeTemplateOsBootstrapFunctionName string                  `json:"volume_template_os_bootstrap_function_name,omitempty"`
	VolumeTemplateBootType                string                  `json:"volume_template_boot_type,omitempty" yaml:"bootType,omitempty"`
	VolumeTemplateDescription             string                  `json:"volume_template_description,omitempty" yaml:"description,omitempty"`
	VolumeTemplateCreatedTimestamp        string                  `json:"volume_template_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	VolumeTemplateUpdatedTimestamp        string                  `json:"volume_template_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
	UserID                                int                     `json:"user_id,omitempty" yaml:"userID,omitempty"`
	VolumeTemplateOperatingSystem         *OperatingSystem        `json:"volume_template_operating_system,omitempty" yaml:"os,omitempty"`
	VolumeTemplateRepoURL                 string                  `json:"volume_template_repo_url,omitempty" yaml:"repoURL,omitempty"`
	VolumeTemplateDeprecationStatus       string                  `json:"volume_template_deprecation_status,omitempty" yaml:"deprecationStatus,omitempty"`
	OSTemplateCredentials                 *OSTemplateCredentials  `json:"os_template_credentials,omitempty" yaml:"credentials,omitempty"`
	VolumeTemplateTags                    []string                `json:"volume_template_tags,omitempty" yaml:"tags,omitempty"`
	OSTemplatePreBootArchitecture         string                  `json:"os_template_pre_boot_architecture,omitempty" yaml:"preBootArchitecture,omitempty"`
	OSAssetBootloaderLocalInstall         int                     `json:"os_asset_id_bootloader_local_install" yaml:"OSAssetIDBootloaderLocalInstall"`
	OSAssetBootloaderOSBoot               int                     `json:"os_asset_id_bootloader_os_boot" yaml:"OSAssetIDBootloaderOSBoot"`
	VolumeTemplateVariablesJSON           string                  `json:"volume_template_variables_json,omitempty" yaml:"variablesJSON,omitempty"`
	VolumeTemplateNetworkOperatingSystem  *NetworkOperatingSystem `json:"volume_template_network_operating_system,omitempty" yaml:"networkOS,omitempty"`
	VolumeTemplateVersion                 string                  `json:"volume_template_version,omitempty"`
}

OSTemplate A template can be created based on a drive and it has the same characteristics and holds the same information as the parent drive.

func (OSTemplate) CreateOrUpdate

func (t OSTemplate) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (OSTemplate) Delete

func (t OSTemplate) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (OSTemplate) Validate

func (t OSTemplate) Validate() error

Validate implements interface Applier

type OSTemplateCredentials

type OSTemplateCredentials struct {
	OSTemplateInitialUser                     string `json:"os_template_initial_user,omitempty" yaml:"initialUser,omitempty"`
	OSTemplateInitialPasswordEncrypted        string `json:"os_template_initial_password_encrypted,omitempty" yaml:"initialPasswordEncrypted,omitempty"`
	OSTemplateInitialPassword                 string `json:"os_template_initial_password,omitempty" yaml:"initialPassword,omitempty"`
	OSTemplateInitialSSHPort                  int    `json:"os_template_initial_ssh_port,omitempty" yaml:"initialSSHPort,omitempty"`
	OSTemplateChangePasswordAfterDeploy       bool   `json:"os_template_change_password_after_deploy,omitempty" yaml:"changePasswordAfterDeploy,omitempty"`
	OSTemplateUseAutogeneratedInitialPassword bool   `json:"os_template_use_autogenerated_initial_password,omitempty" yaml:"useAutogeneratedInitialPassword,omitempty"`
}

OSTemplateCredentials holds information needed to connect to an OS installed by an OSTemplate.

type OSTemplateOSAssetData

type OSTemplateOSAssetData struct {
	OSAsset                           *OSAsset `json:"os_asset,omitempty"`
	OSAssetFilePath                   string   `json:"os_asset_file_path,omitempty"`
	OSTemplateOSAssetUpdatedTimestamp string   `json:"volume_template_os_asset_updated_timestamp,omitempty"`
	OSTemplateOSAssetVariablesJSON    string   `json:"volume_template_os_asset_variables_json,omitempty"`
}

OSTemplateOSAssetData holds asset-template information

type OperatingSystem

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

OperatingSystem describes an OS

type RDP

type RDP struct {
	Port            int    `json:"port,omitempty"`
	Username        string `json:"username,omitempty"`
	InitialPassword string `json:"initial_password,omitempty"`
}

RDP credentials for the installed OS.

type RemoteConsole

type RemoteConsole struct {
	RemoteProtocol        string `json:"remote_protocol,omitempty"`
	TunnelPathURL         string `json:"tunnel_path_url,omitempty"`
	RemoteControlPanelURL string `json:"remote_control_panel_url,omitempty"`
}

RemoteConsole provides credentials needed to connect to the server via the HTML interface

type SCPResourceLocation

type SCPResourceLocation struct {
	Path      string           `json:"path,omitempty"`
	SSHTarget SSHClientOptions `json:"ssh_target,omitempty"`
}

SCPResourceLocation defines a file path and SSH client connection options for use with Secure Copy Protocol (SCP).

type SSH

type SSH struct {
	Port            int    `json:"port,omitempty"`
	Username        string `json:"username,omitempty"`
	InitialPassword string `json:"initial_password,omitempty"`
}

SSH credentials for the installed OS.

type SSHAlgorithms

type SSHAlgorithms struct {
	Kex           []string `json:"kex,omitempty"`
	Cipher        []string `json:"cipher,omitempty"`
	ServerHostKey []string `json:"serverHostKey,omitempty"`
	HMAC          []string `json:"hmac,omitempty"`
	Compress      []string `json:"compress,omitempty"`
}

SSHAlgorithms defines algorithms that can be used during an ssh session

type SSHClientOptions

type SSHClientOptions struct {
	Host         string        `json:"host,omitempty"`
	Port         int           `json:"port,omitempty"`
	ForceIPv4    bool          `json:"forceIPv4,omitempty"`
	ForceIPv6    bool          `json:"forceIPv6,omitempty"`
	HostHash     string        `json:"hostHash,omitempty"`
	HashedKey    string        `json:"hashedKey,omitempty"`
	Username     string        `json:"username,omitempty"`
	Password     string        `json:"password,omitempty"`
	PrivateKey   string        `json:"privateKey,omitempty"`
	Passphrase   string        `json:"passphrase,omitempty"`
	ReadyTimeout int           `json:"readyTimeout,omitempty"`
	StrictVendor bool          `json:"strictVendor,omitempty"`
	Algorithms   SSHAlgorithms `json:"algorithms,omitempty"`
	Compress     interface{}   `json:"compress,omitempty"`
}

SSHClientOptions defines an ssh cnnection such as the host, port, user, password, private keys, etc. All properties support template-like variables; for example, ${{instance_credentials_password}} may be used as value for the password property.

type SSHExec

type SSHExec struct {
	Command   string           `json:"command,omitempty"`
	SSHTarget SSHClientOptions `json:"ssh_target,omitempty"`
	Timeout   int              `json:"timeout,omitempty"`
	Type      string           `json:"type,omitempty"`
}

SSHExec executes a command on a remote server using the SSH exec functionality (not through a shell).

type SSHKey

type SSHKey struct {
	UserSSHKeyID               int    `json:"user_ssh_key_id,omitempty"`
	UserID                     int    `json:"user_id,omitempty"`
	UserSSHKey                 string `json:"user_ssh_key,omitempty"`
	UserSSHKeyCreatedTimeStamp string `json:"user_ssh_key_created_timestamp,omitempty"`
	UserSSHKeyStatus           string `json:"user_ssh_key_status,omitempty"`
}

SSHKey represents an SSH keys added by a user

type SearchResultForServerComponents

type SearchResultForServerComponents struct {
	DurationMilliseconds int               `json:"duration_millisecnds,omitempty"`
	Rows                 []ServerComponent `json:"rows,omitempty"`
	RowsOrder            [][]string        `json:"rows_order,omitempty"`
	RowsTotal            int               `json:"rows_total,omitempty"`
}

SearchResultForServerComponents describes a search result

type SearchResultForServers

type SearchResultForServers struct {
	DurationMilliseconds int                  `json:"duration_millisecnds,omitempty"`
	Rows                 []ServerSearchResult `json:"rows,omitempty"`
	RowsOrder            [][]string           `json:"rows_order,omitempty"`
	RowsTotal            int                  `json:"rows_total,omitempty"`
}

SearchResultForServers describes a serach result

type Secret

type Secret struct {
	SecretID               int    `json:"secret_id,omitempty" yaml:"id,omitempty"`
	UserIDOwner            int    `json:"user_id_owner,omitempty" yaml:"ownerID,omitempty"`
	UserIDAuthenticated    int    `json:"user_id_authenticated,omitempty" yaml:"userIDAuthenticated,omitempty"`
	SecretName             string `json:"secret_name,omitempty" yaml:"name,omitempty"`
	SecretUsage            string `json:"secret_usage,omitempty" yaml:"usage,omitempty"`
	SecretBase64           string `json:"secret_base64,omitempty" yaml:"base64,omitempty"`
	SecretCreatedTimestamp string `json:"secret_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	SecretUpdatedTimestamp string `json:"secret_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
}

Secret struct defines a server type

func (Secret) CreateOrUpdate

func (s Secret) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (Secret) Delete

func (s Secret) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (Secret) Validate

func (s Secret) Validate() error

Validate implements interface Applier

type Server

type Server struct {
	ServerID                       int                         `json:"server_id,omitempty" yaml:"id,omitempty"`
	ServerUUID                     string                      `json:"server_uuid,omitempty" yaml:"UUID,omitempty"`
	ServerStatus                   string                      `json:"server_status,omitempty" yaml:"status,omitempty"`
	ServerSerialNumber             string                      `json:"server_serial_number,omitempty" yaml:"serialNumber,omitempty"`
	ServerVendor                   string                      `json:"server_vendor,omitempty" yaml:"vendor,omitempty"`
	DatacenterName                 string                      `json:"datacenter_name,omitempty" yaml:"datacenter,omitempty"`
	ServerNetworkTotalCapacityMbps int                         `json:"server_network_total_capacity_mbps,omitempty" yaml:"networkTotalCapacityMbps,omitempty"`
	ServerBootType                 string                      `json:"server_boot_type,omitempty" yaml:"bootType,omitempty"`
	ServerPowerStatus              string                      `json:"server_power_status,omitempty" yaml:"powerStatus,omitempty"`
	ServerProcessorName            string                      `json:"server_processor_name,omitempty" yaml:"processorName,omitempty"`
	ServerProcessorCoreCount       int                         `json:"server_processor_core_count,omitempty" yaml:"processorCoreCount,omitempty"`
	ServerProcessorCoreMhz         int                         `json:"server_processor_core_mhz,omitempty" yaml:"processorCoreMhz,omitempty"`
	ServerProcessorCount           int                         `json:"server_processor_count,omitempty" yaml:"processorCount,omitempty"`
	ServerProcessorThreads         int                         `json:"server_processor_threads,omitempty" yaml:"processorThreads,omitempty"`
	ServerProcessorCPUMark         int                         `json:"server_processor_cpu_mark" yaml:"processorCPUMark"`
	ServerRAMGbytes                int                         `json:"server_ram_gbytes,omitempty" yaml:"ramGbytes,omitempty"`
	ServerDisks                    []ServerDisk                `json:"disk_collection,omitempty" yaml:"disks,omitempty"`
	ServerDiskCount                int                         `json:"server_disk_count,omitempty" yaml:"diskCount,omitempty"`
	ServerDiskSizeMbytes           int                         `json:"server_disk_size_mbytes,omitempty" yaml:"diskSizeMbytes,omitempty"`
	ServerDiskType                 string                      `json:"server_disk_type,omitempty" yaml:"diskType,omitempty"`
	ServerProductName              string                      `json:"server_product_name,omitempty" yaml:"productName,omitempty"`
	ServerClass                    string                      `json:"server_class,omitempty" yaml:"serverClass,omitempty"`
	ServerTypeID                   int                         `json:"server_type_id,omitempty" yaml:"serverTypeID,omitempty"`
	ServerInterfaces               []ServerInterface           `json:"server_interfaces,omitempty" yaml:"interfaces,omitempty"`
	ServerTags                     []string                    `json:"server_tags,omitempty" yaml:"tags,omitempty"`
	ServerIPMIChannel              int                         `json:"server_ipmi_channel" yaml:"IPMIChannel"`
	ServerIPMIHost                 string                      `json:"server_ipmi_host,omitempty" yaml:"IPMIHostname,omitempty"`
	ServerIPMInternalUsername      string                      `json:"server_ipmi_internal_username,omitempty" yaml:"IPMIUsername,omitempty"`
	ServerIPMInternalPassword      string                      `json:"server_ipmi_internal_password,omitempty" yaml:"IPMIPassword,omitempty"`
	ServerIPMCredentialsNeedUpdate bool                        `json:"server_ipmi_credentials_need_update,omitempty" yaml:"IPMICredentialsNeedUpdate,omitempty"`
	ServerVendorSKUID              string                      `json:"server_vendor_sku_id,omitempty" yaml:"vendorSKU,omitempty"`
	ServerComments                 string                      `json:"server_comments,omitempty" yaml:"comments,omitempty"`
	ServerBIOSInfoJSON             string                      `json:"server_bios_info_json" yaml:"BIOSInfoJson"`
	ServerCustomJSON               string                      `json:"server_custom_json" yaml:"CustomJSON"`
	NICDetails                     map[string]ServerNICDetails `json:"nic_details" yaml:"NICDetails"`
}

Server represents a server in a datacenter.

func (Server) CreateOrUpdate

func (s Server) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (Server) Delete

func (s Server) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (Server) Validate

func (s Server) Validate() error

Validate implements interface Applier

type ServerComponent

type ServerComponent struct {
	ServerComponentID                              int      `json:"server_component_id,omitempty" yaml:"id,omitempty"`
	ServerID                                       int      `json:"server_id,omitempty" yaml:"serverID,omitempty"`
	ServerComponentName                            string   `json:"server_component_name,omitempty" yaml:"componentName,omitempty"`
	ServerComponentFirmwareVersion                 string   `json:"server_component_firmware_version,omitempty" yaml:"firmwareVersion,omitempty"`
	ServerComponentFirmwareUpdateable              bool     `json:"server_component_firmware_updateable,omitempty" yaml:"firmwareUpdateable,omitempty"`
	ServerComponentFirmwareJSON                    string   `json:"server_component_firmware_json,omitempty" yaml:"firmwareJSON,omitempty"`
	ServerComponentFirmwareUpdateAvailableVersions []string `json:"server_component_firmware_update_available_versions,omitempty" yaml:"firmwareUpdateAvailableVersions,omitempty"`
	ServerComponentFirmwareStatus                  string   `json:"server_component_firmware_status,omitempty" yaml:"firmwareStatus,omitempty"`
	ServerComponentType                            string   `json:"server_component_type,omitempty" yaml:"type,omitempty"`
	ServerComponentFirmwareUpdateTimestamp         string   `json:"server_component_firmware_update_timestamp,omitempty" yaml:"firmwareUpdateTimestamp,omitempty"`
	ServerComponentFirmwareTargetVersion           string   `json:"server_component_firmware_target_version,omitempty" yaml:"firmwareTargetVersion,omitempty"`
	ServerComponentFirmwareScheduledTimestamp      string   `json:"server_component_firmware_scheduled_timestamp,omitempty" yaml:"firmwareScheduledTimestamp,omitempty"`
}

ServerComponent information about a server's components

type ServerDisk

type ServerDisk struct {
	ServerDiskID     int    `json:"server_disk_id,omitempty" yaml:"id,omitempty"`
	ServerDiskModel  string `json:"server_disk_model,omitempty" yaml:"model,omitempty"`
	ServerDiskType   string `json:"server_disk_type,omitempty" yaml:"type,omitempty"`
	ServerDiskVendor string `json:"server_disk_vendor,omitempty" yaml:"vendor,omitempty"`
	ServerDiskStatus string `json:"server_disk_status,omitempty" yaml:"status,omitempty"`
	ServerDiskSerial string `json:"server_disk_serial,omitempty" yaml:"serial_number,omitempty"`
	ServerDiskSizeGB int    `json:"server_disk_size_gb,omitempty" yaml:"sizeGB,omitempty"`
}

ServerDisk describes a disk

type ServerInterface

type ServerInterface struct {
	ServerInterfaceMACAddress string `json:"server_interface_mac_address,omitempty" yaml:"macAddress,omitempty"`
}

ServerInterface contains server connectivity information.

type ServerNICDetails added in v2.2.17

type ServerNICDetails struct {
	NetworkEquipmentInterfaceLLDPInformation string `json:"network_equipment_interface_lldp_information,omitempty" yaml:"networkEquipmentInterfaceLLDPInformation,omitempty"`
	NetworkEquipmentInterfaceMACAddress      string `json:"network_equipment_interface_mac_address,omitempty" yaml:"networkEquipmentInterfaceMACAddress,omitempty"`
	SwitchPortID                             string `json:"switch_port_id,omitempty" yaml:"switchPortID,omitempty"`
	SwitchPortDescription                    string `json:"switch_port_description,omitempty" yaml:"switchPortDescription,omitempty"`
	SwitchHostname                           string `json:"switch_hostname,omitempty" yaml:"switchHostname,omitempty"`
	NetworkEquipmentDescription              string `json:"network_equipment_description,omitempty" yaml:"networkEquipmentDescription,omitempty"`
	SwitchVLANID                             string `json:"switch_vlan_id,omitempty" yaml:"switchVLANID,omitempty"`
	SwitchInterfaceIndex                     int    `json:"server_interface_index,omitempty" yaml:"switchInterfaceIndex,omitempty"`
	ServerInterfaceMACAddress                string `json:"server_interface_mac_address,omitempty" yaml:"serverInterfaceMACAddress,omitempty"`
	ServerInterfaceCapacityMBPs              int    `json:"server_interface_capacity_mbps,omitempty" yaml:"serverInterfaceCapacityMBPs,omitempty"`
}

type ServerSearchResult

type ServerSearchResult struct {
	ServerID                       int               `json:"server_id,omitempty" yaml:"id,omitempty"`
	ServerUUID                     string            `json:"server_uuid,omitempty" yaml:"uuid,omitempty"`
	ServerStatus                   string            `json:"server_status,omitempty" yaml:"status,omitempty"`
	ServerSerialNumber             string            `json:"server_serial_number,omitempty" yaml:"serial_number,omitempty"`
	ServerVendor                   string            `json:"server_vendor,omitempty" yaml:"vendor,omitempty"`
	ServerNetworkTotalCapacityMbps int               `json:"server_network_total_capacity_mbps,omitempty" yaml:"networkTotalCapacityMbps,omitempty"`
	ServerBootType                 string            `json:"server_boot_type,omitempty" yaml:"bootType,omitempty"`
	ServerPowerStatus              string            `json:"server_power_status,omitempty" yaml:"powerStatus,omitempty"`
	ServerProcessorName            string            `json:"server_processor_name,omitempty" yaml:"processorName,omitempty"`
	ServerProcessorCoreCount       int               `json:"server_processor_core_count,omitempty" yaml:"processorCoreCount,omitempty"`
	ServerProcessorCoreMhz         int               `json:"server_processor_core_mhz,omitempty" yaml:"processorCoreMhz,omitempty"`
	ServerProcessorCount           int               `json:"server_processor_count,omitempty" yaml:"processorCount,omitempty"`
	ServerProcessorThreads         int               `json:"server_processor_threads,omitempty" yaml:"processorThreads,omitempty"`
	ServerProcessorCPUMark         int               `json:"server_processor_cpu_mark" yaml:"processorCPUMark"`
	ServerRAMGbytes                int               `json:"server_ram_gbytes,omitempty" yaml:"ramGbytes,omitempty"`
	ServerDiskCount                int               `json:"server_disk_count,omitempty" yaml:"diskCount,omitempty"`
	ServerDiskSizeMbytes           int               `json:"server_disk_size_mbytes,omitempty" yaml:"diskSizeMbytes,omitempty"`
	ServerDiskType                 string            `json:"server_disk_type,omitempty" yaml:"diskType,omitempty"`
	ServerProductName              string            `json:"server_product_name,omitempty" yaml:"productName,omitempty"`
	ServerClass                    string            `json:"server_class,omitempty" yaml:"class,omitempty"`
	ServerTypeID                   int               `json:"server_type_id,omitempty" yaml:"typeID,omitempty"`
	ServerTypeName                 string            `json:"server_type_name,omitempty" yaml:"type,omitempty"`
	ServerTypeBootType             string            `json:"server_type_boot_type,omitempty" yaml:"serverBootType,omitempty"`
	ServerInterfaces               []ServerInterface `json:"server_interfaces,omitempty" yaml:"interfaces,omitempty"`
	ServerDisks                    []ServerDisk      `json:"server_disks,omitempty" yaml:"disks,omitempty"`
	ServerTags                     []string          `json:"server_tags,omitempty" yaml:"tags,omitempty"`
	ServerIPMIChannel              int               `json:"server_ipmi_channel,omitempty" yaml:"IPMIChannel,omitempty"`
	ServerIPMIHost                 string            `json:"server_ipmi_host,omitempty" yaml:"IPMIHostname,omitempty"`
	ServerIPMInternalUsername      string            `json:"server_ipmi_internal_username,omitempty" yaml:"IPMIUsername,omitempty"`
	ServerIPMInternalPassword      string            `json:"server_ipmi_internal_password,omitempty" yaml:"IPMIPassword,omitempty"`
	ServerIPMCredentialsNeedUpdate bool              `json:"server_ipmi_credentials_need_update,omitempty" yaml:"IPMICredentialsNeedUpdate,omitempty"`
	ServerVendorSKUID              string            `json:"server_vendor_sku_id,omitempty" yaml:"vendorSKUID,omitempty"`
	ServerComments                 string            `json:"server_comments,omitempty" yaml:"comments,omitempty"`
	InstanceLabel                  []string          `json:"instance_label,omitempty" yaml:"instanceLabel,omitempty"`
	InstanceID                     []int             `json:"instance_id,omitempty" yaml:"instanceID,omitempty"`
	InstanceArrayID                []int             `json:"instance_array_id,omitempty" yaml:"instanceArrayID,omitempty"`
	InfrastructureID               []int             `json:"infrastructure_id,omitempty" yaml:"infrastructureID,omitempty"`
	UserEmail                      [][]string        `json:"user_email,omitempty" yaml:"userEmail,omitempty"`
	UserID                         [][]int           `json:"user_id,omitempty" yaml:"users,omitempty"`
	DatacenterName                 string            `json:"datacenter_name,omitempty" yaml:"datacenter,omitempty"`
}

ServerSearchResult represents a server in a datacenter.

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 ServerTypeMatch

type ServerTypeMatch struct {
	ServerCount int `json:"server_count,omitempty"`
}

ServerTypeMatch what exact server types to use

type ServerTypeMatches

type ServerTypeMatches struct {
	ServerTypes map[int]ServerTypeMatch `json:"server_types,omitempty"`
}

ServerTypeMatches used in InstanceArrayEdit operations to specify which server types to use

type SharedDrive

type SharedDrive struct {
	SharedDriveLabel                  string                 `json:"shared_drive_label,omitempty" yaml:"label,omitempty"`
	SharedDriveSubdomain              string                 `json:"shared_drive_subdomain,omitempty" yaml:"subdomain,omitempty"`
	SharedDriveID                     int                    `json:"shared_drive_id,omitempty" yaml:"id,omitempty"`
	SharedDriveStorageType            string                 `json:"shared_drive_storage_type,omitempty" yaml:"storageType,omitempty"`
	SharedDriveHasGFS                 bool                   `json:"shared_drive_has_gfs,omitempty" yaml:"hasGFS,omitempty"`
	InfrastructureID                  int                    `json:"infrastructure_id,omitempty" yaml:"infrastructureID,omitempty"`
	SharedDriveServiceStatus          string                 `json:"shared_drive_service_status,omitempty" yaml:"serviceStatus,omitempty"`
	SharedDriveCreatedTimestamp       string                 `json:"shared_drive_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	SharedDriveUpdatedTimestamp       string                 `json:"shared_drive_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
	SharedDriveSizeMbytes             int                    `json:"shared_drive_size_mbytes,omitempty" yaml:"sizeMBytes,omitempty"`
	SharedDriveAttachedInstanceArrays []int                  `json:"shared_drive_attached_instance_arrays,omitempty" yaml:"attachedInstaceArrays,omitempty"`
	SharedDriveOperation              SharedDriveOperation   `json:"shared_drive_operation,omitempty" yaml:"operation,omitempty"`
	SharedDriveCredentials            SharedDriveCredentials `json:"shared_drive_credentials,omitempty" yaml:"credentials,omitempty"`
	SharedDriveChangeID               int                    `json:"shared_drive_change_id,omitempty" yaml:"changeID,omitempty"`
}

SharedDrive represents a drive that can be shared between instances

func (SharedDrive) CreateOrUpdate

func (sd SharedDrive) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (SharedDrive) Delete

func (sd SharedDrive) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (SharedDrive) Validate

func (sd SharedDrive) Validate() error

Validate implements interface Applier

type SharedDriveCredentials

type SharedDriveCredentials struct {
	ISCSI ISCSI `json:"iscsi,omitempty" yaml:"iscsi,omitempty"`
}

SharedDriveCredentials iscsi or other forms of connection details

type SharedDriveOperation

type SharedDriveOperation struct {
	SharedDriveDeployStatus           string `json:"shared_drive_deploy_status,omitempty" yaml:"deployStatus,omitempty"`
	SharedDriveDepoloyType            string `json:"shared_drive_deploy_type,omitempty" yaml:"deployType,omitempty"`
	SharedDriveLabel                  string `json:"shared_drive_label,omitempty" yaml:"label,omitempty"`
	SharedDriveSubdomain              string `json:"shared_drive_subdomain,omitempty" yaml:"subdomain,omitempty"`
	SharedDriveID                     int    `json:"shared_drive_id,omitempty" yaml:"id,omitempty"`
	SharedDriveSizeMbytes             int    `json:"shared_drive_size_mbytes,omitempty" yaml:"sizeMBytes,omitempty"`
	SharedDriveStorageType            string `json:"shared_drive_storage_type,omitempty" yaml:"storageType,omitempty"`
	SharedDriveHasGFS                 bool   `json:"shared_drive_has_gfs" yaml:"hasGFS"`
	InfrastructureID                  int    `json:"infrastructure_id,omitempty" yaml:"infrastructureID,omitempty"`
	SharedDriveServiceStatus          string `json:"shared_drive_service_status,omitempty" yaml:"serviceStatus,omitempty"`
	SharedDriveAttachedInstanceArrays []int  `json:"shared_drive_attached_instance_arrays,omitempty" yaml:"attachedInstanceArrays,omitempty"`
	SharedDriveChangeID               int    `json:"shared_drive_change_id,omitempty" yaml:"changeID,omitempty"`
}

SharedDriveOperation represents an ongoing or new operation on a shared drive

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 Snapshot

type Snapshot struct {
	DriveSnapshotID               int    `json:"drive_snapshot_id,omitempty"`
	DriveSnapshotLabel            string `json:"drive_snapshot_label,omitempty"`
	DriveID                       int    `json:"drive_id,omitempty"`
	DriveSnapshotCreatedTimestamp string `json:"drive_snapshot_created_timestamp,omitempty"`
}

Snapshot A snapshot of a drive created at a specific time.

type StageDefinition

type StageDefinition struct {
	StageDefinitionID                     int         `json:"stage_definition_id,omitempty" yaml:"id,omitempty"`
	UserIDOwner                           int         `json:"user_id_owner,omitempty" yaml:"ownerID,omitempty"`
	UserIDAuthenticated                   int         `json:"user_id_authenticated,omitempty" yaml:"userIDAuthenticated,omitempty"`
	StageDefinitionLabel                  string      `json:"stage_definition_label,omitempty" yaml:"label,omitempty"`
	IconAssetDataURI                      string      `json:"icon_asset_data_uri,omitempty" yaml:"iconAssetDataURI,omitempty"`
	StageDefinitionTitle                  string      `json:"stage_definition_title,omitempty" yaml:"title,omitempty"`
	StageDefinitionDescription            string      `json:"stage_definition_description,omitempty" yaml:"description,omitempty"`
	StageDefinitionType                   string      `json:"stage_definition_type,omitempty" yaml:"type,omitempty"`
	StageDefinitionVariablesNamesRequired []string    `json:"stage_definition_variable_names_required,omitempty" yaml:"variableNames,omitempty"`
	StageDefinition                       interface{} `json:"stage_definition,omitempty" yaml:"stageDefinition,omitempty"`
	StageDefinitionCreatedTimestamp       string      `json:"stage_definition_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	StageDefinitionUpdatedTimestamp       string      `json:"stage_definition_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
}

StageDefinition contains a JavaScript file, HTTP request url and options, an AnsibleBundle or an API call template.

func (StageDefinition) CreateOrUpdate

func (s StageDefinition) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (StageDefinition) Delete

func (s StageDefinition) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (*StageDefinition) UnmarshalJSON

func (s *StageDefinition) UnmarshalJSON(b []byte) error

UnmarshalJSON custom json marshaling

func (StageDefinition) Validate

func (s StageDefinition) Validate() error

Validate implements interface Applier

type SubnetPool

type SubnetPool struct {
	SubnetPoolID                                int    `json:"subnet_pool_id,omitempty" yaml:"id,omitempty"`
	DatacenterName                              string `json:"datacenter_name,omitempty" yaml:"datacenter,omitempty"`
	NetworkEquipmentID                          int    `json:"network_equipment_id,omitempty" yaml:"networkEquipmentID,omitempty"`
	UserID                                      int    `json:"user_id,omitempty" yaml:"user,omitempty"`
	SubnetPoolPrefixHumanReadable               string `json:"subnet_pool_prefix_human_readable,omitempty" yaml:"prefix,omitempty"`
	SubnetPoolPrefixHex                         string `json:"subnet_pool_prefix_hex,omitempty" yaml:"prefixHex,omitempty"`
	SubnetPoolNetmaskHumanReadable              string `json:"subnet_pool_netmask_human_readable,omitempty" yaml:"netmask,omitempty"`
	SubnetPoolNetmaskHex                        string `json:"subnet_pool_netmask_hex,omitempty" yaml:"netmaskHex,omitempty"`
	SubnetPoolPrefixSize                        int    `json:"subnet_pool_prefix_size,omitempty" yaml:"size,omitempty"`
	SubnetPoolType                              string `json:"subnet_pool_type,omitempty" yaml:"type,omitempty"`
	SubnetPoolRoutable                          bool   `json:"subnet_pool_routable,omitempty" yaml:"routable,omitempty"`
	SubnetPoolDestination                       string `json:"subnet_pool_destination,omitempty" yaml:"destination,omitempty"`
	SubnetPoolUtilizationCachedJSON             string `json:"subnet_pool_utilization_cached_json,omitempty" yaml:"currentUtilizationJSON,omitempty"`
	SubnetPoolUtilizationCachedUpdatedTimestamp string `json:"subnet_pool_cached_updated_timestamp,omitempty" yaml:"currentUtilizationLastUpdated,omitempty"`
	SubnetPoolIsOnlyForManualAllocation         bool   `json:"subnet_pool_is_only_for_manual_allocation,omitempty" yaml:"manualAllocationOnly,omitempty"`
}

SubnetPool represents a pool of subnets

func (SubnetPool) CreateOrUpdate

func (s SubnetPool) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (SubnetPool) Delete

func (s SubnetPool) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (SubnetPool) Validate

func (s SubnetPool) Validate() error

Validate implements interface Applier

type SubnetPoolUtilization

type SubnetPoolUtilization struct {
	PrefixCountFree                        map[string]int `json:"prefix_count_free,omitempty" yaml:"availableSubnets,omitempty"`
	PrefixCountAllocated                   map[string]int `json:"prefix_count_allocated,omitempty" yaml:"allocatedSubnets,omitempty"`
	IPAddressesUsableCountFree             string         `json:"ip_addresses_usable_count_free,omitempty" yaml:"availableUsableIps,omitempty"`
	IPAddressesUsableCountAllocated        string         `json:"ip_addresses_usable_count_allocated,omitempty" yaml:"allocatedUsableIps,omitempty"`
	IPAddressesUsableFreePercentOptimistic string         `json:"ip_addresses_usable_free_percent_optimistic,omitempty" yaml:"availablePercentage,omitempty"`
}

SubnetPoolUtilization describes the current utilization of the subnet

func (*SubnetPoolUtilization) UnmarshalJSON

func (s *SubnetPoolUtilization) UnmarshalJSON(data []byte) error

UnmarshalJSON to handle the shity [] to {} and 0 and "123123" cases

type SwitchDevice

type SwitchDevice struct {
	NetworkEquipmentID                             int      `json:"network_equipment_id,omitempty" yaml:"id,omitempty"`
	NetworkEquipmentIdentifierString               string   `json:"network_equipment_identifier_string,omitempty" yaml:"identifierString,omitempty"`
	DatacenterName                                 string   `json:"datacenter_name,omitempty" yaml:"datacenterName,omitempty"`
	NetworkEquipmentProvisionerType                string   `json:"network_equipment_provisioner_type,omitempty" yaml:"provisionerType,omitempty"`
	NetworkEquipmentProvisionerPosition            string   `json:"network_equipment_position,omitempty" yaml:"provisionerPosition,omitempty"`
	NetworkEquipmentDriver                         string   `json:"network_equipment_driver,omitempty" yaml:"driver,omitempty"`
	NetworkEquipmentManagementUsername             string   `json:"network_equipment_management_username,omitempty" yaml:"managementUsername,omitempty"`
	NetworkEquipmentManagementPassword             string   `json:"network_equipment_management_password,omitempty" yaml:"managementPassword,omitempty"`
	NetworkEquipmentManagementAddress              string   `json:"network_equipment_management_address,omitempty" yaml:"managementAddress,omitempty"`
	NetworkEquipmentManagementPort                 int      `json:"network_equipment_management_port,omitempty" yaml:"managementPort,omitempty"`
	NetworkEquipmentManagementProtocol             string   `json:"network_equipment_management_protocol,omitempty" yaml:"managementProtocol,omitempty"`
	NetworkEquipmentManagementAddressMask          string   `json:"network_equipment_management_address_mask,omitempty" yaml:"managementAddressMask,omitempty"`
	NetworkEquipmentManagementAddressGateway       string   `json:"network_equipment_management_address_gateway,omitempty" yaml:"managementAddressGateway,omitempty"`
	NetworkEquipmentManagementMACAddress           string   `json:"network_equipment_management_mac_address,omitempty" yaml:"managementMACAddress,omitempty"`
	NetworkEquipmentPrimaryWANIPv4SubnetPool       string   `json:"network_equipment_primary_wan_ipv4_subnet_pool,omitempty" yaml:"primaryWANIPv4SubnetPool,omitempty"`
	NetworkEquipmentPrimaryWANIPv4SubnetPrefixSize int      `json:"network_equipment_primary_wan_ipv4_subnet_prefix_size,omitempty" yaml:"primaryWANIPv4SubnetPrefixSize,omitempty"`
	NetworkEquipmentPrimaryWANIPv6SubnetPool       string   `json:"network_equipment_primary_wan_ipv6_subnet_pool,omitempty" yaml:"primaryWANIPv6SubnetPool,omitempty"`
	NetworkEquipmentPrimaryWANIPv6SubnetPoolID     int      `json:"network_equipment_primary_wan_ipv6_subnet_pool_id,omitempty" yaml:"primaryWANIPv6SubnetPoolID,omitempty"`
	NetworkEquipmentPrimaryWANIPv6SubnetCIDR       string   `json:"network_equipment_primary_wan_ipv6_subnet_cidr,omitempty" yaml:"primaryWANIPv6SubnetCIDR,omitempty"`
	NetworkEquipmentPrimaryWANIPv6SubnetPrefixSize int      `json:"network_equipment_primary_wan_ipv6_subnet_prefix_size,omitempty" yaml:"primaryWANIPv6SubnetPrefixSize,omitempty"`
	NetworkEquipmentPrimarySANSubnetPool           string   `json:"network_equipment_primary_san_subnet_pool,omitempty" yaml:"primarySANSubnetPool,omitempty"`
	NetworkEquipmentPrimarySANSubnetPrefixSize     int      `json:"network_equipment_primary_san_subnet_prefix_size,omitempty" yaml:"primarySANSubnetPrefixSize,omitempty"`
	NetworkEquipmentQuarantineSubnetStart          string   `json:"network_equipment_quarantine_subnet_start,omitempty" yaml:"quarantineSubnetStart,omitempty"`
	NetworkEquipmentQuarantineSubnetEnd            string   `json:"network_equipment_quarantine_subnet_end,omitempty" yaml:"quarantineSubnetEnd,omitempty"`
	NetworkEquipmentQuarantineSubnetPrefixSize     int      `json:"network_equipment_quarantine_subnet_prefix_size,omitempty" yaml:"quarantineSubnetPrefixSize,omitempty"`
	NetworkEquipmentQuarantineSubnetGateway        string   `json:"network_equipment_quarantine_subnet_gateway,omitempty" yaml:"quarantineSubnetGateway,omitempty"`
	NetworkEquipmentDescription                    string   `json:"network_equipment_description,omitempty" yaml:"description,omitempty"`
	NetworkEquipmentCountry                        string   `json:"network_equipment_country,omitempty" yaml:"country,omitempty"`
	NetworkEquipmentCity                           string   `json:"network_equipment_city,omitempty" yaml:"city,omitempty"`
	NetworkEquipmentDatacenter                     string   `json:"network_equipment_datacenter,omitempty" yaml:"netDatacenter,omitempty"`
	NetworkEquipmentDatacenterRoom                 string   `json:"network_equipment_datacenter_room,omitempty" yaml:"datacenterRoom,omitempty"`
	NetworkEquipmentDatacenterRack                 string   `json:"network_equipment_datacenter_rack,omitempty" yaml:"datacenterRack,omitempty"`
	NetworkEquipmentRackPositionUpperUnit          int      `json:"network_equipment_rack_position_upper_unit,omitempty" yaml:"rackPositionUpperUnit,omitempty"`
	NetworkEquipmentRackPositionLowerUnit          int      `json:"network_equipment_rack_position_lower_unit,omitempty" yaml:"rackPositionLowerUnit,omitempty"`
	NetworkEquipmentSerialNumber                   string   `json:"network_equipment_serial_number,omitempty" yaml:"serialNumber,omitempty"`
	ChassisRackID                                  int      `json:"chassis_rack_id,omitempty" yaml:"chassisRackID,omitempty"`
	NetworkEquipmentTORLinkedID                    int      `json:"network_equipment_tor_linked_id,omitempty"  yaml:"TORLinkedID,omitempty"`
	NetworkEquipmentTags                           []string `json:"network_equipment_tags,omitempty" yaml:"tags,omitempty"`
	NetworkEquipmentRequiresOSInstall              bool     `json:"network_equipment_requires_os_install" yaml:"requiresOSInstall"`
	VolumeTemplateID                               int      `json:"volume_template_id,omitempty" yaml:"volumeTemplateID,omitempty"`
}

SwitchDevice Represents a switch installed in a datacenter.

func (SwitchDevice) CreateOrUpdate

func (s SwitchDevice) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (SwitchDevice) Delete

func (s SwitchDevice) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (*SwitchDevice) UnmarshalJSON

func (s *SwitchDevice) UnmarshalJSON(data []byte) error

UnmarshalJSON to handle the shitty boolean being returned as 0 and 1 and true and false in different environments

func (SwitchDevice) Validate

func (s SwitchDevice) Validate() error

Validate implements interface Applier

type User

type User struct {
	UserID          int    `json:"user_id,omitempty"`
	UserDisplayName string `json:"user_display_name,omitempty"`
	UserEmail       string `json:"user_email,omitempty"`
}

User describes user account specifications.

type Variable

type Variable struct {
	VariableID               int    `json:"variable_id,omitempty" yaml:"id,omitempty"`
	UserIDOwner              int    `json:"user_id_owner,omitempty" yaml:"ownerID,omitempty"`
	UserIDAuthenticated      int    `json:"user_id_authenticated,omitempty" yaml:"userIDAuthenticated,omitempty"`
	VariableName             string `json:"variable_name,omitempty" yaml:"name,omitempty"`
	VariableUsage            string `json:"variable_usage,omitempty" yaml:"usage,omitempty"`
	VariableJSON             string `json:"variable_json,omitempty" yaml:"json,omitempty"`
	VariableCreatedTimestamp string `json:"variable_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	VariableUpdatedTimestamp string `json:"variable_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
}

Variable struct defines a Variable type

func (Variable) CreateOrUpdate

func (v Variable) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (Variable) Delete

func (v Variable) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (Variable) Validate

func (v Variable) Validate() error

Validate implements interface Applier

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"`
	VolumeTemplateBootType                string                 `json:"volume_template_boot_type,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"`
	VolumeTemplateTags                    []string               `json:"volume_template_tags,omitempty"`
	VolumeTemplateOsBootstrapFunctionName string                 `json:"volume_template_os_bootstrap_function_name,omitempty"`
	VolumeTemplateNetworkOperatingSystem  NetworkOperatingSystem `json:"volume_template_network_operating_system,omitempty"`
	VolumeTemplateVersion                 string                 `json:"volume_template_version,omitempty"`
	VolumeTemplateIsExperimental          bool                   `json:"volume_template_is_experimental,omitempty"`
}

VolumeTemplate describes an OS template

type WebFetchAAPIOptions

type WebFetchAAPIOptions struct {
	Method           string                    `json:"method,omitempty"`
	Redirect         string                    `json:"redirect,omitempty"`
	Follow           int                       `json:"follow,omitempty"`
	Compress         bool                      `json:"compress,omitempty"`
	Timeout          int                       `json:"timeout,omitempty"`
	Size             int                       `json:"size,omitempty"`
	Headers          WebFetchAPIRequestHeaders `json:"headers,omitempty"`
	Body             string                    `json:"body,omitempty"`
	BodyBufferBase64 string                    `json:"bodyBufferBase64,omitempty"`
}

WebFetchAAPIOptions represents node-fetch options which is follows the Web API Fetch specification. See https://github.com/node-fetch/node-fetch

type WebFetchAPIRequestHeaders

type WebFetchAPIRequestHeaders struct {
	Accept             string `json:"Accept,omitempty"`
	UserAgent          string `json:"User-Agent,omitempty"`
	ContentType        string `json:"Content-Type,omitempty"`
	Cookie             string `json:"Cookie,omitempty"`
	Authorization      string `json:"Authorization,omitempty"`
	ProxyAuthorization string `json:"Proxy-Authorization,omitempty"`
	ContentMD5         string `json:"Content-MD5,omitempty"`
}

WebFetchAPIRequestHeaders HTTP request headers. null means undefined (the default for most) so the header will not be included with the request.

type WebProxy added in v2.0.7

type WebProxy struct {
	WebProxyServerIP   string `json:"web_proxy_server_ip,omitempty" yaml:"ip,omitempty"`
	WebProxyServerPort int    `json:"web_proxy_server_port,omitempty" yaml:"port,omitempty"`
	WebProxyUsername   string `json:"web_proxy_username,omitempty" yaml:"username,omitempty"`
	WebProxyPassword   string `json:"web_proxy_password,omitempty" yaml:"password,omitempty"`
}

type Workflow

type Workflow struct {
	WorkflowID               int    `json:"workflow_id,omitempty" yaml:"id,omitempty"`
	UserIDOwner              int    `json:"user_id_owner,omitempty" yaml:"ownerID,omitempty"`
	UserIDAuthenticated      int    `json:"user_id_authenticated,omitempty" yaml:"userIDAuthenticated,omitempty"`
	WorkflowLabel            string `json:"workflow_label,omitempty" yaml:"label,omitempty"`
	WorkflowUsage            string `json:"workflow_usage,omitempty" yaml:"usage,omitempty"`
	WorkflowTitle            string `json:"workflow_title,omitempty" yaml:"title,omitempty"`
	WorkflowDescription      string `json:"workflow_description,omitempty" yaml:"description,omitempty"`
	WorkflowIsDeprecated     bool   `json:"workflow_is_deprecated,omitempty" yaml:"isDeprecated,omitempty"`
	IconAssetDataURI         string `json:"icon_asset_data_uri,omitempty" yaml:"assetDataURI,omitempty"`
	WorkflowCreatedTimestamp string `json:"workflow_created_timestamp,omitempty" yaml:"createdTimestamp,omitempty"`
	WorkflowUpdatedTimestamp string `json:"workflow_updated_timestamp,omitempty" yaml:"updatedTimestamp,omitempty"`
}

Workflow struct defines a server type

func (Workflow) CreateOrUpdate

func (w Workflow) CreateOrUpdate(client MetalCloudClient) error

CreateOrUpdate implements interface Applier

func (Workflow) Delete

func (w Workflow) Delete(client MetalCloudClient) error

Delete implements interface Applier

func (Workflow) Validate

func (w Workflow) Validate() error

Validate implements interface Applier

type WorkflowReference

type WorkflowReference struct {
	WorkflowID int    `json:"workflow_id,omitempty"`
	Type       string `json:"type,omitempty"`
}

WorkflowReference points to a Workflow object via its workflow_id. To be used as a stage definition.

type WorkflowStageAssociation

type WorkflowStageAssociation struct {
	InfrastructureDeployCustomStageID             int    `json:"infrastructure_deploy_custom_stage_id,omitempty"`
	InfrastructureID                              int    `json:"infrastructure_id,omitempty"`
	StageDefinitionID                             int    `json:"stage_definition_id,omitempty"`
	InfrastructureDeployCustomStageType           string `json:"infrastructure_deploy_custom_stage_type,omitempty"`
	InfrastructureDeployCustomStageRunLevel       int    `json:"infrastructure_deploy_custom_stage_run_level,omitempty"`
	InfrastructureDeployCustomStageExecOutputJSON string `json:"infrastructure_deploy_custom_stage_exec_output_json,omitempty"`
}

WorkflowStageAssociation associations

type WorkflowStageDefinitionReference

type WorkflowStageDefinitionReference struct {
	WorkflowStageID             int `json:"workflow_stage_id,omitempty"`
	WorkflowID                  int `json:"workflow_id,omitempty"`
	StageDefinitionID           int `json:"stage_definition_id,omitempty"`
	WorkflowStageRunLevel       int `json:"workflow_stage_run_level,omitempty"`
	WorkflowStageExecOutputJSON int `json:"workflow_stage_exec_output_json,omitempty"`
}

WorkflowStageDefinitionReference defines where in a workflow a stage definition resides

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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