azhelpers

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AzurePublicCloudName = "AzurePublicCloud"
)

Variables

This section is empty.

Functions

func GetAzureCloudProviderConfig

func GetAzureCloudProviderConfig(cloudConfig *CloudConfiguration) string

func GetCustomData

func GetCustomData(customData map[string]string, customRunData map[string]string) string

func ResourceNotFound added in v0.1.5

func ResourceNotFound(err error) bool

ResourceNotFound parses the error to check if its a resource not found

Types

type CloudConfiguration

type CloudConfiguration struct {
	CloudName      string
	SubscriptionID string
	ClientID       string
	ClientSecret   string
	TenantID       string
	GroupName      string
	GroupLocation  string
	UserAgent      string
}

func (*CloudConfiguration) CreateDefaultNetworkSecurityGroup

func (c *CloudConfiguration) CreateDefaultNetworkSecurityGroup(ctx context.Context, nsgName string) (network.SecurityGroup, error)

CreateDefaultNetworkSecurityGroup creates a new network security group, without rules (rules can be set later)

func (*CloudConfiguration) CreateInternalLoadBalancer

func (c *CloudConfiguration) CreateInternalLoadBalancer(ctx context.Context, vnetName, subnetName, lbName string) error

CreateLoadBalancer creates a load balancer with 2 inbound NAT rules.

func (*CloudConfiguration) CreateLoadBalancer

func (c *CloudConfiguration) CreateLoadBalancer(ctx context.Context, lbName, pipName string) error

CreateLoadBalancer creates a load balancer with 2 inbound NAT rules.

func (*CloudConfiguration) CreateNIC

func (c *CloudConfiguration) CreateNIC(ctx context.Context, vnetName, subnetName, staticIPAddress, nicName string) (nic network.Interface, err error)

func (*CloudConfiguration) CreateNICWithLoadBalancer

func (c *CloudConfiguration) CreateNICWithLoadBalancer(ctx context.Context, lbName, internallbName, vnetName, subnetName, staticIPAddress, nicName string, natRule int) (nic network.Interface, err error)

func (*CloudConfiguration) CreateNetworkSecurityGroup

func (c *CloudConfiguration) CreateNetworkSecurityGroup(ctx context.Context, nsgName string) (network.SecurityGroup, error)

CreateNetworkSecurityGroup creates a new network security group with rules set for allowing SSH and HTTPS use

func (*CloudConfiguration) CreateOrUpdateResourceGroup

func (c *CloudConfiguration) CreateOrUpdateResourceGroup(ctx context.Context) error

func (*CloudConfiguration) CreatePublicIP

func (c *CloudConfiguration) CreatePublicIP(ctx context.Context, ipName string) (network.PublicIPAddress, error)

func (*CloudConfiguration) CreateRouteTables

func (c *CloudConfiguration) CreateRouteTables(ctx context.Context, routeTableName string) (network.RouteTable, error)

CreateRouteTables creates a new empty route tables

func (*CloudConfiguration) CreateVMSS

func (c *CloudConfiguration) CreateVMSS(ctx context.Context,
	vmssName,
	subnetID string,
	loadbalancerIDs []string,
	natPoolIDs []string,

	customData,
	vmSKUType string,
	count int) error

CreateVMSS creates a new virtual machine scale set with the specified name using the specified vnet and subnet. Username, password, and sshPublicKeyPath determine logon credentials.

func (*CloudConfiguration) CreateVirtualNetworkAndSubnets

func (c *CloudConfiguration) CreateVirtualNetworkAndSubnets(ctx context.Context, vnetName string) error

func (*CloudConfiguration) DeleteNetworkSecurityGroup

func (c *CloudConfiguration) DeleteNetworkSecurityGroup(ctx context.Context, nsgName string) error

DeleteNetworkSecurityGroup deletes an existing network security group

func (*CloudConfiguration) DeleteResourceGroup

func (c *CloudConfiguration) DeleteResourceGroup(ctx context.Context) error

func (*CloudConfiguration) DeleteRouteTables

func (c *CloudConfiguration) DeleteRouteTables(ctx context.Context, routeTableName string) error

DeleteRouteTables deletes an existing routetable

func (*CloudConfiguration) DeleteVMSS

func (c *CloudConfiguration) DeleteVMSS(ctx context.Context, vmssName string) error

DeleteVMSS deallocates the selected VMSS

func (*CloudConfiguration) GetDeploymentsClient

func (c *CloudConfiguration) GetDeploymentsClient() (resources.DeploymentsClient, error)

func (*CloudConfiguration) GetDisksClient

func (c *CloudConfiguration) GetDisksClient() (compute.DisksClient, error)

func (*CloudConfiguration) GetGroupsClient

func (c *CloudConfiguration) GetGroupsClient() (resources.GroupsClient, error)

func (*CloudConfiguration) GetIPClient

func (*CloudConfiguration) GetLBClient

func (*CloudConfiguration) GetLoadBalancer

func (c *CloudConfiguration) GetLoadBalancer(ctx context.Context, lbName string) (network.LoadBalancer, error)

GetLoadBalancer gets info on a loadbalancer

func (*CloudConfiguration) GetNICClient

func (c *CloudConfiguration) GetNICClient() (network.InterfacesClient, error)

func (*CloudConfiguration) GetNSGClient

func (*CloudConfiguration) GetPublicIP

func (c *CloudConfiguration) GetPublicIP(ctx context.Context, ipName string) (network.PublicIPAddress, error)

GetPublicIP returns an existing public IP

func (*CloudConfiguration) GetResourcesClient

func (c *CloudConfiguration) GetResourcesClient() (resources.Client, error)

func (*CloudConfiguration) GetRouteTablesClient

func (c *CloudConfiguration) GetRouteTablesClient() (network.RouteTablesClient, error)

func (*CloudConfiguration) GetSubnet

func (c *CloudConfiguration) GetSubnet(ctx context.Context, vnetName, subnetName string) (network.Subnet, error)

GetSubnet returns an existing subnet from a virtual network

func (*CloudConfiguration) GetSubnetsClient

func (c *CloudConfiguration) GetSubnetsClient() (network.SubnetsClient, error)

func (*CloudConfiguration) GetVMSS

GetVMSS gets the specified VMSS info

func (*CloudConfiguration) GetVMSSClient

func (*CloudConfiguration) GetVMSSExtensionsClient

func (*CloudConfiguration) GetVMSSVMsClient

func (*CloudConfiguration) GetVNETClient

func (c *CloudConfiguration) GetVNETClient() (network.VirtualNetworksClient, error)

func (*CloudConfiguration) GetVNETPeeringsClient

func (c *CloudConfiguration) GetVNETPeeringsClient() (network.VirtualNetworkPeeringsClient, error)

func (*CloudConfiguration) IsValid

func (c *CloudConfiguration) IsValid() bool

func (*CloudConfiguration) ScaleVMSS

func (c *CloudConfiguration) ScaleVMSS(ctx context.Context, vmssName string, customData string, count int) error

Jump to

Keyboard shortcuts

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