virtualnetworks

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Scope VNetScope
	async.Reconciler
	async.Getter
	async.TagsGetter
}

Service provides operations on Azure resources.

func New

func New(scope VNetScope) (*Service, error)

New creates a new service.

func (*Service) Delete

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

Delete deletes the virtual network if it is managed by capz.

func (*Service) IsManaged added in v1.2.0

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

IsManaged returns true if the virtual network has an owned tag with the cluster name as value, meaning that the vnet's lifecycle is 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 virtual network.

type VNetScope

type VNetScope interface {
	azure.Authorizer
	azure.AsyncStatusUpdater
	Vnet() *infrav1.VnetSpec
	VNetSpec() azure.ResourceSpecGetter
	ClusterName() string
	IsVnetManaged() bool
	UpdateSubnetCIDRs(string, []string)
}

VNetScope defines the scope interface for a virtual network service.

type VNetSpec added in v1.2.0

type VNetSpec struct {
	ResourceGroup    string
	Name             string
	CIDRs            []string
	Location         string
	ExtendedLocation *infrav1.ExtendedLocationSpec
	ClusterName      string
	AdditionalTags   infrav1.Tags
}

VNetSpec defines the specification for a Virtual Network.

func (*VNetSpec) OwnerResourceName added in v1.2.0

func (s *VNetSpec) OwnerResourceName() string

OwnerResourceName is a no-op for vnets.

func (*VNetSpec) Parameters added in v1.2.0

func (s *VNetSpec) Parameters(ctx context.Context, existing interface{}) (interface{}, error)

Parameters returns the parameters for the vnet.

func (*VNetSpec) ResourceGroupName added in v1.2.0

func (s *VNetSpec) ResourceGroupName() string

ResourceGroupName returns the name of the resource group.

func (*VNetSpec) ResourceName added in v1.2.0

func (s *VNetSpec) ResourceName() string

ResourceName returns the name of the vnet.

Directories

Path Synopsis
Package mock_virtualnetworks is a generated GoMock package.
Package mock_virtualnetworks is a generated GoMock package.

Jump to

Keyboard shortcuts

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