Skip to content

Conversation

@chucklever
Copy link
Contributor

Replicate the dynamic menu generation that AWS and Lambda Labs does.

I'm about to add scripts to generate some of the Kconfig menus that
configure the OCI terraform provider. Some commonly used helper
functions are introduced first as a loadable module.

Generated-by: Claude AI
Signed-off-by: Chuck Lever <[email protected]>
Luis convinced me that placing each region in its own subdirectory
does not make dynamically generating Kconfig menus any simpler.

I'm making this change now so we have a cleaner diff to compare the
current menu file with the dynamically-generated one.

Signed-off-by: Chuck Lever <[email protected]>
Duplicate the same functionality as is already provided for AWS.

The generated region menu includes only the regions to which the
user tenancy is subscribed.

Unfortunately the region friend names (ie, city name, etc.) are
not available through OCI's API. Therefore a separate file is
maintained with the mapping of region codes to human-friendly
region descriptions.

The region_friendly_names.yml file contains detailed inline
documentation for this process. No script is provided because the
information comes from documentation, not the API. However, updating
the dictionary can be handled by an AI if desired.

Generated-by: Claude AI
Signed-off-by: Chuck Lever <[email protected]>
Start introducing OCI support to the dynamic menu generate targets
by adding the location menu to the cloud_configs.py script.

This support is intended to work like the reference implementation
under terraform/lambdalabs/

Signed-off-by: Chuck Lever <[email protected]>
I'm about to add a script to dynamically generate the shape menu
and another script to dynamically generate the OS image menu. It
will be easier if these menus were in separate files.

Signed-off-by: Chuck Lever <[email protected]>
Instead of sourcing files in a subdirectory, move the content of
those files right into Kconfig.shapes. This will make it easier
to examine the differences between the current menu content and
the dynamically-generated content.

Signed-off-by: Chuck Lever <[email protected]>
Duplicate the same functionality as is already provided for AWS.

The generated shape menu includes shapes that are available in the
region or regions that the user tenancy is subscribed to.

A "Generic" family is retained for users who simply want to specify
a memory size and CPU count and go on their merry way.

Generated-by: Claude AI
Signed-off-by: Chuck Lever <[email protected]>
Teach "make cloud-config" and "make cloud-config-oci" to update the
Kconfig.shape menu with dynamically discovered information. This
information is based on what resources are available to the user's
tenancy and region subscription.

This support is intended to work like the reference implementation
under terraform/lambdalabs/

Signed-off-by: Chuck Lever <[email protected]>
Instead of sourcing files in a subdirectory, move the content of
those files right into Kconfig.images. This will make it easier
to examine the differences between the current menu content and
the dynamically-generated content.

Signed-off-by: Chuck Lever <[email protected]>
Duplicate the same functionality as is already provided for AWS.

The generated image menu includes platform images that are available
in the region or regions that the user tenancy is subscribed to.

Users can still manually select marketplace images by selecting the
"Custom image OCID" option and pasting in the image's OCID directly.

Generated-by: Claude AI
Signed-off-by: Chuck Lever <[email protected]>
Teach "make cloud-config" and "make cloud-config-oci" to update the
Kconfig.image menu with dynamically discovered information. This
information is based on what resources are available to the user's
tenancy and region subscription.

This support is intended to work like the reference implementation
under terraform/lambdalabs/

Signed-off-by: Chuck Lever <[email protected]>
@chucklever chucklever merged commit 0dde23a into main Nov 5, 2025
22 checks passed
@chucklever chucklever deleted the cel/oci-dynamic-menu branch November 5, 2025 18:31
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.

2 participants