oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
240 stars 36 forks source link

Possibly use `dpd_client::types::PortId` instead of `String` for `port_name` #3059

Open internet-diglett opened 1 year ago

internet-diglett commented 1 year ago

https://github.com/oxidecomputer/omicron/blob/1e89e384a2e1186bd6bf33ebfce4f0d8a5d24ce0/common/src/api/external/mod.rs#L2217-L2218

rcgoodfellow commented 3 months ago

We cannot do this in omicron_common due to the issue described in

sunshowers commented 3 months ago

Hmmmmm this is definitely very annoying. We could define our own types and then have dpd-client put in From impls. But also the switch port is a pretty fundamental type, and I think maybe should live in its own crate -- and from there we can use @ahl's work to automatically import them in clients.