-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement M1 Provisioning Session #15
Comments
Went through the relevant specifications and started implementing the M1 Provisioning session. As a first step, generated code files from the latest This is supposed to be implemented as a set (array or list that doesn't contain duplicate entries) and included in the generated code files through However there is no implementation of To handle multiple provisioning sessions in the Application Function, we may possibly need to implement wrapper functions around the functions that implement list, which prevents duplicates from entering the list. However, to handle a single provisioning session, it is sufficient to create a |
Discussed with @davidjwbbc. First conclusion is that the absence of an implemention of sets for the C language needs to be reported as a bug to the OpenAPI Generator project. Creating a wrapper around the list data structure that rejects duplicate values sounds like a reasonable approach. This would presumably entail creating Rather than closing this gap in our project, my preference would be to contribute a fix to the OpenAPI Generator project, if the contribution licence terms are amenable. Please could you look into this, @davidjwbbc? |
To unblock @devbbc's development, I think it would be acceptable to use a simple list for the time being as a substitute for a set. The implementation of the M1 Server can ensure that all resources referenced by the Provisioning Session are assigned unique resource identifiers (let's say UUIDs) when they are created which will naturally ensure no duplicates. |
On reception of the For example:
Currently, provisioningSessionType, aspId, and externalApplicationId are generated by the Application Function instead of parsing the Provisioning Session resource sent by the client in the POST body. Also, the response does not yet contain a The next step is to parse the received Provisioning Session resource and use it to populate the data structure for the Provisioning Session and to add in the missing |
The Application Function can now receive and parse the Provisioning Session resource sent by the client in the POST body. It then populates the data structure for this Provisioning Session and sends a response back to the client with information about the created resource.
The below output show the Provisioning Session resource created without the
The deletion of the created resource is still a work in progress. |
Discussed the approach to the destruction operation with @davidjwbbc and @devbbc and there are two implementation options for the
We selected option 2 because it reduces the likelihood of the M1 client request timing out if, for example, the 5GMS AS is not responding at the time of the destruction request. Exceptions:
|
Observation from @davidjwbbc: the Provisioning Session resource lists the set of server certificates, metrics reporting configurations, content preparation templates currently associated with it (as arrays of resource identifiers). However, as of TS 26.512 V17.2.0, there is no indication of whether there is a (singleton) Content Hosting Configuration or consumption reporting configuration associated. Maybe a simple boolean flag could be added to the data structure in a future revision of TS 26.512. |
The Application Function now marks the provisioning session for deletion and responds immediately to the M1 client with 202 Accepted. For example, let's create a Provisioning session with the Id generated by the AF:
To delete this Provisioning session
|
This is functionally complete. Now tidying up the code. |
Raised 5G-MAG/Standards#35 to address this. |
Checked the latest release of openapi-generator (v6.2.1) and this is still an issue with generated C code. I will raise this as an issue on the openapi-generator project. I've had a look at what the fix would entail and it involves some fairly minor edits to a lot of template file and the addition of the set.c and set.h files. To implement set in the current open5gs main branch, we would need to make the same sort of template file edits to the templates in |
Discussed the missing OpenAPI Generator "set" feature. @davidjwbbc will raise an issue on the OpenAPI Generator project and notify @acetcom of the problem with unique lists (although he has probably not encountered it yet). For the lists of resource identifiers in the M1 Provisoning Session resource, the members of the various arrays are UUIDs so the quick-and-dirty typedef solution is adequate since the Application Function ensures uniqueness by virtue of the fact that each UUID in inherently unique. |
Issue raised on the openapi-generator project: OpenAPITools/openapi-generator#14234. |
Completed tidying of the code and now ready for review. |
Had a look through the code and found some minor bugs which I fixed. These fixes are part of the M3 uplift to TS 26.512 v17.3.0 (PR #26) since the M1 provisioning session handling was included in the uplift due to nature of the code changes making difficult to unpick. To exercise this properly we really need the M1 client (Issue #20), but hand crafted curl requests will suffice for now. |
Relevant specifications
Specification
In this reference implementation, each Provisioning Session resource shall be uniquely identified by a UUID that is assigned by the 5GMS AF at the point of creation.
The following operations are included in the scope of this issue.
Create: M1_ProvisioningSession_createProvisioningSession
A Provisioning Session resource is sent by the M1 client to the M1 server.
aspId
andexternalApplicationId
in M1_ProvisioningSession_createProvisioningSession Standards#33.The 5GMS AF is responsible for allocating a Provisioning Session ID and in this implementation it is a UUID.
On success, the fully populated Provisioning Session resource is returned in a
200 OK
response.Retrieve: M1_ProvisioningSession_getProvisioningSessionById
The current Provisioning Session resource is returned.
Update
There is no update operation associated with this API.
Destroy: M1_ProvisioningSession_destroyProvisioningSession
Discussed the approach to the destruction operation with @davidjwbbc and @devbbc and there are two implementation options for the
M1_ProvisioningSession_destroyProvisioningSession
operation:After validating the Provisioning Session ID path parameter, the 5GMS AF marks the Provisioning Session for deletion and responds immediately to the M1 client with
202 Accepted
. Then, when it processes the deletion task, the 5GMS AF creates some jobs on its task queue to invoke the relevant M3 destruction operations for all subresources (server certificates, Content Hosting Configurations and Content Preparation Templates).Note that the
202 Accepted
response is not present in the M1 API (as of TS 26.512 V17.2.0). An issue has been raised to add this to the specification based on implementation experience - See Add signalling for asynchronous destruction of Provisioning Session at reference point M1 Standards#34.If an M1 client attempts to destroy a Provisioning Session that has no associated subresources, or has subresources that have not yet been synchronised to any 5GMS AS, then the local state in the 5GMS AF is deleted synchronously and a
204 No Content
response is returned.If an M1 client attempts to perform any operation on a Provisioning Session that is already marked for deletion, the response is
404 Not Found
.The text was updated successfully, but these errors were encountered: