Skip to content

Commit

Permalink
omit source & dest ports from request if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Overglazed committed Mar 17, 2022
1 parent 6828b93 commit 4d2370a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/service/ecloud/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ type CreateFirewallRulePortRequest struct {
Name string `json:"name,omitempty"`
FirewallRuleID string `json:"firewall_rule_id"`
Protocol FirewallRulePortProtocol `json:"protocol"`
Source string `json:"source"`
Destination string `json:"destination"`
Source string `json:"source,omitempty"`
Destination string `json:"destination,omitempty"`
}

// PatchFirewallRulePortRequest represents a request to patch a firewall rule port
Expand Down Expand Up @@ -462,8 +462,8 @@ type CreateNetworkRulePortRequest struct {
Name string `json:"name,omitempty"`
NetworkRuleID string `json:"network_rule_id"`
Protocol NetworkRulePortProtocol `json:"protocol"`
Source string `json:"source"`
Destination string `json:"destination"`
Source string `json:"source,omitempty"`
Destination string `json:"destination,omitempty"`
}

// PatchNetworkRulePortRequest represents a request to patch a network rule port
Expand Down

0 comments on commit 4d2370a

Please sign in to comment.