Skip to content

Commit

Permalink
Adding ExternalPortReserved flag to NatPolicy for HNS API V1. THis is…
Browse files Browse the repository at this point in the history
… a flag exposed for docker to avoid port reservation conflict with external port (#1370) (#1373)

HNS API V2 will use NatFlags to check and see if ExternalPortReserved is set

(cherry picked from commit b85f3fd)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>

Co-authored-by: Kendall Stratton <kestratt@microsoft.com>
(cherry picked from commit dbb347e)
Signed-off-by: Ameya Gawde <agawde@mirantis.com>

Co-authored-by: Kendall Stratton <kestratt@microsoft.com>
  • Loading branch information
ameyag and kestratt authored May 2, 2022
1 parent 9c3e34e commit 83e1852
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions internal/hns/hnspolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ const (
)

type NatPolicy struct {
Type PolicyType `json:"Type"`
Protocol string `json:",omitempty"`
InternalPort uint16 `json:",omitempty"`
ExternalPort uint16 `json:",omitempty"`
Type PolicyType `json:"Type"`
Protocol string `json:",omitempty"`
InternalPort uint16 `json:",omitempty"`
ExternalPort uint16 `json:",omitempty"`
ExternalPortReserved bool `json:",omitempty"`
}

type QosPolicy struct {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 83e1852

Please sign in to comment.