sadis

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseConfigUrl   = "/{version}/cfg"
	StaticConfigUrl = "/{version}/static"
	SadisEntryUrl   = "/{version}/subscribers/{ID}"
	SadisBwUrl      = "/{version}/bandwidthprofiles/{ID}"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BandwidthProfileEntries

type BandwidthProfileEntries struct {
	Integration SadisIntegration `json:"integration"`
	Entries     []*SadisBWPEntry `json:"entries,omitempty"`
}

type SadisBWPEntry

type SadisBWPEntry struct {
	// common attributes
	ID  string `json:"id"`
	CBS int    `json:"cbs"`
	CIR int    `json:"cir"`
	// MEF attributes
	AIR int `json:"air,omitempty"`
	EBS int `json:"ebs,omitempty"`
	EIR int `json:"eir,omitempty"`
	// IETF attributes
	GIR int `json:"gir,omitempty"`
	PIR int `json:"pir,omitempty"`
	PBS int `json:"pbs,omitempty"`
}

SADIS BandwithProfile Entry

type SadisConfig

type SadisConfig struct {
	Sadis            SadisEntries            `json:"sadis"`
	BandwidthProfile BandwidthProfileEntries `json:"bandwidthprofile"`
}

SadisConfig is the top-level SADIS configuration struct

func GetSadisConfig

func GetSadisConfig(olt *devices.OltDevice, version string) *SadisConfig

GetSadisConfig returns a full SADIS configuration struct ready to be marshalled into JSON

type SadisEntries

type SadisEntries struct {
	Integration SadisIntegration `json:"integration"`
	Entries     []interface{}    `json:"entries,omitempty"`
}

func GetSadisEntries

func GetSadisEntries(olt *devices.OltDevice, version string) (*SadisEntries, error)

type SadisIntegration

type SadisIntegration struct {
	URL   string `json:"url,omitempty"`
	Cache struct {
		Enabled bool   `json:"enabled"`
		MaxSize int    `json:"maxsize"`
		TTL     string `json:"ttl"`
	} `json:"cache"`
}

type SadisOltEntry

type SadisOltEntry struct {
	ID                 string `json:"id"`
	HardwareIdentifier string `json:"hardwareIdentifier"`
	IPAddress          string `json:"ipAddress"`
	NasID              string `json:"nasId"`
	UplinkPort         int    `json:"uplinkPort"`
	NniDhcpTrapVid     int    `json:"nniDhcpTrapVid,omitempty"`
}

func GetOltEntry

func GetOltEntry(olt *devices.OltDevice) (*SadisOltEntry, error)

type SadisOnuEntryV2 added in v0.0.18

type SadisOnuEntryV2 struct {
	ID         string        `json:"id"`
	NasPortID  string        `json:"nasPortId"`
	CircuitID  string        `json:"circuitId"`
	RemoteID   string        `json:"remoteId"`
	UniTagList []SadisUniTag `json:"uniTagList"` // this can be SadisUniTagAtt, SadisUniTagDt
}

func GetOnuEntryV2 added in v0.0.18

func GetOnuEntryV2(olt *devices.OltDevice, onu *devices.Onu, uniStr string) (*SadisOnuEntryV2, error)

type SadisServer added in v1.5.2

type SadisServer struct {
	Olt *devices.OltDevice
}

func (*SadisServer) ServeBWPEntry added in v1.5.2

func (s *SadisServer) ServeBWPEntry(w http.ResponseWriter, r *http.Request)

func (*SadisServer) ServeBaseConfig added in v1.5.2

func (s *SadisServer) ServeBaseConfig(w http.ResponseWriter, r *http.Request)

func (*SadisServer) ServeEntry added in v1.5.2

func (s *SadisServer) ServeEntry(w http.ResponseWriter, r *http.Request)

func (*SadisServer) ServeStaticConfig added in v1.5.2

func (s *SadisServer) ServeStaticConfig(w http.ResponseWriter, r *http.Request)

type SadisUniTag added in v0.0.18

type SadisUniTag struct {
	UniTagMatch                int    `json:"uniTagMatch,omitempty"`
	PonCTag                    int    `json:"ponCTag,omitempty"`
	PonSTag                    int    `json:"ponSTag,omitempty"`
	TechnologyProfileID        int    `json:"technologyProfileId,omitempty"`
	UpstreamBandwidthProfile   string `json:"upstreamBandwidthProfile,omitempty"`
	DownstreamBandwidthProfile string `json:"downstreamBandwidthProfile,omitempty"`
	IsDhcpRequired             bool   `json:"isDhcpRequired,omitempty"`
	IsIgmpRequired             bool   `json:"isIgmpRequired,omitempty"`
	IsPPPoERequired            bool   `json:"isPppoeRequired,omitempty"`
	ConfiguredMacAddress       string `json:"configuredMacAddress,omitempty"`
	EnableMacLearning          bool   `json:"enableMacLearning,omitempty"`
	UsPonCTagPriority          uint8  `json:"usPonCTagPriority,omitempty"`
	UsPonSTagPriority          uint8  `json:"usPonSTagPriority,omitempty"`
	DsPonCTagPriority          uint8  `json:"dsPonCTagPriority,omitempty"`
	DsPonSTagPriority          uint8  `json:"dsPonSTagPriority,omitempty"`
	ServiceName                string `json:"serviceName,omitempty"`
}

Jump to

Keyboard shortcuts

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