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: add a resource for VRF BGP dynamic neighbors #746

Closed
wants to merge 4 commits into from

Conversation

ctreatma
Copy link
Contributor

@ctreatma ctreatma commented Aug 1, 2024

Relates to #697.

This adds a resource for managing VRF BGP dynamic neighbor ranges with accompanying docs. Data sources are left for future contribution.

Fixes #652.

@ctreatma ctreatma force-pushed the vrf_bgp_dynamic_range branch from 6fe89e8 to 0832b40 Compare August 1, 2024 14:43
@ctreatma ctreatma force-pushed the vrf_bgp_dynamic_range branch from 0832b40 to f26180a Compare August 1, 2024 18:17
Comment on lines +15 to +17
Description: "This resource manages BGP dynamic neighbor ranges for an Equinix Metal VRF",
MarkdownDescription: "This resource manages BGP dynamic neighbor ranges for an Equinix Metal VRF, but with markdown",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need better descriptions here, and we do not need MarkdownDescription if we aren't going to include markdown; Description feeds into the docs if MarkdownDescription isn't specified.

@ctreatma ctreatma force-pushed the vrf_bgp_dynamic_range branch from f26180a to e22a366 Compare August 1, 2024 18:40
@ctreatma ctreatma changed the title feat: add support for VRF BGP dynamic neighbors feat: add a resource for VRF BGP dynamic neighbors Aug 1, 2024
@ctreatma ctreatma force-pushed the vrf_bgp_dynamic_range branch from e22a366 to 817a120 Compare August 1, 2024 19:24
// TODO: should we do something with the neighbor object returned here?
// For example: do we need to poll the API until neighbor.GetState() has
// as particular value?
_, _, err := client.VRFsApi.DeleteBgpDynamicNeighborById(ctx, data.ID.ValueString()).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like the status can be deleting but not deleted, which probably means we need a wait function here to poll the BgpDynamicNeighborsIdGet endpoint until it 404s.

return
}

neighbor, _, err := client.VRFsApi.BgpDynamicNeighborsIdGet(ctx, data.ID.ValueString()).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we need to wait for a particular status here? If so, do we wait for active or ready? I'm assuming pending is the initial state but I don't see a description in the spec.

@ctreatma ctreatma force-pushed the vrf_bgp_dynamic_range branch 5 times, most recently from b6bd796 to d98ebfd Compare August 2, 2024 19:27
@ctreatma ctreatma force-pushed the vrf_bgp_dynamic_range branch from d98ebfd to e5a3cb3 Compare August 21, 2024 14:20
@ctreatma ctreatma marked this pull request as ready for review August 21, 2024 14:20
@ctreatma ctreatma requested review from a team as code owners August 21, 2024 14:20
@ctreatma ctreatma force-pushed the vrf_bgp_dynamic_range branch from e5a3cb3 to bef5e56 Compare August 21, 2024 14:32

# equinix_metal_vrf_bgp_dynamic_neighbor (Resource)

This resource manages BGP dynamic neighbor ranges for an Equinix Metal VRF, but with markdown
Copy link
Contributor

Choose a reason for hiding this comment

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

"but with markdown"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Related to this comment thread

@ctreatma ctreatma marked this pull request as draft August 21, 2024 16:57
@codecov-commenter
Copy link

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

Codecov Report

Attention: Patch coverage is 68.75000% with 55 lines in your changes missing coverage. Please review.

Project coverage is 52.25%. Comparing base (359dcbb) to head (bef5e56).
Report is 4 commits behind head on main.

Files Patch % Lines
...sources/metal/vrf_bgp_dynamic_neighbor/resource.go 52.72% 42 Missing and 10 partials ⚠️
.../resources/metal/vrf_bgp_dynamic_neighbor/model.go 80.00% 2 Missing and 1 partial ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #746      +/-   ##
==========================================
- Coverage   52.38%   52.25%   -0.14%     
==========================================
  Files         154      154              
  Lines       21080    21033      -47     
==========================================
- Hits        11043    10991      -52     
+ Misses       9607     9602       -5     
- Partials      430      440      +10     

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

@ctreatma ctreatma force-pushed the vrf_bgp_dynamic_range branch from bef5e56 to 85e3d38 Compare August 23, 2024 14:50
@ctreatma ctreatma closed this Nov 12, 2024
@ctreatma ctreatma deleted the vrf_bgp_dynamic_range branch November 12, 2024 19:34
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.

[Bug]: Changing metro for equinix_metal_vrf should recreate resource
3 participants