device

package
v0.0.0-...-8f485f0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package voltha is a generated protocol buffer package.

It is generated from these files:

device.proto

It has these top-level messages:

DeviceType
DeviceTypes
PmConfig
PmGroupConfig
PmConfigs
Port
Ports
Device
Devices

Index

Constants

This section is empty.

Variables

View Source
var PmConfig_PmType_name = map[int32]string{
	0: "COUNTER",
	1: "GUAGE",
	2: "STATE",
}
View Source
var PmConfig_PmType_value = map[string]int32{
	"COUNTER": 0,
	"GUAGE":   1,
	"STATE":   2,
}
View Source
var Port_PortType_name = map[int32]string{
	0: "UNKNOWN",
	1: "ETHERNET_NNI",
	2: "ETHERNET_UNI",
	3: "PON_OLT",
	4: "PON_ONU",
}
View Source
var Port_PortType_value = map[string]int32{
	"UNKNOWN":      0,
	"ETHERNET_NNI": 1,
	"ETHERNET_UNI": 2,
	"PON_OLT":      3,
	"PON_ONU":      4,
}

Functions

This section is empty.

Types

type Device

type Device struct {
	// Voltha's device identifier
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// Device type, refers to one of the registered device types
	Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
	// Is this device a root device. Each logical switch has one root
	// device that is associated with the logical flow switch.
	Root bool `protobuf:"varint,3,opt,name=root" json:"root,omitempty"`
	// Parent device id, in the device tree (for a root device, the parent_id
	// is the logical_device.id)
	ParentId     string `protobuf:"bytes,4,opt,name=parent_id,json=parentId" json:"parent_id,omitempty"`
	ParentPortNo uint32 `protobuf:"varint,20,opt,name=parent_port_no,json=parentPortNo" json:"parent_port_no,omitempty"`
	// Vendor, version, serial number, etc.
	Vendor          string `protobuf:"bytes,5,opt,name=vendor" json:"vendor,omitempty"`
	Model           string `protobuf:"bytes,6,opt,name=model" json:"model,omitempty"`
	HardwareVersion string `protobuf:"bytes,7,opt,name=hardware_version,json=hardwareVersion" json:"hardware_version,omitempty"`
	FirmwareVersion string `protobuf:"bytes,8,opt,name=firmware_version,json=firmwareVersion" json:"firmware_version,omitempty"`
	SoftwareVersion string `protobuf:"bytes,9,opt,name=software_version,json=softwareVersion" json:"software_version,omitempty"`
	SerialNumber    string `protobuf:"bytes,10,opt,name=serial_number,json=serialNumber" json:"serial_number,omitempty"`
	// Addapter that takes care of device
	Adapter string `protobuf:"bytes,11,opt,name=adapter" json:"adapter,omitempty"`
	// Device contact on vlan (if 0, no vlan)
	Vlan uint32 `protobuf:"varint,12,opt,name=vlan" json:"vlan,omitempty"`
	// Types that are valid to be assigned to Address:
	//	*Device_MacAddress
	//	*Device_Ipv4Address
	//	*Device_Ipv6Address
	//	*Device_HostAndPort
	Address       isDevice_Address                    `protobuf_oneof:"address"`
	ProxyAddress  *Device_ProxyAddress                `protobuf:"bytes,19,opt,name=proxy_address,json=proxyAddress" json:"proxy_address,omitempty"`
	AdminState    voltha3.AdminState_AdminState       `protobuf:"varint,16,opt,name=admin_state,json=adminState,enum=voltha.AdminState_AdminState" json:"admin_state,omitempty"`
	OperStatus    voltha3.OperStatus_OperStatus       `protobuf:"varint,17,opt,name=oper_status,json=operStatus,enum=voltha.OperStatus_OperStatus" json:"oper_status,omitempty"`
	Reason        string                              `protobuf:"bytes,22,opt,name=reason" json:"reason,omitempty"`
	ConnectStatus voltha3.ConnectStatus_ConnectStatus `` /* 135-byte string literal not displayed */
	// Device type specific attributes
	Custom     *google_protobuf1.Any   `protobuf:"bytes,64,opt,name=custom" json:"custom,omitempty"`
	Ports      []*Port                 `protobuf:"bytes,128,rep,name=ports" json:"ports,omitempty"`
	Flows      *openflow_13.Flows      `protobuf:"bytes,129,opt,name=flows" json:"flows,omitempty"`
	FlowGroups *openflow_13.FlowGroups `protobuf:"bytes,130,opt,name=flow_groups,json=flowGroups" json:"flow_groups,omitempty"`
	// PmConfigs will eventually converted to a child node of the
	// device to falicitata callbacks and to simplify manipulation.
	PmConfigs *PmConfigs `protobuf:"bytes,131,opt,name=pm_configs,json=pmConfigs" json:"pm_configs,omitempty"`
}

