Skip to content
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

Initial tenant when tenant does not exist #337

Closed
djs0109 opened this issue Oct 23, 2024 · 2 comments · Fixed by #344
Closed

Initial tenant when tenant does not exist #337

djs0109 opened this issue Oct 23, 2024 · 2 comments · Fixed by #344
Assignees
Labels
enhancement New feature or request NGSI-LD

Comments

@djs0109
Copy link
Contributor

djs0109 commented Oct 23, 2024

We need to create a walkaround for LD CB when the tenant is empty. Otherwise, all GET functions will receive an error.

Solution

We add a check while instantiating the cb client. If the tenant does not exist, we can create a dummy entity and then delete it.

@djs0109 djs0109 added enhancement New feature or request NGSI-LD labels Oct 23, 2024
@RWTH-EBC RWTH-EBC deleted a comment from github-actions bot Oct 24, 2024
@SystemsPurge
Copy link
Collaborator

@djs0109 Ok that seems convenient. Despite the fact that , creating a "dummy" entity that happens to already exist is very unlikely, is there actually no other way of creating a tenant ?

@djs0109
Copy link
Contributor Author

djs0109 commented Oct 29, 2024

@SystemsPurge If the "dummy" entity already exists, the tenant must also exist, so the walkaround should not be triggered. Maybe the cleanest way is to create a reusable error-handling function for capturing the "tenant not found" error. But imop it will cost large effort while bringing little benefit.

@SystemsPurge SystemsPurge linked a pull request Oct 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request NGSI-LD
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants