You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mgd returned an OK for adding these routes, but internally only kept the priority 14 one. The current structure of this API is a HashMap<String, Vec<Path>> where the key is a stringified prefix. @taspelund noted that the more accurate structure here would be a Map<(Prefix, Nexthop, VlanId), Properties> - we can have at most one entry for that triple. JSON (and therefore OpenAPI) requires keys be strings, but we can still use stronger types on the Rust side.
A technique we've used in other places in Omicron is to make the OpenAPI / JSON type a flat Vec, so in this case a Vec<(Prefix, Nexthop, VlanId, Properties)>, but serialize/deserialize from the stronger Map type (be that a HashMap/BTreeMap or any other map/set-like collection), and have the Deserialize implementation raise an error if there are any duplicate keys.
Activity