model

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2019-present Ciena Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

Functions

func GetEnumString

func GetEnumString(msg *dynamic.Message, name string, value int32) string

func GetEnumValue

func GetEnumValue(val *dynamic.Message, name string) string

func SetEnumValue

func SetEnumValue(msg *dynamic.Message, name string, value string)

Types

type Adapter added in v1.0.1

type Adapter struct {
	Id                     string
	Vendor                 string
	Version                string
	LogLevel               string
	LastCommunication      string
	SinceLastCommunication string
}

func (*Adapter) PopulateFrom added in v1.0.1

func (adapter *Adapter) PopulateFrom(val *dynamic.Message)

type ComponentInstance

type ComponentInstance struct {
	Id        string `json:"id"`
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
	Ready     string `json:"ready"`
	Status    string `json:"status"`
	Restarts  int    `json:"restarts"`
	Component string `json:"component"`
	Version   string `json:"version"`
	StartTime string `json:"starttime"`
	Age       string `json:"age"`
}

func (*ComponentInstance) PopulateFrom

func (c *ComponentInstance) PopulateFrom(val corev1.Pod)

type Device added in v1.0.1

type Device struct {
	Id              string        `json:"id"`
	Type            string        `json:"type"`
	Root            bool          `json:"root"`
	ParentId        string        `json:"parentid"`
	ParentPortNo    uint32        `json:"parentportno"`
	Vendor          string        `json:"vendor"`
	Model           string        `json:"model"`
	HardwareVersion string        `json:"hardwareversion"`
	FirmwareVersion string        `json:"firmwareversion"`
	SerialNumber    string        `json:"serialnumber"`
	VendorId        string        `json:"vendorid"`
	Adapter         string        `json:"adapter"`
	Vlan            uint32        `json:"vlan"`
	MacAddress      string        `json:"macaddress"`
	Address         string        `json:"address"`
	ExtraArgs       string        `json:"extraargs"`
	ProxyAddress    *ProxyAddress `json:"proxyaddress,omitempty"`
	AdminState      string        `json:"adminstate"`
	OperStatus      string        `json:"operstatus"`
	Reason          string        `json:"reason"`
	ConnectStatus   string        `json:"connectstatus"`
	Ports           []DevicePort  `json:"ports"`
	Flows           []Flow        `json:"flows"`
}

func (*Device) PopulateFrom added in v1.0.1

func (d *Device) PopulateFrom(val *dynamic.Message)

type DeviceGroup added in v1.0.1

type DeviceGroup struct {
	Id             string   `json:"id"`
	LogicalDevices []string `json:"logicaldevices"`
	Devices        []string `json:"devices"`
}

func (*DeviceGroup) PopulateFrom added in v1.0.1

func (d *DeviceGroup) PopulateFrom(val *dynamic.Message)

type DevicePort added in v1.0.1

type DevicePort struct {
	PortNo     uint32     `json:"portno"`
	Label      string     `json:"label"`
	Type       string     `json:"type"`
	AdminState string     `json:"adminstate"`
	OperStatus string     `json:"operstatus"`
	DeviceId   string     `json:"deviceid"`
	Peers      []PeerPort `json:"peers"`
}

func (*DevicePort) PopulateFrom added in v1.0.1

func (port *DevicePort) PopulateFrom(val *dynamic.Message)

type Flow

