azure

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureGo

type AzureGo interface {
	InitClient(storage types.StorageFactory) error

	SetRegion(string)

	SetResourceGrp(string)

	ListLocations() ([]string, error)

	ListKubernetesVersions() (armcontainerservice.ManagedClustersClientListKubernetesVersionsResponse, error)

	ListVMTypes() ([]string, error)

	CreateResourceGrp(parameters armresources.ResourceGroup,
		options *armresources.ResourceGroupsClientCreateOrUpdateOptions) (armresources.ResourceGroupsClientCreateOrUpdateResponse, error)

	BeginDeleteResourceGrp(
		options *armresources.ResourceGroupsClientBeginDeleteOptions) (*runtime.Poller[armresources.ResourceGroupsClientDeleteResponse], error)

	BeginCreateVirtNet(virtualNetworkName string, parameters armnetwork.VirtualNetwork,
		options *armnetwork.VirtualNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.VirtualNetworksClientCreateOrUpdateResponse], error)

	BeginDeleteVirtNet(virtualNetworkName string,
		options *armnetwork.VirtualNetworksClientBeginDeleteOptions) (*runtime.Poller[armnetwork.VirtualNetworksClientDeleteResponse], error)

	BeginCreateSubNet(virtualNetworkName string, subnetName string, subnetParameters armnetwork.Subnet,
		options *armnetwork.SubnetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.SubnetsClientCreateOrUpdateResponse], error)

	BeginDeleteSubNet(virtualNetworkName string, subnetName string,
		options *armnetwork.SubnetsClientBeginDeleteOptions) (*runtime.Poller[armnetwork.SubnetsClientDeleteResponse], error)

	BeginDeleteSecurityGrp(networkSecurityGroupName string,
		options *armnetwork.SecurityGroupsClientBeginDeleteOptions) (*runtime.Poller[armnetwork.SecurityGroupsClientDeleteResponse], error)

	BeginCreateSecurityGrp(networkSecurityGroupName string, parameters armnetwork.SecurityGroup,
		options *armnetwork.SecurityGroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.SecurityGroupsClientCreateOrUpdateResponse], error)

	CreateSSHKey(sshPublicKeyName string, parameters armcompute.SSHPublicKeyResource,
		options *armcompute.SSHPublicKeysClientCreateOptions) (armcompute.SSHPublicKeysClientCreateResponse, error)

	DeleteSSHKey(sshPublicKeyName string,
		options *armcompute.SSHPublicKeysClientDeleteOptions) (armcompute.SSHPublicKeysClientDeleteResponse, error)

	BeginCreateVM(vmName string, parameters armcompute.VirtualMachine,
		options *armcompute.VirtualMachinesClientBeginCreateOrUpdateOptions) (*runtime.Poller[armcompute.VirtualMachinesClientCreateOrUpdateResponse], error)

	BeginDeleteVM(vmName string,
		options *armcompute.VirtualMachinesClientBeginDeleteOptions) (*runtime.Poller[armcompute.VirtualMachinesClientDeleteResponse], error)

	BeginDeleteDisk(diskName string,
		options *armcompute.DisksClientBeginDeleteOptions) (*runtime.Poller[armcompute.DisksClientDeleteResponse], error)

	BeginCreatePubIP(publicIPAddressName string, parameters armnetwork.PublicIPAddress,
		options *armnetwork.PublicIPAddressesClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.PublicIPAddressesClientCreateOrUpdateResponse], error)

	BeginDeletePubIP(publicIPAddressName string,
		options *armnetwork.PublicIPAddressesClientBeginDeleteOptions) (*runtime.Poller[armnetwork.PublicIPAddressesClientDeleteResponse], error)

	BeginCreateNIC(networkInterfaceName string, parameters armnetwork.Interface,
		options *armnetwork.InterfacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.InterfacesClientCreateOrUpdateResponse], error)

	BeginDeleteNIC(networkInterfaceName string,
		options *armnetwork.InterfacesClientBeginDeleteOptions) (*runtime.Poller[armnetwork.InterfacesClientDeleteResponse], error)

	BeginDeleteAKS(resourceName string,
		options *armcontainerservice.ManagedClustersClientBeginDeleteOptions) (*runtime.Poller[armcontainerservice.ManagedClustersClientDeleteResponse], error)

	BeginCreateAKS(resourceName string, parameters armcontainerservice.ManagedCluster,
		options *armcontainerservice.ManagedClustersClientBeginCreateOrUpdateOptions) (*runtime.Poller[armcontainerservice.ManagedClustersClientCreateOrUpdateResponse], error)

	ListClusterAdminCredentials(resourceName string,
		options *armcontainerservice.ManagedClustersClientListClusterAdminCredentialsOptions) (armcontainerservice.ManagedClustersClientListClusterAdminCredentialsResponse, error)

	PollUntilDoneDelNSG(ctx context.Context, poll *runtime.Poller[armnetwork.SecurityGroupsClientDeleteResponse], options *runtime.PollUntilDoneOptions) (armnetwork.SecurityGroupsClientDeleteResponse, error)

	PollUntilDoneCreateNSG(ctx context.Context, poll *runtime.Poller[armnetwork.SecurityGroupsClientCreateOrUpdateResponse], options *runtime.PollUntilDoneOptions) (armnetwork.SecurityGroupsClientCreateOrUpdateResponse, error)

	PollUntilDoneDelResourceGrp(ctx context.Context, poll *runtime.Poller[armresources.ResourceGroupsClientDeleteResponse], options *runtime.PollUntilDoneOptions) (armresources.ResourceGroupsClientDeleteResponse, error)

	PollUntilDoneCreateSubNet(ctx context.Context, poll *runtime.Poller[armnetwork.SubnetsClientCreateOrUpdateResponse], options *runtime.PollUntilDoneOptions) (armnetwork.SubnetsClientCreateOrUpdateResponse, error)

	PollUntilDoneDelSubNet(ctx context.Context, poll *runtime.Poller[armnetwork.SubnetsClientDeleteResponse], options *runtime.PollUntilDoneOptions) (armnetwork.SubnetsClientDeleteResponse, error)

	PollUntilDoneCreateVirtNet(ctx context.Context, poll *runtime.Poller[armnetwork.VirtualNetworksClientCreateOrUpdateResponse], options *runtime.PollUntilDoneOptions) (armnetwork.VirtualNetworksClientCreateOrUpdateResponse, error)

	PollUntilDoneDelVirtNet(ctx context.Context, poll *runtime.Poller[armnetwork.VirtualNetworksClientDeleteResponse], options *runtime.PollUntilDoneOptions) (armnetwork.VirtualNetworksClientDeleteResponse, error)

	PollUntilDoneCreateAKS(ctx context.Context, poll *runtime.Poller[armcontainerservice.ManagedClustersClientCreateOrUpdateResponse], options *runtime.PollUntilDoneOptions) (armcontainerservice.ManagedClustersClientCreateOrUpdateResponse, error)

	PollUntilDoneDelAKS(ctx context.Context, poll *runtime.Poller[armcontainerservice.ManagedClustersClientDeleteResponse], options *runtime.PollUntilDoneOptions) (armcontainerservice.ManagedClustersClientDeleteResponse, error)

	PollUntilDoneDelVM(ctx context.Context, poll *runtime.Poller[armcompute.VirtualMachinesClientDeleteResponse], options *runtime.PollUntilDoneOptions) (armcompute.VirtualMachinesClientDeleteResponse, error)

	PollUntilDoneCreateVM(ctx context.Context, poll *runtime.Poller[armcompute.VirtualMachinesClientCreateOrUpdateResponse], options *runtime.PollUntilDoneOptions) (armcompute.VirtualMachinesClientCreateOrUpdateResponse, error)

	PollUntilDoneDelDisk(ctx context.Context, poll *runtime.Poller[armcompute.DisksClientDeleteResponse], options *runtime.PollUntilDoneOptions) (armcompute.DisksClientDeleteResponse, error)

	PollUntilDoneCreatePubIP(ctx context.Context, poll *runtime.Poller[armnetwork.PublicIPAddressesClientCreateOrUpdateResponse], options *runtime.PollUntilDoneOptions) (armnetwork.PublicIPAddressesClientCreateOrUpdateResponse, error)

	PollUntilDoneDelPubIP(ctx context.Context, poll *runtime.Poller[armnetwork.PublicIPAddressesClientDeleteResponse], options *runtime.PollUntilDoneOptions) (armnetwork.PublicIPAddressesClientDeleteResponse, error)

	PollUntilDoneCreateNetInterface(ctx context.Context, poll *runtime.Poller[armnetwork.InterfacesClientCreateOrUpdateResponse], options *runtime.PollUntilDoneOptions) (armnetwork.InterfacesClientCreateOrUpdateResponse, error)

	PollUntilDoneDelNetInterface(ctx context.Context, poll *runtime.Poller[armnetwork.InterfacesClientDeleteResponse], options *runtime.PollUntilDoneOptions) (armnetwork.InterfacesClientDeleteResponse, error)
}

