vmclient

package
v0.19.6-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package vmclient implements the client for VirtualMachines.

Index

Constants

View Source
const (
	// APIVersion is the API version for VirtualMachine.
	APIVersion = "2019-07-01"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {

	// ARM throttling configures.
	RetryAfterReader time.Time
	RetryAfterWriter time.Time
	// contains filtered or unexported fields
}

Client implements VirtualMachine client Interface.

func New

func New(config *azclients.ClientConfig) *Client

New creates a new VirtualMachine client with ratelimiting.

func (*Client) CreateOrUpdate

func (c *Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachine, source string) *retry.Error

CreateOrUpdate creates or updates a VirtualMachine.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, resourceGroupName string, VMName string) *retry.Error

Delete deletes a VirtualMachine.

func (*Client) Get

func (c *Client) Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error)

Get gets a VirtualMachine.

func (*Client) List

func (c *Client) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error)

List gets a list of VirtualMachine in the resourceGroupName.

func (*Client) Update

func (c *Client) Update(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachineUpdate, source string) *retry.Error

Update updates a VirtualMachine.

type Interface

type Interface interface {
	// Get gets a VirtualMachine.
	Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error)

	// List gets a list of VirtualMachines in the resourceGroupName.
	List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error)

	// CreateOrUpdate creates or updates a VirtualMachine.
	CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachine, source string) *retry.Error

	// Update updates a VirtualMachine.
	Update(ctx context.Context, resourceGroupName string, VMName string, parameters compute.VirtualMachineUpdate, source string) *retry.Error

	// Delete deletes a VirtualMachine.
	Delete(ctx context.Context, resourceGroupName string, VMName string) *retry.Error
}

Interface is the client interface for VirtualMachines. Don't forget to run the following command to generate the mock client: mockgen -source=$GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmclient/interface.go -package=mockvmclient Interface > $GOPATH/src/k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers/azure/clients/vmclient/mockvmclient/interface.go

type VirtualMachineListResultPage

type VirtualMachineListResultPage struct {
	// contains filtered or unexported fields
}

VirtualMachineListResultPage contains a page of VirtualMachine values.

func (*VirtualMachineListResultPage) Next

func (page *VirtualMachineListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*VirtualMachineListResultPage) NextWithContext

func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (VirtualMachineListResultPage) NotDone

func (page VirtualMachineListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (VirtualMachineListResultPage) Response

Response returns the raw server response from the last page request.

func (VirtualMachineListResultPage) Values

Values returns the slice of values for the current page or nil if there are no values.

Directories

Path Synopsis
Package mockvmclient implements the mock client for VirtualMachines.
Package mockvmclient implements the mock client for VirtualMachines.

Jump to

Keyboard shortcuts

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