subnets

package
v1.6.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureClient

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

AzureClient contains the Azure go-sdk Client.

func NewClient

func NewClient(auth azure.Authorizer) *AzureClient

NewClient creates a new subnets client from subscription ID.

func (*AzureClient) CreateOrUpdateAsync added in v1.2.0

func (ac *AzureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.ResourceSpecGetter, parameters interface{}) (result interface{}, future azureautorest.FutureAPI, err error)

CreateOrUpdateAsync creates or updates a subnet asynchronously. It sends a PUT request to Azure and if accepted without error, the func will return a Future which can be used to track the ongoing progress of the operation.

func (*AzureClient) DeleteAsync added in v1.2.0

func (ac *AzureClient) DeleteAsync(ctx context.Context, spec azure.ResourceSpecGetter) (future azureautorest.FutureAPI, err error)

DeleteAsync deletes a subnet asynchronously. DeleteAsync sends a DELETE request to Azure and if accepted without error, the func will return a Future which can be used to track the ongoing progress of the operation.

func (*AzureClient) Get

func (ac *AzureClient) Get(ctx context.Context, spec azure.ResourceSpecGetter) (result interface{}, err error)

Get gets the specified subnet by virtual network and resource group.

func (*AzureClient) IsDone added in v1.2.0

func (ac *AzureClient) IsDone(ctx context.Context, future azureautorest.FutureAPI) (bool, error)

IsDone returns true if the long-running operation has completed.

func (*AzureClient) Result added in v1.2.0

func (ac *AzureClient) Result(ctx context.Context, future azureautorest.FutureAPI, futureType string) (result interface{}, err error)

Result fetches the result of a long-running operation future.

type Service

type Service struct {
	Scope SubnetScope
	async.Reconciler
}

Service provides operations on Azure resources.

func New

func New(scope SubnetScope) *Service

New creates a new service.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context) error

Delete deletes the subnet with the provided name.

func (*Service) IsManaged added in v1.3.0

func (s *Service) IsManaged(ctx context.Context) (bool, error)

IsManaged returns true if the route tables' lifecycles are managed.

func (*Service) Name added in v1.3.0

func (s *Service) Name() string

Name returns the service name.

func (*Service) Reconcile

func (s *Service) Reconcile(ctx context.Context) error

Reconcile idempotently creates or updates a subnet.

type SubnetScope

type SubnetScope interface {
	azure.Authorizer
	azure.AsyncStatusUpdater
	UpdateSubnetID(string, string)
	UpdateSubnetCIDRs(string, []string)
	IsVnetManaged() bool
	SubnetSpecs() []azure.ResourceSpecGetter
}

SubnetScope defines the scope interface for a subnet service.

type SubnetSpec added in v1.2.0

type SubnetSpec struct {
	Name              string
	ResourceGroup     string
	SubscriptionID    string
	CIDRs             []string
	VNetName          string
	VNetResourceGroup string
	IsVNetManaged     bool
	RouteTableName    string
	SecurityGroupName string
	Role              infrav1.SubnetRole
	NatGatewayName    string
	ServiceEndpoints  infrav1.ServiceEndpoints
}

SubnetSpec defines the specification for a Subnet.

func (*SubnetSpec) OwnerResourceName added in v1.2.0

func (s *SubnetSpec) OwnerResourceName() string

OwnerResourceName returns the name of the VNet that owns this subnet.

func (*SubnetSpec) Parameters added in v1.2.0

func (s *SubnetSpec) Parameters(existing interface{}) (parameters interface{}, err error)

Parameters returns the parameters for the subnet.

func (*SubnetSpec) ResourceGroupName added in v1.2.0

func (s *SubnetSpec) ResourceGroupName() string

ResourceGroupName returns the name of the resource group of the VNet that owns this subnet.

func (*SubnetSpec) ResourceName added in v1.2.0

func (s *SubnetSpec) ResourceName() string

ResourceName returns the name of the subnet.

Directories

Path Synopsis
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.

Jump to

Keyboard shortcuts

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