VOL-1558 Implementation of openolt adapter with dep for dependency management
Also updated the build system to take this into account.
Currently dep ensure fails due to missing libraries in voltha-go, but the vendor folder has been updated otherwise.
This can be worked around in development using the LOCAL_VOLTHAGO variable described in the readme
This does not build currrently, but that is due to missing code in voltha-go master.
This pattern is consistent with how voltha-go does things, but does not leave you dependent on it to build.
See the readme for how to use dep.
The resourcemanager file is no longer hidden.
Change-Id: I25b8472dbc517b193970597c9f43ddff18c2d89f
diff --git a/vendor/github.com/opencord/voltha-go/adapters/README.md b/vendor/github.com/opencord/voltha-go/adapters/README.md
new file mode 100644
index 0000000..13479f8
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/adapters/README.md
@@ -0,0 +1,10 @@
+## How to Build and Run a Voltha Go language Adapter
+
+This directory is a repo for all voltha adapters written in Go language. At this time, the simulated_olt and
+simulated_onu adapters are the only adapters using the Go language. These adapters provide basic capabilities
+which will be used for high availability and capacity testing.
+
+### Building and running the Simulated OLT and ONU Adapters
+
+Please refer to the ```BUILD.md``` file under the voltha-go repo
+
diff --git a/vendor/github.com/opencord/voltha-go/adapters/common/adapter_proxy.go b/vendor/github.com/opencord/voltha-go/adapters/common/adapter_proxy.go
new file mode 100644
index 0000000..13b98b0
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/adapters/common/adapter_proxy.go
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package common
+
+import (
+ "context"
+ "github.com/golang/protobuf/proto"
+ "github.com/golang/protobuf/ptypes"
+ "github.com/golang/protobuf/ptypes/any"
+ "github.com/google/uuid"
+ "github.com/opencord/voltha-go/common/log"
+ "github.com/opencord/voltha-go/kafka"
+ ic "github.com/opencord/voltha-protos/go/inter_container"
+ "time"
+)
+
+type AdapterProxy struct {
+ kafkaICProxy *kafka.InterContainerProxy
+ adapterTopic string
+ coreTopic string
+}
+
+func NewAdapterProxy(kafkaProxy *kafka.InterContainerProxy, adapterTopic string, coreTopic string) *AdapterProxy {
+ var proxy AdapterProxy
+ proxy.kafkaICProxy = kafkaProxy
+ proxy.adapterTopic = adapterTopic
+ proxy.coreTopic = coreTopic
+ log.Debugw("TOPICS", log.Fields{"core": proxy.coreTopic, "adapter": proxy.adapterTopic})
+ return &proxy
+}
+
+func (ap *AdapterProxy) SendInterAdapterMessage(ctx context.Context,
+ msg proto.Message,
+ msgType ic.InterAdapterMessageType_Types,
+ fromAdapter string,
+ toAdapter string,
+ toDeviceId string,
+ proxyDeviceId string,
+ messageId string) error {
+ log.Debugw("sending-inter-adapter-message", log.Fields{"type": msgType, "from": fromAdapter,
+ "to": toAdapter, "toDevice": toDeviceId, "proxyDevice": proxyDeviceId})
+
+ //Marshal the message
+ var marshalledMsg *any.Any
+ var err error
+ if marshalledMsg, err = ptypes.MarshalAny(msg); err != nil {
+ log.Warnw("cannot-marshal-msg", log.Fields{"error": err})
+ return err
+ }
+
+ //Build the inter adapter message
+ header := &ic.InterAdapterHeader{
+ Type: msgType,
+ FromTopic: fromAdapter,
+ ToTopic: toAdapter,
+ ToDeviceId: toDeviceId,
+ ProxyDeviceId: proxyDeviceId,
+ }
+ if messageId != "" {
+ header.Id = messageId
+ } else {
+ header.Id = uuid.New().String()
+ }
+ header.Timestamp = time.Now().Unix()
+ iaMsg := &ic.InterAdapterMessage{
+ Header: header,
+ Body: marshalledMsg,
+ }
+ args := make([]*kafka.KVArg, 1)
+ args[0] = &kafka.KVArg{
+ Key: "msg",
+ Value: iaMsg,
+ }
+
+ // Set up the required rpc arguments
+ topic := kafka.Topic{Name: fromAdapter}
+ replyToTopic := kafka.Topic{Name: toAdapter}
+ rpc := "Process_inter_adapter_message"
+
+ success, result := ap.kafkaICProxy.InvokeRPC(ctx, rpc, &topic, &replyToTopic, true, proxyDeviceId, args...)
+ log.Debugw("inter-adapter-msg-response", log.Fields{"replyTopic": replyToTopic, "success": success})
+ return unPackResponse(rpc, "", success, result)
+}
diff --git a/vendor/github.com/opencord/voltha-go/adapters/common/core_proxy.go b/vendor/github.com/opencord/voltha-go/adapters/common/core_proxy.go
new file mode 100644
index 0000000..137877f
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/adapters/common/core_proxy.go
@@ -0,0 +1,236 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package common
+
+import (
+ "context"
+ "github.com/golang/protobuf/ptypes"
+ a "github.com/golang/protobuf/ptypes/any"
+ "github.com/opencord/voltha-go/common/log"
+ "github.com/opencord/voltha-go/kafka"
+ ic "github.com/opencord/voltha-protos/go/inter_container"
+ "github.com/opencord/voltha-protos/go/voltha"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+ "sync"
+)
+
+type CoreProxy struct {
+ kafkaICProxy *kafka.InterContainerProxy
+ adapterTopic string
+ coreTopic string
+ deviceIdCoreMap map[string]string
+ lockDeviceIdCoreMap sync.RWMutex
+
+}
+
+func NewCoreProxy(kafkaProxy *kafka.InterContainerProxy, adapterTopic string, coreTopic string) *CoreProxy {
+ var proxy CoreProxy
+ proxy.kafkaICProxy = kafkaProxy
+ proxy.adapterTopic = adapterTopic
+ proxy.coreTopic = coreTopic
+ proxy.deviceIdCoreMap = make(map[string]string)
+ proxy.lockDeviceIdCoreMap = sync.RWMutex{}
+ log.Debugw("TOPICS", log.Fields{"core": proxy.coreTopic, "adapter": proxy.adapterTopic})
+
+ return &proxy
+}
+
+func unPackResponse(rpc string, deviceId string, success bool, response *a.Any) error {
+ if success {
+ return nil
+ } else {
+ unpackResult := &ic.Error{}
+ var err error
+ if err = ptypes.UnmarshalAny(response, unpackResult); err != nil {
+ log.Warnw("cannot-unmarshal-response", log.Fields{"error": err})
+ }
+ log.Debugw("response", log.Fields{"rpc": rpc, "deviceId": deviceId, "success": success, "error": err})
+ // TODO: Need to get the real error code
+ return status.Errorf(codes.Canceled, "%s", unpackResult.Reason)
+ }
+}
+
+// UpdateCoreReference adds or update a core reference (really the topic name) for a given device Id
+func (ap *CoreProxy) UpdateCoreReference(deviceId string, coreReference string) {
+ ap.lockDeviceIdCoreMap.Lock()
+ defer ap.lockDeviceIdCoreMap.Unlock()
+ ap.deviceIdCoreMap[deviceId] = coreReference
+}
+
+// DeleteCoreReference removes a core reference (really the topic name) for a given device Id
+func (ap *CoreProxy) DeleteCoreReference(deviceId string) {
+ ap.lockDeviceIdCoreMap.Lock()
+ defer ap.lockDeviceIdCoreMap.Unlock()
+ delete(ap.deviceIdCoreMap, deviceId)
+}
+
+func (ap *CoreProxy) getCoreTopic(deviceId string) kafka.Topic {
+ ap.lockDeviceIdCoreMap.Lock()
+ defer ap.lockDeviceIdCoreMap.Unlock()
+
+ if t, exist := ap.deviceIdCoreMap[deviceId]; exist {
+ return kafka.Topic{Name: t}
+ }
+
+ return kafka.Topic{Name: ap.coreTopic}
+}
+
+func (ap *CoreProxy) getAdapterTopic(args ...string) kafka.Topic {
+ return kafka.Topic{Name: ap.adapterTopic}
+}
+
+func (ap *CoreProxy) RegisterAdapter(ctx context.Context, adapter *voltha.Adapter, deviceTypes *voltha.DeviceTypes) error {
+ log.Debugw("registering-adapter", log.Fields{"coreTopic": ap.coreTopic, "adapterTopic": ap.adapterTopic})
+ rpc := "Register"
+ topic := kafka.Topic{Name: ap.coreTopic}
+ replyToTopic := ap.getAdapterTopic()
+ args := make([]*kafka.KVArg, 2)
+ args[0] = &kafka.KVArg{
+ Key: "adapter",
+ Value: adapter,
+ }
+ args[1] = &kafka.KVArg{
+ Key: "deviceTypes",
+ Value: deviceTypes,
+ }
+
+ success, result := ap.kafkaICProxy.InvokeRPC(ctx, rpc, &topic, &replyToTopic, true, "", args...)
+ log.Debugw("Register-Adapter-response", log.Fields{"replyTopic": replyToTopic, "success": success})
+ return unPackResponse(rpc, "", success, result)
+}
+
+func (ap *CoreProxy) DeviceUpdate(ctx context.Context, device *voltha.Device) error {
+ log.Debugw("DeviceUpdate", log.Fields{"deviceId": device.Id})
+ rpc := "DeviceUpdate"
+ toTopic := ap.getCoreTopic(device.Id)
+ args := make([]*kafka.KVArg, 1)
+ args[0] = &kafka.KVArg{
+ Key: "device",
+ Value: device,
+ }
+ // Use a device specific topic as we are the only adaptercore handling requests for this device
+ replyToTopic := ap.getAdapterTopic()
+ success, result := ap.kafkaICProxy.InvokeRPC(nil, rpc, &toTopic, &replyToTopic, true, device.Id, args...)
+ log.Debugw("DeviceUpdate-response", log.Fields{"deviceId": device.Id, "success": success})
+ return unPackResponse(rpc, device.Id, success, result)
+}
+
+func (ap *CoreProxy) PortCreated(ctx context.Context, deviceId string, port *voltha.Port) error {
+ log.Debugw("PortCreated", log.Fields{"portNo": port.PortNo})
+ rpc := "PortCreated"
+ // Use a device specific topic to send the request. The adapter handling the device creates a device
+ // specific topic
+ toTopic := ap.getCoreTopic(deviceId)
+ args := make([]*kafka.KVArg, 2)
+ id := &voltha.ID{Id: deviceId}
+ args[0] = &kafka.KVArg{
+ Key: "device_id",
+ Value: id,
+ }
+ args[1] = &kafka.KVArg{
+ Key: "port",
+ Value: port,
+ }
+
+ // Use a device specific topic as we are the only adaptercore handling requests for this device
+ replyToTopic := ap.getAdapterTopic()
+ success, result := ap.kafkaICProxy.InvokeRPC(nil, rpc, &toTopic, &replyToTopic, true, deviceId, args...)
+ log.Debugw("PortCreated-response", log.Fields{"deviceId": deviceId, "success": success})
+ return unPackResponse(rpc, deviceId, success, result)
+}
+
+func (ap *CoreProxy) DeviceStateUpdate(ctx context.Context, deviceId string,
+ connStatus voltha.ConnectStatus_ConnectStatus, operStatus voltha.OperStatus_OperStatus) error {
+ log.Debugw("DeviceStateUpdate", log.Fields{"deviceId": deviceId})
+ rpc := "DeviceStateUpdate"
+ // Use a device specific topic to send the request. The adapter handling the device creates a device
+ // specific topic
+ toTopic := ap.getCoreTopic(deviceId)
+ args := make([]*kafka.KVArg, 3)
+ id := &voltha.ID{Id: deviceId}
+ oStatus := &ic.IntType{Val: int64(operStatus)}
+ cStatus := &ic.IntType{Val: int64(connStatus)}
+
+ args[0] = &kafka.KVArg{
+ Key: "device_id",
+ Value: id,
+ }
+ args[1] = &kafka.KVArg{
+ Key: "oper_status",
+ Value: oStatus,
+ }
+ args[2] = &kafka.KVArg{
+ Key: "connect_status",
+ Value: cStatus,
+ }
+ // Use a device specific topic as we are the only adaptercore handling requests for this device
+ replyToTopic := ap.getAdapterTopic()
+ success, result := ap.kafkaICProxy.InvokeRPC(nil, rpc, &toTopic, &replyToTopic, true, deviceId, args...)
+ log.Debugw("DeviceStateUpdate-response", log.Fields{"deviceId": deviceId, "success": success})
+ return unPackResponse(rpc, deviceId, success, result)
+}
+
+func (ap *CoreProxy) ChildDeviceDetected(ctx context.Context, parentDeviceId string, parentPortNo int,
+ childDeviceType string, channelId int, vendorId string, serialNumber string, onuId int64 ) error {
+ log.Debugw("ChildDeviceDetected", log.Fields{"pPeviceId": parentDeviceId, "channelId": channelId})
+ rpc := "ChildDeviceDetected"
+ // Use a device specific topic to send the request. The adapter handling the device creates a device
+ // specific topic
+ toTopic := ap.getCoreTopic(parentDeviceId)
+ replyToTopic := ap.getAdapterTopic()
+
+ args := make([]*kafka.KVArg, 7)
+ id := &voltha.ID{Id: parentDeviceId}
+ args[0] = &kafka.KVArg{
+ Key: "parent_device_id",
+ Value: id,
+ }
+ ppn := &ic.IntType{Val: int64(parentPortNo)}
+ args[1] = &kafka.KVArg{
+ Key: "parent_port_no",
+ Value: ppn,
+ }
+ cdt := &ic.StrType{Val: childDeviceType}
+ args[2] = &kafka.KVArg{
+ Key: "child_device_type",
+ Value: cdt,
+ }
+ channel := &ic.IntType{Val: int64(channelId)}
+ args[3] = &kafka.KVArg{
+ Key: "channel_id",
+ Value: channel,
+ }
+ vId := &ic.StrType{Val: vendorId}
+ args[4] = &kafka.KVArg{
+ Key: "vendor_id",
+ Value: vId,
+ }
+ sNo := &ic.StrType{Val: serialNumber}
+ args[5] = &kafka.KVArg{
+ Key: "serial_number",
+ Value: sNo,
+ }
+ oId := &ic.IntType{Val: int64(onuId)}
+ args[6] = &kafka.KVArg{
+ Key: "onu_id",
+ Value: oId,
+ }
+
+ success, result := ap.kafkaICProxy.InvokeRPC(nil, rpc, &toTopic, &replyToTopic, true, parentDeviceId, args...)
+ log.Debugw("ChildDeviceDetected-response", log.Fields{"pDeviceId": parentDeviceId, "success": success})
+ return unPackResponse(rpc, parentDeviceId, success, result)
+}
diff --git a/vendor/github.com/opencord/voltha-go/adapters/common/request_handler.go b/vendor/github.com/opencord/voltha-go/adapters/common/request_handler.go
new file mode 100644
index 0000000..5b839c6
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/adapters/common/request_handler.go
@@ -0,0 +1,278 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package common
+
+import (
+ "errors"
+ "github.com/golang/protobuf/ptypes"
+ "github.com/golang/protobuf/ptypes/empty"
+ "github.com/opencord/voltha-go/adapters"
+ "github.com/opencord/voltha-go/common/log"
+ "github.com/opencord/voltha-go/kafka"
+ ic "github.com/opencord/voltha-protos/go/inter_container"
+ "github.com/opencord/voltha-protos/go/voltha"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+)
+
+type RequestHandlerProxy struct {
+ TestMode bool
+ coreInstanceId string
+ adapter adapters.IAdapter
+ coreProxy *CoreProxy
+}
+
+func NewRequestHandlerProxy(coreInstanceId string, iadapter adapters.IAdapter, cProxy *CoreProxy) *RequestHandlerProxy {
+ var proxy RequestHandlerProxy
+ proxy.coreInstanceId = coreInstanceId
+ proxy.adapter = iadapter
+ proxy.coreProxy = cProxy
+ return &proxy
+}
+
+func (rhp *RequestHandlerProxy) Adapter_descriptor() (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Device_types() (*voltha.DeviceTypes, error) {
+ return nil, nil
+}
+
+func (rhp *RequestHandlerProxy) Health() (*voltha.HealthStatus, error) {
+ return nil, nil
+}
+
+func (rhp *RequestHandlerProxy) Adopt_device(args []*ic.Argument) (*empty.Empty, error) {
+ if len(args) < 3 {
+ log.Warn("invalid-number-of-args", log.Fields{"args": args})
+ err := errors.New("invalid-number-of-args")
+ return nil, err
+ }
+ device := &voltha.Device{}
+ transactionID := &ic.StrType{}
+ fromTopic := &ic.StrType{}
+ for _, arg := range args {
+ switch arg.Key {
+ case "device":
+ if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
+ log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
+ return nil, err
+ }
+ case kafka.TransactionKey:
+ if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
+ log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
+ return nil, err
+ }
+ case kafka.FromTopic:
+ if err := ptypes.UnmarshalAny(arg.Value, fromTopic); err != nil {
+ log.Warnw("cannot-unmarshal-from-topic", log.Fields{"error": err})
+ return nil, err
+ }
+ }
+ }
+
+ log.Debugw("Adopt_device", log.Fields{"deviceId": device.Id})
+
+ //Update the core reference for that device
+ rhp.coreProxy.UpdateCoreReference(device.Id, fromTopic.Val)
+
+ //Invoke the adopt device on the adapter
+ if err := rhp.adapter.Adopt_device(device); err != nil {
+ return nil, status.Errorf(codes.NotFound, "%s", err.Error())
+ }
+
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Reconcile_device(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Abandon_device(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Disable_device(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Reenable_device(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Reboot_device(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Self_test_device(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Delete_device(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Get_device_details(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Update_flows_bulk(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Update_flows_incrementally(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Update_pm_config(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Receive_packet_out(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Suppress_alarm(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Unsuppress_alarm(args []*ic.Argument) (*empty.Empty, error) {
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Get_ofp_device_info(args []*ic.Argument) (*ic.SwitchCapability, error) {
+ if len(args) < 2 {
+ log.Warn("invalid-number-of-args", log.Fields{"args": args})
+ err := errors.New("invalid-number-of-args")
+ return nil, err
+ }
+ device := &voltha.Device{}
+ transactionID := &ic.StrType{}
+ for _, arg := range args {
+ switch arg.Key {
+ case "device":
+ if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
+ log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
+ return nil, err
+ }
+ case kafka.TransactionKey:
+ if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
+ log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
+ return nil, err
+ }
+ }
+ }
+
+ log.Debugw("Get_ofp_device_info", log.Fields{"deviceId": device.Id})
+
+ var cap *ic.SwitchCapability
+ var err error
+ if cap, err = rhp.adapter.Get_ofp_device_info(device); err != nil {
+ return nil, status.Errorf(codes.NotFound, "%s", err.Error())
+ }
+ log.Debugw("Get_ofp_device_info", log.Fields{"cap": cap})
+ return cap, nil
+}
+
+func (rhp *RequestHandlerProxy) Get_ofp_port_info(args []*ic.Argument) (*ic.PortCapability, error) {
+ if len(args) < 3 {
+ log.Warn("invalid-number-of-args", log.Fields{"args": args})
+ err := errors.New("invalid-number-of-args")
+ return nil, err
+ }
+ device := &voltha.Device{}
+ pNo := &ic.IntType{}
+ transactionID := &ic.StrType{}
+ for _, arg := range args {
+ switch arg.Key {
+ case "device":
+ if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
+ log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
+ return nil, err
+ }
+ case "port_no":
+ if err := ptypes.UnmarshalAny(arg.Value, pNo); err != nil {
+ log.Warnw("cannot-unmarshal-port-no", log.Fields{"error": err})
+ return nil, err
+ }
+ case kafka.TransactionKey:
+ if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
+ log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
+ return nil, err
+ }
+ }
+ }
+ log.Debugw("Get_ofp_port_info", log.Fields{"deviceId": device.Id, "portNo": pNo.Val})
+ var cap *ic.PortCapability
+ var err error
+ if cap, err = rhp.adapter.Get_ofp_port_info(device, pNo.Val); err != nil {
+ return nil, status.Errorf(codes.NotFound, "%s", err.Error())
+ }
+ return cap, nil
+}
+
+func (rhp *RequestHandlerProxy) Process_inter_adapter_message(args []*ic.Argument) (*empty.Empty, error) {
+ if len(args) < 2 {
+ log.Warn("invalid-number-of-args", log.Fields{"args": args})
+ err := errors.New("invalid-number-of-args")
+ return nil, err
+ }
+ iaMsg := &ic.InterAdapterMessage{}
+ transactionID := &ic.StrType{}
+ for _, arg := range args {
+ switch arg.Key {
+ case "msg":
+ if err := ptypes.UnmarshalAny(arg.Value, iaMsg); err != nil {
+ log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
+ return nil, err
+ }
+ case kafka.TransactionKey:
+ if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
+ log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
+ return nil, err
+ }
+ }
+ }
+
+ log.Debugw("Process_inter_adapter_message", log.Fields{"msgId": iaMsg.Header.Id})
+
+ //Invoke the inter adapter API on the handler
+ if err := rhp.adapter.Process_inter_adapter_message(iaMsg); err != nil {
+ return nil, status.Errorf(codes.NotFound, "%s", err.Error())
+ }
+
+ return new(empty.Empty), nil
+}
+
+func (rhp *RequestHandlerProxy) Download_image(args []*ic.Argument) (*voltha.ImageDownload, error) {
+ return &voltha.ImageDownload{}, nil
+}
+
+func (rhp *RequestHandlerProxy) Get_image_download_status(args []*ic.Argument) (*voltha.ImageDownload, error) {
+ return &voltha.ImageDownload{}, nil
+}
+
+func (rhp *RequestHandlerProxy) Cancel_image_download(args []*ic.Argument) (*voltha.ImageDownload, error) {
+ return &voltha.ImageDownload{}, nil
+}
+
+func (rhp *RequestHandlerProxy) Activate_image_update(args []*ic.Argument) (*voltha.ImageDownload, error) {
+ return &voltha.ImageDownload{}, nil
+}
+
+func (rhp *RequestHandlerProxy) Revert_image_update(args []*ic.Argument) (*voltha.ImageDownload, error) {
+ return &voltha.ImageDownload{}, nil
+}
diff --git a/vendor/github.com/opencord/voltha-go/adapters/common/utils.go b/vendor/github.com/opencord/voltha-go/adapters/common/utils.go
new file mode 100644
index 0000000..810a3d0
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/adapters/common/utils.go
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package common
+
+import (
+ "fmt"
+ "math/rand"
+ "time"
+)
+
+//GetRandomSerialNumber returns a serial number formatted as "HOST:PORT"
+func GetRandomSerialNumber() string {
+ rand.Seed(time.Now().UnixNano())
+ return fmt.Sprintf("%d.%d.%d.%d:%d",
+ rand.Intn(255),
+ rand.Intn(255),
+ rand.Intn(255),
+ rand.Intn(255),
+ rand.Intn(9000)+1000,
+ )
+}
+
+//GetRandomMacAddress returns a random mac address
+func GetRandomMacAddress() string {
+ rand.Seed(time.Now().UnixNano())
+ return fmt.Sprintf("%02x:%02x:%02x:%02x:%02x:%02x",
+ rand.Intn(128),
+ rand.Intn(128),
+ rand.Intn(128),
+ rand.Intn(128),
+ rand.Intn(128),
+ rand.Intn(128),
+ )
+}
+
+const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+const (
+ letterIdxBits = 6 // 6 bits to represent a letter index
+ letterIdxMask = 1<<letterIdxBits - 1 // All 1-bits, as many as letterIdxBits
+ letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits
+)
+
+var src = rand.NewSource(time.Now().UnixNano())
+
+func GetRandomString(n int) string {
+ b := make([]byte, n)
+ // A src.Int63() generates 63 random bits, enough for letterIdxMax characters!
+ for i, cache, remain := n-1, src.Int63(), letterIdxMax; i >= 0; {
+ if remain == 0 {
+ cache, remain = src.Int63(), letterIdxMax
+ }
+ if idx := int(cache & letterIdxMask); idx < len(letterBytes) {
+ b[i] = letterBytes[idx]
+ i--
+ }
+ cache >>= letterIdxBits
+ remain--
+ }
+ return string(b)
+}
\ No newline at end of file
diff --git a/vendor/github.com/opencord/voltha-go/adapters/iAdapter.go b/vendor/github.com/opencord/voltha-go/adapters/iAdapter.go
new file mode 100644
index 0000000..a1dfa16
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/adapters/iAdapter.go
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package adapters
+
+import (
+ ic "github.com/opencord/voltha-protos/go/inter_container"
+ "github.com/opencord/voltha-protos/go/openflow_13"
+ "github.com/opencord/voltha-protos/go/voltha"
+)
+
+//IAdapter represents the set of APIs a voltha adapter has to support.
+type IAdapter interface {
+ Adapter_descriptor() error
+ Device_types() (*voltha.DeviceTypes, error)
+ Health() (*voltha.HealthStatus, error)
+ Adopt_device(device *voltha.Device) error
+ Reconcile_device(device *voltha.Device) error
+ Abandon_device(device *voltha.Device) error
+ Disable_device(device *voltha.Device) error
+ Reenable_device(device *voltha.Device) error
+ Reboot_device(device *voltha.Device) error
+ Self_test_device(device *voltha.Device) error
+ Gelete_device(device *voltha.Device) error
+ Get_device_details(device *voltha.Device) error
+ Update_flows_bulk(device *voltha.Device, flows *voltha.Flows, groups *voltha.FlowGroups) error
+ Update_flows_incrementally(device *voltha.Device, flows *openflow_13.FlowChanges, groups *openflow_13.FlowGroupChanges) error
+ Update_pm_config(device *voltha.Device, pm_configs *voltha.PmConfigs) error
+ Receive_packet_out(device *voltha.Device, egress_port_no int, msg openflow_13.PacketOut) error
+ Suppress_alarm(filter *voltha.AlarmFilter) error
+ Unsuppress_alarm(filter *voltha.AlarmFilter) error
+ Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error)
+ Get_ofp_port_info(device *voltha.Device, port_no int64) (*ic.PortCapability, error)
+ Process_inter_adapter_message(msg *ic.InterAdapterMessage) error
+ Download_image(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
+ Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
+ Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
+ Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
+ Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
+}
diff --git a/vendor/github.com/opencord/voltha-go/common/log/log.go b/vendor/github.com/opencord/voltha-go/common/log/log.go
new file mode 100644
index 0000000..408158a
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/common/log/log.go
@@ -0,0 +1,737 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+
+//Package log provides a structured Logger interface implemented using zap logger. It provides the following capabilities:
+//1. Package level logging - a go package can register itself (AddPackage) and have a logger created for that package.
+//2. Dynamic log level change - for all registered packages (SetAllLogLevel)
+//3. Dynamic log level change - for a given package (SetPackageLogLevel)
+//4. Provides a default logger for unregistered packages
+//5. Allow key-value pairs to be added to a logger(UpdateLogger) or all loggers (UpdateAllLoggers) at run time
+//6. Add to the log output the location where the log was invoked (filename.functionname.linenumber)
+//
+// Using package-level logging (recommended approach). In the examples below, log refers to this log package.
+// 1. In the appropriate package add the following in the init section of the package. The log level can be changed
+// and any number of default fields can be added as well. The log level specifies the lowest log level that will be
+// in the output while the fields will be automatically added to all log printouts.
+//
+// log.AddPackage(mylog.JSON, log.WarnLevel, log.Fields{"anyFieldName": "any value"})
+//
+//2. In the calling package, just invoke any of the publicly available functions of the logger. Here is an example
+// to write an Info log with additional fields:
+//
+//log.Infow("An example", mylog.Fields{"myStringOutput": "output", "myIntOutput": 2})
+//
+//3. To dynamically change the log level, you can use 1)SetLogLevel from inside your package or 2) SetPackageLogLevel
+// from anywhere or 3) SetAllLogLevel from anywhere.
+//
+
+package log
+
+import (
+ "errors"
+ "fmt"
+ zp "go.uber.org/zap"
+ zc "go.uber.org/zap/zapcore"
+ "path"
+ "runtime"
+ "strings"
+)
+
+const (
+ // DebugLevel logs a message at debug level
+ DebugLevel = iota
+ // InfoLevel logs a message at info level
+ InfoLevel
+ // WarnLevel logs a message at warning level
+ WarnLevel
+ // ErrorLevel logs a message at error level
+ ErrorLevel
+ // PanicLevel logs a message, then panics.
+ PanicLevel
+ // FatalLevel logs a message, then calls os.Exit(1).
+ FatalLevel
+)
+
+// CONSOLE formats the log for the console, mostly used during development
+const CONSOLE = "console"
+
+// JSON formats the log using json format, mostly used by an automated logging system consumption
+const JSON = "json"
+
+// Logger represents an abstract logging interface. Any logging implementation used
+// will need to abide by this interface
+type Logger interface {
+ Debug(...interface{})
+ Debugln(...interface{})
+ Debugf(string, ...interface{})
+ Debugw(string, Fields)
+
+ Info(...interface{})
+ Infoln(...interface{})
+ Infof(string, ...interface{})
+ Infow(string, Fields)
+
+ Warn(...interface{})
+ Warnln(...interface{})
+ Warnf(string, ...interface{})
+ Warnw(string, Fields)
+
+ Error(...interface{})
+ Errorln(...interface{})
+ Errorf(string, ...interface{})
+ Errorw(string, Fields)
+
+ Fatal(...interface{})
+ Fatalln(...interface{})
+ Fatalf(string, ...interface{})
+ Fatalw(string, Fields)
+
+ With(Fields) Logger
+
+ // The following are added to be able to use this logger as a gRPC LoggerV2 if needed
+ //
+ Warning(...interface{})
+ Warningln(...interface{})
+ Warningf(string, ...interface{})
+
+ // V reports whether verbosity level l is at least the requested verbose level.
+ V(l int) bool
+}
+
+// Fields is used as key-value pairs for structured logging
+type Fields map[string]interface{}
+
+var defaultLogger *logger
+var cfg zp.Config
+
+var loggers map[string]*logger
+var cfgs map[string]zp.Config
+
+type logger struct {
+ log *zp.SugaredLogger
+ parent *zp.Logger
+}
+
+func intToAtomicLevel(l int) zp.AtomicLevel {
+ switch l {
+ case DebugLevel:
+ return zp.NewAtomicLevelAt(zc.DebugLevel)
+ case InfoLevel:
+ return zp.NewAtomicLevelAt(zc.InfoLevel)
+ case WarnLevel:
+ return zp.NewAtomicLevelAt(zc.WarnLevel)
+ case ErrorLevel:
+ return zp.NewAtomicLevelAt(zc.ErrorLevel)
+ case PanicLevel:
+ return zp.NewAtomicLevelAt(zc.PanicLevel)
+ case FatalLevel:
+ return zp.NewAtomicLevelAt(zc.FatalLevel)
+ }
+ return zp.NewAtomicLevelAt(zc.ErrorLevel)
+}
+
+func intToLevel(l int) zc.Level {
+ switch l {
+ case DebugLevel:
+ return zc.DebugLevel
+ case InfoLevel:
+ return zc.InfoLevel
+ case WarnLevel:
+ return zc.WarnLevel
+ case ErrorLevel:
+ return zc.ErrorLevel
+ case PanicLevel:
+ return zc.PanicLevel
+ case FatalLevel:
+ return zc.FatalLevel
+ }
+ return zc.ErrorLevel
+}
+
+func levelToInt(l zc.Level) int {
+ switch l {
+ case zc.DebugLevel:
+ return DebugLevel
+ case zc.InfoLevel:
+ return InfoLevel
+ case zc.WarnLevel:
+ return WarnLevel
+ case zc.ErrorLevel:
+ return ErrorLevel
+ case zc.PanicLevel:
+ return PanicLevel
+ case FatalLevel:
+ return FatalLevel
+ }
+ return ErrorLevel
+}
+
+
+func getDefaultConfig(outputType string, level int, defaultFields Fields) zp.Config {
+ return zp.Config{
+ Level: intToAtomicLevel(level),
+ Encoding: outputType,
+ Development: true,
+ OutputPaths: []string{"stdout"},
+ ErrorOutputPaths: []string{"stderr"},
+ InitialFields: defaultFields,
+ EncoderConfig: zc.EncoderConfig{
+ LevelKey: "level",
+ MessageKey: "msg",
+ TimeKey: "ts",
+ StacktraceKey: "stacktrace",
+ LineEnding: zc.DefaultLineEnding,
+ EncodeLevel: zc.LowercaseLevelEncoder,
+ EncodeTime: zc.ISO8601TimeEncoder,
+ EncodeDuration: zc.SecondsDurationEncoder,
+ EncodeCaller: zc.ShortCallerEncoder,
+ },
+ }
+}
+
+// SetLogger needs to be invoked before the logger API can be invoked. This function
+// initialize the default logger (zap's sugaredlogger)
+func SetDefaultLogger(outputType string, level int, defaultFields Fields) (Logger, error) {
+ // Build a custom config using zap
+ cfg = getDefaultConfig(outputType, level, defaultFields)
+
+ l, err := cfg.Build()
+ if err != nil {
+ return nil, err
+ }
+
+ defaultLogger = &logger{
+ log: l.Sugar(),
+ parent: l,
+ }
+
+ return defaultLogger, nil
+}
+
+// AddPackage registers a package to the log map. Each package gets its own logger which allows
+// its config (loglevel) to be changed dynamically without interacting with the other packages.
+// outputType is JSON, level is the lowest level log to output with this logger and defaultFields is a map of
+// key-value pairs to always add to the output.
+// Note: AddPackage also returns a reference to the actual logger. If a calling package uses this reference directly
+//instead of using the publicly available functions in this log package then a number of functionalities will not
+// be available to it, notably log tracing with filename.functionname.linenumber annotation.
+//
+// pkgNames parameter should be used for testing only as this function detects the caller's package.
+func AddPackage(outputType string, level int, defaultFields Fields, pkgNames ...string) (Logger, error) {
+ if cfgs == nil {
+ cfgs = make(map[string]zp.Config)
+ }
+ if loggers == nil {
+ loggers = make(map[string]*logger)
+ }
+
+ var pkgName string
+ for _, name := range pkgNames {
+ pkgName = name
+ break
+ }
+ if pkgName == "" {
+ pkgName, _, _, _ = getCallerInfo()
+ }
+
+ if _, exist := loggers[pkgName]; exist {
+ return loggers[pkgName], nil
+ }
+
+ cfgs[pkgName] = getDefaultConfig(outputType, level, defaultFields)
+
+ l, err := cfgs[pkgName].Build()
+ if err != nil {
+ return nil, err
+ }
+
+ loggers[pkgName] = &logger{
+ log: l.Sugar(),
+ parent: l,
+ }
+ return loggers[pkgName], nil
+}
+
+//UpdateAllLoggers create new loggers for all registered pacakges with the defaultFields.
+func UpdateAllLoggers(defaultFields Fields) error {
+ for pkgName, cfg := range cfgs {
+ for k, v := range defaultFields {
+ if cfg.InitialFields == nil {
+ cfg.InitialFields = make(map[string]interface{})
+ }
+ cfg.InitialFields[k] = v
+ }
+ l, err := cfg.Build()
+ if err != nil {
+ return err
+ }
+
+ loggers[pkgName] = &logger{
+ log: l.Sugar(),
+ parent: l,
+ }
+ }
+ return nil
+}
+
+// UpdateLogger deletes the logger associated with a caller's package and creates a new logger with the
+// defaultFields. If a calling package is holding on to a Logger reference obtained from AddPackage invocation, then
+// that package needs to invoke UpdateLogger if it needs to make changes to the default fields and obtain a new logger
+// reference
+func UpdateLogger(defaultFields Fields) (Logger, error) {
+ pkgName, _, _, _ := getCallerInfo()
+ if _, exist := loggers[pkgName]; !exist {
+ return nil, errors.New(fmt.Sprintf("package-%s-not-registered", pkgName))
+ }
+
+ // Build a new logger
+ if _, exist := cfgs[pkgName]; !exist {
+ return nil, errors.New(fmt.Sprintf("config-%s-not-registered", pkgName))
+ }
+
+ cfg := cfgs[pkgName]
+ for k, v := range defaultFields {
+ if cfg.InitialFields == nil {
+ cfg.InitialFields = make(map[string]interface{})
+ }
+ cfg.InitialFields[k] = v
+ }
+ l, err := cfg.Build()
+ if err != nil {
+ return nil, err
+ }
+
+ // Set the logger
+ loggers[pkgName] = &logger{
+ log: l.Sugar(),
+ parent: l,
+ }
+ return loggers[pkgName], nil
+}
+
+func setLevel(cfg zp.Config, level int) {
+ switch level {
+ case DebugLevel:
+ cfg.Level.SetLevel(zc.DebugLevel)
+ case InfoLevel:
+ cfg.Level.SetLevel(zc.InfoLevel)
+ case WarnLevel:
+ cfg.Level.SetLevel(zc.WarnLevel)
+ case ErrorLevel:
+ cfg.Level.SetLevel(zc.ErrorLevel)
+ case PanicLevel:
+ cfg.Level.SetLevel(zc.PanicLevel)
+ case FatalLevel:
+ cfg.Level.SetLevel(zc.FatalLevel)
+ default:
+ cfg.Level.SetLevel(zc.ErrorLevel)
+ }
+}
+
+//SetPackageLogLevel dynamically sets the log level of a given package to level. This is typically invoked at an
+// application level during debugging
+func SetPackageLogLevel(packageName string, level int) {
+ // Get proper config
+ if cfg, ok := cfgs[packageName]; ok {
+ setLevel(cfg, level)
+ }
+}
+
+//SetAllLogLevel sets the log level of all registered packages to level
+func SetAllLogLevel(level int) {
+ // Get proper config
+ for _, cfg := range cfgs {
+ setLevel(cfg, level)
+ }
+}
+
+//GetPackageLogLevel returns the current log level of a package.
+func GetPackageLogLevel(packageName string) (int, error) {
+ if cfg, ok := cfgs[packageName]; ok {
+ return levelToInt(cfg.Level.Level()), nil
+ }
+ return 0, errors.New(fmt.Sprintf("unknown-package-%s", packageName))
+}
+
+//SetLogLevel sets the log level for the logger corresponding to the caller's package
+func SetLogLevel(level int) error {
+ pkgName, _, _, _ := getCallerInfo()
+ if _, exist := cfgs[pkgName]; !exist {
+ return errors.New(fmt.Sprintf("unregistered-package-%s", pkgName))
+ }
+ cfg := cfgs[pkgName]
+ setLevel(cfg, level)
+ return nil
+}
+
+// CleanUp flushed any buffered log entries. Applications should take care to call
+// CleanUp before exiting.
+func CleanUp() error {
+ for _, logger := range loggers {
+ if logger != nil {
+ if logger.parent != nil {
+ if err := logger.parent.Sync(); err != nil {
+ return err
+ }
+ }
+ }
+ }
+ if defaultLogger != nil {
+ if defaultLogger.parent != nil {
+ if err := defaultLogger.parent.Sync(); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func getCallerInfo() (string, string, string, int) {
+ // Since the caller of a log function is one stack frame before (in terms of stack higher level) the log.go
+ // filename, then first look for the last log.go filename and then grab the caller info one level higher.
+ maxLevel := 3
+ skiplevel := 3 // Level with the most empirical success to see the last log.go stack frame.
+ pc := make([]uintptr, maxLevel)
+ n := runtime.Callers(skiplevel, pc)
+ packageName := ""
+ funcName := ""
+ fileName := ""
+ var line int
+ if n == 0 {
+ return packageName, fileName, funcName, line
+ }
+ frames := runtime.CallersFrames(pc[:n])
+ var frame runtime.Frame
+ var foundFrame runtime.Frame
+ more := true
+ for more {
+ frame, more = frames.Next()
+ _, fileName = path.Split(frame.File)
+ if fileName != "log.go" {
+ foundFrame = frame // First frame after log.go in the frame stack
+ break
+ }
+ }
+ parts := strings.Split(foundFrame.Function, ".")
+ pl := len(parts)
+ if pl >= 2 {
+ funcName = parts[pl-1]
+ if parts[pl-2][0] == '(' {
+ packageName = strings.Join(parts[0:pl-2], ".")
+ } else {
+ packageName = strings.Join(parts[0:pl-1], ".")
+ }
+ }
+
+ if strings.HasSuffix(packageName, ".init") {
+ packageName = strings.TrimSuffix(packageName, ".init")
+ }
+
+ if strings.HasSuffix(fileName, ".go") {
+ fileName = strings.TrimSuffix(fileName, ".go")
+ }
+
+ return packageName, fileName, funcName, foundFrame.Line
+}
+
+func getPackageLevelSugaredLogger() *zp.SugaredLogger {
+ pkgName, fileName, funcName, line := getCallerInfo()
+ if _, exist := loggers[pkgName]; exist {
+ return loggers[pkgName].log.With("caller", fmt.Sprintf("%s.%s:%d", fileName, funcName, line))
+ }
+ return defaultLogger.log.With("caller", fmt.Sprintf("%s.%s:%d", fileName, funcName, line))
+}
+
+func getPackageLevelLogger() Logger {
+ pkgName, _, _, _ := getCallerInfo()
+ if _, exist := loggers[pkgName]; exist {
+ return loggers[pkgName]
+ }
+ return defaultLogger
+}
+
+func serializeMap(fields Fields) []interface{} {
+ data := make([]interface{}, len(fields)*2)
+ i := 0
+ for k, v := range fields {
+ data[i] = k
+ data[i+1] = v
+ i = i + 2
+ }
+ return data
+}
+
+// With returns a logger initialized with the key-value pairs
+func (l logger) With(keysAndValues Fields) Logger {
+ return logger{log: l.log.With(serializeMap(keysAndValues)...), parent: l.parent}
+}
+
+// Debug logs a message at level Debug on the standard logger.
+func (l logger) Debug(args ...interface{}) {
+ l.log.Debug(args...)
+}
+
+// Debugln logs a message at level Debug on the standard logger with a line feed. Default in any case.
+func (l logger) Debugln(args ...interface{}) {
+ l.log.Debug(args...)
+}
+
+// Debugw logs a message at level Debug on the standard logger.
+func (l logger) Debugf(format string, args ...interface{}) {
+ l.log.Debugf(format, args...)
+}
+
+// Debugw logs a message with some additional context. The variadic key-value
+// pairs are treated as they are in With.
+func (l logger) Debugw(msg string, keysAndValues Fields) {
+ l.log.Debugw(msg, serializeMap(keysAndValues)...)
+}
+
+// Info logs a message at level Info on the standard logger.
+func (l logger) Info(args ...interface{}) {
+ l.log.Info(args...)
+}
+
+// Infoln logs a message at level Info on the standard logger with a line feed. Default in any case.
+func (l logger) Infoln(args ...interface{}) {
+ l.log.Info(args...)
+ //msg := fmt.Sprintln(args...)
+ //l.sourced().Info(msg[:len(msg)-1])
+}
+
+// Infof logs a message at level Info on the standard logger.
+func (l logger) Infof(format string, args ...interface{}) {
+ l.log.Infof(format, args...)
+}
+
+// Infow logs a message with some additional context. The variadic key-value
+// pairs are treated as they are in With.
+func (l logger) Infow(msg string, keysAndValues Fields) {
+ l.log.Infow(msg, serializeMap(keysAndValues)...)
+}
+
+// Warn logs a message at level Warn on the standard logger.
+func (l logger) Warn(args ...interface{}) {
+ l.log.Warn(args...)
+}
+
+// Warnln logs a message at level Warn on the standard logger with a line feed. Default in any case.
+func (l logger) Warnln(args ...interface{}) {
+ l.log.Warn(args...)
+}
+
+// Warnf logs a message at level Warn on the standard logger.
+func (l logger) Warnf(format string, args ...interface{}) {
+ l.log.Warnf(format, args...)
+}
+
+// Warnw logs a message with some additional context. The variadic key-value
+// pairs are treated as they are in With.
+func (l logger) Warnw(msg string, keysAndValues Fields) {
+ l.log.Warnw(msg, serializeMap(keysAndValues)...)
+}
+
+// Error logs a message at level Error on the standard logger.
+func (l logger) Error(args ...interface{}) {
+ l.log.Error(args...)
+}
+
+// Errorln logs a message at level Error on the standard logger with a line feed. Default in any case.
+func (l logger) Errorln(args ...interface{}) {
+ l.log.Error(args...)
+}
+
+// Errorf logs a message at level Error on the standard logger.
+func (l logger) Errorf(format string, args ...interface{}) {
+ l.log.Errorf(format, args...)
+}
+
+// Errorw logs a message with some additional context. The variadic key-value
+// pairs are treated as they are in With.
+func (l logger) Errorw(msg string, keysAndValues Fields) {
+ l.log.Errorw(msg, serializeMap(keysAndValues)...)
+}
+
+// Fatal logs a message at level Fatal on the standard logger.
+func (l logger) Fatal(args ...interface{}) {
+ l.log.Fatal(args...)
+}
+
+// Fatalln logs a message at level Fatal on the standard logger with a line feed. Default in any case.
+func (l logger) Fatalln(args ...interface{}) {
+ l.log.Fatal(args...)
+}
+
+// Fatalf logs a message at level Fatal on the standard logger.
+func (l logger) Fatalf(format string, args ...interface{}) {
+ l.log.Fatalf(format, args...)
+}
+
+// Fatalw logs a message with some additional context. The variadic key-value
+// pairs are treated as they are in With.
+func (l logger) Fatalw(msg string, keysAndValues Fields) {
+ l.log.Fatalw(msg, serializeMap(keysAndValues)...)
+}
+
+// Warning logs a message at level Warn on the standard logger.
+func (l logger) Warning(args ...interface{}) {
+ l.log.Warn(args...)
+}
+
+// Warningln logs a message at level Warn on the standard logger with a line feed. Default in any case.
+func (l logger) Warningln(args ...interface{}) {
+ l.log.Warn(args...)
+}
+
+// Warningf logs a message at level Warn on the standard logger.
+func (l logger) Warningf(format string, args ...interface{}) {
+ l.log.Warnf(format, args...)
+}
+
+// V reports whether verbosity level l is at least the requested verbose level.
+func (l logger) V(level int) bool {
+ return l.parent.Core().Enabled(intToLevel(level))
+}
+
+// With returns a logger initialized with the key-value pairs
+func With(keysAndValues Fields) Logger {
+ return logger{log: getPackageLevelSugaredLogger().With(serializeMap(keysAndValues)...), parent: defaultLogger.parent}
+}
+
+// Debug logs a message at level Debug on the standard logger.
+func Debug(args ...interface{}) {
+ getPackageLevelSugaredLogger().Debug(args...)
+}
+
+// Debugln logs a message at level Debug on the standard logger.
+func Debugln(args ...interface{}) {
+ getPackageLevelSugaredLogger().Debug(args...)
+}
+
+// Debugf logs a message at level Debug on the standard logger.
+func Debugf(format string, args ...interface{}) {
+ getPackageLevelSugaredLogger().Debugf(format, args...)
+}
+
+// Debugw logs a message with some additional context. The variadic key-value
+// pairs are treated as they are in With.
+func Debugw(msg string, keysAndValues Fields) {
+ getPackageLevelSugaredLogger().Debugw(msg, serializeMap(keysAndValues)...)
+}
+
+// Info logs a message at level Info on the standard logger.
+func Info(args ...interface{}) {
+ getPackageLevelSugaredLogger().Info(args...)
+}
+
+// Infoln logs a message at level Info on the standard logger.
+func Infoln(args ...interface{}) {
+ getPackageLevelSugaredLogger().Info(args...)
+}
+
+// Infof logs a message at level Info on the standard logger.
+func Infof(format string, args ...interface{}) {
+ getPackageLevelSugaredLogger().Infof(format, args...)
+}
+
+//Infow logs a message with some additional context. The variadic key-value
+//pairs are treated as they are in With.
+func Infow(msg string, keysAndValues Fields) {
+ getPackageLevelSugaredLogger().Infow(msg, serializeMap(keysAndValues)...)
+}
+
+// Warn logs a message at level Warn on the standard logger.
+func Warn(args ...interface{}) {
+ getPackageLevelSugaredLogger().Warn(args...)
+}
+
+// Warnln logs a message at level Warn on the standard logger.
+func Warnln(args ...interface{}) {
+ getPackageLevelSugaredLogger().Warn(args...)
+}
+
+// Warnf logs a message at level Warn on the standard logger.
+func Warnf(format string, args ...interface{}) {
+ getPackageLevelSugaredLogger().Warnf(format, args...)
+}
+
+// Warnw logs a message with some additional context. The variadic key-value
+// pairs are treated as they are in With.
+func Warnw(msg string, keysAndValues Fields) {
+ getPackageLevelSugaredLogger().Warnw(msg, serializeMap(keysAndValues)...)
+}
+
+// Error logs a message at level Error on the standard logger.
+func Error(args ...interface{}) {
+ getPackageLevelSugaredLogger().Error(args...)
+}
+
+// Errorln logs a message at level Error on the standard logger.
+func Errorln(args ...interface{}) {
+ getPackageLevelSugaredLogger().Error(args...)
+}
+
+// Errorf logs a message at level Error on the standard logger.
+func Errorf(format string, args ...interface{}) {
+ getPackageLevelSugaredLogger().Errorf(format, args...)
+}
+
+// Errorw logs a message with some additional context. The variadic key-value
+// pairs are treated as they are in With.
+func Errorw(msg string, keysAndValues Fields) {
+ getPackageLevelSugaredLogger().Errorw(msg, serializeMap(keysAndValues)...)
+}
+
+// Fatal logs a message at level Fatal on the standard logger.
+func Fatal(args ...interface{}) {
+ getPackageLevelSugaredLogger().Fatal(args...)
+}
+
+// Fatalln logs a message at level Fatal on the standard logger.
+func Fatalln(args ...interface{}) {
+ getPackageLevelSugaredLogger().Fatal(args...)
+}
+
+// Fatalf logs a message at level Fatal on the standard logger.
+func Fatalf(format string, args ...interface{}) {
+ getPackageLevelSugaredLogger().Fatalf(format, args...)
+}
+
+// Fatalw logs a message with some additional context. The variadic key-value
+// pairs are treated as they are in With.
+func Fatalw(msg string, keysAndValues Fields) {
+ getPackageLevelSugaredLogger().Fatalw(msg, serializeMap(keysAndValues)...)
+}
+
+// Warning logs a message at level Warn on the standard logger.
+func Warning(args ...interface{}) {
+ getPackageLevelSugaredLogger().Warn(args...)
+}
+
+// Warningln logs a message at level Warn on the standard logger.
+func Warningln(args ...interface{}) {
+ getPackageLevelSugaredLogger().Warn(args...)
+}
+
+// Warningf logs a message at level Warn on the standard logger.
+func Warningf(format string, args ...interface{}) {
+ getPackageLevelSugaredLogger().Warnf(format, args...)
+}
+
+// V reports whether verbosity level l is at least the requested verbose level.
+func V(level int) bool {
+ return getPackageLevelLogger().V(level)
+}
diff --git a/vendor/github.com/opencord/voltha-go/db/kvstore/client.go b/vendor/github.com/opencord/voltha-go/db/kvstore/client.go
new file mode 100644
index 0000000..34ab711
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/db/kvstore/client.go
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package kvstore
+
+import (
+ "github.com/opencord/voltha-go/common/log"
+)
+
+const (
+ // Default timeout in seconds when making a kvstore request
+ defaultKVGetTimeout = 5
+ // Maximum channel buffer between publisher/subscriber goroutines
+ maxClientChannelBufferSize = 10
+)
+
+// These constants represent the event types returned by the KV client
+const (
+ PUT = iota
+ DELETE
+ CONNECTIONDOWN
+ UNKNOWN
+)
+
+// KVPair is a common wrapper for key-value pairs returned from the KV store
+type KVPair struct {
+ Key string
+ Value interface{}
+ Session string
+ Lease int64
+}
+
+func init() {
+ log.AddPackage(log.JSON, log.WarnLevel, nil)
+}
+
+// NewKVPair creates a new KVPair object
+func NewKVPair(key string, value interface{}, session string, lease int64) *KVPair {
+ kv := new(KVPair)
+ kv.Key = key
+ kv.Value = value
+ kv.Session = session
+ kv.Lease = lease
+ return kv
+}
+
+// Event is generated by the KV client when a key change is detected
+type Event struct {
+ EventType int
+ Key interface{}
+ Value interface{}
+}
+
+// NewEvent creates a new Event object
+func NewEvent(eventType int, key interface{}, value interface{}) *Event {
+ evnt := new(Event)
+ evnt.EventType = eventType
+ evnt.Key = key
+ evnt.Value = value
+
+ return evnt
+}
+
+// Client represents the set of APIs a KV Client must implement
+type Client interface {
+ List(key string, timeout int, lock ...bool) (map[string]*KVPair, error)
+ Get(key string, timeout int, lock ...bool) (*KVPair, error)
+ Put(key string, value interface{}, timeout int, lock ...bool) error
+ Delete(key string, timeout int, lock ...bool) error
+ Reserve(key string, value interface{}, ttl int64) (interface{}, error)
+ ReleaseReservation(key string) error
+ ReleaseAllReservations() error
+ RenewReservation(key string) error
+ Watch(key string) chan *Event
+ AcquireLock(lockName string, timeout int) error
+ ReleaseLock(lockName string) error
+ CloseWatch(key string, ch chan *Event)
+ Close()
+}
diff --git a/vendor/github.com/opencord/voltha-go/db/kvstore/consulclient.go b/vendor/github.com/opencord/voltha-go/db/kvstore/consulclient.go
new file mode 100644
index 0000000..738ca92
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/db/kvstore/consulclient.go
@@ -0,0 +1,508 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package kvstore
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ log "github.com/opencord/voltha-go/common/log"
+ "sync"
+ "time"
+ //log "ciena.com/coordinator/common"
+ consulapi "github.com/hashicorp/consul/api"
+)
+
+type channelContextMap struct {
+ ctx context.Context
+ channel chan *Event
+ cancel context.CancelFunc
+}
+
+// ConsulClient represents the consul KV store client
+type ConsulClient struct {
+ session *consulapi.Session
+ sessionID string
+ consul *consulapi.Client
+ doneCh *chan int
+ keyReservations map[string]interface{}
+ watchedChannelsContext map[string][]*channelContextMap
+ writeLock sync.Mutex
+}
+
+// NewConsulClient returns a new client for the Consul KV store
+func NewConsulClient(addr string, timeout int) (*ConsulClient, error) {
+
+ duration := GetDuration(timeout)
+
+ config := consulapi.DefaultConfig()
+ config.Address = addr
+ config.WaitTime = duration
+ consul, err := consulapi.NewClient(config)
+ if err != nil {
+ log.Error(err)
+ return nil, err
+ }
+
+ doneCh := make(chan int, 1)
+ wChannelsContext := make(map[string][]*channelContextMap)
+ reservations := make(map[string]interface{})
+ return &ConsulClient{consul: consul, doneCh: &doneCh, watchedChannelsContext: wChannelsContext, keyReservations: reservations}, nil
+}
+
+// List returns an array of key-value pairs with key as a prefix. Timeout defines how long the function will
+// wait for a response
+func (c *ConsulClient) List(key string, timeout int, lock ...bool) (map[string]*KVPair, error) {
+ duration := GetDuration(timeout)
+
+ kv := c.consul.KV()
+ var queryOptions consulapi.QueryOptions
+ queryOptions.WaitTime = duration
+ // For now we ignore meta data
+ kvps, _, err := kv.List(key, &queryOptions)
+ if err != nil {
+ log.Error(err)
+ return nil, err
+ }
+ m := make(map[string]*KVPair)
+ for _, kvp := range kvps {
+ m[string(kvp.Key)] = NewKVPair(string(kvp.Key), kvp.Value, string(kvp.Session), 0)
+ }
+ return m, nil
+}
+
+// Get returns a key-value pair for a given key. Timeout defines how long the function will
+// wait for a response
+func (c *ConsulClient) Get(key string, timeout int, lock ...bool) (*KVPair, error) {
+
+ duration := GetDuration(timeout)
+
+ kv := c.consul.KV()
+ var queryOptions consulapi.QueryOptions
+ queryOptions.WaitTime = duration
+ // For now we ignore meta data
+ kvp, _, err := kv.Get(key, &queryOptions)
+ if err != nil {
+ log.Error(err)
+ return nil, err
+ }
+ if kvp != nil {
+ return NewKVPair(string(kvp.Key), kvp.Value, string(kvp.Session), 0), nil
+ }
+
+ return nil, nil
+}
+
+// Put writes a key-value pair to the KV store. Value can only be a string or []byte since the consul API
+// accepts only a []byte as a value for a put operation. Timeout defines how long the function will
+// wait for a response
+func (c *ConsulClient) Put(key string, value interface{}, timeout int, lock ...bool) error {
+
+ // Validate that we can create a byte array from the value as consul API expects a byte array
+ var val []byte
+ var er error
+ if val, er = ToByte(value); er != nil {
+ log.Error(er)
+ return er
+ }
+
+ // Create a key value pair
+ kvp := consulapi.KVPair{Key: key, Value: val}
+ kv := c.consul.KV()
+ var writeOptions consulapi.WriteOptions
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ _, err := kv.Put(&kvp, &writeOptions)
+ if err != nil {
+ log.Error(err)
+ return err
+ }
+ return nil
+}
+
+// Delete removes a key from the KV store. Timeout defines how long the function will
+// wait for a response
+func (c *ConsulClient) Delete(key string, timeout int, lock ...bool) error {
+ kv := c.consul.KV()
+ var writeOptions consulapi.WriteOptions
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ _, err := kv.Delete(key, &writeOptions)
+ if err != nil {
+ log.Error(err)
+ return err
+ }
+ return nil
+}
+
+func (c *ConsulClient) deleteSession() {
+ if c.sessionID != "" {
+ log.Debug("cleaning-up-session")
+ session := c.consul.Session()
+ _, err := session.Destroy(c.sessionID, nil)
+ if err != nil {
+ log.Errorw("error-cleaning-session", log.Fields{"session": c.sessionID, "error": err})
+ }
+ }
+ c.sessionID = ""
+ c.session = nil
+}
+
+func (c *ConsulClient) createSession(ttl int64, retries int) (*consulapi.Session, string, error) {
+ session := c.consul.Session()
+ entry := &consulapi.SessionEntry{
+ Behavior: consulapi.SessionBehaviorDelete,
+ TTL: "10s", // strconv.FormatInt(ttl, 10) + "s", // disable ttl
+ }
+
+ for {
+ id, meta, err := session.Create(entry, nil)
+ if err != nil {
+ log.Errorw("create-session-error", log.Fields{"error": err})
+ if retries == 0 {
+ return nil, "", err
+ }
+ } else if meta.RequestTime == 0 {
+ log.Errorw("create-session-bad-meta-data", log.Fields{"meta-data": meta})
+ if retries == 0 {
+ return nil, "", errors.New("bad-meta-data")
+ }
+ } else if id == "" {
+ log.Error("create-session-nil-id")
+ if retries == 0 {
+ return nil, "", errors.New("ID-nil")
+ }
+ } else {
+ return session, id, nil
+ }
+ // If retry param is -1 we will retry indefinitely
+ if retries > 0 {
+ retries--
+ }
+ log.Debug("retrying-session-create-after-a-second-delay")
+ time.Sleep(time.Duration(1) * time.Second)
+ }
+}
+
+// Helper function to verify mostly whether the content of two interface types are the same. Focus is []byte and
+// string types
+func isEqual(val1 interface{}, val2 interface{}) bool {
+ b1, err := ToByte(val1)
+ b2, er := ToByte(val2)
+ if err == nil && er == nil {
+ return bytes.Equal(b1, b2)
+ }
+ return val1 == val2
+}
+
+// Reserve is invoked to acquire a key and set it to a given value. Value can only be a string or []byte since
+// the consul API accepts only a []byte. Timeout defines how long the function will wait for a response. TTL
+// defines how long that reservation is valid. When TTL expires the key is unreserved by the KV store itself.
+// If the key is acquired then the value returned will be the value passed in. If the key is already acquired
+// then the value assigned to that key will be returned.
+func (c *ConsulClient) Reserve(key string, value interface{}, ttl int64) (interface{}, error) {
+
+ // Validate that we can create a byte array from the value as consul API expects a byte array
+ var val []byte
+ var er error
+ if val, er = ToByte(value); er != nil {
+ log.Error(er)
+ return nil, er
+ }
+
+ // Cleanup any existing session and recreate new ones. A key is reserved against a session
+ if c.sessionID != "" {
+ c.deleteSession()
+ }
+
+ // Clear session if reservation is not successful
+ reservationSuccessful := false
+ defer func() {
+ if !reservationSuccessful {
+ log.Debug("deleting-session")
+ c.deleteSession()
+ }
+ }()
+
+ session, sessionID, err := c.createSession(ttl, -1)
+ if err != nil {
+ log.Errorw("no-session-created", log.Fields{"error": err})
+ return "", errors.New("no-session-created")
+ }
+ log.Debugw("session-created", log.Fields{"session-id": sessionID})
+ c.sessionID = sessionID
+ c.session = session
+
+ // Try to grap the Key using the session
+ kv := c.consul.KV()
+ kvp := consulapi.KVPair{Key: key, Value: val, Session: c.sessionID}
+ result, _, err := kv.Acquire(&kvp, nil)
+ if err != nil {
+ log.Errorw("error-acquiring-keys", log.Fields{"error": err})
+ return nil, err
+ }
+
+ log.Debugw("key-acquired", log.Fields{"key": key, "status": result})
+
+ // Irrespective whether we were successful in acquiring the key, let's read it back and see if it's us.
+ m, err := c.Get(key, defaultKVGetTimeout)
+ if err != nil {
+ return nil, err
+ }
+ if m != nil {
+ log.Debugw("response-received", log.Fields{"key": m.Key, "m.value": string(m.Value.([]byte)), "value": value})
+ if m.Key == key && isEqual(m.Value, value) {
+ // My reservation is successful - register it. For now, support is only for 1 reservation per key
+ // per session.
+ reservationSuccessful = true
+ c.writeLock.Lock()
+ c.keyReservations[key] = m.Value
+ c.writeLock.Unlock()
+ return m.Value, nil
+ }
+ // My reservation has failed. Return the owner of that key
+ return m.Value, nil
+ }
+ return nil, nil
+}
+
+// ReleaseAllReservations releases all key reservations previously made (using Reserve API)
+func (c *ConsulClient) ReleaseAllReservations() error {
+ kv := c.consul.KV()
+ var kvp consulapi.KVPair
+ var result bool
+ var err error
+
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+
+ for key, value := range c.keyReservations {
+ kvp = consulapi.KVPair{Key: key, Value: value.([]byte), Session: c.sessionID}
+ result, _, err = kv.Release(&kvp, nil)
+ if err != nil {
+ log.Errorw("cannot-release-reservation", log.Fields{"key": key, "error": err})
+ return err
+ }
+ if !result {
+ log.Errorw("cannot-release-reservation", log.Fields{"key": key})
+ }
+ delete(c.keyReservations, key)
+ }
+ return nil
+}
+
+// ReleaseReservation releases reservation for a specific key.
+func (c *ConsulClient) ReleaseReservation(key string) error {
+ var ok bool
+ var reservedValue interface{}
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ if reservedValue, ok = c.keyReservations[key]; !ok {
+ return errors.New("key-not-reserved:" + key)
+ }
+ // Release the reservation
+ kv := c.consul.KV()
+ kvp := consulapi.KVPair{Key: key, Value: reservedValue.([]byte), Session: c.sessionID}
+
+ result, _, er := kv.Release(&kvp, nil)
+ if er != nil {
+ return er
+ }
+ // Remove that key entry on success
+ if result {
+ delete(c.keyReservations, key)
+ return nil
+ }
+ return errors.New("key-cannot-be-unreserved")
+}
+
+// RenewReservation renews a reservation. A reservation will go stale after the specified TTL (Time To Live)
+// period specified when reserving the key
+func (c *ConsulClient) RenewReservation(key string) error {
+ // In the case of Consul, renew reservation of a reserve key only require renewing the client session.
+
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+
+ // Verify the key was reserved
+ if _, ok := c.keyReservations[key]; !ok {
+ return errors.New("key-not-reserved")
+ }
+
+ if c.session == nil {
+ return errors.New("no-session-exist")
+ }
+
+ var writeOptions consulapi.WriteOptions
+ if _, _, err := c.session.Renew(c.sessionID, &writeOptions); err != nil {
+ return err
+ }
+ return nil
+}
+
+// Watch provides the watch capability on a given key. It returns a channel onto which the callee needs to
+// listen to receive Events.
+func (c *ConsulClient) Watch(key string) chan *Event {
+
+ // Create a new channel
+ ch := make(chan *Event, maxClientChannelBufferSize)
+
+ // Create a context to track this request
+ watchContext, cFunc := context.WithCancel(context.Background())
+
+ // Save the channel and context reference for later
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ ccm := channelContextMap{channel: ch, ctx: watchContext, cancel: cFunc}
+ c.watchedChannelsContext[key] = append(c.watchedChannelsContext[key], &ccm)
+
+ // Launch a go routine to listen for updates
+ go c.listenForKeyChange(watchContext, key, ch)
+
+ return ch
+}
+
+// CloseWatch closes a specific watch. Both the key and the channel are required when closing a watch as there
+// may be multiple listeners on the same key. The previously created channel serves as a key
+func (c *ConsulClient) CloseWatch(key string, ch chan *Event) {
+ // First close the context
+ var ok bool
+ var watchedChannelsContexts []*channelContextMap
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ if watchedChannelsContexts, ok = c.watchedChannelsContext[key]; !ok {
+ log.Errorw("key-has-no-watched-context-or-channel", log.Fields{"key": key})
+ return
+ }
+ // Look for the channels
+ var pos = -1
+ for i, chCtxMap := range watchedChannelsContexts {
+ if chCtxMap.channel == ch {
+ log.Debug("channel-found")
+ chCtxMap.cancel()
+ //close the channel
+ close(ch)
+ pos = i
+ break
+ }
+ }
+ // Remove that entry if present
+ if pos >= 0 {
+ c.watchedChannelsContext[key] = append(c.watchedChannelsContext[key][:pos], c.watchedChannelsContext[key][pos+1:]...)
+ }
+ log.Debugw("watched-channel-exiting", log.Fields{"key": key, "channel": c.watchedChannelsContext[key]})
+}
+
+func (c *ConsulClient) isKVEqual(kv1 *consulapi.KVPair, kv2 *consulapi.KVPair) bool {
+ if (kv1 == nil) && (kv2 == nil) {
+ return true
+ } else if (kv1 == nil) || (kv2 == nil) {
+ return false
+ }
+ // Both the KV should be non-null here
+ if kv1.Key != kv2.Key ||
+ !bytes.Equal(kv1.Value, kv2.Value) ||
+ kv1.Session != kv2.Session ||
+ kv1.LockIndex != kv2.LockIndex ||
+ kv1.ModifyIndex != kv2.ModifyIndex {
+ return false
+ }
+ return true
+}
+
+func (c *ConsulClient) listenForKeyChange(watchContext context.Context, key string, ch chan *Event) {
+ log.Debugw("start-watching-channel", log.Fields{"key": key, "channel": ch})
+
+ defer c.CloseWatch(key, ch)
+ duration := GetDuration(defaultKVGetTimeout)
+ kv := c.consul.KV()
+ var queryOptions consulapi.QueryOptions
+ queryOptions.WaitTime = duration
+
+ // Get the existing value, if any
+ previousKVPair, meta, err := kv.Get(key, &queryOptions)
+ if err != nil {
+ log.Debug(err)
+ }
+ lastIndex := meta.LastIndex
+
+ // Wait for change. Push any change onto the channel and keep waiting for new update
+ //var waitOptions consulapi.QueryOptions
+ var pair *consulapi.KVPair
+ //watchContext, _ := context.WithCancel(context.Background())
+ waitOptions := queryOptions.WithContext(watchContext)
+ for {
+ //waitOptions = consulapi.QueryOptions{WaitIndex: lastIndex}
+ waitOptions.WaitIndex = lastIndex
+ pair, meta, err = kv.Get(key, waitOptions)
+ select {
+ case <-watchContext.Done():
+ log.Debug("done-event-received-exiting")
+ return
+ default:
+ if err != nil {
+ log.Warnw("error-from-watch", log.Fields{"error": err})
+ ch <- NewEvent(CONNECTIONDOWN, key, []byte(""))
+ } else {
+ log.Debugw("index-state", log.Fields{"lastindex": lastIndex, "newindex": meta.LastIndex, "key": key})
+ }
+ }
+ if err != nil {
+ log.Debug(err)
+ // On error, block for 10 milliseconds to prevent endless loop
+ time.Sleep(10 * time.Millisecond)
+ } else if meta.LastIndex <= lastIndex {
+ log.Info("no-index-change-or-negative")
+ } else {
+ log.Debugw("update-received", log.Fields{"pair": pair})
+ if pair == nil {
+ ch <- NewEvent(DELETE, key, []byte(""))
+ } else if !c.isKVEqual(pair, previousKVPair) {
+ // Push the change onto the channel if the data has changed
+ // For now just assume it's a PUT change
+ log.Debugw("pair-details", log.Fields{"session": pair.Session, "key": pair.Key, "value": pair.Value})
+ ch <- NewEvent(PUT, pair.Key, pair.Value)
+ }
+ previousKVPair = pair
+ lastIndex = meta.LastIndex
+ }
+ }
+}
+
+// Close closes the KV store client
+func (c *ConsulClient) Close() {
+ var writeOptions consulapi.WriteOptions
+ // Inform any goroutine it's time to say goodbye.
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ if c.doneCh != nil {
+ close(*c.doneCh)
+ }
+
+ // Clear the sessionID
+ if _, err := c.consul.Session().Destroy(c.sessionID, &writeOptions); err != nil {
+ log.Errorw("error-closing-client", log.Fields{"error": err})
+ }
+}
+
+
+func (c *ConsulClient) AcquireLock(lockName string, timeout int) error {
+ return nil
+}
+
+func (c *ConsulClient) ReleaseLock(lockName string) error {
+ return nil
+}
\ No newline at end of file
diff --git a/vendor/github.com/opencord/voltha-go/db/kvstore/etcdclient.go b/vendor/github.com/opencord/voltha-go/db/kvstore/etcdclient.go
new file mode 100644
index 0000000..e5f6dfe
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/db/kvstore/etcdclient.go
@@ -0,0 +1,520 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package kvstore
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/opencord/voltha-go/common/log"
+ v3Client "go.etcd.io/etcd/clientv3"
+ v3Concurrency "go.etcd.io/etcd/clientv3/concurrency"
+ v3rpcTypes "go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes"
+ "sync"
+)
+
+// EtcdClient represents the Etcd KV store client
+type EtcdClient struct {
+ ectdAPI *v3Client.Client
+ leaderRev v3Client.Client
+ keyReservations map[string]*v3Client.LeaseID
+ watchedChannels sync.Map
+ writeLock sync.Mutex
+ lockToMutexMap map[string]*v3Concurrency.Mutex
+ lockToSessionMap map[string]*v3Concurrency.Session
+ lockToMutexLock sync.Mutex
+}
+
+// NewEtcdClient returns a new client for the Etcd KV store
+func NewEtcdClient(addr string, timeout int) (*EtcdClient, error) {
+ duration := GetDuration(timeout)
+
+ c, err := v3Client.New(v3Client.Config{
+ Endpoints: []string{addr},
+ DialTimeout: duration,
+ })
+ if err != nil {
+ log.Error(err)
+ return nil, err
+ }
+
+ reservations := make(map[string]*v3Client.LeaseID)
+ lockMutexMap := make(map[string]*v3Concurrency.Mutex)
+ lockSessionMap := make(map[string]*v3Concurrency.Session)
+
+ return &EtcdClient{ectdAPI: c, keyReservations: reservations, lockToMutexMap: lockMutexMap,
+ lockToSessionMap: lockSessionMap}, nil
+}
+
+// List returns an array of key-value pairs with key as a prefix. Timeout defines how long the function will
+// wait for a response
+func (c *EtcdClient) List(key string, timeout int, lock ...bool) (map[string]*KVPair, error) {
+ duration := GetDuration(timeout)
+
+ ctx, cancel := context.WithTimeout(context.Background(), duration)
+
+ // DO NOT lock by default; otherwise lock per instructed value
+ if len(lock) > 0 && lock[0] {
+ session, _ := v3Concurrency.NewSession(c.ectdAPI, v3Concurrency.WithContext(ctx))
+ mu := v3Concurrency.NewMutex(session, "/lock"+key)
+ mu.Lock(context.Background())
+ defer mu.Unlock(context.Background())
+ defer session.Close()
+ }
+
+ resp, err := c.ectdAPI.Get(ctx, key, v3Client.WithPrefix())
+ cancel()
+ if err != nil {
+ log.Error(err)
+ return nil, err
+ }
+ m := make(map[string]*KVPair)
+ for _, ev := range resp.Kvs {
+ m[string(ev.Key)] = NewKVPair(string(ev.Key), ev.Value, "", ev.Lease)
+ }
+ return m, nil
+}
+
+// Get returns a key-value pair for a given key. Timeout defines how long the function will
+// wait for a response
+func (c *EtcdClient) Get(key string, timeout int, lock ...bool) (*KVPair, error) {
+ duration := GetDuration(timeout)
+
+ ctx, cancel := context.WithTimeout(context.Background(), duration)
+
+ // Lock by default; otherwise lock per instructed value
+ if len(lock) > 0 && lock[0] {
+ session, _ := v3Concurrency.NewSession(c.ectdAPI, v3Concurrency.WithContext(ctx))
+ mu := v3Concurrency.NewMutex(session, "/lock"+key)
+ mu.Lock(context.Background())
+ defer mu.Unlock(context.Background())
+ defer session.Close()
+ }
+
+ resp, err := c.ectdAPI.Get(ctx, key)
+ cancel()
+ if err != nil {
+ log.Error(err)
+ return nil, err
+ }
+ for _, ev := range resp.Kvs {
+ // Only one value is returned
+ return NewKVPair(string(ev.Key), ev.Value, "", ev.Lease), nil
+ }
+ return nil, nil
+}
+
+// Put writes a key-value pair to the KV store. Value can only be a string or []byte since the etcd API
+// accepts only a string as a value for a put operation. Timeout defines how long the function will
+// wait for a response
+func (c *EtcdClient) Put(key string, value interface{}, timeout int, lock ...bool) error {
+
+ // Validate that we can convert value to a string as etcd API expects a string
+ var val string
+ var er error
+ if val, er = ToString(value); er != nil {
+ return fmt.Errorf("unexpected-type-%T", value)
+ }
+
+ duration := GetDuration(timeout)
+
+ ctx, cancel := context.WithTimeout(context.Background(), duration)
+
+ // Lock by default; otherwise lock per instructed value
+ if len(lock) == 0 || lock[0] {
+ session, _ := v3Concurrency.NewSession(c.ectdAPI, v3Concurrency.WithContext(ctx))
+ mu := v3Concurrency.NewMutex(session, "/lock"+key)
+ mu.Lock(context.Background())
+ defer mu.Unlock(context.Background())
+ defer session.Close()
+ }
+
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ _, err := c.ectdAPI.Put(ctx, key, val)
+ cancel()
+ if err != nil {
+ switch err {
+ case context.Canceled:
+ log.Warnw("context-cancelled", log.Fields{"error": err})
+ case context.DeadlineExceeded:
+ log.Warnw("context-deadline-exceeded", log.Fields{"error": err})
+ case v3rpcTypes.ErrEmptyKey:
+ log.Warnw("etcd-client-error", log.Fields{"error": err})
+ default:
+ log.Warnw("bad-endpoints", log.Fields{"error": err})
+ }
+ return err
+ }
+ return nil
+}
+
+// Delete removes a key from the KV store. Timeout defines how long the function will
+// wait for a response
+func (c *EtcdClient) Delete(key string, timeout int, lock ...bool) error {
+
+ duration := GetDuration(timeout)
+
+ ctx, cancel := context.WithTimeout(context.Background(), duration)
+
+ // Lock by default; otherwise lock per instructed value
+ if len(lock) == 0 || lock[0] {
+ session, _ := v3Concurrency.NewSession(c.ectdAPI, v3Concurrency.WithContext(ctx))
+ mu := v3Concurrency.NewMutex(session, "/lock"+key)
+ mu.Lock(context.Background())
+ defer mu.Unlock(context.Background())
+ defer session.Close()
+ }
+
+ defer cancel()
+
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+
+ // delete the keys
+ if _, err := c.ectdAPI.Delete(ctx, key, v3Client.WithPrefix()); err != nil {
+ log.Errorw("failed-to-delete-key", log.Fields{"key": key, "error": err})
+ return err
+ }
+ log.Debugw("key(s)-deleted", log.Fields{"key": key})
+ return nil
+}
+
+// Reserve is invoked to acquire a key and set it to a given value. Value can only be a string or []byte since
+// the etcd API accepts only a string. Timeout defines how long the function will wait for a response. TTL
+// defines how long that reservation is valid. When TTL expires the key is unreserved by the KV store itself.
+// If the key is acquired then the value returned will be the value passed in. If the key is already acquired
+// then the value assigned to that key will be returned.
+func (c *EtcdClient) Reserve(key string, value interface{}, ttl int64) (interface{}, error) {
+ // Validate that we can convert value to a string as etcd API expects a string
+ var val string
+ var er error
+ if val, er = ToString(value); er != nil {
+ return nil, fmt.Errorf("unexpected-type%T", value)
+ }
+
+ // Create a lease
+ resp, err := c.ectdAPI.Grant(context.Background(), ttl)
+ if err != nil {
+ log.Error(err)
+ return nil, err
+ }
+ // Register the lease id
+ c.writeLock.Lock()
+ c.keyReservations[key] = &resp.ID
+ c.writeLock.Unlock()
+
+ // Revoke lease if reservation is not successful
+ reservationSuccessful := false
+ defer func() {
+ if !reservationSuccessful {
+ if err = c.ReleaseReservation(key); err != nil {
+ log.Error("cannot-release-lease")
+ }
+ }
+ }()
+
+ // Try to grap the Key with the above lease
+ c.ectdAPI.Txn(context.Background())
+ txn := c.ectdAPI.Txn(context.Background())
+ txn = txn.If(v3Client.Compare(v3Client.Version(key), "=", 0))
+ txn = txn.Then(v3Client.OpPut(key, val, v3Client.WithLease(resp.ID)))
+ txn = txn.Else(v3Client.OpGet(key))
+ result, er := txn.Commit()
+ if er != nil {
+ return nil, er
+ }
+
+ if !result.Succeeded {
+ // Verify whether we are already the owner of that Key
+ if len(result.Responses) > 0 &&
+ len(result.Responses[0].GetResponseRange().Kvs) > 0 {
+ kv := result.Responses[0].GetResponseRange().Kvs[0]
+ if string(kv.Value) == val {
+ reservationSuccessful = true
+ return value, nil
+ }
+ return kv.Value, nil
+ }
+ } else {
+ // Read the Key to ensure this is our Key
+ m, err := c.Get(key, defaultKVGetTimeout, false)
+ if err != nil {
+ return nil, err
+ }
+ if m != nil {
+ if m.Key == key && isEqual(m.Value, value) {
+ // My reservation is successful - register it. For now, support is only for 1 reservation per key
+ // per session.
+ reservationSuccessful = true
+ return value, nil
+ }
+ // My reservation has failed. Return the owner of that key
+ return m.Value, nil
+ }
+ }
+ return nil, nil
+}
+
+// ReleaseAllReservations releases all key reservations previously made (using Reserve API)
+func (c *EtcdClient) ReleaseAllReservations() error {
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ for key, leaseID := range c.keyReservations {
+ _, err := c.ectdAPI.Revoke(context.Background(), *leaseID)
+ if err != nil {
+ log.Errorw("cannot-release-reservation", log.Fields{"key": key, "error": err})
+ return err
+ }
+ delete(c.keyReservations, key)
+ }
+ return nil
+}
+
+// ReleaseReservation releases reservation for a specific key.
+func (c *EtcdClient) ReleaseReservation(key string) error {
+ // Get the leaseid using the key
+ log.Debugw("Release-reservation", log.Fields{"key":key})
+ var ok bool
+ var leaseID *v3Client.LeaseID
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ if leaseID, ok = c.keyReservations[key]; !ok {
+ return nil
+ }
+ if leaseID != nil {
+ _, err := c.ectdAPI.Revoke(context.Background(), *leaseID)
+ if err != nil {
+ log.Error(err)
+ return err
+ }
+ delete(c.keyReservations, key)
+ }
+ return nil
+}
+
+// RenewReservation renews a reservation. A reservation will go stale after the specified TTL (Time To Live)
+// period specified when reserving the key
+func (c *EtcdClient) RenewReservation(key string) error {
+ // Get the leaseid using the key
+ var ok bool
+ var leaseID *v3Client.LeaseID
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ if leaseID, ok = c.keyReservations[key]; !ok {
+ return errors.New("key-not-reserved")
+ }
+
+ if leaseID != nil {
+ _, err := c.ectdAPI.KeepAliveOnce(context.Background(), *leaseID)
+ if err != nil {
+ log.Errorw("lease-may-have-expired", log.Fields{"error": err})
+ return err
+ }
+ } else {
+ return errors.New("lease-expired")
+ }
+ return nil
+}
+
+// Watch provides the watch capability on a given key. It returns a channel onto which the callee needs to
+// listen to receive Events.
+func (c *EtcdClient) Watch(key string) chan *Event {
+ w := v3Client.NewWatcher(c.ectdAPI)
+ channel := w.Watch(context.Background(), key, v3Client.WithPrefix())
+
+ // Create a new channel
+ ch := make(chan *Event, maxClientChannelBufferSize)
+
+ // Keep track of the created channels so they can be closed when required
+ channelMap := make(map[chan *Event]v3Client.Watcher)
+ channelMap[ch] = w
+ //c.writeLock.Lock()
+ //defer c.writeLock.Unlock()
+
+ channelMaps := c.addChannelMap(key, channelMap)
+
+ log.Debugw("watched-channels", log.Fields{"channels": channelMaps})
+ // Launch a go routine to listen for updates
+ go c.listenForKeyChange(channel, ch)
+
+ return ch
+
+}
+
+func (c *EtcdClient) addChannelMap(key string, channelMap map[chan *Event]v3Client.Watcher) []map[chan *Event]v3Client.Watcher {
+ var channels interface{}
+ var exists bool
+
+ if channels, exists = c.watchedChannels.Load(key); exists {
+ channels = append(channels.([]map[chan *Event]v3Client.Watcher), channelMap)
+ } else {
+ channels = []map[chan *Event]v3Client.Watcher{channelMap}
+ }
+ c.watchedChannels.Store(key, channels)
+
+ return channels.([]map[chan *Event]v3Client.Watcher)
+}
+
+func (c *EtcdClient) removeChannelMap(key string, pos int) []map[chan *Event]v3Client.Watcher {
+ var channels interface{}
+ var exists bool
+
+ if channels, exists = c.watchedChannels.Load(key); exists {
+ channels = append(channels.([]map[chan *Event]v3Client.Watcher)[:pos], channels.([]map[chan *Event]v3Client.Watcher)[pos+1:]...)
+ c.watchedChannels.Store(key, channels)
+ }
+
+ return channels.([]map[chan *Event]v3Client.Watcher)
+}
+
+func (c *EtcdClient) getChannelMaps(key string) ([]map[chan *Event]v3Client.Watcher, bool) {
+ var channels interface{}
+ var exists bool
+
+ channels, exists = c.watchedChannels.Load(key)
+
+ if channels == nil {
+ return nil, exists
+ }
+
+ return channels.([]map[chan *Event]v3Client.Watcher), exists
+}
+
+// CloseWatch closes a specific watch. Both the key and the channel are required when closing a watch as there
+// may be multiple listeners on the same key. The previously created channel serves as a key
+func (c *EtcdClient) CloseWatch(key string, ch chan *Event) {
+ // Get the array of channels mapping
+ var watchedChannels []map[chan *Event]v3Client.Watcher
+ var ok bool
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+
+ if watchedChannels, ok = c.getChannelMaps(key); !ok {
+ log.Warnw("key-has-no-watched-channels", log.Fields{"key": key})
+ return
+ }
+ // Look for the channels
+ var pos = -1
+ for i, chMap := range watchedChannels {
+ if t, ok := chMap[ch]; ok {
+ log.Debug("channel-found")
+ // Close the etcd watcher before the client channel. This should close the etcd channel as well
+ if err := t.Close(); err != nil {
+ log.Errorw("watcher-cannot-be-closed", log.Fields{"key": key, "error": err})
+ }
+ close(ch)
+ pos = i
+ break
+ }
+ }
+
+ channelMaps, _ := c.getChannelMaps(key)
+ // Remove that entry if present
+ if pos >= 0 {
+ channelMaps = c.removeChannelMap(key, pos)
+ }
+ log.Infow("watcher-channel-exiting", log.Fields{"key": key, "channel": channelMaps})
+}
+
+func (c *EtcdClient) listenForKeyChange(channel v3Client.WatchChan, ch chan<- *Event) {
+ log.Debug("start-listening-on-channel ...")
+ for resp := range channel {
+ for _, ev := range resp.Events {
+ //log.Debugf("%s %q : %q\n", ev.Type, ev.Kv.Key, ev.Kv.Value)
+ ch <- NewEvent(getEventType(ev), ev.Kv.Key, ev.Kv.Value)
+ }
+ }
+ log.Debug("stop-listening-on-channel ...")
+}
+
+func getEventType(event *v3Client.Event) int {
+ switch event.Type {
+ case v3Client.EventTypePut:
+ return PUT
+ case v3Client.EventTypeDelete:
+ return DELETE
+ }
+ return UNKNOWN
+}
+
+// Close closes the KV store client
+func (c *EtcdClient) Close() {
+ c.writeLock.Lock()
+ defer c.writeLock.Unlock()
+ if err := c.ectdAPI.Close(); err != nil {
+ log.Errorw("error-closing-client", log.Fields{"error": err})
+ }
+}
+
+func (c *EtcdClient) addLockName(lockName string, lock *v3Concurrency.Mutex, session *v3Concurrency.Session) {
+ c.lockToMutexLock.Lock()
+ defer c.lockToMutexLock.Unlock()
+ c.lockToMutexMap[lockName] = lock
+ c.lockToSessionMap[lockName] = session
+}
+
+func (c *EtcdClient) deleteLockName(lockName string) {
+ c.lockToMutexLock.Lock()
+ defer c.lockToMutexLock.Unlock()
+ delete(c.lockToMutexMap, lockName)
+ delete(c.lockToSessionMap, lockName)
+}
+
+func (c *EtcdClient) getLock(lockName string) (*v3Concurrency.Mutex, *v3Concurrency.Session) {
+ c.lockToMutexLock.Lock()
+ defer c.lockToMutexLock.Unlock()
+ var lock *v3Concurrency.Mutex
+ var session *v3Concurrency.Session
+ if l, exist := c.lockToMutexMap[lockName]; exist {
+ lock = l
+ }
+ if s, exist := c.lockToSessionMap[lockName]; exist {
+ session = s
+ }
+ return lock, session
+}
+
+func (c *EtcdClient) AcquireLock(lockName string, timeout int) error {
+ duration := GetDuration(timeout)
+ ctx, cancel := context.WithTimeout(context.Background(), duration)
+ session, _ := v3Concurrency.NewSession(c.ectdAPI, v3Concurrency.WithContext(ctx))
+ mu := v3Concurrency.NewMutex(session, "/devicelock_"+lockName)
+ if err := mu.Lock(context.Background()); err != nil {
+ return err
+ }
+ c.addLockName(lockName, mu, session)
+ cancel()
+ return nil
+}
+
+func (c *EtcdClient) ReleaseLock(lockName string) error {
+ lock, session := c.getLock(lockName)
+ var err error
+ if lock != nil {
+ if e := lock.Unlock(context.Background()); e != nil {
+ err = e
+ }
+ }
+ if session != nil {
+ if e := session.Close(); e != nil {
+ err = e
+ }
+ }
+ c.deleteLockName(lockName)
+
+ return err
+}
diff --git a/vendor/github.com/opencord/voltha-go/db/kvstore/kvutils.go b/vendor/github.com/opencord/voltha-go/db/kvstore/kvutils.go
new file mode 100644
index 0000000..cf9a95c
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/db/kvstore/kvutils.go
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package kvstore
+
+import (
+ "fmt"
+ "time"
+)
+
+// GetDuration converts a timeout value from int to duration. If the timeout value is
+// either not set of -ve then we default KV timeout (configurable) is used.
+func GetDuration(timeout int) time.Duration {
+ if timeout <= 0 {
+ return defaultKVGetTimeout * time.Second
+ }
+ return time.Duration(timeout) * time.Second
+}
+
+// ToString converts an interface value to a string. The interface should either be of
+// a string type or []byte. Otherwise, an error is returned.
+func ToString(value interface{}) (string, error) {
+ switch t := value.(type) {
+ case []byte:
+ return string(value.([]byte)), nil
+ case string:
+ return value.(string), nil
+ default:
+ return "", fmt.Errorf("unexpected-type-%T", t)
+ }
+}
+
+// ToByte converts an interface value to a []byte. The interface should either be of
+// a string type or []byte. Otherwise, an error is returned.
+func ToByte(value interface{}) ([]byte, error) {
+ switch t := value.(type) {
+ case []byte:
+ return value.([]byte), nil
+ case string:
+ return []byte(value.(string)), nil
+ default:
+ return nil, fmt.Errorf("unexpected-type-%T", t)
+ }
+}
diff --git a/vendor/github.com/opencord/voltha-go/kafka/client.go b/vendor/github.com/opencord/voltha-go/kafka/client.go
new file mode 100644
index 0000000..a4c49ca
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/kafka/client.go
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package kafka
+
+import (
+ ca "github.com/opencord/voltha-protos/go/inter_container"
+ "time"
+)
+
+const (
+ PartitionConsumer = iota
+ GroupCustomer = iota
+)
+
+const (
+ OffsetNewest = -1
+ OffsetOldest = -2
+)
+
+const (
+ GroupIdKey = "groupId"
+ Offset = "offset"
+)
+
+const (
+ DefaultKafkaHost = "127.0.0.1"
+ DefaultKafkaPort = 9092
+ DefaultGroupName = "voltha"
+ DefaultSleepOnError = 1
+ DefaultProducerFlushFrequency = 10
+ DefaultProducerFlushMessages = 10
+ DefaultProducerFlushMaxmessages = 100
+ DefaultProducerReturnSuccess = true
+ DefaultProducerReturnErrors = true
+ DefaultProducerRetryMax = 3
+ DefaultProducerRetryBackoff = time.Millisecond * 100
+ DefaultConsumerMaxwait = 100
+ DefaultMaxProcessingTime = 100
+ DefaultConsumerType = PartitionConsumer
+ DefaultNumberPartitions = 3
+ DefaultNumberReplicas = 1
+ DefaultAutoCreateTopic = false
+)
+
+// MsgClient represents the set of APIs a Kafka MsgClient must implement
+type Client interface {
+ Start() error
+ Stop()
+ CreateTopic(topic *Topic, numPartition int, repFactor int) error
+ DeleteTopic(topic *Topic) error
+ Subscribe(topic *Topic, kvArgs ...*KVArg) (<-chan *ca.InterContainerMessage, error)
+ UnSubscribe(topic *Topic, ch <-chan *ca.InterContainerMessage) error
+ Send(msg interface{}, topic *Topic, keys ...string) error
+}
diff --git a/vendor/github.com/opencord/voltha-go/kafka/kafka_inter_container_library.go b/vendor/github.com/opencord/voltha-go/kafka/kafka_inter_container_library.go
new file mode 100644
index 0000000..b9c03e6
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/kafka/kafka_inter_container_library.go
@@ -0,0 +1,824 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package kafka
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/golang/protobuf/proto"
+ "github.com/golang/protobuf/ptypes"
+ "github.com/golang/protobuf/ptypes/any"
+ "github.com/google/uuid"
+ "github.com/opencord/voltha-go/common/log"
+ ic "github.com/opencord/voltha-protos/go/inter_container"
+ "reflect"
+ "strings"
+ "sync"
+ "time"
+)
+
+// Initialize the logger - gets the default until the main function setup the logger
+func init() {
+ log.AddPackage(log.JSON, log.DebugLevel, nil)
+}
+
+const (
+ DefaultMaxRetries = 3
+ DefaultRequestTimeout = 10000 // 10000 milliseconds - to handle a wider latency range
+)
+
+const (
+ TransactionKey = "transactionID"
+ FromTopic = "fromTopic"
+)
+
+// requestHandlerChannel represents an interface associated with a channel. Whenever, an event is
+// obtained from that channel, this interface is invoked. This is used to handle
+// async requests into the Core via the kafka messaging bus
+type requestHandlerChannel struct {
+ requesthandlerInterface interface{}
+ ch <-chan *ic.InterContainerMessage
+}
+
+// transactionChannel represents a combination of a topic and a channel onto which a response received
+// on the kafka bus will be sent to
+type transactionChannel struct {
+ topic *Topic
+ ch chan *ic.InterContainerMessage
+}
+
+// InterContainerProxy represents the messaging proxy
+type InterContainerProxy struct {
+ kafkaHost string
+ kafkaPort int
+ DefaultTopic *Topic
+ defaultRequestHandlerInterface interface{}
+ deviceDiscoveryTopic *Topic
+ kafkaClient Client
+ doneCh chan int
+
+ // This map is used to map a topic to an interface and channel. When a request is received
+ // on that channel (registered to the topic) then that interface is invoked.
+ topicToRequestHandlerChannelMap map[string]*requestHandlerChannel
+ lockTopicRequestHandlerChannelMap sync.RWMutex
+
+ // This map is used to map a channel to a response topic. This channel handles all responses on that
+ // channel for that topic and forward them to the appropriate consumers channel, using the
+ // transactionIdToChannelMap.
+ topicToResponseChannelMap map[string]<-chan *ic.InterContainerMessage
+ lockTopicResponseChannelMap sync.RWMutex
+
+ // This map is used to map a transaction to a consumers channel. This is used whenever a request has been
+ // sent out and we are waiting for a response.
+ transactionIdToChannelMap map[string]*transactionChannel
+ lockTransactionIdToChannelMap sync.RWMutex
+}
+
+type InterContainerProxyOption func(*InterContainerProxy)
+
+func InterContainerHost(host string) InterContainerProxyOption {
+ return func(args *InterContainerProxy) {
+ args.kafkaHost = host
+ }
+}
+
+func InterContainerPort(port int) InterContainerProxyOption {
+ return func(args *InterContainerProxy) {
+ args.kafkaPort = port
+ }
+}
+
+func DefaultTopic(topic *Topic) InterContainerProxyOption {
+ return func(args *InterContainerProxy) {
+ args.DefaultTopic = topic
+ }
+}
+
+func DeviceDiscoveryTopic(topic *Topic) InterContainerProxyOption {
+ return func(args *InterContainerProxy) {
+ args.deviceDiscoveryTopic = topic
+ }
+}
+
+func RequestHandlerInterface(handler interface{}) InterContainerProxyOption {
+ return func(args *InterContainerProxy) {
+ args.defaultRequestHandlerInterface = handler
+ }
+}
+
+func MsgClient(client Client) InterContainerProxyOption {
+ return func(args *InterContainerProxy) {
+ args.kafkaClient = client
+ }
+}
+
+func NewInterContainerProxy(opts ...InterContainerProxyOption) (*InterContainerProxy, error) {
+ proxy := &InterContainerProxy{
+ kafkaHost: DefaultKafkaHost,
+ kafkaPort: DefaultKafkaPort,
+ }
+
+ for _, option := range opts {
+ option(proxy)
+ }
+
+ // Create the locks for all the maps
+ proxy.lockTopicRequestHandlerChannelMap = sync.RWMutex{}
+ proxy.lockTransactionIdToChannelMap = sync.RWMutex{}
+ proxy.lockTopicResponseChannelMap = sync.RWMutex{}
+
+ return proxy, nil
+}
+
+func (kp *InterContainerProxy) Start() error {
+ log.Info("Starting-Proxy")
+
+ // Kafka MsgClient should already have been created. If not, output fatal error
+ if kp.kafkaClient == nil {
+ log.Fatal("kafka-client-not-set")
+ }
+
+ // Create the Done channel
+ kp.doneCh = make(chan int, 1)
+
+ // Start the kafka client
+ if err := kp.kafkaClient.Start(); err != nil {
+ log.Errorw("Cannot-create-kafka-proxy", log.Fields{"error": err})
+ return err
+ }
+
+ // Create the topic to response channel map
+ kp.topicToResponseChannelMap = make(map[string]<-chan *ic.InterContainerMessage)
+ //
+ // Create the transactionId to Channel Map
+ kp.transactionIdToChannelMap = make(map[string]*transactionChannel)
+
+ // Create the topic to request channel map
+ kp.topicToRequestHandlerChannelMap = make(map[string]*requestHandlerChannel)
+
+ return nil
+}
+
+func (kp *InterContainerProxy) Stop() {
+ log.Info("stopping-intercontainer-proxy")
+ kp.doneCh <- 1
+ // TODO : Perform cleanup
+ kp.kafkaClient.Stop()
+ //kp.deleteAllTopicRequestHandlerChannelMap()
+ //kp.deleteAllTopicResponseChannelMap()
+ //kp.deleteAllTransactionIdToChannelMap()
+}
+
+// DeviceDiscovered publish the discovered device onto the kafka messaging bus
+func (kp *InterContainerProxy) DeviceDiscovered(deviceId string, deviceType string, parentId string, publisher string) error {
+ log.Debugw("sending-device-discovery-msg", log.Fields{"deviceId": deviceId})
+ // Simple validation
+ if deviceId == "" || deviceType == "" {
+ log.Errorw("invalid-parameters", log.Fields{"id": deviceId, "type": deviceType})
+ return errors.New("invalid-parameters")
+ }
+ // Create the device discovery message
+ header := &ic.Header{
+ Id: uuid.New().String(),
+ Type: ic.MessageType_DEVICE_DISCOVERED,
+ FromTopic: kp.DefaultTopic.Name,
+ ToTopic: kp.deviceDiscoveryTopic.Name,
+ Timestamp: time.Now().UnixNano(),
+ }
+ body := &ic.DeviceDiscovered{
+ Id: deviceId,
+ DeviceType: deviceType,
+ ParentId: parentId,
+ Publisher: publisher,
+ }
+
+ var marshalledData *any.Any
+ var err error
+ if marshalledData, err = ptypes.MarshalAny(body); err != nil {
+ log.Errorw("cannot-marshal-request", log.Fields{"error": err})
+ return err
+ }
+ msg := &ic.InterContainerMessage{
+ Header: header,
+ Body: marshalledData,
+ }
+
+ // Send the message
+ if err := kp.kafkaClient.Send(msg, kp.deviceDiscoveryTopic); err != nil {
+ log.Errorw("cannot-send-device-discovery-message", log.Fields{"error": err})
+ return err
+ }
+ return nil
+}
+
+// InvokeRPC is used to send a request to a given topic
+func (kp *InterContainerProxy) InvokeRPC(ctx context.Context, rpc string, toTopic *Topic, replyToTopic *Topic,
+ waitForResponse bool, key string, kvArgs ...*KVArg) (bool, *any.Any) {
+
+ // If a replyToTopic is provided then we use it, otherwise just use the default toTopic. The replyToTopic is
+ // typically the device ID.
+ responseTopic := replyToTopic
+ if responseTopic == nil {
+ responseTopic = kp.DefaultTopic
+ }
+
+ // Encode the request
+ protoRequest, err := encodeRequest(rpc, toTopic, responseTopic, key, kvArgs...)
+ if err != nil {
+ log.Warnw("cannot-format-request", log.Fields{"rpc": rpc, "error": err})
+ return false, nil
+ }
+
+ // Subscribe for response, if needed, before sending request
+ var ch <-chan *ic.InterContainerMessage
+ if waitForResponse {
+ var err error
+ if ch, err = kp.subscribeForResponse(*responseTopic, protoRequest.Header.Id); err != nil {
+ log.Errorw("failed-to-subscribe-for-response", log.Fields{"error": err, "toTopic": toTopic.Name})
+ }
+ }
+
+ // Send request - if the topic is formatted with a device Id then we will send the request using a
+ // specific key, hence ensuring a single partition is used to publish the request. This ensures that the
+ // subscriber on that topic will receive the request in the order it was sent. The key used is the deviceId.
+ //key := GetDeviceIdFromTopic(*toTopic)
+ log.Debugw("sending-msg", log.Fields{"rpc": rpc, "toTopic": toTopic, "replyTopic": responseTopic, "key": key, "xId": protoRequest.Header.Id})
+ go kp.kafkaClient.Send(protoRequest, toTopic, key)
+
+ if waitForResponse {
+ // Create a child context based on the parent context, if any
+ var cancel context.CancelFunc
+ childCtx := context.Background()
+ if ctx == nil {
+ ctx, cancel = context.WithTimeout(context.Background(), DefaultRequestTimeout*time.Millisecond)
+ } else {
+ childCtx, cancel = context.WithTimeout(ctx, DefaultRequestTimeout*time.Millisecond)
+ }
+ defer cancel()
+
+ // Wait for response as well as timeout or cancellation
+ // Remove the subscription for a response on return
+ defer kp.unSubscribeForResponse(protoRequest.Header.Id)
+ select {
+ case msg, ok := <-ch:
+ if !ok {
+ log.Warnw("channel-closed", log.Fields{"rpc": rpc, "replyTopic": replyToTopic.Name})
+ protoError := &ic.Error{Reason: "channel-closed"}
+ var marshalledArg *any.Any
+ if marshalledArg, err = ptypes.MarshalAny(protoError); err != nil {
+ return false, nil // Should never happen
+ }
+ return false, marshalledArg
+ }
+ log.Debugw("received-response", log.Fields{"rpc": rpc, "msgHeader": msg.Header})
+ var responseBody *ic.InterContainerResponseBody
+ var err error
+ if responseBody, err = decodeResponse(msg); err != nil {
+ log.Errorw("decode-response-error", log.Fields{"error": err})
+ }
+ return responseBody.Success, responseBody.Result
+ case <-ctx.Done():
+ log.Debugw("context-cancelled", log.Fields{"rpc": rpc, "ctx": ctx.Err()})
+ // pack the error as proto any type
+ protoError := &ic.Error{Reason: ctx.Err().Error()}
+ var marshalledArg *any.Any
+ if marshalledArg, err = ptypes.MarshalAny(protoError); err != nil {
+ return false, nil // Should never happen
+ }
+ return false, marshalledArg
+ case <-childCtx.Done():
+ log.Debugw("context-cancelled", log.Fields{"rpc": rpc, "ctx": childCtx.Err()})
+ // pack the error as proto any type
+ protoError := &ic.Error{Reason: childCtx.Err().Error()}
+ var marshalledArg *any.Any
+ if marshalledArg, err = ptypes.MarshalAny(protoError); err != nil {
+ return false, nil // Should never happen
+ }
+ return false, marshalledArg
+ case <-kp.doneCh:
+ log.Infow("received-exit-signal", log.Fields{"toTopic": toTopic.Name, "rpc": rpc})
+ return true, nil
+ }
+ }
+ return true, nil
+}
+
+// SubscribeWithRequestHandlerInterface allows a caller to assign a target object to be invoked automatically
+// when a message is received on a given topic
+func (kp *InterContainerProxy) SubscribeWithRequestHandlerInterface(topic Topic, handler interface{}) error {
+
+ // Subscribe to receive messages for that topic
+ var ch <-chan *ic.InterContainerMessage
+ var err error
+ if ch, err = kp.kafkaClient.Subscribe(&topic); err != nil {
+ //if ch, err = kp.Subscribe(topic); err != nil {
+ log.Errorw("failed-to-subscribe", log.Fields{"error": err, "topic": topic.Name})
+ }
+
+ kp.defaultRequestHandlerInterface = handler
+ kp.addToTopicRequestHandlerChannelMap(topic.Name, &requestHandlerChannel{requesthandlerInterface: handler, ch: ch})
+ // Launch a go routine to receive and process kafka messages
+ go kp.waitForMessages(ch, topic, handler)
+
+ return nil
+}
+
+// SubscribeWithDefaultRequestHandler allows a caller to add a topic to an existing target object to be invoked automatically
+// when a message is received on a given topic. So far there is only 1 target registered per microservice
+func (kp *InterContainerProxy) SubscribeWithDefaultRequestHandler(topic Topic, initialOffset int64) error {
+ // Subscribe to receive messages for that topic
+ var ch <-chan *ic.InterContainerMessage
+ var err error
+ if ch, err = kp.kafkaClient.Subscribe(&topic, &KVArg{Key: Offset, Value: initialOffset}); err != nil {
+ log.Errorw("failed-to-subscribe", log.Fields{"error": err, "topic": topic.Name})
+ return err
+ }
+ kp.addToTopicRequestHandlerChannelMap(topic.Name, &requestHandlerChannel{requesthandlerInterface: kp.defaultRequestHandlerInterface, ch: ch})
+
+ // Launch a go routine to receive and process kafka messages
+ go kp.waitForMessages(ch, topic, kp.defaultRequestHandlerInterface)
+
+ return nil
+}
+
+func (kp *InterContainerProxy) UnSubscribeFromRequestHandler(topic Topic) error {
+ return kp.deleteFromTopicRequestHandlerChannelMap(topic.Name)
+}
+
+// setupTopicResponseChannelMap sets up single consumers channel that will act as a broadcast channel for all
+// responses from that topic.
+func (kp *InterContainerProxy) setupTopicResponseChannelMap(topic string, arg <-chan *ic.InterContainerMessage) {
+ kp.lockTopicResponseChannelMap.Lock()
+ defer kp.lockTopicResponseChannelMap.Unlock()
+ if _, exist := kp.topicToResponseChannelMap[topic]; !exist {
+ kp.topicToResponseChannelMap[topic] = arg
+ }
+}
+
+func (kp *InterContainerProxy) isTopicSubscribedForResponse(topic string) bool {
+ kp.lockTopicResponseChannelMap.RLock()
+ defer kp.lockTopicResponseChannelMap.RUnlock()
+ _, exist := kp.topicToResponseChannelMap[topic]
+ return exist
+}
+
+func (kp *InterContainerProxy) deleteFromTopicResponseChannelMap(topic string) error {
+ kp.lockTopicResponseChannelMap.Lock()
+ defer kp.lockTopicResponseChannelMap.Unlock()
+ if _, exist := kp.topicToResponseChannelMap[topic]; exist {
+ // Unsubscribe to this topic first - this will close the subscribed channel
+ var err error
+ if err = kp.kafkaClient.UnSubscribe(&Topic{Name: topic}, kp.topicToResponseChannelMap[topic]); err != nil {
+ log.Errorw("unsubscribing-error", log.Fields{"topic": topic})
+ }
+ delete(kp.topicToResponseChannelMap, topic)
+ return err
+ } else {
+ return errors.New(fmt.Sprintf("%s-Topic-not-found", topic))
+ }
+}
+
+func (kp *InterContainerProxy) deleteAllTopicResponseChannelMap() error {
+ kp.lockTopicResponseChannelMap.Lock()
+ defer kp.lockTopicResponseChannelMap.Unlock()
+ var err error
+ for topic, _ := range kp.topicToResponseChannelMap {
+ // Unsubscribe to this topic first - this will close the subscribed channel
+ if err = kp.kafkaClient.UnSubscribe(&Topic{Name: topic}, kp.topicToResponseChannelMap[topic]); err != nil {
+ log.Errorw("unsubscribing-error", log.Fields{"topic": topic, "error": err})
+ }
+ delete(kp.topicToResponseChannelMap, topic)
+ }
+ return err
+}
+
+func (kp *InterContainerProxy) addToTopicRequestHandlerChannelMap(topic string, arg *requestHandlerChannel) {
+ kp.lockTopicRequestHandlerChannelMap.Lock()
+ defer kp.lockTopicRequestHandlerChannelMap.Unlock()
+ if _, exist := kp.topicToRequestHandlerChannelMap[topic]; !exist {
+ kp.topicToRequestHandlerChannelMap[topic] = arg
+ }
+}
+
+func (kp *InterContainerProxy) deleteFromTopicRequestHandlerChannelMap(topic string) error {
+ kp.lockTopicRequestHandlerChannelMap.Lock()
+ defer kp.lockTopicRequestHandlerChannelMap.Unlock()
+ if _, exist := kp.topicToRequestHandlerChannelMap[topic]; exist {
+ // Close the kafka client client first by unsubscribing to this topic
+ kp.kafkaClient.UnSubscribe(&Topic{Name: topic}, kp.topicToRequestHandlerChannelMap[topic].ch)
+ delete(kp.topicToRequestHandlerChannelMap, topic)
+ return nil
+ } else {
+ return errors.New(fmt.Sprintf("%s-Topic-not-found", topic))
+ }
+}
+
+func (kp *InterContainerProxy) deleteAllTopicRequestHandlerChannelMap() error {
+ kp.lockTopicRequestHandlerChannelMap.Lock()
+ defer kp.lockTopicRequestHandlerChannelMap.Unlock()
+ var err error
+ for topic, _ := range kp.topicToRequestHandlerChannelMap {
+ // Close the kafka client client first by unsubscribing to this topic
+ if err = kp.kafkaClient.UnSubscribe(&Topic{Name: topic}, kp.topicToRequestHandlerChannelMap[topic].ch); err != nil {
+ log.Errorw("unsubscribing-error", log.Fields{"topic": topic, "error": err})
+ }
+ delete(kp.topicToRequestHandlerChannelMap, topic)
+ }
+ return err
+}
+
+func (kp *InterContainerProxy) addToTransactionIdToChannelMap(id string, topic *Topic, arg chan *ic.InterContainerMessage) {
+ kp.lockTransactionIdToChannelMap.Lock()
+ defer kp.lockTransactionIdToChannelMap.Unlock()
+ if _, exist := kp.transactionIdToChannelMap[id]; !exist {
+ kp.transactionIdToChannelMap[id] = &transactionChannel{topic: topic, ch: arg}
+ }
+}
+
+func (kp *InterContainerProxy) deleteFromTransactionIdToChannelMap(id string) {
+ kp.lockTransactionIdToChannelMap.Lock()
+ defer kp.lockTransactionIdToChannelMap.Unlock()
+ if transChannel, exist := kp.transactionIdToChannelMap[id]; exist {
+ // Close the channel first
+ close(transChannel.ch)
+ delete(kp.transactionIdToChannelMap, id)
+ }
+}
+
+func (kp *InterContainerProxy) deleteTopicTransactionIdToChannelMap(id string) {
+ kp.lockTransactionIdToChannelMap.Lock()
+ defer kp.lockTransactionIdToChannelMap.Unlock()
+ for key, value := range kp.transactionIdToChannelMap {
+ if value.topic.Name == id {
+ close(value.ch)
+ delete(kp.transactionIdToChannelMap, key)
+ }
+ }
+}
+
+func (kp *InterContainerProxy) deleteAllTransactionIdToChannelMap() {
+ kp.lockTransactionIdToChannelMap.Lock()
+ defer kp.lockTransactionIdToChannelMap.Unlock()
+ for key, value := range kp.transactionIdToChannelMap {
+ close(value.ch)
+ delete(kp.transactionIdToChannelMap, key)
+ }
+}
+
+func (kp *InterContainerProxy) DeleteTopic(topic Topic) error {
+ // If we have any consumers on that topic we need to close them
+ if err := kp.deleteFromTopicResponseChannelMap(topic.Name); err != nil {
+ log.Errorw("delete-from-topic-responsechannelmap-failed", log.Fields{"error": err})
+ }
+ if err := kp.deleteFromTopicRequestHandlerChannelMap(topic.Name); err != nil {
+ log.Errorw("delete-from-topic-requesthandlerchannelmap-failed", log.Fields{"error": err})
+ }
+ kp.deleteTopicTransactionIdToChannelMap(topic.Name)
+
+ return kp.kafkaClient.DeleteTopic(&topic)
+}
+
+func encodeReturnedValue(returnedVal interface{}) (*any.Any, error) {
+ // Encode the response argument - needs to be a proto message
+ if returnedVal == nil {
+ return nil, nil
+ }
+ protoValue, ok := returnedVal.(proto.Message)
+ if !ok {
+ log.Warnw("response-value-not-proto-message", log.Fields{"error": ok, "returnVal": returnedVal})
+ err := errors.New("response-value-not-proto-message")
+ return nil, err
+ }
+
+ // Marshal the returned value, if any
+ var marshalledReturnedVal *any.Any
+ var err error
+ if marshalledReturnedVal, err = ptypes.MarshalAny(protoValue); err != nil {
+ log.Warnw("cannot-marshal-returned-val", log.Fields{"error": err})
+ return nil, err
+ }
+ return marshalledReturnedVal, nil
+}
+
+func encodeDefaultFailedResponse(request *ic.InterContainerMessage) *ic.InterContainerMessage {
+ responseHeader := &ic.Header{
+ Id: request.Header.Id,
+ Type: ic.MessageType_RESPONSE,
+ FromTopic: request.Header.ToTopic,
+ ToTopic: request.Header.FromTopic,
+ Timestamp: time.Now().Unix(),
+ }
+ responseBody := &ic.InterContainerResponseBody{
+ Success: false,
+ Result: nil,
+ }
+ var marshalledResponseBody *any.Any
+ var err error
+ // Error should never happen here
+ if marshalledResponseBody, err = ptypes.MarshalAny(responseBody); err != nil {
+ log.Warnw("cannot-marshal-failed-response-body", log.Fields{"error": err})
+ }
+
+ return &ic.InterContainerMessage{
+ Header: responseHeader,
+ Body: marshalledResponseBody,
+ }
+
+}
+
+//formatRequest formats a request to send over kafka and returns an InterContainerMessage message on success
+//or an error on failure
+func encodeResponse(request *ic.InterContainerMessage, success bool, returnedValues ...interface{}) (*ic.InterContainerMessage, error) {
+ //log.Debugw("encodeResponse", log.Fields{"success": success, "returnedValues": returnedValues})
+ responseHeader := &ic.Header{
+ Id: request.Header.Id,
+ Type: ic.MessageType_RESPONSE,
+ FromTopic: request.Header.ToTopic,
+ ToTopic: request.Header.FromTopic,
+ KeyTopic: request.Header.KeyTopic,
+ Timestamp: time.Now().UnixNano(),
+ }
+
+ // Go over all returned values
+ var marshalledReturnedVal *any.Any
+ var err error
+ for _, returnVal := range returnedValues {
+ if marshalledReturnedVal, err = encodeReturnedValue(returnVal); err != nil {
+ log.Warnw("cannot-marshal-response-body", log.Fields{"error": err})
+ }
+ break // for now we support only 1 returned value - (excluding the error)
+ }
+
+ responseBody := &ic.InterContainerResponseBody{
+ Success: success,
+ Result: marshalledReturnedVal,
+ }
+
+ // Marshal the response body
+ var marshalledResponseBody *any.Any
+ if marshalledResponseBody, err = ptypes.MarshalAny(responseBody); err != nil {
+ log.Warnw("cannot-marshal-response-body", log.Fields{"error": err})
+ return nil, err
+ }
+
+ return &ic.InterContainerMessage{
+ Header: responseHeader,
+ Body: marshalledResponseBody,
+ }, nil
+}
+
+func CallFuncByName(myClass interface{}, funcName string, params ...interface{}) (out []reflect.Value, err error) {
+ myClassValue := reflect.ValueOf(myClass)
+ // Capitalize the first letter in the funcName to workaround the first capital letters required to
+ // invoke a function from a different package
+ funcName = strings.Title(funcName)
+ m := myClassValue.MethodByName(funcName)
+ if !m.IsValid() {
+ return make([]reflect.Value, 0), fmt.Errorf("method-not-found \"%s\"", funcName)
+ }
+ in := make([]reflect.Value, len(params))
+ for i, param := range params {
+ in[i] = reflect.ValueOf(param)
+ }
+ out = m.Call(in)
+ return
+}
+
+func (kp *InterContainerProxy) addTransactionId(transactionId string, currentArgs []*ic.Argument) []*ic.Argument {
+ arg := &KVArg{
+ Key: TransactionKey,
+ Value: &ic.StrType{Val: transactionId},
+ }
+
+ var marshalledArg *any.Any
+ var err error
+ if marshalledArg, err = ptypes.MarshalAny(&ic.StrType{Val: transactionId}); err != nil {
+ log.Warnw("cannot-add-transactionId", log.Fields{"error": err})
+ return currentArgs
+ }
+ protoArg := &ic.Argument{
+ Key: arg.Key,
+ Value: marshalledArg,
+ }
+ return append(currentArgs, protoArg)
+}
+
+func (kp *InterContainerProxy) addFromTopic(fromTopic string, currentArgs []*ic.Argument) []*ic.Argument {
+ var marshalledArg *any.Any
+ var err error
+ if marshalledArg, err = ptypes.MarshalAny(&ic.StrType{Val: fromTopic}); err != nil {
+ log.Warnw("cannot-add-transactionId", log.Fields{"error": err})
+ return currentArgs
+ }
+ protoArg := &ic.Argument{
+ Key: FromTopic,
+ Value: marshalledArg,
+ }
+ return append(currentArgs, protoArg)
+}
+
+func (kp *InterContainerProxy) handleMessage(msg *ic.InterContainerMessage, targetInterface interface{}) {
+
+ // First extract the header to know whether this is a request - responses are handled by a different handler
+ if msg.Header.Type == ic.MessageType_REQUEST {
+ var out []reflect.Value
+ var err error
+
+ // Get the request body
+ requestBody := &ic.InterContainerRequestBody{}
+ if err = ptypes.UnmarshalAny(msg.Body, requestBody); err != nil {
+ log.Warnw("cannot-unmarshal-request", log.Fields{"error": err})
+ } else {
+ log.Debugw("received-request", log.Fields{"rpc": requestBody.Rpc, "header": msg.Header})
+ // let the callee unpack the arguments as its the only one that knows the real proto type
+ // Augment the requestBody with the message Id as it will be used in scenarios where cores
+ // are set in pairs and competing
+ requestBody.Args = kp.addTransactionId(msg.Header.Id, requestBody.Args)
+
+ // Augment the requestBody with the From topic name as it will be used in scenarios where a container
+ // needs to send an unsollicited message to the currently requested container
+ requestBody.Args = kp.addFromTopic(msg.Header.FromTopic, requestBody.Args)
+
+ out, err = CallFuncByName(targetInterface, requestBody.Rpc, requestBody.Args)
+ if err != nil {
+ log.Warn(err)
+ }
+ }
+ // Response required?
+ if requestBody.ResponseRequired {
+ // If we already have an error before then just return that
+ var returnError *ic.Error
+ var returnedValues []interface{}
+ var success bool
+ if err != nil {
+ returnError = &ic.Error{Reason: err.Error()}
+ returnedValues = make([]interface{}, 1)
+ returnedValues[0] = returnError
+ } else {
+ returnedValues = make([]interface{}, 0)
+ // Check for errors first
+ lastIndex := len(out) - 1
+ if out[lastIndex].Interface() != nil { // Error
+ if goError, ok := out[lastIndex].Interface().(error); ok {
+ returnError = &ic.Error{Reason: goError.Error()}
+ returnedValues = append(returnedValues, returnError)
+ } else { // Should never happen
+ returnError = &ic.Error{Reason: "incorrect-error-returns"}
+ returnedValues = append(returnedValues, returnError)
+ }
+ } else if len(out) == 2 && reflect.ValueOf(out[0].Interface()).IsValid() && reflect.ValueOf(out[0].Interface()).IsNil() {
+ return // Ignore case - when core is in competing mode
+ } else { // Non-error case
+ success = true
+ for idx, val := range out {
+ //log.Debugw("returned-api-response-loop", log.Fields{"idx": idx, "val": val.Interface()})
+ if idx != lastIndex {
+ returnedValues = append(returnedValues, val.Interface())
+ }
+ }
+ }
+ }
+
+ var icm *ic.InterContainerMessage
+ if icm, err = encodeResponse(msg, success, returnedValues...); err != nil {
+ log.Warnw("error-encoding-response-returning-failure-result", log.Fields{"error": err})
+ icm = encodeDefaultFailedResponse(msg)
+ }
+ // To preserve ordering of messages, all messages to a given topic are sent to the same partition
+ // by providing a message key. The key is encoded in the topic name. If the deviceId is not
+ // present then the key will be empty, hence all messages for a given topic will be sent to all
+ // partitions.
+ replyTopic := &Topic{Name: msg.Header.FromTopic}
+ key := msg.Header.KeyTopic
+ log.Debugw("sending-response-to-kafka", log.Fields{"rpc": requestBody.Rpc, "header": icm.Header, "key": key})
+ // TODO: handle error response.
+ go kp.kafkaClient.Send(icm, replyTopic, key)
+ }
+ } else if msg.Header.Type == ic.MessageType_RESPONSE {
+ log.Debugw("response-received", log.Fields{"msg-header": msg.Header})
+ go kp.dispatchResponse(msg)
+ } else {
+ log.Warnw("unsupported-message-received", log.Fields{"msg-header": msg.Header})
+ }
+}
+
+func (kp *InterContainerProxy) waitForMessages(ch <-chan *ic.InterContainerMessage, topic Topic, targetInterface interface{}) {
+ // Wait for messages
+ for msg := range ch {
+ //log.Debugw("request-received", log.Fields{"msg": msg, "topic": topic.Name, "target": targetInterface})
+ go kp.handleMessage(msg, targetInterface)
+ }
+}
+
+func (kp *InterContainerProxy) dispatchResponse(msg *ic.InterContainerMessage) {
+ kp.lockTransactionIdToChannelMap.RLock()
+ defer kp.lockTransactionIdToChannelMap.RUnlock()
+ if _, exist := kp.transactionIdToChannelMap[msg.Header.Id]; !exist {
+ log.Debugw("no-waiting-channel", log.Fields{"transaction": msg.Header.Id})
+ return
+ }
+ kp.transactionIdToChannelMap[msg.Header.Id].ch <- msg
+}
+
+// subscribeForResponse allows a caller to subscribe to a given topic when waiting for a response.
+// This method is built to prevent all subscribers to receive all messages as is the case of the Subscribe
+// API. There is one response channel waiting for kafka messages before dispatching the message to the
+// corresponding waiting channel
+func (kp *InterContainerProxy) subscribeForResponse(topic Topic, trnsId string) (chan *ic.InterContainerMessage, error) {
+ log.Debugw("subscribeForResponse", log.Fields{"topic": topic.Name, "trnsid": trnsId})
+
+ // Create a specific channel for this consumers. We cannot use the channel from the kafkaclient as it will
+ // broadcast any message for this topic to all channels waiting on it.
+ ch := make(chan *ic.InterContainerMessage)
+ kp.addToTransactionIdToChannelMap(trnsId, &topic, ch)
+
+ return ch, nil
+}
+
+func (kp *InterContainerProxy) unSubscribeForResponse(trnsId string) error {
+ log.Debugw("unsubscribe-for-response", log.Fields{"trnsId": trnsId})
+ kp.deleteFromTransactionIdToChannelMap(trnsId)
+ return nil
+}
+
+//formatRequest formats a request to send over kafka and returns an InterContainerMessage message on success
+//or an error on failure
+func encodeRequest(rpc string, toTopic *Topic, replyTopic *Topic, key string, kvArgs ...*KVArg) (*ic.InterContainerMessage, error) {
+ requestHeader := &ic.Header{
+ Id: uuid.New().String(),
+ Type: ic.MessageType_REQUEST,
+ FromTopic: replyTopic.Name,
+ ToTopic: toTopic.Name,
+ KeyTopic: key,
+ Timestamp: time.Now().UnixNano(),
+ }
+ requestBody := &ic.InterContainerRequestBody{
+ Rpc: rpc,
+ ResponseRequired: true,
+ ReplyToTopic: replyTopic.Name,
+ }
+
+ for _, arg := range kvArgs {
+ if arg == nil {
+ // In case the caller sends an array with empty args
+ continue
+ }
+ var marshalledArg *any.Any
+ var err error
+ // ascertain the value interface type is a proto.Message
+ protoValue, ok := arg.Value.(proto.Message)
+ if !ok {
+ log.Warnw("argument-value-not-proto-message", log.Fields{"error": ok, "Value": arg.Value})
+ err := errors.New("argument-value-not-proto-message")
+ return nil, err
+ }
+ if marshalledArg, err = ptypes.MarshalAny(protoValue); err != nil {
+ log.Warnw("cannot-marshal-request", log.Fields{"error": err})
+ return nil, err
+ }
+ protoArg := &ic.Argument{
+ Key: arg.Key,
+ Value: marshalledArg,
+ }
+ requestBody.Args = append(requestBody.Args, protoArg)
+ }
+
+ var marshalledData *any.Any
+ var err error
+ if marshalledData, err = ptypes.MarshalAny(requestBody); err != nil {
+ log.Warnw("cannot-marshal-request", log.Fields{"error": err})
+ return nil, err
+ }
+ request := &ic.InterContainerMessage{
+ Header: requestHeader,
+ Body: marshalledData,
+ }
+ return request, nil
+}
+
+func decodeResponse(response *ic.InterContainerMessage) (*ic.InterContainerResponseBody, error) {
+ // Extract the message body
+ responseBody := ic.InterContainerResponseBody{}
+ if err := ptypes.UnmarshalAny(response.Body, &responseBody); err != nil {
+ log.Warnw("cannot-unmarshal-response", log.Fields{"error": err})
+ return nil, err
+ }
+ //log.Debugw("response-decoded-successfully", log.Fields{"response-status": &responseBody.Success})
+
+ return &responseBody, nil
+
+}
diff --git a/vendor/github.com/opencord/voltha-go/kafka/sarama_client.go b/vendor/github.com/opencord/voltha-go/kafka/sarama_client.go
new file mode 100644
index 0000000..add1900
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/kafka/sarama_client.go
@@ -0,0 +1,944 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package kafka
+
+import (
+ "errors"
+ "fmt"
+ scc "github.com/bsm/sarama-cluster"
+ "github.com/golang/protobuf/proto"
+ "github.com/google/uuid"
+ "github.com/opencord/voltha-go/common/log"
+ ic "github.com/opencord/voltha-protos/go/inter_container"
+ "gopkg.in/Shopify/sarama.v1"
+ "strings"
+ "sync"
+ "time"
+)
+
+func init() {
+ log.AddPackage(log.JSON, log.DebugLevel, nil)
+}
+
+type returnErrorFunction func() error
+
+// consumerChannels represents one or more consumers listening on a kafka topic. Once a message is received on that
+// topic, the consumer(s) broadcasts the message to all the listening channels. The consumer can be a partition
+//consumer or a group consumer
+type consumerChannels struct {
+ consumers []interface{}
+ channels []chan *ic.InterContainerMessage
+}
+
+// SaramaClient represents the messaging proxy
+type SaramaClient struct {
+ cAdmin sarama.ClusterAdmin
+ client sarama.Client
+ KafkaHost string
+ KafkaPort int
+ producer sarama.AsyncProducer
+ consumer sarama.Consumer
+ groupConsumers map[string]*scc.Consumer
+ lockOfGroupConsumers sync.RWMutex
+ consumerGroupPrefix string
+ consumerType int
+ consumerGroupName string
+ producerFlushFrequency int
+ producerFlushMessages int
+ producerFlushMaxmessages int
+ producerRetryMax int
+ producerRetryBackOff time.Duration
+ producerReturnSuccess bool
+ producerReturnErrors bool
+ consumerMaxwait int
+ maxProcessingTime int
+ numPartitions int
+ numReplicas int
+ autoCreateTopic bool
+ doneCh chan int
+ topicToConsumerChannelMap map[string]*consumerChannels
+ lockTopicToConsumerChannelMap sync.RWMutex
+ topicLockMap map[string]*sync.RWMutex
+ lockOfTopicLockMap sync.RWMutex
+}
+
+type SaramaClientOption func(*SaramaClient)
+
+func Host(host string) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.KafkaHost = host
+ }
+}
+
+func Port(port int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.KafkaPort = port
+ }
+}
+
+func ConsumerGroupPrefix(prefix string) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.consumerGroupPrefix = prefix
+ }
+}
+
+func ConsumerGroupName(name string) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.consumerGroupName = name
+ }
+}
+
+func ConsumerType(consumer int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.consumerType = consumer
+ }
+}
+
+func ProducerFlushFrequency(frequency int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.producerFlushFrequency = frequency
+ }
+}
+
+func ProducerFlushMessages(num int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.producerFlushMessages = num
+ }
+}
+
+func ProducerFlushMaxMessages(num int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.producerFlushMaxmessages = num
+ }
+}
+
+func ProducerMaxRetries(num int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.producerRetryMax = num
+ }
+}
+
+func ProducerRetryBackoff(duration time.Duration) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.producerRetryBackOff = duration
+ }
+}
+
+func ProducerReturnOnErrors(opt bool) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.producerReturnErrors = opt
+ }
+}
+
+func ProducerReturnOnSuccess(opt bool) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.producerReturnSuccess = opt
+ }
+}
+
+func ConsumerMaxWait(wait int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.consumerMaxwait = wait
+ }
+}
+
+func MaxProcessingTime(pTime int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.maxProcessingTime = pTime
+ }
+}
+
+func NumPartitions(number int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.numPartitions = number
+ }
+}
+
+func NumReplicas(number int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.numReplicas = number
+ }
+}
+
+func AutoCreateTopic(opt bool) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.autoCreateTopic = opt
+ }
+}
+
+func NewSaramaClient(opts ...SaramaClientOption) *SaramaClient {
+ client := &SaramaClient{
+ KafkaHost: DefaultKafkaHost,
+ KafkaPort: DefaultKafkaPort,
+ }
+ client.consumerType = DefaultConsumerType
+ client.producerFlushFrequency = DefaultProducerFlushFrequency
+ client.producerFlushMessages = DefaultProducerFlushMessages
+ client.producerFlushMaxmessages = DefaultProducerFlushMaxmessages
+ client.producerReturnErrors = DefaultProducerReturnErrors
+ client.producerReturnSuccess = DefaultProducerReturnSuccess
+ client.producerRetryMax = DefaultProducerRetryMax
+ client.producerRetryBackOff = DefaultProducerRetryBackoff
+ client.consumerMaxwait = DefaultConsumerMaxwait
+ client.maxProcessingTime = DefaultMaxProcessingTime
+ client.numPartitions = DefaultNumberPartitions
+ client.numReplicas = DefaultNumberReplicas
+ client.autoCreateTopic = DefaultAutoCreateTopic
+
+ for _, option := range opts {
+ option(client)
+ }
+
+ client.groupConsumers = make(map[string]*scc.Consumer)
+
+ client.lockTopicToConsumerChannelMap = sync.RWMutex{}
+ client.topicLockMap = make(map[string]*sync.RWMutex)
+ client.lockOfTopicLockMap = sync.RWMutex{}
+ client.lockOfGroupConsumers = sync.RWMutex{}
+ return client
+}
+
+func (sc *SaramaClient) Start() error {
+ log.Info("Starting-kafka-sarama-client")
+
+ // Create the Done channel
+ sc.doneCh = make(chan int, 1)
+
+ var err error
+
+ // Create the Cluster Admin
+ if err = sc.createClusterAdmin(); err != nil {
+ log.Errorw("Cannot-create-cluster-admin", log.Fields{"error": err})
+ return err
+ }
+
+ // Create the Publisher
+ if err := sc.createPublisher(); err != nil {
+ log.Errorw("Cannot-create-kafka-publisher", log.Fields{"error": err})
+ return err
+ }
+
+ if sc.consumerType == DefaultConsumerType {
+ // Create the master consumers
+ if err := sc.createConsumer(); err != nil {
+ log.Errorw("Cannot-create-kafka-consumers", log.Fields{"error": err})
+ return err
+ }
+ }
+
+ // Create the topic to consumers/channel map
+ sc.topicToConsumerChannelMap = make(map[string]*consumerChannels)
+
+ log.Info("kafka-sarama-client-started")
+
+ return nil
+}
+
+func (sc *SaramaClient) Stop() {
+ log.Info("stopping-sarama-client")
+
+ //Send a message over the done channel to close all long running routines
+ sc.doneCh <- 1
+
+ if sc.producer != nil {
+ if err := sc.producer.Close(); err != nil {
+ log.Errorw("closing-producer-failed", log.Fields{"error": err})
+ }
+ }
+
+ if sc.consumer != nil {
+ if err := sc.consumer.Close(); err != nil {
+ log.Errorw("closing-partition-consumer-failed", log.Fields{"error": err})
+ }
+ }
+
+ for key, val := range sc.groupConsumers {
+ log.Debugw("closing-group-consumer", log.Fields{"topic": key})
+ if err := val.Close(); err != nil {
+ log.Errorw("closing-group-consumer-failed", log.Fields{"error": err, "topic": key})
+ }
+ }
+
+ if sc.cAdmin != nil {
+ if err := sc.cAdmin.Close(); err != nil {
+ log.Errorw("closing-cluster-admin-failed", log.Fields{"error": err})
+ }
+ }
+
+ //TODO: Clear the consumers map
+ //sc.clearConsumerChannelMap()
+
+ log.Info("sarama-client-stopped")
+}
+
+//createTopic is an internal function to create a topic on the Kafka Broker. No locking is required as
+// the invoking function must hold the lock
+func (sc *SaramaClient) createTopic(topic *Topic, numPartition int, repFactor int) error {
+ // Set the topic details
+ topicDetail := &sarama.TopicDetail{}
+ topicDetail.NumPartitions = int32(numPartition)
+ topicDetail.ReplicationFactor = int16(repFactor)
+ topicDetail.ConfigEntries = make(map[string]*string)
+ topicDetails := make(map[string]*sarama.TopicDetail)
+ topicDetails[topic.Name] = topicDetail
+
+ if err := sc.cAdmin.CreateTopic(topic.Name, topicDetail, false); err != nil {
+ if err == sarama.ErrTopicAlreadyExists {
+ // Not an error
+ log.Debugw("topic-already-exist", log.Fields{"topic": topic.Name})
+ return nil
+ }
+ log.Errorw("create-topic-failure", log.Fields{"error": err})
+ return err
+ }
+ // TODO: Wait until the topic has been created. No API is available in the Sarama clusterAdmin to
+ // do so.
+ log.Debugw("topic-created", log.Fields{"topic": topic, "numPartition": numPartition, "replicationFactor": repFactor})
+ return nil
+}
+
+//CreateTopic is a public API to create a topic on the Kafka Broker. It uses a lock on a specific topic to
+// ensure no two go routines are performing operations on the same topic
+func (sc *SaramaClient) CreateTopic(topic *Topic, numPartition int, repFactor int) error {
+ sc.lockTopic(topic)
+ defer sc.unLockTopic(topic)
+
+ return sc.createTopic(topic, numPartition, repFactor)
+}
+
+//DeleteTopic removes a topic from the kafka Broker
+func (sc *SaramaClient) DeleteTopic(topic *Topic) error {
+ sc.lockTopic(topic)
+ defer sc.unLockTopic(topic)
+
+ // Remove the topic from the broker
+ if err := sc.cAdmin.DeleteTopic(topic.Name); err != nil {
+ if err == sarama.ErrUnknownTopicOrPartition {
+ // Not an error as does not exist
+ log.Debugw("topic-not-exist", log.Fields{"topic": topic.Name})
+ return nil
+ }
+ log.Errorw("delete-topic-failed", log.Fields{"topic": topic, "error": err})
+ return err
+ }
+
+ // Clear the topic from the consumer channel. This will also close any consumers listening on that topic.
+ if err := sc.clearTopicFromConsumerChannelMap(*topic); err != nil {
+ log.Errorw("failure-clearing-channels", log.Fields{"topic": topic, "error": err})
+ return err
+ }
+ return nil
+}
+
+// Subscribe registers a caller to a topic. It returns a channel that the caller can use to receive
+// messages from that topic
+func (sc *SaramaClient) Subscribe(topic *Topic, kvArgs ...*KVArg) (<-chan *ic.InterContainerMessage, error) {
+ sc.lockTopic(topic)
+ defer sc.unLockTopic(topic)
+
+ log.Debugw("subscribe", log.Fields{"topic": topic.Name})
+
+ // If a consumers already exist for that topic then resuse it
+ if consumerCh := sc.getConsumerChannel(topic); consumerCh != nil {
+ log.Debugw("topic-already-subscribed", log.Fields{"topic": topic.Name})
+ // Create a channel specific for that consumers and add it to the consumers channel map
+ ch := make(chan *ic.InterContainerMessage)
+ sc.addChannelToConsumerChannelMap(topic, ch)
+ return ch, nil
+ }
+
+ // Register for the topic and set it up
+ var consumerListeningChannel chan *ic.InterContainerMessage
+ var err error
+
+ // Use the consumerType option to figure out the type of consumer to launch
+ if sc.consumerType == PartitionConsumer {
+ if sc.autoCreateTopic {
+ if err = sc.createTopic(topic, sc.numPartitions, sc.numReplicas); err != nil {
+ log.Errorw("create-topic-failure", log.Fields{"error": err, "topic": topic.Name})
+ return nil, err
+ }
+ }
+ if consumerListeningChannel, err = sc.setupPartitionConsumerChannel(topic, getOffset(kvArgs...)); err != nil {
+ log.Warnw("create-consumers-channel-failure", log.Fields{"error": err, "topic": topic.Name})
+ return nil, err
+ }
+ } else if sc.consumerType == GroupCustomer {
+ // TODO: create topic if auto create is on. There is an issue with the sarama cluster library that
+ // does not consume from a precreated topic in some scenarios
+ //if sc.autoCreateTopic {
+ // if err = sc.createTopic(topic, sc.numPartitions, sc.numReplicas); err != nil {
+ // log.Errorw("create-topic-failure", log.Fields{"error": err, "topic": topic.Name})
+ // return nil, err
+ // }
+ //}
+ //groupId := sc.consumerGroupName
+ groupId := getGroupId(kvArgs...)
+ // Include the group prefix
+ if groupId != "" {
+ groupId = sc.consumerGroupPrefix + groupId
+ } else {
+ // Need to use a unique group Id per topic
+ groupId = sc.consumerGroupPrefix + topic.Name
+ }
+ if consumerListeningChannel, err = sc.setupGroupConsumerChannel(topic, groupId, getOffset(kvArgs...)); err != nil {
+ log.Warnw("create-consumers-channel-failure", log.Fields{"error": err, "topic": topic.Name, "groupId": groupId})
+ return nil, err
+ }
+
+ } else {
+ log.Warnw("unknown-consumer-type", log.Fields{"consumer-type": sc.consumerType})
+ return nil, errors.New("unknown-consumer-type")
+ }
+
+ return consumerListeningChannel, nil
+}
+
+//UnSubscribe unsubscribe a consumer from a given topic
+func (sc *SaramaClient) UnSubscribe(topic *Topic, ch <-chan *ic.InterContainerMessage) error {
+ sc.lockTopic(topic)
+ defer sc.unLockTopic(topic)
+
+ log.Debugw("unsubscribing-channel-from-topic", log.Fields{"topic": topic.Name})
+ var err error
+ if err = sc.removeChannelFromConsumerChannelMap(*topic, ch); err != nil {
+ log.Errorw("failed-removing-channel", log.Fields{"error": err})
+ }
+ if err = sc.deleteFromGroupConsumers(topic.Name); err != nil {
+ log.Errorw("failed-deleting-group-consumer", log.Fields{"error": err})
+ }
+ return err
+}
+
+// send formats and sends the request onto the kafka messaging bus.
+func (sc *SaramaClient) Send(msg interface{}, topic *Topic, keys ...string) error {
+
+ // Assert message is a proto message
+ var protoMsg proto.Message
+ var ok bool
+ // ascertain the value interface type is a proto.Message
+ if protoMsg, ok = msg.(proto.Message); !ok {
+ log.Warnw("message-not-proto-message", log.Fields{"msg": msg})
+ return errors.New(fmt.Sprintf("not-a-proto-msg-%s", msg))
+ }
+
+ var marshalled []byte
+ var err error
+ // Create the Sarama producer message
+ if marshalled, err = proto.Marshal(protoMsg); err != nil {
+ log.Errorw("marshalling-failed", log.Fields{"msg": protoMsg, "error": err})
+ return err
+ }
+ key := ""
+ if len(keys) > 0 {
+ key = keys[0] // Only the first key is relevant
+ }
+ kafkaMsg := &sarama.ProducerMessage{
+ Topic: topic.Name,
+ Key: sarama.StringEncoder(key),
+ Value: sarama.ByteEncoder(marshalled),
+ }
+
+ // Send message to kafka
+ sc.producer.Input() <- kafkaMsg
+
+ // Wait for result
+ // TODO: Use a lock or a different mechanism to ensure the response received corresponds to the message sent.
+ select {
+ case ok := <-sc.producer.Successes():
+ log.Debugw("message-sent", log.Fields{"status": ok.Topic})
+ case notOk := <-sc.producer.Errors():
+ log.Debugw("error-sending", log.Fields{"status": notOk})
+ return notOk
+ }
+ return nil
+}
+
+// getGroupId returns the group id from the key-value args.
+func getGroupId(kvArgs ...*KVArg) string {
+ for _, arg := range kvArgs {
+ if arg.Key == GroupIdKey {
+ return arg.Value.(string)
+ }
+ }
+ return ""
+}
+
+// getOffset returns the offset from the key-value args.
+func getOffset(kvArgs ...*KVArg) int64 {
+ for _, arg := range kvArgs {
+ if arg.Key == Offset {
+ return arg.Value.(int64)
+ }
+ }
+ return sarama.OffsetNewest
+}
+
+func (sc *SaramaClient) createClusterAdmin() error {
+ kafkaFullAddr := fmt.Sprintf("%s:%d", sc.KafkaHost, sc.KafkaPort)
+ config := sarama.NewConfig()
+ config.Version = sarama.V1_0_0_0
+
+ // Create a cluster Admin
+ var cAdmin sarama.ClusterAdmin
+ var err error
+ if cAdmin, err = sarama.NewClusterAdmin([]string{kafkaFullAddr}, config); err != nil {
+ log.Errorw("cluster-admin-failure", log.Fields{"error": err, "broker-address": kafkaFullAddr})
+ return err
+ }
+ sc.cAdmin = cAdmin
+ return nil
+}
+
+func (sc *SaramaClient) lockTopic(topic *Topic) {
+ sc.lockOfTopicLockMap.Lock()
+ if _, exist := sc.topicLockMap[topic.Name]; exist {
+ sc.lockOfTopicLockMap.Unlock()
+ sc.topicLockMap[topic.Name].Lock()
+ } else {
+ sc.topicLockMap[topic.Name] = &sync.RWMutex{}
+ sc.lockOfTopicLockMap.Unlock()
+ sc.topicLockMap[topic.Name].Lock()
+ }
+}
+
+func (sc *SaramaClient) unLockTopic(topic *Topic) {
+ sc.lockOfTopicLockMap.Lock()
+ defer sc.lockOfTopicLockMap.Unlock()
+ if _, exist := sc.topicLockMap[topic.Name]; exist {
+ sc.topicLockMap[topic.Name].Unlock()
+ }
+}
+
+func (sc *SaramaClient) addTopicToConsumerChannelMap(id string, arg *consumerChannels) {
+ sc.lockTopicToConsumerChannelMap.Lock()
+ defer sc.lockTopicToConsumerChannelMap.Unlock()
+ if _, exist := sc.topicToConsumerChannelMap[id]; !exist {
+ sc.topicToConsumerChannelMap[id] = arg
+ }
+}
+
+func (sc *SaramaClient) deleteFromTopicToConsumerChannelMap(id string) {
+ sc.lockTopicToConsumerChannelMap.Lock()
+ defer sc.lockTopicToConsumerChannelMap.Unlock()
+ if _, exist := sc.topicToConsumerChannelMap[id]; exist {
+ delete(sc.topicToConsumerChannelMap, id)
+ }
+}
+
+func (sc *SaramaClient) getConsumerChannel(topic *Topic) *consumerChannels {
+ sc.lockTopicToConsumerChannelMap.RLock()
+ defer sc.lockTopicToConsumerChannelMap.RUnlock()
+
+ if consumerCh, exist := sc.topicToConsumerChannelMap[topic.Name]; exist {
+ return consumerCh
+ }
+ return nil
+}
+
+func (sc *SaramaClient) addChannelToConsumerChannelMap(topic *Topic, ch chan *ic.InterContainerMessage) {
+ sc.lockTopicToConsumerChannelMap.Lock()
+ defer sc.lockTopicToConsumerChannelMap.Unlock()
+ if consumerCh, exist := sc.topicToConsumerChannelMap[topic.Name]; exist {
+ consumerCh.channels = append(consumerCh.channels, ch)
+ return
+ }
+ log.Warnw("consumers-channel-not-exist", log.Fields{"topic": topic.Name})
+}
+
+//closeConsumers closes a list of sarama consumers. The consumers can either be a partition consumers or a group consumers
+func closeConsumers(consumers []interface{}) error {
+ var err error
+ for _, consumer := range consumers {
+ // Is it a partition consumers?
+ if partionConsumer, ok := consumer.(sarama.PartitionConsumer); ok {
+ if errTemp := partionConsumer.Close(); errTemp != nil {
+ log.Debugw("partition!!!", log.Fields{"err": errTemp})
+ if strings.Compare(errTemp.Error(), sarama.ErrUnknownTopicOrPartition.Error()) == 0 {
+ // This can occur on race condition
+ err = nil
+ } else {
+ err = errTemp
+ }
+ }
+ } else if groupConsumer, ok := consumer.(*scc.Consumer); ok {
+ if errTemp := groupConsumer.Close(); errTemp != nil {
+ if strings.Compare(errTemp.Error(), sarama.ErrUnknownTopicOrPartition.Error()) == 0 {
+ // This can occur on race condition
+ err = nil
+ } else {
+ err = errTemp
+ }
+ }
+ }
+ }
+ return err
+}
+
+func (sc *SaramaClient) removeChannelFromConsumerChannelMap(topic Topic, ch <-chan *ic.InterContainerMessage) error {
+ sc.lockTopicToConsumerChannelMap.Lock()
+ defer sc.lockTopicToConsumerChannelMap.Unlock()
+ if consumerCh, exist := sc.topicToConsumerChannelMap[topic.Name]; exist {
+ // Channel will be closed in the removeChannel method
+ consumerCh.channels = removeChannel(consumerCh.channels, ch)
+ // If there are no more channels then we can close the consumers itself
+ if len(consumerCh.channels) == 0 {
+ log.Debugw("closing-consumers", log.Fields{"topic": topic})
+ err := closeConsumers(consumerCh.consumers)
+ //err := consumerCh.consumers.Close()
+ delete(sc.topicToConsumerChannelMap, topic.Name)
+ return err
+ }
+ return nil
+ }
+ log.Warnw("topic-does-not-exist", log.Fields{"topic": topic.Name})
+ return errors.New("topic-does-not-exist")
+}
+
+func (sc *SaramaClient) clearTopicFromConsumerChannelMap(topic Topic) error {
+ sc.lockTopicToConsumerChannelMap.Lock()
+ defer sc.lockTopicToConsumerChannelMap.Unlock()
+ if consumerCh, exist := sc.topicToConsumerChannelMap[topic.Name]; exist {
+ for _, ch := range consumerCh.channels {
+ // Channel will be closed in the removeChannel method
+ removeChannel(consumerCh.channels, ch)
+ }
+ err := closeConsumers(consumerCh.consumers)
+ //if err == sarama.ErrUnknownTopicOrPartition {
+ // // Not an error
+ // err = nil
+ //}
+ //err := consumerCh.consumers.Close()
+ delete(sc.topicToConsumerChannelMap, topic.Name)
+ return err
+ }
+ log.Debugw("topic-does-not-exist", log.Fields{"topic": topic.Name})
+ return nil
+}
+
+func (sc *SaramaClient) clearConsumerChannelMap() error {
+ sc.lockTopicToConsumerChannelMap.Lock()
+ defer sc.lockTopicToConsumerChannelMap.Unlock()
+ var err error
+ for topic, consumerCh := range sc.topicToConsumerChannelMap {
+ for _, ch := range consumerCh.channels {
+ // Channel will be closed in the removeChannel method
+ removeChannel(consumerCh.channels, ch)
+ }
+ if errTemp := closeConsumers(consumerCh.consumers); errTemp != nil {
+ err = errTemp
+ }
+ //err = consumerCh.consumers.Close()
+ delete(sc.topicToConsumerChannelMap, topic)
+ }
+ return err
+}
+
+//createPublisher creates the publisher which is used to send a message onto kafka
+func (sc *SaramaClient) createPublisher() error {
+ // This Creates the publisher
+ config := sarama.NewConfig()
+ config.Producer.Partitioner = sarama.NewRandomPartitioner
+ config.Producer.Flush.Frequency = time.Duration(sc.producerFlushFrequency)
+ config.Producer.Flush.Messages = sc.producerFlushMessages
+ config.Producer.Flush.MaxMessages = sc.producerFlushMaxmessages
+ config.Producer.Return.Errors = sc.producerReturnErrors
+ config.Producer.Return.Successes = sc.producerReturnSuccess
+ //config.Producer.RequiredAcks = sarama.WaitForAll
+ config.Producer.RequiredAcks = sarama.WaitForLocal
+
+ kafkaFullAddr := fmt.Sprintf("%s:%d", sc.KafkaHost, sc.KafkaPort)
+ brokers := []string{kafkaFullAddr}
+
+ if producer, err := sarama.NewAsyncProducer(brokers, config); err != nil {
+ log.Errorw("error-starting-publisher", log.Fields{"error": err})
+ return err
+ } else {
+ sc.producer = producer
+ }
+ log.Info("Kafka-publisher-created")
+ return nil
+}
+
+func (sc *SaramaClient) createConsumer() error {
+ config := sarama.NewConfig()
+ config.Consumer.Return.Errors = true
+ config.Consumer.Fetch.Min = 1
+ config.Consumer.MaxWaitTime = time.Duration(sc.consumerMaxwait) * time.Millisecond
+ config.Consumer.MaxProcessingTime = time.Duration(sc.maxProcessingTime) * time.Millisecond
+ config.Consumer.Offsets.Initial = sarama.OffsetNewest
+ kafkaFullAddr := fmt.Sprintf("%s:%d", sc.KafkaHost, sc.KafkaPort)
+ brokers := []string{kafkaFullAddr}
+
+ if consumer, err := sarama.NewConsumer(brokers, config); err != nil {
+ log.Errorw("error-starting-consumers", log.Fields{"error": err})
+ return err
+ } else {
+ sc.consumer = consumer
+ }
+ log.Info("Kafka-consumers-created")
+ return nil
+}
+
+// createGroupConsumer creates a consumers group
+func (sc *SaramaClient) createGroupConsumer(topic *Topic, groupId string, initialOffset int64, retries int) (*scc.Consumer, error) {
+ config := scc.NewConfig()
+ config.ClientID = uuid.New().String()
+ config.Group.Mode = scc.ConsumerModeMultiplex
+ //config.Consumer.Return.Errors = true
+ //config.Group.Return.Notifications = false
+ //config.Consumer.MaxWaitTime = time.Duration(DefaultConsumerMaxwait) * time.Millisecond
+ //config.Consumer.MaxProcessingTime = time.Duration(DefaultMaxProcessingTime) * time.Millisecond
+ config.Consumer.Offsets.Initial = initialOffset
+ //config.Consumer.Offsets.Initial = sarama.OffsetOldest
+ kafkaFullAddr := fmt.Sprintf("%s:%d", sc.KafkaHost, sc.KafkaPort)
+ brokers := []string{kafkaFullAddr}
+
+ topics := []string{topic.Name}
+ var consumer *scc.Consumer
+ var err error
+
+ if consumer, err = scc.NewConsumer(brokers, groupId, topics, config); err != nil {
+ log.Errorw("create-group-consumers-failure", log.Fields{"error": err, "topic": topic.Name, "groupId": groupId})
+ return nil, err
+ }
+ log.Debugw("create-group-consumers-success", log.Fields{"topic": topic.Name, "groupId": groupId})
+
+ //sc.groupConsumers[topic.Name] = consumer
+ sc.addToGroupConsumers(topic.Name, consumer)
+ return consumer, nil
+}
+
+// dispatchToConsumers sends the intercontainermessage received on a given topic to all subscribers for that
+// topic via the unique channel each subscriber received during subscription
+func (sc *SaramaClient) dispatchToConsumers(consumerCh *consumerChannels, protoMessage *ic.InterContainerMessage) {
+ // Need to go over all channels and publish messages to them - do we need to copy msg?
+ sc.lockTopicToConsumerChannelMap.RLock()
+ defer sc.lockTopicToConsumerChannelMap.RUnlock()
+ for _, ch := range consumerCh.channels {
+ go func(c chan *ic.InterContainerMessage) {
+ c <- protoMessage
+ }(ch)
+ }
+}
+
+func (sc *SaramaClient) consumeFromAPartition(topic *Topic, consumer sarama.PartitionConsumer, consumerChnls *consumerChannels) {
+ log.Debugw("starting-partition-consumption-loop", log.Fields{"topic": topic.Name})
+startloop:
+ for {
+ select {
+ case err, ok := <-consumer.Errors():
+ if ok {
+ log.Warnw("partition-consumers-error", log.Fields{"error": err})
+ } else {
+ // Channel is closed
+ break startloop
+ }
+ case msg, ok := <-consumer.Messages():
+ //log.Debugw("message-received", log.Fields{"msg": msg, "receivedTopic": msg.Topic})
+ if !ok {
+ // channel is closed
+ break startloop
+ }
+ msgBody := msg.Value
+ icm := &ic.InterContainerMessage{}
+ if err := proto.Unmarshal(msgBody, icm); err != nil {
+ log.Warnw("partition-invalid-message", log.Fields{"error": err})
+ continue
+ }
+ go sc.dispatchToConsumers(consumerChnls, icm)
+ case <-sc.doneCh:
+ log.Infow("partition-received-exit-signal", log.Fields{"topic": topic.Name})
+ break startloop
+ }
+ }
+ log.Infow("partition-consumer-stopped", log.Fields{"topic": topic.Name})
+}
+
+func (sc *SaramaClient) consumeGroupMessages(topic *Topic, consumer *scc.Consumer, consumerChnls *consumerChannels) {
+ log.Debugw("starting-group-consumption-loop", log.Fields{"topic": topic.Name})
+
+startloop:
+ for {
+ select {
+ case err, ok := <-consumer.Errors():
+ if ok {
+ log.Warnw("group-consumers-error", log.Fields{"topic": topic.Name, "error": err})
+ } else {
+ // channel is closed
+ break startloop
+ }
+ case msg, ok := <-consumer.Messages():
+ if !ok {
+ // Channel closed
+ break startloop
+ }
+ log.Debugw("message-received", log.Fields{"timestamp": msg.Timestamp, "receivedTopic": msg.Topic})
+ msgBody := msg.Value
+ icm := &ic.InterContainerMessage{}
+ if err := proto.Unmarshal(msgBody, icm); err != nil {
+ log.Warnw("invalid-message", log.Fields{"error": err})
+ continue
+ }
+ go sc.dispatchToConsumers(consumerChnls, icm)
+ consumer.MarkOffset(msg, "")
+ case ntf := <-consumer.Notifications():
+ log.Debugw("group-received-notification", log.Fields{"notification": ntf})
+ case <-sc.doneCh:
+ log.Infow("group-received-exit-signal", log.Fields{"topic": topic.Name})
+ break startloop
+ }
+ }
+ log.Infow("group-consumer-stopped", log.Fields{"topic": topic.Name})
+}
+
+func (sc *SaramaClient) startConsumers(topic *Topic) error {
+ log.Debugw("starting-consumers", log.Fields{"topic": topic.Name})
+ var consumerCh *consumerChannels
+ if consumerCh = sc.getConsumerChannel(topic); consumerCh == nil {
+ log.Errorw("consumers-not-exist", log.Fields{"topic": topic.Name})
+ return errors.New("consumers-not-exist")
+ }
+ // For each consumer listening for that topic, start a consumption loop
+ for _, consumer := range consumerCh.consumers {
+ if pConsumer, ok := consumer.(sarama.PartitionConsumer); ok {
+ go sc.consumeFromAPartition(topic, pConsumer, consumerCh)
+ } else if gConsumer, ok := consumer.(*scc.Consumer); ok {
+ go sc.consumeGroupMessages(topic, gConsumer, consumerCh)
+ } else {
+ log.Errorw("invalid-consumer", log.Fields{"topic": topic})
+ return errors.New("invalid-consumer")
+ }
+ }
+ return nil
+}
+
+//// setupConsumerChannel creates a consumerChannels object for that topic and add it to the consumerChannels map
+//// for that topic. It also starts the routine that listens for messages on that topic.
+func (sc *SaramaClient) setupPartitionConsumerChannel(topic *Topic, initialOffset int64) (chan *ic.InterContainerMessage, error) {
+ var pConsumers []sarama.PartitionConsumer
+ var err error
+
+ if pConsumers, err = sc.createPartitionConsumers(topic, initialOffset); err != nil {
+ log.Errorw("creating-partition-consumers-failure", log.Fields{"error": err, "topic": topic.Name})
+ return nil, err
+ }
+
+ consumersIf := make([]interface{}, 0)
+ for _, pConsumer := range pConsumers {
+ consumersIf = append(consumersIf, pConsumer)
+ }
+
+ // Create the consumers/channel structure and set the consumers and create a channel on that topic - for now
+ // unbuffered to verify race conditions.
+ consumerListeningChannel := make(chan *ic.InterContainerMessage)
+ cc := &consumerChannels{
+ consumers: consumersIf,
+ channels: []chan *ic.InterContainerMessage{consumerListeningChannel},
+ }
+
+ // Add the consumers channel to the map
+ sc.addTopicToConsumerChannelMap(topic.Name, cc)
+
+ //Start a consumers to listen on that specific topic
+ go sc.startConsumers(topic)
+
+ return consumerListeningChannel, nil
+}
+
+// setupConsumerChannel creates a consumerChannels object for that topic and add it to the consumerChannels map
+// for that topic. It also starts the routine that listens for messages on that topic.
+func (sc *SaramaClient) setupGroupConsumerChannel(topic *Topic, groupId string, initialOffset int64) (chan *ic.InterContainerMessage, error) {
+ // TODO: Replace this development partition consumers with a group consumers
+ var pConsumer *scc.Consumer
+ var err error
+ if pConsumer, err = sc.createGroupConsumer(topic, groupId, initialOffset, DefaultMaxRetries); err != nil {
+ log.Errorw("creating-partition-consumers-failure", log.Fields{"error": err, "topic": topic.Name})
+ return nil, err
+ }
+ // Create the consumers/channel structure and set the consumers and create a channel on that topic - for now
+ // unbuffered to verify race conditions.
+ consumerListeningChannel := make(chan *ic.InterContainerMessage)
+ cc := &consumerChannels{
+ consumers: []interface{}{pConsumer},
+ channels: []chan *ic.InterContainerMessage{consumerListeningChannel},
+ }
+
+ // Add the consumers channel to the map
+ sc.addTopicToConsumerChannelMap(topic.Name, cc)
+
+ //Start a consumers to listen on that specific topic
+ go sc.startConsumers(topic)
+
+ return consumerListeningChannel, nil
+}
+
+func (sc *SaramaClient) createPartitionConsumers(topic *Topic, initialOffset int64) ([]sarama.PartitionConsumer, error) {
+ log.Debugw("creating-partition-consumers", log.Fields{"topic": topic.Name})
+ partitionList, err := sc.consumer.Partitions(topic.Name)
+ if err != nil {
+ log.Warnw("get-partition-failure", log.Fields{"error": err, "topic": topic.Name})
+ return nil, err
+ }
+
+ pConsumers := make([]sarama.PartitionConsumer, 0)
+ for _, partition := range partitionList {
+ var pConsumer sarama.PartitionConsumer
+ if pConsumer, err = sc.consumer.ConsumePartition(topic.Name, partition, initialOffset); err != nil {
+ log.Warnw("consumers-partition-failure", log.Fields{"error": err, "topic": topic.Name})
+ return nil, err
+ }
+ pConsumers = append(pConsumers, pConsumer)
+ }
+ return pConsumers, nil
+}
+
+func removeChannel(channels []chan *ic.InterContainerMessage, ch <-chan *ic.InterContainerMessage) []chan *ic.InterContainerMessage {
+ var i int
+ var channel chan *ic.InterContainerMessage
+ for i, channel = range channels {
+ if channel == ch {
+ channels[len(channels)-1], channels[i] = channels[i], channels[len(channels)-1]
+ close(channel)
+ log.Debug("channel-closed")
+ return channels[:len(channels)-1]
+ }
+ }
+ return channels
+}
+
+
+func (sc *SaramaClient) addToGroupConsumers(topic string, consumer *scc.Consumer) {
+ sc.lockOfGroupConsumers.Lock()
+ defer sc.lockOfGroupConsumers.Unlock()
+ if _, exist := sc.groupConsumers[topic]; !exist {
+ sc.groupConsumers[topic] = consumer
+ }
+}
+
+func (sc *SaramaClient) deleteFromGroupConsumers(topic string) error {
+ sc.lockOfGroupConsumers.Lock()
+ defer sc.lockOfGroupConsumers.Unlock()
+ if _, exist := sc.groupConsumers[topic]; exist {
+ consumer := sc.groupConsumers[topic]
+ delete(sc.groupConsumers, topic)
+ if err := consumer.Close(); err!= nil {
+ log.Errorw("failure-closing-consumer", log.Fields{"error": err})
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/opencord/voltha-go/kafka/utils.go b/vendor/github.com/opencord/voltha-go/kafka/utils.go
new file mode 100644
index 0000000..0cb9535
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/kafka/utils.go
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * 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.
+ */
+package kafka
+
+import "strings"
+
+const (
+ TopicSeparator = "_"
+ DeviceIdLength = 24
+)
+
+// A Topic definition - may be augmented with additional attributes eventually
+type Topic struct {
+ // The name of the topic. It must start with a letter,
+ // and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
+ // underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
+ // signs (`%`).
+ Name string
+}
+
+type KVArg struct {
+ Key string
+ Value interface{}
+}
+
+// TODO: Remove and provide better may to get the device id
+// GetDeviceIdFromTopic extract the deviceId from the topic name. The topic name is formatted either as:
+// <any string> or <any string>_<deviceId>. The device Id is 24 characters long.
+func GetDeviceIdFromTopic(topic Topic) string {
+ pos := strings.LastIndex(topic.Name, TopicSeparator)
+ if pos == -1 {
+ return ""
+ }
+ adjustedPos := pos + len(TopicSeparator)
+ if adjustedPos >= len(topic.Name) {
+ return ""
+ }
+ deviceId := topic.Name[adjustedPos:len(topic.Name)]
+ if len(deviceId) != DeviceIdLength {
+ return ""
+ }
+ return deviceId
+}
diff --git a/vendor/github.com/opencord/voltha-go/python/adapters/common/frameio/third_party/oftest/LICENSE b/vendor/github.com/opencord/voltha-go/python/adapters/common/frameio/third_party/oftest/LICENSE
new file mode 100644
index 0000000..3216042
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/python/adapters/common/frameio/third_party/oftest/LICENSE
@@ -0,0 +1,36 @@
+OpenFlow Test Framework
+
+Copyright (c) 2010 The Board of Trustees of The Leland Stanford
+Junior University
+
+Except where otherwise noted, this software is distributed under
+the OpenFlow Software License. See
+http://www.openflowswitch.org/wp/legal/ for current details.
+
+We are making the OpenFlow specification and associated documentation
+(Software) available for public use and benefit with the expectation
+that others will use, modify and enhance the Software and contribute
+those enhancements back to the community. However, since we would like
+to make the Software available for broadest use, with as few
+restrictions as possible permission is hereby granted, free of charge,
+to any person obtaining a copy of this Software to deal in the
+Software under the copyrights without restriction, including without
+limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED -Y´AS IS¡, WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+The name and trademarks of copyright holder(s) may NOT be used in
+advertising or publicity pertaining to the Software or any derivatives
+without specific, written prior permission.
diff --git a/vendor/github.com/opencord/voltha-go/python/protos/third_party/google/LICENSE b/vendor/github.com/opencord/voltha-go/python/protos/third_party/google/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-go/python/protos/third_party/google/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
diff --git a/vendor/github.com/opencord/voltha-protos/go/common/common.pb.go b/vendor/github.com/opencord/voltha-protos/go/common/common.pb.go
new file mode 100644
index 0000000..ce8acf9
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-protos/go/common/common.pb.go
@@ -0,0 +1,541 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/common.proto
+
+package common
+
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type TestModeKeys int32
+
+const (
+ TestModeKeys_api_test TestModeKeys = 0
+)
+
+var TestModeKeys_name = map[int32]string{
+ 0: "api_test",
+}
+
+var TestModeKeys_value = map[string]int32{
+ "api_test": 0,
+}
+
+func (x TestModeKeys) String() string {
+ return proto.EnumName(TestModeKeys_name, int32(x))
+}
+
+func (TestModeKeys) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{0}
+}
+
+// Logging verbosity level
+type LogLevel_LogLevel int32
+
+const (
+ LogLevel_DEBUG LogLevel_LogLevel = 0
+ LogLevel_INFO LogLevel_LogLevel = 1
+ LogLevel_WARNING LogLevel_LogLevel = 2
+ LogLevel_ERROR LogLevel_LogLevel = 3
+ LogLevel_CRITICAL LogLevel_LogLevel = 4
+ LogLevel_FATAL LogLevel_LogLevel = 5
+)
+
+var LogLevel_LogLevel_name = map[int32]string{
+ 0: "DEBUG",
+ 1: "INFO",
+ 2: "WARNING",
+ 3: "ERROR",
+ 4: "CRITICAL",
+ 5: "FATAL",
+}
+
+var LogLevel_LogLevel_value = map[string]int32{
+ "DEBUG": 0,
+ "INFO": 1,
+ "WARNING": 2,
+ "ERROR": 3,
+ "CRITICAL": 4,
+ "FATAL": 5,
+}
+
+func (x LogLevel_LogLevel) String() string {
+ return proto.EnumName(LogLevel_LogLevel_name, int32(x))
+}
+
+func (LogLevel_LogLevel) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{2, 0}
+}
+
+// Administrative State
+type AdminState_AdminState int32
+
+const (
+ // The administrative state of the device is unknown
+ AdminState_UNKNOWN AdminState_AdminState = 0
+ // The device is pre-provisioned into Voltha, but not contacted by it
+ AdminState_PREPROVISIONED AdminState_AdminState = 1
+ // The device is enabled for activation and operation
+ AdminState_ENABLED AdminState_AdminState = 2
+ // The device is disabled and shall not perform its intended forwarding
+ // functions other than being available for re-activation.
+ AdminState_DISABLED AdminState_AdminState = 3
+ // The device is in the state of image download
+ AdminState_DOWNLOADING_IMAGE AdminState_AdminState = 4
+ // The device is marked to be deleted
+ AdminState_DELETED AdminState_AdminState = 5
+)
+
+var AdminState_AdminState_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "PREPROVISIONED",
+ 2: "ENABLED",
+ 3: "DISABLED",
+ 4: "DOWNLOADING_IMAGE",
+ 5: "DELETED",
+}
+
+var AdminState_AdminState_value = map[string]int32{
+ "UNKNOWN": 0,
+ "PREPROVISIONED": 1,
+ "ENABLED": 2,
+ "DISABLED": 3,
+ "DOWNLOADING_IMAGE": 4,
+ "DELETED": 5,
+}
+
+func (x AdminState_AdminState) String() string {
+ return proto.EnumName(AdminState_AdminState_name, int32(x))
+}
+
+func (AdminState_AdminState) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{3, 0}
+}
+
+// Operational Status
+type OperStatus_OperStatus int32
+
+const (
+ // The status of the device is unknown at this point
+ OperStatus_UNKNOWN OperStatus_OperStatus = 0
+ // The device has been discovered, but not yet activated
+ OperStatus_DISCOVERED OperStatus_OperStatus = 1
+ // The device is being activated (booted, rebooted, upgraded, etc.)
+ OperStatus_ACTIVATING OperStatus_OperStatus = 2
+ // Service impacting tests are being conducted
+ OperStatus_TESTING OperStatus_OperStatus = 3
+ // The device is up and active
+ OperStatus_ACTIVE OperStatus_OperStatus = 4
+ // The device has failed and cannot fulfill its intended role
+ OperStatus_FAILED OperStatus_OperStatus = 5
+)
+
+var OperStatus_OperStatus_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "DISCOVERED",
+ 2: "ACTIVATING",
+ 3: "TESTING",
+ 4: "ACTIVE",
+ 5: "FAILED",
+}
+
+var OperStatus_OperStatus_value = map[string]int32{
+ "UNKNOWN": 0,
+ "DISCOVERED": 1,
+ "ACTIVATING": 2,
+ "TESTING": 3,
+ "ACTIVE": 4,
+ "FAILED": 5,
+}
+
+func (x OperStatus_OperStatus) String() string {
+ return proto.EnumName(OperStatus_OperStatus_name, int32(x))
+}
+
+func (OperStatus_OperStatus) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{4, 0}
+}
+
+// Connectivity Status
+type ConnectStatus_ConnectStatus int32
+
+const (
+ // The device connectivity status is unknown
+ ConnectStatus_UNKNOWN ConnectStatus_ConnectStatus = 0
+ // The device cannot be reached by Voltha
+ ConnectStatus_UNREACHABLE ConnectStatus_ConnectStatus = 1
+ // There is live communication between device and Voltha
+ ConnectStatus_REACHABLE ConnectStatus_ConnectStatus = 2
+)
+
+var ConnectStatus_ConnectStatus_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "UNREACHABLE",
+ 2: "REACHABLE",
+}
+
+var ConnectStatus_ConnectStatus_value = map[string]int32{
+ "UNKNOWN": 0,
+ "UNREACHABLE": 1,
+ "REACHABLE": 2,
+}
+
+func (x ConnectStatus_ConnectStatus) String() string {
+ return proto.EnumName(ConnectStatus_ConnectStatus_name, int32(x))
+}
+
+func (ConnectStatus_ConnectStatus) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{5, 0}
+}
+
+type OperationResp_OperationReturnCode int32
+
+const (
+ OperationResp_OPERATION_SUCCESS OperationResp_OperationReturnCode = 0
+ OperationResp_OPERATION_FAILURE OperationResp_OperationReturnCode = 1
+ OperationResp_OPERATION_UNSUPPORTED OperationResp_OperationReturnCode = 2
+)
+
+var OperationResp_OperationReturnCode_name = map[int32]string{
+ 0: "OPERATION_SUCCESS",
+ 1: "OPERATION_FAILURE",
+ 2: "OPERATION_UNSUPPORTED",
+}
+
+var OperationResp_OperationReturnCode_value = map[string]int32{
+ "OPERATION_SUCCESS": 0,
+ "OPERATION_FAILURE": 1,
+ "OPERATION_UNSUPPORTED": 2,
+}
+
+func (x OperationResp_OperationReturnCode) String() string {
+ return proto.EnumName(OperationResp_OperationReturnCode_name, int32(x))
+}
+
+func (OperationResp_OperationReturnCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{6, 0}
+}
+
+// Convey a resource identifier
+type ID struct {
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ID) Reset() { *m = ID{} }
+func (m *ID) String() string { return proto.CompactTextString(m) }
+func (*ID) ProtoMessage() {}
+func (*ID) Descriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{0}
+}
+
+func (m *ID) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ID.Unmarshal(m, b)
+}
+func (m *ID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ID.Marshal(b, m, deterministic)
+}
+func (m *ID) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ID.Merge(m, src)
+}
+func (m *ID) XXX_Size() int {
+ return xxx_messageInfo_ID.Size(m)
+}
+func (m *ID) XXX_DiscardUnknown() {
+ xxx_messageInfo_ID.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ID proto.InternalMessageInfo
+
+func (m *ID) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+// Represents a list of IDs
+type IDs struct {
+ Items []*ID `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *IDs) Reset() { *m = IDs{} }
+func (m *IDs) String() string { return proto.CompactTextString(m) }
+func (*IDs) ProtoMessage() {}
+func (*IDs) Descriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{1}
+}
+
+func (m *IDs) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_IDs.Unmarshal(m, b)
+}
+func (m *IDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_IDs.Marshal(b, m, deterministic)
+}
+func (m *IDs) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_IDs.Merge(m, src)
+}
+func (m *IDs) XXX_Size() int {
+ return xxx_messageInfo_IDs.Size(m)
+}
+func (m *IDs) XXX_DiscardUnknown() {
+ xxx_messageInfo_IDs.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_IDs proto.InternalMessageInfo
+
+func (m *IDs) GetItems() []*ID {
+ if m != nil {
+ return m.Items
+ }
+ return nil
+}
+
+type LogLevel struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *LogLevel) Reset() { *m = LogLevel{} }
+func (m *LogLevel) String() string { return proto.CompactTextString(m) }
+func (*LogLevel) ProtoMessage() {}
+func (*LogLevel) Descriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{2}
+}
+
+func (m *LogLevel) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_LogLevel.Unmarshal(m, b)
+}
+func (m *LogLevel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_LogLevel.Marshal(b, m, deterministic)
+}
+func (m *LogLevel) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_LogLevel.Merge(m, src)
+}
+func (m *LogLevel) XXX_Size() int {
+ return xxx_messageInfo_LogLevel.Size(m)
+}
+func (m *LogLevel) XXX_DiscardUnknown() {
+ xxx_messageInfo_LogLevel.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogLevel proto.InternalMessageInfo
+
+type AdminState struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AdminState) Reset() { *m = AdminState{} }
+func (m *AdminState) String() string { return proto.CompactTextString(m) }
+func (*AdminState) ProtoMessage() {}
+func (*AdminState) Descriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{3}
+}
+
+func (m *AdminState) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AdminState.Unmarshal(m, b)
+}
+func (m *AdminState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AdminState.Marshal(b, m, deterministic)
+}
+func (m *AdminState) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AdminState.Merge(m, src)
+}
+func (m *AdminState) XXX_Size() int {
+ return xxx_messageInfo_AdminState.Size(m)
+}
+func (m *AdminState) XXX_DiscardUnknown() {
+ xxx_messageInfo_AdminState.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AdminState proto.InternalMessageInfo
+
+type OperStatus struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OperStatus) Reset() { *m = OperStatus{} }
+func (m *OperStatus) String() string { return proto.CompactTextString(m) }
+func (*OperStatus) ProtoMessage() {}
+func (*OperStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{4}
+}
+
+func (m *OperStatus) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OperStatus.Unmarshal(m, b)
+}
+func (m *OperStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OperStatus.Marshal(b, m, deterministic)
+}
+func (m *OperStatus) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OperStatus.Merge(m, src)
+}
+func (m *OperStatus) XXX_Size() int {
+ return xxx_messageInfo_OperStatus.Size(m)
+}
+func (m *OperStatus) XXX_DiscardUnknown() {
+ xxx_messageInfo_OperStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OperStatus proto.InternalMessageInfo
+
+type ConnectStatus struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ConnectStatus) Reset() { *m = ConnectStatus{} }
+func (m *ConnectStatus) String() string { return proto.CompactTextString(m) }
+func (*ConnectStatus) ProtoMessage() {}
+func (*ConnectStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{5}
+}
+
+func (m *ConnectStatus) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ConnectStatus.Unmarshal(m, b)
+}
+func (m *ConnectStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ConnectStatus.Marshal(b, m, deterministic)
+}
+func (m *ConnectStatus) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ConnectStatus.Merge(m, src)
+}
+func (m *ConnectStatus) XXX_Size() int {
+ return xxx_messageInfo_ConnectStatus.Size(m)
+}
+func (m *ConnectStatus) XXX_DiscardUnknown() {
+ xxx_messageInfo_ConnectStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ConnectStatus proto.InternalMessageInfo
+
+type OperationResp struct {
+ // Return code
+ Code OperationResp_OperationReturnCode `protobuf:"varint,1,opt,name=code,proto3,enum=voltha.OperationResp_OperationReturnCode" json:"code,omitempty"`
+ // Additional Info
+ AdditionalInfo string `protobuf:"bytes,2,opt,name=additional_info,json=additionalInfo,proto3" json:"additional_info,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OperationResp) Reset() { *m = OperationResp{} }
+func (m *OperationResp) String() string { return proto.CompactTextString(m) }
+func (*OperationResp) ProtoMessage() {}
+func (*OperationResp) Descriptor() ([]byte, []int) {
+ return fileDescriptor_c2e3fd231961e826, []int{6}
+}
+
+func (m *OperationResp) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OperationResp.Unmarshal(m, b)
+}
+func (m *OperationResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OperationResp.Marshal(b, m, deterministic)
+}
+func (m *OperationResp) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OperationResp.Merge(m, src)
+}
+func (m *OperationResp) XXX_Size() int {
+ return xxx_messageInfo_OperationResp.Size(m)
+}
+func (m *OperationResp) XXX_DiscardUnknown() {
+ xxx_messageInfo_OperationResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OperationResp proto.InternalMessageInfo
+
+func (m *OperationResp) GetCode() OperationResp_OperationReturnCode {
+ if m != nil {
+ return m.Code
+ }
+ return OperationResp_OPERATION_SUCCESS
+}
+
+func (m *OperationResp) GetAdditionalInfo() string {
+ if m != nil {
+ return m.AdditionalInfo
+ }
+ return ""
+}
+
+func init() {
+ proto.RegisterEnum("voltha.TestModeKeys", TestModeKeys_name, TestModeKeys_value)
+ proto.RegisterEnum("voltha.LogLevel_LogLevel", LogLevel_LogLevel_name, LogLevel_LogLevel_value)
+ proto.RegisterEnum("voltha.AdminState_AdminState", AdminState_AdminState_name, AdminState_AdminState_value)
+ proto.RegisterEnum("voltha.OperStatus_OperStatus", OperStatus_OperStatus_name, OperStatus_OperStatus_value)
+ proto.RegisterEnum("voltha.ConnectStatus_ConnectStatus", ConnectStatus_ConnectStatus_name, ConnectStatus_ConnectStatus_value)
+ proto.RegisterEnum("voltha.OperationResp_OperationReturnCode", OperationResp_OperationReturnCode_name, OperationResp_OperationReturnCode_value)
+ proto.RegisterType((*ID)(nil), "voltha.ID")
+ proto.RegisterType((*IDs)(nil), "voltha.IDs")
+ proto.RegisterType((*LogLevel)(nil), "voltha.LogLevel")
+ proto.RegisterType((*AdminState)(nil), "voltha.AdminState")
+ proto.RegisterType((*OperStatus)(nil), "voltha.OperStatus")
+ proto.RegisterType((*ConnectStatus)(nil), "voltha.ConnectStatus")
+ proto.RegisterType((*OperationResp)(nil), "voltha.OperationResp")
+}
+
+func init() { proto.RegisterFile("voltha_protos/common.proto", fileDescriptor_c2e3fd231961e826) }
+
+var fileDescriptor_c2e3fd231961e826 = []byte{
+ // 564 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0x5f, 0x4f, 0xdb, 0x3e,
+ 0x14, 0x6d, 0xd2, 0x3f, 0xc0, 0x2d, 0x94, 0xfc, 0xfc, 0x1b, 0x12, 0x43, 0x9b, 0x54, 0xe5, 0x05,
+ 0xb6, 0x89, 0x22, 0xb1, 0xb7, 0x69, 0x7b, 0x30, 0x89, 0xe9, 0x2c, 0x82, 0x5d, 0x39, 0x09, 0x48,
+ 0x7b, 0xa0, 0x0a, 0x8d, 0x29, 0x91, 0xda, 0x38, 0x6a, 0x0c, 0x12, 0x8f, 0xfb, 0x80, 0xfb, 0x0a,
+ 0xfb, 0x0c, 0x7b, 0xda, 0xf3, 0xe4, 0x04, 0xd4, 0x76, 0xda, 0x5b, 0xce, 0x39, 0xd7, 0xf7, 0xf8,
+ 0xe4, 0x5e, 0xc3, 0xc1, 0xa3, 0x9a, 0xe9, 0xfb, 0x64, 0x5c, 0x2c, 0x94, 0x56, 0xe5, 0xc9, 0x44,
+ 0xcd, 0xe7, 0x2a, 0x1f, 0x54, 0x08, 0x75, 0x6a, 0xed, 0xa0, 0xbf, 0x5e, 0xf3, 0x94, 0xe4, 0xd3,
+ 0xb1, 0x2a, 0x74, 0xa6, 0xf2, 0xb2, 0xae, 0x74, 0x5f, 0x81, 0x4d, 0x7d, 0xd4, 0x03, 0x3b, 0x4b,
+ 0xf7, 0xad, 0xbe, 0x75, 0xb4, 0x25, 0xec, 0x2c, 0x75, 0x0f, 0xa1, 0x49, 0xfd, 0x12, 0xf5, 0xa1,
+ 0x9d, 0x69, 0x39, 0x2f, 0xf7, 0xad, 0x7e, 0xf3, 0xa8, 0x7b, 0x0a, 0x83, 0xba, 0xdd, 0x80, 0xfa,
+ 0xa2, 0x16, 0xdc, 0x09, 0x6c, 0x06, 0x6a, 0x1a, 0xc8, 0x47, 0x39, 0x73, 0x47, 0xcb, 0x6f, 0xb4,
+ 0x05, 0x6d, 0x9f, 0x9c, 0xc5, 0x43, 0xa7, 0x81, 0x36, 0xa1, 0x45, 0xd9, 0x39, 0x77, 0x2c, 0xd4,
+ 0x85, 0x8d, 0x6b, 0x2c, 0x18, 0x65, 0x43, 0xc7, 0x36, 0x15, 0x44, 0x08, 0x2e, 0x9c, 0x26, 0xda,
+ 0x86, 0x4d, 0x4f, 0xd0, 0x88, 0x7a, 0x38, 0x70, 0x5a, 0x46, 0x38, 0xc7, 0x11, 0x0e, 0x9c, 0xf6,
+ 0xa7, 0xf6, 0xaf, 0xdf, 0x3f, 0xde, 0x36, 0xdc, 0xef, 0x16, 0x00, 0x4e, 0xe7, 0x59, 0x1e, 0xea,
+ 0x44, 0x4b, 0x77, 0xb6, 0x8a, 0x4c, 0xd3, 0x98, 0x5d, 0x30, 0x7e, 0xcd, 0x9c, 0x06, 0x42, 0xd0,
+ 0x1b, 0x09, 0x32, 0x12, 0xfc, 0x8a, 0x86, 0x94, 0x33, 0xe2, 0xd7, 0xae, 0x84, 0xe1, 0xb3, 0x80,
+ 0xf8, 0x8e, 0x6d, 0xac, 0x7c, 0x1a, 0xd6, 0xa8, 0x89, 0xf6, 0xe0, 0x3f, 0x9f, 0x5f, 0xb3, 0x80,
+ 0x63, 0x9f, 0xb2, 0xe1, 0x98, 0x5e, 0xe2, 0x21, 0x71, 0x5a, 0xe6, 0x84, 0x4f, 0x02, 0x12, 0x11,
+ 0x7f, 0x79, 0x87, 0x12, 0x80, 0x17, 0x72, 0x61, 0x3c, 0x1f, 0x4a, 0xf7, 0x66, 0x15, 0xad, 0x5f,
+ 0xa1, 0x07, 0xe0, 0xd3, 0xd0, 0xe3, 0x57, 0x44, 0x54, 0xf6, 0x3d, 0x00, 0xec, 0x45, 0xf4, 0x0a,
+ 0x47, 0x75, 0xee, 0x2e, 0x6c, 0x44, 0x24, 0xac, 0x40, 0x13, 0x01, 0x74, 0x2a, 0xd1, 0xb8, 0x02,
+ 0x74, 0xce, 0x31, 0x0d, 0x56, 0x4d, 0x23, 0xd8, 0xf1, 0x54, 0x9e, 0xcb, 0x89, 0x7e, 0xf6, 0xfd,
+ 0xfc, 0x17, 0xb1, 0x6e, 0xbd, 0x0b, 0xdd, 0x98, 0x09, 0x82, 0xbd, 0xaf, 0x26, 0xa0, 0x63, 0xa1,
+ 0x1d, 0xd8, 0x5a, 0x42, 0xfb, 0xa5, 0xeb, 0x4f, 0x0b, 0x76, 0xcc, 0xed, 0x13, 0xb3, 0x07, 0x42,
+ 0x96, 0x05, 0xfa, 0x02, 0xad, 0x89, 0x4a, 0x65, 0xb5, 0x00, 0xbd, 0xd3, 0x77, 0x2f, 0x63, 0x5e,
+ 0x2b, 0x5a, 0x45, 0xfa, 0x61, 0x91, 0x7b, 0x2a, 0x95, 0xa2, 0x3a, 0x86, 0x0e, 0x61, 0x37, 0x49,
+ 0xd3, 0xcc, 0x68, 0xc9, 0x6c, 0x9c, 0xe5, 0x77, 0x6a, 0xdf, 0xae, 0x56, 0xa9, 0xb7, 0xa4, 0x69,
+ 0x7e, 0xa7, 0xdc, 0x1b, 0xf8, 0xff, 0x1f, 0x5d, 0xcc, 0x18, 0xf8, 0x88, 0x08, 0x1c, 0x51, 0xce,
+ 0xc6, 0x61, 0xec, 0x79, 0x24, 0x0c, 0x9d, 0xc6, 0x3a, 0x6d, 0x7e, 0x4d, 0x2c, 0x4c, 0xa8, 0xd7,
+ 0xb0, 0xb7, 0xa4, 0x63, 0x16, 0xc6, 0xa3, 0x11, 0x17, 0x66, 0x56, 0x2f, 0x01, 0xdf, 0xbf, 0x81,
+ 0xed, 0x48, 0x96, 0xfa, 0x52, 0xa5, 0xf2, 0x42, 0x3e, 0x95, 0x66, 0xe8, 0x49, 0x91, 0x8d, 0xb5,
+ 0x2c, 0xb5, 0xd3, 0x38, 0x3b, 0xfe, 0xf6, 0x61, 0x9a, 0xe9, 0xfb, 0x87, 0xdb, 0xc1, 0x44, 0xcd,
+ 0x4f, 0x54, 0x21, 0xf3, 0x89, 0x5a, 0xa4, 0x27, 0x75, 0xe6, 0xe3, 0xe7, 0x97, 0x32, 0x55, 0xcf,
+ 0x0f, 0xea, 0xb6, 0x53, 0x31, 0x1f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x0d, 0x0e, 0x19,
+ 0x6f, 0x03, 0x00, 0x00,
+}
diff --git a/vendor/github.com/opencord/voltha-protos/go/common/meta.pb.go b/vendor/github.com/opencord/voltha-protos/go/common/meta.pb.go
new file mode 100644
index 0000000..181f3dd
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-protos/go/common/meta.pb.go
@@ -0,0 +1,141 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/meta.proto
+
+package common
+
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type Access int32
+
+const (
+ // read-write, stored attribute
+ Access_CONFIG Access = 0
+ // read-only field, stored with the model, covered by its hash
+ Access_READ_ONLY Access = 1
+ // A read-only attribute that is not stored in the model, not covered
+ // by its hash, its value is filled real-time upon each request.
+ Access_REAL_TIME Access = 2
+)
+
+var Access_name = map[int32]string{
+ 0: "CONFIG",
+ 1: "READ_ONLY",
+ 2: "REAL_TIME",
+}
+
+var Access_value = map[string]int32{
+ "CONFIG": 0,
+ "READ_ONLY": 1,
+ "REAL_TIME": 2,
+}
+
+func (x Access) String() string {
+ return proto.EnumName(Access_name, int32(x))
+}
+
+func (Access) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_96b320e8a67781f3, []int{0}
+}
+
+type ChildNode struct {
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ChildNode) Reset() { *m = ChildNode{} }
+func (m *ChildNode) String() string { return proto.CompactTextString(m) }
+func (*ChildNode) ProtoMessage() {}
+func (*ChildNode) Descriptor() ([]byte, []int) {
+ return fileDescriptor_96b320e8a67781f3, []int{0}
+}
+
+func (m *ChildNode) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ChildNode.Unmarshal(m, b)
+}
+func (m *ChildNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ChildNode.Marshal(b, m, deterministic)
+}
+func (m *ChildNode) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ChildNode.Merge(m, src)
+}
+func (m *ChildNode) XXX_Size() int {
+ return xxx_messageInfo_ChildNode.Size(m)
+}
+func (m *ChildNode) XXX_DiscardUnknown() {
+ xxx_messageInfo_ChildNode.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ChildNode proto.InternalMessageInfo
+
+func (m *ChildNode) GetKey() string {
+ if m != nil {
+ return m.Key
+ }
+ return ""
+}
+
+var E_ChildNode = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.FieldOptions)(nil),
+ ExtensionType: (*ChildNode)(nil),
+ Field: 7761772,
+ Name: "voltha.child_node",
+ Tag: "bytes,7761772,opt,name=child_node",
+ Filename: "voltha_protos/meta.proto",
+}
+
+var E_Access = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.FieldOptions)(nil),
+ ExtensionType: (*Access)(nil),
+ Field: 7761773,
+ Name: "voltha.access",
+ Tag: "varint,7761773,opt,name=access,enum=voltha.Access",
+ Filename: "voltha_protos/meta.proto",
+}
+
+func init() {
+ proto.RegisterEnum("voltha.Access", Access_name, Access_value)
+ proto.RegisterType((*ChildNode)(nil), "voltha.ChildNode")
+ proto.RegisterExtension(E_ChildNode)
+ proto.RegisterExtension(E_Access)
+}
+
+func init() { proto.RegisterFile("voltha_protos/meta.proto", fileDescriptor_96b320e8a67781f3) }
+
+var fileDescriptor_96b320e8a67781f3 = []byte{
+ // 271 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x41, 0x4b, 0x84, 0x40,
+ 0x18, 0x86, 0xb3, 0x05, 0xc1, 0x2f, 0x5a, 0xcc, 0x93, 0x04, 0x0b, 0xd2, 0x69, 0x29, 0x76, 0x06,
+ 0xec, 0xb6, 0xb7, 0x6d, 0xdb, 0xad, 0x85, 0x4d, 0x41, 0xba, 0xd4, 0x45, 0x74, 0x9c, 0x74, 0x48,
+ 0xfd, 0xc4, 0x99, 0x0d, 0xfa, 0xa9, 0x5d, 0xfa, 0x05, 0xf5, 0x1f, 0x42, 0x47, 0xbb, 0xee, 0xed,
+ 0x9d, 0x77, 0xde, 0x79, 0x78, 0x18, 0x70, 0x3f, 0xb0, 0x54, 0x45, 0x12, 0x37, 0x2d, 0x2a, 0x94,
+ 0xb4, 0xe2, 0x2a, 0x21, 0x7d, 0x76, 0x4c, 0x7d, 0x73, 0xe9, 0xe5, 0x88, 0x79, 0xc9, 0x69, 0xdf,
+ 0xa6, 0x87, 0x37, 0x9a, 0x71, 0xc9, 0x5a, 0xd1, 0x28, 0x6c, 0xf5, 0xf2, 0x6a, 0x06, 0xd6, 0xba,
+ 0x10, 0x65, 0x16, 0x60, 0xc6, 0x1d, 0x1b, 0x26, 0xef, 0xfc, 0xd3, 0x35, 0x3c, 0x63, 0x6e, 0x45,
+ 0x5d, 0xbc, 0xf6, 0xc1, 0x5c, 0x31, 0xc6, 0xa5, 0x74, 0x00, 0xcc, 0x75, 0x18, 0x6c, 0x77, 0x0f,
+ 0xf6, 0x89, 0x73, 0x0e, 0x56, 0xb4, 0x59, 0xdd, 0xc7, 0x61, 0xb0, 0x7f, 0xb1, 0x8d, 0xe1, 0xb8,
+ 0x8f, 0x9f, 0x77, 0x4f, 0x1b, 0xfb, 0x74, 0x19, 0x01, 0xb0, 0x0e, 0x19, 0xd7, 0x1d, 0x73, 0x46,
+ 0xb4, 0x03, 0x19, 0x1d, 0xc8, 0x56, 0xf0, 0x32, 0x0b, 0x1b, 0x25, 0xb0, 0x96, 0xee, 0xcf, 0xf7,
+ 0xd7, 0xc4, 0x33, 0xe6, 0x67, 0xfe, 0x05, 0xd1, 0xce, 0xe4, 0x5f, 0x27, 0xb2, 0xd8, 0x18, 0x97,
+ 0x8f, 0x60, 0x26, 0xda, 0xe3, 0x08, 0xef, 0x57, 0xf3, 0xa6, 0xfe, 0x74, 0xe4, 0x69, 0xff, 0x68,
+ 0x78, 0x7f, 0xb7, 0x78, 0xbd, 0xc9, 0x85, 0x2a, 0x0e, 0x29, 0x61, 0x58, 0x51, 0x6c, 0x78, 0xcd,
+ 0xb0, 0xcd, 0xa8, 0x1e, 0x2f, 0x86, 0xaf, 0xcc, 0x91, 0x32, 0xac, 0x2a, 0xac, 0x53, 0xb3, 0x6f,
+ 0x6e, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x90, 0x94, 0xed, 0x6c, 0x01, 0x00, 0x00,
+}
diff --git a/vendor/github.com/opencord/voltha-protos/go/common/yang_options.pb.go b/vendor/github.com/opencord/voltha-protos/go/common/yang_options.pb.go
new file mode 100644
index 0000000..9d6ee66
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-protos/go/common/yang_options.pb.go
@@ -0,0 +1,237 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/yang_options.proto
+
+package common
+
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type MessageParserOption int32
+
+const (
+ // Move any enclosing child enum/message definition to the same level
+ // as the parent (this message) in the yang generated file
+ MessageParserOption_MOVE_TO_PARENT_LEVEL MessageParserOption = 0
+ // Create both a grouping and a container for this message. The container
+ // name will be the message name. The grouping name will be the message
+ // name prefixed with "grouping_"
+ MessageParserOption_CREATE_BOTH_GROUPING_AND_CONTAINER MessageParserOption = 1
+)
+
+var MessageParserOption_name = map[int32]string{
+ 0: "MOVE_TO_PARENT_LEVEL",
+ 1: "CREATE_BOTH_GROUPING_AND_CONTAINER",
+}
+
+var MessageParserOption_value = map[string]int32{
+ "MOVE_TO_PARENT_LEVEL": 0,
+ "CREATE_BOTH_GROUPING_AND_CONTAINER": 1,
+}
+
+func (x MessageParserOption) String() string {
+ return proto.EnumName(MessageParserOption_name, int32(x))
+}
+
+func (MessageParserOption) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_e6be2fba65eb89fb, []int{0}
+}
+
+type InlineNode struct {
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InlineNode) Reset() { *m = InlineNode{} }
+func (m *InlineNode) String() string { return proto.CompactTextString(m) }
+func (*InlineNode) ProtoMessage() {}
+func (*InlineNode) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e6be2fba65eb89fb, []int{0}
+}
+
+func (m *InlineNode) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InlineNode.Unmarshal(m, b)
+}
+func (m *InlineNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InlineNode.Marshal(b, m, deterministic)
+}
+func (m *InlineNode) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InlineNode.Merge(m, src)
+}
+func (m *InlineNode) XXX_Size() int {
+ return xxx_messageInfo_InlineNode.Size(m)
+}
+func (m *InlineNode) XXX_DiscardUnknown() {
+ xxx_messageInfo_InlineNode.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InlineNode proto.InternalMessageInfo
+
+func (m *InlineNode) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *InlineNode) GetType() string {
+ if m != nil {
+ return m.Type
+ }
+ return ""
+}
+
+type RpcReturnDef struct {
+ // The gRPC methods return message types. NETCONF expects an actual
+ // attribute as defined in the YANG schema. The xnl_tag will be used
+ // as the top most tag when translating a gRPC response into an xml
+ // response
+ XmlTag string `protobuf:"bytes,1,opt,name=xml_tag,json=xmlTag,proto3" json:"xml_tag,omitempty"`
+ // When the gRPC response is a list of items, we need to differentiate
+ // between a YANG schema attribute whose name is "items" and when "items"
+ // is used only to indicate a list of items is being returned. The default
+ // behavior assumes a list is returned when "items" is present in
+ // the response. This option will therefore be used when the attribute
+ // name in the YANG schema is 'items'
+ ListItemsName string `protobuf:"bytes,2,opt,name=list_items_name,json=listItemsName,proto3" json:"list_items_name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *RpcReturnDef) Reset() { *m = RpcReturnDef{} }
+func (m *RpcReturnDef) String() string { return proto.CompactTextString(m) }
+func (*RpcReturnDef) ProtoMessage() {}
+func (*RpcReturnDef) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e6be2fba65eb89fb, []int{1}
+}
+
+func (m *RpcReturnDef) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_RpcReturnDef.Unmarshal(m, b)
+}
+func (m *RpcReturnDef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_RpcReturnDef.Marshal(b, m, deterministic)
+}
+func (m *RpcReturnDef) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_RpcReturnDef.Merge(m, src)
+}
+func (m *RpcReturnDef) XXX_Size() int {
+ return xxx_messageInfo_RpcReturnDef.Size(m)
+}
+func (m *RpcReturnDef) XXX_DiscardUnknown() {
+ xxx_messageInfo_RpcReturnDef.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_RpcReturnDef proto.InternalMessageInfo
+
+func (m *RpcReturnDef) GetXmlTag() string {
+ if m != nil {
+ return m.XmlTag
+ }
+ return ""
+}
+
+func (m *RpcReturnDef) GetListItemsName() string {
+ if m != nil {
+ return m.ListItemsName
+ }
+ return ""
+}
+
+var E_YangChildRule = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.MessageOptions)(nil),
+ ExtensionType: (*MessageParserOption)(nil),
+ Field: 7761774,
+ Name: "voltha.yang_child_rule",
+ Tag: "varint,7761774,opt,name=yang_child_rule,enum=voltha.MessageParserOption",
+ Filename: "voltha_protos/yang_options.proto",
+}
+
+var E_YangMessageRule = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.MessageOptions)(nil),
+ ExtensionType: (*MessageParserOption)(nil),
+ Field: 7761775,
+ Name: "voltha.yang_message_rule",
+ Tag: "varint,7761775,opt,name=yang_message_rule,enum=voltha.MessageParserOption",
+ Filename: "voltha_protos/yang_options.proto",
+}
+
+var E_YangInlineNode = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.FieldOptions)(nil),
+ ExtensionType: (*InlineNode)(nil),
+ Field: 7761776,
+ Name: "voltha.yang_inline_node",
+ Tag: "bytes,7761776,opt,name=yang_inline_node",
+ Filename: "voltha_protos/yang_options.proto",
+}
+
+var E_YangXmlTag = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.MethodOptions)(nil),
+ ExtensionType: (*RpcReturnDef)(nil),
+ Field: 7761777,
+ Name: "voltha.yang_xml_tag",
+ Tag: "bytes,7761777,opt,name=yang_xml_tag",
+ Filename: "voltha_protos/yang_options.proto",
+}
+
+func init() {
+ proto.RegisterEnum("voltha.MessageParserOption", MessageParserOption_name, MessageParserOption_value)
+ proto.RegisterType((*InlineNode)(nil), "voltha.InlineNode")
+ proto.RegisterType((*RpcReturnDef)(nil), "voltha.RpcReturnDef")
+ proto.RegisterExtension(E_YangChildRule)
+ proto.RegisterExtension(E_YangMessageRule)
+ proto.RegisterExtension(E_YangInlineNode)
+ proto.RegisterExtension(E_YangXmlTag)
+}
+
+func init() { proto.RegisterFile("voltha_protos/yang_options.proto", fileDescriptor_e6be2fba65eb89fb) }
+
+var fileDescriptor_e6be2fba65eb89fb = []byte{
+ // 452 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4d, 0x6f, 0xd3, 0x30,
+ 0x18, 0xc7, 0x69, 0x41, 0x45, 0x98, 0xad, 0x2b, 0x66, 0x12, 0x15, 0x08, 0xa8, 0x7a, 0x98, 0x26,
+ 0xd0, 0x12, 0x34, 0x6e, 0xbd, 0x75, 0x5d, 0x18, 0x95, 0xb6, 0xa4, 0xb2, 0xc2, 0x78, 0x39, 0x60,
+ 0xa5, 0x89, 0xe7, 0x58, 0xd8, 0x7e, 0xa2, 0xd8, 0x41, 0xdb, 0x47, 0xe5, 0xc2, 0x47, 0xe0, 0xe5,
+ 0x1b, 0xa0, 0x38, 0x09, 0x43, 0x62, 0x87, 0xde, 0x92, 0x7f, 0xec, 0xdf, 0x2f, 0xcf, 0x0b, 0x9a,
+ 0x7c, 0x05, 0x69, 0xf3, 0x84, 0x16, 0x25, 0x58, 0x30, 0xfe, 0x55, 0xa2, 0x39, 0x85, 0xc2, 0x0a,
+ 0xd0, 0xc6, 0x73, 0x19, 0x1e, 0x34, 0x27, 0x1e, 0x4f, 0x38, 0x00, 0x97, 0xcc, 0x77, 0xe9, 0xba,
+ 0xba, 0xf0, 0x33, 0x66, 0xd2, 0x52, 0x14, 0x16, 0xca, 0xe6, 0xe4, 0xf4, 0x15, 0x42, 0x4b, 0x2d,
+ 0x85, 0x66, 0x21, 0x64, 0x0c, 0x0f, 0x51, 0x5f, 0x64, 0xe3, 0xde, 0xa4, 0xb7, 0x7f, 0x8f, 0xf4,
+ 0x45, 0x86, 0x31, 0xba, 0x63, 0xaf, 0x0a, 0x36, 0xee, 0xbb, 0xc4, 0x3d, 0x4f, 0x23, 0xb4, 0x45,
+ 0x8a, 0x94, 0x30, 0x5b, 0x95, 0xfa, 0x98, 0x5d, 0xe0, 0x47, 0xe8, 0xee, 0xa5, 0x92, 0xd4, 0x26,
+ 0xbc, 0xbd, 0x38, 0xb8, 0x54, 0x32, 0x4e, 0x38, 0xde, 0x43, 0x3b, 0x52, 0x18, 0x4b, 0x85, 0x65,
+ 0xca, 0x50, 0x9d, 0xa8, 0x8e, 0xb3, 0x5d, 0xc7, 0xcb, 0x3a, 0x0d, 0x13, 0xc5, 0x5e, 0xbc, 0x47,
+ 0x0f, 0xcf, 0x98, 0x31, 0x09, 0x67, 0xab, 0xa4, 0x34, 0xac, 0x8c, 0x5c, 0x29, 0x78, 0x8c, 0x76,
+ 0xcf, 0xa2, 0xf3, 0x80, 0xc6, 0x11, 0x5d, 0xcd, 0x49, 0x10, 0xc6, 0xf4, 0x34, 0x38, 0x0f, 0x4e,
+ 0x47, 0xb7, 0xf0, 0x1e, 0x9a, 0x2e, 0x48, 0x30, 0x8f, 0x03, 0x7a, 0x14, 0xc5, 0x6f, 0xe9, 0x09,
+ 0x89, 0xde, 0xad, 0x96, 0xe1, 0x09, 0x9d, 0x87, 0xc7, 0x74, 0x11, 0x85, 0xf1, 0x7c, 0x19, 0x06,
+ 0x64, 0xd4, 0x9b, 0x71, 0xb4, 0xe3, 0x7a, 0x93, 0xe6, 0x42, 0x66, 0xb4, 0xac, 0x24, 0xc3, 0xcf,
+ 0xbd, 0xa6, 0x23, 0x5e, 0xd7, 0x11, 0xaf, 0x55, 0x37, 0x52, 0x33, 0xfe, 0xf1, 0xfd, 0xdb, 0xed,
+ 0x49, 0x6f, 0x7f, 0x78, 0xf8, 0xc4, 0x6b, 0x7a, 0xe8, 0xdd, 0xf0, 0x6f, 0x64, 0xbb, 0xe6, 0x2e,
+ 0x6a, 0x2c, 0xa9, 0x24, 0x9b, 0x7d, 0x41, 0x0f, 0x9c, 0x48, 0x35, 0x47, 0x37, 0x54, 0xfd, 0xdc,
+ 0x48, 0xe5, 0x4a, 0x68, 0x3f, 0x38, 0xd9, 0x67, 0x34, 0x72, 0x32, 0xe1, 0xc6, 0x46, 0x75, 0x3d,
+ 0xb7, 0xa7, 0xff, 0xb9, 0xde, 0x08, 0x26, 0xb3, 0xce, 0xf4, 0xab, 0x31, 0xdd, 0x3f, 0xc4, 0x9d,
+ 0xe9, 0x7a, 0xe6, 0x64, 0x58, 0xd3, 0xae, 0xdf, 0x67, 0x1f, 0xd1, 0x96, 0xe3, 0xb7, 0x43, 0xc5,
+ 0xcf, 0x6e, 0xa8, 0xc3, 0xe6, 0xf0, 0x17, 0xfe, 0xbb, 0x83, 0xef, 0x76, 0xf0, 0x7f, 0xd7, 0x83,
+ 0xa0, 0x1a, 0xf6, 0xc1, 0x6d, 0xc4, 0xd1, 0xc1, 0xa7, 0x97, 0x5c, 0xd8, 0xbc, 0x5a, 0x7b, 0x29,
+ 0x28, 0x1f, 0x0a, 0xa6, 0x53, 0x28, 0x33, 0xbf, 0xb9, 0x76, 0xd0, 0xae, 0x33, 0x07, 0x3f, 0x05,
+ 0xa5, 0x40, 0xaf, 0x07, 0x2e, 0x79, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0x04, 0x3a, 0x59, 0x44,
+ 0xf0, 0x02, 0x00, 0x00,
+}
diff --git a/vendor/github.com/opencord/voltha-protos/go/inter_container/inter_container.pb.go b/vendor/github.com/opencord/voltha-protos/go/inter_container/inter_container.pb.go
new file mode 100644
index 0000000..79ce1b1
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-protos/go/inter_container/inter_container.pb.go
@@ -0,0 +1,1193 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/inter_container.proto
+
+package inter_container
+
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ any "github.com/golang/protobuf/ptypes/any"
+ openflow_13 "github.com/opencord/voltha-protos/go/openflow_13"
+ voltha "github.com/opencord/voltha-protos/go/voltha"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+// LogicalPortId from public import voltha_protos/logical_device.proto
+type LogicalPortId = voltha.LogicalPortId
+
+// LogicalPort from public import voltha_protos/logical_device.proto
+type LogicalPort = voltha.LogicalPort
+
+// LogicalPorts from public import voltha_protos/logical_device.proto
+type LogicalPorts = voltha.LogicalPorts
+
+// LogicalDevice from public import voltha_protos/logical_device.proto
+type LogicalDevice = voltha.LogicalDevice
+
+// LogicalDevices from public import voltha_protos/logical_device.proto
+type LogicalDevices = voltha.LogicalDevices
+
+type MessageType int32
+
+const (
+ MessageType_REQUEST MessageType = 0
+ MessageType_RESPONSE MessageType = 1
+ MessageType_DEVICE_DISCOVERED MessageType = 2
+)
+
+var MessageType_name = map[int32]string{
+ 0: "REQUEST",
+ 1: "RESPONSE",
+ 2: "DEVICE_DISCOVERED",
+}
+
+var MessageType_value = map[string]int32{
+ "REQUEST": 0,
+ "RESPONSE": 1,
+ "DEVICE_DISCOVERED": 2,
+}
+
+func (x MessageType) String() string {
+ return proto.EnumName(MessageType_name, int32(x))
+}
+
+func (MessageType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{0}
+}
+
+type ErrorCodeCodes int32
+
+const (
+ ErrorCode_UNSUPPORTED_REQUEST ErrorCodeCodes = 0
+ ErrorCode_INVALID_PARAMETERS ErrorCodeCodes = 1
+)
+
+var ErrorCodeCodes_name = map[int32]string{
+ 0: "UNSUPPORTED_REQUEST",
+ 1: "INVALID_PARAMETERS",
+}
+
+var ErrorCodeCodes_value = map[string]int32{
+ "UNSUPPORTED_REQUEST": 0,
+ "INVALID_PARAMETERS": 1,
+}
+
+func (x ErrorCodeCodes) String() string {
+ return proto.EnumName(ErrorCodeCodes_name, int32(x))
+}
+
+func (ErrorCodeCodes) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{4, 0}
+}
+
+type InterAdapterMessageType_Types int32
+
+const (
+ InterAdapterMessageType_FLOW_REQUEST InterAdapterMessageType_Types = 0
+ InterAdapterMessageType_FLOW_RESPONSE InterAdapterMessageType_Types = 1
+ InterAdapterMessageType_OMCI_REQUEST InterAdapterMessageType_Types = 2
+ InterAdapterMessageType_OMCI_RESPONSE InterAdapterMessageType_Types = 3
+ InterAdapterMessageType_METRICS_REQUEST InterAdapterMessageType_Types = 4
+ InterAdapterMessageType_METRICS_RESPONSE InterAdapterMessageType_Types = 5
+ InterAdapterMessageType_ONU_IND_REQUEST InterAdapterMessageType_Types = 6
+ InterAdapterMessageType_ONU_IND_RESPONSE InterAdapterMessageType_Types = 7
+)
+
+var InterAdapterMessageType_Types_name = map[int32]string{
+ 0: "FLOW_REQUEST",
+ 1: "FLOW_RESPONSE",
+ 2: "OMCI_REQUEST",
+ 3: "OMCI_RESPONSE",
+ 4: "METRICS_REQUEST",
+ 5: "METRICS_RESPONSE",
+ 6: "ONU_IND_REQUEST",
+ 7: "ONU_IND_RESPONSE",
+}
+
+var InterAdapterMessageType_Types_value = map[string]int32{
+ "FLOW_REQUEST": 0,
+ "FLOW_RESPONSE": 1,
+ "OMCI_REQUEST": 2,
+ "OMCI_RESPONSE": 3,
+ "METRICS_REQUEST": 4,
+ "METRICS_RESPONSE": 5,
+ "ONU_IND_REQUEST": 6,
+ "ONU_IND_RESPONSE": 7,
+}
+
+func (x InterAdapterMessageType_Types) String() string {
+ return proto.EnumName(InterAdapterMessageType_Types_name, int32(x))
+}
+
+func (InterAdapterMessageType_Types) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{14, 0}
+}
+
+type StrType struct {
+ Val string `protobuf:"bytes,1,opt,name=val,proto3" json:"val,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *StrType) Reset() { *m = StrType{} }
+func (m *StrType) String() string { return proto.CompactTextString(m) }
+func (*StrType) ProtoMessage() {}
+func (*StrType) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{0}
+}
+
+func (m *StrType) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_StrType.Unmarshal(m, b)
+}
+func (m *StrType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_StrType.Marshal(b, m, deterministic)
+}
+func (m *StrType) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StrType.Merge(m, src)
+}
+func (m *StrType) XXX_Size() int {
+ return xxx_messageInfo_StrType.Size(m)
+}
+func (m *StrType) XXX_DiscardUnknown() {
+ xxx_messageInfo_StrType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StrType proto.InternalMessageInfo
+
+func (m *StrType) GetVal() string {
+ if m != nil {
+ return m.Val
+ }
+ return ""
+}
+
+type IntType struct {
+ Val int64 `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *IntType) Reset() { *m = IntType{} }
+func (m *IntType) String() string { return proto.CompactTextString(m) }
+func (*IntType) ProtoMessage() {}
+func (*IntType) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{1}
+}
+
+func (m *IntType) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_IntType.Unmarshal(m, b)
+}
+func (m *IntType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_IntType.Marshal(b, m, deterministic)
+}
+func (m *IntType) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_IntType.Merge(m, src)
+}
+func (m *IntType) XXX_Size() int {
+ return xxx_messageInfo_IntType.Size(m)
+}
+func (m *IntType) XXX_DiscardUnknown() {
+ xxx_messageInfo_IntType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_IntType proto.InternalMessageInfo
+
+func (m *IntType) GetVal() int64 {
+ if m != nil {
+ return m.Val
+ }
+ return 0
+}
+
+type BoolType struct {
+ Val bool `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *BoolType) Reset() { *m = BoolType{} }
+func (m *BoolType) String() string { return proto.CompactTextString(m) }
+func (*BoolType) ProtoMessage() {}
+func (*BoolType) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{2}
+}
+
+func (m *BoolType) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_BoolType.Unmarshal(m, b)
+}
+func (m *BoolType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_BoolType.Marshal(b, m, deterministic)
+}
+func (m *BoolType) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_BoolType.Merge(m, src)
+}
+func (m *BoolType) XXX_Size() int {
+ return xxx_messageInfo_BoolType.Size(m)
+}
+func (m *BoolType) XXX_DiscardUnknown() {
+ xxx_messageInfo_BoolType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_BoolType proto.InternalMessageInfo
+
+func (m *BoolType) GetVal() bool {
+ if m != nil {
+ return m.Val
+ }
+ return false
+}
+
+type Packet struct {
+ Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Packet) Reset() { *m = Packet{} }
+func (m *Packet) String() string { return proto.CompactTextString(m) }
+func (*Packet) ProtoMessage() {}
+func (*Packet) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{3}
+}
+
+func (m *Packet) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Packet.Unmarshal(m, b)
+}
+func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Packet.Marshal(b, m, deterministic)
+}
+func (m *Packet) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Packet.Merge(m, src)
+}
+func (m *Packet) XXX_Size() int {
+ return xxx_messageInfo_Packet.Size(m)
+}
+func (m *Packet) XXX_DiscardUnknown() {
+ xxx_messageInfo_Packet.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Packet proto.InternalMessageInfo
+
+func (m *Packet) GetPayload() []byte {
+ if m != nil {
+ return m.Payload
+ }
+ return nil
+}
+
+type ErrorCode struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ErrorCode) Reset() { *m = ErrorCode{} }
+func (m *ErrorCode) String() string { return proto.CompactTextString(m) }
+func (*ErrorCode) ProtoMessage() {}
+func (*ErrorCode) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{4}
+}
+
+func (m *ErrorCode) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ErrorCode.Unmarshal(m, b)
+}
+func (m *ErrorCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ErrorCode.Marshal(b, m, deterministic)
+}
+func (m *ErrorCode) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ErrorCode.Merge(m, src)
+}
+func (m *ErrorCode) XXX_Size() int {
+ return xxx_messageInfo_ErrorCode.Size(m)
+}
+func (m *ErrorCode) XXX_DiscardUnknown() {
+ xxx_messageInfo_ErrorCode.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ErrorCode proto.InternalMessageInfo
+
+type Error struct {
+ Code *ErrorCode `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
+ Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Error) Reset() { *m = Error{} }
+func (m *Error) String() string { return proto.CompactTextString(m) }
+func (*Error) ProtoMessage() {}
+func (*Error) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{5}
+}
+
+func (m *Error) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Error.Unmarshal(m, b)
+}
+func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Error.Marshal(b, m, deterministic)
+}
+func (m *Error) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Error.Merge(m, src)
+}
+func (m *Error) XXX_Size() int {
+ return xxx_messageInfo_Error.Size(m)
+}
+func (m *Error) XXX_DiscardUnknown() {
+ xxx_messageInfo_Error.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Error proto.InternalMessageInfo
+
+func (m *Error) GetCode() *ErrorCode {
+ if m != nil {
+ return m.Code
+ }
+ return nil
+}
+
+func (m *Error) GetReason() string {
+ if m != nil {
+ return m.Reason
+ }
+ return ""
+}
+
+type Header struct {
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Type MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=voltha.MessageType" json:"type,omitempty"`
+ FromTopic string `protobuf:"bytes,3,opt,name=from_topic,json=fromTopic,proto3" json:"from_topic,omitempty"`
+ ToTopic string `protobuf:"bytes,4,opt,name=to_topic,json=toTopic,proto3" json:"to_topic,omitempty"`
+ KeyTopic string `protobuf:"bytes,5,opt,name=key_topic,json=keyTopic,proto3" json:"key_topic,omitempty"`
+ Timestamp int64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Header) Reset() { *m = Header{} }
+func (m *Header) String() string { return proto.CompactTextString(m) }
+func (*Header) ProtoMessage() {}
+func (*Header) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{6}
+}
+
+func (m *Header) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Header.Unmarshal(m, b)
+}
+func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Header.Marshal(b, m, deterministic)
+}
+func (m *Header) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Header.Merge(m, src)
+}
+func (m *Header) XXX_Size() int {
+ return xxx_messageInfo_Header.Size(m)
+}
+func (m *Header) XXX_DiscardUnknown() {
+ xxx_messageInfo_Header.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Header proto.InternalMessageInfo
+
+func (m *Header) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *Header) GetType() MessageType {
+ if m != nil {
+ return m.Type
+ }
+ return MessageType_REQUEST
+}
+
+func (m *Header) GetFromTopic() string {
+ if m != nil {
+ return m.FromTopic
+ }
+ return ""
+}
+
+func (m *Header) GetToTopic() string {
+ if m != nil {
+ return m.ToTopic
+ }
+ return ""
+}
+
+func (m *Header) GetKeyTopic() string {
+ if m != nil {
+ return m.KeyTopic
+ }
+ return ""
+}
+
+func (m *Header) GetTimestamp() int64 {
+ if m != nil {
+ return m.Timestamp
+ }
+ return 0
+}
+
+type Argument struct {
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ Value *any.Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Argument) Reset() { *m = Argument{} }
+func (m *Argument) String() string { return proto.CompactTextString(m) }
+func (*Argument) ProtoMessage() {}
+func (*Argument) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{7}
+}
+
+func (m *Argument) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Argument.Unmarshal(m, b)
+}
+func (m *Argument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Argument.Marshal(b, m, deterministic)
+}
+func (m *Argument) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Argument.Merge(m, src)
+}
+func (m *Argument) XXX_Size() int {
+ return xxx_messageInfo_Argument.Size(m)
+}
+func (m *Argument) XXX_DiscardUnknown() {
+ xxx_messageInfo_Argument.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Argument proto.InternalMessageInfo
+
+func (m *Argument) GetKey() string {
+ if m != nil {
+ return m.Key
+ }
+ return ""
+}
+
+func (m *Argument) GetValue() *any.Any {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+type InterContainerMessage struct {
+ Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
+ Body *any.Any `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InterContainerMessage) Reset() { *m = InterContainerMessage{} }
+func (m *InterContainerMessage) String() string { return proto.CompactTextString(m) }
+func (*InterContainerMessage) ProtoMessage() {}
+func (*InterContainerMessage) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{8}
+}
+
+func (m *InterContainerMessage) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InterContainerMessage.Unmarshal(m, b)
+}
+func (m *InterContainerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InterContainerMessage.Marshal(b, m, deterministic)
+}
+func (m *InterContainerMessage) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InterContainerMessage.Merge(m, src)
+}
+func (m *InterContainerMessage) XXX_Size() int {
+ return xxx_messageInfo_InterContainerMessage.Size(m)
+}
+func (m *InterContainerMessage) XXX_DiscardUnknown() {
+ xxx_messageInfo_InterContainerMessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterContainerMessage proto.InternalMessageInfo
+
+func (m *InterContainerMessage) GetHeader() *Header {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *InterContainerMessage) GetBody() *any.Any {
+ if m != nil {
+ return m.Body
+ }
+ return nil
+}
+
+type InterContainerRequestBody struct {
+ Rpc string `protobuf:"bytes,2,opt,name=rpc,proto3" json:"rpc,omitempty"`
+ Args []*Argument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
+ ResponseRequired bool `protobuf:"varint,4,opt,name=response_required,json=responseRequired,proto3" json:"response_required,omitempty"`
+ ReplyToTopic string `protobuf:"bytes,5,opt,name=reply_to_topic,json=replyToTopic,proto3" json:"reply_to_topic,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InterContainerRequestBody) Reset() { *m = InterContainerRequestBody{} }
+func (m *InterContainerRequestBody) String() string { return proto.CompactTextString(m) }
+func (*InterContainerRequestBody) ProtoMessage() {}
+func (*InterContainerRequestBody) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{9}
+}
+
+func (m *InterContainerRequestBody) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InterContainerRequestBody.Unmarshal(m, b)
+}
+func (m *InterContainerRequestBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InterContainerRequestBody.Marshal(b, m, deterministic)
+}
+func (m *InterContainerRequestBody) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InterContainerRequestBody.Merge(m, src)
+}
+func (m *InterContainerRequestBody) XXX_Size() int {
+ return xxx_messageInfo_InterContainerRequestBody.Size(m)
+}
+func (m *InterContainerRequestBody) XXX_DiscardUnknown() {
+ xxx_messageInfo_InterContainerRequestBody.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterContainerRequestBody proto.InternalMessageInfo
+
+func (m *InterContainerRequestBody) GetRpc() string {
+ if m != nil {
+ return m.Rpc
+ }
+ return ""
+}
+
+func (m *InterContainerRequestBody) GetArgs() []*Argument {
+ if m != nil {
+ return m.Args
+ }
+ return nil
+}
+
+func (m *InterContainerRequestBody) GetResponseRequired() bool {
+ if m != nil {
+ return m.ResponseRequired
+ }
+ return false
+}
+
+func (m *InterContainerRequestBody) GetReplyToTopic() string {
+ if m != nil {
+ return m.ReplyToTopic
+ }
+ return ""
+}
+
+type InterContainerResponseBody struct {
+ Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
+ Result *any.Any `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InterContainerResponseBody) Reset() { *m = InterContainerResponseBody{} }
+func (m *InterContainerResponseBody) String() string { return proto.CompactTextString(m) }
+func (*InterContainerResponseBody) ProtoMessage() {}
+func (*InterContainerResponseBody) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{10}
+}
+
+func (m *InterContainerResponseBody) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InterContainerResponseBody.Unmarshal(m, b)
+}
+func (m *InterContainerResponseBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InterContainerResponseBody.Marshal(b, m, deterministic)
+}
+func (m *InterContainerResponseBody) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InterContainerResponseBody.Merge(m, src)
+}
+func (m *InterContainerResponseBody) XXX_Size() int {
+ return xxx_messageInfo_InterContainerResponseBody.Size(m)
+}
+func (m *InterContainerResponseBody) XXX_DiscardUnknown() {
+ xxx_messageInfo_InterContainerResponseBody.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterContainerResponseBody proto.InternalMessageInfo
+
+func (m *InterContainerResponseBody) GetSuccess() bool {
+ if m != nil {
+ return m.Success
+ }
+ return false
+}
+
+func (m *InterContainerResponseBody) GetResult() *any.Any {
+ if m != nil {
+ return m.Result
+ }
+ return nil
+}
+
+type SwitchCapability struct {
+ Desc *openflow_13.OfpDesc `protobuf:"bytes,1,opt,name=desc,proto3" json:"desc,omitempty"`
+ SwitchFeatures *openflow_13.OfpSwitchFeatures `protobuf:"bytes,2,opt,name=switch_features,json=switchFeatures,proto3" json:"switch_features,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *SwitchCapability) Reset() { *m = SwitchCapability{} }
+func (m *SwitchCapability) String() string { return proto.CompactTextString(m) }
+func (*SwitchCapability) ProtoMessage() {}
+func (*SwitchCapability) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{11}
+}
+
+func (m *SwitchCapability) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_SwitchCapability.Unmarshal(m, b)
+}
+func (m *SwitchCapability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_SwitchCapability.Marshal(b, m, deterministic)
+}
+func (m *SwitchCapability) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SwitchCapability.Merge(m, src)
+}
+func (m *SwitchCapability) XXX_Size() int {
+ return xxx_messageInfo_SwitchCapability.Size(m)
+}
+func (m *SwitchCapability) XXX_DiscardUnknown() {
+ xxx_messageInfo_SwitchCapability.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SwitchCapability proto.InternalMessageInfo
+
+func (m *SwitchCapability) GetDesc() *openflow_13.OfpDesc {
+ if m != nil {
+ return m.Desc
+ }
+ return nil
+}
+
+func (m *SwitchCapability) GetSwitchFeatures() *openflow_13.OfpSwitchFeatures {
+ if m != nil {
+ return m.SwitchFeatures
+ }
+ return nil
+}
+
+type PortCapability struct {
+ Port *voltha.LogicalPort `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *PortCapability) Reset() { *m = PortCapability{} }
+func (m *PortCapability) String() string { return proto.CompactTextString(m) }
+func (*PortCapability) ProtoMessage() {}
+func (*PortCapability) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{12}
+}
+
+func (m *PortCapability) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_PortCapability.Unmarshal(m, b)
+}
+func (m *PortCapability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_PortCapability.Marshal(b, m, deterministic)
+}
+func (m *PortCapability) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PortCapability.Merge(m, src)
+}
+func (m *PortCapability) XXX_Size() int {
+ return xxx_messageInfo_PortCapability.Size(m)
+}
+func (m *PortCapability) XXX_DiscardUnknown() {
+ xxx_messageInfo_PortCapability.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PortCapability proto.InternalMessageInfo
+
+func (m *PortCapability) GetPort() *voltha.LogicalPort {
+ if m != nil {
+ return m.Port
+ }
+ return nil
+}
+
+type DeviceDiscovered struct {
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ParentId string `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
+ DeviceType string `protobuf:"bytes,3,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"`
+ Publisher string `protobuf:"bytes,4,opt,name=publisher,proto3" json:"publisher,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *DeviceDiscovered) Reset() { *m = DeviceDiscovered{} }
+func (m *DeviceDiscovered) String() string { return proto.CompactTextString(m) }
+func (*DeviceDiscovered) ProtoMessage() {}
+func (*DeviceDiscovered) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{13}
+}
+
+func (m *DeviceDiscovered) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DeviceDiscovered.Unmarshal(m, b)
+}
+func (m *DeviceDiscovered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DeviceDiscovered.Marshal(b, m, deterministic)
+}
+func (m *DeviceDiscovered) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceDiscovered.Merge(m, src)
+}
+func (m *DeviceDiscovered) XXX_Size() int {
+ return xxx_messageInfo_DeviceDiscovered.Size(m)
+}
+func (m *DeviceDiscovered) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceDiscovered.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceDiscovered proto.InternalMessageInfo
+
+func (m *DeviceDiscovered) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *DeviceDiscovered) GetParentId() string {
+ if m != nil {
+ return m.ParentId
+ }
+ return ""
+}
+
+func (m *DeviceDiscovered) GetDeviceType() string {
+ if m != nil {
+ return m.DeviceType
+ }
+ return ""
+}
+
+func (m *DeviceDiscovered) GetPublisher() string {
+ if m != nil {
+ return m.Publisher
+ }
+ return ""
+}
+
+type InterAdapterMessageType struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InterAdapterMessageType) Reset() { *m = InterAdapterMessageType{} }
+func (m *InterAdapterMessageType) String() string { return proto.CompactTextString(m) }
+func (*InterAdapterMessageType) ProtoMessage() {}
+func (*InterAdapterMessageType) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{14}
+}
+
+func (m *InterAdapterMessageType) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InterAdapterMessageType.Unmarshal(m, b)
+}
+func (m *InterAdapterMessageType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InterAdapterMessageType.Marshal(b, m, deterministic)
+}
+func (m *InterAdapterMessageType) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InterAdapterMessageType.Merge(m, src)
+}
+func (m *InterAdapterMessageType) XXX_Size() int {
+ return xxx_messageInfo_InterAdapterMessageType.Size(m)
+}
+func (m *InterAdapterMessageType) XXX_DiscardUnknown() {
+ xxx_messageInfo_InterAdapterMessageType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterAdapterMessageType proto.InternalMessageInfo
+
+type InterAdapterHeader struct {
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Type InterAdapterMessageType_Types `protobuf:"varint,2,opt,name=type,proto3,enum=voltha.InterAdapterMessageType_Types" json:"type,omitempty"`
+ FromTopic string `protobuf:"bytes,3,opt,name=from_topic,json=fromTopic,proto3" json:"from_topic,omitempty"`
+ ToTopic string `protobuf:"bytes,4,opt,name=to_topic,json=toTopic,proto3" json:"to_topic,omitempty"`
+ ToDeviceId string `protobuf:"bytes,5,opt,name=to_device_id,json=toDeviceId,proto3" json:"to_device_id,omitempty"`
+ ProxyDeviceId string `protobuf:"bytes,6,opt,name=proxy_device_id,json=proxyDeviceId,proto3" json:"proxy_device_id,omitempty"`
+ Timestamp int64 `protobuf:"varint,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InterAdapterHeader) Reset() { *m = InterAdapterHeader{} }
+func (m *InterAdapterHeader) String() string { return proto.CompactTextString(m) }
+func (*InterAdapterHeader) ProtoMessage() {}
+func (*InterAdapterHeader) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{15}
+}
+
+func (m *InterAdapterHeader) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InterAdapterHeader.Unmarshal(m, b)
+}
+func (m *InterAdapterHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InterAdapterHeader.Marshal(b, m, deterministic)
+}
+func (m *InterAdapterHeader) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InterAdapterHeader.Merge(m, src)
+}
+func (m *InterAdapterHeader) XXX_Size() int {
+ return xxx_messageInfo_InterAdapterHeader.Size(m)
+}
+func (m *InterAdapterHeader) XXX_DiscardUnknown() {
+ xxx_messageInfo_InterAdapterHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterAdapterHeader proto.InternalMessageInfo
+
+func (m *InterAdapterHeader) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *InterAdapterHeader) GetType() InterAdapterMessageType_Types {
+ if m != nil {
+ return m.Type
+ }
+ return InterAdapterMessageType_FLOW_REQUEST
+}
+
+func (m *InterAdapterHeader) GetFromTopic() string {
+ if m != nil {
+ return m.FromTopic
+ }
+ return ""
+}
+
+func (m *InterAdapterHeader) GetToTopic() string {
+ if m != nil {
+ return m.ToTopic
+ }
+ return ""
+}
+
+func (m *InterAdapterHeader) GetToDeviceId() string {
+ if m != nil {
+ return m.ToDeviceId
+ }
+ return ""
+}
+
+func (m *InterAdapterHeader) GetProxyDeviceId() string {
+ if m != nil {
+ return m.ProxyDeviceId
+ }
+ return ""
+}
+
+func (m *InterAdapterHeader) GetTimestamp() int64 {
+ if m != nil {
+ return m.Timestamp
+ }
+ return 0
+}
+
+type InterAdapterOmciMessage struct {
+ Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InterAdapterOmciMessage) Reset() { *m = InterAdapterOmciMessage{} }
+func (m *InterAdapterOmciMessage) String() string { return proto.CompactTextString(m) }
+func (*InterAdapterOmciMessage) ProtoMessage() {}
+func (*InterAdapterOmciMessage) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{16}
+}
+
+func (m *InterAdapterOmciMessage) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InterAdapterOmciMessage.Unmarshal(m, b)
+}
+func (m *InterAdapterOmciMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InterAdapterOmciMessage.Marshal(b, m, deterministic)
+}
+func (m *InterAdapterOmciMessage) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InterAdapterOmciMessage.Merge(m, src)
+}
+func (m *InterAdapterOmciMessage) XXX_Size() int {
+ return xxx_messageInfo_InterAdapterOmciMessage.Size(m)
+}
+func (m *InterAdapterOmciMessage) XXX_DiscardUnknown() {
+ xxx_messageInfo_InterAdapterOmciMessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterAdapterOmciMessage proto.InternalMessageInfo
+
+func (m *InterAdapterOmciMessage) GetMessage() []byte {
+ if m != nil {
+ return m.Message
+ }
+ return nil
+}
+
+type InterAdapterResponseBody struct {
+ Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
+ // Types that are valid to be assigned to Payload:
+ // *InterAdapterResponseBody_Body
+ // *InterAdapterResponseBody_Omci
+ Payload isInterAdapterResponseBody_Payload `protobuf_oneof:"payload"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InterAdapterResponseBody) Reset() { *m = InterAdapterResponseBody{} }
+func (m *InterAdapterResponseBody) String() string { return proto.CompactTextString(m) }
+func (*InterAdapterResponseBody) ProtoMessage() {}
+func (*InterAdapterResponseBody) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{17}
+}
+
+func (m *InterAdapterResponseBody) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InterAdapterResponseBody.Unmarshal(m, b)
+}
+func (m *InterAdapterResponseBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InterAdapterResponseBody.Marshal(b, m, deterministic)
+}
+func (m *InterAdapterResponseBody) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InterAdapterResponseBody.Merge(m, src)
+}
+func (m *InterAdapterResponseBody) XXX_Size() int {
+ return xxx_messageInfo_InterAdapterResponseBody.Size(m)
+}
+func (m *InterAdapterResponseBody) XXX_DiscardUnknown() {
+ xxx_messageInfo_InterAdapterResponseBody.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterAdapterResponseBody proto.InternalMessageInfo
+
+func (m *InterAdapterResponseBody) GetStatus() bool {
+ if m != nil {
+ return m.Status
+ }
+ return false
+}
+
+type isInterAdapterResponseBody_Payload interface {
+ isInterAdapterResponseBody_Payload()
+}
+
+type InterAdapterResponseBody_Body struct {
+ Body *any.Any `protobuf:"bytes,2,opt,name=body,proto3,oneof"`
+}
+
+type InterAdapterResponseBody_Omci struct {
+ Omci *InterAdapterOmciMessage `protobuf:"bytes,3,opt,name=omci,proto3,oneof"`
+}
+
+func (*InterAdapterResponseBody_Body) isInterAdapterResponseBody_Payload() {}
+
+func (*InterAdapterResponseBody_Omci) isInterAdapterResponseBody_Payload() {}
+
+func (m *InterAdapterResponseBody) GetPayload() isInterAdapterResponseBody_Payload {
+ if m != nil {
+ return m.Payload
+ }
+ return nil
+}
+
+func (m *InterAdapterResponseBody) GetBody() *any.Any {
+ if x, ok := m.GetPayload().(*InterAdapterResponseBody_Body); ok {
+ return x.Body
+ }
+ return nil
+}
+
+func (m *InterAdapterResponseBody) GetOmci() *InterAdapterOmciMessage {
+ if x, ok := m.GetPayload().(*InterAdapterResponseBody_Omci); ok {
+ return x.Omci
+ }
+ return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*InterAdapterResponseBody) XXX_OneofWrappers() []interface{} {
+ return []interface{}{
+ (*InterAdapterResponseBody_Body)(nil),
+ (*InterAdapterResponseBody_Omci)(nil),
+ }
+}
+
+type InterAdapterMessage struct {
+ Header *InterAdapterHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
+ Body *any.Any `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *InterAdapterMessage) Reset() { *m = InterAdapterMessage{} }
+func (m *InterAdapterMessage) String() string { return proto.CompactTextString(m) }
+func (*InterAdapterMessage) ProtoMessage() {}
+func (*InterAdapterMessage) Descriptor() ([]byte, []int) {
+ return fileDescriptor_941f0031a549667f, []int{18}
+}
+
+func (m *InterAdapterMessage) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_InterAdapterMessage.Unmarshal(m, b)
+}
+func (m *InterAdapterMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_InterAdapterMessage.Marshal(b, m, deterministic)
+}
+func (m *InterAdapterMessage) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InterAdapterMessage.Merge(m, src)
+}
+func (m *InterAdapterMessage) XXX_Size() int {
+ return xxx_messageInfo_InterAdapterMessage.Size(m)
+}
+func (m *InterAdapterMessage) XXX_DiscardUnknown() {
+ xxx_messageInfo_InterAdapterMessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterAdapterMessage proto.InternalMessageInfo
+
+func (m *InterAdapterMessage) GetHeader() *InterAdapterHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+func (m *InterAdapterMessage) GetBody() *any.Any {
+ if m != nil {
+ return m.Body
+ }
+ return nil
+}
+
+func init() {
+ proto.RegisterEnum("voltha.MessageType", MessageType_name, MessageType_value)
+ proto.RegisterEnum("voltha.ErrorCodeCodes", ErrorCodeCodes_name, ErrorCodeCodes_value)
+ proto.RegisterEnum("voltha.InterAdapterMessageType_Types", InterAdapterMessageType_Types_name, InterAdapterMessageType_Types_value)
+ proto.RegisterType((*StrType)(nil), "voltha.StrType")
+ proto.RegisterType((*IntType)(nil), "voltha.IntType")
+ proto.RegisterType((*BoolType)(nil), "voltha.BoolType")
+ proto.RegisterType((*Packet)(nil), "voltha.Packet")
+ proto.RegisterType((*ErrorCode)(nil), "voltha.ErrorCode")
+ proto.RegisterType((*Error)(nil), "voltha.Error")
+ proto.RegisterType((*Header)(nil), "voltha.Header")
+ proto.RegisterType((*Argument)(nil), "voltha.Argument")
+ proto.RegisterType((*InterContainerMessage)(nil), "voltha.InterContainerMessage")
+ proto.RegisterType((*InterContainerRequestBody)(nil), "voltha.InterContainerRequestBody")
+ proto.RegisterType((*InterContainerResponseBody)(nil), "voltha.InterContainerResponseBody")
+ proto.RegisterType((*SwitchCapability)(nil), "voltha.SwitchCapability")
+ proto.RegisterType((*PortCapability)(nil), "voltha.PortCapability")
+ proto.RegisterType((*DeviceDiscovered)(nil), "voltha.DeviceDiscovered")
+ proto.RegisterType((*InterAdapterMessageType)(nil), "voltha.InterAdapterMessageType")
+ proto.RegisterType((*InterAdapterHeader)(nil), "voltha.InterAdapterHeader")
+ proto.RegisterType((*InterAdapterOmciMessage)(nil), "voltha.InterAdapterOmciMessage")
+ proto.RegisterType((*InterAdapterResponseBody)(nil), "voltha.InterAdapterResponseBody")
+ proto.RegisterType((*InterAdapterMessage)(nil), "voltha.InterAdapterMessage")
+}
+
+func init() {
+ proto.RegisterFile("voltha_protos/inter_container.proto", fileDescriptor_941f0031a549667f)
+}
+
+var fileDescriptor_941f0031a549667f = []byte{
+ // 1061 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdb, 0x6e, 0xe3, 0x44,
+ 0x18, 0xde, 0x9c, 0x93, 0x3f, 0xdd, 0x34, 0x9d, 0x6e, 0xbb, 0xe9, 0x01, 0xb5, 0x32, 0x7b, 0x28,
+ 0x05, 0x52, 0xd1, 0x02, 0x62, 0xaf, 0x50, 0x9a, 0xb8, 0xaa, 0xa5, 0xb6, 0x09, 0x4e, 0x5a, 0x24,
+ 0x6e, 0x2c, 0xc7, 0x9e, 0xa6, 0x56, 0x9d, 0x8c, 0x77, 0x66, 0xdc, 0xc5, 0x37, 0x48, 0xdc, 0xf1,
+ 0x18, 0x5c, 0xc1, 0x1b, 0xf0, 0x02, 0xbc, 0x18, 0x9a, 0x83, 0x73, 0xa2, 0x05, 0x09, 0xee, 0x66,
+ 0xbe, 0xef, 0x9b, 0xd3, 0x7f, 0xf8, 0x6c, 0xf8, 0xf8, 0x81, 0x84, 0xfc, 0xce, 0x75, 0x22, 0x4a,
+ 0x38, 0x61, 0x47, 0xc1, 0x84, 0x63, 0xea, 0x78, 0x64, 0xc2, 0xdd, 0x60, 0x82, 0x69, 0x53, 0xc2,
+ 0xa8, 0xa8, 0x44, 0xdb, 0x5b, 0x23, 0x42, 0x46, 0x21, 0x3e, 0x92, 0xe8, 0x30, 0xbe, 0x3d, 0x72,
+ 0x27, 0x89, 0x92, 0x6c, 0xef, 0x2d, 0xee, 0x43, 0x22, 0x3c, 0xb9, 0x0d, 0xc9, 0x07, 0xe7, 0x8b,
+ 0x13, 0x2d, 0x30, 0x16, 0x05, 0x21, 0x19, 0x05, 0x9e, 0x1b, 0x3a, 0x3e, 0x7e, 0x08, 0x3c, 0xac,
+ 0x34, 0xc6, 0x0e, 0x94, 0xfa, 0x9c, 0x0e, 0x92, 0x08, 0xa3, 0x3a, 0xe4, 0x1e, 0xdc, 0xb0, 0x91,
+ 0xd9, 0xcf, 0x1c, 0x54, 0x6c, 0x31, 0x14, 0xa4, 0x35, 0xe1, 0xcb, 0x64, 0x4e, 0x91, 0xbb, 0x50,
+ 0x3e, 0x25, 0x24, 0x5c, 0x66, 0xcb, 0x8a, 0x35, 0xa0, 0xd8, 0x73, 0xbd, 0x7b, 0xcc, 0x51, 0x03,
+ 0x4a, 0x91, 0x9b, 0x84, 0xc4, 0xf5, 0x25, 0xbf, 0x62, 0xa7, 0x53, 0xc3, 0x84, 0x8a, 0x49, 0x29,
+ 0xa1, 0x6d, 0xe2, 0x63, 0xe3, 0x1b, 0x28, 0x78, 0xc4, 0xc7, 0x0c, 0xbd, 0x84, 0xf5, 0xeb, 0xab,
+ 0xfe, 0x75, 0xaf, 0xd7, 0xb5, 0x07, 0x66, 0xc7, 0xb1, 0xcd, 0xef, 0xae, 0xcd, 0xfe, 0xa0, 0xfe,
+ 0x0c, 0x6d, 0x02, 0xb2, 0xae, 0x6e, 0x5a, 0x17, 0x56, 0xc7, 0xe9, 0xb5, 0xec, 0xd6, 0xa5, 0x39,
+ 0x30, 0xed, 0x7e, 0x3d, 0x63, 0x9c, 0x41, 0x41, 0x6e, 0x83, 0x5e, 0x43, 0x5e, 0x6c, 0x21, 0x8f,
+ 0xa9, 0x1e, 0xaf, 0x35, 0xd5, 0xf3, 0x9b, 0xd3, 0x33, 0x6c, 0x49, 0xa3, 0x4d, 0x28, 0x52, 0xec,
+ 0x32, 0x32, 0x69, 0x64, 0xe5, 0x53, 0xf5, 0xcc, 0xf8, 0x23, 0x03, 0xc5, 0x73, 0xec, 0xfa, 0x98,
+ 0xa2, 0x1a, 0x64, 0x03, 0x5f, 0x47, 0x22, 0x1b, 0xf8, 0xe8, 0x2d, 0xe4, 0x79, 0x12, 0x61, 0xb9,
+ 0xa0, 0x76, 0xbc, 0x9e, 0xee, 0x7c, 0x89, 0x19, 0x73, 0x47, 0x58, 0x84, 0xc0, 0x96, 0x02, 0xf4,
+ 0x11, 0xc0, 0x2d, 0x25, 0x63, 0x87, 0x93, 0x28, 0xf0, 0x1a, 0x39, 0xb9, 0x41, 0x45, 0x20, 0x03,
+ 0x01, 0xa0, 0x2d, 0x28, 0x73, 0xa2, 0xc9, 0xbc, 0x24, 0x4b, 0x9c, 0x28, 0x6a, 0x07, 0x2a, 0xf7,
+ 0x38, 0xd1, 0x5c, 0x41, 0x72, 0xe5, 0x7b, 0x9c, 0x28, 0x72, 0x17, 0x2a, 0x3c, 0x18, 0x63, 0xc6,
+ 0xdd, 0x71, 0xd4, 0x28, 0xca, 0x1c, 0xcc, 0x00, 0xe3, 0x1c, 0xca, 0x2d, 0x3a, 0x8a, 0xc7, 0x78,
+ 0xc2, 0x45, 0x26, 0xee, 0x71, 0x92, 0x26, 0xf1, 0x1e, 0x27, 0xe8, 0x10, 0x0a, 0x0f, 0x6e, 0x18,
+ 0xab, 0xcb, 0x57, 0x8f, 0x5f, 0x34, 0x55, 0x45, 0x35, 0xd3, 0x8a, 0x6a, 0xb6, 0x26, 0x89, 0xad,
+ 0x24, 0x46, 0x00, 0x1b, 0x96, 0x28, 0xc7, 0x76, 0x5a, 0x8d, 0xfa, 0x85, 0xe8, 0x0d, 0x14, 0xef,
+ 0x64, 0x68, 0x74, 0x70, 0x6b, 0x69, 0x08, 0x54, 0xc0, 0x6c, 0xcd, 0xa2, 0x03, 0xc8, 0x0f, 0x89,
+ 0x9f, 0xfc, 0xe3, 0x59, 0x52, 0x61, 0xfc, 0x96, 0x81, 0xad, 0xc5, 0xb3, 0x6c, 0xfc, 0x3e, 0xc6,
+ 0x8c, 0x9f, 0x12, 0x3f, 0x11, 0xcf, 0xa0, 0x91, 0xa7, 0x13, 0x24, 0x86, 0xe8, 0x15, 0xe4, 0x5d,
+ 0x3a, 0x62, 0x8d, 0xdc, 0x7e, 0xee, 0xa0, 0x7a, 0x5c, 0x4f, 0xcf, 0x4f, 0x1f, 0x6e, 0x4b, 0x16,
+ 0x7d, 0x0a, 0x6b, 0x14, 0xb3, 0x88, 0x4c, 0x18, 0x76, 0x28, 0x7e, 0x1f, 0x07, 0x14, 0xfb, 0x32,
+ 0xd2, 0x65, 0xbb, 0x9e, 0x12, 0xb6, 0xc6, 0xd1, 0x2b, 0xa8, 0x51, 0x1c, 0x85, 0x22, 0xe8, 0x0b,
+ 0x71, 0x5f, 0x91, 0xe8, 0x40, 0x25, 0xc6, 0xf0, 0x61, 0x7b, 0xf9, 0x9e, 0x6a, 0x1f, 0x79, 0xd1,
+ 0x06, 0x94, 0x58, 0xec, 0x79, 0x98, 0x31, 0x5d, 0xfd, 0xe9, 0x14, 0x7d, 0x26, 0xca, 0x8c, 0xc5,
+ 0x21, 0x97, 0x65, 0xf0, 0x54, 0x30, 0xb4, 0xc6, 0xf8, 0x25, 0x03, 0xf5, 0xfe, 0x87, 0x80, 0x7b,
+ 0x77, 0x6d, 0x37, 0x72, 0x87, 0x41, 0x18, 0xf0, 0x04, 0x7d, 0x02, 0x79, 0x1f, 0x33, 0x4f, 0xc7,
+ 0x7c, 0xa3, 0x39, 0xdf, 0xe2, 0xe4, 0x36, 0x72, 0x04, 0x69, 0x4b, 0x09, 0xb2, 0x60, 0x95, 0xc9,
+ 0xe5, 0xce, 0x2d, 0x76, 0x79, 0x4c, 0x31, 0xd3, 0x39, 0xd8, 0xff, 0xdb, 0xaa, 0x25, 0x9d, 0x5d,
+ 0x53, 0xc0, 0x99, 0x9e, 0x1b, 0xef, 0xa0, 0xd6, 0x23, 0x94, 0xcf, 0xdd, 0xe3, 0x2d, 0xe4, 0x23,
+ 0x42, 0xb9, 0xbe, 0xc7, 0xb4, 0xfc, 0x2f, 0x94, 0xa1, 0x08, 0xb1, 0x2d, 0x05, 0xc6, 0x4f, 0x50,
+ 0xef, 0x48, 0x77, 0xe9, 0x04, 0xcc, 0x23, 0x0f, 0x58, 0x44, 0x79, 0xb9, 0x97, 0x76, 0xa0, 0x12,
+ 0xb9, 0x14, 0x4f, 0xb8, 0x13, 0xf8, 0x3a, 0xc1, 0x65, 0x05, 0x58, 0x3e, 0xda, 0x83, 0xaa, 0xb2,
+ 0x27, 0x47, 0xf6, 0x9b, 0x6a, 0x20, 0x50, 0x90, 0x74, 0x9a, 0x5d, 0xa8, 0x44, 0xf1, 0x30, 0x0c,
+ 0xd8, 0x1d, 0xa6, 0xba, 0x85, 0x66, 0x80, 0xf1, 0x67, 0x06, 0x5e, 0xca, 0x64, 0xb5, 0x7c, 0x37,
+ 0xe2, 0xd3, 0xf2, 0x15, 0x2b, 0x8d, 0xdf, 0x33, 0x50, 0x10, 0x03, 0x86, 0xea, 0xb0, 0x72, 0x76,
+ 0xd1, 0xfd, 0x7e, 0xce, 0x5a, 0xd6, 0xe0, 0xb9, 0x46, 0xfa, 0xbd, 0xee, 0x55, 0xdf, 0xac, 0x67,
+ 0x84, 0xa8, 0x7b, 0xd9, 0xb6, 0xa6, 0xa2, 0xac, 0x10, 0x69, 0x44, 0x8b, 0x72, 0x68, 0x1d, 0x56,
+ 0x2f, 0xcd, 0x81, 0x6d, 0xb5, 0xfb, 0x53, 0x5d, 0x1e, 0xbd, 0x80, 0xfa, 0x0c, 0xd4, 0xd2, 0x82,
+ 0x90, 0x76, 0xaf, 0xae, 0x1d, 0xeb, 0x6a, 0x66, 0x69, 0x45, 0x21, 0x9d, 0x81, 0x5a, 0x5a, 0x32,
+ 0x7e, 0xce, 0x02, 0x9a, 0x7f, 0xc5, 0x13, 0xa6, 0xf4, 0x6e, 0xc1, 0x94, 0x5e, 0xa7, 0x59, 0x79,
+ 0xe2, 0xfd, 0x4d, 0xf9, 0xf6, 0xff, 0x6d, 0x53, 0xfb, 0xb0, 0xc2, 0x89, 0xfe, 0x84, 0x88, 0x04,
+ 0xaa, 0x8e, 0x01, 0x4e, 0x54, 0xde, 0x2d, 0x1f, 0xbd, 0x81, 0xd5, 0x88, 0x92, 0x1f, 0x93, 0x39,
+ 0x51, 0x51, 0x8a, 0x9e, 0x4b, 0x78, 0xaa, 0x5b, 0xf0, 0xb4, 0xd2, 0xb2, 0xa7, 0x9d, 0x2c, 0x26,
+ 0xb2, 0x3b, 0xf6, 0x82, 0xd4, 0x8b, 0x1a, 0x50, 0x1a, 0xab, 0x61, 0xfa, 0x41, 0xd1, 0x53, 0xe3,
+ 0xd7, 0x0c, 0x34, 0xe6, 0x57, 0x2d, 0x74, 0xea, 0x26, 0x14, 0x19, 0x77, 0x79, 0x9c, 0x36, 0xaa,
+ 0x9e, 0xa1, 0xc3, 0x7f, 0xb7, 0xac, 0xf3, 0x67, 0xca, 0xb4, 0xd0, 0x57, 0x90, 0x27, 0x63, 0x2f,
+ 0xd0, 0x1d, 0xbd, 0xf7, 0x58, 0xc8, 0xe7, 0x6e, 0x2a, 0x96, 0x09, 0xf9, 0x69, 0x65, 0xfa, 0x09,
+ 0x34, 0x18, 0xac, 0x3f, 0x92, 0x20, 0x74, 0xbc, 0xe4, 0xaf, 0xdb, 0x8f, 0x6d, 0xfd, 0x5f, 0xbd,
+ 0xf6, 0xf0, 0x5b, 0xa8, 0xce, 0x55, 0x02, 0xaa, 0x42, 0x69, 0x56, 0xfa, 0x2b, 0x50, 0x9e, 0xab,
+ 0xfa, 0x0d, 0x58, 0xeb, 0x98, 0x37, 0x56, 0xdb, 0x74, 0x3a, 0x56, 0xbf, 0xdd, 0xbd, 0x31, 0x6d,
+ 0xb3, 0x53, 0xcf, 0x9e, 0x7e, 0xfd, 0xc3, 0x97, 0xa3, 0x80, 0xdf, 0xc5, 0xc3, 0xa6, 0x47, 0xc6,
+ 0xf2, 0x4f, 0xc3, 0x23, 0xd4, 0x3f, 0x52, 0x77, 0xfc, 0x5c, 0xff, 0x5f, 0x8c, 0xc8, 0xf2, 0xbf,
+ 0x4c, 0x2f, 0x3b, 0x2c, 0x4a, 0xf2, 0xe4, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x90, 0x60, 0x04,
+ 0xd3, 0xf5, 0x08, 0x00, 0x00,
+}
diff --git a/vendor/github.com/opencord/voltha-protos/go/omci/omci_alarm_db.pb.go b/vendor/github.com/opencord/voltha-protos/go/omci/omci_alarm_db.pb.go
new file mode 100644
index 0000000..82776b6
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-protos/go/omci/omci_alarm_db.pb.go
@@ -0,0 +1,516 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/omci_alarm_db.proto
+
+package omci
+
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ _ "github.com/opencord/voltha-protos/go/common"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type AlarmOpenOmciEventType_OpenOmciEventType int32
+
+const (
+ AlarmOpenOmciEventType_state_change AlarmOpenOmciEventType_OpenOmciEventType = 0
+)
+
+var AlarmOpenOmciEventType_OpenOmciEventType_name = map[int32]string{
+ 0: "state_change",
+}
+
+var AlarmOpenOmciEventType_OpenOmciEventType_value = map[string]int32{
+ "state_change": 0,
+}
+
+func (x AlarmOpenOmciEventType_OpenOmciEventType) String() string {
+ return proto.EnumName(AlarmOpenOmciEventType_OpenOmciEventType_name, int32(x))
+}
+
+func (AlarmOpenOmciEventType_OpenOmciEventType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_8d41f1e38aadb08d, []int{6, 0}
+}
+
+type AlarmAttributeData struct {
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AlarmAttributeData) Reset() { *m = AlarmAttributeData{} }
+func (m *AlarmAttributeData) String() string { return proto.CompactTextString(m) }
+func (*AlarmAttributeData) ProtoMessage() {}
+func (*AlarmAttributeData) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8d41f1e38aadb08d, []int{0}
+}
+
+func (m *AlarmAttributeData) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AlarmAttributeData.Unmarshal(m, b)
+}
+func (m *AlarmAttributeData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AlarmAttributeData.Marshal(b, m, deterministic)
+}
+func (m *AlarmAttributeData) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AlarmAttributeData.Merge(m, src)
+}
+func (m *AlarmAttributeData) XXX_Size() int {
+ return xxx_messageInfo_AlarmAttributeData.Size(m)
+}
+func (m *AlarmAttributeData) XXX_DiscardUnknown() {
+ xxx_messageInfo_AlarmAttributeData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmAttributeData proto.InternalMessageInfo
+
+func (m *AlarmAttributeData) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *AlarmAttributeData) GetValue() string {
+ if m != nil {
+ return m.Value
+ }
+ return ""
+}
+
+type AlarmInstanceData struct {
+ InstanceId uint32 `protobuf:"varint,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
+ Created string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
+ Modified string `protobuf:"bytes,3,opt,name=modified,proto3" json:"modified,omitempty"`
+ Attributes []*AlarmAttributeData `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AlarmInstanceData) Reset() { *m = AlarmInstanceData{} }
+func (m *AlarmInstanceData) String() string { return proto.CompactTextString(m) }
+func (*AlarmInstanceData) ProtoMessage() {}
+func (*AlarmInstanceData) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8d41f1e38aadb08d, []int{1}
+}
+
+func (m *AlarmInstanceData) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AlarmInstanceData.Unmarshal(m, b)
+}
+func (m *AlarmInstanceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AlarmInstanceData.Marshal(b, m, deterministic)
+}
+func (m *AlarmInstanceData) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AlarmInstanceData.Merge(m, src)
+}
+func (m *AlarmInstanceData) XXX_Size() int {
+ return xxx_messageInfo_AlarmInstanceData.Size(m)
+}
+func (m *AlarmInstanceData) XXX_DiscardUnknown() {
+ xxx_messageInfo_AlarmInstanceData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmInstanceData proto.InternalMessageInfo
+
+func (m *AlarmInstanceData) GetInstanceId() uint32 {
+ if m != nil {
+ return m.InstanceId
+ }
+ return 0
+}
+
+func (m *AlarmInstanceData) GetCreated() string {
+ if m != nil {
+ return m.Created
+ }
+ return ""
+}
+
+func (m *AlarmInstanceData) GetModified() string {
+ if m != nil {
+ return m.Modified
+ }
+ return ""
+}
+
+func (m *AlarmInstanceData) GetAttributes() []*AlarmAttributeData {
+ if m != nil {
+ return m.Attributes
+ }
+ return nil
+}
+
+type AlarmClassData struct {
+ ClassId uint32 `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
+ Instances []*AlarmInstanceData `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AlarmClassData) Reset() { *m = AlarmClassData{} }
+func (m *AlarmClassData) String() string { return proto.CompactTextString(m) }
+func (*AlarmClassData) ProtoMessage() {}
+func (*AlarmClassData) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8d41f1e38aadb08d, []int{2}
+}
+
+func (m *AlarmClassData) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AlarmClassData.Unmarshal(m, b)
+}
+func (m *AlarmClassData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AlarmClassData.Marshal(b, m, deterministic)
+}
+func (m *AlarmClassData) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AlarmClassData.Merge(m, src)
+}
+func (m *AlarmClassData) XXX_Size() int {
+ return xxx_messageInfo_AlarmClassData.Size(m)
+}
+func (m *AlarmClassData) XXX_DiscardUnknown() {
+ xxx_messageInfo_AlarmClassData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmClassData proto.InternalMessageInfo
+
+func (m *AlarmClassData) GetClassId() uint32 {
+ if m != nil {
+ return m.ClassId
+ }
+ return 0
+}
+
+func (m *AlarmClassData) GetInstances() []*AlarmInstanceData {
+ if m != nil {
+ return m.Instances
+ }
+ return nil
+}
+
+type AlarmManagedEntity struct {
+ ClassId uint32 `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AlarmManagedEntity) Reset() { *m = AlarmManagedEntity{} }
+func (m *AlarmManagedEntity) String() string { return proto.CompactTextString(m) }
+func (*AlarmManagedEntity) ProtoMessage() {}
+func (*AlarmManagedEntity) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8d41f1e38aadb08d, []int{3}
+}
+
+func (m *AlarmManagedEntity) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AlarmManagedEntity.Unmarshal(m, b)
+}
+func (m *AlarmManagedEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AlarmManagedEntity.Marshal(b, m, deterministic)
+}
+func (m *AlarmManagedEntity) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AlarmManagedEntity.Merge(m, src)
+}
+func (m *AlarmManagedEntity) XXX_Size() int {
+ return xxx_messageInfo_AlarmManagedEntity.Size(m)
+}
+func (m *AlarmManagedEntity) XXX_DiscardUnknown() {
+ xxx_messageInfo_AlarmManagedEntity.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmManagedEntity proto.InternalMessageInfo
+
+func (m *AlarmManagedEntity) GetClassId() uint32 {
+ if m != nil {
+ return m.ClassId
+ }
+ return 0
+}
+
+func (m *AlarmManagedEntity) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+type AlarmMessageType struct {
+ MessageType uint32 `protobuf:"varint,1,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AlarmMessageType) Reset() { *m = AlarmMessageType{} }
+func (m *AlarmMessageType) String() string { return proto.CompactTextString(m) }
+func (*AlarmMessageType) ProtoMessage() {}
+func (*AlarmMessageType) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8d41f1e38aadb08d, []int{4}
+}
+
+func (m *AlarmMessageType) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AlarmMessageType.Unmarshal(m, b)
+}
+func (m *AlarmMessageType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AlarmMessageType.Marshal(b, m, deterministic)
+}
+func (m *AlarmMessageType) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AlarmMessageType.Merge(m, src)
+}
+func (m *AlarmMessageType) XXX_Size() int {
+ return xxx_messageInfo_AlarmMessageType.Size(m)
+}
+func (m *AlarmMessageType) XXX_DiscardUnknown() {
+ xxx_messageInfo_AlarmMessageType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmMessageType proto.InternalMessageInfo
+
+func (m *AlarmMessageType) GetMessageType() uint32 {
+ if m != nil {
+ return m.MessageType
+ }
+ return 0
+}
+
+type AlarmDeviceData struct {
+ DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+ Created string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
+ LastAlarmSequence uint32 `protobuf:"varint,3,opt,name=last_alarm_sequence,json=lastAlarmSequence,proto3" json:"last_alarm_sequence,omitempty"`
+ LastSyncTime string `protobuf:"bytes,4,opt,name=last_sync_time,json=lastSyncTime,proto3" json:"last_sync_time,omitempty"`
+ Version uint32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
+ Classes []*AlarmClassData `protobuf:"bytes,6,rep,name=classes,proto3" json:"classes,omitempty"`
+ ManagedEntities []*AlarmManagedEntity `protobuf:"bytes,7,rep,name=managed_entities,json=managedEntities,proto3" json:"managed_entities,omitempty"`
+ MessageTypes []*AlarmMessageType `protobuf:"bytes,8,rep,name=message_types,json=messageTypes,proto3" json:"message_types,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AlarmDeviceData) Reset() { *m = AlarmDeviceData{} }
+func (m *AlarmDeviceData) String() string { return proto.CompactTextString(m) }
+func (*AlarmDeviceData) ProtoMessage() {}
+func (*AlarmDeviceData) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8d41f1e38aadb08d, []int{5}
+}
+
+func (m *AlarmDeviceData) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AlarmDeviceData.Unmarshal(m, b)
+}
+func (m *AlarmDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AlarmDeviceData.Marshal(b, m, deterministic)
+}
+func (m *AlarmDeviceData) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AlarmDeviceData.Merge(m, src)
+}
+func (m *AlarmDeviceData) XXX_Size() int {
+ return xxx_messageInfo_AlarmDeviceData.Size(m)
+}
+func (m *AlarmDeviceData) XXX_DiscardUnknown() {
+ xxx_messageInfo_AlarmDeviceData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmDeviceData proto.InternalMessageInfo
+
+func (m *AlarmDeviceData) GetDeviceId() string {
+ if m != nil {
+ return m.DeviceId
+ }
+ return ""
+}
+
+func (m *AlarmDeviceData) GetCreated() string {
+ if m != nil {
+ return m.Created
+ }
+ return ""
+}
+
+func (m *AlarmDeviceData) GetLastAlarmSequence() uint32 {
+ if m != nil {
+ return m.LastAlarmSequence
+ }
+ return 0
+}
+
+func (m *AlarmDeviceData) GetLastSyncTime() string {
+ if m != nil {
+ return m.LastSyncTime
+ }
+ return ""
+}
+
+func (m *AlarmDeviceData) GetVersion() uint32 {
+ if m != nil {
+ return m.Version
+ }
+ return 0
+}
+
+func (m *AlarmDeviceData) GetClasses() []*AlarmClassData {
+ if m != nil {
+ return m.Classes
+ }
+ return nil
+}
+
+func (m *AlarmDeviceData) GetManagedEntities() []*AlarmManagedEntity {
+ if m != nil {
+ return m.ManagedEntities
+ }
+ return nil
+}
+
+func (m *AlarmDeviceData) GetMessageTypes() []*AlarmMessageType {
+ if m != nil {
+ return m.MessageTypes
+ }
+ return nil
+}
+
+type AlarmOpenOmciEventType struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AlarmOpenOmciEventType) Reset() { *m = AlarmOpenOmciEventType{} }
+func (m *AlarmOpenOmciEventType) String() string { return proto.CompactTextString(m) }
+func (*AlarmOpenOmciEventType) ProtoMessage() {}
+func (*AlarmOpenOmciEventType) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8d41f1e38aadb08d, []int{6}
+}
+
+func (m *AlarmOpenOmciEventType) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AlarmOpenOmciEventType.Unmarshal(m, b)
+}
+func (m *AlarmOpenOmciEventType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AlarmOpenOmciEventType.Marshal(b, m, deterministic)
+}
+func (m *AlarmOpenOmciEventType) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AlarmOpenOmciEventType.Merge(m, src)
+}
+func (m *AlarmOpenOmciEventType) XXX_Size() int {
+ return xxx_messageInfo_AlarmOpenOmciEventType.Size(m)
+}
+func (m *AlarmOpenOmciEventType) XXX_DiscardUnknown() {
+ xxx_messageInfo_AlarmOpenOmciEventType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmOpenOmciEventType proto.InternalMessageInfo
+
+type AlarmOpenOmciEvent struct {
+ Type AlarmOpenOmciEventType_OpenOmciEventType `protobuf:"varint,1,opt,name=type,proto3,enum=alarm.AlarmOpenOmciEventType_OpenOmciEventType" json:"type,omitempty"`
+ Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *AlarmOpenOmciEvent) Reset() { *m = AlarmOpenOmciEvent{} }
+func (m *AlarmOpenOmciEvent) String() string { return proto.CompactTextString(m) }
+func (*AlarmOpenOmciEvent) ProtoMessage() {}
+func (*AlarmOpenOmciEvent) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8d41f1e38aadb08d, []int{7}
+}
+
+func (m *AlarmOpenOmciEvent) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_AlarmOpenOmciEvent.Unmarshal(m, b)
+}
+func (m *AlarmOpenOmciEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_AlarmOpenOmciEvent.Marshal(b, m, deterministic)
+}
+func (m *AlarmOpenOmciEvent) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AlarmOpenOmciEvent.Merge(m, src)
+}
+func (m *AlarmOpenOmciEvent) XXX_Size() int {
+ return xxx_messageInfo_AlarmOpenOmciEvent.Size(m)
+}
+func (m *AlarmOpenOmciEvent) XXX_DiscardUnknown() {
+ xxx_messageInfo_AlarmOpenOmciEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmOpenOmciEvent proto.InternalMessageInfo
+
+func (m *AlarmOpenOmciEvent) GetType() AlarmOpenOmciEventType_OpenOmciEventType {
+ if m != nil {
+ return m.Type
+ }
+ return AlarmOpenOmciEventType_state_change
+}
+
+func (m *AlarmOpenOmciEvent) GetData() string {
+ if m != nil {
+ return m.Data
+ }
+ return ""
+}
+
+func init() {
+ proto.RegisterEnum("alarm.AlarmOpenOmciEventType_OpenOmciEventType", AlarmOpenOmciEventType_OpenOmciEventType_name, AlarmOpenOmciEventType_OpenOmciEventType_value)
+ proto.RegisterType((*AlarmAttributeData)(nil), "alarm.AlarmAttributeData")
+ proto.RegisterType((*AlarmInstanceData)(nil), "alarm.AlarmInstanceData")
+ proto.RegisterType((*AlarmClassData)(nil), "alarm.AlarmClassData")
+ proto.RegisterType((*AlarmManagedEntity)(nil), "alarm.AlarmManagedEntity")
+ proto.RegisterType((*AlarmMessageType)(nil), "alarm.AlarmMessageType")
+ proto.RegisterType((*AlarmDeviceData)(nil), "alarm.AlarmDeviceData")
+ proto.RegisterType((*AlarmOpenOmciEventType)(nil), "alarm.AlarmOpenOmciEventType")
+ proto.RegisterType((*AlarmOpenOmciEvent)(nil), "alarm.AlarmOpenOmciEvent")
+}
+
+func init() { proto.RegisterFile("voltha_protos/omci_alarm_db.proto", fileDescriptor_8d41f1e38aadb08d) }
+
+var fileDescriptor_8d41f1e38aadb08d = []byte{
+ // 595 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcf, 0x6a, 0xdb, 0x4e,
+ 0x10, 0xfe, 0x39, 0xb1, 0x13, 0x67, 0x6c, 0x27, 0xce, 0xfe, 0xfa, 0x67, 0x13, 0x08, 0xa4, 0xa2,
+ 0x2d, 0x2e, 0xa5, 0x32, 0xa4, 0xd7, 0x40, 0x1b, 0xc7, 0x2e, 0xb8, 0x50, 0x42, 0x95, 0x9c, 0x7a,
+ 0x11, 0x6b, 0x69, 0x6a, 0x2f, 0x78, 0x57, 0xae, 0x76, 0x6d, 0xf0, 0xa5, 0xb7, 0x3e, 0x54, 0x1f,
+ 0x22, 0x2f, 0xd1, 0x53, 0x9f, 0x20, 0xe7, 0xa2, 0x91, 0x64, 0x4b, 0x08, 0x4a, 0x6f, 0xfa, 0x66,
+ 0xbe, 0xf9, 0x66, 0x34, 0xdf, 0xb0, 0xf0, 0x6c, 0x15, 0xcd, 0xed, 0x4c, 0xf8, 0x8b, 0x38, 0xb2,
+ 0x91, 0xe9, 0x47, 0x2a, 0x90, 0xbe, 0x98, 0x8b, 0x58, 0xf9, 0xe1, 0xc4, 0xa5, 0x20, 0x6b, 0x10,
+ 0x3e, 0xe5, 0x65, 0xa6, 0x42, 0x2b, 0x52, 0x82, 0x33, 0x02, 0x76, 0x95, 0x50, 0xae, 0xac, 0x8d,
+ 0xe5, 0x64, 0x69, 0x71, 0x28, 0xac, 0x60, 0x27, 0x50, 0xd7, 0x42, 0x21, 0xaf, 0x9d, 0xd7, 0x7a,
+ 0x07, 0x83, 0xc6, 0xef, 0x87, 0xfb, 0xb3, 0x9a, 0x47, 0x21, 0xf6, 0x08, 0x1a, 0x2b, 0x31, 0x5f,
+ 0x22, 0xdf, 0x49, 0x72, 0x5e, 0x0a, 0x9c, 0x9f, 0x35, 0x38, 0x26, 0x9d, 0xb1, 0x36, 0x56, 0xe8,
+ 0x20, 0x95, 0x79, 0x09, 0x2d, 0x99, 0x61, 0x5f, 0x86, 0xa4, 0xd6, 0xc9, 0xd5, 0x20, 0xcf, 0x8c,
+ 0x43, 0xc6, 0x61, 0x3f, 0x88, 0x51, 0x58, 0x0c, 0x33, 0xd5, 0x1c, 0xb2, 0x53, 0x68, 0xaa, 0x28,
+ 0x94, 0x5f, 0x25, 0x86, 0x7c, 0x97, 0x52, 0x1b, 0xcc, 0x3e, 0x00, 0x88, 0x7c, 0x6a, 0xc3, 0xeb,
+ 0xe7, 0xbb, 0xbd, 0xd6, 0xc5, 0x89, 0x4b, 0x3f, 0xec, 0x56, 0xff, 0x69, 0xd0, 0xfa, 0xf5, 0x70,
+ 0x7f, 0xb6, 0x97, 0xfe, 0x98, 0x57, 0xa8, 0x74, 0xbe, 0xc3, 0x21, 0xd1, 0xaf, 0xe7, 0xc2, 0x18,
+ 0x9a, 0xfb, 0x1c, 0x9a, 0x41, 0x02, 0x2a, 0x43, 0xef, 0x53, 0x78, 0x1c, 0xb2, 0x8f, 0x70, 0x90,
+ 0xcf, 0x6f, 0xf8, 0x0e, 0xb5, 0xe6, 0xc5, 0xd6, 0xc5, 0x35, 0x0c, 0x58, 0xd2, 0xb9, 0x53, 0xda,
+ 0x85, 0xb7, 0x2d, 0x77, 0x3e, 0x67, 0x16, 0x7c, 0x12, 0x5a, 0x4c, 0x31, 0x1c, 0x69, 0x2b, 0xed,
+ 0xfa, 0x1f, 0x66, 0xc8, 0x4d, 0xda, 0xa9, 0x98, 0xe4, 0x5c, 0x42, 0x37, 0x95, 0x44, 0x63, 0xc4,
+ 0x14, 0xef, 0xd6, 0x0b, 0x64, 0x3d, 0x68, 0xab, 0x14, 0xfa, 0x76, 0xbd, 0xc0, 0xb2, 0x68, 0x4b,
+ 0x6d, 0x99, 0xce, 0x8f, 0x5d, 0x38, 0xa2, 0xf2, 0x21, 0xae, 0x64, 0x66, 0xa5, 0x03, 0x07, 0x21,
+ 0xa1, 0x7c, 0x9e, 0x4d, 0xc7, 0x66, 0x1a, 0xff, 0xab, 0x8d, 0x2e, 0xfc, 0x3f, 0x17, 0xc6, 0x66,
+ 0xd7, 0x69, 0xf0, 0xdb, 0x12, 0x75, 0x80, 0xe4, 0x68, 0xc7, 0x3b, 0x4e, 0x52, 0xd4, 0xef, 0x36,
+ 0x4b, 0xb0, 0xe7, 0x70, 0x48, 0x7c, 0xb3, 0xd6, 0x81, 0x6f, 0xa5, 0x42, 0x5e, 0x27, 0xc1, 0x76,
+ 0x12, 0xbd, 0x5d, 0xeb, 0xe0, 0x4e, 0x2a, 0x4c, 0xfa, 0xad, 0x30, 0x36, 0x32, 0xd2, 0xbc, 0x41,
+ 0x4a, 0x39, 0x64, 0xef, 0x21, 0xdd, 0x12, 0x1a, 0xbe, 0x47, 0xe6, 0x3c, 0x2e, 0x9a, 0xb3, 0x31,
+ 0x7a, 0x70, 0x94, 0x38, 0x03, 0xdb, 0x4d, 0x7b, 0x79, 0x19, 0x1b, 0x42, 0x57, 0xa5, 0x7e, 0xf8,
+ 0x98, 0x18, 0x22, 0xd1, 0xf0, 0xfd, 0xea, 0x89, 0x95, 0x3c, 0xf3, 0x8e, 0x54, 0x01, 0x4a, 0x34,
+ 0xec, 0x12, 0x3a, 0xc5, 0x9d, 0x1b, 0xde, 0x24, 0x89, 0xa7, 0x25, 0x89, 0xed, 0xe6, 0xbd, 0x76,
+ 0xc1, 0x06, 0xe3, 0xbc, 0x83, 0x27, 0xc4, 0xb8, 0x59, 0xa0, 0xbe, 0x51, 0x81, 0x1c, 0xad, 0x50,
+ 0x5b, 0x72, 0xe8, 0x05, 0x1c, 0x57, 0x82, 0xac, 0x0b, 0x6d, 0x63, 0x85, 0x45, 0x3f, 0x98, 0x09,
+ 0x3d, 0xc5, 0xee, 0x7f, 0x8e, 0xca, 0x2e, 0xab, 0xc4, 0x65, 0xd7, 0x50, 0xdf, 0x1c, 0xc0, 0xe1,
+ 0x45, 0xbf, 0x38, 0x4b, 0x45, 0xd4, 0xad, 0x44, 0x3c, 0x2a, 0x66, 0x0c, 0xea, 0xa1, 0xb0, 0x22,
+ 0x33, 0x9a, 0xbe, 0x07, 0xaf, 0xbf, 0xbc, 0x9a, 0x4a, 0x3b, 0x5b, 0x4e, 0xdc, 0x20, 0x52, 0xfd,
+ 0x68, 0x81, 0x3a, 0x88, 0xe2, 0xb0, 0x9f, 0xbe, 0x3d, 0x6f, 0xb2, 0xb7, 0x67, 0x1a, 0xd1, 0x43,
+ 0x35, 0xd9, 0x23, 0xfc, 0xf6, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xd2, 0xfa, 0xd6, 0xc5,
+ 0x04, 0x00, 0x00,
+}
diff --git a/vendor/github.com/opencord/voltha-protos/go/omci/omci_mib_db.pb.go b/vendor/github.com/opencord/voltha-protos/go/omci/omci_mib_db.pb.go
new file mode 100644
index 0000000..f173e7f
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-protos/go/omci/omci_mib_db.pb.go
@@ -0,0 +1,515 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/omci_mib_db.proto
+
+package omci
+
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ _ "github.com/opencord/voltha-protos/go/common"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+type OpenOmciEventType_OpenOmciEventType int32
+
+const (
+ OpenOmciEventType_state_change OpenOmciEventType_OpenOmciEventType = 0
+)
+
+var OpenOmciEventType_OpenOmciEventType_name = map[int32]string{
+ 0: "state_change",
+}
+
+var OpenOmciEventType_OpenOmciEventType_value = map[string]int32{
+ "state_change": 0,
+}
+
+func (x OpenOmciEventType_OpenOmciEventType) String() string {
+ return proto.EnumName(OpenOmciEventType_OpenOmciEventType_name, int32(x))
+}
+
+func (OpenOmciEventType_OpenOmciEventType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_4fa402a2df36dcc1, []int{6, 0}
+}
+
+type MibAttributeData struct {
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *MibAttributeData) Reset() { *m = MibAttributeData{} }
+func (m *MibAttributeData) String() string { return proto.CompactTextString(m) }
+func (*MibAttributeData) ProtoMessage() {}
+func (*MibAttributeData) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4fa402a2df36dcc1, []int{0}
+}
+
+func (m *MibAttributeData) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_MibAttributeData.Unmarshal(m, b)
+}
+func (m *MibAttributeData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_MibAttributeData.Marshal(b, m, deterministic)
+}
+func (m *MibAttributeData) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MibAttributeData.Merge(m, src)
+}
+func (m *MibAttributeData) XXX_Size() int {
+ return xxx_messageInfo_MibAttributeData.Size(m)
+}
+func (m *MibAttributeData) XXX_DiscardUnknown() {
+ xxx_messageInfo_MibAttributeData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MibAttributeData proto.InternalMessageInfo
+
+func (m *MibAttributeData) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *MibAttributeData) GetValue() string {
+ if m != nil {
+ return m.Value
+ }
+ return ""
+}
+
+type MibInstanceData struct {
+ InstanceId uint32 `protobuf:"varint,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
+ Created string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
+ Modified string `protobuf:"bytes,3,opt,name=modified,proto3" json:"modified,omitempty"`
+ Attributes []*MibAttributeData `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *MibInstanceData) Reset() { *m = MibInstanceData{} }
+func (m *MibInstanceData) String() string { return proto.CompactTextString(m) }
+func (*MibInstanceData) ProtoMessage() {}
+func (*MibInstanceData) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4fa402a2df36dcc1, []int{1}
+}
+
+func (m *MibInstanceData) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_MibInstanceData.Unmarshal(m, b)
+}
+func (m *MibInstanceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_MibInstanceData.Marshal(b, m, deterministic)
+}
+func (m *MibInstanceData) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MibInstanceData.Merge(m, src)
+}
+func (m *MibInstanceData) XXX_Size() int {
+ return xxx_messageInfo_MibInstanceData.Size(m)
+}
+func (m *MibInstanceData) XXX_DiscardUnknown() {
+ xxx_messageInfo_MibInstanceData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MibInstanceData proto.InternalMessageInfo
+
+func (m *MibInstanceData) GetInstanceId() uint32 {
+ if m != nil {
+ return m.InstanceId
+ }
+ return 0
+}
+
+func (m *MibInstanceData) GetCreated() string {
+ if m != nil {
+ return m.Created
+ }
+ return ""
+}
+
+func (m *MibInstanceData) GetModified() string {
+ if m != nil {
+ return m.Modified
+ }
+ return ""
+}
+
+func (m *MibInstanceData) GetAttributes() []*MibAttributeData {
+ if m != nil {
+ return m.Attributes
+ }
+ return nil
+}
+
+type MibClassData struct {
+ ClassId uint32 `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
+ Instances []*MibInstanceData `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *MibClassData) Reset() { *m = MibClassData{} }
+func (m *MibClassData) String() string { return proto.CompactTextString(m) }
+func (*MibClassData) ProtoMessage() {}
+func (*MibClassData) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4fa402a2df36dcc1, []int{2}
+}
+
+func (m *MibClassData) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_MibClassData.Unmarshal(m, b)
+}
+func (m *MibClassData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_MibClassData.Marshal(b, m, deterministic)
+}
+func (m *MibClassData) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MibClassData.Merge(m, src)
+}
+func (m *MibClassData) XXX_Size() int {
+ return xxx_messageInfo_MibClassData.Size(m)
+}
+func (m *MibClassData) XXX_DiscardUnknown() {
+ xxx_messageInfo_MibClassData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MibClassData proto.InternalMessageInfo
+
+func (m *MibClassData) GetClassId() uint32 {
+ if m != nil {
+ return m.ClassId
+ }
+ return 0
+}
+
+func (m *MibClassData) GetInstances() []*MibInstanceData {
+ if m != nil {
+ return m.Instances
+ }
+ return nil
+}
+
+type ManagedEntity struct {
+ ClassId uint32 `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ManagedEntity) Reset() { *m = ManagedEntity{} }
+func (m *ManagedEntity) String() string { return proto.CompactTextString(m) }
+func (*ManagedEntity) ProtoMessage() {}
+func (*ManagedEntity) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4fa402a2df36dcc1, []int{3}
+}
+
+func (m *ManagedEntity) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ManagedEntity.Unmarshal(m, b)
+}
+func (m *ManagedEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ManagedEntity.Marshal(b, m, deterministic)
+}
+func (m *ManagedEntity) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ManagedEntity.Merge(m, src)
+}
+func (m *ManagedEntity) XXX_Size() int {
+ return xxx_messageInfo_ManagedEntity.Size(m)
+}
+func (m *ManagedEntity) XXX_DiscardUnknown() {
+ xxx_messageInfo_ManagedEntity.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ManagedEntity proto.InternalMessageInfo
+
+func (m *ManagedEntity) GetClassId() uint32 {
+ if m != nil {
+ return m.ClassId
+ }
+ return 0
+}
+
+func (m *ManagedEntity) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+type MessageType struct {
+ MessageType uint32 `protobuf:"varint,1,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *MessageType) Reset() { *m = MessageType{} }
+func (m *MessageType) String() string { return proto.CompactTextString(m) }
+func (*MessageType) ProtoMessage() {}
+func (*MessageType) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4fa402a2df36dcc1, []int{4}
+}
+
+func (m *MessageType) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_MessageType.Unmarshal(m, b)
+}
+func (m *MessageType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_MessageType.Marshal(b, m, deterministic)
+}
+func (m *MessageType) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MessageType.Merge(m, src)
+}
+func (m *MessageType) XXX_Size() int {
+ return xxx_messageInfo_MessageType.Size(m)
+}
+func (m *MessageType) XXX_DiscardUnknown() {
+ xxx_messageInfo_MessageType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MessageType proto.InternalMessageInfo
+
+func (m *MessageType) GetMessageType() uint32 {
+ if m != nil {
+ return m.MessageType
+ }
+ return 0
+}
+
+type MibDeviceData struct {
+ DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+ Created string `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
+ LastSyncTime string `protobuf:"bytes,3,opt,name=last_sync_time,json=lastSyncTime,proto3" json:"last_sync_time,omitempty"`
+ MibDataSync uint32 `protobuf:"varint,4,opt,name=mib_data_sync,json=mibDataSync,proto3" json:"mib_data_sync,omitempty"`
+ Version uint32 `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
+ Classes []*MibClassData `protobuf:"bytes,6,rep,name=classes,proto3" json:"classes,omitempty"`
+ ManagedEntities []*ManagedEntity `protobuf:"bytes,7,rep,name=managed_entities,json=managedEntities,proto3" json:"managed_entities,omitempty"`
+ MessageTypes []*MessageType `protobuf:"bytes,8,rep,name=message_types,json=messageTypes,proto3" json:"message_types,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *MibDeviceData) Reset() { *m = MibDeviceData{} }
+func (m *MibDeviceData) String() string { return proto.CompactTextString(m) }
+func (*MibDeviceData) ProtoMessage() {}
+func (*MibDeviceData) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4fa402a2df36dcc1, []int{5}
+}
+
+func (m *MibDeviceData) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_MibDeviceData.Unmarshal(m, b)
+}
+func (m *MibDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_MibDeviceData.Marshal(b, m, deterministic)
+}
+func (m *MibDeviceData) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MibDeviceData.Merge(m, src)
+}
+func (m *MibDeviceData) XXX_Size() int {
+ return xxx_messageInfo_MibDeviceData.Size(m)
+}
+func (m *MibDeviceData) XXX_DiscardUnknown() {
+ xxx_messageInfo_MibDeviceData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MibDeviceData proto.InternalMessageInfo
+
+func (m *MibDeviceData) GetDeviceId() string {
+ if m != nil {
+ return m.DeviceId
+ }
+ return ""
+}
+
+func (m *MibDeviceData) GetCreated() string {
+ if m != nil {
+ return m.Created
+ }
+ return ""
+}
+
+func (m *MibDeviceData) GetLastSyncTime() string {
+ if m != nil {
+ return m.LastSyncTime
+ }
+ return ""
+}
+
+func (m *MibDeviceData) GetMibDataSync() uint32 {
+ if m != nil {
+ return m.MibDataSync
+ }
+ return 0
+}
+
+func (m *MibDeviceData) GetVersion() uint32 {
+ if m != nil {
+ return m.Version
+ }
+ return 0
+}
+
+func (m *MibDeviceData) GetClasses() []*MibClassData {
+ if m != nil {
+ return m.Classes
+ }
+ return nil
+}
+
+func (m *MibDeviceData) GetManagedEntities() []*ManagedEntity {
+ if m != nil {
+ return m.ManagedEntities
+ }
+ return nil
+}
+
+func (m *MibDeviceData) GetMessageTypes() []*MessageType {
+ if m != nil {
+ return m.MessageTypes
+ }
+ return nil
+}
+
+type OpenOmciEventType struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OpenOmciEventType) Reset() { *m = OpenOmciEventType{} }
+func (m *OpenOmciEventType) String() string { return proto.CompactTextString(m) }
+func (*OpenOmciEventType) ProtoMessage() {}
+func (*OpenOmciEventType) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4fa402a2df36dcc1, []int{6}
+}
+
+func (m *OpenOmciEventType) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OpenOmciEventType.Unmarshal(m, b)
+}
+func (m *OpenOmciEventType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OpenOmciEventType.Marshal(b, m, deterministic)
+}
+func (m *OpenOmciEventType) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OpenOmciEventType.Merge(m, src)
+}
+func (m *OpenOmciEventType) XXX_Size() int {
+ return xxx_messageInfo_OpenOmciEventType.Size(m)
+}
+func (m *OpenOmciEventType) XXX_DiscardUnknown() {
+ xxx_messageInfo_OpenOmciEventType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OpenOmciEventType proto.InternalMessageInfo
+
+type OpenOmciEvent struct {
+ Type OpenOmciEventType_OpenOmciEventType `protobuf:"varint,1,opt,name=type,proto3,enum=omci.OpenOmciEventType_OpenOmciEventType" json:"type,omitempty"`
+ Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OpenOmciEvent) Reset() { *m = OpenOmciEvent{} }
+func (m *OpenOmciEvent) String() string { return proto.CompactTextString(m) }
+func (*OpenOmciEvent) ProtoMessage() {}
+func (*OpenOmciEvent) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4fa402a2df36dcc1, []int{7}
+}
+
+func (m *OpenOmciEvent) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OpenOmciEvent.Unmarshal(m, b)
+}
+func (m *OpenOmciEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OpenOmciEvent.Marshal(b, m, deterministic)
+}
+func (m *OpenOmciEvent) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OpenOmciEvent.Merge(m, src)
+}
+func (m *OpenOmciEvent) XXX_Size() int {
+ return xxx_messageInfo_OpenOmciEvent.Size(m)
+}
+func (m *OpenOmciEvent) XXX_DiscardUnknown() {
+ xxx_messageInfo_OpenOmciEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OpenOmciEvent proto.InternalMessageInfo
+
+func (m *OpenOmciEvent) GetType() OpenOmciEventType_OpenOmciEventType {
+ if m != nil {
+ return m.Type
+ }
+ return OpenOmciEventType_state_change
+}
+
+func (m *OpenOmciEvent) GetData() string {
+ if m != nil {
+ return m.Data
+ }
+ return ""
+}
+
+func init() {
+ proto.RegisterEnum("omci.OpenOmciEventType_OpenOmciEventType", OpenOmciEventType_OpenOmciEventType_name, OpenOmciEventType_OpenOmciEventType_value)
+ proto.RegisterType((*MibAttributeData)(nil), "omci.MibAttributeData")
+ proto.RegisterType((*MibInstanceData)(nil), "omci.MibInstanceData")
+ proto.RegisterType((*MibClassData)(nil), "omci.MibClassData")
+ proto.RegisterType((*ManagedEntity)(nil), "omci.ManagedEntity")
+ proto.RegisterType((*MessageType)(nil), "omci.MessageType")
+ proto.RegisterType((*MibDeviceData)(nil), "omci.MibDeviceData")
+ proto.RegisterType((*OpenOmciEventType)(nil), "omci.OpenOmciEventType")
+ proto.RegisterType((*OpenOmciEvent)(nil), "omci.OpenOmciEvent")
+}
+
+func init() { proto.RegisterFile("voltha_protos/omci_mib_db.proto", fileDescriptor_4fa402a2df36dcc1) }
+
+var fileDescriptor_4fa402a2df36dcc1 = []byte{
+ // 582 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xdb, 0x6a, 0xdb, 0x40,
+ 0x10, 0xad, 0x1d, 0x25, 0x71, 0x46, 0x56, 0xe2, 0x6c, 0x2f, 0x6c, 0x03, 0xa1, 0x41, 0xb4, 0x25,
+ 0xa1, 0xd4, 0x81, 0x14, 0x5a, 0x28, 0xa4, 0x50, 0x3b, 0xa1, 0x18, 0x2a, 0x02, 0x6a, 0x9e, 0xfa,
+ 0x22, 0x56, 0xd2, 0xd4, 0x5e, 0xf0, 0xae, 0x8c, 0x77, 0x6d, 0xd0, 0x7f, 0xf5, 0x37, 0xf2, 0x13,
+ 0x7d, 0xca, 0x17, 0xe4, 0xb9, 0xec, 0xea, 0x62, 0xb9, 0x2e, 0xa5, 0x6f, 0x3a, 0x73, 0x39, 0x33,
+ 0x73, 0x8e, 0x58, 0x78, 0xb1, 0xcc, 0xa6, 0x7a, 0xc2, 0xa2, 0xd9, 0x3c, 0xd3, 0x99, 0x3a, 0xcf,
+ 0x44, 0xc2, 0x23, 0xc1, 0xe3, 0x28, 0x8d, 0xfb, 0x36, 0x44, 0x1c, 0x13, 0x3a, 0xa2, 0xeb, 0x65,
+ 0x02, 0x35, 0x2b, 0xf2, 0xfe, 0x10, 0x7a, 0x01, 0x8f, 0x3f, 0x6b, 0x3d, 0xe7, 0xf1, 0x42, 0xe3,
+ 0x15, 0xd3, 0x8c, 0x3c, 0x07, 0x47, 0x32, 0x81, 0xb4, 0x75, 0xd2, 0x3a, 0xdd, 0x1b, 0x6c, 0xdf,
+ 0x3f, 0xdc, 0x1d, 0xb7, 0x42, 0x1b, 0x22, 0x4f, 0x60, 0x7b, 0xc9, 0xa6, 0x0b, 0xa4, 0x6d, 0x93,
+ 0x0b, 0x0b, 0xe0, 0xff, 0x6c, 0xc1, 0x41, 0xc0, 0xe3, 0x91, 0x54, 0x9a, 0xc9, 0xa4, 0x20, 0x79,
+ 0x0d, 0x2e, 0x2f, 0x71, 0xc4, 0x53, 0xcb, 0xe5, 0x55, 0x5c, 0x50, 0x65, 0x46, 0x29, 0xa1, 0xb0,
+ 0x9b, 0xcc, 0x91, 0x69, 0x4c, 0x4b, 0xce, 0x0a, 0x92, 0x23, 0xe8, 0x88, 0x2c, 0xe5, 0x3f, 0x38,
+ 0xa6, 0x74, 0xcb, 0xa6, 0x6a, 0x4c, 0x86, 0x00, 0xac, 0xda, 0x59, 0x51, 0xe7, 0x64, 0xeb, 0xd4,
+ 0xbd, 0x78, 0xd6, 0x37, 0xb7, 0xf6, 0xff, 0x3c, 0x67, 0xe0, 0xfe, 0x7a, 0xb8, 0x3b, 0xde, 0x29,
+ 0x6e, 0x0a, 0x1b, 0x6d, 0x7e, 0x0e, 0xdd, 0x80, 0xc7, 0xc3, 0x29, 0x53, 0xca, 0xae, 0x7c, 0x02,
+ 0x9d, 0xc4, 0x80, 0x8d, 0x7d, 0x77, 0x6d, 0x78, 0x94, 0x92, 0x2f, 0xb0, 0x57, 0xad, 0xae, 0x68,
+ 0xdb, 0x4e, 0x7d, 0x5a, 0x4f, 0x6d, 0x9e, 0x3f, 0x20, 0x66, 0xa8, 0xb7, 0xa6, 0x41, 0xb8, 0xea,
+ 0xf5, 0xbf, 0x82, 0x17, 0x30, 0xc9, 0xc6, 0x98, 0x5e, 0x4b, 0xcd, 0x75, 0xfe, 0x1f, 0xb3, 0x2b,
+ 0x57, 0xda, 0x1b, 0xae, 0xf8, 0x1f, 0xc0, 0x0d, 0x50, 0x29, 0x36, 0xc6, 0xdb, 0x7c, 0x86, 0xe4,
+ 0x14, 0xba, 0xa2, 0x80, 0x91, 0xce, 0x67, 0xb8, 0xce, 0xe7, 0x8a, 0x55, 0xa5, 0x7f, 0xdf, 0x06,
+ 0x2f, 0xe0, 0xf1, 0x15, 0x2e, 0x79, 0x69, 0x9b, 0x0f, 0x7b, 0xa9, 0x45, 0xd5, 0x22, 0xf5, 0xa8,
+ 0x4e, 0x11, 0xff, 0xa7, 0x65, 0x2f, 0x61, 0x7f, 0xca, 0x94, 0x8e, 0x54, 0x2e, 0x93, 0x48, 0x73,
+ 0x81, 0xa5, 0x71, 0x5d, 0x13, 0xfd, 0x96, 0xcb, 0xe4, 0x96, 0x0b, 0x24, 0x3e, 0x78, 0xf6, 0x1f,
+ 0x65, 0x9a, 0xd9, 0x4a, 0xea, 0x98, 0x05, 0x43, 0x57, 0xf0, 0xd8, 0xec, 0x60, 0xea, 0xcc, 0x8c,
+ 0x25, 0xce, 0x15, 0xcf, 0x24, 0xdd, 0xb6, 0xd9, 0x0a, 0x92, 0x4b, 0x28, 0x24, 0x41, 0x45, 0x77,
+ 0xac, 0x03, 0xa4, 0x76, 0xa0, 0xb6, 0x72, 0x70, 0x60, 0xe4, 0x87, 0x95, 0xa6, 0x61, 0xd5, 0x43,
+ 0x3e, 0x41, 0x4f, 0x14, 0xca, 0x47, 0x68, 0xa4, 0xe7, 0xa8, 0xe8, 0xae, 0xe5, 0x79, 0x5c, 0xf2,
+ 0x34, 0x7d, 0x09, 0x0f, 0x44, 0x03, 0x72, 0x54, 0xe4, 0x3d, 0x78, 0x4d, 0x71, 0x15, 0xed, 0xd8,
+ 0xe6, 0xc3, 0xb2, 0x79, 0x25, 0x6e, 0xd8, 0x6d, 0x28, 0xad, 0xfc, 0x8f, 0x70, 0x78, 0x33, 0x43,
+ 0x79, 0x23, 0x12, 0x7e, 0xbd, 0x44, 0xa9, 0xad, 0xfe, 0xaf, 0xfe, 0x12, 0x24, 0x3d, 0xe8, 0x2a,
+ 0xcd, 0x34, 0x46, 0xc9, 0x84, 0xc9, 0x31, 0xf6, 0x1e, 0xf9, 0x31, 0x78, 0x6b, 0x65, 0xe4, 0x12,
+ 0x9c, 0xda, 0xd9, 0xfd, 0x8b, 0xb3, 0x62, 0xf6, 0x06, 0xd3, 0x66, 0x24, 0xb4, 0x6d, 0x84, 0x80,
+ 0x63, 0xc4, 0x2f, 0xdd, 0xb3, 0xdf, 0x83, 0x37, 0xdf, 0xcf, 0xc6, 0x5c, 0x4f, 0x16, 0x71, 0x3f,
+ 0xc9, 0xc4, 0x79, 0x36, 0x43, 0x99, 0x64, 0xf3, 0xf4, 0xbc, 0x78, 0x38, 0xde, 0x96, 0x0f, 0xc7,
+ 0x38, 0xb3, 0x4f, 0x4c, 0xbc, 0x63, 0xf1, 0xbb, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc6, 0xd7,
+ 0x40, 0x10, 0x7f, 0x04, 0x00, 0x00,
+}
diff --git a/vendor/github.com/opencord/voltha-protos/go/openflow_13/openflow_13.pb.go b/vendor/github.com/opencord/voltha-protos/go/openflow_13/openflow_13.pb.go
new file mode 100644
index 0000000..4a6bef2
--- /dev/null
+++ b/vendor/github.com/opencord/voltha-protos/go/openflow_13/openflow_13.pb.go
@@ -0,0 +1,9790 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/openflow_13.proto
+
+package openflow_13
+
+import (
+ fmt "fmt"
+ proto "github.com/golang/protobuf/proto"
+ common "github.com/opencord/voltha-protos/go/common"
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+// InlineNode from public import voltha_protos/yang_options.proto
+type InlineNode = common.InlineNode
+
+// RpcReturnDef from public import voltha_protos/yang_options.proto
+type RpcReturnDef = common.RpcReturnDef
+
+// MessageParserOption from public import voltha_protos/yang_options.proto
+type MessageParserOption = common.MessageParserOption
+
+var MessageParserOption_name = common.MessageParserOption_name
+var MessageParserOption_value = common.MessageParserOption_value
+
+const MessageParserOption_MOVE_TO_PARENT_LEVEL = MessageParserOption(common.MessageParserOption_MOVE_TO_PARENT_LEVEL)
+const MessageParserOption_CREATE_BOTH_GROUPING_AND_CONTAINER = MessageParserOption(common.MessageParserOption_CREATE_BOTH_GROUPING_AND_CONTAINER)
+
+var E_YangChildRule = common.E_YangChildRule
+
+var E_YangMessageRule = common.E_YangMessageRule
+
+var E_YangInlineNode = common.E_YangInlineNode
+
+var E_YangXmlTag = common.E_YangXmlTag
+
+// Port numbering. Ports are numbered starting from 1.
+type OfpPortNo int32
+
+const (
+ OfpPortNo_OFPP_INVALID OfpPortNo = 0
+ // Maximum number of physical and logical switch ports.
+ OfpPortNo_OFPP_MAX OfpPortNo = 2147483392
+ // Reserved OpenFlow Port (fake output "ports").
+ OfpPortNo_OFPP_IN_PORT OfpPortNo = 2147483640
+ OfpPortNo_OFPP_TABLE OfpPortNo = 2147483641
+ OfpPortNo_OFPP_NORMAL OfpPortNo = 2147483642
+ OfpPortNo_OFPP_FLOOD OfpPortNo = 2147483643
+ OfpPortNo_OFPP_ALL OfpPortNo = 2147483644
+ OfpPortNo_OFPP_CONTROLLER OfpPortNo = 2147483645
+ OfpPortNo_OFPP_LOCAL OfpPortNo = 2147483646
+ OfpPortNo_OFPP_ANY OfpPortNo = 2147483647
+)
+
+var OfpPortNo_name = map[int32]string{
+ 0: "OFPP_INVALID",
+ 2147483392: "OFPP_MAX",
+ 2147483640: "OFPP_IN_PORT",
+ 2147483641: "OFPP_TABLE",
+ 2147483642: "OFPP_NORMAL",
+ 2147483643: "OFPP_FLOOD",
+ 2147483644: "OFPP_ALL",
+ 2147483645: "OFPP_CONTROLLER",
+ 2147483646: "OFPP_LOCAL",
+ 2147483647: "OFPP_ANY",
+}
+
+var OfpPortNo_value = map[string]int32{
+ "OFPP_INVALID": 0,
+ "OFPP_MAX": 2147483392,
+ "OFPP_IN_PORT": 2147483640,
+ "OFPP_TABLE": 2147483641,
+ "OFPP_NORMAL": 2147483642,
+ "OFPP_FLOOD": 2147483643,
+ "OFPP_ALL": 2147483644,
+ "OFPP_CONTROLLER": 2147483645,
+ "OFPP_LOCAL": 2147483646,
+ "OFPP_ANY": 2147483647,
+}
+
+func (x OfpPortNo) String() string {
+ return proto.EnumName(OfpPortNo_name, int32(x))
+}
+
+func (OfpPortNo) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{0}
+}
+
+type OfpType int32
+
+const (
+ // Immutable messages.
+ OfpType_OFPT_HELLO OfpType = 0
+ OfpType_OFPT_ERROR OfpType = 1
+ OfpType_OFPT_ECHO_REQUEST OfpType = 2
+ OfpType_OFPT_ECHO_REPLY OfpType = 3
+ OfpType_OFPT_EXPERIMENTER OfpType = 4
+ // Switch configuration messages.
+ OfpType_OFPT_FEATURES_REQUEST OfpType = 5
+ OfpType_OFPT_FEATURES_REPLY OfpType = 6
+ OfpType_OFPT_GET_CONFIG_REQUEST OfpType = 7
+ OfpType_OFPT_GET_CONFIG_REPLY OfpType = 8
+ OfpType_OFPT_SET_CONFIG OfpType = 9
+ // Asynchronous messages.
+ OfpType_OFPT_PACKET_IN OfpType = 10
+ OfpType_OFPT_FLOW_REMOVED OfpType = 11
+ OfpType_OFPT_PORT_STATUS OfpType = 12
+ // Controller command messages.
+ OfpType_OFPT_PACKET_OUT OfpType = 13
+ OfpType_OFPT_FLOW_MOD OfpType = 14
+ OfpType_OFPT_GROUP_MOD OfpType = 15
+ OfpType_OFPT_PORT_MOD OfpType = 16
+ OfpType_OFPT_TABLE_MOD OfpType = 17
+ // Multipart messages.
+ OfpType_OFPT_MULTIPART_REQUEST OfpType = 18
+ OfpType_OFPT_MULTIPART_REPLY OfpType = 19
+ // Barrier messages.
+ OfpType_OFPT_BARRIER_REQUEST OfpType = 20
+ OfpType_OFPT_BARRIER_REPLY OfpType = 21
+ // Queue Configuration messages.
+ OfpType_OFPT_QUEUE_GET_CONFIG_REQUEST OfpType = 22
+ OfpType_OFPT_QUEUE_GET_CONFIG_REPLY OfpType = 23
+ // Controller role change request messages.
+ OfpType_OFPT_ROLE_REQUEST OfpType = 24
+ OfpType_OFPT_ROLE_REPLY OfpType = 25
+ // Asynchronous message configuration.
+ OfpType_OFPT_GET_ASYNC_REQUEST OfpType = 26
+ OfpType_OFPT_GET_ASYNC_REPLY OfpType = 27
+ OfpType_OFPT_SET_ASYNC OfpType = 28
+ // Meters and rate limiters configuration messages.
+ OfpType_OFPT_METER_MOD OfpType = 29
+)
+
+var OfpType_name = map[int32]string{
+ 0: "OFPT_HELLO",
+ 1: "OFPT_ERROR",
+ 2: "OFPT_ECHO_REQUEST",
+ 3: "OFPT_ECHO_REPLY",
+ 4: "OFPT_EXPERIMENTER",
+ 5: "OFPT_FEATURES_REQUEST",
+ 6: "OFPT_FEATURES_REPLY",
+ 7: "OFPT_GET_CONFIG_REQUEST",
+ 8: "OFPT_GET_CONFIG_REPLY",
+ 9: "OFPT_SET_CONFIG",
+ 10: "OFPT_PACKET_IN",
+ 11: "OFPT_FLOW_REMOVED",
+ 12: "OFPT_PORT_STATUS",
+ 13: "OFPT_PACKET_OUT",
+ 14: "OFPT_FLOW_MOD",
+ 15: "OFPT_GROUP_MOD",
+ 16: "OFPT_PORT_MOD",
+ 17: "OFPT_TABLE_MOD",
+ 18: "OFPT_MULTIPART_REQUEST",
+ 19: "OFPT_MULTIPART_REPLY",
+ 20: "OFPT_BARRIER_REQUEST",
+ 21: "OFPT_BARRIER_REPLY",
+ 22: "OFPT_QUEUE_GET_CONFIG_REQUEST",
+ 23: "OFPT_QUEUE_GET_CONFIG_REPLY",
+ 24: "OFPT_ROLE_REQUEST",
+ 25: "OFPT_ROLE_REPLY",
+ 26: "OFPT_GET_ASYNC_REQUEST",
+ 27: "OFPT_GET_ASYNC_REPLY",
+ 28: "OFPT_SET_ASYNC",
+ 29: "OFPT_METER_MOD",
+}
+
+var OfpType_value = map[string]int32{
+ "OFPT_HELLO": 0,
+ "OFPT_ERROR": 1,
+ "OFPT_ECHO_REQUEST": 2,
+ "OFPT_ECHO_REPLY": 3,
+ "OFPT_EXPERIMENTER": 4,
+ "OFPT_FEATURES_REQUEST": 5,
+ "OFPT_FEATURES_REPLY": 6,
+ "OFPT_GET_CONFIG_REQUEST": 7,
+ "OFPT_GET_CONFIG_REPLY": 8,
+ "OFPT_SET_CONFIG": 9,
+ "OFPT_PACKET_IN": 10,
+ "OFPT_FLOW_REMOVED": 11,
+ "OFPT_PORT_STATUS": 12,
+ "OFPT_PACKET_OUT": 13,
+ "OFPT_FLOW_MOD": 14,
+ "OFPT_GROUP_MOD": 15,
+ "OFPT_PORT_MOD": 16,
+ "OFPT_TABLE_MOD": 17,
+ "OFPT_MULTIPART_REQUEST": 18,
+ "OFPT_MULTIPART_REPLY": 19,
+ "OFPT_BARRIER_REQUEST": 20,
+ "OFPT_BARRIER_REPLY": 21,
+ "OFPT_QUEUE_GET_CONFIG_REQUEST": 22,
+ "OFPT_QUEUE_GET_CONFIG_REPLY": 23,
+ "OFPT_ROLE_REQUEST": 24,
+ "OFPT_ROLE_REPLY": 25,
+ "OFPT_GET_ASYNC_REQUEST": 26,
+ "OFPT_GET_ASYNC_REPLY": 27,
+ "OFPT_SET_ASYNC": 28,
+ "OFPT_METER_MOD": 29,
+}
+
+func (x OfpType) String() string {
+ return proto.EnumName(OfpType_name, int32(x))
+}
+
+func (OfpType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{1}
+}
+
+// Hello elements types.
+type OfpHelloElemType int32
+
+const (
+ OfpHelloElemType_OFPHET_INVALID OfpHelloElemType = 0
+ OfpHelloElemType_OFPHET_VERSIONBITMAP OfpHelloElemType = 1
+)
+
+var OfpHelloElemType_name = map[int32]string{
+ 0: "OFPHET_INVALID",
+ 1: "OFPHET_VERSIONBITMAP",
+}
+
+var OfpHelloElemType_value = map[string]int32{
+ "OFPHET_INVALID": 0,
+ "OFPHET_VERSIONBITMAP": 1,
+}
+
+func (x OfpHelloElemType) String() string {
+ return proto.EnumName(OfpHelloElemType_name, int32(x))
+}
+
+func (OfpHelloElemType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{2}
+}
+
+type OfpConfigFlags int32
+
+const (
+ // Handling of IP fragments.
+ OfpConfigFlags_OFPC_FRAG_NORMAL OfpConfigFlags = 0
+ OfpConfigFlags_OFPC_FRAG_DROP OfpConfigFlags = 1
+ OfpConfigFlags_OFPC_FRAG_REASM OfpConfigFlags = 2
+ OfpConfigFlags_OFPC_FRAG_MASK OfpConfigFlags = 3
+)
+
+var OfpConfigFlags_name = map[int32]string{
+ 0: "OFPC_FRAG_NORMAL",
+ 1: "OFPC_FRAG_DROP",
+ 2: "OFPC_FRAG_REASM",
+ 3: "OFPC_FRAG_MASK",
+}
+
+var OfpConfigFlags_value = map[string]int32{
+ "OFPC_FRAG_NORMAL": 0,
+ "OFPC_FRAG_DROP": 1,
+ "OFPC_FRAG_REASM": 2,
+ "OFPC_FRAG_MASK": 3,
+}
+
+func (x OfpConfigFlags) String() string {
+ return proto.EnumName(OfpConfigFlags_name, int32(x))
+}
+
+func (OfpConfigFlags) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{3}
+}
+
+// Flags to configure the table. Reserved for future use.
+type OfpTableConfig int32
+
+const (
+ OfpTableConfig_OFPTC_INVALID OfpTableConfig = 0
+ OfpTableConfig_OFPTC_DEPRECATED_MASK OfpTableConfig = 3
+)
+
+var OfpTableConfig_name = map[int32]string{
+ 0: "OFPTC_INVALID",
+ 3: "OFPTC_DEPRECATED_MASK",
+}
+
+var OfpTableConfig_value = map[string]int32{
+ "OFPTC_INVALID": 0,
+ "OFPTC_DEPRECATED_MASK": 3,
+}
+
+func (x OfpTableConfig) String() string {
+ return proto.EnumName(OfpTableConfig_name, int32(x))
+}
+
+func (OfpTableConfig) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{4}
+}
+
+// Table numbering. Tables can use any number up to OFPT_MAX.
+type OfpTable int32
+
+const (
+ OfpTable_OFPTT_INVALID OfpTable = 0
+ // Last usable table number.
+ OfpTable_OFPTT_MAX OfpTable = 254
+ // Fake tables.
+ OfpTable_OFPTT_ALL OfpTable = 255
+)
+
+var OfpTable_name = map[int32]string{
+ 0: "OFPTT_INVALID",
+ 254: "OFPTT_MAX",
+ 255: "OFPTT_ALL",
+}
+
+var OfpTable_value = map[string]int32{
+ "OFPTT_INVALID": 0,
+ "OFPTT_MAX": 254,
+ "OFPTT_ALL": 255,
+}
+
+func (x OfpTable) String() string {
+ return proto.EnumName(OfpTable_name, int32(x))
+}
+
+func (OfpTable) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{5}
+}
+
+// Capabilities supported by the datapath.
+type OfpCapabilities int32
+
+const (
+ OfpCapabilities_OFPC_INVALID OfpCapabilities = 0
+ OfpCapabilities_OFPC_FLOW_STATS OfpCapabilities = 1
+ OfpCapabilities_OFPC_TABLE_STATS OfpCapabilities = 2
+ OfpCapabilities_OFPC_PORT_STATS OfpCapabilities = 4
+ OfpCapabilities_OFPC_GROUP_STATS OfpCapabilities = 8
+ OfpCapabilities_OFPC_IP_REASM OfpCapabilities = 32
+ OfpCapabilities_OFPC_QUEUE_STATS OfpCapabilities = 64
+ OfpCapabilities_OFPC_PORT_BLOCKED OfpCapabilities = 256
+)
+
+var OfpCapabilities_name = map[int32]string{
+ 0: "OFPC_INVALID",
+ 1: "OFPC_FLOW_STATS",
+ 2: "OFPC_TABLE_STATS",
+ 4: "OFPC_PORT_STATS",
+ 8: "OFPC_GROUP_STATS",
+ 32: "OFPC_IP_REASM",
+ 64: "OFPC_QUEUE_STATS",
+ 256: "OFPC_PORT_BLOCKED",
+}
+
+var OfpCapabilities_value = map[string]int32{
+ "OFPC_INVALID": 0,
+ "OFPC_FLOW_STATS": 1,
+ "OFPC_TABLE_STATS": 2,
+ "OFPC_PORT_STATS": 4,
+ "OFPC_GROUP_STATS": 8,
+ "OFPC_IP_REASM": 32,
+ "OFPC_QUEUE_STATS": 64,
+ "OFPC_PORT_BLOCKED": 256,
+}
+
+func (x OfpCapabilities) String() string {
+ return proto.EnumName(OfpCapabilities_name, int32(x))
+}
+
+func (OfpCapabilities) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{6}
+}
+
+// Flags to indicate behavior of the physical port. These flags are
+// used in ofp_port to describe the current configuration. They are
+// used in the ofp_port_mod message to configure the port's behavior.
+type OfpPortConfig int32
+
+const (
+ OfpPortConfig_OFPPC_INVALID OfpPortConfig = 0
+ OfpPortConfig_OFPPC_PORT_DOWN OfpPortConfig = 1
+ OfpPortConfig_OFPPC_NO_RECV OfpPortConfig = 4
+ OfpPortConfig_OFPPC_NO_FWD OfpPortConfig = 32
+ OfpPortConfig_OFPPC_NO_PACKET_IN OfpPortConfig = 64
+)
+
+var OfpPortConfig_name = map[int32]string{
+ 0: "OFPPC_INVALID",
+ 1: "OFPPC_PORT_DOWN",
+ 4: "OFPPC_NO_RECV",
+ 32: "OFPPC_NO_FWD",
+ 64: "OFPPC_NO_PACKET_IN",
+}
+
+var OfpPortConfig_value = map[string]int32{
+ "OFPPC_INVALID": 0,
+ "OFPPC_PORT_DOWN": 1,
+ "OFPPC_NO_RECV": 4,
+ "OFPPC_NO_FWD": 32,
+ "OFPPC_NO_PACKET_IN": 64,
+}
+
+func (x OfpPortConfig) String() string {
+ return proto.EnumName(OfpPortConfig_name, int32(x))
+}
+
+func (OfpPortConfig) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{7}
+}
+
+// Current state of the physical port. These are not configurable from
+// the controller.
+type OfpPortState int32
+
+const (
+ OfpPortState_OFPPS_INVALID OfpPortState = 0
+ OfpPortState_OFPPS_LINK_DOWN OfpPortState = 1
+ OfpPortState_OFPPS_BLOCKED OfpPortState = 2
+ OfpPortState_OFPPS_LIVE OfpPortState = 4
+)
+
+var OfpPortState_name = map[int32]string{
+ 0: "OFPPS_INVALID",
+ 1: "OFPPS_LINK_DOWN",
+ 2: "OFPPS_BLOCKED",
+ 4: "OFPPS_LIVE",
+}
+
+var OfpPortState_value = map[string]int32{
+ "OFPPS_INVALID": 0,
+ "OFPPS_LINK_DOWN": 1,
+ "OFPPS_BLOCKED": 2,
+ "OFPPS_LIVE": 4,
+}
+
+func (x OfpPortState) String() string {
+ return proto.EnumName(OfpPortState_name, int32(x))
+}
+
+func (OfpPortState) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{8}
+}
+
+// Features of ports available in a datapath.
+type OfpPortFeatures int32
+
+const (
+ OfpPortFeatures_OFPPF_INVALID OfpPortFeatures = 0
+ OfpPortFeatures_OFPPF_10MB_HD OfpPortFeatures = 1
+ OfpPortFeatures_OFPPF_10MB_FD OfpPortFeatures = 2
+ OfpPortFeatures_OFPPF_100MB_HD OfpPortFeatures = 4
+ OfpPortFeatures_OFPPF_100MB_FD OfpPortFeatures = 8
+ OfpPortFeatures_OFPPF_1GB_HD OfpPortFeatures = 16
+ OfpPortFeatures_OFPPF_1GB_FD OfpPortFeatures = 32
+ OfpPortFeatures_OFPPF_10GB_FD OfpPortFeatures = 64
+ OfpPortFeatures_OFPPF_40GB_FD OfpPortFeatures = 128
+ OfpPortFeatures_OFPPF_100GB_FD OfpPortFeatures = 256
+ OfpPortFeatures_OFPPF_1TB_FD OfpPortFeatures = 512
+ OfpPortFeatures_OFPPF_OTHER OfpPortFeatures = 1024
+ OfpPortFeatures_OFPPF_COPPER OfpPortFeatures = 2048
+ OfpPortFeatures_OFPPF_FIBER OfpPortFeatures = 4096
+ OfpPortFeatures_OFPPF_AUTONEG OfpPortFeatures = 8192
+ OfpPortFeatures_OFPPF_PAUSE OfpPortFeatures = 16384
+ OfpPortFeatures_OFPPF_PAUSE_ASYM OfpPortFeatures = 32768
+)
+
+var OfpPortFeatures_name = map[int32]string{
+ 0: "OFPPF_INVALID",
+ 1: "OFPPF_10MB_HD",
+ 2: "OFPPF_10MB_FD",
+ 4: "OFPPF_100MB_HD",
+ 8: "OFPPF_100MB_FD",
+ 16: "OFPPF_1GB_HD",
+ 32: "OFPPF_1GB_FD",
+ 64: "OFPPF_10GB_FD",
+ 128: "OFPPF_40GB_FD",
+ 256: "OFPPF_100GB_FD",
+ 512: "OFPPF_1TB_FD",
+ 1024: "OFPPF_OTHER",
+ 2048: "OFPPF_COPPER",
+ 4096: "OFPPF_FIBER",
+ 8192: "OFPPF_AUTONEG",
+ 16384: "OFPPF_PAUSE",
+ 32768: "OFPPF_PAUSE_ASYM",
+}
+
+var OfpPortFeatures_value = map[string]int32{
+ "OFPPF_INVALID": 0,
+ "OFPPF_10MB_HD": 1,
+ "OFPPF_10MB_FD": 2,
+ "OFPPF_100MB_HD": 4,
+ "OFPPF_100MB_FD": 8,
+ "OFPPF_1GB_HD": 16,
+ "OFPPF_1GB_FD": 32,
+ "OFPPF_10GB_FD": 64,
+ "OFPPF_40GB_FD": 128,
+ "OFPPF_100GB_FD": 256,
+ "OFPPF_1TB_FD": 512,
+ "OFPPF_OTHER": 1024,
+ "OFPPF_COPPER": 2048,
+ "OFPPF_FIBER": 4096,
+ "OFPPF_AUTONEG": 8192,
+ "OFPPF_PAUSE": 16384,
+ "OFPPF_PAUSE_ASYM": 32768,
+}
+
+func (x OfpPortFeatures) String() string {
+ return proto.EnumName(OfpPortFeatures_name, int32(x))
+}
+
+func (OfpPortFeatures) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{9}
+}
+
+// What changed about the physical port
+type OfpPortReason int32
+
+const (
+ OfpPortReason_OFPPR_ADD OfpPortReason = 0
+ OfpPortReason_OFPPR_DELETE OfpPortReason = 1
+ OfpPortReason_OFPPR_MODIFY OfpPortReason = 2
+)
+
+var OfpPortReason_name = map[int32]string{
+ 0: "OFPPR_ADD",
+ 1: "OFPPR_DELETE",
+ 2: "OFPPR_MODIFY",
+}
+
+var OfpPortReason_value = map[string]int32{
+ "OFPPR_ADD": 0,
+ "OFPPR_DELETE": 1,
+ "OFPPR_MODIFY": 2,
+}
+
+func (x OfpPortReason) String() string {
+ return proto.EnumName(OfpPortReason_name, int32(x))
+}
+
+func (OfpPortReason) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{10}
+}
+
+// The match type indicates the match structure (set of fields that compose the
+// match) in use. The match type is placed in the type field at the beginning
+// of all match structures. The "OpenFlow Extensible Match" type corresponds
+// to OXM TLV format described below and must be supported by all OpenFlow
+// switches. Extensions that define other match types may be published on the
+// ONF wiki. Support for extensions is optional.
+type OfpMatchType int32
+
+const (
+ OfpMatchType_OFPMT_STANDARD OfpMatchType = 0
+ OfpMatchType_OFPMT_OXM OfpMatchType = 1
+)
+
+var OfpMatchType_name = map[int32]string{
+ 0: "OFPMT_STANDARD",
+ 1: "OFPMT_OXM",
+}
+
+var OfpMatchType_value = map[string]int32{
+ "OFPMT_STANDARD": 0,
+ "OFPMT_OXM": 1,
+}
+
+func (x OfpMatchType) String() string {
+ return proto.EnumName(OfpMatchType_name, int32(x))
+}
+
+func (OfpMatchType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{11}
+}
+
+// OXM Class IDs.
+// The high order bit differentiate reserved classes from member classes.
+// Classes 0x0000 to 0x7FFF are member classes, allocated by ONF.
+// Classes 0x8000 to 0xFFFE are reserved classes, reserved for standardisation.
+type OfpOxmClass int32
+
+const (
+ OfpOxmClass_OFPXMC_NXM_0 OfpOxmClass = 0
+ OfpOxmClass_OFPXMC_NXM_1 OfpOxmClass = 1
+ OfpOxmClass_OFPXMC_OPENFLOW_BASIC OfpOxmClass = 32768
+ OfpOxmClass_OFPXMC_EXPERIMENTER OfpOxmClass = 65535
+)
+
+var OfpOxmClass_name = map[int32]string{
+ 0: "OFPXMC_NXM_0",
+ 1: "OFPXMC_NXM_1",
+ 32768: "OFPXMC_OPENFLOW_BASIC",
+ 65535: "OFPXMC_EXPERIMENTER",
+}
+
+var OfpOxmClass_value = map[string]int32{
+ "OFPXMC_NXM_0": 0,
+ "OFPXMC_NXM_1": 1,
+ "OFPXMC_OPENFLOW_BASIC": 32768,
+ "OFPXMC_EXPERIMENTER": 65535,
+}
+
+func (x OfpOxmClass) String() string {
+ return proto.EnumName(OfpOxmClass_name, int32(x))
+}
+
+func (OfpOxmClass) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{12}
+}
+
+// OXM Flow field types for OpenFlow basic class.
+type OxmOfbFieldTypes int32
+
+const (
+ OxmOfbFieldTypes_OFPXMT_OFB_IN_PORT OxmOfbFieldTypes = 0
+ OxmOfbFieldTypes_OFPXMT_OFB_IN_PHY_PORT OxmOfbFieldTypes = 1
+ OxmOfbFieldTypes_OFPXMT_OFB_METADATA OxmOfbFieldTypes = 2
+ OxmOfbFieldTypes_OFPXMT_OFB_ETH_DST OxmOfbFieldTypes = 3
+ OxmOfbFieldTypes_OFPXMT_OFB_ETH_SRC OxmOfbFieldTypes = 4
+ OxmOfbFieldTypes_OFPXMT_OFB_ETH_TYPE OxmOfbFieldTypes = 5
+ OxmOfbFieldTypes_OFPXMT_OFB_VLAN_VID OxmOfbFieldTypes = 6
+ OxmOfbFieldTypes_OFPXMT_OFB_VLAN_PCP OxmOfbFieldTypes = 7
+ OxmOfbFieldTypes_OFPXMT_OFB_IP_DSCP OxmOfbFieldTypes = 8
+ OxmOfbFieldTypes_OFPXMT_OFB_IP_ECN OxmOfbFieldTypes = 9
+ OxmOfbFieldTypes_OFPXMT_OFB_IP_PROTO OxmOfbFieldTypes = 10
+ OxmOfbFieldTypes_OFPXMT_OFB_IPV4_SRC OxmOfbFieldTypes = 11
+ OxmOfbFieldTypes_OFPXMT_OFB_IPV4_DST OxmOfbFieldTypes = 12
+ OxmOfbFieldTypes_OFPXMT_OFB_TCP_SRC OxmOfbFieldTypes = 13
+ OxmOfbFieldTypes_OFPXMT_OFB_TCP_DST OxmOfbFieldTypes = 14
+ OxmOfbFieldTypes_OFPXMT_OFB_UDP_SRC OxmOfbFieldTypes = 15
+ OxmOfbFieldTypes_OFPXMT_OFB_UDP_DST OxmOfbFieldTypes = 16
+ OxmOfbFieldTypes_OFPXMT_OFB_SCTP_SRC OxmOfbFieldTypes = 17
+ OxmOfbFieldTypes_OFPXMT_OFB_SCTP_DST OxmOfbFieldTypes = 18
+ OxmOfbFieldTypes_OFPXMT_OFB_ICMPV4_TYPE OxmOfbFieldTypes = 19
+ OxmOfbFieldTypes_OFPXMT_OFB_ICMPV4_CODE OxmOfbFieldTypes = 20
+ OxmOfbFieldTypes_OFPXMT_OFB_ARP_OP OxmOfbFieldTypes = 21
+ OxmOfbFieldTypes_OFPXMT_OFB_ARP_SPA OxmOfbFieldTypes = 22
+ OxmOfbFieldTypes_OFPXMT_OFB_ARP_TPA OxmOfbFieldTypes = 23
+ OxmOfbFieldTypes_OFPXMT_OFB_ARP_SHA OxmOfbFieldTypes = 24
+ OxmOfbFieldTypes_OFPXMT_OFB_ARP_THA OxmOfbFieldTypes = 25
+ OxmOfbFieldTypes_OFPXMT_OFB_IPV6_SRC OxmOfbFieldTypes = 26
+ OxmOfbFieldTypes_OFPXMT_OFB_IPV6_DST OxmOfbFieldTypes = 27
+ OxmOfbFieldTypes_OFPXMT_OFB_IPV6_FLABEL OxmOfbFieldTypes = 28
+ OxmOfbFieldTypes_OFPXMT_OFB_ICMPV6_TYPE OxmOfbFieldTypes = 29
+ OxmOfbFieldTypes_OFPXMT_OFB_ICMPV6_CODE OxmOfbFieldTypes = 30
+ OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_TARGET OxmOfbFieldTypes = 31
+ OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_SLL OxmOfbFieldTypes = 32
+ OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_TLL OxmOfbFieldTypes = 33
+ OxmOfbFieldTypes_OFPXMT_OFB_MPLS_LABEL OxmOfbFieldTypes = 34
+ OxmOfbFieldTypes_OFPXMT_OFB_MPLS_TC OxmOfbFieldTypes = 35
+ OxmOfbFieldTypes_OFPXMT_OFB_MPLS_BOS OxmOfbFieldTypes = 36
+ OxmOfbFieldTypes_OFPXMT_OFB_PBB_ISID OxmOfbFieldTypes = 37
+ OxmOfbFieldTypes_OFPXMT_OFB_TUNNEL_ID OxmOfbFieldTypes = 38
+ OxmOfbFieldTypes_OFPXMT_OFB_IPV6_EXTHDR OxmOfbFieldTypes = 39
+)
+
+var OxmOfbFieldTypes_name = map[int32]string{
+ 0: "OFPXMT_OFB_IN_PORT",
+ 1: "OFPXMT_OFB_IN_PHY_PORT",
+ 2: "OFPXMT_OFB_METADATA",
+ 3: "OFPXMT_OFB_ETH_DST",
+ 4: "OFPXMT_OFB_ETH_SRC",
+ 5: "OFPXMT_OFB_ETH_TYPE",
+ 6: "OFPXMT_OFB_VLAN_VID",
+ 7: "OFPXMT_OFB_VLAN_PCP",
+ 8: "OFPXMT_OFB_IP_DSCP",
+ 9: "OFPXMT_OFB_IP_ECN",
+ 10: "OFPXMT_OFB_IP_PROTO",
+ 11: "OFPXMT_OFB_IPV4_SRC",
+ 12: "OFPXMT_OFB_IPV4_DST",
+ 13: "OFPXMT_OFB_TCP_SRC",
+ 14: "OFPXMT_OFB_TCP_DST",
+ 15: "OFPXMT_OFB_UDP_SRC",
+ 16: "OFPXMT_OFB_UDP_DST",
+ 17: "OFPXMT_OFB_SCTP_SRC",
+ 18: "OFPXMT_OFB_SCTP_DST",
+ 19: "OFPXMT_OFB_ICMPV4_TYPE",
+ 20: "OFPXMT_OFB_ICMPV4_CODE",
+ 21: "OFPXMT_OFB_ARP_OP",
+ 22: "OFPXMT_OFB_ARP_SPA",
+ 23: "OFPXMT_OFB_ARP_TPA",
+ 24: "OFPXMT_OFB_ARP_SHA",
+ 25: "OFPXMT_OFB_ARP_THA",
+ 26: "OFPXMT_OFB_IPV6_SRC",
+ 27: "OFPXMT_OFB_IPV6_DST",
+ 28: "OFPXMT_OFB_IPV6_FLABEL",
+ 29: "OFPXMT_OFB_ICMPV6_TYPE",
+ 30: "OFPXMT_OFB_ICMPV6_CODE",
+ 31: "OFPXMT_OFB_IPV6_ND_TARGET",
+ 32: "OFPXMT_OFB_IPV6_ND_SLL",
+ 33: "OFPXMT_OFB_IPV6_ND_TLL",
+ 34: "OFPXMT_OFB_MPLS_LABEL",
+ 35: "OFPXMT_OFB_MPLS_TC",
+ 36: "OFPXMT_OFB_MPLS_BOS",
+ 37: "OFPXMT_OFB_PBB_ISID",
+ 38: "OFPXMT_OFB_TUNNEL_ID",
+ 39: "OFPXMT_OFB_IPV6_EXTHDR",
+}
+
+var OxmOfbFieldTypes_value = map[string]int32{
+ "OFPXMT_OFB_IN_PORT": 0,
+ "OFPXMT_OFB_IN_PHY_PORT": 1,
+ "OFPXMT_OFB_METADATA": 2,
+ "OFPXMT_OFB_ETH_DST": 3,
+ "OFPXMT_OFB_ETH_SRC": 4,
+ "OFPXMT_OFB_ETH_TYPE": 5,
+ "OFPXMT_OFB_VLAN_VID": 6,
+ "OFPXMT_OFB_VLAN_PCP": 7,
+ "OFPXMT_OFB_IP_DSCP": 8,
+ "OFPXMT_OFB_IP_ECN": 9,
+ "OFPXMT_OFB_IP_PROTO": 10,
+ "OFPXMT_OFB_IPV4_SRC": 11,
+ "OFPXMT_OFB_IPV4_DST": 12,
+ "OFPXMT_OFB_TCP_SRC": 13,
+ "OFPXMT_OFB_TCP_DST": 14,
+ "OFPXMT_OFB_UDP_SRC": 15,
+ "OFPXMT_OFB_UDP_DST": 16,
+ "OFPXMT_OFB_SCTP_SRC": 17,
+ "OFPXMT_OFB_SCTP_DST": 18,
+ "OFPXMT_OFB_ICMPV4_TYPE": 19,
+ "OFPXMT_OFB_ICMPV4_CODE": 20,
+ "OFPXMT_OFB_ARP_OP": 21,
+ "OFPXMT_OFB_ARP_SPA": 22,
+ "OFPXMT_OFB_ARP_TPA": 23,
+ "OFPXMT_OFB_ARP_SHA": 24,
+ "OFPXMT_OFB_ARP_THA": 25,
+ "OFPXMT_OFB_IPV6_SRC": 26,
+ "OFPXMT_OFB_IPV6_DST": 27,
+ "OFPXMT_OFB_IPV6_FLABEL": 28,
+ "OFPXMT_OFB_ICMPV6_TYPE": 29,
+ "OFPXMT_OFB_ICMPV6_CODE": 30,
+ "OFPXMT_OFB_IPV6_ND_TARGET": 31,
+ "OFPXMT_OFB_IPV6_ND_SLL": 32,
+ "OFPXMT_OFB_IPV6_ND_TLL": 33,
+ "OFPXMT_OFB_MPLS_LABEL": 34,
+ "OFPXMT_OFB_MPLS_TC": 35,
+ "OFPXMT_OFB_MPLS_BOS": 36,
+ "OFPXMT_OFB_PBB_ISID": 37,
+ "OFPXMT_OFB_TUNNEL_ID": 38,
+ "OFPXMT_OFB_IPV6_EXTHDR": 39,
+}
+
+func (x OxmOfbFieldTypes) String() string {
+ return proto.EnumName(OxmOfbFieldTypes_name, int32(x))
+}
+
+func (OxmOfbFieldTypes) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{13}
+}
+
+// The VLAN id is 12-bits, so we can use the entire 16 bits to indicate
+// special conditions.
+type OfpVlanId int32
+
+const (
+ OfpVlanId_OFPVID_NONE OfpVlanId = 0
+ OfpVlanId_OFPVID_PRESENT OfpVlanId = 4096
+)
+
+var OfpVlanId_name = map[int32]string{
+ 0: "OFPVID_NONE",
+ 4096: "OFPVID_PRESENT",
+}
+
+var OfpVlanId_value = map[string]int32{
+ "OFPVID_NONE": 0,
+ "OFPVID_PRESENT": 4096,
+}
+
+func (x OfpVlanId) String() string {
+ return proto.EnumName(OfpVlanId_name, int32(x))
+}
+
+func (OfpVlanId) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{14}
+}
+
+// Bit definitions for IPv6 Extension Header pseudo-field.
+type OfpIpv6ExthdrFlags int32
+
+const (
+ OfpIpv6ExthdrFlags_OFPIEH_INVALID OfpIpv6ExthdrFlags = 0
+ OfpIpv6ExthdrFlags_OFPIEH_NONEXT OfpIpv6ExthdrFlags = 1
+ OfpIpv6ExthdrFlags_OFPIEH_ESP OfpIpv6ExthdrFlags = 2
+ OfpIpv6ExthdrFlags_OFPIEH_AUTH OfpIpv6ExthdrFlags = 4
+ OfpIpv6ExthdrFlags_OFPIEH_DEST OfpIpv6ExthdrFlags = 8
+ OfpIpv6ExthdrFlags_OFPIEH_FRAG OfpIpv6ExthdrFlags = 16
+ OfpIpv6ExthdrFlags_OFPIEH_ROUTER OfpIpv6ExthdrFlags = 32
+ OfpIpv6ExthdrFlags_OFPIEH_HOP OfpIpv6ExthdrFlags = 64
+ OfpIpv6ExthdrFlags_OFPIEH_UNREP OfpIpv6ExthdrFlags = 128
+ OfpIpv6ExthdrFlags_OFPIEH_UNSEQ OfpIpv6ExthdrFlags = 256
+)
+
+var OfpIpv6ExthdrFlags_name = map[int32]string{
+ 0: "OFPIEH_INVALID",
+ 1: "OFPIEH_NONEXT",
+ 2: "OFPIEH_ESP",
+ 4: "OFPIEH_AUTH",
+ 8: "OFPIEH_DEST",
+ 16: "OFPIEH_FRAG",
+ 32: "OFPIEH_ROUTER",
+ 64: "OFPIEH_HOP",
+ 128: "OFPIEH_UNREP",
+ 256: "OFPIEH_UNSEQ",
+}
+
+var OfpIpv6ExthdrFlags_value = map[string]int32{
+ "OFPIEH_INVALID": 0,
+ "OFPIEH_NONEXT": 1,
+ "OFPIEH_ESP": 2,
+ "OFPIEH_AUTH": 4,
+ "OFPIEH_DEST": 8,
+ "OFPIEH_FRAG": 16,
+ "OFPIEH_ROUTER": 32,
+ "OFPIEH_HOP": 64,
+ "OFPIEH_UNREP": 128,
+ "OFPIEH_UNSEQ": 256,
+}
+
+func (x OfpIpv6ExthdrFlags) String() string {
+ return proto.EnumName(OfpIpv6ExthdrFlags_name, int32(x))
+}
+
+func (OfpIpv6ExthdrFlags) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{15}
+}
+
+type OfpActionType int32
+
+const (
+ OfpActionType_OFPAT_OUTPUT OfpActionType = 0
+ OfpActionType_OFPAT_COPY_TTL_OUT OfpActionType = 11
+ OfpActionType_OFPAT_COPY_TTL_IN OfpActionType = 12
+ OfpActionType_OFPAT_SET_MPLS_TTL OfpActionType = 15
+ OfpActionType_OFPAT_DEC_MPLS_TTL OfpActionType = 16
+ OfpActionType_OFPAT_PUSH_VLAN OfpActionType = 17
+ OfpActionType_OFPAT_POP_VLAN OfpActionType = 18
+ OfpActionType_OFPAT_PUSH_MPLS OfpActionType = 19
+ OfpActionType_OFPAT_POP_MPLS OfpActionType = 20
+ OfpActionType_OFPAT_SET_QUEUE OfpActionType = 21
+ OfpActionType_OFPAT_GROUP OfpActionType = 22
+ OfpActionType_OFPAT_SET_NW_TTL OfpActionType = 23
+ OfpActionType_OFPAT_DEC_NW_TTL OfpActionType = 24
+ OfpActionType_OFPAT_SET_FIELD OfpActionType = 25
+ OfpActionType_OFPAT_PUSH_PBB OfpActionType = 26
+ OfpActionType_OFPAT_POP_PBB OfpActionType = 27
+ OfpActionType_OFPAT_EXPERIMENTER OfpActionType = 65535
+)
+
+var OfpActionType_name = map[int32]string{
+ 0: "OFPAT_OUTPUT",
+ 11: "OFPAT_COPY_TTL_OUT",
+ 12: "OFPAT_COPY_TTL_IN",
+ 15: "OFPAT_SET_MPLS_TTL",
+ 16: "OFPAT_DEC_MPLS_TTL",
+ 17: "OFPAT_PUSH_VLAN",
+ 18: "OFPAT_POP_VLAN",
+ 19: "OFPAT_PUSH_MPLS",
+ 20: "OFPAT_POP_MPLS",
+ 21: "OFPAT_SET_QUEUE",
+ 22: "OFPAT_GROUP",
+ 23: "OFPAT_SET_NW_TTL",
+ 24: "OFPAT_DEC_NW_TTL",
+ 25: "OFPAT_SET_FIELD",
+ 26: "OFPAT_PUSH_PBB",
+ 27: "OFPAT_POP_PBB",
+ 65535: "OFPAT_EXPERIMENTER",
+}
+
+var OfpActionType_value = map[string]int32{
+ "OFPAT_OUTPUT": 0,
+ "OFPAT_COPY_TTL_OUT": 11,
+ "OFPAT_COPY_TTL_IN": 12,
+ "OFPAT_SET_MPLS_TTL": 15,
+ "OFPAT_DEC_MPLS_TTL": 16,
+ "OFPAT_PUSH_VLAN": 17,
+ "OFPAT_POP_VLAN": 18,
+ "OFPAT_PUSH_MPLS": 19,
+ "OFPAT_POP_MPLS": 20,
+ "OFPAT_SET_QUEUE": 21,
+ "OFPAT_GROUP": 22,
+ "OFPAT_SET_NW_TTL": 23,
+ "OFPAT_DEC_NW_TTL": 24,
+ "OFPAT_SET_FIELD": 25,
+ "OFPAT_PUSH_PBB": 26,
+ "OFPAT_POP_PBB": 27,
+ "OFPAT_EXPERIMENTER": 65535,
+}
+
+func (x OfpActionType) String() string {
+ return proto.EnumName(OfpActionType_name, int32(x))
+}
+
+func (OfpActionType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{16}
+}
+
+type OfpControllerMaxLen int32
+
+const (
+ OfpControllerMaxLen_OFPCML_INVALID OfpControllerMaxLen = 0
+ OfpControllerMaxLen_OFPCML_MAX OfpControllerMaxLen = 65509
+ OfpControllerMaxLen_OFPCML_NO_BUFFER OfpControllerMaxLen = 65535
+)
+
+var OfpControllerMaxLen_name = map[int32]string{
+ 0: "OFPCML_INVALID",
+ 65509: "OFPCML_MAX",
+ 65535: "OFPCML_NO_BUFFER",
+}
+
+var OfpControllerMaxLen_value = map[string]int32{
+ "OFPCML_INVALID": 0,
+ "OFPCML_MAX": 65509,
+ "OFPCML_NO_BUFFER": 65535,
+}
+
+func (x OfpControllerMaxLen) String() string {
+ return proto.EnumName(OfpControllerMaxLen_name, int32(x))
+}
+
+func (OfpControllerMaxLen) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{17}
+}
+
+type OfpInstructionType int32
+
+const (
+ OfpInstructionType_OFPIT_INVALID OfpInstructionType = 0
+ OfpInstructionType_OFPIT_GOTO_TABLE OfpInstructionType = 1
+ OfpInstructionType_OFPIT_WRITE_METADATA OfpInstructionType = 2
+ OfpInstructionType_OFPIT_WRITE_ACTIONS OfpInstructionType = 3
+ OfpInstructionType_OFPIT_APPLY_ACTIONS OfpInstructionType = 4
+ OfpInstructionType_OFPIT_CLEAR_ACTIONS OfpInstructionType = 5
+ OfpInstructionType_OFPIT_METER OfpInstructionType = 6
+ OfpInstructionType_OFPIT_EXPERIMENTER OfpInstructionType = 65535
+)
+
+var OfpInstructionType_name = map[int32]string{
+ 0: "OFPIT_INVALID",
+ 1: "OFPIT_GOTO_TABLE",
+ 2: "OFPIT_WRITE_METADATA",
+ 3: "OFPIT_WRITE_ACTIONS",
+ 4: "OFPIT_APPLY_ACTIONS",
+ 5: "OFPIT_CLEAR_ACTIONS",
+ 6: "OFPIT_METER",
+ 65535: "OFPIT_EXPERIMENTER",
+}
+
+var OfpInstructionType_value = map[string]int32{
+ "OFPIT_INVALID": 0,
+ "OFPIT_GOTO_TABLE": 1,
+ "OFPIT_WRITE_METADATA": 2,
+ "OFPIT_WRITE_ACTIONS": 3,
+ "OFPIT_APPLY_ACTIONS": 4,
+ "OFPIT_CLEAR_ACTIONS": 5,
+ "OFPIT_METER": 6,
+ "OFPIT_EXPERIMENTER": 65535,
+}
+
+func (x OfpInstructionType) String() string {
+ return proto.EnumName(OfpInstructionType_name, int32(x))
+}
+
+func (OfpInstructionType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{18}
+}
+
+type OfpFlowModCommand int32
+
+const (
+ OfpFlowModCommand_OFPFC_ADD OfpFlowModCommand = 0
+ OfpFlowModCommand_OFPFC_MODIFY OfpFlowModCommand = 1
+ OfpFlowModCommand_OFPFC_MODIFY_STRICT OfpFlowModCommand = 2
+ OfpFlowModCommand_OFPFC_DELETE OfpFlowModCommand = 3
+ OfpFlowModCommand_OFPFC_DELETE_STRICT OfpFlowModCommand = 4
+)
+
+var OfpFlowModCommand_name = map[int32]string{
+ 0: "OFPFC_ADD",
+ 1: "OFPFC_MODIFY",
+ 2: "OFPFC_MODIFY_STRICT",
+ 3: "OFPFC_DELETE",
+ 4: "OFPFC_DELETE_STRICT",
+}
+
+var OfpFlowModCommand_value = map[string]int32{
+ "OFPFC_ADD": 0,
+ "OFPFC_MODIFY": 1,
+ "OFPFC_MODIFY_STRICT": 2,
+ "OFPFC_DELETE": 3,
+ "OFPFC_DELETE_STRICT": 4,
+}
+
+func (x OfpFlowModCommand) String() string {
+ return proto.EnumName(OfpFlowModCommand_name, int32(x))
+}
+
+func (OfpFlowModCommand) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{19}
+}
+
+type OfpFlowModFlags int32
+
+const (
+ OfpFlowModFlags_OFPFF_INVALID OfpFlowModFlags = 0
+ OfpFlowModFlags_OFPFF_SEND_FLOW_REM OfpFlowModFlags = 1
+ OfpFlowModFlags_OFPFF_CHECK_OVERLAP OfpFlowModFlags = 2
+ OfpFlowModFlags_OFPFF_RESET_COUNTS OfpFlowModFlags = 4
+ OfpFlowModFlags_OFPFF_NO_PKT_COUNTS OfpFlowModFlags = 8
+ OfpFlowModFlags_OFPFF_NO_BYT_COUNTS OfpFlowModFlags = 16
+)
+
+var OfpFlowModFlags_name = map[int32]string{
+ 0: "OFPFF_INVALID",
+ 1: "OFPFF_SEND_FLOW_REM",
+ 2: "OFPFF_CHECK_OVERLAP",
+ 4: "OFPFF_RESET_COUNTS",
+ 8: "OFPFF_NO_PKT_COUNTS",
+ 16: "OFPFF_NO_BYT_COUNTS",
+}
+
+var OfpFlowModFlags_value = map[string]int32{
+ "OFPFF_INVALID": 0,
+ "OFPFF_SEND_FLOW_REM": 1,
+ "OFPFF_CHECK_OVERLAP": 2,
+ "OFPFF_RESET_COUNTS": 4,
+ "OFPFF_NO_PKT_COUNTS": 8,
+ "OFPFF_NO_BYT_COUNTS": 16,
+}
+
+func (x OfpFlowModFlags) String() string {
+ return proto.EnumName(OfpFlowModFlags_name, int32(x))
+}
+
+func (OfpFlowModFlags) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{20}
+}
+
+// Group numbering. Groups can use any number up to OFPG_MAX.
+type OfpGroup int32
+
+const (
+ OfpGroup_OFPG_INVALID OfpGroup = 0
+ // Last usable group number.
+ OfpGroup_OFPG_MAX OfpGroup = 2147483392
+ // Fake groups.
+ OfpGroup_OFPG_ALL OfpGroup = 2147483644
+ OfpGroup_OFPG_ANY OfpGroup = 2147483647
+)
+
+var OfpGroup_name = map[int32]string{
+ 0: "OFPG_INVALID",
+ 2147483392: "OFPG_MAX",
+ 2147483644: "OFPG_ALL",
+ 2147483647: "OFPG_ANY",
+}
+
+var OfpGroup_value = map[string]int32{
+ "OFPG_INVALID": 0,
+ "OFPG_MAX": 2147483392,
+ "OFPG_ALL": 2147483644,
+ "OFPG_ANY": 2147483647,
+}
+
+func (x OfpGroup) String() string {
+ return proto.EnumName(OfpGroup_name, int32(x))
+}
+
+func (OfpGroup) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{21}
+}
+
+// Group commands
+type OfpGroupModCommand int32
+
+const (
+ OfpGroupModCommand_OFPGC_ADD OfpGroupModCommand = 0
+ OfpGroupModCommand_OFPGC_MODIFY OfpGroupModCommand = 1
+ OfpGroupModCommand_OFPGC_DELETE OfpGroupModCommand = 2
+)
+
+var OfpGroupModCommand_name = map[int32]string{
+ 0: "OFPGC_ADD",
+ 1: "OFPGC_MODIFY",
+ 2: "OFPGC_DELETE",
+}
+
+var OfpGroupModCommand_value = map[string]int32{
+ "OFPGC_ADD": 0,
+ "OFPGC_MODIFY": 1,
+ "OFPGC_DELETE": 2,
+}
+
+func (x OfpGroupModCommand) String() string {
+ return proto.EnumName(OfpGroupModCommand_name, int32(x))
+}
+
+func (OfpGroupModCommand) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{22}
+}
+
+// Group types. Values in the range [128; 255] are reserved for experimental
+// use.
+type OfpGroupType int32
+
+const (
+ OfpGroupType_OFPGT_ALL OfpGroupType = 0
+ OfpGroupType_OFPGT_SELECT OfpGroupType = 1
+ OfpGroupType_OFPGT_INDIRECT OfpGroupType = 2
+ OfpGroupType_OFPGT_FF OfpGroupType = 3
+)
+
+var OfpGroupType_name = map[int32]string{
+ 0: "OFPGT_ALL",
+ 1: "OFPGT_SELECT",
+ 2: "OFPGT_INDIRECT",
+ 3: "OFPGT_FF",
+}
+
+var OfpGroupType_value = map[string]int32{
+ "OFPGT_ALL": 0,
+ "OFPGT_SELECT": 1,
+ "OFPGT_INDIRECT": 2,
+ "OFPGT_FF": 3,
+}
+
+func (x OfpGroupType) String() string {
+ return proto.EnumName(OfpGroupType_name, int32(x))
+}
+
+func (OfpGroupType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{23}
+}
+
+// Why is this packet being sent to the controller?
+type OfpPacketInReason int32
+
+const (
+ OfpPacketInReason_OFPR_NO_MATCH OfpPacketInReason = 0
+ OfpPacketInReason_OFPR_ACTION OfpPacketInReason = 1
+ OfpPacketInReason_OFPR_INVALID_TTL OfpPacketInReason = 2
+)
+
+var OfpPacketInReason_name = map[int32]string{
+ 0: "OFPR_NO_MATCH",
+ 1: "OFPR_ACTION",
+ 2: "OFPR_INVALID_TTL",
+}
+
+var OfpPacketInReason_value = map[string]int32{
+ "OFPR_NO_MATCH": 0,
+ "OFPR_ACTION": 1,
+ "OFPR_INVALID_TTL": 2,
+}
+
+func (x OfpPacketInReason) String() string {
+ return proto.EnumName(OfpPacketInReason_name, int32(x))
+}
+
+func (OfpPacketInReason) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{24}
+}
+
+// Why was this flow removed?
+type OfpFlowRemovedReason int32
+
+const (
+ OfpFlowRemovedReason_OFPRR_IDLE_TIMEOUT OfpFlowRemovedReason = 0
+ OfpFlowRemovedReason_OFPRR_HARD_TIMEOUT OfpFlowRemovedReason = 1
+ OfpFlowRemovedReason_OFPRR_DELETE OfpFlowRemovedReason = 2
+ OfpFlowRemovedReason_OFPRR_GROUP_DELETE OfpFlowRemovedReason = 3
+ OfpFlowRemovedReason_OFPRR_METER_DELETE OfpFlowRemovedReason = 4
+)
+
+var OfpFlowRemovedReason_name = map[int32]string{
+ 0: "OFPRR_IDLE_TIMEOUT",
+ 1: "OFPRR_HARD_TIMEOUT",
+ 2: "OFPRR_DELETE",
+ 3: "OFPRR_GROUP_DELETE",
+ 4: "OFPRR_METER_DELETE",
+}
+
+var OfpFlowRemovedReason_value = map[string]int32{
+ "OFPRR_IDLE_TIMEOUT": 0,
+ "OFPRR_HARD_TIMEOUT": 1,
+ "OFPRR_DELETE": 2,
+ "OFPRR_GROUP_DELETE": 3,
+ "OFPRR_METER_DELETE": 4,
+}
+
+func (x OfpFlowRemovedReason) String() string {
+ return proto.EnumName(OfpFlowRemovedReason_name, int32(x))
+}
+
+func (OfpFlowRemovedReason) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{25}
+}
+
+// Meter numbering. Flow meters can use any number up to OFPM_MAX.
+type OfpMeter int32
+
+const (
+ OfpMeter_OFPM_ZERO OfpMeter = 0
+ // Last usable meter.
+ OfpMeter_OFPM_MAX OfpMeter = 2147418112
+ // Virtual meters.
+ OfpMeter_OFPM_SLOWPATH OfpMeter = 2147483645
+ OfpMeter_OFPM_CONTROLLER OfpMeter = 2147483646
+ OfpMeter_OFPM_ALL OfpMeter = 2147483647
+)
+
+var OfpMeter_name = map[int32]string{
+ 0: "OFPM_ZERO",
+ 2147418112: "OFPM_MAX",
+ 2147483645: "OFPM_SLOWPATH",
+ 2147483646: "OFPM_CONTROLLER",
+ 2147483647: "OFPM_ALL",
+}
+
+var OfpMeter_value = map[string]int32{
+ "OFPM_ZERO": 0,
+ "OFPM_MAX": 2147418112,
+ "OFPM_SLOWPATH": 2147483645,
+ "OFPM_CONTROLLER": 2147483646,
+ "OFPM_ALL": 2147483647,
+}
+
+func (x OfpMeter) String() string {
+ return proto.EnumName(OfpMeter_name, int32(x))
+}
+
+func (OfpMeter) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{26}
+}
+
+// Meter band types
+type OfpMeterBandType int32
+
+const (
+ OfpMeterBandType_OFPMBT_INVALID OfpMeterBandType = 0
+ OfpMeterBandType_OFPMBT_DROP OfpMeterBandType = 1
+ OfpMeterBandType_OFPMBT_DSCP_REMARK OfpMeterBandType = 2
+ OfpMeterBandType_OFPMBT_EXPERIMENTER OfpMeterBandType = 65535
+)
+
+var OfpMeterBandType_name = map[int32]string{
+ 0: "OFPMBT_INVALID",
+ 1: "OFPMBT_DROP",
+ 2: "OFPMBT_DSCP_REMARK",
+ 65535: "OFPMBT_EXPERIMENTER",
+}
+
+var OfpMeterBandType_value = map[string]int32{
+ "OFPMBT_INVALID": 0,
+ "OFPMBT_DROP": 1,
+ "OFPMBT_DSCP_REMARK": 2,
+ "OFPMBT_EXPERIMENTER": 65535,
+}
+
+func (x OfpMeterBandType) String() string {
+ return proto.EnumName(OfpMeterBandType_name, int32(x))
+}
+
+func (OfpMeterBandType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{27}
+}
+
+// Meter commands
+type OfpMeterModCommand int32
+
+const (
+ OfpMeterModCommand_OFPMC_ADD OfpMeterModCommand = 0
+ OfpMeterModCommand_OFPMC_MODIFY OfpMeterModCommand = 1
+ OfpMeterModCommand_OFPMC_DELETE OfpMeterModCommand = 2
+)
+
+var OfpMeterModCommand_name = map[int32]string{
+ 0: "OFPMC_ADD",
+ 1: "OFPMC_MODIFY",
+ 2: "OFPMC_DELETE",
+}
+
+var OfpMeterModCommand_value = map[string]int32{
+ "OFPMC_ADD": 0,
+ "OFPMC_MODIFY": 1,
+ "OFPMC_DELETE": 2,
+}
+
+func (x OfpMeterModCommand) String() string {
+ return proto.EnumName(OfpMeterModCommand_name, int32(x))
+}
+
+func (OfpMeterModCommand) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{28}
+}
+
+// Meter configuration flags
+type OfpMeterFlags int32
+
+const (
+ OfpMeterFlags_OFPMF_INVALID OfpMeterFlags = 0
+ OfpMeterFlags_OFPMF_KBPS OfpMeterFlags = 1
+ OfpMeterFlags_OFPMF_PKTPS OfpMeterFlags = 2
+ OfpMeterFlags_OFPMF_BURST OfpMeterFlags = 4
+ OfpMeterFlags_OFPMF_STATS OfpMeterFlags = 8
+)
+
+var OfpMeterFlags_name = map[int32]string{
+ 0: "OFPMF_INVALID",
+ 1: "OFPMF_KBPS",
+ 2: "OFPMF_PKTPS",
+ 4: "OFPMF_BURST",
+ 8: "OFPMF_STATS",
+}
+
+var OfpMeterFlags_value = map[string]int32{
+ "OFPMF_INVALID": 0,
+ "OFPMF_KBPS": 1,
+ "OFPMF_PKTPS": 2,
+ "OFPMF_BURST": 4,
+ "OFPMF_STATS": 8,
+}
+
+func (x OfpMeterFlags) String() string {
+ return proto.EnumName(OfpMeterFlags_name, int32(x))
+}
+
+func (OfpMeterFlags) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{29}
+}
+
+// Values for 'type' in ofp_error_message. These values are immutable: they
+// will not change in future versions of the protocol (although new values may
+// be added).
+type OfpErrorType int32
+
+const (
+ OfpErrorType_OFPET_HELLO_FAILED OfpErrorType = 0
+ OfpErrorType_OFPET_BAD_REQUEST OfpErrorType = 1
+ OfpErrorType_OFPET_BAD_ACTION OfpErrorType = 2
+ OfpErrorType_OFPET_BAD_INSTRUCTION OfpErrorType = 3
+ OfpErrorType_OFPET_BAD_MATCH OfpErrorType = 4
+ OfpErrorType_OFPET_FLOW_MOD_FAILED OfpErrorType = 5
+ OfpErrorType_OFPET_GROUP_MOD_FAILED OfpErrorType = 6
+ OfpErrorType_OFPET_PORT_MOD_FAILED OfpErrorType = 7
+ OfpErrorType_OFPET_TABLE_MOD_FAILED OfpErrorType = 8
+ OfpErrorType_OFPET_QUEUE_OP_FAILED OfpErrorType = 9
+ OfpErrorType_OFPET_SWITCH_CONFIG_FAILED OfpErrorType = 10
+ OfpErrorType_OFPET_ROLE_REQUEST_FAILED OfpErrorType = 11
+ OfpErrorType_OFPET_METER_MOD_FAILED OfpErrorType = 12
+ OfpErrorType_OFPET_TABLE_FEATURES_FAILED OfpErrorType = 13
+ OfpErrorType_OFPET_EXPERIMENTER OfpErrorType = 65535
+)
+
+var OfpErrorType_name = map[int32]string{
+ 0: "OFPET_HELLO_FAILED",
+ 1: "OFPET_BAD_REQUEST",
+ 2: "OFPET_BAD_ACTION",
+ 3: "OFPET_BAD_INSTRUCTION",
+ 4: "OFPET_BAD_MATCH",
+ 5: "OFPET_FLOW_MOD_FAILED",
+ 6: "OFPET_GROUP_MOD_FAILED",
+ 7: "OFPET_PORT_MOD_FAILED",
+ 8: "OFPET_TABLE_MOD_FAILED",
+ 9: "OFPET_QUEUE_OP_FAILED",
+ 10: "OFPET_SWITCH_CONFIG_FAILED",
+ 11: "OFPET_ROLE_REQUEST_FAILED",
+ 12: "OFPET_METER_MOD_FAILED",
+ 13: "OFPET_TABLE_FEATURES_FAILED",
+ 65535: "OFPET_EXPERIMENTER",
+}
+
+var OfpErrorType_value = map[string]int32{
+ "OFPET_HELLO_FAILED": 0,
+ "OFPET_BAD_REQUEST": 1,
+ "OFPET_BAD_ACTION": 2,
+ "OFPET_BAD_INSTRUCTION": 3,
+ "OFPET_BAD_MATCH": 4,
+ "OFPET_FLOW_MOD_FAILED": 5,
+ "OFPET_GROUP_MOD_FAILED": 6,
+ "OFPET_PORT_MOD_FAILED": 7,
+ "OFPET_TABLE_MOD_FAILED": 8,
+ "OFPET_QUEUE_OP_FAILED": 9,
+ "OFPET_SWITCH_CONFIG_FAILED": 10,
+ "OFPET_ROLE_REQUEST_FAILED": 11,
+ "OFPET_METER_MOD_FAILED": 12,
+ "OFPET_TABLE_FEATURES_FAILED": 13,
+ "OFPET_EXPERIMENTER": 65535,
+}
+
+func (x OfpErrorType) String() string {
+ return proto.EnumName(OfpErrorType_name, int32(x))
+}
+
+func (OfpErrorType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{30}
+}
+
+// ofp_error_msg 'code' values for OFPET_HELLO_FAILED. 'data' contains an
+// ASCII text string that may give failure details.
+type OfpHelloFailedCode int32
+
+const (
+ OfpHelloFailedCode_OFPHFC_INCOMPATIBLE OfpHelloFailedCode = 0
+ OfpHelloFailedCode_OFPHFC_EPERM OfpHelloFailedCode = 1
+)
+
+var OfpHelloFailedCode_name = map[int32]string{
+ 0: "OFPHFC_INCOMPATIBLE",
+ 1: "OFPHFC_EPERM",
+}
+
+var OfpHelloFailedCode_value = map[string]int32{
+ "OFPHFC_INCOMPATIBLE": 0,
+ "OFPHFC_EPERM": 1,
+}
+
+func (x OfpHelloFailedCode) String() string {
+ return proto.EnumName(OfpHelloFailedCode_name, int32(x))
+}
+
+func (OfpHelloFailedCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{31}
+}
+
+// ofp_error_msg 'code' values for OFPET_BAD_REQUEST. 'data' contains at least
+// the first 64 bytes of the failed request.
+type OfpBadRequestCode int32
+
+const (
+ OfpBadRequestCode_OFPBRC_BAD_VERSION OfpBadRequestCode = 0
+ OfpBadRequestCode_OFPBRC_BAD_TYPE OfpBadRequestCode = 1
+ OfpBadRequestCode_OFPBRC_BAD_MULTIPART OfpBadRequestCode = 2
+ OfpBadRequestCode_OFPBRC_BAD_EXPERIMENTER OfpBadRequestCode = 3
+ OfpBadRequestCode_OFPBRC_BAD_EXP_TYPE OfpBadRequestCode = 4
+ OfpBadRequestCode_OFPBRC_EPERM OfpBadRequestCode = 5
+ OfpBadRequestCode_OFPBRC_BAD_LEN OfpBadRequestCode = 6
+ OfpBadRequestCode_OFPBRC_BUFFER_EMPTY OfpBadRequestCode = 7
+ OfpBadRequestCode_OFPBRC_BUFFER_UNKNOWN OfpBadRequestCode = 8
+ OfpBadRequestCode_OFPBRC_BAD_TABLE_ID OfpBadRequestCode = 9
+ OfpBadRequestCode_OFPBRC_IS_SLAVE OfpBadRequestCode = 10
+ OfpBadRequestCode_OFPBRC_BAD_PORT OfpBadRequestCode = 11
+ OfpBadRequestCode_OFPBRC_BAD_PACKET OfpBadRequestCode = 12
+ OfpBadRequestCode_OFPBRC_MULTIPART_BUFFER_OVERFLOW OfpBadRequestCode = 13
+)
+
+var OfpBadRequestCode_name = map[int32]string{
+ 0: "OFPBRC_BAD_VERSION",
+ 1: "OFPBRC_BAD_TYPE",
+ 2: "OFPBRC_BAD_MULTIPART",
+ 3: "OFPBRC_BAD_EXPERIMENTER",
+ 4: "OFPBRC_BAD_EXP_TYPE",
+ 5: "OFPBRC_EPERM",
+ 6: "OFPBRC_BAD_LEN",
+ 7: "OFPBRC_BUFFER_EMPTY",
+ 8: "OFPBRC_BUFFER_UNKNOWN",
+ 9: "OFPBRC_BAD_TABLE_ID",
+ 10: "OFPBRC_IS_SLAVE",
+ 11: "OFPBRC_BAD_PORT",
+ 12: "OFPBRC_BAD_PACKET",
+ 13: "OFPBRC_MULTIPART_BUFFER_OVERFLOW",
+}
+
+var OfpBadRequestCode_value = map[string]int32{
+ "OFPBRC_BAD_VERSION": 0,
+ "OFPBRC_BAD_TYPE": 1,
+ "OFPBRC_BAD_MULTIPART": 2,
+ "OFPBRC_BAD_EXPERIMENTER": 3,
+ "OFPBRC_BAD_EXP_TYPE": 4,
+ "OFPBRC_EPERM": 5,
+ "OFPBRC_BAD_LEN": 6,
+ "OFPBRC_BUFFER_EMPTY": 7,
+ "OFPBRC_BUFFER_UNKNOWN": 8,
+ "OFPBRC_BAD_TABLE_ID": 9,
+ "OFPBRC_IS_SLAVE": 10,
+ "OFPBRC_BAD_PORT": 11,
+ "OFPBRC_BAD_PACKET": 12,
+ "OFPBRC_MULTIPART_BUFFER_OVERFLOW": 13,
+}
+
+func (x OfpBadRequestCode) String() string {
+ return proto.EnumName(OfpBadRequestCode_name, int32(x))
+}
+
+func (OfpBadRequestCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{32}
+}
+
+// ofp_error_msg 'code' values for OFPET_BAD_ACTION. 'data' contains at least
+// the first 64 bytes of the failed request.
+type OfpBadActionCode int32
+
+const (
+ OfpBadActionCode_OFPBAC_BAD_TYPE OfpBadActionCode = 0
+ OfpBadActionCode_OFPBAC_BAD_LEN OfpBadActionCode = 1
+ OfpBadActionCode_OFPBAC_BAD_EXPERIMENTER OfpBadActionCode = 2
+ OfpBadActionCode_OFPBAC_BAD_EXP_TYPE OfpBadActionCode = 3
+ OfpBadActionCode_OFPBAC_BAD_OUT_PORT OfpBadActionCode = 4
+ OfpBadActionCode_OFPBAC_BAD_ARGUMENT OfpBadActionCode = 5
+ OfpBadActionCode_OFPBAC_EPERM OfpBadActionCode = 6
+ OfpBadActionCode_OFPBAC_TOO_MANY OfpBadActionCode = 7
+ OfpBadActionCode_OFPBAC_BAD_QUEUE OfpBadActionCode = 8
+ OfpBadActionCode_OFPBAC_BAD_OUT_GROUP OfpBadActionCode = 9
+ OfpBadActionCode_OFPBAC_MATCH_INCONSISTENT OfpBadActionCode = 10
+ OfpBadActionCode_OFPBAC_UNSUPPORTED_ORDER OfpBadActionCode = 11
+ OfpBadActionCode_OFPBAC_BAD_TAG OfpBadActionCode = 12
+ OfpBadActionCode_OFPBAC_BAD_SET_TYPE OfpBadActionCode = 13
+ OfpBadActionCode_OFPBAC_BAD_SET_LEN OfpBadActionCode = 14
+ OfpBadActionCode_OFPBAC_BAD_SET_ARGUMENT OfpBadActionCode = 15
+)
+
+var OfpBadActionCode_name = map[int32]string{
+ 0: "OFPBAC_BAD_TYPE",
+ 1: "OFPBAC_BAD_LEN",
+ 2: "OFPBAC_BAD_EXPERIMENTER",
+ 3: "OFPBAC_BAD_EXP_TYPE",
+ 4: "OFPBAC_BAD_OUT_PORT",
+ 5: "OFPBAC_BAD_ARGUMENT",
+ 6: "OFPBAC_EPERM",
+ 7: "OFPBAC_TOO_MANY",
+ 8: "OFPBAC_BAD_QUEUE",
+ 9: "OFPBAC_BAD_OUT_GROUP",
+ 10: "OFPBAC_MATCH_INCONSISTENT",
+ 11: "OFPBAC_UNSUPPORTED_ORDER",
+ 12: "OFPBAC_BAD_TAG",
+ 13: "OFPBAC_BAD_SET_TYPE",
+ 14: "OFPBAC_BAD_SET_LEN",
+ 15: "OFPBAC_BAD_SET_ARGUMENT",
+}
+
+var OfpBadActionCode_value = map[string]int32{
+ "OFPBAC_BAD_TYPE": 0,
+ "OFPBAC_BAD_LEN": 1,
+ "OFPBAC_BAD_EXPERIMENTER": 2,
+ "OFPBAC_BAD_EXP_TYPE": 3,
+ "OFPBAC_BAD_OUT_PORT": 4,
+ "OFPBAC_BAD_ARGUMENT": 5,
+ "OFPBAC_EPERM": 6,
+ "OFPBAC_TOO_MANY": 7,
+ "OFPBAC_BAD_QUEUE": 8,
+ "OFPBAC_BAD_OUT_GROUP": 9,
+ "OFPBAC_MATCH_INCONSISTENT": 10,
+ "OFPBAC_UNSUPPORTED_ORDER": 11,
+ "OFPBAC_BAD_TAG": 12,
+ "OFPBAC_BAD_SET_TYPE": 13,
+ "OFPBAC_BAD_SET_LEN": 14,
+ "OFPBAC_BAD_SET_ARGUMENT": 15,
+}
+
+func (x OfpBadActionCode) String() string {
+ return proto.EnumName(OfpBadActionCode_name, int32(x))
+}
+
+func (OfpBadActionCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{33}
+}
+
+// ofp_error_msg 'code' values for OFPET_BAD_INSTRUCTION. 'data' contains at
+// least the first 64 bytes of the failed request.
+type OfpBadInstructionCode int32
+
+const (
+ OfpBadInstructionCode_OFPBIC_UNKNOWN_INST OfpBadInstructionCode = 0
+ OfpBadInstructionCode_OFPBIC_UNSUP_INST OfpBadInstructionCode = 1
+ OfpBadInstructionCode_OFPBIC_BAD_TABLE_ID OfpBadInstructionCode = 2
+ OfpBadInstructionCode_OFPBIC_UNSUP_METADATA OfpBadInstructionCode = 3
+ OfpBadInstructionCode_OFPBIC_UNSUP_METADATA_MASK OfpBadInstructionCode = 4
+ OfpBadInstructionCode_OFPBIC_BAD_EXPERIMENTER OfpBadInstructionCode = 5
+ OfpBadInstructionCode_OFPBIC_BAD_EXP_TYPE OfpBadInstructionCode = 6
+ OfpBadInstructionCode_OFPBIC_BAD_LEN OfpBadInstructionCode = 7
+ OfpBadInstructionCode_OFPBIC_EPERM OfpBadInstructionCode = 8
+)
+
+var OfpBadInstructionCode_name = map[int32]string{
+ 0: "OFPBIC_UNKNOWN_INST",
+ 1: "OFPBIC_UNSUP_INST",
+ 2: "OFPBIC_BAD_TABLE_ID",
+ 3: "OFPBIC_UNSUP_METADATA",
+ 4: "OFPBIC_UNSUP_METADATA_MASK",
+ 5: "OFPBIC_BAD_EXPERIMENTER",
+ 6: "OFPBIC_BAD_EXP_TYPE",
+ 7: "OFPBIC_BAD_LEN",
+ 8: "OFPBIC_EPERM",
+}
+
+var OfpBadInstructionCode_value = map[string]int32{
+ "OFPBIC_UNKNOWN_INST": 0,
+ "OFPBIC_UNSUP_INST": 1,
+ "OFPBIC_BAD_TABLE_ID": 2,
+ "OFPBIC_UNSUP_METADATA": 3,
+ "OFPBIC_UNSUP_METADATA_MASK": 4,
+ "OFPBIC_BAD_EXPERIMENTER": 5,
+ "OFPBIC_BAD_EXP_TYPE": 6,
+ "OFPBIC_BAD_LEN": 7,
+ "OFPBIC_EPERM": 8,
+}
+
+func (x OfpBadInstructionCode) String() string {
+ return proto.EnumName(OfpBadInstructionCode_name, int32(x))
+}
+
+func (OfpBadInstructionCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{34}
+}
+
+// ofp_error_msg 'code' values for OFPET_BAD_MATCH. 'data' contains at least
+// the first 64 bytes of the failed request.
+type OfpBadMatchCode int32
+
+const (
+ OfpBadMatchCode_OFPBMC_BAD_TYPE OfpBadMatchCode = 0
+ OfpBadMatchCode_OFPBMC_BAD_LEN OfpBadMatchCode = 1
+ OfpBadMatchCode_OFPBMC_BAD_TAG OfpBadMatchCode = 2
+ OfpBadMatchCode_OFPBMC_BAD_DL_ADDR_MASK OfpBadMatchCode = 3
+ OfpBadMatchCode_OFPBMC_BAD_NW_ADDR_MASK OfpBadMatchCode = 4
+ OfpBadMatchCode_OFPBMC_BAD_WILDCARDS OfpBadMatchCode = 5
+ OfpBadMatchCode_OFPBMC_BAD_FIELD OfpBadMatchCode = 6
+ OfpBadMatchCode_OFPBMC_BAD_VALUE OfpBadMatchCode = 7
+ OfpBadMatchCode_OFPBMC_BAD_MASK OfpBadMatchCode = 8
+ OfpBadMatchCode_OFPBMC_BAD_PREREQ OfpBadMatchCode = 9
+ OfpBadMatchCode_OFPBMC_DUP_FIELD OfpBadMatchCode = 10
+ OfpBadMatchCode_OFPBMC_EPERM OfpBadMatchCode = 11
+)
+
+var OfpBadMatchCode_name = map[int32]string{
+ 0: "OFPBMC_BAD_TYPE",
+ 1: "OFPBMC_BAD_LEN",
+ 2: "OFPBMC_BAD_TAG",
+ 3: "OFPBMC_BAD_DL_ADDR_MASK",
+ 4: "OFPBMC_BAD_NW_ADDR_MASK",
+ 5: "OFPBMC_BAD_WILDCARDS",
+ 6: "OFPBMC_BAD_FIELD",
+ 7: "OFPBMC_BAD_VALUE",
+ 8: "OFPBMC_BAD_MASK",
+ 9: "OFPBMC_BAD_PREREQ",
+ 10: "OFPBMC_DUP_FIELD",
+ 11: "OFPBMC_EPERM",
+}
+
+var OfpBadMatchCode_value = map[string]int32{
+ "OFPBMC_BAD_TYPE": 0,
+ "OFPBMC_BAD_LEN": 1,
+ "OFPBMC_BAD_TAG": 2,
+ "OFPBMC_BAD_DL_ADDR_MASK": 3,
+ "OFPBMC_BAD_NW_ADDR_MASK": 4,
+ "OFPBMC_BAD_WILDCARDS": 5,
+ "OFPBMC_BAD_FIELD": 6,
+ "OFPBMC_BAD_VALUE": 7,
+ "OFPBMC_BAD_MASK": 8,
+ "OFPBMC_BAD_PREREQ": 9,
+ "OFPBMC_DUP_FIELD": 10,
+ "OFPBMC_EPERM": 11,
+}
+
+func (x OfpBadMatchCode) String() string {
+ return proto.EnumName(OfpBadMatchCode_name, int32(x))
+}
+
+func (OfpBadMatchCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{35}
+}
+
+// ofp_error_msg 'code' values for OFPET_FLOW_MOD_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpFlowModFailedCode int32
+
+const (
+ OfpFlowModFailedCode_OFPFMFC_UNKNOWN OfpFlowModFailedCode = 0
+ OfpFlowModFailedCode_OFPFMFC_TABLE_FULL OfpFlowModFailedCode = 1
+ OfpFlowModFailedCode_OFPFMFC_BAD_TABLE_ID OfpFlowModFailedCode = 2
+ OfpFlowModFailedCode_OFPFMFC_OVERLAP OfpFlowModFailedCode = 3
+ OfpFlowModFailedCode_OFPFMFC_EPERM OfpFlowModFailedCode = 4
+ OfpFlowModFailedCode_OFPFMFC_BAD_TIMEOUT OfpFlowModFailedCode = 5
+ OfpFlowModFailedCode_OFPFMFC_BAD_COMMAND OfpFlowModFailedCode = 6
+ OfpFlowModFailedCode_OFPFMFC_BAD_FLAGS OfpFlowModFailedCode = 7
+)
+
+var OfpFlowModFailedCode_name = map[int32]string{
+ 0: "OFPFMFC_UNKNOWN",
+ 1: "OFPFMFC_TABLE_FULL",
+ 2: "OFPFMFC_BAD_TABLE_ID",
+ 3: "OFPFMFC_OVERLAP",
+ 4: "OFPFMFC_EPERM",
+ 5: "OFPFMFC_BAD_TIMEOUT",
+ 6: "OFPFMFC_BAD_COMMAND",
+ 7: "OFPFMFC_BAD_FLAGS",
+}
+
+var OfpFlowModFailedCode_value = map[string]int32{
+ "OFPFMFC_UNKNOWN": 0,
+ "OFPFMFC_TABLE_FULL": 1,
+ "OFPFMFC_BAD_TABLE_ID": 2,
+ "OFPFMFC_OVERLAP": 3,
+ "OFPFMFC_EPERM": 4,
+ "OFPFMFC_BAD_TIMEOUT": 5,
+ "OFPFMFC_BAD_COMMAND": 6,
+ "OFPFMFC_BAD_FLAGS": 7,
+}
+
+func (x OfpFlowModFailedCode) String() string {
+ return proto.EnumName(OfpFlowModFailedCode_name, int32(x))
+}
+
+func (OfpFlowModFailedCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{36}
+}
+
+// ofp_error_msg 'code' values for OFPET_GROUP_MOD_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpGroupModFailedCode int32
+
+const (
+ OfpGroupModFailedCode_OFPGMFC_GROUP_EXISTS OfpGroupModFailedCode = 0
+ OfpGroupModFailedCode_OFPGMFC_INVALID_GROUP OfpGroupModFailedCode = 1
+ OfpGroupModFailedCode_OFPGMFC_WEIGHT_UNSUPPORTED OfpGroupModFailedCode = 2
+ OfpGroupModFailedCode_OFPGMFC_OUT_OF_GROUPS OfpGroupModFailedCode = 3
+ OfpGroupModFailedCode_OFPGMFC_OUT_OF_BUCKETS OfpGroupModFailedCode = 4
+ OfpGroupModFailedCode_OFPGMFC_CHAINING_UNSUPPORTED OfpGroupModFailedCode = 5
+ OfpGroupModFailedCode_OFPGMFC_WATCH_UNSUPPORTED OfpGroupModFailedCode = 6
+ OfpGroupModFailedCode_OFPGMFC_LOOP OfpGroupModFailedCode = 7
+ OfpGroupModFailedCode_OFPGMFC_UNKNOWN_GROUP OfpGroupModFailedCode = 8
+ OfpGroupModFailedCode_OFPGMFC_CHAINED_GROUP OfpGroupModFailedCode = 9
+ OfpGroupModFailedCode_OFPGMFC_BAD_TYPE OfpGroupModFailedCode = 10
+ OfpGroupModFailedCode_OFPGMFC_BAD_COMMAND OfpGroupModFailedCode = 11
+ OfpGroupModFailedCode_OFPGMFC_BAD_BUCKET OfpGroupModFailedCode = 12
+ OfpGroupModFailedCode_OFPGMFC_BAD_WATCH OfpGroupModFailedCode = 13
+ OfpGroupModFailedCode_OFPGMFC_EPERM OfpGroupModFailedCode = 14
+)
+
+var OfpGroupModFailedCode_name = map[int32]string{
+ 0: "OFPGMFC_GROUP_EXISTS",
+ 1: "OFPGMFC_INVALID_GROUP",
+ 2: "OFPGMFC_WEIGHT_UNSUPPORTED",
+ 3: "OFPGMFC_OUT_OF_GROUPS",
+ 4: "OFPGMFC_OUT_OF_BUCKETS",
+ 5: "OFPGMFC_CHAINING_UNSUPPORTED",
+ 6: "OFPGMFC_WATCH_UNSUPPORTED",
+ 7: "OFPGMFC_LOOP",
+ 8: "OFPGMFC_UNKNOWN_GROUP",
+ 9: "OFPGMFC_CHAINED_GROUP",
+ 10: "OFPGMFC_BAD_TYPE",
+ 11: "OFPGMFC_BAD_COMMAND",
+ 12: "OFPGMFC_BAD_BUCKET",
+ 13: "OFPGMFC_BAD_WATCH",
+ 14: "OFPGMFC_EPERM",
+}
+
+var OfpGroupModFailedCode_value = map[string]int32{
+ "OFPGMFC_GROUP_EXISTS": 0,
+ "OFPGMFC_INVALID_GROUP": 1,
+ "OFPGMFC_WEIGHT_UNSUPPORTED": 2,
+ "OFPGMFC_OUT_OF_GROUPS": 3,
+ "OFPGMFC_OUT_OF_BUCKETS": 4,
+ "OFPGMFC_CHAINING_UNSUPPORTED": 5,
+ "OFPGMFC_WATCH_UNSUPPORTED": 6,
+ "OFPGMFC_LOOP": 7,
+ "OFPGMFC_UNKNOWN_GROUP": 8,
+ "OFPGMFC_CHAINED_GROUP": 9,
+ "OFPGMFC_BAD_TYPE": 10,
+ "OFPGMFC_BAD_COMMAND": 11,
+ "OFPGMFC_BAD_BUCKET": 12,
+ "OFPGMFC_BAD_WATCH": 13,
+ "OFPGMFC_EPERM": 14,
+}
+
+func (x OfpGroupModFailedCode) String() string {
+ return proto.EnumName(OfpGroupModFailedCode_name, int32(x))
+}
+
+func (OfpGroupModFailedCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{37}
+}
+
+// ofp_error_msg 'code' values for OFPET_PORT_MOD_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpPortModFailedCode int32
+
+const (
+ OfpPortModFailedCode_OFPPMFC_BAD_PORT OfpPortModFailedCode = 0
+ OfpPortModFailedCode_OFPPMFC_BAD_HW_ADDR OfpPortModFailedCode = 1
+ OfpPortModFailedCode_OFPPMFC_BAD_CONFIG OfpPortModFailedCode = 2
+ OfpPortModFailedCode_OFPPMFC_BAD_ADVERTISE OfpPortModFailedCode = 3
+ OfpPortModFailedCode_OFPPMFC_EPERM OfpPortModFailedCode = 4
+)
+
+var OfpPortModFailedCode_name = map[int32]string{
+ 0: "OFPPMFC_BAD_PORT",
+ 1: "OFPPMFC_BAD_HW_ADDR",
+ 2: "OFPPMFC_BAD_CONFIG",
+ 3: "OFPPMFC_BAD_ADVERTISE",
+ 4: "OFPPMFC_EPERM",
+}
+
+var OfpPortModFailedCode_value = map[string]int32{
+ "OFPPMFC_BAD_PORT": 0,
+ "OFPPMFC_BAD_HW_ADDR": 1,
+ "OFPPMFC_BAD_CONFIG": 2,
+ "OFPPMFC_BAD_ADVERTISE": 3,
+ "OFPPMFC_EPERM": 4,
+}
+
+func (x OfpPortModFailedCode) String() string {
+ return proto.EnumName(OfpPortModFailedCode_name, int32(x))
+}
+
+func (OfpPortModFailedCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{38}
+}
+
+// ofp_error_msg 'code' values for OFPET_TABLE_MOD_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpTableModFailedCode int32
+
+const (
+ OfpTableModFailedCode_OFPTMFC_BAD_TABLE OfpTableModFailedCode = 0
+ OfpTableModFailedCode_OFPTMFC_BAD_CONFIG OfpTableModFailedCode = 1
+ OfpTableModFailedCode_OFPTMFC_EPERM OfpTableModFailedCode = 2
+)
+
+var OfpTableModFailedCode_name = map[int32]string{
+ 0: "OFPTMFC_BAD_TABLE",
+ 1: "OFPTMFC_BAD_CONFIG",
+ 2: "OFPTMFC_EPERM",
+}
+
+var OfpTableModFailedCode_value = map[string]int32{
+ "OFPTMFC_BAD_TABLE": 0,
+ "OFPTMFC_BAD_CONFIG": 1,
+ "OFPTMFC_EPERM": 2,
+}
+
+func (x OfpTableModFailedCode) String() string {
+ return proto.EnumName(OfpTableModFailedCode_name, int32(x))
+}
+
+func (OfpTableModFailedCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{39}
+}
+
+// ofp_error msg 'code' values for OFPET_QUEUE_OP_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request
+type OfpQueueOpFailedCode int32
+
+const (
+ OfpQueueOpFailedCode_OFPQOFC_BAD_PORT OfpQueueOpFailedCode = 0
+ OfpQueueOpFailedCode_OFPQOFC_BAD_QUEUE OfpQueueOpFailedCode = 1
+ OfpQueueOpFailedCode_OFPQOFC_EPERM OfpQueueOpFailedCode = 2
+)
+
+var OfpQueueOpFailedCode_name = map[int32]string{
+ 0: "OFPQOFC_BAD_PORT",
+ 1: "OFPQOFC_BAD_QUEUE",
+ 2: "OFPQOFC_EPERM",
+}
+
+var OfpQueueOpFailedCode_value = map[string]int32{
+ "OFPQOFC_BAD_PORT": 0,
+ "OFPQOFC_BAD_QUEUE": 1,
+ "OFPQOFC_EPERM": 2,
+}
+
+func (x OfpQueueOpFailedCode) String() string {
+ return proto.EnumName(OfpQueueOpFailedCode_name, int32(x))
+}
+
+func (OfpQueueOpFailedCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{40}
+}
+
+// ofp_error_msg 'code' values for OFPET_SWITCH_CONFIG_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpSwitchConfigFailedCode int32
+
+const (
+ OfpSwitchConfigFailedCode_OFPSCFC_BAD_FLAGS OfpSwitchConfigFailedCode = 0
+ OfpSwitchConfigFailedCode_OFPSCFC_BAD_LEN OfpSwitchConfigFailedCode = 1
+ OfpSwitchConfigFailedCode_OFPSCFC_EPERM OfpSwitchConfigFailedCode = 2
+)
+
+var OfpSwitchConfigFailedCode_name = map[int32]string{
+ 0: "OFPSCFC_BAD_FLAGS",
+ 1: "OFPSCFC_BAD_LEN",
+ 2: "OFPSCFC_EPERM",
+}
+
+var OfpSwitchConfigFailedCode_value = map[string]int32{
+ "OFPSCFC_BAD_FLAGS": 0,
+ "OFPSCFC_BAD_LEN": 1,
+ "OFPSCFC_EPERM": 2,
+}
+
+func (x OfpSwitchConfigFailedCode) String() string {
+ return proto.EnumName(OfpSwitchConfigFailedCode_name, int32(x))
+}
+
+func (OfpSwitchConfigFailedCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{41}
+}
+
+// ofp_error_msg 'code' values for OFPET_ROLE_REQUEST_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpRoleRequestFailedCode int32
+
+const (
+ OfpRoleRequestFailedCode_OFPRRFC_STALE OfpRoleRequestFailedCode = 0
+ OfpRoleRequestFailedCode_OFPRRFC_UNSUP OfpRoleRequestFailedCode = 1
+ OfpRoleRequestFailedCode_OFPRRFC_BAD_ROLE OfpRoleRequestFailedCode = 2
+)
+
+var OfpRoleRequestFailedCode_name = map[int32]string{
+ 0: "OFPRRFC_STALE",
+ 1: "OFPRRFC_UNSUP",
+ 2: "OFPRRFC_BAD_ROLE",
+}
+
+var OfpRoleRequestFailedCode_value = map[string]int32{
+ "OFPRRFC_STALE": 0,
+ "OFPRRFC_UNSUP": 1,
+ "OFPRRFC_BAD_ROLE": 2,
+}
+
+func (x OfpRoleRequestFailedCode) String() string {
+ return proto.EnumName(OfpRoleRequestFailedCode_name, int32(x))
+}
+
+func (OfpRoleRequestFailedCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{42}
+}
+
+// ofp_error_msg 'code' values for OFPET_METER_MOD_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpMeterModFailedCode int32
+
+const (
+ OfpMeterModFailedCode_OFPMMFC_UNKNOWN OfpMeterModFailedCode = 0
+ OfpMeterModFailedCode_OFPMMFC_METER_EXISTS OfpMeterModFailedCode = 1
+ OfpMeterModFailedCode_OFPMMFC_INVALID_METER OfpMeterModFailedCode = 2
+ OfpMeterModFailedCode_OFPMMFC_UNKNOWN_METER OfpMeterModFailedCode = 3
+ OfpMeterModFailedCode_OFPMMFC_BAD_COMMAND OfpMeterModFailedCode = 4
+ OfpMeterModFailedCode_OFPMMFC_BAD_FLAGS OfpMeterModFailedCode = 5
+ OfpMeterModFailedCode_OFPMMFC_BAD_RATE OfpMeterModFailedCode = 6
+ OfpMeterModFailedCode_OFPMMFC_BAD_BURST OfpMeterModFailedCode = 7
+ OfpMeterModFailedCode_OFPMMFC_BAD_BAND OfpMeterModFailedCode = 8
+ OfpMeterModFailedCode_OFPMMFC_BAD_BAND_VALUE OfpMeterModFailedCode = 9
+ OfpMeterModFailedCode_OFPMMFC_OUT_OF_METERS OfpMeterModFailedCode = 10
+ OfpMeterModFailedCode_OFPMMFC_OUT_OF_BANDS OfpMeterModFailedCode = 11
+)
+
+var OfpMeterModFailedCode_name = map[int32]string{
+ 0: "OFPMMFC_UNKNOWN",
+ 1: "OFPMMFC_METER_EXISTS",
+ 2: "OFPMMFC_INVALID_METER",
+ 3: "OFPMMFC_UNKNOWN_METER",
+ 4: "OFPMMFC_BAD_COMMAND",
+ 5: "OFPMMFC_BAD_FLAGS",
+ 6: "OFPMMFC_BAD_RATE",
+ 7: "OFPMMFC_BAD_BURST",
+ 8: "OFPMMFC_BAD_BAND",
+ 9: "OFPMMFC_BAD_BAND_VALUE",
+ 10: "OFPMMFC_OUT_OF_METERS",
+ 11: "OFPMMFC_OUT_OF_BANDS",
+}
+
+var OfpMeterModFailedCode_value = map[string]int32{
+ "OFPMMFC_UNKNOWN": 0,
+ "OFPMMFC_METER_EXISTS": 1,
+ "OFPMMFC_INVALID_METER": 2,
+ "OFPMMFC_UNKNOWN_METER": 3,
+ "OFPMMFC_BAD_COMMAND": 4,
+ "OFPMMFC_BAD_FLAGS": 5,
+ "OFPMMFC_BAD_RATE": 6,
+ "OFPMMFC_BAD_BURST": 7,
+ "OFPMMFC_BAD_BAND": 8,
+ "OFPMMFC_BAD_BAND_VALUE": 9,
+ "OFPMMFC_OUT_OF_METERS": 10,
+ "OFPMMFC_OUT_OF_BANDS": 11,
+}
+
+func (x OfpMeterModFailedCode) String() string {
+ return proto.EnumName(OfpMeterModFailedCode_name, int32(x))
+}
+
+func (OfpMeterModFailedCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{43}
+}
+
+// ofp_error_msg 'code' values for OFPET_TABLE_FEATURES_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpTableFeaturesFailedCode int32
+
+const (
+ OfpTableFeaturesFailedCode_OFPTFFC_BAD_TABLE OfpTableFeaturesFailedCode = 0
+ OfpTableFeaturesFailedCode_OFPTFFC_BAD_METADATA OfpTableFeaturesFailedCode = 1
+ OfpTableFeaturesFailedCode_OFPTFFC_BAD_TYPE OfpTableFeaturesFailedCode = 2
+ OfpTableFeaturesFailedCode_OFPTFFC_BAD_LEN OfpTableFeaturesFailedCode = 3
+ OfpTableFeaturesFailedCode_OFPTFFC_BAD_ARGUMENT OfpTableFeaturesFailedCode = 4
+ OfpTableFeaturesFailedCode_OFPTFFC_EPERM OfpTableFeaturesFailedCode = 5
+)
+
+var OfpTableFeaturesFailedCode_name = map[int32]string{
+ 0: "OFPTFFC_BAD_TABLE",
+ 1: "OFPTFFC_BAD_METADATA",
+ 2: "OFPTFFC_BAD_TYPE",
+ 3: "OFPTFFC_BAD_LEN",
+ 4: "OFPTFFC_BAD_ARGUMENT",
+ 5: "OFPTFFC_EPERM",
+}
+
+var OfpTableFeaturesFailedCode_value = map[string]int32{
+ "OFPTFFC_BAD_TABLE": 0,
+ "OFPTFFC_BAD_METADATA": 1,
+ "OFPTFFC_BAD_TYPE": 2,
+ "OFPTFFC_BAD_LEN": 3,
+ "OFPTFFC_BAD_ARGUMENT": 4,
+ "OFPTFFC_EPERM": 5,
+}
+
+func (x OfpTableFeaturesFailedCode) String() string {
+ return proto.EnumName(OfpTableFeaturesFailedCode_name, int32(x))
+}
+
+func (OfpTableFeaturesFailedCode) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{44}
+}
+
+type OfpMultipartType int32
+
+const (
+ // Description of this OpenFlow switch.
+ // The request body is empty.
+ // The reply body is struct ofp_desc.
+ OfpMultipartType_OFPMP_DESC OfpMultipartType = 0
+ // Individual flow statistics.
+ // The request body is struct ofp_flow_stats_request.
+ // The reply body is an array of struct ofp_flow_stats.
+ OfpMultipartType_OFPMP_FLOW OfpMultipartType = 1
+ // Aggregate flow statistics.
+ // The request body is struct ofp_aggregate_stats_request.
+ // The reply body is struct ofp_aggregate_stats_reply.
+ OfpMultipartType_OFPMP_AGGREGATE OfpMultipartType = 2
+ // Flow table statistics.
+ // The request body is empty.
+ // The reply body is an array of struct ofp_table_stats.
+ OfpMultipartType_OFPMP_TABLE OfpMultipartType = 3
+ // Port statistics.
+ // The request body is struct ofp_port_stats_request.
+ // The reply body is an array of struct ofp_port_stats.
+ OfpMultipartType_OFPMP_PORT_STATS OfpMultipartType = 4
+ // Queue statistics for a port
+ // The request body is struct ofp_queue_stats_request.
+ // The reply body is an array of struct ofp_queue_stats
+ OfpMultipartType_OFPMP_QUEUE OfpMultipartType = 5
+ // Group counter statistics.
+ // The request body is struct ofp_group_stats_request.
+ // The reply is an array of struct ofp_group_stats.
+ OfpMultipartType_OFPMP_GROUP OfpMultipartType = 6
+ // Group description.
+ // The request body is empty.
+ // The reply body is an array of struct ofp_group_desc.
+ OfpMultipartType_OFPMP_GROUP_DESC OfpMultipartType = 7
+ // Group features.
+ // The request body is empty.
+ // The reply body is struct ofp_group_features.
+ OfpMultipartType_OFPMP_GROUP_FEATURES OfpMultipartType = 8
+ // Meter statistics.
+ // The request body is struct ofp_meter_multipart_requests.
+ // The reply body is an array of struct ofp_meter_stats.
+ OfpMultipartType_OFPMP_METER OfpMultipartType = 9
+ // Meter configuration.
+ // The request body is struct ofp_meter_multipart_requests.
+ // The reply body is an array of struct ofp_meter_config.
+ OfpMultipartType_OFPMP_METER_CONFIG OfpMultipartType = 10
+ // Meter features.
+ // The request body is empty.
+ // The reply body is struct ofp_meter_features.
+ OfpMultipartType_OFPMP_METER_FEATURES OfpMultipartType = 11
+ // Table features.
+ // The request body is either empty or contains an array of
+ // struct ofp_table_features containing the controller's
+ // desired view of the switch. If the switch is unable to
+ // set the specified view an error is returned.
+ // The reply body is an array of struct ofp_table_features.
+ OfpMultipartType_OFPMP_TABLE_FEATURES OfpMultipartType = 12
+ // Port description.
+ // The request body is empty.
+ // The reply body is an array of struct ofp_port.
+ OfpMultipartType_OFPMP_PORT_DESC OfpMultipartType = 13
+ // Experimenter extension.
+ // The request and reply bodies begin with
+ // struct ofp_experimenter_multipart_header.
+ // The request and reply bodies are otherwise experimenter-defined.
+ OfpMultipartType_OFPMP_EXPERIMENTER OfpMultipartType = 65535
+)
+
+var OfpMultipartType_name = map[int32]string{
+ 0: "OFPMP_DESC",
+ 1: "OFPMP_FLOW",
+ 2: "OFPMP_AGGREGATE",
+ 3: "OFPMP_TABLE",
+ 4: "OFPMP_PORT_STATS",
+ 5: "OFPMP_QUEUE",
+ 6: "OFPMP_GROUP",
+ 7: "OFPMP_GROUP_DESC",
+ 8: "OFPMP_GROUP_FEATURES",
+ 9: "OFPMP_METER",
+ 10: "OFPMP_METER_CONFIG",
+ 11: "OFPMP_METER_FEATURES",
+ 12: "OFPMP_TABLE_FEATURES",
+ 13: "OFPMP_PORT_DESC",
+ 65535: "OFPMP_EXPERIMENTER",
+}
+
+var OfpMultipartType_value = map[string]int32{
+ "OFPMP_DESC": 0,
+ "OFPMP_FLOW": 1,
+ "OFPMP_AGGREGATE": 2,
+ "OFPMP_TABLE": 3,
+ "OFPMP_PORT_STATS": 4,
+ "OFPMP_QUEUE": 5,
+ "OFPMP_GROUP": 6,
+ "OFPMP_GROUP_DESC": 7,
+ "OFPMP_GROUP_FEATURES": 8,
+ "OFPMP_METER": 9,
+ "OFPMP_METER_CONFIG": 10,
+ "OFPMP_METER_FEATURES": 11,
+ "OFPMP_TABLE_FEATURES": 12,
+ "OFPMP_PORT_DESC": 13,
+ "OFPMP_EXPERIMENTER": 65535,
+}
+
+func (x OfpMultipartType) String() string {
+ return proto.EnumName(OfpMultipartType_name, int32(x))
+}
+
+func (OfpMultipartType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{45}
+}
+
+type OfpMultipartRequestFlags int32
+
+const (
+ OfpMultipartRequestFlags_OFPMPF_REQ_INVALID OfpMultipartRequestFlags = 0
+ OfpMultipartRequestFlags_OFPMPF_REQ_MORE OfpMultipartRequestFlags = 1
+)
+
+var OfpMultipartRequestFlags_name = map[int32]string{
+ 0: "OFPMPF_REQ_INVALID",
+ 1: "OFPMPF_REQ_MORE",
+}
+
+var OfpMultipartRequestFlags_value = map[string]int32{
+ "OFPMPF_REQ_INVALID": 0,
+ "OFPMPF_REQ_MORE": 1,
+}
+
+func (x OfpMultipartRequestFlags) String() string {
+ return proto.EnumName(OfpMultipartRequestFlags_name, int32(x))
+}
+
+func (OfpMultipartRequestFlags) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{46}
+}
+
+type OfpMultipartReplyFlags int32
+
+const (
+ OfpMultipartReplyFlags_OFPMPF_REPLY_INVALID OfpMultipartReplyFlags = 0
+ OfpMultipartReplyFlags_OFPMPF_REPLY_MORE OfpMultipartReplyFlags = 1
+)
+
+var OfpMultipartReplyFlags_name = map[int32]string{
+ 0: "OFPMPF_REPLY_INVALID",
+ 1: "OFPMPF_REPLY_MORE",
+}
+
+var OfpMultipartReplyFlags_value = map[string]int32{
+ "OFPMPF_REPLY_INVALID": 0,
+ "OFPMPF_REPLY_MORE": 1,
+}
+
+func (x OfpMultipartReplyFlags) String() string {
+ return proto.EnumName(OfpMultipartReplyFlags_name, int32(x))
+}
+
+func (OfpMultipartReplyFlags) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{47}
+}
+
+// Table Feature property types.
+// Low order bit cleared indicates a property for a regular Flow Entry.
+// Low order bit set indicates a property for the Table-Miss Flow Entry.
+type OfpTableFeaturePropType int32
+
+const (
+ OfpTableFeaturePropType_OFPTFPT_INSTRUCTIONS OfpTableFeaturePropType = 0
+ OfpTableFeaturePropType_OFPTFPT_INSTRUCTIONS_MISS OfpTableFeaturePropType = 1
+ OfpTableFeaturePropType_OFPTFPT_NEXT_TABLES OfpTableFeaturePropType = 2
+ OfpTableFeaturePropType_OFPTFPT_NEXT_TABLES_MISS OfpTableFeaturePropType = 3
+ OfpTableFeaturePropType_OFPTFPT_WRITE_ACTIONS OfpTableFeaturePropType = 4
+ OfpTableFeaturePropType_OFPTFPT_WRITE_ACTIONS_MISS OfpTableFeaturePropType = 5
+ OfpTableFeaturePropType_OFPTFPT_APPLY_ACTIONS OfpTableFeaturePropType = 6
+ OfpTableFeaturePropType_OFPTFPT_APPLY_ACTIONS_MISS OfpTableFeaturePropType = 7
+ OfpTableFeaturePropType_OFPTFPT_MATCH OfpTableFeaturePropType = 8
+ OfpTableFeaturePropType_OFPTFPT_WILDCARDS OfpTableFeaturePropType = 10
+ OfpTableFeaturePropType_OFPTFPT_WRITE_SETFIELD OfpTableFeaturePropType = 12
+ OfpTableFeaturePropType_OFPTFPT_WRITE_SETFIELD_MISS OfpTableFeaturePropType = 13
+ OfpTableFeaturePropType_OFPTFPT_APPLY_SETFIELD OfpTableFeaturePropType = 14
+ OfpTableFeaturePropType_OFPTFPT_APPLY_SETFIELD_MISS OfpTableFeaturePropType = 15
+ OfpTableFeaturePropType_OFPTFPT_EXPERIMENTER OfpTableFeaturePropType = 65534
+ OfpTableFeaturePropType_OFPTFPT_EXPERIMENTER_MISS OfpTableFeaturePropType = 65535
+)
+
+var OfpTableFeaturePropType_name = map[int32]string{
+ 0: "OFPTFPT_INSTRUCTIONS",
+ 1: "OFPTFPT_INSTRUCTIONS_MISS",
+ 2: "OFPTFPT_NEXT_TABLES",
+ 3: "OFPTFPT_NEXT_TABLES_MISS",
+ 4: "OFPTFPT_WRITE_ACTIONS",
+ 5: "OFPTFPT_WRITE_ACTIONS_MISS",
+ 6: "OFPTFPT_APPLY_ACTIONS",
+ 7: "OFPTFPT_APPLY_ACTIONS_MISS",
+ 8: "OFPTFPT_MATCH",
+ 10: "OFPTFPT_WILDCARDS",
+ 12: "OFPTFPT_WRITE_SETFIELD",
+ 13: "OFPTFPT_WRITE_SETFIELD_MISS",
+ 14: "OFPTFPT_APPLY_SETFIELD",
+ 15: "OFPTFPT_APPLY_SETFIELD_MISS",
+ 65534: "OFPTFPT_EXPERIMENTER",
+ 65535: "OFPTFPT_EXPERIMENTER_MISS",
+}
+
+var OfpTableFeaturePropType_value = map[string]int32{
+ "OFPTFPT_INSTRUCTIONS": 0,
+ "OFPTFPT_INSTRUCTIONS_MISS": 1,
+ "OFPTFPT_NEXT_TABLES": 2,
+ "OFPTFPT_NEXT_TABLES_MISS": 3,
+ "OFPTFPT_WRITE_ACTIONS": 4,
+ "OFPTFPT_WRITE_ACTIONS_MISS": 5,
+ "OFPTFPT_APPLY_ACTIONS": 6,
+ "OFPTFPT_APPLY_ACTIONS_MISS": 7,
+ "OFPTFPT_MATCH": 8,
+ "OFPTFPT_WILDCARDS": 10,
+ "OFPTFPT_WRITE_SETFIELD": 12,
+ "OFPTFPT_WRITE_SETFIELD_MISS": 13,
+ "OFPTFPT_APPLY_SETFIELD": 14,
+ "OFPTFPT_APPLY_SETFIELD_MISS": 15,
+ "OFPTFPT_EXPERIMENTER": 65534,
+ "OFPTFPT_EXPERIMENTER_MISS": 65535,
+}
+
+func (x OfpTableFeaturePropType) String() string {
+ return proto.EnumName(OfpTableFeaturePropType_name, int32(x))
+}
+
+func (OfpTableFeaturePropType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{48}
+}
+
+// Group configuration flags
+type OfpGroupCapabilities int32
+
+const (
+ OfpGroupCapabilities_OFPGFC_INVALID OfpGroupCapabilities = 0
+ OfpGroupCapabilities_OFPGFC_SELECT_WEIGHT OfpGroupCapabilities = 1
+ OfpGroupCapabilities_OFPGFC_SELECT_LIVENESS OfpGroupCapabilities = 2
+ OfpGroupCapabilities_OFPGFC_CHAINING OfpGroupCapabilities = 4
+ OfpGroupCapabilities_OFPGFC_CHAINING_CHECKS OfpGroupCapabilities = 8
+)
+
+var OfpGroupCapabilities_name = map[int32]string{
+ 0: "OFPGFC_INVALID",
+ 1: "OFPGFC_SELECT_WEIGHT",
+ 2: "OFPGFC_SELECT_LIVENESS",
+ 4: "OFPGFC_CHAINING",
+ 8: "OFPGFC_CHAINING_CHECKS",
+}
+
+var OfpGroupCapabilities_value = map[string]int32{
+ "OFPGFC_INVALID": 0,
+ "OFPGFC_SELECT_WEIGHT": 1,
+ "OFPGFC_SELECT_LIVENESS": 2,
+ "OFPGFC_CHAINING": 4,
+ "OFPGFC_CHAINING_CHECKS": 8,
+}
+
+func (x OfpGroupCapabilities) String() string {
+ return proto.EnumName(OfpGroupCapabilities_name, int32(x))
+}
+
+func (OfpGroupCapabilities) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{49}
+}
+
+type OfpQueueProperties int32
+
+const (
+ OfpQueueProperties_OFPQT_INVALID OfpQueueProperties = 0
+ OfpQueueProperties_OFPQT_MIN_RATE OfpQueueProperties = 1
+ OfpQueueProperties_OFPQT_MAX_RATE OfpQueueProperties = 2
+ OfpQueueProperties_OFPQT_EXPERIMENTER OfpQueueProperties = 65535
+)
+
+var OfpQueueProperties_name = map[int32]string{
+ 0: "OFPQT_INVALID",
+ 1: "OFPQT_MIN_RATE",
+ 2: "OFPQT_MAX_RATE",
+ 65535: "OFPQT_EXPERIMENTER",
+}
+
+var OfpQueueProperties_value = map[string]int32{
+ "OFPQT_INVALID": 0,
+ "OFPQT_MIN_RATE": 1,
+ "OFPQT_MAX_RATE": 2,
+ "OFPQT_EXPERIMENTER": 65535,
+}
+
+func (x OfpQueueProperties) String() string {
+ return proto.EnumName(OfpQueueProperties_name, int32(x))
+}
+
+func (OfpQueueProperties) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{50}
+}
+
+// Controller roles.
+type OfpControllerRole int32
+
+const (
+ OfpControllerRole_OFPCR_ROLE_NOCHANGE OfpControllerRole = 0
+ OfpControllerRole_OFPCR_ROLE_EQUAL OfpControllerRole = 1
+ OfpControllerRole_OFPCR_ROLE_MASTER OfpControllerRole = 2
+ OfpControllerRole_OFPCR_ROLE_SLAVE OfpControllerRole = 3
+)
+
+var OfpControllerRole_name = map[int32]string{
+ 0: "OFPCR_ROLE_NOCHANGE",
+ 1: "OFPCR_ROLE_EQUAL",
+ 2: "OFPCR_ROLE_MASTER",
+ 3: "OFPCR_ROLE_SLAVE",
+}
+
+var OfpControllerRole_value = map[string]int32{
+ "OFPCR_ROLE_NOCHANGE": 0,
+ "OFPCR_ROLE_EQUAL": 1,
+ "OFPCR_ROLE_MASTER": 2,
+ "OFPCR_ROLE_SLAVE": 3,
+}
+
+func (x OfpControllerRole) String() string {
+ return proto.EnumName(OfpControllerRole_name, int32(x))
+}
+
+func (OfpControllerRole) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{51}
+}
+
+// Header on all OpenFlow packets.
+type OfpHeader struct {
+ Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+ Type OfpType `protobuf:"varint,2,opt,name=type,proto3,enum=openflow_13.OfpType" json:"type,omitempty"`
+ Xid uint32 `protobuf:"varint,3,opt,name=xid,proto3" json:"xid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpHeader) Reset() { *m = OfpHeader{} }
+func (m *OfpHeader) String() string { return proto.CompactTextString(m) }
+func (*OfpHeader) ProtoMessage() {}
+func (*OfpHeader) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{0}
+}
+
+func (m *OfpHeader) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpHeader.Unmarshal(m, b)
+}
+func (m *OfpHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpHeader.Marshal(b, m, deterministic)
+}
+func (m *OfpHeader) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpHeader.Merge(m, src)
+}
+func (m *OfpHeader) XXX_Size() int {
+ return xxx_messageInfo_OfpHeader.Size(m)
+}
+func (m *OfpHeader) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpHeader proto.InternalMessageInfo
+
+func (m *OfpHeader) GetVersion() uint32 {
+ if m != nil {
+ return m.Version
+ }
+ return 0
+}
+
+func (m *OfpHeader) GetType() OfpType {
+ if m != nil {
+ return m.Type
+ }
+ return OfpType_OFPT_HELLO
+}
+
+func (m *OfpHeader) GetXid() uint32 {
+ if m != nil {
+ return m.Xid
+ }
+ return 0
+}
+
+// Common header for all Hello Elements
+type OfpHelloElemHeader struct {
+ Type OfpHelloElemType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpHelloElemType" json:"type,omitempty"`
+ // Types that are valid to be assigned to Element:
+ // *OfpHelloElemHeader_Versionbitmap
+ Element isOfpHelloElemHeader_Element `protobuf_oneof:"element"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpHelloElemHeader) Reset() { *m = OfpHelloElemHeader{} }
+func (m *OfpHelloElemHeader) String() string { return proto.CompactTextString(m) }
+func (*OfpHelloElemHeader) ProtoMessage() {}
+func (*OfpHelloElemHeader) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{1}
+}
+
+func (m *OfpHelloElemHeader) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpHelloElemHeader.Unmarshal(m, b)
+}
+func (m *OfpHelloElemHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpHelloElemHeader.Marshal(b, m, deterministic)
+}
+func (m *OfpHelloElemHeader) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpHelloElemHeader.Merge(m, src)
+}
+func (m *OfpHelloElemHeader) XXX_Size() int {
+ return xxx_messageInfo_OfpHelloElemHeader.Size(m)
+}
+func (m *OfpHelloElemHeader) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpHelloElemHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpHelloElemHeader proto.InternalMessageInfo
+
+func (m *OfpHelloElemHeader) GetType() OfpHelloElemType {
+ if m != nil {
+ return m.Type
+ }
+ return OfpHelloElemType_OFPHET_INVALID
+}
+
+type isOfpHelloElemHeader_Element interface {
+ isOfpHelloElemHeader_Element()
+}
+
+type OfpHelloElemHeader_Versionbitmap struct {
+ Versionbitmap *OfpHelloElemVersionbitmap `protobuf:"bytes,2,opt,name=versionbitmap,proto3,oneof"`
+}
+
+func (*OfpHelloElemHeader_Versionbitmap) isOfpHelloElemHeader_Element() {}
+
+func (m *OfpHelloElemHeader) GetElement() isOfpHelloElemHeader_Element {
+ if m != nil {
+ return m.Element
+ }
+ return nil
+}
+
+func (m *OfpHelloElemHeader) GetVersionbitmap() *OfpHelloElemVersionbitmap {
+ if x, ok := m.GetElement().(*OfpHelloElemHeader_Versionbitmap); ok {
+ return x.Versionbitmap
+ }
+ return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*OfpHelloElemHeader) XXX_OneofWrappers() []interface{} {
+ return []interface{}{
+ (*OfpHelloElemHeader_Versionbitmap)(nil),
+ }
+}
+
+// Version bitmap Hello Element
+type OfpHelloElemVersionbitmap struct {
+ Bitmaps []uint32 `protobuf:"varint,2,rep,packed,name=bitmaps,proto3" json:"bitmaps,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpHelloElemVersionbitmap) Reset() { *m = OfpHelloElemVersionbitmap{} }
+func (m *OfpHelloElemVersionbitmap) String() string { return proto.CompactTextString(m) }
+func (*OfpHelloElemVersionbitmap) ProtoMessage() {}
+func (*OfpHelloElemVersionbitmap) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{2}
+}
+
+func (m *OfpHelloElemVersionbitmap) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpHelloElemVersionbitmap.Unmarshal(m, b)
+}
+func (m *OfpHelloElemVersionbitmap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpHelloElemVersionbitmap.Marshal(b, m, deterministic)
+}
+func (m *OfpHelloElemVersionbitmap) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpHelloElemVersionbitmap.Merge(m, src)
+}
+func (m *OfpHelloElemVersionbitmap) XXX_Size() int {
+ return xxx_messageInfo_OfpHelloElemVersionbitmap.Size(m)
+}
+func (m *OfpHelloElemVersionbitmap) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpHelloElemVersionbitmap.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpHelloElemVersionbitmap proto.InternalMessageInfo
+
+func (m *OfpHelloElemVersionbitmap) GetBitmaps() []uint32 {
+ if m != nil {
+ return m.Bitmaps
+ }
+ return nil
+}
+
+// OFPT_HELLO. This message includes zero or more hello elements having
+// variable size. Unknown elements types must be ignored/skipped, to allow
+// for future extensions.
+type OfpHello struct {
+ // Hello element list
+ Elements []*OfpHelloElemHeader `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpHello) Reset() { *m = OfpHello{} }
+func (m *OfpHello) String() string { return proto.CompactTextString(m) }
+func (*OfpHello) ProtoMessage() {}
+func (*OfpHello) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{3}
+}
+
+func (m *OfpHello) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpHello.Unmarshal(m, b)
+}
+func (m *OfpHello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpHello.Marshal(b, m, deterministic)
+}
+func (m *OfpHello) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpHello.Merge(m, src)
+}
+func (m *OfpHello) XXX_Size() int {
+ return xxx_messageInfo_OfpHello.Size(m)
+}
+func (m *OfpHello) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpHello.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpHello proto.InternalMessageInfo
+
+func (m *OfpHello) GetElements() []*OfpHelloElemHeader {
+ if m != nil {
+ return m.Elements
+ }
+ return nil
+}
+
+// Switch configuration.
+type OfpSwitchConfig struct {
+ //ofp_header header;
+ Flags uint32 `protobuf:"varint,1,opt,name=flags,proto3" json:"flags,omitempty"`
+ MissSendLen uint32 `protobuf:"varint,2,opt,name=miss_send_len,json=missSendLen,proto3" json:"miss_send_len,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpSwitchConfig) Reset() { *m = OfpSwitchConfig{} }
+func (m *OfpSwitchConfig) String() string { return proto.CompactTextString(m) }
+func (*OfpSwitchConfig) ProtoMessage() {}
+func (*OfpSwitchConfig) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{4}
+}
+
+func (m *OfpSwitchConfig) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpSwitchConfig.Unmarshal(m, b)
+}
+func (m *OfpSwitchConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpSwitchConfig.Marshal(b, m, deterministic)
+}
+func (m *OfpSwitchConfig) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpSwitchConfig.Merge(m, src)
+}
+func (m *OfpSwitchConfig) XXX_Size() int {
+ return xxx_messageInfo_OfpSwitchConfig.Size(m)
+}
+func (m *OfpSwitchConfig) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpSwitchConfig.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpSwitchConfig proto.InternalMessageInfo
+
+func (m *OfpSwitchConfig) GetFlags() uint32 {
+ if m != nil {
+ return m.Flags
+ }
+ return 0
+}
+
+func (m *OfpSwitchConfig) GetMissSendLen() uint32 {
+ if m != nil {
+ return m.MissSendLen
+ }
+ return 0
+}
+
+// Configure/Modify behavior of a flow table
+type OfpTableMod struct {
+ //ofp_header header;
+ TableId uint32 `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+ Config uint32 `protobuf:"varint,2,opt,name=config,proto3" json:"config,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpTableMod) Reset() { *m = OfpTableMod{} }
+func (m *OfpTableMod) String() string { return proto.CompactTextString(m) }
+func (*OfpTableMod) ProtoMessage() {}
+func (*OfpTableMod) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{5}
+}
+
+func (m *OfpTableMod) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpTableMod.Unmarshal(m, b)
+}
+func (m *OfpTableMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpTableMod.Marshal(b, m, deterministic)
+}
+func (m *OfpTableMod) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpTableMod.Merge(m, src)
+}
+func (m *OfpTableMod) XXX_Size() int {
+ return xxx_messageInfo_OfpTableMod.Size(m)
+}
+func (m *OfpTableMod) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpTableMod.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableMod proto.InternalMessageInfo
+
+func (m *OfpTableMod) GetTableId() uint32 {
+ if m != nil {
+ return m.TableId
+ }
+ return 0
+}
+
+func (m *OfpTableMod) GetConfig() uint32 {
+ if m != nil {
+ return m.Config
+ }
+ return 0
+}
+
+// Description of a port
+type OfpPort struct {
+ PortNo uint32 `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
+ HwAddr []uint32 `protobuf:"varint,2,rep,packed,name=hw_addr,json=hwAddr,proto3" json:"hw_addr,omitempty"`
+ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
+ Config uint32 `protobuf:"varint,4,opt,name=config,proto3" json:"config,omitempty"`
+ State uint32 `protobuf:"varint,5,opt,name=state,proto3" json:"state,omitempty"`
+ // Bitmaps of OFPPF_* that describe features. All bits zeroed if
+ // unsupported or unavailable.
+ Curr uint32 `protobuf:"varint,6,opt,name=curr,proto3" json:"curr,omitempty"`
+ Advertised uint32 `protobuf:"varint,7,opt,name=advertised,proto3" json:"advertised,omitempty"`
+ Supported uint32 `protobuf:"varint,8,opt,name=supported,proto3" json:"supported,omitempty"`
+ Peer uint32 `protobuf:"varint,9,opt,name=peer,proto3" json:"peer,omitempty"`
+ CurrSpeed uint32 `protobuf:"varint,10,opt,name=curr_speed,json=currSpeed,proto3" json:"curr_speed,omitempty"`
+ MaxSpeed uint32 `protobuf:"varint,11,opt,name=max_speed,json=maxSpeed,proto3" json:"max_speed,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpPort) Reset() { *m = OfpPort{} }
+func (m *OfpPort) String() string { return proto.CompactTextString(m) }
+func (*OfpPort) ProtoMessage() {}
+func (*OfpPort) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{6}
+}
+
+func (m *OfpPort) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpPort.Unmarshal(m, b)
+}
+func (m *OfpPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpPort.Marshal(b, m, deterministic)
+}
+func (m *OfpPort) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpPort.Merge(m, src)
+}
+func (m *OfpPort) XXX_Size() int {
+ return xxx_messageInfo_OfpPort.Size(m)
+}
+func (m *OfpPort) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpPort.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPort proto.InternalMessageInfo
+
+func (m *OfpPort) GetPortNo() uint32 {
+ if m != nil {
+ return m.PortNo
+ }
+ return 0
+}
+
+func (m *OfpPort) GetHwAddr() []uint32 {
+ if m != nil {
+ return m.HwAddr
+ }
+ return nil
+}
+
+func (m *OfpPort) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *OfpPort) GetConfig() uint32 {
+ if m != nil {
+ return m.Config
+ }
+ return 0
+}
+
+func (m *OfpPort) GetState() uint32 {
+ if m != nil {
+ return m.State
+ }
+ return 0
+}
+
+func (m *OfpPort) GetCurr() uint32 {
+ if m != nil {
+ return m.Curr
+ }
+ return 0
+}
+
+func (m *OfpPort) GetAdvertised() uint32 {
+ if m != nil {
+ return m.Advertised
+ }
+ return 0
+}
+
+func (m *OfpPort) GetSupported() uint32 {
+ if m != nil {
+ return m.Supported
+ }
+ return 0
+}
+
+func (m *OfpPort) GetPeer() uint32 {
+ if m != nil {
+ return m.Peer
+ }
+ return 0
+}
+
+func (m *OfpPort) GetCurrSpeed() uint32 {
+ if m != nil {
+ return m.CurrSpeed
+ }
+ return 0
+}
+
+func (m *OfpPort) GetMaxSpeed() uint32 {
+ if m != nil {
+ return m.MaxSpeed
+ }
+ return 0
+}
+
+// Switch features.
+type OfpSwitchFeatures struct {
+ //ofp_header header;
+ DatapathId uint64 `protobuf:"varint,1,opt,name=datapath_id,json=datapathId,proto3" json:"datapath_id,omitempty"`
+ NBuffers uint32 `protobuf:"varint,2,opt,name=n_buffers,json=nBuffers,proto3" json:"n_buffers,omitempty"`
+ NTables uint32 `protobuf:"varint,3,opt,name=n_tables,json=nTables,proto3" json:"n_tables,omitempty"`
+ AuxiliaryId uint32 `protobuf:"varint,4,opt,name=auxiliary_id,json=auxiliaryId,proto3" json:"auxiliary_id,omitempty"`
+ // Features.
+ Capabilities uint32 `protobuf:"varint,5,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpSwitchFeatures) Reset() { *m = OfpSwitchFeatures{} }
+func (m *OfpSwitchFeatures) String() string { return proto.CompactTextString(m) }
+func (*OfpSwitchFeatures) ProtoMessage() {}
+func (*OfpSwitchFeatures) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{7}
+}
+
+func (m *OfpSwitchFeatures) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpSwitchFeatures.Unmarshal(m, b)
+}
+func (m *OfpSwitchFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpSwitchFeatures.Marshal(b, m, deterministic)
+}
+func (m *OfpSwitchFeatures) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpSwitchFeatures.Merge(m, src)
+}
+func (m *OfpSwitchFeatures) XXX_Size() int {
+ return xxx_messageInfo_OfpSwitchFeatures.Size(m)
+}
+func (m *OfpSwitchFeatures) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpSwitchFeatures.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpSwitchFeatures proto.InternalMessageInfo
+
+func (m *OfpSwitchFeatures) GetDatapathId() uint64 {
+ if m != nil {
+ return m.DatapathId
+ }
+ return 0
+}
+
+func (m *OfpSwitchFeatures) GetNBuffers() uint32 {
+ if m != nil {
+ return m.NBuffers
+ }
+ return 0
+}
+
+func (m *OfpSwitchFeatures) GetNTables() uint32 {
+ if m != nil {
+ return m.NTables
+ }
+ return 0
+}
+
+func (m *OfpSwitchFeatures) GetAuxiliaryId() uint32 {
+ if m != nil {
+ return m.AuxiliaryId
+ }
+ return 0
+}
+
+func (m *OfpSwitchFeatures) GetCapabilities() uint32 {
+ if m != nil {
+ return m.Capabilities
+ }
+ return 0
+}
+
+// A physical port has changed in the datapath
+type OfpPortStatus struct {
+ //ofp_header header;
+ Reason OfpPortReason `protobuf:"varint,1,opt,name=reason,proto3,enum=openflow_13.OfpPortReason" json:"reason,omitempty"`
+ Desc *OfpPort `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpPortStatus) Reset() { *m = OfpPortStatus{} }
+func (m *OfpPortStatus) String() string { return proto.CompactTextString(m) }
+func (*OfpPortStatus) ProtoMessage() {}
+func (*OfpPortStatus) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{8}
+}
+
+func (m *OfpPortStatus) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpPortStatus.Unmarshal(m, b)
+}
+func (m *OfpPortStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpPortStatus.Marshal(b, m, deterministic)
+}
+func (m *OfpPortStatus) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpPortStatus.Merge(m, src)
+}
+func (m *OfpPortStatus) XXX_Size() int {
+ return xxx_messageInfo_OfpPortStatus.Size(m)
+}
+func (m *OfpPortStatus) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpPortStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPortStatus proto.InternalMessageInfo
+
+func (m *OfpPortStatus) GetReason() OfpPortReason {
+ if m != nil {
+ return m.Reason
+ }
+ return OfpPortReason_OFPPR_ADD
+}
+
+func (m *OfpPortStatus) GetDesc() *OfpPort {
+ if m != nil {
+ return m.Desc
+ }
+ return nil
+}
+
+// Modify behavior of the physical port
+type OfpPortMod struct {
+ //ofp_header header;
+ PortNo uint32 `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
+ HwAddr []uint32 `protobuf:"varint,2,rep,packed,name=hw_addr,json=hwAddr,proto3" json:"hw_addr,omitempty"`
+ // The hardware address is not
+ //configurable. This is used to
+ //sanity-check the request, so it must
+ //be the same as returned in an
+ //ofp_port struct.
+ Config uint32 `protobuf:"varint,3,opt,name=config,proto3" json:"config,omitempty"`
+ Mask uint32 `protobuf:"varint,4,opt,name=mask,proto3" json:"mask,omitempty"`
+ Advertise uint32 `protobuf:"varint,5,opt,name=advertise,proto3" json:"advertise,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpPortMod) Reset() { *m = OfpPortMod{} }
+func (m *OfpPortMod) String() string { return proto.CompactTextString(m) }
+func (*OfpPortMod) ProtoMessage() {}
+func (*OfpPortMod) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{9}
+}
+
+func (m *OfpPortMod) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpPortMod.Unmarshal(m, b)
+}
+func (m *OfpPortMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpPortMod.Marshal(b, m, deterministic)
+}
+func (m *OfpPortMod) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpPortMod.Merge(m, src)
+}
+func (m *OfpPortMod) XXX_Size() int {
+ return xxx_messageInfo_OfpPortMod.Size(m)
+}
+func (m *OfpPortMod) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpPortMod.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPortMod proto.InternalMessageInfo
+
+func (m *OfpPortMod) GetPortNo() uint32 {
+ if m != nil {
+ return m.PortNo
+ }
+ return 0
+}
+
+func (m *OfpPortMod) GetHwAddr() []uint32 {
+ if m != nil {
+ return m.HwAddr
+ }
+ return nil
+}
+
+func (m *OfpPortMod) GetConfig() uint32 {
+ if m != nil {
+ return m.Config
+ }
+ return 0
+}
+
+func (m *OfpPortMod) GetMask() uint32 {
+ if m != nil {
+ return m.Mask
+ }
+ return 0
+}
+
+func (m *OfpPortMod) GetAdvertise() uint32 {
+ if m != nil {
+ return m.Advertise
+ }
+ return 0
+}
+
+// Fields to match against flows
+type OfpMatch struct {
+ Type OfpMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpMatchType" json:"type,omitempty"`
+ OxmFields []*OfpOxmField `protobuf:"bytes,2,rep,name=oxm_fields,json=oxmFields,proto3" json:"oxm_fields,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpMatch) Reset() { *m = OfpMatch{} }
+func (m *OfpMatch) String() string { return proto.CompactTextString(m) }
+func (*OfpMatch) ProtoMessage() {}
+func (*OfpMatch) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{10}
+}
+
+func (m *OfpMatch) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpMatch.Unmarshal(m, b)
+}
+func (m *OfpMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpMatch.Marshal(b, m, deterministic)
+}
+func (m *OfpMatch) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpMatch.Merge(m, src)
+}
+func (m *OfpMatch) XXX_Size() int {
+ return xxx_messageInfo_OfpMatch.Size(m)
+}
+func (m *OfpMatch) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpMatch.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMatch proto.InternalMessageInfo
+
+func (m *OfpMatch) GetType() OfpMatchType {
+ if m != nil {
+ return m.Type
+ }
+ return OfpMatchType_OFPMT_STANDARD
+}
+
+func (m *OfpMatch) GetOxmFields() []*OfpOxmField {
+ if m != nil {
+ return m.OxmFields
+ }
+ return nil
+}
+
+// OXM Flow match fields
+type OfpOxmField struct {
+ OxmClass OfpOxmClass `protobuf:"varint,1,opt,name=oxm_class,json=oxmClass,proto3,enum=openflow_13.OfpOxmClass" json:"oxm_class,omitempty"`
+ // Types that are valid to be assigned to Field:
+ // *OfpOxmField_OfbField
+ // *OfpOxmField_ExperimenterField
+ Field isOfpOxmField_Field `protobuf_oneof:"field"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpOxmField) Reset() { *m = OfpOxmField{} }
+func (m *OfpOxmField) String() string { return proto.CompactTextString(m) }
+func (*OfpOxmField) ProtoMessage() {}
+func (*OfpOxmField) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{11}
+}
+
+func (m *OfpOxmField) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpOxmField.Unmarshal(m, b)
+}
+func (m *OfpOxmField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpOxmField.Marshal(b, m, deterministic)
+}
+func (m *OfpOxmField) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpOxmField.Merge(m, src)
+}
+func (m *OfpOxmField) XXX_Size() int {
+ return xxx_messageInfo_OfpOxmField.Size(m)
+}
+func (m *OfpOxmField) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpOxmField.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpOxmField proto.InternalMessageInfo
+
+func (m *OfpOxmField) GetOxmClass() OfpOxmClass {
+ if m != nil {
+ return m.OxmClass
+ }
+ return OfpOxmClass_OFPXMC_NXM_0
+}
+
+type isOfpOxmField_Field interface {
+ isOfpOxmField_Field()
+}
+
+type OfpOxmField_OfbField struct {
+ OfbField *OfpOxmOfbField `protobuf:"bytes,4,opt,name=ofb_field,json=ofbField,proto3,oneof"`
+}
+
+type OfpOxmField_ExperimenterField struct {
+ ExperimenterField *OfpOxmExperimenterField `protobuf:"bytes,5,opt,name=experimenter_field,json=experimenterField,proto3,oneof"`
+}
+
+func (*OfpOxmField_OfbField) isOfpOxmField_Field() {}
+
+func (*OfpOxmField_ExperimenterField) isOfpOxmField_Field() {}
+
+func (m *OfpOxmField) GetField() isOfpOxmField_Field {
+ if m != nil {
+ return m.Field
+ }
+ return nil
+}
+
+func (m *OfpOxmField) GetOfbField() *OfpOxmOfbField {
+ if x, ok := m.GetField().(*OfpOxmField_OfbField); ok {
+ return x.OfbField
+ }
+ return nil
+}
+
+func (m *OfpOxmField) GetExperimenterField() *OfpOxmExperimenterField {
+ if x, ok := m.GetField().(*OfpOxmField_ExperimenterField); ok {
+ return x.ExperimenterField
+ }
+ return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*OfpOxmField) XXX_OneofWrappers() []interface{} {
+ return []interface{}{
+ (*OfpOxmField_OfbField)(nil),
+ (*OfpOxmField_ExperimenterField)(nil),
+ }
+}
+
+// OXM OpenFlow Basic Match Field
+type OfpOxmOfbField struct {
+ Type OxmOfbFieldTypes `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OxmOfbFieldTypes" json:"type,omitempty"`
+ HasMask bool `protobuf:"varint,2,opt,name=has_mask,json=hasMask,proto3" json:"has_mask,omitempty"`
+ // Types that are valid to be assigned to Value:
+ // *OfpOxmOfbField_Port
+ // *OfpOxmOfbField_PhysicalPort
+ // *OfpOxmOfbField_TableMetadata
+ // *OfpOxmOfbField_EthDst
+ // *OfpOxmOfbField_EthSrc
+ // *OfpOxmOfbField_EthType
+ // *OfpOxmOfbField_VlanVid
+ // *OfpOxmOfbField_VlanPcp
+ // *OfpOxmOfbField_IpDscp
+ // *OfpOxmOfbField_IpEcn
+ // *OfpOxmOfbField_IpProto
+ // *OfpOxmOfbField_Ipv4Src
+ // *OfpOxmOfbField_Ipv4Dst
+ // *OfpOxmOfbField_TcpSrc
+ // *OfpOxmOfbField_TcpDst
+ // *OfpOxmOfbField_UdpSrc
+ // *OfpOxmOfbField_UdpDst
+ // *OfpOxmOfbField_SctpSrc
+ // *OfpOxmOfbField_SctpDst
+ // *OfpOxmOfbField_Icmpv4Type
+ // *OfpOxmOfbField_Icmpv4Code
+ // *OfpOxmOfbField_ArpOp
+ // *OfpOxmOfbField_ArpSpa
+ // *OfpOxmOfbField_ArpTpa
+ // *OfpOxmOfbField_ArpSha
+ // *OfpOxmOfbField_ArpTha
+ // *OfpOxmOfbField_Ipv6Src
+ // *OfpOxmOfbField_Ipv6Dst
+ // *OfpOxmOfbField_Ipv6Flabel
+ // *OfpOxmOfbField_Icmpv6Type
+ // *OfpOxmOfbField_Icmpv6Code
+ // *OfpOxmOfbField_Ipv6NdTarget
+ // *OfpOxmOfbField_Ipv6NdSsl
+ // *OfpOxmOfbField_Ipv6NdTll
+ // *OfpOxmOfbField_MplsLabel
+ // *OfpOxmOfbField_MplsTc
+ // *OfpOxmOfbField_MplsBos
+ // *OfpOxmOfbField_PbbIsid
+ // *OfpOxmOfbField_TunnelId
+ // *OfpOxmOfbField_Ipv6Exthdr
+ Value isOfpOxmOfbField_Value `protobuf_oneof:"value"`
+ // Optional mask values (must be present when has_mask is true
+ //
+ // Types that are valid to be assigned to Mask:
+ // *OfpOxmOfbField_TableMetadataMask
+ // *OfpOxmOfbField_EthDstMask
+ // *OfpOxmOfbField_EthSrcMask
+ // *OfpOxmOfbField_VlanVidMask
+ // *OfpOxmOfbField_Ipv4SrcMask
+ // *OfpOxmOfbField_Ipv4DstMask
+ // *OfpOxmOfbField_ArpSpaMask
+ // *OfpOxmOfbField_ArpTpaMask
+ // *OfpOxmOfbField_Ipv6SrcMask
+ // *OfpOxmOfbField_Ipv6DstMask
+ // *OfpOxmOfbField_Ipv6FlabelMask
+ // *OfpOxmOfbField_PbbIsidMask
+ // *OfpOxmOfbField_TunnelIdMask
+ // *OfpOxmOfbField_Ipv6ExthdrMask
+ Mask isOfpOxmOfbField_Mask `protobuf_oneof:"mask"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpOxmOfbField) Reset() { *m = OfpOxmOfbField{} }
+func (m *OfpOxmOfbField) String() string { return proto.CompactTextString(m) }
+func (*OfpOxmOfbField) ProtoMessage() {}
+func (*OfpOxmOfbField) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{12}
+}
+
+func (m *OfpOxmOfbField) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpOxmOfbField.Unmarshal(m, b)
+}
+func (m *OfpOxmOfbField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpOxmOfbField.Marshal(b, m, deterministic)
+}
+func (m *OfpOxmOfbField) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpOxmOfbField.Merge(m, src)
+}
+func (m *OfpOxmOfbField) XXX_Size() int {
+ return xxx_messageInfo_OfpOxmOfbField.Size(m)
+}
+func (m *OfpOxmOfbField) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpOxmOfbField.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpOxmOfbField proto.InternalMessageInfo
+
+func (m *OfpOxmOfbField) GetType() OxmOfbFieldTypes {
+ if m != nil {
+ return m.Type
+ }
+ return OxmOfbFieldTypes_OFPXMT_OFB_IN_PORT
+}
+
+func (m *OfpOxmOfbField) GetHasMask() bool {
+ if m != nil {
+ return m.HasMask
+ }
+ return false
+}
+
+type isOfpOxmOfbField_Value interface {
+ isOfpOxmOfbField_Value()
+}
+
+type OfpOxmOfbField_Port struct {
+ Port uint32 `protobuf:"varint,3,opt,name=port,proto3,oneof"`
+}
+
+type OfpOxmOfbField_PhysicalPort struct {
+ PhysicalPort uint32 `protobuf:"varint,4,opt,name=physical_port,json=physicalPort,proto3,oneof"`
+}
+
+type OfpOxmOfbField_TableMetadata struct {
+ TableMetadata uint64 `protobuf:"varint,5,opt,name=table_metadata,json=tableMetadata,proto3,oneof"`
+}
+
+type OfpOxmOfbField_EthDst struct {
+ EthDst []byte `protobuf:"bytes,6,opt,name=eth_dst,json=ethDst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_EthSrc struct {
+ EthSrc []byte `protobuf:"bytes,7,opt,name=eth_src,json=ethSrc,proto3,oneof"`
+}
+
+type OfpOxmOfbField_EthType struct {
+ EthType uint32 `protobuf:"varint,8,opt,name=eth_type,json=ethType,proto3,oneof"`
+}
+
+type OfpOxmOfbField_VlanVid struct {
+ VlanVid uint32 `protobuf:"varint,9,opt,name=vlan_vid,json=vlanVid,proto3,oneof"`
+}
+
+type OfpOxmOfbField_VlanPcp struct {
+ VlanPcp uint32 `protobuf:"varint,10,opt,name=vlan_pcp,json=vlanPcp,proto3,oneof"`
+}
+
+type OfpOxmOfbField_IpDscp struct {
+ IpDscp uint32 `protobuf:"varint,11,opt,name=ip_dscp,json=ipDscp,proto3,oneof"`
+}
+
+type OfpOxmOfbField_IpEcn struct {
+ IpEcn uint32 `protobuf:"varint,12,opt,name=ip_ecn,json=ipEcn,proto3,oneof"`
+}
+
+type OfpOxmOfbField_IpProto struct {
+ IpProto uint32 `protobuf:"varint,13,opt,name=ip_proto,json=ipProto,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv4Src struct {
+ Ipv4Src uint32 `protobuf:"varint,14,opt,name=ipv4_src,json=ipv4Src,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv4Dst struct {
+ Ipv4Dst uint32 `protobuf:"varint,15,opt,name=ipv4_dst,json=ipv4Dst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_TcpSrc struct {
+ TcpSrc uint32 `protobuf:"varint,16,opt,name=tcp_src,json=tcpSrc,proto3,oneof"`
+}
+
+type OfpOxmOfbField_TcpDst struct {
+ TcpDst uint32 `protobuf:"varint,17,opt,name=tcp_dst,json=tcpDst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_UdpSrc struct {
+ UdpSrc uint32 `protobuf:"varint,18,opt,name=udp_src,json=udpSrc,proto3,oneof"`
+}
+
+type OfpOxmOfbField_UdpDst struct {
+ UdpDst uint32 `protobuf:"varint,19,opt,name=udp_dst,json=udpDst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_SctpSrc struct {
+ SctpSrc uint32 `protobuf:"varint,20,opt,name=sctp_src,json=sctpSrc,proto3,oneof"`
+}
+
+type OfpOxmOfbField_SctpDst struct {
+ SctpDst uint32 `protobuf:"varint,21,opt,name=sctp_dst,json=sctpDst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Icmpv4Type struct {
+ Icmpv4Type uint32 `protobuf:"varint,22,opt,name=icmpv4_type,json=icmpv4Type,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Icmpv4Code struct {
+ Icmpv4Code uint32 `protobuf:"varint,23,opt,name=icmpv4_code,json=icmpv4Code,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpOp struct {
+ ArpOp uint32 `protobuf:"varint,24,opt,name=arp_op,json=arpOp,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpSpa struct {
+ ArpSpa uint32 `protobuf:"varint,25,opt,name=arp_spa,json=arpSpa,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpTpa struct {
+ ArpTpa uint32 `protobuf:"varint,26,opt,name=arp_tpa,json=arpTpa,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpSha struct {
+ ArpSha []byte `protobuf:"bytes,27,opt,name=arp_sha,json=arpSha,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpTha struct {
+ ArpTha []byte `protobuf:"bytes,28,opt,name=arp_tha,json=arpTha,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6Src struct {
+ Ipv6Src []byte `protobuf:"bytes,29,opt,name=ipv6_src,json=ipv6Src,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6Dst struct {
+ Ipv6Dst []byte `protobuf:"bytes,30,opt,name=ipv6_dst,json=ipv6Dst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6Flabel struct {
+ Ipv6Flabel uint32 `protobuf:"varint,31,opt,name=ipv6_flabel,json=ipv6Flabel,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Icmpv6Type struct {
+ Icmpv6Type uint32 `protobuf:"varint,32,opt,name=icmpv6_type,json=icmpv6Type,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Icmpv6Code struct {
+ Icmpv6Code uint32 `protobuf:"varint,33,opt,name=icmpv6_code,json=icmpv6Code,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6NdTarget struct {
+ Ipv6NdTarget []byte `protobuf:"bytes,34,opt,name=ipv6_nd_target,json=ipv6NdTarget,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6NdSsl struct {
+ Ipv6NdSsl []byte `protobuf:"bytes,35,opt,name=ipv6_nd_ssl,json=ipv6NdSsl,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6NdTll struct {
+ Ipv6NdTll []byte `protobuf:"bytes,36,opt,name=ipv6_nd_tll,json=ipv6NdTll,proto3,oneof"`
+}
+
+type OfpOxmOfbField_MplsLabel struct {
+ MplsLabel uint32 `protobuf:"varint,37,opt,name=mpls_label,json=mplsLabel,proto3,oneof"`
+}
+
+type OfpOxmOfbField_MplsTc struct {
+ MplsTc uint32 `protobuf:"varint,38,opt,name=mpls_tc,json=mplsTc,proto3,oneof"`
+}
+
+type OfpOxmOfbField_MplsBos struct {
+ MplsBos uint32 `protobuf:"varint,39,opt,name=mpls_bos,json=mplsBos,proto3,oneof"`
+}
+
+type OfpOxmOfbField_PbbIsid struct {
+ PbbIsid uint32 `protobuf:"varint,40,opt,name=pbb_isid,json=pbbIsid,proto3,oneof"`
+}
+
+type OfpOxmOfbField_TunnelId struct {
+ TunnelId uint64 `protobuf:"varint,41,opt,name=tunnel_id,json=tunnelId,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6Exthdr struct {
+ Ipv6Exthdr uint32 `protobuf:"varint,42,opt,name=ipv6_exthdr,json=ipv6Exthdr,proto3,oneof"`
+}
+
+func (*OfpOxmOfbField_Port) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_PhysicalPort) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_TableMetadata) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_EthDst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_EthSrc) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_EthType) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_VlanVid) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_VlanPcp) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_IpDscp) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_IpEcn) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_IpProto) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv4Src) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv4Dst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_TcpSrc) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_TcpDst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_UdpSrc) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_UdpDst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_SctpSrc) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_SctpDst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Icmpv4Type) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Icmpv4Code) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_ArpOp) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_ArpSpa) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_ArpTpa) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_ArpSha) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_ArpTha) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6Src) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6Dst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6Flabel) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Icmpv6Type) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Icmpv6Code) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6NdTarget) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6NdSsl) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6NdTll) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_MplsLabel) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_MplsTc) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_MplsBos) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_PbbIsid) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_TunnelId) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6Exthdr) isOfpOxmOfbField_Value() {}
+
+func (m *OfpOxmOfbField) GetValue() isOfpOxmOfbField_Value {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetPort() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Port); ok {
+ return x.Port
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetPhysicalPort() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_PhysicalPort); ok {
+ return x.PhysicalPort
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetTableMetadata() uint64 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_TableMetadata); ok {
+ return x.TableMetadata
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetEthDst() []byte {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_EthDst); ok {
+ return x.EthDst
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetEthSrc() []byte {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_EthSrc); ok {
+ return x.EthSrc
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetEthType() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_EthType); ok {
+ return x.EthType
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetVlanVid() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_VlanVid); ok {
+ return x.VlanVid
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetVlanPcp() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_VlanPcp); ok {
+ return x.VlanPcp
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpDscp() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_IpDscp); ok {
+ return x.IpDscp
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpEcn() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_IpEcn); ok {
+ return x.IpEcn
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpProto() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_IpProto); ok {
+ return x.IpProto
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv4Src() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv4Src); ok {
+ return x.Ipv4Src
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv4Dst() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv4Dst); ok {
+ return x.Ipv4Dst
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetTcpSrc() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_TcpSrc); ok {
+ return x.TcpSrc
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetTcpDst() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_TcpDst); ok {
+ return x.TcpDst
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetUdpSrc() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_UdpSrc); ok {
+ return x.UdpSrc
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetUdpDst() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_UdpDst); ok {
+ return x.UdpDst
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetSctpSrc() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_SctpSrc); ok {
+ return x.SctpSrc
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetSctpDst() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_SctpDst); ok {
+ return x.SctpDst
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIcmpv4Type() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Icmpv4Type); ok {
+ return x.Icmpv4Type
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIcmpv4Code() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Icmpv4Code); ok {
+ return x.Icmpv4Code
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetArpOp() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_ArpOp); ok {
+ return x.ArpOp
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetArpSpa() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_ArpSpa); ok {
+ return x.ArpSpa
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetArpTpa() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_ArpTpa); ok {
+ return x.ArpTpa
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetArpSha() []byte {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_ArpSha); ok {
+ return x.ArpSha
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetArpTha() []byte {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_ArpTha); ok {
+ return x.ArpTha
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6Src() []byte {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6Src); ok {
+ return x.Ipv6Src
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6Dst() []byte {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6Dst); ok {
+ return x.Ipv6Dst
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6Flabel() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6Flabel); ok {
+ return x.Ipv6Flabel
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIcmpv6Type() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Icmpv6Type); ok {
+ return x.Icmpv6Type
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIcmpv6Code() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Icmpv6Code); ok {
+ return x.Icmpv6Code
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv6NdTarget() []byte {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6NdTarget); ok {
+ return x.Ipv6NdTarget
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6NdSsl() []byte {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6NdSsl); ok {
+ return x.Ipv6NdSsl
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6NdTll() []byte {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6NdTll); ok {
+ return x.Ipv6NdTll
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetMplsLabel() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_MplsLabel); ok {
+ return x.MplsLabel
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetMplsTc() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_MplsTc); ok {
+ return x.MplsTc
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetMplsBos() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_MplsBos); ok {
+ return x.MplsBos
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetPbbIsid() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_PbbIsid); ok {
+ return x.PbbIsid
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetTunnelId() uint64 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_TunnelId); ok {
+ return x.TunnelId
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv6Exthdr() uint32 {
+ if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6Exthdr); ok {
+ return x.Ipv6Exthdr
+ }
+ return 0
+}
+
+type isOfpOxmOfbField_Mask interface {
+ isOfpOxmOfbField_Mask()
+}
+
+type OfpOxmOfbField_TableMetadataMask struct {
+ TableMetadataMask uint64 `protobuf:"varint,105,opt,name=table_metadata_mask,json=tableMetadataMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_EthDstMask struct {
+ EthDstMask []byte `protobuf:"bytes,106,opt,name=eth_dst_mask,json=ethDstMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_EthSrcMask struct {
+ EthSrcMask []byte `protobuf:"bytes,107,opt,name=eth_src_mask,json=ethSrcMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_VlanVidMask struct {
+ VlanVidMask uint32 `protobuf:"varint,109,opt,name=vlan_vid_mask,json=vlanVidMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv4SrcMask struct {
+ Ipv4SrcMask uint32 `protobuf:"varint,114,opt,name=ipv4_src_mask,json=ipv4SrcMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv4DstMask struct {
+ Ipv4DstMask uint32 `protobuf:"varint,115,opt,name=ipv4_dst_mask,json=ipv4DstMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpSpaMask struct {
+ ArpSpaMask uint32 `protobuf:"varint,125,opt,name=arp_spa_mask,json=arpSpaMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpTpaMask struct {
+ ArpTpaMask uint32 `protobuf:"varint,126,opt,name=arp_tpa_mask,json=arpTpaMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6SrcMask struct {
+ Ipv6SrcMask []byte `protobuf:"bytes,129,opt,name=ipv6_src_mask,json=ipv6SrcMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6DstMask struct {
+ Ipv6DstMask []byte `protobuf:"bytes,130,opt,name=ipv6_dst_mask,json=ipv6DstMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6FlabelMask struct {
+ Ipv6FlabelMask uint32 `protobuf:"varint,131,opt,name=ipv6_flabel_mask,json=ipv6FlabelMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_PbbIsidMask struct {
+ PbbIsidMask uint32 `protobuf:"varint,140,opt,name=pbb_isid_mask,json=pbbIsidMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_TunnelIdMask struct {
+ TunnelIdMask uint64 `protobuf:"varint,141,opt,name=tunnel_id_mask,json=tunnelIdMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6ExthdrMask struct {
+ Ipv6ExthdrMask uint32 `protobuf:"varint,142,opt,name=ipv6_exthdr_mask,json=ipv6ExthdrMask,proto3,oneof"`
+}
+
+func (*OfpOxmOfbField_TableMetadataMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_EthDstMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_EthSrcMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_VlanVidMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv4SrcMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv4DstMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_ArpSpaMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_ArpTpaMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv6SrcMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv6DstMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv6FlabelMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_PbbIsidMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_TunnelIdMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv6ExthdrMask) isOfpOxmOfbField_Mask() {}
+
+func (m *OfpOxmOfbField) GetMask() isOfpOxmOfbField_Mask {
+ if m != nil {
+ return m.Mask
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetTableMetadataMask() uint64 {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_TableMetadataMask); ok {
+ return x.TableMetadataMask
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetEthDstMask() []byte {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_EthDstMask); ok {
+ return x.EthDstMask
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetEthSrcMask() []byte {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_EthSrcMask); ok {
+ return x.EthSrcMask
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetVlanVidMask() uint32 {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_VlanVidMask); ok {
+ return x.VlanVidMask
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv4SrcMask() uint32 {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv4SrcMask); ok {
+ return x.Ipv4SrcMask
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv4DstMask() uint32 {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv4DstMask); ok {
+ return x.Ipv4DstMask
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetArpSpaMask() uint32 {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_ArpSpaMask); ok {
+ return x.ArpSpaMask
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetArpTpaMask() uint32 {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_ArpTpaMask); ok {
+ return x.ArpTpaMask
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv6SrcMask() []byte {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv6SrcMask); ok {
+ return x.Ipv6SrcMask
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6DstMask() []byte {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv6DstMask); ok {
+ return x.Ipv6DstMask
+ }
+ return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6FlabelMask() uint32 {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv6FlabelMask); ok {
+ return x.Ipv6FlabelMask
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetPbbIsidMask() uint32 {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_PbbIsidMask); ok {
+ return x.PbbIsidMask
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetTunnelIdMask() uint64 {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_TunnelIdMask); ok {
+ return x.TunnelIdMask
+ }
+ return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv6ExthdrMask() uint32 {
+ if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv6ExthdrMask); ok {
+ return x.Ipv6ExthdrMask
+ }
+ return 0
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*OfpOxmOfbField) XXX_OneofWrappers() []interface{} {
+ return []interface{}{
+ (*OfpOxmOfbField_Port)(nil),
+ (*OfpOxmOfbField_PhysicalPort)(nil),
+ (*OfpOxmOfbField_TableMetadata)(nil),
+ (*OfpOxmOfbField_EthDst)(nil),
+ (*OfpOxmOfbField_EthSrc)(nil),
+ (*OfpOxmOfbField_EthType)(nil),
+ (*OfpOxmOfbField_VlanVid)(nil),
+ (*OfpOxmOfbField_VlanPcp)(nil),
+ (*OfpOxmOfbField_IpDscp)(nil),
+ (*OfpOxmOfbField_IpEcn)(nil),
+ (*OfpOxmOfbField_IpProto)(nil),
+ (*OfpOxmOfbField_Ipv4Src)(nil),
+ (*OfpOxmOfbField_Ipv4Dst)(nil),
+ (*OfpOxmOfbField_TcpSrc)(nil),
+ (*OfpOxmOfbField_TcpDst)(nil),
+ (*OfpOxmOfbField_UdpSrc)(nil),
+ (*OfpOxmOfbField_UdpDst)(nil),
+ (*OfpOxmOfbField_SctpSrc)(nil),
+ (*OfpOxmOfbField_SctpDst)(nil),
+ (*OfpOxmOfbField_Icmpv4Type)(nil),
+ (*OfpOxmOfbField_Icmpv4Code)(nil),
+ (*OfpOxmOfbField_ArpOp)(nil),
+ (*OfpOxmOfbField_ArpSpa)(nil),
+ (*OfpOxmOfbField_ArpTpa)(nil),
+ (*OfpOxmOfbField_ArpSha)(nil),
+ (*OfpOxmOfbField_ArpTha)(nil),
+ (*OfpOxmOfbField_Ipv6Src)(nil),
+ (*OfpOxmOfbField_Ipv6Dst)(nil),
+ (*OfpOxmOfbField_Ipv6Flabel)(nil),
+ (*OfpOxmOfbField_Icmpv6Type)(nil),
+ (*OfpOxmOfbField_Icmpv6Code)(nil),
+ (*OfpOxmOfbField_Ipv6NdTarget)(nil),
+ (*OfpOxmOfbField_Ipv6NdSsl)(nil),
+ (*OfpOxmOfbField_Ipv6NdTll)(nil),
+ (*OfpOxmOfbField_MplsLabel)(nil),
+ (*OfpOxmOfbField_MplsTc)(nil),
+ (*OfpOxmOfbField_MplsBos)(nil),
+ (*OfpOxmOfbField_PbbIsid)(nil),
+ (*OfpOxmOfbField_TunnelId)(nil),
+ (*OfpOxmOfbField_Ipv6Exthdr)(nil),
+ (*OfpOxmOfbField_TableMetadataMask)(nil),
+ (*OfpOxmOfbField_EthDstMask)(nil),
+ (*OfpOxmOfbField_EthSrcMask)(nil),
+ (*OfpOxmOfbField_VlanVidMask)(nil),
+ (*OfpOxmOfbField_Ipv4SrcMask)(nil),
+ (*OfpOxmOfbField_Ipv4DstMask)(nil),
+ (*OfpOxmOfbField_ArpSpaMask)(nil),
+ (*OfpOxmOfbField_ArpTpaMask)(nil),
+ (*OfpOxmOfbField_Ipv6SrcMask)(nil),
+ (*OfpOxmOfbField_Ipv6DstMask)(nil),
+ (*OfpOxmOfbField_Ipv6FlabelMask)(nil),
+ (*OfpOxmOfbField_PbbIsidMask)(nil),
+ (*OfpOxmOfbField_TunnelIdMask)(nil),
+ (*OfpOxmOfbField_Ipv6ExthdrMask)(nil),
+ }
+}
+
+// Header for OXM experimenter match fields.
+// The experimenter class should not use OXM_HEADER() macros for defining
+// fields due to this extra header.
+type OfpOxmExperimenterField struct {
+ OxmHeader uint32 `protobuf:"varint,1,opt,name=oxm_header,json=oxmHeader,proto3" json:"oxm_header,omitempty"`
+ Experimenter uint32 `protobuf:"varint,2,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpOxmExperimenterField) Reset() { *m = OfpOxmExperimenterField{} }
+func (m *OfpOxmExperimenterField) String() string { return proto.CompactTextString(m) }
+func (*OfpOxmExperimenterField) ProtoMessage() {}
+func (*OfpOxmExperimenterField) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{13}
+}
+
+func (m *OfpOxmExperimenterField) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpOxmExperimenterField.Unmarshal(m, b)
+}
+func (m *OfpOxmExperimenterField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpOxmExperimenterField.Marshal(b, m, deterministic)
+}
+func (m *OfpOxmExperimenterField) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpOxmExperimenterField.Merge(m, src)
+}
+func (m *OfpOxmExperimenterField) XXX_Size() int {
+ return xxx_messageInfo_OfpOxmExperimenterField.Size(m)
+}
+func (m *OfpOxmExperimenterField) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpOxmExperimenterField.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpOxmExperimenterField proto.InternalMessageInfo
+
+func (m *OfpOxmExperimenterField) GetOxmHeader() uint32 {
+ if m != nil {
+ return m.OxmHeader
+ }
+ return 0
+}
+
+func (m *OfpOxmExperimenterField) GetExperimenter() uint32 {
+ if m != nil {
+ return m.Experimenter
+ }
+ return 0
+}
+
+// Action header that is common to all actions. The length includes the
+// header and any padding used to make the action 64-bit aligned.
+// NB: The length of an action *must* always be a multiple of eight.
+type OfpAction struct {
+ Type OfpActionType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpActionType" json:"type,omitempty"`
+ // Types that are valid to be assigned to Action:
+ // *OfpAction_Output
+ // *OfpAction_MplsTtl
+ // *OfpAction_Push
+ // *OfpAction_PopMpls
+ // *OfpAction_Group
+ // *OfpAction_NwTtl
+ // *OfpAction_SetField
+ // *OfpAction_Experimenter
+ Action isOfpAction_Action `protobuf_oneof:"action"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpAction) Reset() { *m = OfpAction{} }
+func (m *OfpAction) String() string { return proto.CompactTextString(m) }
+func (*OfpAction) ProtoMessage() {}
+func (*OfpAction) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{14}
+}
+
+func (m *OfpAction) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpAction.Unmarshal(m, b)
+}
+func (m *OfpAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpAction.Marshal(b, m, deterministic)
+}
+func (m *OfpAction) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpAction.Merge(m, src)
+}
+func (m *OfpAction) XXX_Size() int {
+ return xxx_messageInfo_OfpAction.Size(m)
+}
+func (m *OfpAction) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpAction.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpAction proto.InternalMessageInfo
+
+func (m *OfpAction) GetType() OfpActionType {
+ if m != nil {
+ return m.Type
+ }
+ return OfpActionType_OFPAT_OUTPUT
+}
+
+type isOfpAction_Action interface {
+ isOfpAction_Action()
+}
+
+type OfpAction_Output struct {
+ Output *OfpActionOutput `protobuf:"bytes,2,opt,name=output,proto3,oneof"`
+}
+
+type OfpAction_MplsTtl struct {
+ MplsTtl *OfpActionMplsTtl `protobuf:"bytes,3,opt,name=mpls_ttl,json=mplsTtl,proto3,oneof"`
+}
+
+type OfpAction_Push struct {
+ Push *OfpActionPush `protobuf:"bytes,4,opt,name=push,proto3,oneof"`
+}
+
+type OfpAction_PopMpls struct {
+ PopMpls *OfpActionPopMpls `protobuf:"bytes,5,opt,name=pop_mpls,json=popMpls,proto3,oneof"`
+}
+
+type OfpAction_Group struct {
+ Group *OfpActionGroup `protobuf:"bytes,6,opt,name=group,proto3,oneof"`
+}
+
+type OfpAction_NwTtl struct {
+ NwTtl *OfpActionNwTtl `protobuf:"bytes,7,opt,name=nw_ttl,json=nwTtl,proto3,oneof"`
+}
+
+type OfpAction_SetField struct {
+ SetField *OfpActionSetField `protobuf:"bytes,8,opt,name=set_field,json=setField,proto3,oneof"`
+}
+
+type OfpAction_Experimenter struct {
+ Experimenter *OfpActionExperimenter `protobuf:"bytes,9,opt,name=experimenter,proto3,oneof"`
+}
+
+func (*OfpAction_Output) isOfpAction_Action() {}
+
+func (*OfpAction_MplsTtl) isOfpAction_Action() {}
+
+func (*OfpAction_Push) isOfpAction_Action() {}
+
+func (*OfpAction_PopMpls) isOfpAction_Action() {}
+
+func (*OfpAction_Group) isOfpAction_Action() {}
+
+func (*OfpAction_NwTtl) isOfpAction_Action() {}
+
+func (*OfpAction_SetField) isOfpAction_Action() {}
+
+func (*OfpAction_Experimenter) isOfpAction_Action() {}
+
+func (m *OfpAction) GetAction() isOfpAction_Action {
+ if m != nil {
+ return m.Action
+ }
+ return nil
+}
+
+func (m *OfpAction) GetOutput() *OfpActionOutput {
+ if x, ok := m.GetAction().(*OfpAction_Output); ok {
+ return x.Output
+ }
+ return nil
+}
+
+func (m *OfpAction) GetMplsTtl() *OfpActionMplsTtl {
+ if x, ok := m.GetAction().(*OfpAction_MplsTtl); ok {
+ return x.MplsTtl
+ }
+ return nil
+}
+
+func (m *OfpAction) GetPush() *OfpActionPush {
+ if x, ok := m.GetAction().(*OfpAction_Push); ok {
+ return x.Push
+ }
+ return nil
+}
+
+func (m *OfpAction) GetPopMpls() *OfpActionPopMpls {
+ if x, ok := m.GetAction().(*OfpAction_PopMpls); ok {
+ return x.PopMpls
+ }
+ return nil
+}
+
+func (m *OfpAction) GetGroup() *OfpActionGroup {
+ if x, ok := m.GetAction().(*OfpAction_Group); ok {
+ return x.Group
+ }
+ return nil
+}
+
+func (m *OfpAction) GetNwTtl() *OfpActionNwTtl {
+ if x, ok := m.GetAction().(*OfpAction_NwTtl); ok {
+ return x.NwTtl
+ }
+ return nil
+}
+
+func (m *OfpAction) GetSetField() *OfpActionSetField {
+ if x, ok := m.GetAction().(*OfpAction_SetField); ok {
+ return x.SetField
+ }
+ return nil
+}
+
+func (m *OfpAction) GetExperimenter() *OfpActionExperimenter {
+ if x, ok := m.GetAction().(*OfpAction_Experimenter); ok {
+ return x.Experimenter
+ }
+ return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*OfpAction) XXX_OneofWrappers() []interface{} {
+ return []interface{}{
+ (*OfpAction_Output)(nil),
+ (*OfpAction_MplsTtl)(nil),
+ (*OfpAction_Push)(nil),
+ (*OfpAction_PopMpls)(nil),
+ (*OfpAction_Group)(nil),
+ (*OfpAction_NwTtl)(nil),
+ (*OfpAction_SetField)(nil),
+ (*OfpAction_Experimenter)(nil),
+ }
+}
+
+// Action structure for OFPAT_OUTPUT, which sends packets out 'port'.
+// When the 'port' is the OFPP_CONTROLLER, 'max_len' indicates the max
+// number of bytes to send. A 'max_len' of zero means no bytes of the
+// packet should be sent. A 'max_len' of OFPCML_NO_BUFFER means that
+// the packet is not buffered and the complete packet is to be sent to
+// the controller.
+type OfpActionOutput struct {
+ Port uint32 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
+ MaxLen uint32 `protobuf:"varint,2,opt,name=max_len,json=maxLen,proto3" json:"max_len,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpActionOutput) Reset() { *m = OfpActionOutput{} }
+func (m *OfpActionOutput) String() string { return proto.CompactTextString(m) }
+func (*OfpActionOutput) ProtoMessage() {}
+func (*OfpActionOutput) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{15}
+}
+
+func (m *OfpActionOutput) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpActionOutput.Unmarshal(m, b)
+}
+func (m *OfpActionOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpActionOutput.Marshal(b, m, deterministic)
+}
+func (m *OfpActionOutput) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpActionOutput.Merge(m, src)
+}
+func (m *OfpActionOutput) XXX_Size() int {
+ return xxx_messageInfo_OfpActionOutput.Size(m)
+}
+func (m *OfpActionOutput) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpActionOutput.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionOutput proto.InternalMessageInfo
+
+func (m *OfpActionOutput) GetPort() uint32 {
+ if m != nil {
+ return m.Port
+ }
+ return 0
+}
+
+func (m *OfpActionOutput) GetMaxLen() uint32 {
+ if m != nil {
+ return m.MaxLen
+ }
+ return 0
+}
+
+// Action structure for OFPAT_SET_MPLS_TTL.
+type OfpActionMplsTtl struct {
+ MplsTtl uint32 `protobuf:"varint,1,opt,name=mpls_ttl,json=mplsTtl,proto3" json:"mpls_ttl,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpActionMplsTtl) Reset() { *m = OfpActionMplsTtl{} }
+func (m *OfpActionMplsTtl) String() string { return proto.CompactTextString(m) }
+func (*OfpActionMplsTtl) ProtoMessage() {}
+func (*OfpActionMplsTtl) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{16}
+}
+
+func (m *OfpActionMplsTtl) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpActionMplsTtl.Unmarshal(m, b)
+}
+func (m *OfpActionMplsTtl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpActionMplsTtl.Marshal(b, m, deterministic)
+}
+func (m *OfpActionMplsTtl) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpActionMplsTtl.Merge(m, src)
+}
+func (m *OfpActionMplsTtl) XXX_Size() int {
+ return xxx_messageInfo_OfpActionMplsTtl.Size(m)
+}
+func (m *OfpActionMplsTtl) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpActionMplsTtl.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionMplsTtl proto.InternalMessageInfo
+
+func (m *OfpActionMplsTtl) GetMplsTtl() uint32 {
+ if m != nil {
+ return m.MplsTtl
+ }
+ return 0
+}
+
+// Action structure for OFPAT_PUSH_VLAN/MPLS/PBB.
+type OfpActionPush struct {
+ Ethertype uint32 `protobuf:"varint,1,opt,name=ethertype,proto3" json:"ethertype,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpActionPush) Reset() { *m = OfpActionPush{} }
+func (m *OfpActionPush) String() string { return proto.CompactTextString(m) }
+func (*OfpActionPush) ProtoMessage() {}
+func (*OfpActionPush) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{17}
+}
+
+func (m *OfpActionPush) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpActionPush.Unmarshal(m, b)
+}
+func (m *OfpActionPush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpActionPush.Marshal(b, m, deterministic)
+}
+func (m *OfpActionPush) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpActionPush.Merge(m, src)
+}
+func (m *OfpActionPush) XXX_Size() int {
+ return xxx_messageInfo_OfpActionPush.Size(m)
+}
+func (m *OfpActionPush) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpActionPush.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionPush proto.InternalMessageInfo
+
+func (m *OfpActionPush) GetEthertype() uint32 {
+ if m != nil {
+ return m.Ethertype
+ }
+ return 0
+}
+
+// Action structure for OFPAT_POP_MPLS.
+type OfpActionPopMpls struct {
+ Ethertype uint32 `protobuf:"varint,1,opt,name=ethertype,proto3" json:"ethertype,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpActionPopMpls) Reset() { *m = OfpActionPopMpls{} }
+func (m *OfpActionPopMpls) String() string { return proto.CompactTextString(m) }
+func (*OfpActionPopMpls) ProtoMessage() {}
+func (*OfpActionPopMpls) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{18}
+}
+
+func (m *OfpActionPopMpls) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpActionPopMpls.Unmarshal(m, b)
+}
+func (m *OfpActionPopMpls) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpActionPopMpls.Marshal(b, m, deterministic)
+}
+func (m *OfpActionPopMpls) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpActionPopMpls.Merge(m, src)
+}
+func (m *OfpActionPopMpls) XXX_Size() int {
+ return xxx_messageInfo_OfpActionPopMpls.Size(m)
+}
+func (m *OfpActionPopMpls) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpActionPopMpls.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionPopMpls proto.InternalMessageInfo
+
+func (m *OfpActionPopMpls) GetEthertype() uint32 {
+ if m != nil {
+ return m.Ethertype
+ }
+ return 0
+}
+
+// Action structure for OFPAT_GROUP.
+type OfpActionGroup struct {
+ GroupId uint32 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpActionGroup) Reset() { *m = OfpActionGroup{} }
+func (m *OfpActionGroup) String() string { return proto.CompactTextString(m) }
+func (*OfpActionGroup) ProtoMessage() {}
+func (*OfpActionGroup) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{19}
+}
+
+func (m *OfpActionGroup) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpActionGroup.Unmarshal(m, b)
+}
+func (m *OfpActionGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpActionGroup.Marshal(b, m, deterministic)
+}
+func (m *OfpActionGroup) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpActionGroup.Merge(m, src)
+}
+func (m *OfpActionGroup) XXX_Size() int {
+ return xxx_messageInfo_OfpActionGroup.Size(m)
+}
+func (m *OfpActionGroup) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpActionGroup.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionGroup proto.InternalMessageInfo
+
+func (m *OfpActionGroup) GetGroupId() uint32 {
+ if m != nil {
+ return m.GroupId
+ }
+ return 0
+}
+
+// Action structure for OFPAT_SET_NW_TTL.
+type OfpActionNwTtl struct {
+ NwTtl uint32 `protobuf:"varint,1,opt,name=nw_ttl,json=nwTtl,proto3" json:"nw_ttl,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpActionNwTtl) Reset() { *m = OfpActionNwTtl{} }
+func (m *OfpActionNwTtl) String() string { return proto.CompactTextString(m) }
+func (*OfpActionNwTtl) ProtoMessage() {}
+func (*OfpActionNwTtl) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{20}
+}
+
+func (m *OfpActionNwTtl) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpActionNwTtl.Unmarshal(m, b)
+}
+func (m *OfpActionNwTtl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpActionNwTtl.Marshal(b, m, deterministic)
+}
+func (m *OfpActionNwTtl) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpActionNwTtl.Merge(m, src)
+}
+func (m *OfpActionNwTtl) XXX_Size() int {
+ return xxx_messageInfo_OfpActionNwTtl.Size(m)
+}
+func (m *OfpActionNwTtl) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpActionNwTtl.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionNwTtl proto.InternalMessageInfo
+
+func (m *OfpActionNwTtl) GetNwTtl() uint32 {
+ if m != nil {
+ return m.NwTtl
+ }
+ return 0
+}
+
+// Action structure for OFPAT_SET_FIELD.
+type OfpActionSetField struct {
+ Field *OfpOxmField `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpActionSetField) Reset() { *m = OfpActionSetField{} }
+func (m *OfpActionSetField) String() string { return proto.CompactTextString(m) }
+func (*OfpActionSetField) ProtoMessage() {}
+func (*OfpActionSetField) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{21}
+}
+
+func (m *OfpActionSetField) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpActionSetField.Unmarshal(m, b)
+}
+func (m *OfpActionSetField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpActionSetField.Marshal(b, m, deterministic)
+}
+func (m *OfpActionSetField) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpActionSetField.Merge(m, src)
+}
+func (m *OfpActionSetField) XXX_Size() int {
+ return xxx_messageInfo_OfpActionSetField.Size(m)
+}
+func (m *OfpActionSetField) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpActionSetField.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionSetField proto.InternalMessageInfo
+
+func (m *OfpActionSetField) GetField() *OfpOxmField {
+ if m != nil {
+ return m.Field
+ }
+ return nil
+}
+
+// Action header for OFPAT_EXPERIMENTER.
+// The rest of the body is experimenter-defined.
+type OfpActionExperimenter struct {
+ Experimenter uint32 `protobuf:"varint,1,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+ Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpActionExperimenter) Reset() { *m = OfpActionExperimenter{} }
+func (m *OfpActionExperimenter) String() string { return proto.CompactTextString(m) }
+func (*OfpActionExperimenter) ProtoMessage() {}
+func (*OfpActionExperimenter) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{22}
+}
+
+func (m *OfpActionExperimenter) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpActionExperimenter.Unmarshal(m, b)
+}
+func (m *OfpActionExperimenter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpActionExperimenter.Marshal(b, m, deterministic)
+}
+func (m *OfpActionExperimenter) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpActionExperimenter.Merge(m, src)
+}
+func (m *OfpActionExperimenter) XXX_Size() int {
+ return xxx_messageInfo_OfpActionExperimenter.Size(m)
+}
+func (m *OfpActionExperimenter) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpActionExperimenter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionExperimenter proto.InternalMessageInfo
+
+func (m *OfpActionExperimenter) GetExperimenter() uint32 {
+ if m != nil {
+ return m.Experimenter
+ }
+ return 0
+}
+
+func (m *OfpActionExperimenter) GetData() []byte {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
+// Instruction header that is common to all instructions. The length includes
+// the header and any padding used to make the instruction 64-bit aligned.
+// NB: The length of an instruction *must* always be a multiple of eight.
+type OfpInstruction struct {
+ Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
+ // Types that are valid to be assigned to Data:
+ // *OfpInstruction_GotoTable
+ // *OfpInstruction_WriteMetadata
+ // *OfpInstruction_Actions
+ // *OfpInstruction_Meter
+ // *OfpInstruction_Experimenter
+ Data isOfpInstruction_Data `protobuf_oneof:"data"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpInstruction) Reset() { *m = OfpInstruction{} }
+func (m *OfpInstruction) String() string { return proto.CompactTextString(m) }
+func (*OfpInstruction) ProtoMessage() {}
+func (*OfpInstruction) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{23}
+}
+
+func (m *OfpInstruction) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpInstruction.Unmarshal(m, b)
+}
+func (m *OfpInstruction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpInstruction.Marshal(b, m, deterministic)
+}
+func (m *OfpInstruction) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpInstruction.Merge(m, src)
+}
+func (m *OfpInstruction) XXX_Size() int {
+ return xxx_messageInfo_OfpInstruction.Size(m)
+}
+func (m *OfpInstruction) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpInstruction.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstruction proto.InternalMessageInfo
+
+func (m *OfpInstruction) GetType() uint32 {
+ if m != nil {
+ return m.Type
+ }
+ return 0
+}
+
+type isOfpInstruction_Data interface {
+ isOfpInstruction_Data()
+}
+
+type OfpInstruction_GotoTable struct {
+ GotoTable *OfpInstructionGotoTable `protobuf:"bytes,2,opt,name=goto_table,json=gotoTable,proto3,oneof"`
+}
+
+type OfpInstruction_WriteMetadata struct {
+ WriteMetadata *OfpInstructionWriteMetadata `protobuf:"bytes,3,opt,name=write_metadata,json=writeMetadata,proto3,oneof"`
+}
+
+type OfpInstruction_Actions struct {
+ Actions *OfpInstructionActions `protobuf:"bytes,4,opt,name=actions,proto3,oneof"`
+}
+
+type OfpInstruction_Meter struct {
+ Meter *OfpInstructionMeter `protobuf:"bytes,5,opt,name=meter,proto3,oneof"`
+}
+
+type OfpInstruction_Experimenter struct {
+ Experimenter *OfpInstructionExperimenter `protobuf:"bytes,6,opt,name=experimenter,proto3,oneof"`
+}
+
+func (*OfpInstruction_GotoTable) isOfpInstruction_Data() {}
+
+func (*OfpInstruction_WriteMetadata) isOfpInstruction_Data() {}
+
+func (*OfpInstruction_Actions) isOfpInstruction_Data() {}
+
+func (*OfpInstruction_Meter) isOfpInstruction_Data() {}
+
+func (*OfpInstruction_Experimenter) isOfpInstruction_Data() {}
+
+func (m *OfpInstruction) GetData() isOfpInstruction_Data {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
+func (m *OfpInstruction) GetGotoTable() *OfpInstructionGotoTable {
+ if x, ok := m.GetData().(*OfpInstruction_GotoTable); ok {
+ return x.GotoTable
+ }
+ return nil
+}
+
+func (m *OfpInstruction) GetWriteMetadata() *OfpInstructionWriteMetadata {
+ if x, ok := m.GetData().(*OfpInstruction_WriteMetadata); ok {
+ return x.WriteMetadata
+ }
+ return nil
+}
+
+func (m *OfpInstruction) GetActions() *OfpInstructionActions {
+ if x, ok := m.GetData().(*OfpInstruction_Actions); ok {
+ return x.Actions
+ }
+ return nil
+}
+
+func (m *OfpInstruction) GetMeter() *OfpInstructionMeter {
+ if x, ok := m.GetData().(*OfpInstruction_Meter); ok {
+ return x.Meter
+ }
+ return nil
+}
+
+func (m *OfpInstruction) GetExperimenter() *OfpInstructionExperimenter {
+ if x, ok := m.GetData().(*OfpInstruction_Experimenter); ok {
+ return x.Experimenter
+ }
+ return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*OfpInstruction) XXX_OneofWrappers() []interface{} {
+ return []interface{}{
+ (*OfpInstruction_GotoTable)(nil),
+ (*OfpInstruction_WriteMetadata)(nil),
+ (*OfpInstruction_Actions)(nil),
+ (*OfpInstruction_Meter)(nil),
+ (*OfpInstruction_Experimenter)(nil),
+ }
+}
+
+// Instruction structure for OFPIT_GOTO_TABLE
+type OfpInstructionGotoTable struct {
+ TableId uint32 `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpInstructionGotoTable) Reset() { *m = OfpInstructionGotoTable{} }
+func (m *OfpInstructionGotoTable) String() string { return proto.CompactTextString(m) }
+func (*OfpInstructionGotoTable) ProtoMessage() {}
+func (*OfpInstructionGotoTable) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{24}
+}
+
+func (m *OfpInstructionGotoTable) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpInstructionGotoTable.Unmarshal(m, b)
+}
+func (m *OfpInstructionGotoTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpInstructionGotoTable.Marshal(b, m, deterministic)
+}
+func (m *OfpInstructionGotoTable) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpInstructionGotoTable.Merge(m, src)
+}
+func (m *OfpInstructionGotoTable) XXX_Size() int {
+ return xxx_messageInfo_OfpInstructionGotoTable.Size(m)
+}
+func (m *OfpInstructionGotoTable) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpInstructionGotoTable.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstructionGotoTable proto.InternalMessageInfo
+
+func (m *OfpInstructionGotoTable) GetTableId() uint32 {
+ if m != nil {
+ return m.TableId
+ }
+ return 0
+}
+
+// Instruction structure for OFPIT_WRITE_METADATA
+type OfpInstructionWriteMetadata struct {
+ Metadata uint64 `protobuf:"varint,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
+ MetadataMask uint64 `protobuf:"varint,2,opt,name=metadata_mask,json=metadataMask,proto3" json:"metadata_mask,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpInstructionWriteMetadata) Reset() { *m = OfpInstructionWriteMetadata{} }
+func (m *OfpInstructionWriteMetadata) String() string { return proto.CompactTextString(m) }
+func (*OfpInstructionWriteMetadata) ProtoMessage() {}
+func (*OfpInstructionWriteMetadata) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{25}
+}
+
+func (m *OfpInstructionWriteMetadata) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpInstructionWriteMetadata.Unmarshal(m, b)
+}
+func (m *OfpInstructionWriteMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpInstructionWriteMetadata.Marshal(b, m, deterministic)
+}
+func (m *OfpInstructionWriteMetadata) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpInstructionWriteMetadata.Merge(m, src)
+}
+func (m *OfpInstructionWriteMetadata) XXX_Size() int {
+ return xxx_messageInfo_OfpInstructionWriteMetadata.Size(m)
+}
+func (m *OfpInstructionWriteMetadata) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpInstructionWriteMetadata.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstructionWriteMetadata proto.InternalMessageInfo
+
+func (m *OfpInstructionWriteMetadata) GetMetadata() uint64 {
+ if m != nil {
+ return m.Metadata
+ }
+ return 0
+}
+
+func (m *OfpInstructionWriteMetadata) GetMetadataMask() uint64 {
+ if m != nil {
+ return m.MetadataMask
+ }
+ return 0
+}
+
+// Instruction structure for OFPIT_WRITE/APPLY/CLEAR_ACTIONS
+type OfpInstructionActions struct {
+ Actions []*OfpAction `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpInstructionActions) Reset() { *m = OfpInstructionActions{} }
+func (m *OfpInstructionActions) String() string { return proto.CompactTextString(m) }
+func (*OfpInstructionActions) ProtoMessage() {}
+func (*OfpInstructionActions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{26}
+}
+
+func (m *OfpInstructionActions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpInstructionActions.Unmarshal(m, b)
+}
+func (m *OfpInstructionActions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpInstructionActions.Marshal(b, m, deterministic)
+}
+func (m *OfpInstructionActions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpInstructionActions.Merge(m, src)
+}
+func (m *OfpInstructionActions) XXX_Size() int {
+ return xxx_messageInfo_OfpInstructionActions.Size(m)
+}
+func (m *OfpInstructionActions) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpInstructionActions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstructionActions proto.InternalMessageInfo
+
+func (m *OfpInstructionActions) GetActions() []*OfpAction {
+ if m != nil {
+ return m.Actions
+ }
+ return nil
+}
+
+// Instruction structure for OFPIT_METER
+type OfpInstructionMeter struct {
+ MeterId uint32 `protobuf:"varint,1,opt,name=meter_id,json=meterId,proto3" json:"meter_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpInstructionMeter) Reset() { *m = OfpInstructionMeter{} }
+func (m *OfpInstructionMeter) String() string { return proto.CompactTextString(m) }
+func (*OfpInstructionMeter) ProtoMessage() {}
+func (*OfpInstructionMeter) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{27}
+}
+
+func (m *OfpInstructionMeter) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpInstructionMeter.Unmarshal(m, b)
+}
+func (m *OfpInstructionMeter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpInstructionMeter.Marshal(b, m, deterministic)
+}
+func (m *OfpInstructionMeter) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpInstructionMeter.Merge(m, src)
+}
+func (m *OfpInstructionMeter) XXX_Size() int {
+ return xxx_messageInfo_OfpInstructionMeter.Size(m)
+}
+func (m *OfpInstructionMeter) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpInstructionMeter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstructionMeter proto.InternalMessageInfo
+
+func (m *OfpInstructionMeter) GetMeterId() uint32 {
+ if m != nil {
+ return m.MeterId
+ }
+ return 0
+}
+
+// Instruction structure for experimental instructions
+type OfpInstructionExperimenter struct {
+ Experimenter uint32 `protobuf:"varint,1,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+ // Experimenter-defined arbitrary additional data.
+ Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpInstructionExperimenter) Reset() { *m = OfpInstructionExperimenter{} }
+func (m *OfpInstructionExperimenter) String() string { return proto.CompactTextString(m) }
+func (*OfpInstructionExperimenter) ProtoMessage() {}
+func (*OfpInstructionExperimenter) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{28}
+}
+
+func (m *OfpInstructionExperimenter) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpInstructionExperimenter.Unmarshal(m, b)
+}
+func (m *OfpInstructionExperimenter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpInstructionExperimenter.Marshal(b, m, deterministic)
+}
+func (m *OfpInstructionExperimenter) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpInstructionExperimenter.Merge(m, src)
+}
+func (m *OfpInstructionExperimenter) XXX_Size() int {
+ return xxx_messageInfo_OfpInstructionExperimenter.Size(m)
+}
+func (m *OfpInstructionExperimenter) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpInstructionExperimenter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstructionExperimenter proto.InternalMessageInfo
+
+func (m *OfpInstructionExperimenter) GetExperimenter() uint32 {
+ if m != nil {
+ return m.Experimenter
+ }
+ return 0
+}
+
+func (m *OfpInstructionExperimenter) GetData() []byte {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
+// Flow setup and teardown (controller -> datapath).
+type OfpFlowMod struct {
+ //ofp_header header;
+ Cookie uint64 `protobuf:"varint,1,opt,name=cookie,proto3" json:"cookie,omitempty"`
+ CookieMask uint64 `protobuf:"varint,2,opt,name=cookie_mask,json=cookieMask,proto3" json:"cookie_mask,omitempty"`
+ TableId uint32 `protobuf:"varint,3,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+ Command OfpFlowModCommand `protobuf:"varint,4,opt,name=command,proto3,enum=openflow_13.OfpFlowModCommand" json:"command,omitempty"`
+ IdleTimeout uint32 `protobuf:"varint,5,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"`
+ HardTimeout uint32 `protobuf:"varint,6,opt,name=hard_timeout,json=hardTimeout,proto3" json:"hard_timeout,omitempty"`
+ Priority uint32 `protobuf:"varint,7,opt,name=priority,proto3" json:"priority,omitempty"`
+ BufferId uint32 `protobuf:"varint,8,opt,name=buffer_id,json=bufferId,proto3" json:"buffer_id,omitempty"`
+ OutPort uint32 `protobuf:"varint,9,opt,name=out_port,json=outPort,proto3" json:"out_port,omitempty"`
+ OutGroup uint32 `protobuf:"varint,10,opt,name=out_group,json=outGroup,proto3" json:"out_group,omitempty"`
+ Flags uint32 `protobuf:"varint,11,opt,name=flags,proto3" json:"flags,omitempty"`
+ Match *OfpMatch `protobuf:"bytes,12,opt,name=match,proto3" json:"match,omitempty"`
+ Instructions []*OfpInstruction `protobuf:"bytes,13,rep,name=instructions,proto3" json:"instructions,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpFlowMod) Reset() { *m = OfpFlowMod{} }
+func (m *OfpFlowMod) String() string { return proto.CompactTextString(m) }
+func (*OfpFlowMod) ProtoMessage() {}
+func (*OfpFlowMod) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{29}
+}
+
+func (m *OfpFlowMod) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpFlowMod.Unmarshal(m, b)
+}
+func (m *OfpFlowMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpFlowMod.Marshal(b, m, deterministic)
+}
+func (m *OfpFlowMod) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpFlowMod.Merge(m, src)
+}
+func (m *OfpFlowMod) XXX_Size() int {
+ return xxx_messageInfo_OfpFlowMod.Size(m)
+}
+func (m *OfpFlowMod) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpFlowMod.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpFlowMod proto.InternalMessageInfo
+
+func (m *OfpFlowMod) GetCookie() uint64 {
+ if m != nil {
+ return m.Cookie
+ }
+ return 0
+}
+
+func (m *OfpFlowMod) GetCookieMask() uint64 {
+ if m != nil {
+ return m.CookieMask
+ }
+ return 0
+}
+
+func (m *OfpFlowMod) GetTableId() uint32 {
+ if m != nil {
+ return m.TableId
+ }
+ return 0
+}
+
+func (m *OfpFlowMod) GetCommand() OfpFlowModCommand {
+ if m != nil {
+ return m.Command
+ }
+ return OfpFlowModCommand_OFPFC_ADD
+}
+
+func (m *OfpFlowMod) GetIdleTimeout() uint32 {
+ if m != nil {
+ return m.IdleTimeout
+ }
+ return 0
+}
+
+func (m *OfpFlowMod) GetHardTimeout() uint32 {
+ if m != nil {
+ return m.HardTimeout
+ }
+ return 0
+}
+
+func (m *OfpFlowMod) GetPriority() uint32 {
+ if m != nil {
+ return m.Priority
+ }
+ return 0
+}
+
+func (m *OfpFlowMod) GetBufferId() uint32 {
+ if m != nil {
+ return m.BufferId
+ }
+ return 0
+}
+
+func (m *OfpFlowMod) GetOutPort() uint32 {
+ if m != nil {
+ return m.OutPort
+ }
+ return 0
+}
+
+func (m *OfpFlowMod) GetOutGroup() uint32 {
+ if m != nil {
+ return m.OutGroup
+ }
+ return 0
+}
+
+func (m *OfpFlowMod) GetFlags() uint32 {
+ if m != nil {
+ return m.Flags
+ }
+ return 0
+}
+
+func (m *OfpFlowMod) GetMatch() *OfpMatch {
+ if m != nil {
+ return m.Match
+ }
+ return nil
+}
+
+func (m *OfpFlowMod) GetInstructions() []*OfpInstruction {
+ if m != nil {
+ return m.Instructions
+ }
+ return nil
+}
+
+// Bucket for use in groups.
+type OfpBucket struct {
+ Weight uint32 `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty"`
+ WatchPort uint32 `protobuf:"varint,2,opt,name=watch_port,json=watchPort,proto3" json:"watch_port,omitempty"`
+ WatchGroup uint32 `protobuf:"varint,3,opt,name=watch_group,json=watchGroup,proto3" json:"watch_group,omitempty"`
+ Actions []*OfpAction `protobuf:"bytes,4,rep,name=actions,proto3" json:"actions,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpBucket) Reset() { *m = OfpBucket{} }
+func (m *OfpBucket) String() string { return proto.CompactTextString(m) }
+func (*OfpBucket) ProtoMessage() {}
+func (*OfpBucket) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{30}
+}
+
+func (m *OfpBucket) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpBucket.Unmarshal(m, b)
+}
+func (m *OfpBucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpBucket.Marshal(b, m, deterministic)
+}
+func (m *OfpBucket) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpBucket.Merge(m, src)
+}
+func (m *OfpBucket) XXX_Size() int {
+ return xxx_messageInfo_OfpBucket.Size(m)
+}
+func (m *OfpBucket) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpBucket.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpBucket proto.InternalMessageInfo
+
+func (m *OfpBucket) GetWeight() uint32 {
+ if m != nil {
+ return m.Weight
+ }
+ return 0
+}
+
+func (m *OfpBucket) GetWatchPort() uint32 {
+ if m != nil {
+ return m.WatchPort
+ }
+ return 0
+}
+
+func (m *OfpBucket) GetWatchGroup() uint32 {
+ if m != nil {
+ return m.WatchGroup
+ }
+ return 0
+}
+
+func (m *OfpBucket) GetActions() []*OfpAction {
+ if m != nil {
+ return m.Actions
+ }
+ return nil
+}
+
+// Group setup and teardown (controller -> datapath).
+type OfpGroupMod struct {
+ //ofp_header header;
+ Command OfpGroupModCommand `protobuf:"varint,1,opt,name=command,proto3,enum=openflow_13.OfpGroupModCommand" json:"command,omitempty"`
+ Type OfpGroupType `protobuf:"varint,2,opt,name=type,proto3,enum=openflow_13.OfpGroupType" json:"type,omitempty"`
+ GroupId uint32 `protobuf:"varint,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
+ Buckets []*OfpBucket `protobuf:"bytes,4,rep,name=buckets,proto3" json:"buckets,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpGroupMod) Reset() { *m = OfpGroupMod{} }
+func (m *OfpGroupMod) String() string { return proto.CompactTextString(m) }
+func (*OfpGroupMod) ProtoMessage() {}
+func (*OfpGroupMod) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{31}
+}
+
+func (m *OfpGroupMod) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpGroupMod.Unmarshal(m, b)
+}
+func (m *OfpGroupMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpGroupMod.Marshal(b, m, deterministic)
+}
+func (m *OfpGroupMod) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpGroupMod.Merge(m, src)
+}
+func (m *OfpGroupMod) XXX_Size() int {
+ return xxx_messageInfo_OfpGroupMod.Size(m)
+}
+func (m *OfpGroupMod) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpGroupMod.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpGroupMod proto.InternalMessageInfo
+
+func (m *OfpGroupMod) GetCommand() OfpGroupModCommand {
+ if m != nil {
+ return m.Command
+ }
+ return OfpGroupModCommand_OFPGC_ADD
+}
+
+func (m *OfpGroupMod) GetType() OfpGroupType {
+ if m != nil {
+ return m.Type
+ }
+ return OfpGroupType_OFPGT_ALL
+}
+
+func (m *OfpGroupMod) GetGroupId() uint32 {
+ if m != nil {
+ return m.GroupId
+ }
+ return 0
+}
+
+func (m *OfpGroupMod) GetBuckets() []*OfpBucket {
+ if m != nil {
+ return m.Buckets
+ }
+ return nil
+}
+
+// Send packet (controller -> datapath).
+type OfpPacketOut struct {
+ //ofp_header header;
+ BufferId uint32 `protobuf:"varint,1,opt,name=buffer_id,json=bufferId,proto3" json:"buffer_id,omitempty"`
+ InPort uint32 `protobuf:"varint,2,opt,name=in_port,json=inPort,proto3" json:"in_port,omitempty"`
+ Actions []*OfpAction `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"`
+ // The variable size action list is optionally followed by packet data.
+ // This data is only present and meaningful if buffer_id == -1.
+ Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpPacketOut) Reset() { *m = OfpPacketOut{} }
+func (m *OfpPacketOut) String() string { return proto.CompactTextString(m) }
+func (*OfpPacketOut) ProtoMessage() {}
+func (*OfpPacketOut) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{32}
+}
+
+func (m *OfpPacketOut) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpPacketOut.Unmarshal(m, b)
+}
+func (m *OfpPacketOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpPacketOut.Marshal(b, m, deterministic)
+}
+func (m *OfpPacketOut) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpPacketOut.Merge(m, src)
+}
+func (m *OfpPacketOut) XXX_Size() int {
+ return xxx_messageInfo_OfpPacketOut.Size(m)
+}
+func (m *OfpPacketOut) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpPacketOut.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPacketOut proto.InternalMessageInfo
+
+func (m *OfpPacketOut) GetBufferId() uint32 {
+ if m != nil {
+ return m.BufferId
+ }
+ return 0
+}
+
+func (m *OfpPacketOut) GetInPort() uint32 {
+ if m != nil {
+ return m.InPort
+ }
+ return 0
+}
+
+func (m *OfpPacketOut) GetActions() []*OfpAction {
+ if m != nil {
+ return m.Actions
+ }
+ return nil
+}
+
+func (m *OfpPacketOut) GetData() []byte {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
+// Packet received on port (datapath -> controller).
+type OfpPacketIn struct {
+ //ofp_header header;
+ BufferId uint32 `protobuf:"varint,1,opt,name=buffer_id,json=bufferId,proto3" json:"buffer_id,omitempty"`
+ Reason OfpPacketInReason `protobuf:"varint,2,opt,name=reason,proto3,enum=openflow_13.OfpPacketInReason" json:"reason,omitempty"`
+ TableId uint32 `protobuf:"varint,3,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+ Cookie uint64 `protobuf:"varint,4,opt,name=cookie,proto3" json:"cookie,omitempty"`
+ Match *OfpMatch `protobuf:"bytes,5,opt,name=match,proto3" json:"match,omitempty"`
+ Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpPacketIn) Reset() { *m = OfpPacketIn{} }
+func (m *OfpPacketIn) String() string { return proto.CompactTextString(m) }
+func (*OfpPacketIn) ProtoMessage() {}
+func (*OfpPacketIn) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{33}
+}
+
+func (m *OfpPacketIn) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpPacketIn.Unmarshal(m, b)
+}
+func (m *OfpPacketIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpPacketIn.Marshal(b, m, deterministic)
+}
+func (m *OfpPacketIn) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpPacketIn.Merge(m, src)
+}
+func (m *OfpPacketIn) XXX_Size() int {
+ return xxx_messageInfo_OfpPacketIn.Size(m)
+}
+func (m *OfpPacketIn) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpPacketIn.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPacketIn proto.InternalMessageInfo
+
+func (m *OfpPacketIn) GetBufferId() uint32 {
+ if m != nil {
+ return m.BufferId
+ }
+ return 0
+}
+
+func (m *OfpPacketIn) GetReason() OfpPacketInReason {
+ if m != nil {
+ return m.Reason
+ }
+ return OfpPacketInReason_OFPR_NO_MATCH
+}
+
+func (m *OfpPacketIn) GetTableId() uint32 {
+ if m != nil {
+ return m.TableId
+ }
+ return 0
+}
+
+func (m *OfpPacketIn) GetCookie() uint64 {
+ if m != nil {
+ return m.Cookie
+ }
+ return 0
+}
+
+func (m *OfpPacketIn) GetMatch() *OfpMatch {
+ if m != nil {
+ return m.Match
+ }
+ return nil
+}
+
+func (m *OfpPacketIn) GetData() []byte {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
+// Flow removed (datapath -> controller).
+type OfpFlowRemoved struct {
+ //ofp_header header;
+ Cookie uint64 `protobuf:"varint,1,opt,name=cookie,proto3" json:"cookie,omitempty"`
+ Priority uint32 `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
+ Reason OfpFlowRemovedReason `protobuf:"varint,3,opt,name=reason,proto3,enum=openflow_13.OfpFlowRemovedReason" json:"reason,omitempty"`
+ TableId uint32 `protobuf:"varint,4,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+ DurationSec uint32 `protobuf:"varint,5,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
+ DurationNsec uint32 `protobuf:"varint,6,opt,name=duration_nsec,json=durationNsec,proto3" json:"duration_nsec,omitempty"`
+ IdleTimeout uint32 `protobuf:"varint,7,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"`
+ HardTimeout uint32 `protobuf:"varint,8,opt,name=hard_timeout,json=hardTimeout,proto3" json:"hard_timeout,omitempty"`
+ PacketCount uint64 `protobuf:"varint,9,opt,name=packet_count,json=packetCount,proto3" json:"packet_count,omitempty"`
+ ByteCount uint64 `protobuf:"varint,10,opt,name=byte_count,json=byteCount,proto3" json:"byte_count,omitempty"`
+ Match *OfpMatch `protobuf:"bytes,121,opt,name=match,proto3" json:"match,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpFlowRemoved) Reset() { *m = OfpFlowRemoved{} }
+func (m *OfpFlowRemoved) String() string { return proto.CompactTextString(m) }
+func (*OfpFlowRemoved) ProtoMessage() {}
+func (*OfpFlowRemoved) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{34}
+}
+
+func (m *OfpFlowRemoved) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpFlowRemoved.Unmarshal(m, b)
+}
+func (m *OfpFlowRemoved) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpFlowRemoved.Marshal(b, m, deterministic)
+}
+func (m *OfpFlowRemoved) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpFlowRemoved.Merge(m, src)
+}
+func (m *OfpFlowRemoved) XXX_Size() int {
+ return xxx_messageInfo_OfpFlowRemoved.Size(m)
+}
+func (m *OfpFlowRemoved) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpFlowRemoved.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpFlowRemoved proto.InternalMessageInfo
+
+func (m *OfpFlowRemoved) GetCookie() uint64 {
+ if m != nil {
+ return m.Cookie
+ }
+ return 0
+}
+
+func (m *OfpFlowRemoved) GetPriority() uint32 {
+ if m != nil {
+ return m.Priority
+ }
+ return 0
+}
+
+func (m *OfpFlowRemoved) GetReason() OfpFlowRemovedReason {
+ if m != nil {
+ return m.Reason
+ }
+ return OfpFlowRemovedReason_OFPRR_IDLE_TIMEOUT
+}
+
+func (m *OfpFlowRemoved) GetTableId() uint32 {
+ if m != nil {
+ return m.TableId
+ }
+ return 0
+}
+
+func (m *OfpFlowRemoved) GetDurationSec() uint32 {
+ if m != nil {
+ return m.DurationSec
+ }
+ return 0
+}
+
+func (m *OfpFlowRemoved) GetDurationNsec() uint32 {
+ if m != nil {
+ return m.DurationNsec
+ }
+ return 0
+}
+
+func (m *OfpFlowRemoved) GetIdleTimeout() uint32 {
+ if m != nil {
+ return m.IdleTimeout
+ }
+ return 0
+}
+
+func (m *OfpFlowRemoved) GetHardTimeout() uint32 {
+ if m != nil {
+ return m.HardTimeout
+ }
+ return 0
+}
+
+func (m *OfpFlowRemoved) GetPacketCount() uint64 {
+ if m != nil {
+ return m.PacketCount
+ }
+ return 0
+}
+
+func (m *OfpFlowRemoved) GetByteCount() uint64 {
+ if m != nil {
+ return m.ByteCount
+ }
+ return 0
+}
+
+func (m *OfpFlowRemoved) GetMatch() *OfpMatch {
+ if m != nil {
+ return m.Match
+ }
+ return nil
+}
+
+// Common header for all meter bands
+type OfpMeterBandHeader struct {
+ Type OfpMeterBandType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpMeterBandType" json:"type,omitempty"`
+ Rate uint32 `protobuf:"varint,2,opt,name=rate,proto3" json:"rate,omitempty"`
+ BurstSize uint32 `protobuf:"varint,3,opt,name=burst_size,json=burstSize,proto3" json:"burst_size,omitempty"`
+ // Types that are valid to be assigned to Data:
+ // *OfpMeterBandHeader_Drop
+ // *OfpMeterBandHeader_DscpRemark
+ // *OfpMeterBandHeader_Experimenter
+ Data isOfpMeterBandHeader_Data `protobuf_oneof:"data"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpMeterBandHeader) Reset() { *m = OfpMeterBandHeader{} }
+func (m *OfpMeterBandHeader) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterBandHeader) ProtoMessage() {}
+func (*OfpMeterBandHeader) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{35}
+}
+
+func (m *OfpMeterBandHeader) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpMeterBandHeader.Unmarshal(m, b)
+}
+func (m *OfpMeterBandHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpMeterBandHeader.Marshal(b, m, deterministic)
+}
+func (m *OfpMeterBandHeader) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpMeterBandHeader.Merge(m, src)
+}
+func (m *OfpMeterBandHeader) XXX_Size() int {
+ return xxx_messageInfo_OfpMeterBandHeader.Size(m)
+}
+func (m *OfpMeterBandHeader) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpMeterBandHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterBandHeader proto.InternalMessageInfo
+
+func (m *OfpMeterBandHeader) GetType() OfpMeterBandType {
+ if m != nil {
+ return m.Type
+ }
+ return OfpMeterBandType_OFPMBT_INVALID
+}
+
+func (m *OfpMeterBandHeader) GetRate() uint32 {
+ if m != nil {
+ return m.Rate
+ }
+ return 0
+}
+
+func (m *OfpMeterBandHeader) GetBurstSize() uint32 {
+ if m != nil {
+ return m.BurstSize
+ }
+ return 0
+}
+
+type isOfpMeterBandHeader_Data interface {
+ isOfpMeterBandHeader_Data()
+}
+
+type OfpMeterBandHeader_Drop struct {
+ Drop *OfpMeterBandDrop `protobuf:"bytes,4,opt,name=drop,proto3,oneof"`
+}
+
+type OfpMeterBandHeader_DscpRemark struct {
+ DscpRemark *OfpMeterBandDscpRemark `protobuf:"bytes,5,opt,name=dscp_remark,json=dscpRemark,proto3,oneof"`
+}
+
+type OfpMeterBandHeader_Experimenter struct {
+ Experimenter *OfpMeterBandExperimenter `protobuf:"bytes,6,opt,name=experimenter,proto3,oneof"`
+}
+
+func (*OfpMeterBandHeader_Drop) isOfpMeterBandHeader_Data() {}
+
+func (*OfpMeterBandHeader_DscpRemark) isOfpMeterBandHeader_Data() {}
+
+func (*OfpMeterBandHeader_Experimenter) isOfpMeterBandHeader_Data() {}
+
+func (m *OfpMeterBandHeader) GetData() isOfpMeterBandHeader_Data {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
+func (m *OfpMeterBandHeader) GetDrop() *OfpMeterBandDrop {
+ if x, ok := m.GetData().(*OfpMeterBandHeader_Drop); ok {
+ return x.Drop
+ }
+ return nil
+}
+
+func (m *OfpMeterBandHeader) GetDscpRemark() *OfpMeterBandDscpRemark {
+ if x, ok := m.GetData().(*OfpMeterBandHeader_DscpRemark); ok {
+ return x.DscpRemark
+ }
+ return nil
+}
+
+func (m *OfpMeterBandHeader) GetExperimenter() *OfpMeterBandExperimenter {
+ if x, ok := m.GetData().(*OfpMeterBandHeader_Experimenter); ok {
+ return x.Experimenter
+ }
+ return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*OfpMeterBandHeader) XXX_OneofWrappers() []interface{} {
+ return []interface{}{
+ (*OfpMeterBandHeader_Drop)(nil),
+ (*OfpMeterBandHeader_DscpRemark)(nil),
+ (*OfpMeterBandHeader_Experimenter)(nil),
+ }
+}
+
+// OFPMBT_DROP band - drop packets
+type OfpMeterBandDrop struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpMeterBandDrop) Reset() { *m = OfpMeterBandDrop{} }
+func (m *OfpMeterBandDrop) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterBandDrop) ProtoMessage() {}
+func (*OfpMeterBandDrop) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{36}
+}
+
+func (m *OfpMeterBandDrop) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpMeterBandDrop.Unmarshal(m, b)
+}
+func (m *OfpMeterBandDrop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpMeterBandDrop.Marshal(b, m, deterministic)
+}
+func (m *OfpMeterBandDrop) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpMeterBandDrop.Merge(m, src)
+}
+func (m *OfpMeterBandDrop) XXX_Size() int {
+ return xxx_messageInfo_OfpMeterBandDrop.Size(m)
+}
+func (m *OfpMeterBandDrop) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpMeterBandDrop.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterBandDrop proto.InternalMessageInfo
+
+// OFPMBT_DSCP_REMARK band - Remark DSCP in the IP header
+type OfpMeterBandDscpRemark struct {
+ PrecLevel uint32 `protobuf:"varint,1,opt,name=prec_level,json=precLevel,proto3" json:"prec_level,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpMeterBandDscpRemark) Reset() { *m = OfpMeterBandDscpRemark{} }
+func (m *OfpMeterBandDscpRemark) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterBandDscpRemark) ProtoMessage() {}
+func (*OfpMeterBandDscpRemark) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{37}
+}
+
+func (m *OfpMeterBandDscpRemark) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpMeterBandDscpRemark.Unmarshal(m, b)
+}
+func (m *OfpMeterBandDscpRemark) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpMeterBandDscpRemark.Marshal(b, m, deterministic)
+}
+func (m *OfpMeterBandDscpRemark) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpMeterBandDscpRemark.Merge(m, src)
+}
+func (m *OfpMeterBandDscpRemark) XXX_Size() int {
+ return xxx_messageInfo_OfpMeterBandDscpRemark.Size(m)
+}
+func (m *OfpMeterBandDscpRemark) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpMeterBandDscpRemark.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterBandDscpRemark proto.InternalMessageInfo
+
+func (m *OfpMeterBandDscpRemark) GetPrecLevel() uint32 {
+ if m != nil {
+ return m.PrecLevel
+ }
+ return 0
+}
+
+// OFPMBT_EXPERIMENTER band - Experimenter type.
+// The rest of the band is experimenter-defined.
+type OfpMeterBandExperimenter struct {
+ Experimenter uint32 `protobuf:"varint,1,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpMeterBandExperimenter) Reset() { *m = OfpMeterBandExperimenter{} }
+func (m *OfpMeterBandExperimenter) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterBandExperimenter) ProtoMessage() {}
+func (*OfpMeterBandExperimenter) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{38}
+}
+
+func (m *OfpMeterBandExperimenter) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpMeterBandExperimenter.Unmarshal(m, b)
+}
+func (m *OfpMeterBandExperimenter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpMeterBandExperimenter.Marshal(b, m, deterministic)
+}
+func (m *OfpMeterBandExperimenter) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpMeterBandExperimenter.Merge(m, src)
+}
+func (m *OfpMeterBandExperimenter) XXX_Size() int {
+ return xxx_messageInfo_OfpMeterBandExperimenter.Size(m)
+}
+func (m *OfpMeterBandExperimenter) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpMeterBandExperimenter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterBandExperimenter proto.InternalMessageInfo
+
+func (m *OfpMeterBandExperimenter) GetExperimenter() uint32 {
+ if m != nil {
+ return m.Experimenter
+ }
+ return 0
+}
+
+// Meter configuration. OFPT_METER_MOD.
+type OfpMeterMod struct {
+ Command OfpMeterModCommand `protobuf:"varint,1,opt,name=command,proto3,enum=openflow_13.OfpMeterModCommand" json:"command,omitempty"`
+ Flags uint32 `protobuf:"varint,2,opt,name=flags,proto3" json:"flags,omitempty"`
+ MeterId uint32 `protobuf:"varint,3,opt,name=meter_id,json=meterId,proto3" json:"meter_id,omitempty"`
+ Bands []*OfpMeterBandHeader `protobuf:"bytes,4,rep,name=bands,proto3" json:"bands,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpMeterMod) Reset() { *m = OfpMeterMod{} }
+func (m *OfpMeterMod) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterMod) ProtoMessage() {}
+func (*OfpMeterMod) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{39}
+}
+
+func (m *OfpMeterMod) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpMeterMod.Unmarshal(m, b)
+}
+func (m *OfpMeterMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpMeterMod.Marshal(b, m, deterministic)
+}
+func (m *OfpMeterMod) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpMeterMod.Merge(m, src)
+}
+func (m *OfpMeterMod) XXX_Size() int {
+ return xxx_messageInfo_OfpMeterMod.Size(m)
+}
+func (m *OfpMeterMod) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpMeterMod.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterMod proto.InternalMessageInfo
+
+func (m *OfpMeterMod) GetCommand() OfpMeterModCommand {
+ if m != nil {
+ return m.Command
+ }
+ return OfpMeterModCommand_OFPMC_ADD
+}
+
+func (m *OfpMeterMod) GetFlags() uint32 {
+ if m != nil {
+ return m.Flags
+ }
+ return 0
+}
+
+func (m *OfpMeterMod) GetMeterId() uint32 {
+ if m != nil {
+ return m.MeterId
+ }
+ return 0
+}
+
+func (m *OfpMeterMod) GetBands() []*OfpMeterBandHeader {
+ if m != nil {
+ return m.Bands
+ }
+ return nil
+}
+
+// OFPT_ERROR: Error message (datapath -> controller).
+type OfpErrorMsg struct {
+ //ofp_header header;
+ Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
+ Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
+ Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpErrorMsg) Reset() { *m = OfpErrorMsg{} }
+func (m *OfpErrorMsg) String() string { return proto.CompactTextString(m) }
+func (*OfpErrorMsg) ProtoMessage() {}
+func (*OfpErrorMsg) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{40}
+}
+
+func (m *OfpErrorMsg) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpErrorMsg.Unmarshal(m, b)
+}
+func (m *OfpErrorMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpErrorMsg.Marshal(b, m, deterministic)
+}
+func (m *OfpErrorMsg) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpErrorMsg.Merge(m, src)
+}
+func (m *OfpErrorMsg) XXX_Size() int {
+ return xxx_messageInfo_OfpErrorMsg.Size(m)
+}
+func (m *OfpErrorMsg) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpErrorMsg.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpErrorMsg proto.InternalMessageInfo
+
+func (m *OfpErrorMsg) GetType() uint32 {
+ if m != nil {
+ return m.Type
+ }
+ return 0
+}
+
+func (m *OfpErrorMsg) GetCode() uint32 {
+ if m != nil {
+ return m.Code
+ }
+ return 0
+}
+
+func (m *OfpErrorMsg) GetData() []byte {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
+// OFPET_EXPERIMENTER: Error message (datapath -> controller).
+type OfpErrorExperimenterMsg struct {
+ Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
+ ExpType uint32 `protobuf:"varint,2,opt,name=exp_type,json=expType,proto3" json:"exp_type,omitempty"`
+ Experimenter uint32 `protobuf:"varint,3,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+ Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpErrorExperimenterMsg) Reset() { *m = OfpErrorExperimenterMsg{} }
+func (m *OfpErrorExperimenterMsg) String() string { return proto.CompactTextString(m) }
+func (*OfpErrorExperimenterMsg) ProtoMessage() {}
+func (*OfpErrorExperimenterMsg) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{41}
+}
+
+func (m *OfpErrorExperimenterMsg) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpErrorExperimenterMsg.Unmarshal(m, b)
+}
+func (m *OfpErrorExperimenterMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpErrorExperimenterMsg.Marshal(b, m, deterministic)
+}
+func (m *OfpErrorExperimenterMsg) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpErrorExperimenterMsg.Merge(m, src)
+}
+func (m *OfpErrorExperimenterMsg) XXX_Size() int {
+ return xxx_messageInfo_OfpErrorExperimenterMsg.Size(m)
+}
+func (m *OfpErrorExperimenterMsg) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpErrorExperimenterMsg.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpErrorExperimenterMsg proto.InternalMessageInfo
+
+func (m *OfpErrorExperimenterMsg) GetType() uint32 {
+ if m != nil {
+ return m.Type
+ }
+ return 0
+}
+
+func (m *OfpErrorExperimenterMsg) GetExpType() uint32 {
+ if m != nil {
+ return m.ExpType
+ }
+ return 0
+}
+
+func (m *OfpErrorExperimenterMsg) GetExperimenter() uint32 {
+ if m != nil {
+ return m.Experimenter
+ }
+ return 0
+}
+
+func (m *OfpErrorExperimenterMsg) GetData() []byte {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
+type OfpMultipartRequest struct {
+ //ofp_header header;
+ Type OfpMultipartType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpMultipartType" json:"type,omitempty"`
+ Flags uint32 `protobuf:"varint,2,opt,name=flags,proto3" json:"flags,omitempty"`
+ Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpMultipartRequest) Reset() { *m = OfpMultipartRequest{} }
+func (m *OfpMultipartRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpMultipartRequest) ProtoMessage() {}
+func (*OfpMultipartRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{42}
+}
+
+func (m *OfpMultipartRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpMultipartRequest.Unmarshal(m, b)
+}
+func (m *OfpMultipartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpMultipartRequest.Marshal(b, m, deterministic)
+}
+func (m *OfpMultipartRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpMultipartRequest.Merge(m, src)
+}
+func (m *OfpMultipartRequest) XXX_Size() int {
+ return xxx_messageInfo_OfpMultipartRequest.Size(m)
+}
+func (m *OfpMultipartRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpMultipartRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMultipartRequest proto.InternalMessageInfo
+
+func (m *OfpMultipartRequest) GetType() OfpMultipartType {
+ if m != nil {
+ return m.Type
+ }
+ return OfpMultipartType_OFPMP_DESC
+}
+
+func (m *OfpMultipartRequest) GetFlags() uint32 {
+ if m != nil {
+ return m.Flags
+ }
+ return 0
+}
+
+func (m *OfpMultipartRequest) GetBody() []byte {
+ if m != nil {
+ return m.Body
+ }
+ return nil
+}
+
+type OfpMultipartReply struct {
+ //ofp_header header;
+ Type OfpMultipartType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpMultipartType" json:"type,omitempty"`
+ Flags uint32 `protobuf:"varint,2,opt,name=flags,proto3" json:"flags,omitempty"`
+ Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpMultipartReply) Reset() { *m = OfpMultipartReply{} }
+func (m *OfpMultipartReply) String() string { return proto.CompactTextString(m) }
+func (*OfpMultipartReply) ProtoMessage() {}
+func (*OfpMultipartReply) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{43}
+}
+
+func (m *OfpMultipartReply) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpMultipartReply.Unmarshal(m, b)
+}
+func (m *OfpMultipartReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpMultipartReply.Marshal(b, m, deterministic)
+}
+func (m *OfpMultipartReply) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpMultipartReply.Merge(m, src)
+}
+func (m *OfpMultipartReply) XXX_Size() int {
+ return xxx_messageInfo_OfpMultipartReply.Size(m)
+}
+func (m *OfpMultipartReply) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpMultipartReply.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMultipartReply proto.InternalMessageInfo
+
+func (m *OfpMultipartReply) GetType() OfpMultipartType {
+ if m != nil {
+ return m.Type
+ }
+ return OfpMultipartType_OFPMP_DESC
+}
+
+func (m *OfpMultipartReply) GetFlags() uint32 {
+ if m != nil {
+ return m.Flags
+ }
+ return 0
+}
+
+func (m *OfpMultipartReply) GetBody() []byte {
+ if m != nil {
+ return m.Body
+ }
+ return nil
+}
+
+// Body of reply to OFPMP_DESC request. Each entry is a NULL-terminated
+// ASCII string.
+type OfpDesc struct {
+ MfrDesc string `protobuf:"bytes,1,opt,name=mfr_desc,json=mfrDesc,proto3" json:"mfr_desc,omitempty"`
+ HwDesc string `protobuf:"bytes,2,opt,name=hw_desc,json=hwDesc,proto3" json:"hw_desc,omitempty"`
+ SwDesc string `protobuf:"bytes,3,opt,name=sw_desc,json=swDesc,proto3" json:"sw_desc,omitempty"`
+ SerialNum string `protobuf:"bytes,4,opt,name=serial_num,json=serialNum,proto3" json:"serial_num,omitempty"`
+ DpDesc string `protobuf:"bytes,5,opt,name=dp_desc,json=dpDesc,proto3" json:"dp_desc,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpDesc) Reset() { *m = OfpDesc{} }
+func (m *OfpDesc) String() string { return proto.CompactTextString(m) }
+func (*OfpDesc) ProtoMessage() {}
+func (*OfpDesc) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{44}
+}
+
+func (m *OfpDesc) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpDesc.Unmarshal(m, b)
+}
+func (m *OfpDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpDesc.Marshal(b, m, deterministic)
+}
+func (m *OfpDesc) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpDesc.Merge(m, src)
+}
+func (m *OfpDesc) XXX_Size() int {
+ return xxx_messageInfo_OfpDesc.Size(m)
+}
+func (m *OfpDesc) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpDesc.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpDesc proto.InternalMessageInfo
+
+func (m *OfpDesc) GetMfrDesc() string {
+ if m != nil {
+ return m.MfrDesc
+ }
+ return ""
+}
+
+func (m *OfpDesc) GetHwDesc() string {
+ if m != nil {
+ return m.HwDesc
+ }
+ return ""
+}
+
+func (m *OfpDesc) GetSwDesc() string {
+ if m != nil {
+ return m.SwDesc
+ }
+ return ""
+}
+
+func (m *OfpDesc) GetSerialNum() string {
+ if m != nil {
+ return m.SerialNum
+ }
+ return ""
+}
+
+func (m *OfpDesc) GetDpDesc() string {
+ if m != nil {
+ return m.DpDesc
+ }
+ return ""
+}
+
+// Body for ofp_multipart_request of type OFPMP_FLOW.
+type OfpFlowStatsRequest struct {
+ TableId uint32 `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+ OutPort uint32 `protobuf:"varint,2,opt,name=out_port,json=outPort,proto3" json:"out_port,omitempty"`
+ OutGroup uint32 `protobuf:"varint,3,opt,name=out_group,json=outGroup,proto3" json:"out_group,omitempty"`
+ Cookie uint64 `protobuf:"varint,4,opt,name=cookie,proto3" json:"cookie,omitempty"`
+ CookieMask uint64 `protobuf:"varint,5,opt,name=cookie_mask,json=cookieMask,proto3" json:"cookie_mask,omitempty"`
+ Match *OfpMatch `protobuf:"bytes,6,opt,name=match,proto3" json:"match,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpFlowStatsRequest) Reset() { *m = OfpFlowStatsRequest{} }
+func (m *OfpFlowStatsRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpFlowStatsRequest) ProtoMessage() {}
+func (*OfpFlowStatsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{45}
+}
+
+func (m *OfpFlowStatsRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpFlowStatsRequest.Unmarshal(m, b)
+}
+func (m *OfpFlowStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpFlowStatsRequest.Marshal(b, m, deterministic)
+}
+func (m *OfpFlowStatsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpFlowStatsRequest.Merge(m, src)
+}
+func (m *OfpFlowStatsRequest) XXX_Size() int {
+ return xxx_messageInfo_OfpFlowStatsRequest.Size(m)
+}
+func (m *OfpFlowStatsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpFlowStatsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpFlowStatsRequest proto.InternalMessageInfo
+
+func (m *OfpFlowStatsRequest) GetTableId() uint32 {
+ if m != nil {
+ return m.TableId
+ }
+ return 0
+}
+
+func (m *OfpFlowStatsRequest) GetOutPort() uint32 {
+ if m != nil {
+ return m.OutPort
+ }
+ return 0
+}
+
+func (m *OfpFlowStatsRequest) GetOutGroup() uint32 {
+ if m != nil {
+ return m.OutGroup
+ }
+ return 0
+}
+
+func (m *OfpFlowStatsRequest) GetCookie() uint64 {
+ if m != nil {
+ return m.Cookie
+ }
+ return 0
+}
+
+func (m *OfpFlowStatsRequest) GetCookieMask() uint64 {
+ if m != nil {
+ return m.CookieMask
+ }
+ return 0
+}
+
+func (m *OfpFlowStatsRequest) GetMatch() *OfpMatch {
+ if m != nil {
+ return m.Match
+ }
+ return nil
+}
+
+// Body of reply to OFPMP_FLOW request.
+type OfpFlowStats struct {
+ Id uint64 `protobuf:"varint,14,opt,name=id,proto3" json:"id,omitempty"`
+ TableId uint32 `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+ DurationSec uint32 `protobuf:"varint,2,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
+ DurationNsec uint32 `protobuf:"varint,3,opt,name=duration_nsec,json=durationNsec,proto3" json:"duration_nsec,omitempty"`
+ Priority uint32 `protobuf:"varint,4,opt,name=priority,proto3" json:"priority,omitempty"`
+ IdleTimeout uint32 `protobuf:"varint,5,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"`
+ HardTimeout uint32 `protobuf:"varint,6,opt,name=hard_timeout,json=hardTimeout,proto3" json:"hard_timeout,omitempty"`
+ Flags uint32 `protobuf:"varint,7,opt,name=flags,proto3" json:"flags,omitempty"`
+ Cookie uint64 `protobuf:"varint,8,opt,name=cookie,proto3" json:"cookie,omitempty"`
+ PacketCount uint64 `protobuf:"varint,9,opt,name=packet_count,json=packetCount,proto3" json:"packet_count,omitempty"`
+ ByteCount uint64 `protobuf:"varint,10,opt,name=byte_count,json=byteCount,proto3" json:"byte_count,omitempty"`
+ Match *OfpMatch `protobuf:"bytes,12,opt,name=match,proto3" json:"match,omitempty"`
+ Instructions []*OfpInstruction `protobuf:"bytes,13,rep,name=instructions,proto3" json:"instructions,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpFlowStats) Reset() { *m = OfpFlowStats{} }
+func (m *OfpFlowStats) String() string { return proto.CompactTextString(m) }
+func (*OfpFlowStats) ProtoMessage() {}
+func (*OfpFlowStats) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{46}
+}
+
+func (m *OfpFlowStats) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpFlowStats.Unmarshal(m, b)
+}
+func (m *OfpFlowStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpFlowStats.Marshal(b, m, deterministic)
+}
+func (m *OfpFlowStats) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpFlowStats.Merge(m, src)
+}
+func (m *OfpFlowStats) XXX_Size() int {
+ return xxx_messageInfo_OfpFlowStats.Size(m)
+}
+func (m *OfpFlowStats) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpFlowStats.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpFlowStats proto.InternalMessageInfo
+
+func (m *OfpFlowStats) GetId() uint64 {
+ if m != nil {
+ return m.Id
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetTableId() uint32 {
+ if m != nil {
+ return m.TableId
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetDurationSec() uint32 {
+ if m != nil {
+ return m.DurationSec
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetDurationNsec() uint32 {
+ if m != nil {
+ return m.DurationNsec
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetPriority() uint32 {
+ if m != nil {
+ return m.Priority
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetIdleTimeout() uint32 {
+ if m != nil {
+ return m.IdleTimeout
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetHardTimeout() uint32 {
+ if m != nil {
+ return m.HardTimeout
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetFlags() uint32 {
+ if m != nil {
+ return m.Flags
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetCookie() uint64 {
+ if m != nil {
+ return m.Cookie
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetPacketCount() uint64 {
+ if m != nil {
+ return m.PacketCount
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetByteCount() uint64 {
+ if m != nil {
+ return m.ByteCount
+ }
+ return 0
+}
+
+func (m *OfpFlowStats) GetMatch() *OfpMatch {
+ if m != nil {
+ return m.Match
+ }
+ return nil
+}
+
+func (m *OfpFlowStats) GetInstructions() []*OfpInstruction {
+ if m != nil {
+ return m.Instructions
+ }
+ return nil
+}
+
+// Body for ofp_multipart_request of type OFPMP_AGGREGATE.
+type OfpAggregateStatsRequest struct {
+ TableId uint32 `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+ OutPort uint32 `protobuf:"varint,2,opt,name=out_port,json=outPort,proto3" json:"out_port,omitempty"`
+ OutGroup uint32 `protobuf:"varint,3,opt,name=out_group,json=outGroup,proto3" json:"out_group,omitempty"`
+ Cookie uint64 `protobuf:"varint,4,opt,name=cookie,proto3" json:"cookie,omitempty"`
+ CookieMask uint64 `protobuf:"varint,5,opt,name=cookie_mask,json=cookieMask,proto3" json:"cookie_mask,omitempty"`
+ Match *OfpMatch `protobuf:"bytes,6,opt,name=match,proto3" json:"match,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpAggregateStatsRequest) Reset() { *m = OfpAggregateStatsRequest{} }
+func (m *OfpAggregateStatsRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpAggregateStatsRequest) ProtoMessage() {}
+func (*OfpAggregateStatsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{47}
+}
+
+func (m *OfpAggregateStatsRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpAggregateStatsRequest.Unmarshal(m, b)
+}
+func (m *OfpAggregateStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpAggregateStatsRequest.Marshal(b, m, deterministic)
+}
+func (m *OfpAggregateStatsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpAggregateStatsRequest.Merge(m, src)
+}
+func (m *OfpAggregateStatsRequest) XXX_Size() int {
+ return xxx_messageInfo_OfpAggregateStatsRequest.Size(m)
+}
+func (m *OfpAggregateStatsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpAggregateStatsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpAggregateStatsRequest proto.InternalMessageInfo
+
+func (m *OfpAggregateStatsRequest) GetTableId() uint32 {
+ if m != nil {
+ return m.TableId
+ }
+ return 0
+}
+
+func (m *OfpAggregateStatsRequest) GetOutPort() uint32 {
+ if m != nil {
+ return m.OutPort
+ }
+ return 0
+}
+
+func (m *OfpAggregateStatsRequest) GetOutGroup() uint32 {
+ if m != nil {
+ return m.OutGroup
+ }
+ return 0
+}
+
+func (m *OfpAggregateStatsRequest) GetCookie() uint64 {
+ if m != nil {
+ return m.Cookie
+ }
+ return 0
+}
+
+func (m *OfpAggregateStatsRequest) GetCookieMask() uint64 {
+ if m != nil {
+ return m.CookieMask
+ }
+ return 0
+}
+
+func (m *OfpAggregateStatsRequest) GetMatch() *OfpMatch {
+ if m != nil {
+ return m.Match
+ }
+ return nil
+}
+
+// Body of reply to OFPMP_AGGREGATE request.
+type OfpAggregateStatsReply struct {
+ PacketCount uint64 `protobuf:"varint,1,opt,name=packet_count,json=packetCount,proto3" json:"packet_count,omitempty"`
+ ByteCount uint64 `protobuf:"varint,2,opt,name=byte_count,json=byteCount,proto3" json:"byte_count,omitempty"`
+ FlowCount uint32 `protobuf:"varint,3,opt,name=flow_count,json=flowCount,proto3" json:"flow_count,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpAggregateStatsReply) Reset() { *m = OfpAggregateStatsReply{} }
+func (m *OfpAggregateStatsReply) String() string { return proto.CompactTextString(m) }
+func (*OfpAggregateStatsReply) ProtoMessage() {}
+func (*OfpAggregateStatsReply) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{48}
+}
+
+func (m *OfpAggregateStatsReply) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpAggregateStatsReply.Unmarshal(m, b)
+}
+func (m *OfpAggregateStatsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpAggregateStatsReply.Marshal(b, m, deterministic)
+}
+func (m *OfpAggregateStatsReply) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpAggregateStatsReply.Merge(m, src)
+}
+func (m *OfpAggregateStatsReply) XXX_Size() int {
+ return xxx_messageInfo_OfpAggregateStatsReply.Size(m)
+}
+func (m *OfpAggregateStatsReply) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpAggregateStatsReply.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpAggregateStatsReply proto.InternalMessageInfo
+
+func (m *OfpAggregateStatsReply) GetPacketCount() uint64 {
+ if m != nil {
+ return m.PacketCount
+ }
+ return 0
+}
+
+func (m *OfpAggregateStatsReply) GetByteCount() uint64 {
+ if m != nil {
+ return m.ByteCount
+ }
+ return 0
+}
+
+func (m *OfpAggregateStatsReply) GetFlowCount() uint32 {
+ if m != nil {
+ return m.FlowCount
+ }
+ return 0
+}
+
+// Common header for all Table Feature Properties
+type OfpTableFeatureProperty struct {
+ Type OfpTableFeaturePropType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpTableFeaturePropType" json:"type,omitempty"`
+ // Types that are valid to be assigned to Value:
+ // *OfpTableFeatureProperty_Instructions
+ // *OfpTableFeatureProperty_NextTables
+ // *OfpTableFeatureProperty_Actions
+ // *OfpTableFeatureProperty_Oxm
+ // *OfpTableFeatureProperty_Experimenter
+ Value isOfpTableFeatureProperty_Value `protobuf_oneof:"value"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpTableFeatureProperty) Reset() { *m = OfpTableFeatureProperty{} }
+func (m *OfpTableFeatureProperty) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeatureProperty) ProtoMessage() {}
+func (*OfpTableFeatureProperty) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{49}
+}
+
+func (m *OfpTableFeatureProperty) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpTableFeatureProperty.Unmarshal(m, b)
+}
+func (m *OfpTableFeatureProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpTableFeatureProperty.Marshal(b, m, deterministic)
+}
+func (m *OfpTableFeatureProperty) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpTableFeatureProperty.Merge(m, src)
+}
+func (m *OfpTableFeatureProperty) XXX_Size() int {
+ return xxx_messageInfo_OfpTableFeatureProperty.Size(m)
+}
+func (m *OfpTableFeatureProperty) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpTableFeatureProperty.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeatureProperty proto.InternalMessageInfo
+
+func (m *OfpTableFeatureProperty) GetType() OfpTableFeaturePropType {
+ if m != nil {
+ return m.Type
+ }
+ return OfpTableFeaturePropType_OFPTFPT_INSTRUCTIONS
+}
+
+type isOfpTableFeatureProperty_Value interface {
+ isOfpTableFeatureProperty_Value()
+}
+
+type OfpTableFeatureProperty_Instructions struct {
+ Instructions *OfpTableFeaturePropInstructions `protobuf:"bytes,2,opt,name=instructions,proto3,oneof"`
+}
+
+type OfpTableFeatureProperty_NextTables struct {
+ NextTables *OfpTableFeaturePropNextTables `protobuf:"bytes,3,opt,name=next_tables,json=nextTables,proto3,oneof"`
+}
+
+type OfpTableFeatureProperty_Actions struct {
+ Actions *OfpTableFeaturePropActions `protobuf:"bytes,4,opt,name=actions,proto3,oneof"`
+}
+
+type OfpTableFeatureProperty_Oxm struct {
+ Oxm *OfpTableFeaturePropOxm `protobuf:"bytes,5,opt,name=oxm,proto3,oneof"`
+}
+
+type OfpTableFeatureProperty_Experimenter struct {
+ Experimenter *OfpTableFeaturePropExperimenter `protobuf:"bytes,6,opt,name=experimenter,proto3,oneof"`
+}
+
+func (*OfpTableFeatureProperty_Instructions) isOfpTableFeatureProperty_Value() {}
+
+func (*OfpTableFeatureProperty_NextTables) isOfpTableFeatureProperty_Value() {}
+
+func (*OfpTableFeatureProperty_Actions) isOfpTableFeatureProperty_Value() {}
+
+func (*OfpTableFeatureProperty_Oxm) isOfpTableFeatureProperty_Value() {}
+
+func (*OfpTableFeatureProperty_Experimenter) isOfpTableFeatureProperty_Value() {}
+
+func (m *OfpTableFeatureProperty) GetValue() isOfpTableFeatureProperty_Value {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+func (m *OfpTableFeatureProperty) GetInstructions() *OfpTableFeaturePropInstructions {
+ if x, ok := m.GetValue().(*OfpTableFeatureProperty_Instructions); ok {
+ return x.Instructions
+ }
+ return nil
+}
+
+func (m *OfpTableFeatureProperty) GetNextTables() *OfpTableFeaturePropNextTables {
+ if x, ok := m.GetValue().(*OfpTableFeatureProperty_NextTables); ok {
+ return x.NextTables
+ }
+ return nil
+}
+
+func (m *OfpTableFeatureProperty) GetActions() *OfpTableFeaturePropActions {
+ if x, ok := m.GetValue().(*OfpTableFeatureProperty_Actions); ok {
+ return x.Actions
+ }
+ return nil
+}
+
+func (m *OfpTableFeatureProperty) GetOxm() *OfpTableFeaturePropOxm {
+ if x, ok := m.GetValue().(*OfpTableFeatureProperty_Oxm); ok {
+ return x.Oxm
+ }
+ return nil
+}
+
+func (m *OfpTableFeatureProperty) GetExperimenter() *OfpTableFeaturePropExperimenter {
+ if x, ok := m.GetValue().(*OfpTableFeatureProperty_Experimenter); ok {
+ return x.Experimenter
+ }
+ return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*OfpTableFeatureProperty) XXX_OneofWrappers() []interface{} {
+ return []interface{}{
+ (*OfpTableFeatureProperty_Instructions)(nil),
+ (*OfpTableFeatureProperty_NextTables)(nil),
+ (*OfpTableFeatureProperty_Actions)(nil),
+ (*OfpTableFeatureProperty_Oxm)(nil),
+ (*OfpTableFeatureProperty_Experimenter)(nil),
+ }
+}
+
+// Instructions property
+type OfpTableFeaturePropInstructions struct {
+ // One of OFPTFPT_INSTRUCTIONS,
+ //OFPTFPT_INSTRUCTIONS_MISS.
+ Instructions []*OfpInstruction `protobuf:"bytes,1,rep,name=instructions,proto3" json:"instructions,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpTableFeaturePropInstructions) Reset() { *m = OfpTableFeaturePropInstructions{} }
+func (m *OfpTableFeaturePropInstructions) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeaturePropInstructions) ProtoMessage() {}
+func (*OfpTableFeaturePropInstructions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{50}
+}
+
+func (m *OfpTableFeaturePropInstructions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpTableFeaturePropInstructions.Unmarshal(m, b)
+}
+func (m *OfpTableFeaturePropInstructions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpTableFeaturePropInstructions.Marshal(b, m, deterministic)
+}
+func (m *OfpTableFeaturePropInstructions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpTableFeaturePropInstructions.Merge(m, src)
+}
+func (m *OfpTableFeaturePropInstructions) XXX_Size() int {
+ return xxx_messageInfo_OfpTableFeaturePropInstructions.Size(m)
+}
+func (m *OfpTableFeaturePropInstructions) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpTableFeaturePropInstructions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeaturePropInstructions proto.InternalMessageInfo
+
+func (m *OfpTableFeaturePropInstructions) GetInstructions() []*OfpInstruction {
+ if m != nil {
+ return m.Instructions
+ }
+ return nil
+}
+
+// Next Tables property
+type OfpTableFeaturePropNextTables struct {
+ // One of OFPTFPT_NEXT_TABLES,
+ //OFPTFPT_NEXT_TABLES_MISS.
+ NextTableIds []uint32 `protobuf:"varint,1,rep,packed,name=next_table_ids,json=nextTableIds,proto3" json:"next_table_ids,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpTableFeaturePropNextTables) Reset() { *m = OfpTableFeaturePropNextTables{} }
+func (m *OfpTableFeaturePropNextTables) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeaturePropNextTables) ProtoMessage() {}
+func (*OfpTableFeaturePropNextTables) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{51}
+}
+
+func (m *OfpTableFeaturePropNextTables) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpTableFeaturePropNextTables.Unmarshal(m, b)
+}
+func (m *OfpTableFeaturePropNextTables) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpTableFeaturePropNextTables.Marshal(b, m, deterministic)
+}
+func (m *OfpTableFeaturePropNextTables) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpTableFeaturePropNextTables.Merge(m, src)
+}
+func (m *OfpTableFeaturePropNextTables) XXX_Size() int {
+ return xxx_messageInfo_OfpTableFeaturePropNextTables.Size(m)
+}
+func (m *OfpTableFeaturePropNextTables) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpTableFeaturePropNextTables.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeaturePropNextTables proto.InternalMessageInfo
+
+func (m *OfpTableFeaturePropNextTables) GetNextTableIds() []uint32 {
+ if m != nil {
+ return m.NextTableIds
+ }
+ return nil
+}
+
+// Actions property
+type OfpTableFeaturePropActions struct {
+ // One of OFPTFPT_WRITE_ACTIONS,
+ //OFPTFPT_WRITE_ACTIONS_MISS,
+ //OFPTFPT_APPLY_ACTIONS,
+ //OFPTFPT_APPLY_ACTIONS_MISS.
+ Actions []*OfpAction `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpTableFeaturePropActions) Reset() { *m = OfpTableFeaturePropActions{} }
+func (m *OfpTableFeaturePropActions) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeaturePropActions) ProtoMessage() {}
+func (*OfpTableFeaturePropActions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{52}
+}
+
+func (m *OfpTableFeaturePropActions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpTableFeaturePropActions.Unmarshal(m, b)
+}
+func (m *OfpTableFeaturePropActions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpTableFeaturePropActions.Marshal(b, m, deterministic)
+}
+func (m *OfpTableFeaturePropActions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpTableFeaturePropActions.Merge(m, src)
+}
+func (m *OfpTableFeaturePropActions) XXX_Size() int {
+ return xxx_messageInfo_OfpTableFeaturePropActions.Size(m)
+}
+func (m *OfpTableFeaturePropActions) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpTableFeaturePropActions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeaturePropActions proto.InternalMessageInfo
+
+func (m *OfpTableFeaturePropActions) GetActions() []*OfpAction {
+ if m != nil {
+ return m.Actions
+ }
+ return nil
+}
+
+// Match, Wildcard or Set-Field property
+type OfpTableFeaturePropOxm struct {
+ // TODO is this a uint32???
+ OxmIds []uint32 `protobuf:"varint,3,rep,packed,name=oxm_ids,json=oxmIds,proto3" json:"oxm_ids,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpTableFeaturePropOxm) Reset() { *m = OfpTableFeaturePropOxm{} }
+func (m *OfpTableFeaturePropOxm) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeaturePropOxm) ProtoMessage() {}
+func (*OfpTableFeaturePropOxm) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{53}
+}
+
+func (m *OfpTableFeaturePropOxm) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpTableFeaturePropOxm.Unmarshal(m, b)
+}
+func (m *OfpTableFeaturePropOxm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpTableFeaturePropOxm.Marshal(b, m, deterministic)
+}
+func (m *OfpTableFeaturePropOxm) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpTableFeaturePropOxm.Merge(m, src)
+}
+func (m *OfpTableFeaturePropOxm) XXX_Size() int {
+ return xxx_messageInfo_OfpTableFeaturePropOxm.Size(m)
+}
+func (m *OfpTableFeaturePropOxm) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpTableFeaturePropOxm.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeaturePropOxm proto.InternalMessageInfo
+
+func (m *OfpTableFeaturePropOxm) GetOxmIds() []uint32 {
+ if m != nil {
+ return m.OxmIds
+ }
+ return nil
+}
+
+// Experimenter table feature property
+type OfpTableFeaturePropExperimenter struct {
+ // One of OFPTFPT_EXPERIMENTER,
+ //OFPTFPT_EXPERIMENTER_MISS.
+ Experimenter uint32 `protobuf:"varint,2,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+ ExpType uint32 `protobuf:"varint,3,opt,name=exp_type,json=expType,proto3" json:"exp_type,omitempty"`
+ ExperimenterData []uint32 `protobuf:"varint,4,rep,packed,name=experimenter_data,json=experimenterData,proto3" json:"experimenter_data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpTableFeaturePropExperimenter) Reset() { *m = OfpTableFeaturePropExperimenter{} }
+func (m *OfpTableFeaturePropExperimenter) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeaturePropExperimenter) ProtoMessage() {}
+func (*OfpTableFeaturePropExperimenter) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{54}
+}
+
+func (m *OfpTableFeaturePropExperimenter) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpTableFeaturePropExperimenter.Unmarshal(m, b)
+}
+func (m *OfpTableFeaturePropExperimenter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpTableFeaturePropExperimenter.Marshal(b, m, deterministic)
+}
+func (m *OfpTableFeaturePropExperimenter) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpTableFeaturePropExperimenter.Merge(m, src)
+}
+func (m *OfpTableFeaturePropExperimenter) XXX_Size() int {
+ return xxx_messageInfo_OfpTableFeaturePropExperimenter.Size(m)
+}
+func (m *OfpTableFeaturePropExperimenter) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpTableFeaturePropExperimenter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeaturePropExperimenter proto.InternalMessageInfo
+
+func (m *OfpTableFeaturePropExperimenter) GetExperimenter() uint32 {
+ if m != nil {
+ return m.Experimenter
+ }
+ return 0
+}
+
+func (m *OfpTableFeaturePropExperimenter) GetExpType() uint32 {
+ if m != nil {
+ return m.ExpType
+ }
+ return 0
+}
+
+func (m *OfpTableFeaturePropExperimenter) GetExperimenterData() []uint32 {
+ if m != nil {
+ return m.ExperimenterData
+ }
+ return nil
+}
+
+// Body for ofp_multipart_request of type OFPMP_TABLE_FEATURES./
+// Body of reply to OFPMP_TABLE_FEATURES request.
+type OfpTableFeatures struct {
+ TableId uint32 `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ MetadataMatch uint64 `protobuf:"varint,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"`
+ MetadataWrite uint64 `protobuf:"varint,4,opt,name=metadata_write,json=metadataWrite,proto3" json:"metadata_write,omitempty"`
+ Config uint32 `protobuf:"varint,5,opt,name=config,proto3" json:"config,omitempty"`
+ MaxEntries uint32 `protobuf:"varint,6,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"`
+ // Table Feature Property list
+ Properties []*OfpTableFeatureProperty `protobuf:"bytes,7,rep,name=properties,proto3" json:"properties,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpTableFeatures) Reset() { *m = OfpTableFeatures{} }
+func (m *OfpTableFeatures) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeatures) ProtoMessage() {}
+func (*OfpTableFeatures) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{55}
+}
+
+func (m *OfpTableFeatures) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpTableFeatures.Unmarshal(m, b)
+}
+func (m *OfpTableFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpTableFeatures.Marshal(b, m, deterministic)
+}
+func (m *OfpTableFeatures) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpTableFeatures.Merge(m, src)
+}
+func (m *OfpTableFeatures) XXX_Size() int {
+ return xxx_messageInfo_OfpTableFeatures.Size(m)
+}
+func (m *OfpTableFeatures) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpTableFeatures.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeatures proto.InternalMessageInfo
+
+func (m *OfpTableFeatures) GetTableId() uint32 {
+ if m != nil {
+ return m.TableId
+ }
+ return 0
+}
+
+func (m *OfpTableFeatures) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *OfpTableFeatures) GetMetadataMatch() uint64 {
+ if m != nil {
+ return m.MetadataMatch
+ }
+ return 0
+}
+
+func (m *OfpTableFeatures) GetMetadataWrite() uint64 {
+ if m != nil {
+ return m.MetadataWrite
+ }
+ return 0
+}
+
+func (m *OfpTableFeatures) GetConfig() uint32 {
+ if m != nil {
+ return m.Config
+ }
+ return 0
+}
+
+func (m *OfpTableFeatures) GetMaxEntries() uint32 {
+ if m != nil {
+ return m.MaxEntries
+ }
+ return 0
+}
+
+func (m *OfpTableFeatures) GetProperties() []*OfpTableFeatureProperty {
+ if m != nil {
+ return m.Properties
+ }
+ return nil
+}
+
+// Body of reply to OFPMP_TABLE request.
+type OfpTableStats struct {
+ TableId uint32 `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+ ActiveCount uint32 `protobuf:"varint,2,opt,name=active_count,json=activeCount,proto3" json:"active_count,omitempty"`
+ LookupCount uint64 `protobuf:"varint,3,opt,name=lookup_count,json=lookupCount,proto3" json:"lookup_count,omitempty"`
+ MatchedCount uint64 `protobuf:"varint,4,opt,name=matched_count,json=matchedCount,proto3" json:"matched_count,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *OfpTableStats) Reset() { *m = OfpTableStats{} }
+func (m *OfpTableStats) String() string { return proto.CompactTextString(m) }
+func (*OfpTableStats) ProtoMessage() {}
+func (*OfpTableStats) Descriptor() ([]byte, []int) {
+ return fileDescriptor_08e3a4e375aeddc7, []int{56}
+}
+
+func (m *OfpTableStats) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OfpTableStats.Unmarshal(m, b)
+}
+func (m *OfpTableStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OfpTableStats.Marshal(b, m, deterministic)
+}
+func (m *OfpTableStats) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OfpTableStats.Merge(m, src)
+}
+func (m *OfpTableStats) XXX_Size() int {
+ return xxx_messageInfo_OfpTableStats.Size(m)
+}
+func (m *OfpTableStats) XXX_DiscardUnknown() {
+ xxx_messageInfo_OfpTableStats.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableStats proto.InternalMessageInfo
+
+func (m *OfpTableStats) GetTableId() uint32 {
+ if m != nil {
+ return m.TableId
+ }
+ return 0
+}
+
+func (m *OfpTableStats) GetActiveCount() uint32 {
+ if m != nil {
+ return m.ActiveCount
+ }
+ return 0
+}
+
+func (m *OfpTableStats) GetLookupCount() uint64 {
+ if m != nil {
+ return m.LookupCount
+ }
+ return 0
+}
+