subnet

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 18 Imported by: 5

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 GetSubnetService

func GetSubnetService(service common.Service) *SubnetService

GetSubnetService get singleton SubnetService instance, subnet/subnetset controller share the same instance.

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() error

func (*SubnetService) CreateOrUpdateSubnet

func (service *SubnetService) CreateOrUpdateSubnet(obj client.Object, 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, nsUID string) []model.Tag

func (*SubnetService) GetIPPoolUsage

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

func (*SubnetService) GetSubnetStatus

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

func (*SubnetService) IsOrphanSubnet

func (service *SubnetService) IsOrphanSubnet(subnet model.VpcSubnet, subnetsetIDs sets.String) bool

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

func (*SubnetService) ListSubnetCreatedByCR

func (service *SubnetService) ListSubnetCreatedByCR() []model.VpcSubnet

func (*SubnetService) ListSubnetCreatedBySubnetSet

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

func (*SubnetService) ListSubnetID

func (service *SubnetService) ListSubnetID() sets.String

func (*SubnetService) ListSubnetSetID

func (service *SubnetService) ListSubnetSetID(ctx context.Context) sets.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 added in v0.0.1

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