func ProvideClient

func ProvideClient() AzureGo

func ProvideMockClient

func ProvideMockClient() AzureGo

type AzureGoClient

type AzureGoClient struct {
	SubscriptionID string
	AzureTokenCred azcore.TokenCredential
	Region         string
	ResourceGrp    string
}

func (*AzureGoClient) BeginCreateNIC

func (*AzureGoClient) BeginCreateSecurityGrp

func (*AzureGoClient) BeginCreateSubNet

func (azclient *AzureGoClient) BeginCreateSubNet(virtualNetworkName string, subnetName string, subnetParameters armnetwork.Subnet, options *armnetwork.SubnetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.SubnetsClientCreateOrUpdateResponse], error)

func (*AzureGoClient) BeginDeleteDisk

func (*AzureGoClient) BeginDeleteNIC

func (*AzureGoClient) BeginDeletePubIP

func (*AzureGoClient) BeginDeleteSecurityGrp

func (azclient *AzureGoClient) BeginDeleteSecurityGrp(networkSecurityGroupName string, options *armnetwork.SecurityGroupsClientBeginDeleteOptions) (*runtime.Poller[armnetwork.SecurityGroupsClientDeleteResponse], error)

func (*AzureGoClient) BeginDeleteSubNet

func (azclient *AzureGoClient) BeginDeleteSubNet(virtualNetworkName string, subnetName string, options *armnetwork.SubnetsClientBeginDeleteOptions) (*runtime.Poller[armnetwork.SubnetsClientDeleteResponse], error)