type Flow struct {
	Id                     string `json:"id"`
	TableId                uint32 `json:"tableid"`
	DurationSec            uint32 `json:"durationsec"`
	DurationNsec           uint32 `json:"durationnsec"`
	IdleTimeout            uint32 `json:"idletimeout"`
	HardTimeout            uint32 `json:"hardtimeout"`
	PacketCount            uint64 `json:"packetcount"`
	ByteCount              uint64 `json:"bytecount"`
	Priority               uint32 `json:"priority"`
	Cookie                 string `json:"cookie"`
	UnsupportedMatch       string `json:"unsupportedmatch,omitempty"`
	InPort                 string `json:"inport,omitempty"`
	EthType                string `json:"ethtype,omitempty"`
	VlanId                 string `json:"vlanid,omitempty"`
	IpProto                string `json:"ipproto,omitempty"`
	UdpSrc                 string `json:"udpsrc,omitempty"`
	UdpDst                 string `json:"dstsrc,omitempty"`
	Metadata               string `json:"metadata,omitempty"`
	UnsupportedInstruction string `json:"unsupportedinstruction,omitempty"`
	UnsupportedAction      string `json:"unsupportedaction,omitempty"`
	UnsupportedSetField    string `json:"unsupportedsetfield,omitempty"`
	SetVlanId              string `json:"setvlanid,omitempty"`
	PopVlan                string `json:"popvlan,omitempty"`
	PushVlanId             string `json:"pushvlanid,omitempty"`
	Output                 string `json:"output,omitempty"`
	GotoTable              string `json:"gototable,omitempty"`
	WriteMetadata          string `json:"writemetadata,omitempty"`
	ClearActions           string `json:"clear,omitempty"`
	MeterId                string `json:"meter,omitempty"`
	TunnelId               string `json:"tunnelid,omitempty"`
	VlanPcp                string `json:"vlanpcp,omitempty"`
	// contains filtered or unexported fields
}

* This is a partial list of OF match/action values. This list will be * expanded as new fields are needed within VOLTHA * * Strings are used in the output structure so that on output the table * can be "sparsely" populated with "empty" cells as opposed to 0 (zeros) * all over the place.

func (*Flow) Clear

func (f *Flow) Clear(flag FlowFieldFlag)

func (*Flow) Count

func (f *Flow) Count() int

func (*Flow) IsSet

func (f *Flow) IsSet(flag FlowFieldFlag) bool

func (*Flow) PopulateFrom added in v1.0.1

func (f *Flow) PopulateFrom(val *dynamic.Message)

func (*Flow) Populated

func (f *Flow) Populated() FlowFieldFlag

func (*Flow) Reset

func (f *Flow) Reset()

func (*Flow) Set

func (f *Flow) Set(flag FlowFieldFlag)

type FlowFieldFlag

type FlowFieldFlag uint64
const (

	// Define bit flags for flow fields to determine what is set and
	// what is not
	FLOW_FIELD_UNSUPPORTED_MATCH FlowFieldFlag = 1 << iota
	FLOW_FIELD_UNSUPPORTED_INSTRUCTION
	FLOW_FIELD_UNSUPPORTED_ACTION
	FLOW_FIELD_UNSUPPORTED_SET_FIELD
	FLOW_FIELD_ID
	FLOW_FIELD_TABLE_ID
	FLOW_FIELD_DURATION_SEC
	FLOW_FIELD_DURATION_NSEC
	FLOW_FIELD_IDLE_TIMEOUT
	FLOW_FIELD_HARD_TIMEOUT
	FLOW_FIELD_PACKET_COUNT
	FLOW_FIELD_BYTE_COUNT
	FLOW_FIELD_PRIORITY
	FLOW_FIELD_COOKIE
	FLOW_FIELD_IN_PORT
	FLOW_FIELD_ETH_TYPE
	FLOW_FIELD_VLAN_ID
	FLOW_FIELD_IP_PROTO
	FLOW_FIELD_UDP_SRC
	FLOW_FIELD_UDP_DST
	FLOW_FIELD_METADATA
	FLOW_FIELD_SET_VLAN_ID
	FLOW_FIELD_POP_VLAN
	FLOW_FIELD_PUSH_VLAN_ID
	FLOW_FIELD_OUTPUT
	FLOW_FIELD_GOTO_TABLE
	FLOW_FIELD_WRITE_METADATA
	FLOW_FIELD_CLEAR_ACTIONS
	FLOW_FIELD_METER
	FLOW_FIELD_TUNNEL_ID
	FLOW_FIELD_VLAN_PCP

	FLOW_FIELD_HEADER = FLOW_FIELD_ID | FLOW_FIELD_TABLE_ID |
		FLOW_FIELD_PRIORITY | FLOW_FIELD_COOKIE

	FLOW_FIELD_STATS = FLOW_FIELD_DURATION_SEC | FLOW_FIELD_DURATION_NSEC |
		FLOW_FIELD_IDLE_TIMEOUT | FLOW_FIELD_HARD_TIMEOUT |
		FLOW_FIELD_PACKET_COUNT | FLOW_FIELD_BYTE_COUNT
)

