Skip to content

Conversation

@NMSVishal
Copy link

Added POST API for accepting provisioning request payload

@nephio-prow
Copy link
Contributor

nephio-prow bot commented Sep 18, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign liamfallon for approval by writing /assign @liamfallon in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nephio-prow
Copy link
Contributor

nephio-prow bot commented Sep 18, 2025

Hi @NMSVishal. Thanks for your PR.

I'm waiting for a nephio-project member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@arora-sagar arora-sagar requested review from arora-sagar and removed request for johnbelamaric September 18, 2025 13:02
@liamfallon
Copy link
Member

/ok-to-test

Copy link
Contributor

Choose a reason for hiding this comment

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

@NMSVishal Is it needed to remove the blank space there? I think we can leave it

Copy link
Author

Choose a reason for hiding this comment

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

done,added the blacnk space as it was there earlier

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to remove this file from your changes you have to amend the earlier commit.

done
```

## Provisioning Request Phases:
Copy link
Contributor

Choose a reason for hiding this comment

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


## Provisioning Request Phases:

Enumeration value Description
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make it into a table?

Copy link
Author

Choose a reason for hiding this comment

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

done

if data.get('templateName')=='' or data.get('templateVersion')=='' or data.get('templateParameters')=='':
logging.info("One of the Parameter from templateName,templateVersion,templateParameters is null.. ")
return jsonify({"status":{"updateTime":"","message":f"O2IMS Deployment Failed,{e}","provisioningPhase":"FAILED"}}),500

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the additional whitespace?

Copy link
Author

Choose a reason for hiding this comment

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

done

from provisioning_request_validation_controller import *
from datetime import datetime
import logging
import kopf
Copy link
Contributor

Choose a reason for hiding this comment

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

@NMSVishal Now this is not an operator because it is not accepting any CRD it is just a flask server then we should remove kopf part

Copy link
Author

@NMSVishal NMSVishal Oct 6, 2025

Choose a reason for hiding this comment

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

hi @arora-sagar, we still need the kopf because flaks expose the REST API and then internally it creates the O2IMS CR so the exisiting kopf of O2IMS is needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, for the moment, this approach is fine, but I don't understand the benefit of maintaining the CR in the ETCD.If nobody will really use it. To remove the CR logic, we need to make some changes. We can do it later

Copy link
Author

Choose a reason for hiding this comment

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

If we want to remove the Kopf ,it will be compltely ,API micro-service and I will need more time for its implementation.
At initial I had represented my approach showcasing reutilizing KOPF codebase

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this be done now? If the plan is to move to a REST server, we should remove the controller logic. Also, as @arora-sagar mentioned, it is no longer a controller.

Copy link
Contributor

Choose a reason for hiding this comment

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

@efiacor Okay, it seems it requires a bit more work to remove controller logic. So we can move that to the next release for the moment, I am fine with accepting it like this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@@ -0,0 +1 @@
RUNNING_ENVIRONMENT=TEST # TEST for binary run, CLUSTER for k8s cluster based run No newline at end of file
Copy link
Author

Choose a reason for hiding this comment

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

Since .env file is not needed anymore ,I am removing it

@efiacor
Copy link
Collaborator

efiacor commented Oct 22, 2025

@arora-sagar @NMSVishal @gvbalaji
May not e directly related but could we get some more reviews on this PR - nephio-project/api#69

@NMSVishal
Copy link
Author

Resolved all conflicts

@NMSVishal NMSVishal closed this Nov 13, 2025
@NMSVishal NMSVishal reopened this Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants