Documentation
¶
Overview ¶
Package azure provides methods for creating and manipulating VMs on Azure.
Index ¶
- Constants
- type Certificated
- type DeploymentOptions
- type VM
- func (vm *VM) Destroy() error
- func (vm *VM) GetIPs() ([]net.IP, error)
- func (vm *VM) GetName() string
- func (vm *VM) GetSSH(options ssh.Options) (ssh.Client, error)
- func (vm *VM) GetState() (string, error)
- func (vm *VM) Halt() error
- func (vm *VM) Provision() error
- func (vm *VM) Resume() error
- func (vm *VM) Start() error
- func (vm *VM) Suspend() error
Constants ¶
View Source
const ( // PublicIP is the index of the public IP address that GetIPs returns. PublicIP = 0 // PrivateIP is the index of the private IP address that GetIPs returns. PrivateIP = 1 // DefaultTimeout is the maximum seconds to wait before failing to GetSSH. DefaultTimeout = 800 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Certificated ¶
Certificated data for azure hosted services https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-use-ssh-key/
type DeploymentOptions ¶
DeploymentOptions contains the names of some Azure networking options.
type VM ¶
type VM struct {
PublishSettings string // publishsettings file path of current account
ServiceName string // Azure hosted service name
Label string // Label for hosted service
Name string // VM name
Size string // virtual machine size
SourceImage string // source vhd file name
StorageAccount string // Storage account name
StorageContainer string // the container belongs to storage account
Location string // region on Azure
SSHCreds ssh.Credentials // required
DeployOptions DeploymentOptions // optional
ConfigureHTTP bool // Flag to configure HTTP endpoint for the VM
Cert Certificated
}
VM represents an Azure virtual machine.
func (*VM) GetSSH ¶
GetSSH returns an SSH client that can be used to connect to the VM. An error is returned if the VM has no IPs.
func (*VM) GetState ¶
GetState returns the status of the Azure VM. The status will be one of the following:
"Running" "Suspended" "RunningTransitioning" "SuspendedTransitioning" "Starting" "Suspending" "Deploying" "Deleting"
func (*VM) Provision ¶
Provision creates a new VM instance on Azure. It returns an error if there was a problem during creation.
Click to show internal directories.
Click to hide internal directories.