From e1d797ae405329835d4c4b94df88078a28c3cb9e Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Wed, 22 Jan 2025 17:38:01 +0100 Subject: [PATCH] introduce gw_priority Signed-off-by: Nicolas De Loof --- schema/compose-spec.json | 3 ++- types/types.go | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/schema/compose-spec.json b/schema/compose-spec.json index bfaa72db..b5a890fa 100644 --- a/schema/compose-spec.json +++ b/schema/compose-spec.json @@ -327,7 +327,8 @@ "^.+$": {"type": ["string", "number"]} } }, - "priority": {"type": "number"} + "priority": {"type": "number"}, + "gw_priority": {"type": "number"} }, "additionalProperties": false, "patternProperties": {"^x-": {}} diff --git a/types/types.go b/types/types.go index 83ad830e..4c7baa46 100644 --- a/types/types.go +++ b/types/types.go @@ -438,13 +438,14 @@ type PlacementPreferences struct { // ServiceNetworkConfig is the network configuration for a service type ServiceNetworkConfig struct { - Priority int `yaml:"priority,omitempty" json:"priority,omitempty"` - Aliases []string `yaml:"aliases,omitempty" json:"aliases,omitempty"` - Ipv4Address string `yaml:"ipv4_address,omitempty" json:"ipv4_address,omitempty"` - Ipv6Address string `yaml:"ipv6_address,omitempty" json:"ipv6_address,omitempty"` - LinkLocalIPs []string `yaml:"link_local_ips,omitempty" json:"link_local_ips,omitempty"` - MacAddress string `yaml:"mac_address,omitempty" json:"mac_address,omitempty"` - DriverOpts Options `yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"` + Priority int `yaml:"priority,omitempty" json:"priority,omitempty"` + GatewayPriority int `yaml:"gw_priority,omitempty" json:"gw_priority,omitempty"` + Aliases []string `yaml:"aliases,omitempty" json:"aliases,omitempty"` + Ipv4Address string `yaml:"ipv4_address,omitempty" json:"ipv4_address,omitempty"` + Ipv6Address string `yaml:"ipv6_address,omitempty" json:"ipv6_address,omitempty"` + LinkLocalIPs []string `yaml:"link_local_ips,omitempty" json:"link_local_ips,omitempty"` + MacAddress string `yaml:"mac_address,omitempty" json:"mac_address,omitempty"` + DriverOpts Options `yaml:"driver_opts,omitempty" json:"driver_opts,omitempty"` Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"` }