Skip to content

Commit

Permalink
Add method GetMessage to interface OpenFlowModMessage (#38)
Browse files Browse the repository at this point in the history
Add method `GetMessage` to interface `OpenFlowModMessage` to get
the member `message` of the struct which implements the interface
`OpenFlowModMessage`.

Signed-off-by: Hongliang Liu <[email protected]>
  • Loading branch information
hongliangl authored Sep 28, 2022
1 parent e642da2 commit 2be300f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.6.2
v0.6.3
4 changes: 4 additions & 0 deletions ofctrl/fgraphFlow.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions ofctrl/fgraphGroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions ofctrl/fgraphMeter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions ofctrl/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var uid uint32 = 1
type OpenFlowModMessage interface {
resetXid(xid uint32) util.Message
getXid() uint32
GetMessage() util.Message
}

type Transaction struct {
Expand Down

0 comments on commit 2be300f

Please sign in to comment.