A Physical Device instance

func (*Device) Descriptor

func (*Device) Descriptor() ([]byte, []int)

func (*Device) GetAdapter

func (m *Device) GetAdapter() string

func (*Device) GetAddress

func (m *Device) GetAddress() isDevice_Address

func (*Device) GetAdminState

func (m *Device) GetAdminState() voltha3.AdminState_AdminState

func (*Device) GetConnectStatus

func (m *Device) GetConnectStatus() voltha3.ConnectStatus_ConnectStatus

func (*Device) GetCustom

func (m *Device) GetCustom() *google_protobuf1.Any

func (*Device) GetFirmwareVersion

func (m *Device) GetFirmwareVersion() string

func (*Device) GetFlowGroups

func (m *Device) GetFlowGroups() *openflow_13.FlowGroups

func (*Device) GetFlows

func (m *Device) GetFlows() *openflow_13.Flows

func (*Device) GetHardwareVersion

func (m *Device) GetHardwareVersion() string

func (*Device) GetHostAndPort

func (m *Device) GetHostAndPort() string

func (*Device) GetId

func (m *Device) GetId() string

func (*Device) GetIpv4Address

func (m *Device) GetIpv4Address() string

func (*Device) GetIpv6Address

func (m *Device) GetIpv6Address() string

func (*Device) GetMacAddress

func (m *Device) GetMacAddress() string

func (*Device) GetModel

func (m *Device) GetModel() string

func (*Device) GetOperStatus

func (m *Device) GetOperStatus() voltha3.OperStatus_OperStatus

func (*Device) GetParentId

func (m *Device) GetParentId() string

func (*Device) GetParentPortNo

func (m *Device) GetParentPortNo() uint32

func (*Device) GetPmConfigs

func (m *Device) GetPmConfigs() *PmConfigs

func (*Device) GetPorts

func (m *Device) GetPorts() []*Port

func (*Device) GetProxyAddress

func (m *Device) GetProxyAddress() *Device_ProxyAddress

func (*Device) GetReason

func (m *Device) GetReason() string

func (*Device) GetRoot

func (m *Device) GetRoot() bool

func (*Device) GetSerialNumber

func (m *Device) GetSerialNumber() string

func (*Device) GetSoftwareVersion

func (m *Device) GetSoftwareVersion() string

func (*Device) GetType

func (m *Device) GetType() string

func (*Device) GetVendor

func (m *Device) GetVendor() string

func (*Device) GetVlan

func (m *Device) GetVlan() uint32

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) Reset

func (m *Device) Reset()

func (*Device) String

func (m *Device) String() string

func (*Device) XXX_OneofFuncs

func (*Device) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type DeviceType

type DeviceType struct {
	// Unique name for the device type
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// Name of the adapter that handles device type
	Adapter                     string `protobuf:"bytes,2,opt,name=adapter" json:"adapter,omitempty"`
	AcceptsBulkFlowUpdate       bool   `protobuf:"varint,3,opt,name=accepts_bulk_flow_update,json=acceptsBulkFlowUpdate" json:"accepts_bulk_flow_update,omitempty"`
	AcceptsAddRemoveFlowUpdates bool   `` /* 142-byte string literal not displayed */
}

A Device Type

func (*DeviceType) Descriptor

func (*DeviceType) Descriptor() ([]byte, []int)

func (*DeviceType) GetAcceptsAddRemoveFlowUpdates

func (m *DeviceType) GetAcceptsAddRemoveFlowUpdates() bool