func (*AzureGoClient) BeginDeleteVirtNet

func (*AzureGoClient) CreateSSHKey

func (*AzureGoClient) DeleteSSHKey

func (*AzureGoClient) InitClient

func (azclient *AzureGoClient) InitClient(storage types.StorageFactory) error

func (*AzureGoClient) ListLocations

func (azclient *AzureGoClient) ListLocations() ([]string, error)

func (*AzureGoClient) ListVMTypes

func (azclient *AzureGoClient) ListVMTypes() ([]string, error)

func (*AzureGoClient) PollUntilDoneCreateNetInterface

PollUntilDoneCreateNetInterface implements AzureGo.

func (*AzureGoClient) PollUntilDoneCreatePubIP

PollUntilDoneCreatePubIP implements AzureGo.

func (*AzureGoClient) PollUntilDoneCreateVM

PollUntilDoneCreateVM implements AzureGo.

func (*AzureGoClient) PollUntilDoneDelDisk

PollUntilDoneDelDisk implements AzureGo.

func (*AzureGoClient) PollUntilDoneDelNetInterface

PollUntilDoneDelNetInterface implements AzureGo.

func (*AzureGoClient) PollUntilDoneDelPubIP

PollUntilDoneDelPubIP implements AzureGo.

func (*AzureGoClient) PollUntilDoneDelVM

PollUntilDoneDelVM implements AzureGo.

func (*AzureGoClient) PublicIPClient

func (azclient *AzureGoClient) PublicIPClient() (*armnetwork.PublicIPAddressesClient, error)

