-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Port Number to Audit Logging #3277
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3277 +/- ##
=======================================
Coverage 60.12% 60.12%
=======================================
Files 331 331
Lines 28444 28434 -10
=======================================
- Hits 17102 17097 -5
+ Misses 9483 9477 -6
- Partials 1859 1860 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -107,80 +105,6 @@ func getInfoInReg(regMatch *ofctrl.MatchField, rng *openflow13.NXRange) (uint32, | |||
return regValue.Data, nil | |||
} | |||
|
|||
// getNetworkPolicyInfo fills in tableName, npName, ofPriority, disposition of logInfo ob. | |||
func getNetworkPolicyInfo(pktIn *ofctrl.PacketIn, c *Controller, ob *logInfo) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qq: why is this UT no longer needed? Is it because it is covered in some other testcases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the only usage of getPacketInfo
was audit logging, a new function ParsePacketIn
was later implemented in pkg/ovs/openflow/ofctrl_packetin.go
that covered the exact functionality and was more widely used.
Deleted the getPacketInfo
function and thus the UT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess my question is then if the same test deleted here is already implemented for the UT of ParsePacketIn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it was not implemented. Adding some similar UT for ParsePacketIn
and other funcs in ofctrl_packetin.go
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one minor comment
Signed-off-by: Qiyue Yao <[email protected]> add UT Signed-off-by: Qiyue Yao <[email protected]>
/test-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/test-e2e |
/skip-e2e which failed on unrelated case TestIPSec/testIPSecTunnelConnectivity. |
Signed-off-by: Qiyue Yao <[email protected]>
Adding port number to audit logging to solve issue #3168
Change:
logPacket
in packetin file, replaced the old parse packet function for consistency, removed corresponding UT.Signed-off-by: Qiyue Yao [email protected]