-
Notifications
You must be signed in to change notification settings - Fork 47
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: Adding fabric_network_schema_resource #553
Conversation
EVPLAN, EPLAN, IPWAN
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #553 +/- ##
===========================================
- Coverage 57.27% 39.53% -17.75%
===========================================
Files 100 98 -2
Lines 18963 18692 -271
===========================================
- Hits 10861 7389 -3472
- Misses 7776 11258 +3482
+ Partials 326 45 -281 ☔ View full report in Codecov by Sentry. |
EVPLAN, EPLAN, IPWAN
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.
Changes requested.
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.
Still have some changes requested. I added exactly what the changes I'm looking for are so you can just replace them.
equinix/resource_fabric_network.go
Outdated
fabricNetwork, _, err := client.NetworksApi.GetNetworkByUuid(ctx, d.Id()) | ||
if err != nil { | ||
diag.Errorf("[WARN] Fabric Network %s not found , error %s", d.Id(), equinix_errors.FormatFabricError(err)) | ||
return diag.FromErr(err) |
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.
We still have this update that needs to be made. I'm looking for line 211 to be removed; and for line 212 to be return diag.FromErr(equinix_errors.FormatFabricError(err))
equinix/resource_fabric_network.go
Outdated
updates := []v4.NetworkChangeOperation{update} | ||
_, res, err := client.NetworksApi.UpdateNetworkByUuid(ctx, updates, d.Id()) | ||
if err != nil { | ||
return diag.Errorf("error response for the Fabric Network update, response %v, error %v", res, equinix_errors.FormatFabricError(err)) |
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.
This line should just be return diag.FromErr(equinix_errors.FormatFabricError(err))
equinix/resource_fabric_network.go
Outdated
} | ||
update, err := getFabricNetworkUpdateRequest(dbConn, d) | ||
if err != nil { | ||
return diag.FromErr(err) |
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.
This line should be return diag.Errorf("error retrieving intended updates from network config: %v", err)
equinix/resource_fabric_network.go
Outdated
return diags | ||
} | ||
} | ||
return diag.Errorf("error response for the Fabric Network delete. Error %v and response %v", equinix_errors.FormatFabricError(err), resp) |
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.
This line should just be return diag.FromErr(equinix_errors.FormatFabricError(err))
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.
LGTM. Ready for review from DevRel.
Includes:
fabric_network_data_source
fabric_network_resource
fabric_network_data_source_acc_test
fabric_network_resource_acc_test