Documentation ¶
Index ¶
- type AzureClient
- func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, parameters interface{}) (result interface{}, future azureautorest.FutureAPI, err error)
- func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter) (future azureautorest.FutureAPI, err error)
- func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (result interface{}, err error)
- func (ac *AzureClient) GetByID(ctx context.Context, resourceID string) (compute.VirtualMachine, error)
- func (ac *AzureClient) GetResultIfDone(ctx context.Context, future *infrav1.Future) (compute.VirtualMachine, error)
- func (ac *AzureClient) IsDone(ctx context.Context, future azureautorest.FutureAPI) (isDone bool, err error)
- func (ac *AzureClient) Result(ctx context.Context, future azureautorest.FutureAPI, futureType string) (result interface{}, err error)
- type Client
- type Service
- type VMScope
- type VMSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureClient ¶
type AzureClient struct {
// contains filtered or unexported fields
}
AzureClient contains the Azure go-sdk Client.
func NewClient ¶
func NewClient(auth azure.Authorizer) *AzureClient
NewClient creates a new VM client from subscription ID.
func (*AzureClient) CreateOrUpdateAsync ¶ added in v1.1.0
func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, parameters interface{}) (result interface{}, future azureautorest.FutureAPI, err error)
CreateOrUpdateAsync creates or updates a virtual machine asynchronously. It sends a PUT request to Azure and if accepted without error, the func will return a Future which can be used to track the ongoing progress of the operation.
func (*AzureClient) DeleteAsync ¶ added in v1.1.0
func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter) (future azureautorest.FutureAPI, err error)
DeleteAsync deletes a virtual machine asynchronously. DeleteAsync sends a DELETE request to Azure and if accepted without error, the func will return a Future which can be used to track the ongoing progress of the operation.
func (*AzureClient) Get ¶
func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (result interface{}, err error)
Get retrieves information about the model view or the instance view of a virtual machine.
func (*AzureClient) GetByID ¶ added in v1.7.0
func (ac *AzureClient) GetByID(ctx context.Context, resourceID string) (compute.VirtualMachine, error)
GetByID retrieves information about the model or instance view of a virtual machine.
func (*AzureClient) GetResultIfDone ¶ added in v1.7.0
func (ac *AzureClient) GetResultIfDone(ctx context.Context, future *infrav1.Future) (compute.VirtualMachine, error)
GetResultIfDone fetches the result of a long-running operation future if it is done.
func (*AzureClient) IsDone ¶ added in v1.1.0
func (ac *AzureClient) IsDone(ctx context.Context, future azureautorest.FutureAPI) (isDone bool, err error)
IsDone returns true if the long-running operation has completed.
func (*AzureClient) Result ¶ added in v1.1.0
func (ac *AzureClient) Result(ctx context.Context, future azureautorest.FutureAPI, futureType string) (result interface{}, err error)
Result fetches the result of a long-running operation future.
type Client ¶
type Client interface { Get(context.Context, azure.ResourceSpecGetter) (interface{}, error) GetByID(context.Context, string) (compute.VirtualMachine, error) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, parameters interface{}) (result interface{}, future azureautorest.FutureAPI, err error) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter) (future azureautorest.FutureAPI, err error) IsDone(ctx context.Context, future azureautorest.FutureAPI) (isDone bool, err error) Result(ctx context.Context, future azureautorest.FutureAPI, futureType string) (result interface{}, err error) GetResultIfDone(ctx context.Context, future *infrav1.Future) (compute.VirtualMachine, error) }
Client provides operations on Azure virtual machine resources.
type Service ¶
type Service struct { Scope VMScope async.Reconciler // contains filtered or unexported fields }
Service provides operations on Azure resources.
func (*Service) IsManaged ¶ added in v1.3.0
IsManaged returns always returns true as CAPZ does not support BYO VM.
type VMScope ¶
type VMScope interface { azure.Authorizer azure.AsyncStatusUpdater VMSpec() azure.ResourceSpecGetter SetAnnotation(string, string) SetProviderID(string) SetAddresses([]corev1.NodeAddress) SetVMState(infrav1.ProvisioningState) SetConditionFalse(clusterv1.ConditionType, string, clusterv1.ConditionSeverity, string) }
VMScope defines the scope interface for a virtual machines service.
type VMSpec ¶ added in v1.1.0
type VMSpec struct { Name string ResourceGroup string Location string ExtendedLocation *infrav1.ExtendedLocationSpec ClusterName string Role string NICIDs []string SSHKeyData string Size string AvailabilitySetID string Zone string Identity infrav1.VMIdentity OSDisk infrav1.OSDisk DataDisks []infrav1.DataDisk UserAssignedIdentities []infrav1.UserAssignedIdentity SpotVMOptions *infrav1.SpotVMOptions SecurityProfile *infrav1.SecurityProfile AdditionalTags infrav1.Tags AdditionalCapabilities *infrav1.AdditionalCapabilities DiagnosticsProfile *infrav1.Diagnostics SKU resourceskus.SKU Image *infrav1.Image BootstrapData string ProviderID string }
VMSpec defines the specification for a Virtual Machine.
func (*VMSpec) OwnerResourceName ¶ added in v1.1.0
OwnerResourceName is a no-op for virtual machines.
func (*VMSpec) Parameters ¶ added in v1.1.0
func (s *VMSpec) Parameters(ctx context.Context, existing interface{}) (params interface{}, err error)
Parameters returns the parameters for the virtual machine.
func (*VMSpec) ResourceGroupName ¶ added in v1.1.0
ResourceGroupName returns the name of the virtual machine.
func (*VMSpec) ResourceName ¶ added in v1.1.0
ResourceName returns the name of the virtual machine.
Directories ¶
Path | Synopsis |
---|---|
Package mock_virtualmachines is a generated GoMock package.
|
Package mock_virtualmachines is a generated GoMock package. |