func (*AzureGoClient) SetRegion

func (azclient *AzureGoClient) SetRegion(reg string)

func (*AzureGoClient) SetResourceGrp

func (azclient *AzureGoClient) SetResourceGrp(grp string)

type AzureGoMockClient

type AzureGoMockClient struct {
	SubscriptionID string
	AzureTokenCred azcore.TokenCredential
	Region         string
	ResourceGrp    string
}

func (*AzureGoMockClient) BeginCreateSubNet

func (mock *AzureGoMockClient) BeginCreateSubNet(virtualNetworkName string, subnetName string, subnetParameters armnetwork.Subnet, options *armnetwork.SubnetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[armnetwork.SubnetsClientCreateOrUpdateResponse], error)

func (*AzureGoMockClient) BeginDeleteDisk

func (*AzureGoMockClient) BeginDeleteNIC

func (*AzureGoMockClient) BeginDeleteSecurityGrp

func (*AzureGoMockClient) BeginDeleteSubNet

func (mock *AzureGoMockClient) BeginDeleteSubNet(virtualNetworkName string, subnetName string, options *armnetwork.SubnetsClientBeginDeleteOptions) (*runtime.Poller[armnetwork.SubnetsClientDeleteResponse], error)

func (*AzureGoMockClient) BeginDeleteVirtNet

func (*AzureGoMockClient) CreateSSHKey

func (*AzureGoMockClient) DeleteSSHKey

func (*AzureGoMockClient) InitClient

func (mock *AzureGoMockClient) InitClient(storage types.StorageFactory) error

func (*AzureGoMockClient) ListLocations

func (mock *AzureGoMockClient) ListLocations() ([]string, error)

func (*AzureGoMockClient) ListVMTypes

func (mock *AzureGoMockClient) ListVMTypes() ([]string, error)

func (*AzureGoMockClient) SetRegion

func (mock *AzureGoMockClient) SetRegion(s string)

func (*AzureGoMockClient) SetResourceGrp

func (mock *AzureGoMockClient) SetResourceGrp(s string)

type AzureProvider

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

func NewClient added in v1.2.0

func NewClient(
	parentCtx context.Context,
	meta types.Metadata,
	parentLogger types.LoggerFactory,
	state *storageTypes.StorageDocument,
	ClientOption func() AzureGo) (*AzureProvider, error)

func (*AzureProvider) Application

func (cloud *AzureProvider) Application(s []string) (externalApps bool)

func (*AzureProvider) CNI

func (cloud *AzureProvider) CNI(s string) (externalCNI bool)

func (*AzureProvider) CreateNetworkInterface

func (obj *AzureProvider) CreateNetworkInterface(ctx context.Context, storage types.StorageFactory,
	nicName string, subnetID string, publicIPID string, networkSecurityGroupID string, index int, role consts.KsctlRole) error

func (*AzureProvider) CreatePublicIP

func (obj *AzureProvider) CreatePublicIP(ctx context.Context, storage types.StorageFactory, publicIPName string, index int, role consts.KsctlRole) error

func (*AzureProvider) CreateSubnet

func (obj *AzureProvider) CreateSubnet(ctx context.Context, storage types.StorageFactory, subnetName string) error

func (*AzureProvider) CreateUploadSSHKeyPair

func (obj *AzureProvider) CreateUploadSSHKeyPair(storage types.StorageFactory) error

CreateUploadSSHKeyPair implements types.CloudFactory.

func (*AzureProvider) CreateVirtualNetwork

func (obj *AzureProvider) CreateVirtualNetwork(ctx context.Context, storage types.StorageFactory, resName string) error

func (*AzureProvider) Credential added in v1.2.0

func (cloud *AzureProvider) Credential(storage types.StorageFactory) error

func (*AzureProvider) DelFirewall

func (obj *AzureProvider) DelFirewall(storage types.StorageFactory) error

DelFirewall implements types.CloudFactory.

func (*AzureProvider) DelManagedCluster

func (obj *AzureProvider) DelManagedCluster(storage types.StorageFactory) error

DelManagedCluster implements types.CloudFactory.

