Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decouple inventory and blueprint zone types (#6466)
There should be no behavioral changes in this PR and it is solely a refactoring for future ease of development. When converting between DB types and omicron internal types for zones, we previously had some common types shared between the inventory and blueprint zones to help with the conversions because the commonality is so great. However, blueprint zone types can contain extra, auxiliary information to help with planning, and the conversion to the common types required passing in extra values to the common constructor for the blueprint types and then passing `None` for the inventory types. Currently the only extra type contained in the blueprint types is an `ExternalIpUuid`. However, as we expand the reconfigurator we anticipate the blueprint gaining more auxiliary information and diverging further from the inventory types. This is already starting to happen with the replicated clickhouse zone types. Therefore, this PR removes the common types altogether, except for the `OmicronZoneNic` type, and adds some helper functions that can be used for both blueprint and inventory conversions. The logic of these functions is largely copied over from what was previously in the shared type generation code.
- Loading branch information