Documentation ¶
Index ¶
- Constants
- func BuildAzureCloudProvider(azureManager *AzureManager, resourceLimiter *cloudprovider.ResourceLimiter) (cloudprovider.CloudProvider, error)
- func GetVMNameIndex(osType compute.OperatingSystemTypes, vmName string) (int, error)
- type AccountsClient
- type AccountsClientMock
- type AgentPool
- func (as *AgentPool) Autoprovisioned() bool
- func (as *AgentPool) Belongs(node *apiv1.Node) (bool, error)
- func (as *AgentPool) Create() error
- func (as *AgentPool) Debug() string
- func (as *AgentPool) DecreaseTargetSize(delta int) error
- func (as *AgentPool) Delete() error
- func (as *AgentPool) DeleteInstances(instances []*azureRef) error
- func (as *AgentPool) DeleteNodes(nodes []*apiv1.Node) error
- func (as *AgentPool) Exist() bool
- func (m *AgentPool) GetKey() string
- func (as *AgentPool) GetVMIndexes() ([]int, map[int]string, error)
- func (as *AgentPool) GetVirtualMachines() (instances []compute.VirtualMachine, err error)
- func (as *AgentPool) Id() string
- func (as *AgentPool) IncreaseSize(delta int) error
- func (as *AgentPool) MaxSize() int
- func (as *AgentPool) MinSize() int
- func (as *AgentPool) Nodes() ([]string, error)
- func (as *AgentPool) TargetSize() (int, error)
- func (as *AgentPool) TemplateNodeInfo() (*schedulercache.NodeInfo, error)
- type AzureCloudProvider
- func (azure *AzureCloudProvider) Cleanup() error
- func (azure *AzureCloudProvider) GetAvailableMachineTypes() ([]string, error)
- func (azure *AzureCloudProvider) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error)
- func (azure *AzureCloudProvider) Name() string
- func (azure *AzureCloudProvider) NewNodeGroup(machineType string, labels map[string]string, systemLabels map[string]string, ...) (cloudprovider.NodeGroup, error)
- func (azure *AzureCloudProvider) NodeGroupForNode(node *apiv1.Node) (cloudprovider.NodeGroup, error)
- func (azure *AzureCloudProvider) NodeGroups() []cloudprovider.NodeGroup
- func (azure *AzureCloudProvider) Pricing() (cloudprovider.PricingModel, errors.AutoscalerError)
- func (azure *AzureCloudProvider) Refresh() error
- type AzureManager
- func (m *AzureManager) Cleanup()
- func (m *AzureManager) GetAsgForInstance(instance *azureRef) (cloudprovider.NodeGroup, error)
- func (m *AzureManager) Refresh() error
- func (m *AzureManager) RegisterAsg(asg cloudprovider.NodeGroup) bool
- func (m *AzureManager) UnregisterAsg(asg cloudprovider.NodeGroup) bool
- type Config
- type DeploymentsClient
- type DeploymentsClientMock
- func (m *DeploymentsClientMock) CreateOrUpdate(resourceGroupName string, deploymentName string, ...) (<-chan resources.DeploymentExtended, <-chan error)
- func (m *DeploymentsClientMock) ExportTemplate(resourceGroupName string, deploymentName string) (result resources.DeploymentExportResult, err error)
- func (m *DeploymentsClientMock) Get(resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error)
- type DisksClient
- type DisksClientMock
- type InterfacesClient
- type InterfacesClientMock
- type ScaleSet
- func (scaleSet *ScaleSet) Autoprovisioned() bool
- func (scaleSet *ScaleSet) Belongs(node *apiv1.Node) (bool, error)
- func (scaleSet *ScaleSet) Create() error
- func (scaleSet *ScaleSet) Debug() string
- func (scaleSet *ScaleSet) DecreaseTargetSize(delta int) error
- func (scaleSet *ScaleSet) Delete() error
- func (scaleSet *ScaleSet) DeleteInstances(instances []*azureRef) error
- func (scaleSet *ScaleSet) DeleteNodes(nodes []*apiv1.Node) error
- func (scaleSet *ScaleSet) Exist() bool
- func (m *ScaleSet) GetKey() string
- func (scaleSet *ScaleSet) GetScaleSetSize() (int64, error)
- func (scaleSet *ScaleSet) GetScaleSetVms() ([]compute.VirtualMachineScaleSetVM, error)
- func (scaleSet *ScaleSet) Id() string
- func (scaleSet *ScaleSet) IncreaseSize(delta int) error
- func (scaleSet *ScaleSet) MaxSize() int
- func (scaleSet *ScaleSet) MinSize() int
- func (scaleSet *ScaleSet) Nodes() ([]string, error)
- func (scaleSet *ScaleSet) SetScaleSetSize(size int64) error
- func (scaleSet *ScaleSet) TargetSize() (int, error)
- func (scaleSet *ScaleSet) TemplateNodeInfo() (*schedulercache.NodeInfo, error)
- type VirtualMachineScaleSetVMsClient
- type VirtualMachineScaleSetVMsClientMock
- func (m *VirtualMachineScaleSetVMsClientMock) List(resourceGroupName string, virtualMachineScaleSetName string, filter string, ...) (result compute.VirtualMachineScaleSetVMListResult, err error)
- func (m *VirtualMachineScaleSetVMsClientMock) ListNextResults(lastResults compute.VirtualMachineScaleSetVMListResult) (result compute.VirtualMachineScaleSetVMListResult, err error)
- type VirtualMachineScaleSetsClient
- type VirtualMachineScaleSetsClientMock
- func (client *VirtualMachineScaleSetsClientMock) CreateOrUpdate(resourceGroupName string, VMScaleSetName string, ...) (<-chan compute.VirtualMachineScaleSet, <-chan error)
- func (client *VirtualMachineScaleSetsClientMock) DeleteInstances(resourceGroupName string, vmScaleSetName string, ...) (<-chan compute.OperationStatusResponse, <-chan error)
- func (client *VirtualMachineScaleSetsClientMock) Get(resourceGroupName string, vmScaleSetName string) (result compute.VirtualMachineScaleSet, err error)
- func (client *VirtualMachineScaleSetsClientMock) List(resourceGroupName string) (result compute.VirtualMachineScaleSetListResult, err error)
- func (client *VirtualMachineScaleSetsClientMock) ListNextResults(lastResults compute.VirtualMachineScaleSetListResult) (result compute.VirtualMachineScaleSetListResult, err error)
- type VirtualMachinesClient
- type VirtualMachinesClientMock
- func (m *VirtualMachinesClientMock) CreateOrUpdate(resourceGroupName string, VMName string, parameters compute.VirtualMachine, ...) (<-chan compute.VirtualMachine, <-chan error)
- func (m *VirtualMachinesClientMock) Delete(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan compute.OperationStatusResponse, <-chan error)
- func (m *VirtualMachinesClientMock) Get(resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, err error)
- func (m *VirtualMachinesClientMock) List(resourceGroupName string) (result compute.VirtualMachineListResult, err error)
- func (m *VirtualMachinesClientMock) ListNextResults(lastResults compute.VirtualMachineListResult) (result compute.VirtualMachineListResult, err error)
Constants ¶
const (
// ProviderName is the cloud provider name for Azure
ProviderName = "azure"
)
Variables ¶
This section is empty.
Functions ¶
func BuildAzureCloudProvider ¶
func BuildAzureCloudProvider(azureManager *AzureManager, resourceLimiter *cloudprovider.ResourceLimiter) (cloudprovider.CloudProvider, error)
BuildAzureCloudProvider creates new AzureCloudProvider
func GetVMNameIndex ¶
func GetVMNameIndex(osType compute.OperatingSystemTypes, vmName string) (int, error)
GetVMNameIndex return the index of VM in the node pools.
Types ¶
type AccountsClient ¶
type AccountsClient interface {
ListKeys(resourceGroupName string, accountName string) (result storage.AccountListKeysResult, err error)
}
AccountsClient defines needed functions for azure storage.AccountsClient.
type AccountsClientMock ¶
AccountsClientMock mocks for AccountsClient.
func (*AccountsClientMock) ListKeys ¶
func (m *AccountsClientMock) ListKeys(resourceGroupName string, accountName string) (result storage.AccountListKeysResult, err error)
ListKeys get a list of keys by accountName.
type AgentPool ¶
type AgentPool struct {
// contains filtered or unexported fields
}
AgentPool implements NodeGroup interface for agent pools deployed by acs-engine.
func NewAgentPool ¶
func NewAgentPool(spec *dynamic.NodeGroupSpec, az *AzureManager) (*AgentPool, error)
NewAgentPool creates a new AgentPool.
func (*AgentPool) Autoprovisioned ¶
Autoprovisioned returns true if the node group is autoprovisioned.
func (*AgentPool) DecreaseTargetSize ¶
DecreaseTargetSize decreases the target size of the node group. This function doesn't permit to delete any existing node and can be used only to reduce the request for new nodes that have not been yet fulfilled. Delta should be negative. It is assumed that cloud provider will not delete the existing nodes if the size when there is an option to just decrease the target.
func (*AgentPool) Delete ¶
Delete deletes the node group on the cloud provider side. This will be executed only for autoprovisioned node groups, once their size drops to 0.
func (*AgentPool) DeleteInstances ¶
DeleteInstances deletes the given instances. All instances must be controlled by the same ASG.
func (*AgentPool) DeleteNodes ¶
DeleteNodes deletes the nodes from the group.
func (*AgentPool) Exist ¶
Exist checks if the node group really exists on the cloud provider side. Allows to tell the theoretical node group from the real one.
func (*AgentPool) GetKey ¶
func (m *AgentPool) GetKey() string
GetKey returns key of the given azure reference.
func (*AgentPool) GetVMIndexes ¶
GetVMIndexes gets indexes of all virtual machines belongting to the agent pool.
func (*AgentPool) GetVirtualMachines ¶
func (as *AgentPool) GetVirtualMachines() (instances []compute.VirtualMachine, err error)
GetVirtualMachines returns list of nodes for the given agent pool.
func (*AgentPool) IncreaseSize ¶
IncreaseSize increases agent pool size
func (*AgentPool) TargetSize ¶
TargetSize returns the current TARGET size of the node group. It is possible that the number is different from the number of nodes registered in Kubernetes.
func (*AgentPool) TemplateNodeInfo ¶
func (as *AgentPool) TemplateNodeInfo() (*schedulercache.NodeInfo, error)
TemplateNodeInfo returns a node template for this agent pool.
type AzureCloudProvider ¶
type AzureCloudProvider struct {
// contains filtered or unexported fields
}
AzureCloudProvider provides implementation of CloudProvider interface for Azure.
func (*AzureCloudProvider) Cleanup ¶
func (azure *AzureCloudProvider) Cleanup() error
Cleanup stops the go routine that is handling the current view of the ASGs in the form of a cache
func (*AzureCloudProvider) GetAvailableMachineTypes ¶
func (azure *AzureCloudProvider) GetAvailableMachineTypes() ([]string, error)
GetAvailableMachineTypes get all machine types that can be requested from the cloud provider.
func (*AzureCloudProvider) GetResourceLimiter ¶
func (azure *AzureCloudProvider) GetResourceLimiter() (*cloudprovider.ResourceLimiter, error)
GetResourceLimiter returns struct containing limits (max, min) for resources (cores, memory etc.).
func (*AzureCloudProvider) Name ¶
func (azure *AzureCloudProvider) Name() string
Name returns name of the cloud provider.
func (*AzureCloudProvider) NewNodeGroup ¶
func (azure *AzureCloudProvider) NewNodeGroup(machineType string, labels map[string]string, systemLabels map[string]string, extraResources map[string]resource.Quantity) (cloudprovider.NodeGroup, error)
NewNodeGroup builds a theoretical node group based on the node definition provided. The node group is not automatically created on the cloud provider side. The node group is not returned by NodeGroups() until it is created.
func (*AzureCloudProvider) NodeGroupForNode ¶
func (azure *AzureCloudProvider) NodeGroupForNode(node *apiv1.Node) (cloudprovider.NodeGroup, error)
NodeGroupForNode returns the node group for the given node.
func (*AzureCloudProvider) NodeGroups ¶
func (azure *AzureCloudProvider) NodeGroups() []cloudprovider.NodeGroup
NodeGroups returns all node groups configured for this cloud provider.
func (*AzureCloudProvider) Pricing ¶
func (azure *AzureCloudProvider) Pricing() (cloudprovider.PricingModel, errors.AutoscalerError)
Pricing returns pricing model for this cloud provider or error if not available.
func (*AzureCloudProvider) Refresh ¶
func (azure *AzureCloudProvider) Refresh() error
Refresh is called before every main loop and can be used to dynamically update cloud provider state. In particular the list of node groups returned by NodeGroups can change as a result of CloudProvider.Refresh().
type AzureManager ¶
type AzureManager struct {
// contains filtered or unexported fields
}
AzureManager handles Azure communication and data caching.
func CreateAzureManager ¶
func CreateAzureManager(configReader io.Reader, discoveryOpts cloudprovider.NodeGroupDiscoveryOptions) (*AzureManager, error)
CreateAzureManager creates Azure Manager object to work with Azure.
func (*AzureManager) GetAsgForInstance ¶
func (m *AzureManager) GetAsgForInstance(instance *azureRef) (cloudprovider.NodeGroup, error)
GetAsgForInstance returns AsgConfig of the given Instance
func (*AzureManager) Refresh ¶
func (m *AzureManager) Refresh() error
Refresh is called before every main loop and can be used to dynamically update cloud provider state. In particular the list of node groups returned by NodeGroups can change as a result of CloudProvider.Refresh().
func (*AzureManager) RegisterAsg ¶
func (m *AzureManager) RegisterAsg(asg cloudprovider.NodeGroup) bool
RegisterAsg registers an ASG.
func (*AzureManager) UnregisterAsg ¶
func (m *AzureManager) UnregisterAsg(asg cloudprovider.NodeGroup) bool
UnregisterAsg unregisters an ASG.
type Config ¶
type Config struct { Cloud string `json:"cloud" yaml:"cloud"` TenantID string `json:"tenantId" yaml:"tenantId"` SubscriptionID string `json:"subscriptionId" yaml:"subscriptionId"` ResourceGroup string `json:"resourceGroup" yaml:"resourceGroup"` VMType string `json:"vmType" yaml:"vmType"` AADClientID string `json:"aadClientId" yaml:"aadClientId"` AADClientSecret string `json:"aadClientSecret" yaml:"aadClientSecret"` AADClientCertPath string `json:"aadClientCertPath" yaml:"aadClientCertPath"` AADClientCertPassword string `json:"aadClientCertPassword" yaml:"aadClientCertPassword"` UseManagedIdentityExtension bool `json:"useManagedIdentityExtension" yaml:"useManagedIdentityExtension"` // Configs only for standard vmType (agent pools). Deployment string `json:"deployment" yaml:"deployment"` APIServerPrivateKey string `json:"apiServerPrivateKey" yaml:"apiServerPrivateKey"` CAPrivateKey string `json:"caPrivateKey" yaml:"caPrivateKey"` ClientPrivateKey string `json:"clientPrivateKey" yaml:"clientPrivateKey"` KubeConfigPrivateKey string `json:"kubeConfigPrivateKey" yaml:"kubeConfigPrivateKey"` WindowsAdminPassword string `json:"windowsAdminPassword" yaml:"windowsAdminPassword"` // etcd TLS parameters (for acs-engine >= v0.12.0). EtcdClientPrivateKey string `json:"etcdClientPrivateKey" yaml:"etcdClientPrivateKey"` EtcdServerPrivateKey string `json:"etcdServerPrivateKey" yaml:"etcdServerPrivateKey"` }
Config holds the configuration parsed from the --cloud-config flag
type DeploymentsClient ¶
type DeploymentsClient interface { Get(resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error) ExportTemplate(resourceGroupName string, deploymentName string) (result resources.DeploymentExportResult, err error) CreateOrUpdate(resourceGroupName string, deploymentName string, parameters resources.Deployment, cancel <-chan struct{}) (<-chan resources.DeploymentExtended, <-chan error) }
DeploymentsClient defines needed functions for azure network.DeploymentsClient.
type DeploymentsClientMock ¶
type DeploymentsClientMock struct { mock.Mock FakeStore map[string]resources.DeploymentExtended // contains filtered or unexported fields }
DeploymentsClientMock mocks for DeploymentsClient.
func (*DeploymentsClientMock) CreateOrUpdate ¶
func (m *DeploymentsClientMock) CreateOrUpdate(resourceGroupName string, deploymentName string, parameters resources.Deployment, cancel <-chan struct{}) (<-chan resources.DeploymentExtended, <-chan error)
CreateOrUpdate creates or updates the Deployment.
func (*DeploymentsClientMock) ExportTemplate ¶
func (m *DeploymentsClientMock) ExportTemplate(resourceGroupName string, deploymentName string) (result resources.DeploymentExportResult, err error)
ExportTemplate exports the deployment's template.
func (*DeploymentsClientMock) Get ¶
func (m *DeploymentsClientMock) Get(resourceGroupName string, deploymentName string) (result resources.DeploymentExtended, err error)
Get gets the DeploymentExtended by deploymentName.
type DisksClient ¶
type DisksClient interface {
Delete(resourceGroupName string, diskName string, cancel <-chan struct{}) (<-chan disk.OperationStatusResponse, <-chan error)
}
DisksClient defines needed functions for azure disk.DisksClient.
type DisksClientMock ¶
DisksClientMock mocks for DisksClient.
func (*DisksClientMock) Delete ¶
func (m *DisksClientMock) Delete(resourceGroupName string, diskName string, cancel <-chan struct{}) (<-chan disk.OperationStatusResponse, <-chan error)
Delete deletes the disk by diskName.
type InterfacesClient ¶
type InterfacesClient interface {
Delete(resourceGroupName string, networkInterfaceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error)
}
InterfacesClient defines needed functions for azure network.InterfacesClient.
type InterfacesClientMock ¶
InterfacesClientMock mocks for InterfacesClient.
type ScaleSet ¶
type ScaleSet struct {
// contains filtered or unexported fields
}
ScaleSet implements NodeGroup interface.
func NewScaleSet ¶
func NewScaleSet(spec *dynamic.NodeGroupSpec, az *AzureManager) (*ScaleSet, error)
NewScaleSet creates a new NewScaleSet.
func (*ScaleSet) Autoprovisioned ¶
Autoprovisioned returns true if the node group is autoprovisioned.
func (*ScaleSet) DecreaseTargetSize ¶
DecreaseTargetSize decreases the target size of the node group. This function doesn't permit to delete any existing node and can be used only to reduce the request for new nodes that have not been yet fulfilled. Delta should be negative. It is assumed that cloud provider will not delete the existing nodes if the size when there is an option to just decrease the target.
func (*ScaleSet) Delete ¶
Delete deletes the node group on the cloud provider side. This will be executed only for autoprovisioned node groups, once their size drops to 0.
func (*ScaleSet) DeleteInstances ¶
DeleteInstances deletes the given instances. All instances must be controlled by the same ASG.
func (*ScaleSet) DeleteNodes ¶
DeleteNodes deletes the nodes from the group.
func (*ScaleSet) Exist ¶
Exist checks if the node group really exists on the cloud provider side. Allows to tell the theoretical node group from the real one.
func (*ScaleSet) GetKey ¶
func (m *ScaleSet) GetKey() string
GetKey returns key of the given azure reference.
func (*ScaleSet) GetScaleSetSize ¶
GetScaleSetSize gets Scale Set size.
func (*ScaleSet) GetScaleSetVms ¶
func (scaleSet *ScaleSet) GetScaleSetVms() ([]compute.VirtualMachineScaleSetVM, error)
GetScaleSetVms returns list of nodes for the given scale set.
func (*ScaleSet) IncreaseSize ¶
IncreaseSize increases Scale Set size
func (*ScaleSet) SetScaleSetSize ¶
SetScaleSetSize sets ScaleSet size.
func (*ScaleSet) TargetSize ¶
TargetSize returns the current TARGET size of the node group. It is possible that the number is different from the number of nodes registered in Kubernetes.
func (*ScaleSet) TemplateNodeInfo ¶
func (scaleSet *ScaleSet) TemplateNodeInfo() (*schedulercache.NodeInfo, error)
TemplateNodeInfo returns a node template for this scale set.
type VirtualMachineScaleSetVMsClient ¶
type VirtualMachineScaleSetVMsClient interface { List(resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result compute.VirtualMachineScaleSetVMListResult, err error) ListNextResults(lastResults compute.VirtualMachineScaleSetVMListResult) (result compute.VirtualMachineScaleSetVMListResult, err error) }
VirtualMachineScaleSetVMsClient defines needed functions for azure compute.VirtualMachineScaleSetVMsClient.
type VirtualMachineScaleSetVMsClientMock ¶
VirtualMachineScaleSetVMsClientMock mocks for VirtualMachineScaleSetVMsClient.
func (*VirtualMachineScaleSetVMsClientMock) List ¶
func (m *VirtualMachineScaleSetVMsClientMock) List(resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result compute.VirtualMachineScaleSetVMListResult, err error)
List gets a list of VirtualMachineScaleSetVMs.
func (*VirtualMachineScaleSetVMsClientMock) ListNextResults ¶
func (m *VirtualMachineScaleSetVMsClientMock) ListNextResults(lastResults compute.VirtualMachineScaleSetVMListResult) (result compute.VirtualMachineScaleSetVMListResult, err error)
ListNextResults gets more results from previous VirtualMachineScaleSetVMListResult.
type VirtualMachineScaleSetsClient ¶
type VirtualMachineScaleSetsClient interface { Get(resourceGroupName string, vmScaleSetName string) (result compute.VirtualMachineScaleSet, err error) CreateOrUpdate(resourceGroupName string, name string, parameters compute.VirtualMachineScaleSet, cancel <-chan struct{}) (<-chan compute.VirtualMachineScaleSet, <-chan error) DeleteInstances(resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs, cancel <-chan struct{}) (<-chan compute.OperationStatusResponse, <-chan error) List(resourceGroupName string) (result compute.VirtualMachineScaleSetListResult, err error) ListNextResults(lastResults compute.VirtualMachineScaleSetListResult) (result compute.VirtualMachineScaleSetListResult, err error) }
VirtualMachineScaleSetsClient defines needed functions for azure compute.VirtualMachineScaleSetsClient.
type VirtualMachineScaleSetsClientMock ¶
type VirtualMachineScaleSetsClientMock struct { mock.Mock FakeStore map[string]map[string]compute.VirtualMachineScaleSet // contains filtered or unexported fields }
VirtualMachineScaleSetsClientMock mocks for VirtualMachineScaleSetsClient.
func (*VirtualMachineScaleSetsClientMock) CreateOrUpdate ¶
func (client *VirtualMachineScaleSetsClientMock) CreateOrUpdate(resourceGroupName string, VMScaleSetName string, parameters compute.VirtualMachineScaleSet, cancel <-chan struct{}) (<-chan compute.VirtualMachineScaleSet, <-chan error)
CreateOrUpdate creates or updates the VirtualMachineScaleSet.
func (*VirtualMachineScaleSetsClientMock) DeleteInstances ¶
func (client *VirtualMachineScaleSetsClientMock) DeleteInstances(resourceGroupName string, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs, cancel <-chan struct{}) (<-chan compute.OperationStatusResponse, <-chan error)
DeleteInstances deletes a set of instances for specified VirtualMachineScaleSet.
func (*VirtualMachineScaleSetsClientMock) Get ¶
func (client *VirtualMachineScaleSetsClientMock) Get(resourceGroupName string, vmScaleSetName string) (result compute.VirtualMachineScaleSet, err error)
Get gets the VirtualMachineScaleSet by vmScaleSetName.
func (*VirtualMachineScaleSetsClientMock) List ¶
func (client *VirtualMachineScaleSetsClientMock) List(resourceGroupName string) (result compute.VirtualMachineScaleSetListResult, err error)
List get a list of VirtualMachineScaleSets.
func (*VirtualMachineScaleSetsClientMock) ListNextResults ¶
func (client *VirtualMachineScaleSetsClientMock) ListNextResults(lastResults compute.VirtualMachineScaleSetListResult) (result compute.VirtualMachineScaleSetListResult, err error)
ListNextResults gets more results of VirtualMachineScaleSets.
type VirtualMachinesClient ¶
type VirtualMachinesClient interface { Get(resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, err error) Delete(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan compute.OperationStatusResponse, <-chan error) List(resourceGroupName string) (result compute.VirtualMachineListResult, err error) ListNextResults(lastResults compute.VirtualMachineListResult) (result compute.VirtualMachineListResult, err error) }
VirtualMachinesClient defines needed functions for azure compute.VirtualMachinesClient.
type VirtualMachinesClientMock ¶
type VirtualMachinesClientMock struct { mock.Mock FakeStore map[string]map[string]compute.VirtualMachine // contains filtered or unexported fields }
VirtualMachinesClientMock mocks for VirtualMachinesClient.
func (*VirtualMachinesClientMock) CreateOrUpdate ¶
func (m *VirtualMachinesClientMock) CreateOrUpdate(resourceGroupName string, VMName string, parameters compute.VirtualMachine, cancel <-chan struct{}) (<-chan compute.VirtualMachine, <-chan error)
CreateOrUpdate creates or updates the VirtualMachine.
func (*VirtualMachinesClientMock) Delete ¶
func (m *VirtualMachinesClientMock) Delete(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan compute.OperationStatusResponse, <-chan error)
Delete deletes the VirtualMachine by VMName.
func (*VirtualMachinesClientMock) Get ¶
func (m *VirtualMachinesClientMock) Get(resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (result compute.VirtualMachine, err error)
Get gets the VirtualMachine by VMName.
func (*VirtualMachinesClientMock) List ¶
func (m *VirtualMachinesClientMock) List(resourceGroupName string) (result compute.VirtualMachineListResult, err error)
List gets a lit of VirtualMachine inside the resource group.
func (*VirtualMachinesClientMock) ListNextResults ¶
func (m *VirtualMachinesClientMock) ListNextResults(lastResults compute.VirtualMachineListResult) (result compute.VirtualMachineListResult, err error)
ListNextResults gets more results from previous VirtualMachineListResult.