func (*AzureProvider) DelNetwork

func (obj *AzureProvider) DelNetwork(storage types.StorageFactory) error

func (*AzureProvider) DelSSHKeyPair

func (obj *AzureProvider) DelSSHKeyPair(storage types.StorageFactory) error

DelSSHKeyPair implements types.CloudFactory.

func (*AzureProvider) DelVM

func (obj *AzureProvider) DelVM(storage types.StorageFactory, index int) error

func (*AzureProvider) DeleteDisk

func (obj *AzureProvider) DeleteDisk(ctx context.Context, storage types.StorageFactory, index int, role consts.KsctlRole) error

func (*AzureProvider) DeleteNetworkInterface

func (obj *AzureProvider) DeleteNetworkInterface(ctx context.Context, storage types.StorageFactory, index int, role consts.KsctlRole) error

func (*AzureProvider) DeletePublicIP

func (obj *AzureProvider) DeletePublicIP(ctx context.Context, storage types.StorageFactory, index int, role consts.KsctlRole) error

func (*AzureProvider) DeleteSubnet

func (obj *AzureProvider) DeleteSubnet(ctx context.Context, storage types.StorageFactory) error

func (*AzureProvider) DeleteVirtualNetwork

func (obj *AzureProvider) DeleteVirtualNetwork(ctx context.Context, storage types.StorageFactory) error

func (*AzureProvider) GetHostNameAllWorkerNode

func (*AzureProvider) GetHostNameAllWorkerNode() []string

func (*AzureProvider) GetRAWClusterInfos added in v1.2.0

func (obj *AzureProvider) GetRAWClusterInfos(storage types.StorageFactory) ([]cloudcontrolres.AllClusterData, error)

func (*AzureProvider) GetStateFile

func (*AzureProvider) GetStateFile(types.StorageFactory) (string, error)

func (*AzureProvider) GetStateForHACluster

func (*AzureProvider) GetStateForHACluster(storage types.StorageFactory) (cloudcontrolres.CloudResourceState, error)

func (*AzureProvider) InitState

func (obj *AzureProvider) InitState(storage types.StorageFactory, operation consts.KsctlOperation) error

InitState implements types.CloudFactory.

func (*AzureProvider) IsPresent

func (obj *AzureProvider) IsPresent(storage types.StorageFactory) error

func (*AzureProvider) ManagedK8sVersion added in v1.2.0

func (obj *AzureProvider) ManagedK8sVersion(ver string) types.CloudFactory

func (*AzureProvider) Name

func (cloud *AzureProvider) Name(resName string) types.CloudFactory

func (*AzureProvider) NewFirewall

func (obj *AzureProvider) NewFirewall(storage types.StorageFactory) error

func (*AzureProvider) NewManagedCluster

func (obj *AzureProvider) NewManagedCluster(storage types.StorageFactory, noOfNodes int) error

NewManagedCluster implements types.CloudFactory.

func (*AzureProvider) NewNetwork

func (obj *AzureProvider) NewNetwork(storage types.StorageFactory) error

NewNetwork implements types.CloudFactory

func (*AzureProvider) NewVM

func (obj *AzureProvider) NewVM(storage types.StorageFactory, index int) error

func (*AzureProvider) NoOfControlPlane

func (obj *AzureProvider) NoOfControlPlane(no int, setter bool) (int, error)

func (*AzureProvider) NoOfDataStore

func (obj *AzureProvider) NoOfDataStore(no int, setter bool) (int, error)

func (*AzureProvider) NoOfWorkerPlane

func (obj *AzureProvider) NoOfWorkerPlane(storage types.StorageFactory, no int, setter bool) (int, error)

func (*AzureProvider) Role

func (cloud *AzureProvider) Role(resRole consts.KsctlRole) types.CloudFactory

func (*AzureProvider) VMType

func (cloud *AzureProvider) VMType(size string) types.CloudFactory

func (*AzureProvider) Visibility

func (cloud *AzureProvider) Visibility(toBePublic bool) types.CloudFactory

Jump to

Keyboard shortcuts

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