util

package
v0.0.0-...-5eadde7 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

View Source
const (
	NFSiteIDLabel = "nephio.org/nf-site-id"
	NFDeployLabel = "nephio.org/nf-deploy2"
	NFTypeLabel   = "nephio.org/nf-type"
)
View Source
const (
	YamlObjectDelimiter = "---"
)

Variables

This section is empty.

Functions

func GetMatchingYamlNodes

func GetMatchingYamlNodes(nodes []*yaml.RNode, apiversion string, kind string, name string) ([]*yaml.RNode, error)

filter yaml nodes that matches the criteria passed in the parameters. Atleast one of the criteria should be present.

func ParseStringToYamlNode

func ParseStringToYamlNode(s string) ([]*yaml.RNode, error)

Parses string representation of a yaml file into Yaml nodes. The string can have multiple resources and each of them would be parsed into a different yaml node.

func ValidateNFDeploy

func ValidateNFDeploy(nfDeploy v1alpha1.NfDeploy) error

ValidateNFDeploy is the validation function for validating a given NFDeploy An NFDeploy is invalid when - NFDeploy name is empty - Two sites (NFs) with same name are present - NFType is not recognised (Other than AMF/SMF/UPF) - More than one connection is present between two sites - site A is present as connection of site B, but not present in list of sites - site A is present as connection of site B, but site B is not present as

connection of site A

Types

type NFType

type NFType string
const UnspecifiedNFType NFType = "unspecified"

type NamingContext

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

func NewNamingContext

func NewNamingContext(cluster string, nfDeploy string) (NamingContext, error)

returns a new NamingContext object with the given cluster name

func (*NamingContext) GetDeployPackageName

func (c *NamingContext) GetDeployPackageName() string

returns name for the new deployment package for the current NamingContext

func (*NamingContext) GetDeployRepoName

func (c *NamingContext) GetDeployRepoName() string

returns repository name for the new deployment package for the current NamingContext

func (*NamingContext) GetNFDeployActuatorPackageName

func (c *NamingContext) GetNFDeployActuatorPackageName(vendor string, version string, nfType string) string

returns the package name of the Vendor NF actuators manifest for the current NamingContext

func (*NamingContext) GetNFProfilePackageName

func (c *NamingContext) GetNFProfilePackageName() string

returns the package name that stores the NF profiles for the current NamingContext

func (*NamingContext) GetNFProfileRepoName

func (c *NamingContext) GetNFProfileRepoName() string

returns the repository that stores the NF profiles for the current NamingContext

func (*NamingContext) GetNamespace

func (c *NamingContext) GetNamespace() string

returns the namespace for the current NamingContext

func (*NamingContext) GetNfDeployName

func (c *NamingContext) GetNfDeployName() string

GetNfDeployName returns the nfDeploy name for the current NamingContext

func (*NamingContext) GetVendorExtensionPackageName

func (c *NamingContext) GetVendorExtensionPackageName(vendor string, version string, nfType string) string

returns the package name of the Vendor NF extension manifest for the current NamingContext

func (*NamingContext) GetVendorNFManifestsRepoName

func (c *NamingContext) GetVendorNFManifestsRepoName() string

returns the repository that stores the Vendor NF related manifest like actuators and extension package for the current NamingContext

Jump to

Keyboard shortcuts

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