camaraproject / EdgeCloud

Repository to describe, develop, document and test the EdgeCloud API family
Apache License 2.0
13 stars 44 forks source link

EAM: Suggest that POST appinstance targets a single EdgeCloudZone #256

Open gainsley opened 1 month ago

gainsley commented 1 month ago

Problem description Currently POST app instance targets multiple EdgeCloudZones, which creates some confusion as to what the correct behavior should be in some cases. The reason it is confusing is because we are effectively combining multiple API calls into one, where any single API call my behave differently from the other.

For example, suppose one of the EdgeCloudZones specified does not exist, but the other ones are ok. Does the API fail just one, or fail all? Is the return value 202 or 400?

Expected behavior We should design APIs to be as simple as possible and do just one thing. The caller can manage calling the API multiple times if needed. So I suggest the POST app instance API target only a single EdgeCloudZone.

Alternative solution Extensively document the expected behavior in various corner cases. Not really recommended.

Additional context