func (*DeviceType) GetAcceptsBulkFlowUpdate

func (m *DeviceType) GetAcceptsBulkFlowUpdate() bool

func (*DeviceType) GetAdapter

func (m *DeviceType) GetAdapter() string

func (*DeviceType) GetId

func (m *DeviceType) GetId() string

func (*DeviceType) ProtoMessage

func (*DeviceType) ProtoMessage()

func (*DeviceType) Reset

func (m *DeviceType) Reset()

func (*DeviceType) String

func (m *DeviceType) String() string

type DeviceTypes

type DeviceTypes struct {
	Items []*DeviceType `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

A plurality of device types

func (*DeviceTypes) Descriptor

func (*DeviceTypes) Descriptor() ([]byte, []int)

func (*DeviceTypes) GetItems

func (m *DeviceTypes) GetItems() []*DeviceType

func (*DeviceTypes) ProtoMessage

func (*DeviceTypes) ProtoMessage()

func (*DeviceTypes) Reset

func (m *DeviceTypes) Reset()

func (*DeviceTypes) String

func (m *DeviceTypes) String() string

type Device_HostAndPort

type Device_HostAndPort struct {
	HostAndPort string `protobuf:"bytes,21,opt,name=host_and_port,json=hostAndPort,oneof"`
}

type Device_Ipv4Address

type Device_Ipv4Address struct {
	Ipv4Address string `protobuf:"bytes,14,opt,name=ipv4_address,json=ipv4Address,oneof"`
}

type Device_Ipv6Address

type Device_Ipv6Address struct {
	Ipv6Address string `protobuf:"bytes,15,opt,name=ipv6_address,json=ipv6Address,oneof"`
}

type Device_MacAddress

type Device_MacAddress struct {
	MacAddress string `protobuf:"bytes,13,opt,name=mac_address,json=macAddress,oneof"`
}

type Device_ProxyAddress

type Device_ProxyAddress struct {
	DeviceId     string `protobuf:"bytes,1,opt,name=device_id,json=deviceId" json:"device_id,omitempty"`
	ChannelId    uint32 `protobuf:"varint,2,opt,name=channel_id,json=channelId" json:"channel_id,omitempty"`
	OnuId        uint32 `protobuf:"varint,3,opt,name=onu_id,json=onuId" json:"onu_id,omitempty"`
	OnuSessionId uint32 `protobuf:"varint,4,opt,name=onu_session_id,json=onuSessionId" json:"onu_session_id,omitempty"`
}

func (*Device_ProxyAddress) Descriptor

func (*Device_ProxyAddress) Descriptor() ([]byte, []int)

func (*Device_ProxyAddress) GetChannelId

func (m *Device_ProxyAddress) GetChannelId() uint32

func (*Device_ProxyAddress) GetDeviceId

func (m *Device_ProxyAddress) GetDeviceId() string

func (*Device_ProxyAddress) GetOnuId

func (m *Device_ProxyAddress) GetOnuId() uint32

func (*Device_ProxyAddress) GetOnuSessionId

func (m *Device_ProxyAddress) GetOnuSessionId() uint32

func (*Device_ProxyAddress) ProtoMessage

func (*Device_ProxyAddress) ProtoMessage()

func (*Device_ProxyAddress) Reset

func (m *Device_ProxyAddress) Reset()

func (*Device_ProxyAddress) String

func (m *Device_ProxyAddress) String() string

type Devices

type Devices struct {
	Items []*Device `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

func (*Devices) Descriptor

func (*Devices) Descriptor() ([]byte, []int)

func (*Devices) GetItems

func (m *Devices) GetItems() []*Device

func (*Devices) ProtoMessage

func (*Devices) ProtoMessage()

func (*Devices) Reset

func (m *Devices) Reset()

func (*Devices) String

func (m *Devices) String() string

type PmConfig

type PmConfig struct {
	Name       string          `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Type       PmConfig_PmType `protobuf:"varint,2,opt,name=type,enum=voltha.PmConfig_PmType" json:"type,omitempty"`
	Enabled    bool            `protobuf:"varint,3,opt,name=enabled" json:"enabled,omitempty"`
	SampleFreq uint32          `protobuf:"varint,4,opt,name=sample_freq,json=sampleFreq" json:"sample_freq,omitempty"`
}

func (*PmConfig) Descriptor

func (*PmConfig) Descriptor() ([]byte, []int)

func (*PmConfig) GetEnabled

func (m *PmConfig) GetEnabled() bool

func (*PmConfig) GetName

func (m *PmConfig) GetName() string

func (*PmConfig) GetSampleFreq

func (m *PmConfig) GetSampleFreq() uint32

func (*PmConfig) GetType

func (m *PmConfig) GetType() PmConfig_PmType

func (*PmConfig) ProtoMessage

func (*PmConfig) ProtoMessage()

func (*PmConfig) Reset

func (m *PmConfig) Reset()

func (*PmConfig) String

func (m *PmConfig) String() string

type PmConfig_PmType

type PmConfig_PmType int32
const (
	PmConfig_COUNTER PmConfig_PmType = 0
	PmConfig_GUAGE   PmConfig_PmType = 1
	PmConfig_STATE   PmConfig_PmType = 2
)

func (PmConfig_PmType) EnumDescriptor

func (PmConfig_PmType) EnumDescriptor() ([]byte, []int)

func (PmConfig_PmType) String

func (x PmConfig_PmType) String() string

type PmConfigs

type PmConfigs struct {
	Id          string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	DefaultFreq uint32 `protobuf:"varint,2,opt,name=default_freq,json=defaultFreq" json:"default_freq,omitempty"`
	// Forces group names and group semantics
	Grouped bool `protobuf:"varint,3,opt,name=grouped" json:"grouped,omitempty"`
	// Allows Pm to set an individual sample frequency
	FreqOverride bool             `protobuf:"varint,4,opt,name=freq_override,json=freqOverride" json:"freq_override,omitempty"`
	Groups       []*PmGroupConfig `protobuf:"bytes,5,rep,name=groups" json:"groups,omitempty"`
	Metrics      []*PmConfig      `protobuf:"bytes,6,rep,name=metrics" json:"metrics,omitempty"`
}

func (*PmConfigs) Descriptor

func (*PmConfigs) Descriptor() ([]byte, []int)

func (*PmConfigs) GetDefaultFreq

func (m *PmConfigs) GetDefaultFreq() uint32

func (*PmConfigs) GetFreqOverride

func (m *PmConfigs) GetFreqOverride() bool

func (*PmConfigs) GetGrouped

func (m *PmConfigs) GetGrouped() bool

func (*PmConfigs) GetGroups

func (m *PmConfigs) GetGroups() []*PmGroupConfig

func (*PmConfigs) GetId

func (m *PmConfigs) GetId() string

func (*PmConfigs) GetMetrics

func (m *PmConfigs) GetMetrics() []*PmConfig

func (*PmConfigs) ProtoMessage

func (*PmConfigs) ProtoMessage()

func (*PmConfigs) Reset

func (m *PmConfigs) Reset()

func (*PmConfigs) String

func (m *PmConfigs) String() string

type PmGroupConfig

type PmGroupConfig struct {
	GroupName string      `protobuf:"bytes,1,opt,name=group_name,json=groupName" json:"group_name,omitempty"`
	GroupFreq uint32      `protobuf:"varint,2,opt,name=group_freq,json=groupFreq" json:"group_freq,omitempty"`
	Enabled   bool        `protobuf:"varint,3,opt,name=enabled" json:"enabled,omitempty"`
	Metrics   []*PmConfig `protobuf:"bytes,4,rep,name=metrics" json:"metrics,omitempty"`
}

func (*PmGroupConfig) Descriptor

func (*PmGroupConfig) Descriptor() ([]byte, []int)

func (*PmGroupConfig) GetEnabled

func (m *PmGroupConfig) GetEnabled() bool

func (*PmGroupConfig) GetGroupFreq

func (m *PmGroupConfig) GetGroupFreq() uint32

func (*PmGroupConfig) GetGroupName

func (m *PmGroupConfig) GetGroupName() string

func (*PmGroupConfig) GetMetrics

func (m *PmGroupConfig) GetMetrics() []*PmConfig

func (*PmGroupConfig) ProtoMessage

func (*PmGroupConfig) ProtoMessage()

func (*PmGroupConfig) Reset

func (m *PmGroupConfig) Reset()

func (*PmGroupConfig) String

func (m *PmGroupConfig) String() string

type Port

type Port struct {
	PortNo     uint32                        `protobuf:"varint,1,opt,name=port_no,json=portNo" json:"port_no,omitempty"`
	Label      string                        `protobuf:"bytes,2,opt,name=label" json:"label,omitempty"`
	Type       Port_PortType                 `protobuf:"varint,3,opt,name=type,enum=voltha.Port_PortType" json:"type,omitempty"`
	AdminState voltha3.AdminState_AdminState `protobuf:"varint,5,opt,name=admin_state,json=adminState,enum=voltha.AdminState_AdminState" json:"admin_state,omitempty"`
	OperStatus voltha3.OperStatus_OperStatus `protobuf:"varint,6,opt,name=oper_status,json=operStatus,enum=voltha.OperStatus_OperStatus" json:"oper_status,omitempty"`
	DeviceId   string                        `protobuf:"bytes,7,opt,name=device_id,json=deviceId" json:"device_id,omitempty"`
	Peers      []*Port_PeerPort              `protobuf:"bytes,8,rep,name=peers" json:"peers,omitempty"`
}

func (*Port) Descriptor

func (*Port) Descriptor() ([]byte, []int)

func (*Port) GetAdminState

func (m *Port) GetAdminState() voltha3.AdminState_AdminState

func (*Port) GetDeviceId

func (m *Port) GetDeviceId() string

func (*Port) GetLabel

func (m *Port) GetLabel() string

func (*Port) GetOperStatus

func (m *Port) GetOperStatus() voltha3.OperStatus_OperStatus

func (*Port) GetPeers

func (m *Port) GetPeers() []*Port_PeerPort

func (*Port) GetPortNo

func (m *Port) GetPortNo() uint32

func (*Port) GetType

func (m *Port) GetType() Port_PortType

func (*Port) ProtoMessage

func (*Port) ProtoMessage()

func (*Port) Reset

func (m *Port) Reset()

func (*Port) String

func (m *Port) String() string

type Port_PeerPort

type Port_PeerPort struct {
	DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId" json:"device_id,omitempty"`
	PortNo   uint32 `protobuf:"varint,2,opt,name=port_no,json=portNo" json:"port_no,omitempty"`
}

func (*Port_PeerPort) Descriptor

func (*Port_PeerPort) Descriptor() ([]byte, []int)

func (*Port_PeerPort) GetDeviceId

func (m *Port_PeerPort) GetDeviceId() string

func (*Port_PeerPort) GetPortNo

func (m *Port_PeerPort) GetPortNo() uint32

func (*Port_PeerPort) ProtoMessage

func (*Port_PeerPort) ProtoMessage()

func (*Port_PeerPort) Reset

func (m *Port_PeerPort) Reset()

func (*Port_PeerPort) String

func (m *Port_PeerPort) String() string

type Port_PortType

type Port_PortType int32
const (
	Port_UNKNOWN      Port_PortType = 0
	Port_ETHERNET_NNI Port_PortType = 1
	Port_ETHERNET_UNI Port_PortType = 2
	Port_PON_OLT      Port_PortType = 3
	Port_PON_ONU      Port_PortType = 4
)

func (Port_PortType) EnumDescriptor

func (Port_PortType) EnumDescriptor() ([]byte, []int)

func (Port_PortType) String

func (x Port_PortType) String() string

type Ports

type Ports struct {
	Items []*Port `protobuf:"bytes,1,rep,name=items" json:"items,omitempty"`
}

func (*Ports) Descriptor

func (*Ports) Descriptor() ([]byte, []int)

func (*Ports) GetItems

func (m *Ports) GetItems() []*Port

func (*Ports) ProtoMessage

func (*Ports) ProtoMessage()

func (*Ports) Reset

func (m *Ports) Reset()

func (*Ports) String

func (m *Ports) String() string

Jump to

Keyboard shortcuts

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