-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add support to the Runtime Defined Entities (RDE) framework with RDEs (3/3) #544
Conversation
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
f374674
to
fc07e45
Compare
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I have one ask that is inline, but can also mention here for the Client.OpenApiX
functions.
IMO they could all return all headers instead of querying one specific. The reason is that these are our core client functions and people (or we) might find the need to fetch multiple headers in future and that would require multiple API calls instead of one
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Signed-off-by: abarreiro <[email protected]>
Overview
This PR implements the foundations to onboard the RDE framework to the Terraform VCD Provider, by adding CRUD capabilities of RDE instances.
Detailed description
This PR adds the following features:
RDE types
DefinedEntityType
type:GetAllRdes
to get all RDE instances from the given type, supports parameters like filtering.GetRdeByName
to get a unique RDE with given name. To make it unique it uses also the vendor+namespace+version from the given type, as one can have same name with this 3-tuple different combinations.GetRdeById
gets a unique RDE with given URN.CreateRde
to create a RDE instance. Creation is tricky, as it just returns a Task that remains at 1% progress in VCD. It will remain like that until it is "resolved" (see below method). So this method creates the RDE in an async way and recovers its refreshed state with an immediate get to return it.RDE instances
DefinedEntity
type:Resolve
to resolve the entity. On creation, the RDE instance is just a Task that remains at 1% in VCD. It needs this method to be called to check the entity against the schema of the RDE type. If it's OK, the task is completed and RDE instance state is RESOLVED. Otherwise, it gets RESOLUTION_ERROR.Update
to update the entity. It is a bit smart to avoid errors if Name is not populated for update (ie: User doesn't want to update it, but it's mandatory). One use case for Update is to fix the JSON entity if we get a RESOLUTION_ERROR.Delete
to delete the entity. The entity needs to be resolved first.Client
OpenApiGetItemAndHeaders
andOpenApiPostItemAndGetHeaders
to retrieve all the response headers when performing a call to an OpenAPI endpoint.