lxd
lxd copied to clipboard
Refactor entity types for maintainability
The shared/entity package uses a string type for all entity types. This means when adding new entities we need to update all functions and switch statements in the entities package. This is a headache for maintainability and should be changed.
Additionally, the projectName returned by entity.ParseURL should contain the project name if the URL is a project URL. (Currently it is only the contents of the project query parameter).
See https://github.com/canonical/lxd/pull/12873#discussion_r1497178026_
- [ ] Evaluate whether
EntityTypeContaineris used.