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

Add "many" version of API calls for UpdateMagicTransitGRETunnels, CreateMagicTransitStaticRoutes & UpdateMagicTransitStaticRoutes #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ivan-section-io
Copy link
Collaborator

@ivan-section-io ivan-section-io commented Nov 29, 2022

Description

During work automating Magic Transit GRE Tunnel & Magic Transit Static Route setup, I discovered missing go wrappers that accepted multiple items.

The "many" versions I found absent were:
UpdateMagicTransitGRETunnels https://api.cloudflare.com/#magic-gre-tunnels-update-multiple-gre-tunnels
CreateMagicTransitStaticRoutes https://api.cloudflare.com/#magic-static-routes-create-routes
UpdateMagicTransitStaticRoutes https://api.cloudflare.com/#magic-static-routes-update-many-routes
DeleteMagicTransitStaticRoutes https://api.cloudflare.com/#magic-static-routes-delete-many-routes

Without these, iterating over larger sets with the single item calls is painfully slow.

Has your change been tested?

Automated tests mimicking other multi-item versions have been added.
These added calls are currently being used in our internal setup tool.

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented (api.cloudflare.com or developers.cloudflare.com) and stable APIs.

UpdateMagicTransitGRETunnels
CreateMagicTransitStaticRoutes
UpdateMagicTransitStaticRoutes
DeleteMagicTransitStaticRoutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant