Skip to content

Commit

Permalink
Address more comments
Browse files Browse the repository at this point in the history
Signed-off-by: Dyanngg <dingyang@vmware.com>
  • Loading branch information
Dyanngg committed Aug 13, 2024
1 parent 895b2ea commit 5693126
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 132 deletions.
2 changes: 1 addition & 1 deletion docs/antctl.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ in the specified OVS flow tables, or all or the specified OVS groups.
antctl get ovsflows
antctl get ovsflows -p POD -n NAMESPACE
antctl get ovsflows -S SERVICE -n NAMESPACE
antctl get ovsflows -N NETWORKPOLICY -n NAMESPACE --type NETWORKPOLICY_TYPE
antctl get ovsflows [-n NAMESPACE] -N NETWORKPOLICY --type NETWORKPOLICY_TYPE
antctl get ovsflows -T TABLE_A,TABLE_B
antctl get ovsflows -T TABLE_A,TABLE_B_NUM
antctl get ovsflows -G all
Expand Down
3 changes: 2 additions & 1 deletion pkg/agent/apiserver/handlers/ovsflows/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ func HandleFunc(aq agentquerier.AgentQuerier) http.HandlerFunc {
if networkPolicy != "" && policyType != "" {
_, ok := querier.NetworkPolicyTypeMap[policyType]
if !ok {
http.Error(w, "unknown policy type. Valid types are K8sNP, ACNP, ANNP, BANP or ANP", http.StatusBadRequest)
errorMsg := fmt.Sprintf("unknown policy type. Valid types are %v", querier.GetNetworkPolicyTypeShorthands())
http.Error(w, errorMsg, http.StatusBadRequest)
return
}
if querier.NamespaceScopedPolicyTypes.Has(policyType) && namespace == "" {
Expand Down
Loading

0 comments on commit 5693126

Please sign in to comment.