func (*FlowFieldFlag) Clear

func (f *FlowFieldFlag) Clear(flag FlowFieldFlag)

func (*FlowFieldFlag) Count

func (f *FlowFieldFlag) Count() int

func (*FlowFieldFlag) IsSet

func (f *FlowFieldFlag) IsSet(flag FlowFieldFlag) bool

func (*FlowFieldFlag) Reset

func (f *FlowFieldFlag) Reset()

func (*FlowFieldFlag) Set

func (f *FlowFieldFlag) Set(flag FlowFieldFlag)

func (FlowFieldFlag) String

func (f FlowFieldFlag) String() string

type LogLevel

type LogLevel struct {
	ComponentName string
	PackageName   string
	Level         string
}

func (*LogLevel) PopulateFrom

func (logLevel *LogLevel) PopulateFrom(val *dynamic.Message)

type LogicalDevice added in v1.0.1

type LogicalDevice struct {
	Id           string `json:"id"`
	DatapathId   string `json:"datapathid"`
	RootDeviceId string `json:"rootdeviceid"`
	SerialNumber string `json:"serialnumber"`
	Features     struct {
		NBuffers     uint32 `json:"nbuffers"`
		NTables      uint32 `json:"ntables"`
		Capabilities string `json:"capabilities"`
	} `json:"features"`
	Ports []LogicalPort `json:"ports"`
	Flows []Flow        `json:"flows"`
}

func (*LogicalDevice) PopulateFrom added in v1.0.1

func (device *LogicalDevice) PopulateFrom(val *dynamic.Message)

type LogicalPort added in v1.0.1

type LogicalPort struct {
	Id           string `json:"id"`
	DeviceId     string `json:"deviceid"`
	DevicePortNo uint32 `json:"deviceportno"`
	RootPort     bool   `json:"rootport"`
	Openflow     struct {
		PortNo   uint32 `json:"portno"`
		HwAddr   string `json:"hwaddr"`
		Name     string `json:"name"`
		Config   string `json:"config"`
		State    string `json:"state"`
		Features struct {
			Advertised string `json:"advertised"`
			Current    string `json:"current"`
			Supported  string `json:"supported"`
			Peer       string `json:"peer"`
		} `json:"features"`
		Bitrate struct {
			Current uint32 `json:"current"`
			Max     uint32 `json:"max"`
		}
	} `json:"openflow"`
}

func (*LogicalPort) PopulateFrom added in v1.0.1

func (port *LogicalPort) PopulateFrom(val *dynamic.Message)

type PeerPort added in v1.0.1

type PeerPort struct {
	DeviceId string `json:"deviceid"`
	PortNo   uint32 `json:"portno"`
}

type ProxyAddress added in v1.0.1

type ProxyAddress struct {
	DeviceId           string `json:"deviceId"`
	DeviceType         string `json:"devicetype,omitempty"`
	ChannelId          uint32 `json:"channelid"`
	ChannelGroupId     uint32 `json:"channelgroup"`
	ChannelTermination string `json:"channeltermination,omitempty"`
	OnuId              uint32 `json:"onuid"`
	OnuSessionId       uint32 `json:"onusessionid"`
}

Jump to

Keyboard shortcuts

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