Skip to content

Commit

Permalink
Firewall ingress rule destinations are optional, too. (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 authored Feb 15, 2024
1 parent c9e4944 commit 9458c9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/metal-api/internal/service/v1/firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type FirewallEgressRule struct {
type FirewallIngressRule struct {
Protocol string `json:"protocol,omitempty" description:"the protocol for the rule, defaults to tcp" enum:"tcp|udp" optional:"true"`
Ports []int `json:"ports" description:"the ports affected by this rule"`
To []string `json:"to" description:"the cidrs affected by this rule"`
To []string `json:"to,omitempty" description:"the cidrs affected by this rule" optional:"true"`
From []string `json:"from" description:"the cidrs affected by this rule"`
Comment string `json:"comment,omitempty" description:"an optional comment describing what this rule is used for" optional:"true"`
}
Expand Down
3 changes: 1 addition & 2 deletions spec/metal-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -1365,8 +1365,7 @@
},
"required": [
"from",
"ports",
"to"
"ports"
]
},
"v1.FirewallResponse": {
Expand Down

0 comments on commit 9458c9d

Please sign in to comment.