services

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAzureComputeClient

type MockAzureComputeClient struct {
	MockRunCommand                func(resourceGroup string, name string, cmd string) (compute.VirtualMachinesRunCommandFuture, error)
	MockVMIfExists                func(resourceGroup string, name string) (*compute.VirtualMachine, error)
	MockDeleteVM                  func(resourceGroup string, name string) (compute.VirtualMachinesDeleteFuture, error)
	MockWaitForVMRunCommandFuture func(future compute.VirtualMachinesRunCommandFuture) error
	MockWaitForVMDeletionFuture   func(future compute.VirtualMachinesDeleteFuture) error
	MockDeleteManagedDisk         func(resourceGroup string, name string) (compute.DisksDeleteFuture, error)
	MockWaitForDisksDeleteFuture  func(future compute.DisksDeleteFuture) error
}

MockAzureComputeClient is a mock implementation of AzureComputeClient.

func MockDisksDeleteFailure

func MockDisksDeleteFailure() MockAzureComputeClient

MockDisksDeleteFailure mocks the Disks Delete failure response.

func MockDisksDeleteFutureFailure

func MockDisksDeleteFutureFailure() MockAzureComputeClient

MockDisksDeleteFutureFailure mocks the Disks Delete Future failure response.

func MockRunCommandFailure

func MockRunCommandFailure() MockAzureComputeClient

MockRunCommandFailure mocks the RunCommand failure response.

func MockRunCommandFutureFailure

func MockRunCommandFutureFailure() MockAzureComputeClient

MockRunCommandFutureFailure mocks the RunCommand's future failure response.

func MockVMCheckFailure

func MockVMCheckFailure() MockAzureComputeClient

MockVMCheckFailure mocks the VMIfExists failure response

func MockVMDeleteFailure

func MockVMDeleteFailure() MockAzureComputeClient

MockVMDeleteFailure mocks the VMDelete failure response.

func MockVMDeleteFutureFailure

func MockVMDeleteFutureFailure() MockAzureComputeClient

MockVMDeleteFutureFailure mocks the VMDeleteFutureFailure response.

func MockVMExists

func MockVMExists() MockAzureComputeClient

MockVMExists mocks the VMIfExists success response.

func MockVMExistsNICInvalid

func MockVMExistsNICInvalid() MockAzureComputeClient

MockVMExistsNICInvalid mocks the VMIfExists Invalid NIC response.

func MockVMNotExists

func MockVMNotExists() MockAzureComputeClient

MockVMNotExists mocks the VMExists not found response.

func (*MockAzureComputeClient) DeleteManagedDisk

func (m *MockAzureComputeClient) DeleteManagedDisk(resourceGroup string, name string) (compute.DisksDeleteFuture, error)

DeleteManagedDisk deletes a managed disk resource.

func (*MockAzureComputeClient) DeleteVM

func (m *MockAzureComputeClient) DeleteVM(resourceGroup string, name string) (compute.VirtualMachinesDeleteFuture, error)

DeleteVM deletes the virtual machine.

func (*MockAzureComputeClient) RunCommand

func (m *MockAzureComputeClient) RunCommand(resourceGroup string, name string, cmd string) (compute.VirtualMachinesRunCommandFuture, error)

RunCommand executes a command on the VM.

func (*MockAzureComputeClient) VMIfExists

func (m *MockAzureComputeClient) VMIfExists(resourceGroup string, name string) (*compute.VirtualMachine, error)

VMIfExists returns the reference to the VM object if it exists.

func (*MockAzureComputeClient) WaitForDisksDeleteFuture

func (m *MockAzureComputeClient) WaitForDisksDeleteFuture(future compute.DisksDeleteFuture) error

WaitForDisksDeleteFuture waits for the DeleteManagedDisk operation to complete.

func (*MockAzureComputeClient) WaitForVMDeletionFuture

func (m *MockAzureComputeClient) WaitForVMDeletionFuture(future compute.VirtualMachinesDeleteFuture) error

WaitForVMDeletionFuture returns when the DeleteVM operation completes.

func (*MockAzureComputeClient) WaitForVMRunCommandFuture

func (m *MockAzureComputeClient) WaitForVMRunCommandFuture(future compute.VirtualMachinesRunCommandFuture) error

WaitForVMRunCommandFuture returns when the RunCommand operation completes.

type MockAzureNetworkClient

