Skip to content

feat: Add service CRUD to the catalog provider#773

Open
mashawes wants to merge 2 commits into
openstack-experimental:mainfrom
mashawes:service-crud
Open

feat: Add service CRUD to the catalog provider#773
mashawes wants to merge 2 commits into
openstack-experimental:mainfrom
mashawes:service-crud

Conversation

@mashawes

@mashawes mashawes commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Extends the catalog with service CRUD, following the same pattern as region (#723).

  • Adds ServiceCreate and ServiceUpdate types in core-types with validator length limits (id max 64, type and name max 255) and alphabetized fields.
  • Adds create, update, and delete to the catalog-sql driver. Read, list, and get already existed. A service's name is stored inside the extra JSON blob so create and update merge it there.
  • Wires the new methods through the CatalogApi provider including provider_api, service, mock, and mod, calling validate() early in create, update, and list.
  • Adds integration tests under tests/integration/src/catalog/service/ covering create, get, list with type filter, update, and delete, plus not-found and over-length validation cases.

Closes #724

Note: this contribution was developed with AI assistance.

Signed-off-by: Mohammed <mashawes@andrew.cmu.edu>
#[derive(Builder, Clone, Debug, Default, PartialEq, Validate)]
#[builder(build_fn(error = "BuilderError"))]
#[builder(setter(strip_option, into))]
pub struct Service {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the database model we have only id/enabled/type/extra. All other fields are captured as json under extra. As such we should not try to re-expose the "name" here separately since it is anyway an optional field. Please remove "name" field from models

@mashawes mashawes requested a review from gtema June 9, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend catalog-sql driver with service CRUD commands

2 participants