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

feature(gateway): add VPNaaS support #306

Merged
merged 15 commits into from
Mar 14, 2024
Merged

feature(gateway): add VPNaaS support #306

merged 15 commits into from
Mar 14, 2024

Conversation

ka-myl
Copy link
Contributor

@ka-myl ka-myl commented Mar 7, 2024

This PR adds support for VPNaaS:

  • Add gateway plans
  • Add Connections field and allow to modify it
  • Add separate CRUD methods for gateway connections
  • Add separate CRUD methods for gateway tunnels

@ka-myl ka-myl requested a review from a team as a code owner March 7, 2024 13:43
Authentication GatewayIPSecAuthType `json:"authentication,omitempty"`
// PSK is a user-provided pre-shared key.
// Note that this field is only meant to be used when providing API with your pre-shared key; it will always be empty in API responses
PSK string `json:"psk,omitempty"`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatively I could remove PSK field from here and create a separate type for create/modify request that has both Authentication and PSK fields.
I went with this option because IMO we already have a lot of types around gateways and the less types we have, the easier it is to use SDK. But I don't have a strong opinion on this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we already use both approaches (different type in request package vs. shared type from upcloud package) elsewhere as well and this seems quite clean to me 👍


GatewayTunnelIPSecAuthTypePSK GatewayIPSecAuthType = "psk"

GatewayIPSecAlgorithm_aes128gcm16 GatewayIPSecAlgorithm = "aes128gcm16"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an underscore in those constants, as I believe it's easier to parse with eyes when the actual algorithm type is separated a bit more from the rest.

@ka-myl ka-myl changed the title WIP: Feature/vpnaas Feature/vpnaas Mar 8, 2024
@kangasta
Copy link
Contributor

kangasta commented Mar 8, 2024

Could edit the PR title to e.g. feat(gateway): add VPNaaS support so that the commit message of squashed commit will follow conventional commits. This can also be done when merging the PR.

@ka-myl ka-myl changed the title Feature/vpnaas feature(gateway): add VPNaaS support Mar 8, 2024
@ka-myl ka-myl merged commit ec1fe3b into main Mar 14, 2024
6 checks passed
@ka-myl ka-myl deleted the feature/vpnaas branch March 14, 2024 09:30
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.

3 participants