type MockAzureNetworkClient struct {
	MockDeleteNetworkInterface               func(resourceGroup string, networkInterfaceName string) (network.InterfacesDeleteFuture, error)
	MockWaitForNetworkInterfacesDeleteFuture func(future network.InterfacesDeleteFuture) error

	MockCreateOrUpdateNetworkSecurityGroup    func(resourceGroupName string, networkSecurityGroupName string, location string) (*network.SecurityGroupsCreateOrUpdateFuture, error)
	MockNetworkSGIfExists                     func(resourceGroupName string, networkSecurityGroupName string) (*network.SecurityGroup, error)
	MockWaitForNetworkSGsCreateOrUpdateFuture func(future network.SecurityGroupsCreateOrUpdateFuture) error

	MockCreateOrUpdatePublicIPAddress      func(resourceGroup string, IPName string) (network.PublicIPAddress, error)
	MockDeletePublicIPAddress              func(resourceGroup string, IPName string) (network.PublicIPAddressesDeleteFuture, error)
	MockWaitForPublicIPAddressDeleteFuture func(future network.PublicIPAddressesDeleteFuture) error

	MockCreateOrUpdateVnet              func(resourceGroupName string, virtualNetworkName string, location string) (*network.VirtualNetworksCreateOrUpdateFuture, error)
	MockWaitForVnetCreateOrUpdateFuture func(future network.VirtualNetworksCreateOrUpdateFuture) error
}

MockAzureNetworkClient is a mock implementation of MockAzureNetworkClient.

func MockCreateOrUpdatePublicIPAddress

func MockCreateOrUpdatePublicIPAddress(ip string) MockAzureNetworkClient

MockCreateOrUpdatePublicIPAddress mocks the CreateOrUpdatePublicIPAddress success response.

func MockCreateOrUpdatePublicIPAddressFailure

func MockCreateOrUpdatePublicIPAddressFailure() MockAzureNetworkClient

MockCreateOrUpdatePublicIPAddressFailure mocks the CreateOrUpdatePublicIPAddress failure response.

func MockNicDeleteFailure

func MockNicDeleteFailure() MockAzureNetworkClient

MockNicDeleteFailure mocks the InterfacesDelete failure response.

func MockNicDeleteFutureFailure

func MockNicDeleteFutureFailure() MockAzureNetworkClient

MockNicDeleteFutureFailure mocks the InterfacesDelete future failure response.

func MockNsgCreateOrUpdateFailure

func MockNsgCreateOrUpdateFailure() MockAzureNetworkClient

MockNsgCreateOrUpdateFailure SecurityGroupsCreateOrUpdateFuture failure response.

func MockNsgCreateOrUpdateFutureFailure

func MockNsgCreateOrUpdateFutureFailure() MockAzureNetworkClient

MockNsgCreateOrUpdateFutureFailure mocks the SecurityGroupsCreateOrUpdateSuccess future failure response.

func MockNsgCreateOrUpdateSuccess

func MockNsgCreateOrUpdateSuccess() MockAzureNetworkClient

MockNsgCreateOrUpdateSuccess mocks the SecurityGroupsCreateOrUpdateFuture response.

func MockPublicIPDeleteFailure

func MockPublicIPDeleteFailure() MockAzureNetworkClient

MockPublicIPDeleteFailure mocks the PublicIPDeleteFailure response.

func MockPublicIPDeleteFutureFailure

func MockPublicIPDeleteFutureFailure() MockAzureNetworkClient

MockPublicIPDeleteFutureFailure mocks the PublicIPDeleteFailure future response.

func MockVnetCreateOrUpdateFailure

func MockVnetCreateOrUpdateFailure() MockAzureNetworkClient

MockVnetCreateOrUpdateFailure mocks the VnetCreateOrUpdateSuccess failure response.

func MockVnetCreateOrUpdateFutureFailure

func MockVnetCreateOrUpdateFutureFailure() MockAzureNetworkClient

MockVnetCreateOrUpdateFutureFailure mocks the VnetCreateOrUpdate future failure response.

func MockVnetCreateOrUpdateSuccess

func MockVnetCreateOrUpdateSuccess() MockAzureNetworkClient

MockVnetCreateOrUpdateSuccess mocks the VnetCreateOrUpdateSuccess response.

func (*MockAzureNetworkClient) CreateOrUpdateNetworkSecurityGroup

func (m *MockAzureNetworkClient) CreateOrUpdateNetworkSecurityGroup(resourceGroupName string, networkSecurityGroupName string, location string) (*network.SecurityGroupsCreateOrUpdateFuture, error)

