C# Class Elastacloud.AzureManagement.Fluent.Clients.LinuxVirtualMachineClient

Inheritance: ILinuxVirtualMachineClient
Show file Open project: azurecoder/fluent-management Class Usage Examples

Public Methods

Method Description
AddRolesToExistingDeployment ( List properties, string cloudServiceName, ServiceCertificateModel serviceCertificate ) : void
CleanupUnattachedDisks ( ) : void

Cleans up any disks which don't have an attached VM

ClosePorts ( string cloudServiceName, string virtualMachineName ) : void
CreateNewVirtualMachineDeploymentFromTemplateGallery ( List properties, string cloudServiceName, ServiceCertificateModel serviceCertificate = null, string location = LocationConstants.NorthEurope, string affinityGroup = "" ) : IVirtualMachineClient

Creates a new virtual machine from a gallery template

DeleteNamedVirtualMachineDisk ( string name ) : void

Deletes a vm disk if a name is known

DeleteVirtualMachine ( bool removeDisks = true, bool removeUnderlyingBlobs = true, bool removeCloudService = true, bool removeStorageAccount = true ) : void

Deletes the virtual machine that has context with the client

GetAvailableVirtualNetworks ( ) : List
GetCurrentUbuntuImage ( ) : ImageProperties

This returns all of the available ubuntu images in the gallery

GetHostDetails ( string cloudServiceName ) : List

Gets a list of hosts, internal ip addresses and other things

GetVirtualMachineSubnetCollection ( string cloudServiceName ) : CloudServiceNetworking

Gets a list of virtual machine subnets that the vms in the cloud service belong to

LinuxVirtualMachineClient ( List properties, string subscriptionId, X509Certificate2 certificate ) : System

Constructs a VirtualMachinenClient

LinuxVirtualMachineClient ( string subscriptionId, X509Certificate2 certificate ) : System

Constructs a LinuxVirtualMachineClient and will get the details of a virtual machine given a cloud service

ListImages ( string filter = "" ) : List

Lists all of the OS images assoiated with Linux that are public within the subscription

OpenPorts ( string cloudServiceName, string virtualMachineName ) : void
Restart ( ) : void

Restarts the virtual machine instance

Stop ( ) : void

Stops the virtual machine instance

Private Methods

Method Description
AddServiceCertificateToRoles ( ServiceCertificateModel serviceCertificate, string cloudServiceName, List &properties ) : void
CheckVmDeploymentIsRunning ( List properties ) : void
DeleteDataDisks ( PersistentVMRole vm, IBlobClient client ) : void
ParseBlobDetails ( string blobAddress ) : string

Returns the name of the blob and container

Method Details

AddRolesToExistingDeployment() public method

public AddRolesToExistingDeployment ( List properties, string cloudServiceName, ServiceCertificateModel serviceCertificate ) : void
properties List
cloudServiceName string
serviceCertificate Elastacloud.AzureManagement.Fluent.Clients.Helpers.ServiceCertificateModel
return void

CleanupUnattachedDisks() public method

Cleans up any disks which don't have an attached VM
public CleanupUnattachedDisks ( ) : void
return void

ClosePorts() public method

public ClosePorts ( string cloudServiceName, string virtualMachineName ) : void
cloudServiceName string
virtualMachineName string
return void

CreateNewVirtualMachineDeploymentFromTemplateGallery() public method

Creates a new virtual machine from a gallery template
public CreateNewVirtualMachineDeploymentFromTemplateGallery ( List properties, string cloudServiceName, ServiceCertificateModel serviceCertificate = null, string location = LocationConstants.NorthEurope, string affinityGroup = "" ) : IVirtualMachineClient
properties List Can be any gallery template
cloudServiceName string The name of the cloud service - if it doesn't exist it will be created
serviceCertificate Elastacloud.AzureManagement.Fluent.Clients.Helpers.ServiceCertificateModel The service certificate responsible for adding the ssh keys
location string Where the cloud service will be created if it doesn't exist
affinityGroup string Affinity group that this service will live in
return IVirtualMachineClient

DeleteNamedVirtualMachineDisk() public method

Deletes a vm disk if a name is known
public DeleteNamedVirtualMachineDisk ( string name ) : void
name string The name of the vm disk
return void

DeleteVirtualMachine() public method

Deletes the virtual machine that has context with the client
public DeleteVirtualMachine ( bool removeDisks = true, bool removeUnderlyingBlobs = true, bool removeCloudService = true, bool removeStorageAccount = true ) : void
removeDisks bool True if the underlying disks in blob storage should be removed
removeUnderlyingBlobs bool removes the underlying blob
removeCloudService bool Removes the cloud service container
removeStorageAccount bool The storage account that the vhd is in
return void

GetAvailableVirtualNetworks() public method

public GetAvailableVirtualNetworks ( ) : List
return List

GetCurrentUbuntuImage() public method

This returns all of the available ubuntu images in the gallery
public GetCurrentUbuntuImage ( ) : ImageProperties
return Elastacloud.AzureManagement.Fluent.Types.VirtualMachines.ImageProperties

GetHostDetails() public method

Gets a list of hosts, internal ip addresses and other things
public GetHostDetails ( string cloudServiceName ) : List
cloudServiceName string
return List

GetVirtualMachineSubnetCollection() public method

Gets a list of virtual machine subnets that the vms in the cloud service belong to
public GetVirtualMachineSubnetCollection ( string cloudServiceName ) : CloudServiceNetworking
cloudServiceName string
return Elastacloud.AzureManagement.Fluent.Types.VirtualNetworks.CloudServiceNetworking

LinuxVirtualMachineClient() public method

Constructs a VirtualMachinenClient
public LinuxVirtualMachineClient ( List properties, string subscriptionId, X509Certificate2 certificate ) : System
properties List A valid VirtualMachineProperties object
subscriptionId string The susbcription id for the subscription
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 The susbcription id for the subscription
return System

LinuxVirtualMachineClient() public method

Constructs a LinuxVirtualMachineClient and will get the details of a virtual machine given a cloud service
public LinuxVirtualMachineClient ( string subscriptionId, X509Certificate2 certificate ) : System
subscriptionId string the subscription id
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 A management certificate for the subscription
return System

ListImages() public method

Lists all of the OS images assoiated with Linux that are public within the subscription
public ListImages ( string filter = "" ) : List
filter string
return List

OpenPorts() public method

public OpenPorts ( string cloudServiceName, string virtualMachineName ) : void
cloudServiceName string
virtualMachineName string
return void

Restart() public method

Restarts the virtual machine instance
public Restart ( ) : void
return void

Stop() public method

Stops the virtual machine instance
public Stop ( ) : void
return void