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

feat: Support IPv6 parameters when creating / updating interconnection virtual circuits #717

Merged
merged 18 commits into from
Jul 10, 2024

Conversation

RaptorGandalf
Copy link
Contributor

This PR adds support for the newly available IPv6 parameters when creating / updating interconnection virtual circuits. To allow this feature to also be used with shared interconnections, some changes to the create logic of the interconnection virtual circuit resource were made.

With shared interconnections, the customer does not create virtual circuits, but rather they are created for them by the metal API. Attempting to create a virtual circuit on a shared connection will result in an error from the Metal API.

To get around this, an optional virtual_circuit_id parameter has been added to the virtual circuit resource. If this value is present, the terraform create function will issue an update call to the metal API for the existing specified virtual circuit, rather than trying to create a new one.

Additionally I have added support for the already existing IPv4 parameters in the update function which seemed to be missing.

@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 64.73988% with 61 lines in your changes missing coverage. Please review.

Project coverage is 53.71%. Comparing base (503d9e1) to head (07756d8).
Report is 86 commits behind head on main.

Files Patch % Lines
...ternal/resources/metal/virtual_circuit/resource.go 60.89% 50 Missing and 11 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #717       +/-   ##
===========================================
+ Coverage   37.91%   53.71%   +15.79%     
===========================================
  Files         120      151       +31     
  Lines       19476    20723     +1247     
===========================================
+ Hits         7384    11131     +3747     
+ Misses      11884     9138     -2746     
- Partials      208      454      +246     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@ctreatma ctreatma left a comment

Choose a reason for hiding this comment

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

The code changes look good; just needs at least one test to cover the IPv6 functionality.

@ctreatma ctreatma merged commit ba04c44 into main Jul 10, 2024
5 of 6 checks passed
@ctreatma ctreatma deleted the MAPI-24392-VC-IPv6-Params branch July 10, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants