subnet

package
v0.0.0-...-aba7421 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SUBNETPREFIX = "sub"
)

Variables

View Source
var (
	String = common.String
	Int64  = common.Int64
	Bool   = common.Bool
)
View Source
var (
	MarkedForDelete           = true
	EnforceRevisionCheckParam = false
	ResourceTypeSubnet        = common.ResourceTypeSubnet
	NewConverter              = common.NewConverter

	SubnetTypeError = errors.New("unsupported type")
)

Functions

This section is empty.

Types

type Comparable

type Comparable = common.Comparable

func SubnetToComparable

func SubnetToComparable(subnet *model.VpcSubnet) Comparable

type Subnet

type Subnet model.VpcSubnet

func (*Subnet) Key

func (subnet *Subnet) Key() string

func (*Subnet) Value

func (subnet *Subnet) Value() data.DataValue

type SubnetParameters

type SubnetParameters struct {
	OrgID     string
	ProjectID string
	VPCID     string
}

SubnetParameters stores parameters to CRUD Subnet object

type SubnetService

type SubnetService struct {
	common.Service
	SubnetStore *SubnetStore
}

func InitializeSubnetService

func InitializeSubnetService(service common.Service) (*SubnetService, error)

InitializeSubnetService initialize Subnet service.

func (*SubnetService) BuildSubnetID

func (service *SubnetService) BuildSubnetID(subnet *v1alpha1.Subnet) string

func (*SubnetService) Cleanup

func (service *SubnetService) Cleanup(ctx context.Context) error

func (*SubnetService) CreateOrUpdateSubnet

func (service *SubnetService) CreateOrUpdateSubnet(obj client.Object, vpcInfo common.VPCResourceInfo, tags []model.Tag) (string, error)

func (*SubnetService) DeleteIPAllocation

func (service *SubnetService) DeleteIPAllocation(orgID, projectID, vpcID, subnetID string) error

func (*SubnetService) DeleteSubnet

func (service *SubnetService) DeleteSubnet(nsxSubnet model.VpcSubnet) error

func (*SubnetService) GenerateSubnetNSTags

func (service *SubnetService) GenerateSubnetNSTags(obj client.Object, ns string) []model.Tag

func (*SubnetService) GetIPPoolUsage

func (service *SubnetService) GetIPPoolUsage(subnet *v1alpha1.Subnet) (*model.PolicyPoolUsage, error)

func (*SubnetService) GetSubnetByKey

func (service *SubnetService) GetSubnetByKey(key string) (*model.VpcSubnet, error)

func (*SubnetService) GetSubnetByPath

func (service *SubnetService) GetSubnetByPath(path string) (*model.VpcSubnet, error)

func (*SubnetService) GetSubnetStatus

func (service *SubnetService) GetSubnetStatus(subnet *model.VpcSubnet) ([]model.VpcSubnetStatus, error)

func (*SubnetService) GetSubnetsByIndex

func (service *SubnetService) GetSubnetsByIndex(key, value string) []*model.VpcSubnet

func (*SubnetService) IsOrphanSubnet

func (service *SubnetService) IsOrphanSubnet(subnet model.VpcSubnet, subnetsetIDs sets.Set[string]) bool

check if subnet belongs to a subnetset, if yes, check if that subnetset still exists

func (*SubnetService) ListSubnetCreatedBySubnet

func (service *SubnetService) ListSubnetCreatedBySubnet(id string) []*model.VpcSubnet

func (*SubnetService) ListSubnetCreatedBySubnetSet

func (service *SubnetService) ListSubnetCreatedBySubnetSet(id string) []*model.VpcSubnet

func (*SubnetService) ListSubnetID

func (service *SubnetService) ListSubnetID() sets.Set[string]

func (*SubnetService) ListSubnetSetID

func (service *SubnetService) ListSubnetSetID(ctx context.Context) sets.Set[string]

func (*SubnetService) UpdateSubnetSetStatus

func (service *SubnetService) UpdateSubnetSetStatus(obj *v1alpha1.SubnetSet) error

func (*SubnetService) UpdateSubnetSetTags

func (service *SubnetService) UpdateSubnetSetTags(ns string, vpcSubnets []*model.VpcSubnet, tags []model.Tag) error

func (*SubnetService) WrapHierarchySubnet

func (service *SubnetService) WrapHierarchySubnet(subnet *model.VpcSubnet, vpcInfo *common.VPCResourceInfo) (*model.OrgRoot, error)

WrapHierarchySubnet Wrap the subnet for InfraClient to patch.

type SubnetStore

type SubnetStore struct {
	common.ResourceStore
}

SubnetStore is a store for subnet.

func (*SubnetStore) Apply

func (subnetStore *SubnetStore) Apply(i interface{}) error

func (*SubnetStore) GetByIndex

func (subnetStore *SubnetStore) GetByIndex(key string, value string) []*model.VpcSubnet

func (*SubnetStore) GetByKey

func (subnetStore *SubnetStore) GetByKey(key string) *model.VpcSubnet

Jump to

Keyboard shortcuts

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