NFV-22745: introduce new file resource and add cloudInitFileId in device resource to support Aviatrix vendor #294
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Dec release, we onboarded Aviatrix as our new vendor. It requires the customer to upload cloud init file and do some basic file processing from the file. Hence, new file upload API is introduced to handle such file processing and this new file type. Also, in the device creation flow, new field cloudInitFileId is introduced for the given file. Noted that this new file API can also handle other file type. The processType field is used to identify different file types. More details can be found in the public API documentation.
This PR introduces new file resource as discussed in #287. It allows customer to upload such cloud init file through file resource and apply that file uuid to the device resource's cloud_init_file_id field in terraform script. For example:
License_file_id has also been updated to support similar use cases.
README file has been updated accordingly to reflect the changes. Two new device type (C8KV router and Aviatrix) scripts have been provided as well for reference.
Besides, since we no longer support Equinix managed device any more and encourage customers to use BYOL license mode, the default value for self-managed and byol field in the file resource has been set to be both true.
reference: NE API Documentation