CreateOrUpdateNetworkSecurityGroup creates or updates the NSG resource.

func (*MockAzureNetworkClient) CreateOrUpdatePublicIPAddress

func (m *MockAzureNetworkClient) CreateOrUpdatePublicIPAddress(resourceGroup string, IPName string) (network.PublicIPAddress, error)

CreateOrUpdatePublicIPAddress retrieves the reference of the PublicIPAddress resource.

func (*MockAzureNetworkClient) CreateOrUpdateVnet

func (m *MockAzureNetworkClient) CreateOrUpdateVnet(resourceGroupName string, virtualNetworkName string, location string) (*network.VirtualNetworksCreateOrUpdateFuture, error)

CreateOrUpdateVnet creates or updates the vnet resource.

func (*MockAzureNetworkClient) DeleteNetworkInterface

func (m *MockAzureNetworkClient) DeleteNetworkInterface(resourceGroup string, networkInterfaceName string) (network.InterfacesDeleteFuture, error)

DeleteNetworkInterface deletes the NIC resource.

func (*MockAzureNetworkClient) DeletePublicIPAddress

func (m *MockAzureNetworkClient) DeletePublicIPAddress(resourceGroup string, IPName string) (network.PublicIPAddressesDeleteFuture, error)

DeletePublicIPAddress deletes the PublicIPAddress resource.

func (*MockAzureNetworkClient) NetworkSGIfExists

func (m *MockAzureNetworkClient) NetworkSGIfExists(resourceGroupName string, networkSecurityGroupName string) (*network.SecurityGroup, error)

NetworkSGIfExists returns the nsg resource reference if it exists.

func (*MockAzureNetworkClient) WaitForNetworkInterfacesDeleteFuture

func (m *MockAzureNetworkClient) WaitForNetworkInterfacesDeleteFuture(future network.InterfacesDeleteFuture) error

WaitForNetworkInterfacesDeleteFuture returns when the DeleteNetworkInterface operation completes.

func (*MockAzureNetworkClient) WaitForNetworkSGsCreateOrUpdateFuture

func (m *MockAzureNetworkClient) WaitForNetworkSGsCreateOrUpdateFuture(future network.SecurityGroupsCreateOrUpdateFuture) error

WaitForNetworkSGsCreateOrUpdateFuture returns when the CreateOrUpdateNetworkSecurityGroup operation completes.

func (*MockAzureNetworkClient) WaitForPublicIPAddressDeleteFuture

func (m *MockAzureNetworkClient) WaitForPublicIPAddressDeleteFuture(future network.PublicIPAddressesDeleteFuture) error

WaitForPublicIPAddressDeleteFuture returns when the DeletePublicIPAddress completes.

func (*MockAzureNetworkClient) WaitForVnetCreateOrUpdateFuture

func (m *MockAzureNetworkClient) WaitForVnetCreateOrUpdateFuture(future network.VirtualNetworksCreateOrUpdateFuture) error

WaitForVnetCreateOrUpdateFuture returns when the CreateOrUpdateVnet operation completes.

type MockAzureResourcesClient

type MockAzureResourcesClient struct {
	MockCreateOrUpdateGroup       func(resourceGroupName string, location string) (resources.Group, error)
	MockDeleteGroup               func(resourceGroupName string) (resources.GroupsDeleteFuture, error)
	MockCheckGroupExistence       func(rgName string) (autorest.Response, error)
	MockWaitForGroupsDeleteFuture func(future resources.GroupsDeleteFuture) error

	MockCreateOrUpdateDeployment               func(machine *clusterv1.Machine, clusterConfig *providerv1.AzureClusterProviderSpec, machineConfig *providerv1.AzureMachineProviderSpec) (*resources.DeploymentsCreateOrUpdateFuture, error)
	MockGetDeploymentResult                    func(future resources.DeploymentsCreateOrUpdateFuture) (de resources.DeploymentExtended, err error)
	MockValidateDeployment                     func(machine *clusterv1.Machine, clusterConfig *providerv1.AzureClusterProviderSpec, machineConfig *providerv1.AzureMachineProviderSpec) error
	MockWaitForDeploymentsCreateOrUpdateFuture func(future resources.DeploymentsCreateOrUpdateFuture) error
}

MockAzureResourcesClient is a mock implementation of MockAzureResourcesClient.

func MockDeloymentGetResultFailure

