factory

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SMF_EXPECTED_CONFIG_VERSION        = "1.0.0"
	UE_ROUTING_EXPECTED_CONFIG_VERSION = "1.0.0"
)
View Source
const (
	SMF_DEFAULT_IPV4     = "127.0.0.2"
	SMF_DEFAULT_PORT     = "8000"
	SMF_DEFAULT_PORT_INT = 8000
)

Variables

View Source
var (
	SmfConfig       Config
	UERoutingConfig RoutingConfig
)

Functions

func CheckConfigVersion

func CheckConfigVersion() error

func InitConfigFactory

func InitConfigFactory(f string) error

TODO: Support configuration update from REST api

func InitRoutingConfigFactory

func InitRoutingConfigFactory(f string) error

Types

type Config

type Config struct {
	Info          *Info               `yaml:"info"`
	Configuration *Configuration      `yaml:"configuration"`
	Logger        *logger_util.Logger `yaml:"logger"`
}

func (*Config) GetVersion

func (c *Config) GetVersion() string

type Configuration

type Configuration struct {
	SmfName              string               `yaml:"smfName,omitempty"`
	Sbi                  *Sbi                 `yaml:"sbi,omitempty"`
	PFCP                 *PFCP                `yaml:"pfcp,omitempty"`
	NrfUri               string               `yaml:"nrfUri,omitempty"`
	UserPlaneInformation UserPlaneInformation `yaml:"userplane_information"`
	ServiceNameList      []string             `yaml:"serviceNameList,omitempty"`
	SNssaiInfo           []SnssaiInfoItem     `yaml:"snssaiInfos,omitempty"`
	ULCL                 bool                 `yaml:"ulcl,omitempty"`
}

type DNS

type DNS struct {
	IPv4Addr string `yaml:"ipv4,omitempty"`
	IPv6Addr string `yaml:"ipv6,omitempty"`
}

type Info

type Info struct {
	Version     string `yaml:"version,omitempty"`
	Description string `yaml:"description,omitempty"`
}

type InterfaceUpfInfoItem

type InterfaceUpfInfoItem struct {
	InterfaceType   models.UpInterfaceType `yaml:"interfaceType"`
	Endpoints       []string               `yaml:"endpoints"`
	NetworkInstance string                 `yaml:"networkInstance"`
}

type PFCP

type PFCP struct {
	Addr string `yaml:"addr,omitempty"`
	Port uint16 `yaml:"port,omitempty"`
}

type Path

type Path struct {
	DestinationIP   string   `yaml:"DestinationIP,omitempty"`
	DestinationPort string   `yaml:"DestinationPort,omitempty"`
	UPF             []string `yaml:"UPF,omitempty"`
}

type PfdContent

type PfdContent struct {
	// Identifies a PFD of an application identifier.
	PfdID string `yaml:"pfdID,omitempty"`
	// Represents a 3-tuple with protocol, server ip and server port for
	// UL/DL application traffic.
	FlowDescriptions []string `yaml:"flowDescriptions,omitempty"`
	// Indicates a URL or a regular expression which is used to match the
	// significant parts of the URL.
	Urls []string `yaml:"urls,omitempty"`
	// Indicates an FQDN or a regular expression as a domain name matching
	// criteria.
	DomainNames []string `yaml:"domainNames,omitempty"`
}

PfdContent represents the flow of the application

type PfdDataForApp

type PfdDataForApp struct {
	// Identifier of an application.
	AppID string `yaml:"applicationId"`
	// PFDs for the application identifier.
	Pfds []PfdContent `yaml:"pfds"`
	// Caching time for an application identifier.
	CachingTime *time.Time `yaml:"cachingTime,omitempty"`
}

PfdDataForApp represents the PFDs for an application identifier

type RouteProfID

type RouteProfID string

RouteProfID is string providing a Route Profile identifier.

type RouteProfile

type RouteProfile struct {
	// Forwarding Policy ID of the route profile
	ForwardingPolicyID string `yaml:"forwardingPolicyID,omitempty"`
}

RouteProfile maintains the mapping between RouteProfileID and ForwardingPolicyID of UPF

type RoutingConfig

type RoutingConfig struct {
	Info          *Info                        `yaml:"info"`
	UERoutingInfo []*UERoutingInfo             `yaml:"ueRoutingInfo"`
	RouteProf     map[RouteProfID]RouteProfile `yaml:"routeProfile,omitempty"`
	PfdDatas      []*PfdDataForApp             `yaml:"pfdDataForApp,omitempty"`
}

func (*RoutingConfig) GetVersion

func (r *RoutingConfig) GetVersion() string

type Sbi

type Sbi struct {
	Scheme       string `yaml:"scheme"`
	TLS          *TLS   `yaml:"tls"`
	RegisterIPv4 string `yaml:"registerIPv4,omitempty"` // IP that is registered at NRF.
	// IPv6Addr string `yaml:"ipv6Addr,omitempty"`
	BindingIPv4 string `yaml:"bindingIPv4,omitempty"` // IP used to run the server in the node.
	Port        int    `yaml:"port,omitempty"`
}

type SnssaiDnnInfoItem

type SnssaiDnnInfoItem struct {
	Dnn      string `yaml:"dnn"`
	DNS      DNS    `yaml:"dns"`
	UESubnet string `yaml:"ueSubnet"`
}

type SnssaiInfoItem

type SnssaiInfoItem struct {
	SNssai   *models.Snssai      `yaml:"sNssai"`
	DnnInfos []SnssaiDnnInfoItem `yaml:"dnnInfos"`
}

type TLS

type TLS struct {
	PEM string `yaml:"pem,omitempty"`
	Key string `yaml:"key,omitempty"`
}

type UERoutingInfo

type UERoutingInfo struct {
	SUPI     string `yaml:"SUPI,omitempty"`
	AN       string `yaml:"AN,omitempty"`
	PathList []Path `yaml:"PathList,omitempty"`
}
type UPLink struct {
	A string `yaml:"A"`
	B string `yaml:"B"`
}

type UPNode

type UPNode struct {
	Type                 string                     `yaml:"type"`
	NodeID               string                     `yaml:"node_id"`
	ANIP                 string                     `yaml:"an_ip"`
	Dnn                  string                     `yaml:"dnn"`
	SNssaiInfos          []models.SnssaiUpfInfoItem `yaml:"sNssaiUpfInfos,omitempty"`
	InterfaceUpfInfoList []InterfaceUpfInfoItem     `yaml:"interfaces,omitempty"`
}

UPNode represent the user plane node

type UserPlaneInformation

type UserPlaneInformation struct {
	UPNodes map[string]UPNode `yaml:"up_nodes"`
	Links   []UPLink          `yaml:"links"`
}

UserPlaneInformation describe core network userplane information

Jump to

Keyboard shortcuts

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