# README
Metal Cloud Go SDK
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)
}
}
# Packages
No description provided by the author
# Functions
DefaultEndpoint returns the default Bigstep Metalcloud endpoint.
GetMetalcloudClient returns a metal cloud client.
# Structs
AnsibleBundle contains an Ansible project as a single archive file, usually .zip.
Client sruct defines a metalcloud client.
Copy defines the source and destination of a SCP operation.
Datacenter - datacenter description.
DatacenterConfig - datacenter configuration.
Drive represents a drive.
DriveArray represents a collection of identical drives.
DriveArrayOperation defines changes to be applied to a DriveArray.
DriveCredentials credentials to connect to the drive.
DriveFileSystem filesystem details.
FirewallRule describes a firewall rule that is to be applied on all instances of an array.
HardwareConfiguration holds the desired hardware configuration when trying to find available servers for provisioning.
HTTPRequest represents an HTTP request definition compatible with the standard Web Fetch API.
IDRAC control panel credentials.
ILO control panel credentials.
Infrastructure - the main infrastructure object.
InfrastructureOperation - object with alternations to be applied.
Instance object describes an instance.
InstanceArray object describes a collection of identical instances.
InstanceArrayInterface describes a network interface of the array.It's properties will be applied to all InstanceInterfaces of the array's instances.
InstanceArrayInterfaceOperation describes changes to a network array interface.
InstanceArrayOperation object describes the changes that will be applied to an instance array.
InstanceCredentials contains information needed to connect to the server via IPMI, iLO etc.
InstanceInterface objects are created automatically when instances are created.
InstanceInterfaceOperation objects are created automatically when instances are created.
InstanceOperation contains information regarding the changes that are to be made to a product.
IP object contains information regarding an IP address.
IPMI credentials.
IPOperation contains information regarding the changes that are to be made to a product.
ISCSI provides target IQN, IP address, port number and the LUN ID.
ISCSIInitiator provides initiator IQN, username and password and other iSCSI connection details.
Network object describes an high level connection construct.
NetworkOperation object describes the change(s) required to be applied to a Network.
OperatingSystem describes an OS.
OSAsset struct defines a server type.
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.
OSTemplateCredentials holds information needed to connect to an OS installed by an OSTemplate.
OSTemplateOSAssetData holds asset-template information.
RDP credentials for the installed OS.
RemoteConsole provides credentials needed to connect to the server via the HTML interface.
SCPResourceLocation defines a file path and SSH client connection options for use with Secure Copy Protocol (SCP).
SearchResultForServerComponents describes a search result.
SearchResultForServers describes a serach result.
Secret struct defines a server type.
Server represents a server in a datacenter.
ServerComponent information about a server's components.
ServerDisk describes a disk.
ServerInterface contains server connectivity information.
ServerSearchResult represents a server in a datacenter.
ServerType struct defines a server type.
ServerTypeMatch what exact server types to use.
ServerTypeMatches used in InstanceArrayEdit operations to specify which server types to use.
SharedDrive represents a drive that can be shared between instances.
SharedDriveCredentials iscsi or other forms of connection details.
SharedDriveOperation represents an ongoing or new operation on a shared drive.
ShutdownOptions controls how the deploy engine handles running instances.
Snapshot A snapshot of a drive created at a specific time.
SSH credentials for the installed OS.
SSHAlgorithms defines algorithms that can be used during an ssh session.
SSHClientOptions defines an ssh cnnection such as the host, port, user, password, private keys, etc.
SSHExec executes a command on a remote server using the SSH exec functionality (not through a shell).
SSHKey represents an SSH keys added by a user.
StageDefinition contains a JavaScript file, HTTP request url and options, an AnsibleBundle or an API call template.
SubnetPool represents a pool of subnets.
SubnetPoolUtilization describes the current utilization of the subnet.
SwitchDevice Represents a switch installed in a datacenter.
User describes user account specifications.
Variable struct defines a Variable type.
VolumeTemplate describes an OS template.
WebFetchAAPIOptions represents node-fetch options which is follows the Web API Fetch specification.
WebFetchAPIRequestHeaders HTTP request headers.
Workflow struct defines a server type.
WorkflowReference points to a Workflow object via its workflow_id.
WorkflowStageAssociation associations.
WorkflowStageDefinitionReference defines where in a workflow a stage definition resides.
# Interfaces
Applier should create or update an object.