func MockDeloymentGetResultFailure() MockAzureResourcesClient

MockDeloymentGetResultFailure mocks the DeploymentGetResult failure response.

func MockDeloymentGetResultSuccess

func MockDeloymentGetResultSuccess() MockAzureResourcesClient

MockDeloymentGetResultSuccess mocks the DeploymentGetResult success response.

func MockDeploymentCreateOrUpdateFailure

func MockDeploymentCreateOrUpdateFailure() MockAzureResourcesClient

MockDeploymentCreateOrUpdateFailure mocks the DeploymentCreateOrUpdate failure response.

func MockDeploymentCreateOrUpdateFutureFailure

func MockDeploymentCreateOrUpdateFutureFailure() MockAzureResourcesClient

MockDeploymentCreateOrUpdateFutureFailure mocks the DeploymentCreateOrUpdate future failure response.

func MockDeploymentCreateOrUpdateSuccess

func MockDeploymentCreateOrUpdateSuccess() MockAzureResourcesClient

MockDeploymentCreateOrUpdateSuccess mocks the DeploymentCreateOrUpdate success response.

func MockDeploymentValidate

func MockDeploymentValidate() MockAzureResourcesClient

MockDeploymentValidate mocks the DeploymentValidate error response.

func MockRgCheckFailure

func MockRgCheckFailure() MockAzureResourcesClient

MockRgCheckFailure mocks the CheckGroupExistence failure response.

func MockRgCreateOrUpdateFailure

func MockRgCreateOrUpdateFailure() MockAzureResourcesClient

MockRgCreateOrUpdateFailure mocks the CheckGroupExistence future failure response.

func MockRgDeleteFailure

func MockRgDeleteFailure() MockAzureResourcesClient

MockRgDeleteFailure mocks the groups delete response.

func MockRgDeleteFutureFailure

func MockRgDeleteFutureFailure() MockAzureResourcesClient

MockRgDeleteFutureFailure mocks the WaitForGroupsDeleteFuture failure response.

func MockRgDeleteSuccess

func MockRgDeleteSuccess() MockAzureResourcesClient

MockRgDeleteSuccess mocks the WaitForGroupsDeleteFuture response

func MockRgExists

func MockRgExists() MockAzureResourcesClient

MockRgExists mocks the CheckGroupExistence response.

func MockRgNotExists

func MockRgNotExists() MockAzureResourcesClient

MockRgNotExists mocks the CheckGroupExistence not found response.

func (*MockAzureResourcesClient) CheckGroupExistence

func (m *MockAzureResourcesClient) CheckGroupExistence(rgName string) (autorest.Response, error)

CheckGroupExistence checks if a resource group with name 'rgName' exists.

func (*MockAzureResourcesClient) CreateOrUpdateDeployment

CreateOrUpdateDeployment creates or updates an ARM deployment.

func (*MockAzureResourcesClient) CreateOrUpdateGroup

func (m *MockAzureResourcesClient) CreateOrUpdateGroup(resourceGroupName string, location string) (resources.Group, error)

CreateOrUpdateGroup creates or updates an azure resource group.

func (*MockAzureResourcesClient) DeleteGroup

func (m *MockAzureResourcesClient) DeleteGroup(resourceGroupName string) (resources.GroupsDeleteFuture, error)

DeleteGroup deletes an azure resource group.

func (*MockAzureResourcesClient) GetDeploymentResult

GetDeploymentResult retrives an existing ARM deployment reference.

func (*MockAzureResourcesClient) ValidateDeployment

func (m *MockAzureResourcesClient) ValidateDeployment(machine *clusterv1.Machine, clusterConfig *providerv1.AzureClusterProviderSpec, machineConfig *providerv1.AzureMachineProviderSpec) error

ValidateDeployment validates an ARM deployment.

func (*MockAzureResourcesClient) WaitForDeploymentsCreateOrUpdateFuture

func (m *MockAzureResourcesClient) WaitForDeploymentsCreateOrUpdateFuture(future resources.DeploymentsCreateOrUpdateFuture) error

WaitForDeploymentsCreateOrUpdateFuture returns when the CreateOrUpdateDeployment operation completes.

func (*MockAzureResourcesClient) WaitForGroupsDeleteFuture

func (m *MockAzureResourcesClient) WaitForGroupsDeleteFuture(future resources.GroupsDeleteFuture) error

WaitForGroupsDeleteFuture returns when the DeleteGroup operation completes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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