From 2be300fd474f04affe50e80128d08b61262067d1 Mon Sep 17 00:00:00 2001 From: Hongliang Liu <75655411+hongliangl@users.noreply.github.com> Date: Wed, 28 Sep 2022 10:33:21 +0800 Subject: [PATCH] Add method GetMessage to interface OpenFlowModMessage (#38) Add method `GetMessage` to interface `OpenFlowModMessage` to get the member `message` of the struct which implements the interface `OpenFlowModMessage`. Signed-off-by: Hongliang Liu --- VERSION | 2 +- ofctrl/fgraphFlow.go | 4 ++++ ofctrl/fgraphGroup.go | 4 ++++ ofctrl/fgraphMeter.go | 4 ++++ ofctrl/transaction.go | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 45964c66..e4c57af0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.6.2 +v0.6.3 diff --git a/ofctrl/fgraphFlow.go b/ofctrl/fgraphFlow.go index e6300694..fe25ab3b 100644 --- a/ofctrl/fgraphFlow.go +++ b/ofctrl/fgraphFlow.go @@ -197,6 +197,10 @@ func (m *FlowBundleMessage) getXid() uint32 { return m.message.Xid } +func (m *FlowBundleMessage) GetMessage() util.Message { + return m.message +} + // string key for the flow // FIXME: simple json conversion for now. This needs to be smarter func (self *Flow) flowKey() string { diff --git a/ofctrl/fgraphGroup.go b/ofctrl/fgraphGroup.go index aaddf8d1..4714e1b3 100644 --- a/ofctrl/fgraphGroup.go +++ b/ofctrl/fgraphGroup.go @@ -27,6 +27,10 @@ func (m *GroupBundleMessage) getXid() uint32 { return m.message.Xid } +func (m *GroupBundleMessage) GetMessage() util.Message { + return m.message +} + type Group struct { Switch *OFSwitch ID uint32 diff --git a/ofctrl/fgraphMeter.go b/ofctrl/fgraphMeter.go index 00334eb6..b2578e2a 100644 --- a/ofctrl/fgraphMeter.go +++ b/ofctrl/fgraphMeter.go @@ -32,6 +32,10 @@ func (m *MeterBundleMessage) getXid() uint32 { return m.message.Xid } +func (m *MeterBundleMessage) GetMessage() util.Message { + return m.message +} + type Meter struct { Switch *OFSwitch ID uint32 diff --git a/ofctrl/transaction.go b/ofctrl/transaction.go index 30f01469..753978af 100644 --- a/ofctrl/transaction.go +++ b/ofctrl/transaction.go @@ -31,6 +31,7 @@ var uid uint32 = 1 type OpenFlowModMessage interface { resetXid(xid uint32) util.Message getXid() uint32 + GetMessage() util.Message } type Transaction struct {