Skip to content

Conversation

klaskosk
Copy link
Collaborator

The current oran package uses the Kubernetes API to interact with the O-RAN resources. However, an important aspect of O-RAN is the ability to use the O2IMS API to perform basic CRUD operations on these resources. To allow using both APIs, starting with just the ProvisioningRequest resource, this PR includes a number of changes:

  • OpenAPI codegen tool using the new tool feature in go 1.24. This allows for including the tool dependencies separate from our actual dependencies.
  • Including the openapi.yaml files from openshift-kni/oran-o2ims and using them to automatically generate clients.
  • A client builder and a specific ProvisioningClient to interact more broadly with the O2IMS API and the specific API for provisioning.
  • Implementation of runtimeclient.Client for the ProvisioningClient, allowing the existing ProvisioningRequestBuilder to (mostly) transparently use the O2IMS API.
  • Unit tests for all the ProvisioningClient methods using a mock of the generated client.
  • Separate depguard rules for the oran/api package that allow using the oapi-codegen runtime.

sebrandon1
sebrandon1 previously approved these changes Apr 28, 2025
@klaskosk klaskosk marked this pull request as draft April 28, 2025 16:43
@klaskosk klaskosk force-pushed the oran-api branch 2 times, most recently from 3bf5c56 to 5d00508 Compare April 29, 2025 11:50
The current oran package uses the Kubernetes API to interact with the O-RAN resources. However, an important aspect of O-RAN is the ability to use the O2IMS API to perform basic CRUD operations on these resources. To allow using both APIs, starting with just the ProvisioningRequest resource, this PR includes a number of changes:

* OpenAPI codegen tool using the new tool feature in go 1.24. This allows for including the tool dependencies separate from our actual dependencies.
* Including the openapi.yaml files from openshift-kni/oran-o2ims and using them to automatically generate clients.
* A client builder and a specific ProvisioningClient to interact more broadly with the O2IMS API and the specific API for provisioning.
* Implementation of runtimeclient.Client for the ProvisioningClient, allowing the existing ProvisioningRequestBuilder to (mostly) transparently use the O2IMS API.
* Unit tests for all the ProvisioningClient methods using a mock of the generated client.
* Separate depguard rules for the oran/api package that allow using the oapi-codegen runtime.
@klaskosk klaskosk marked this pull request as ready for review April 29, 2025 18:36
@klaskosk klaskosk merged commit dbf2784 into rh-ecosystem-edge:main May 2, 2025
5 of 7 checks passed
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