Dav-11 commented on PR #9977:
URL: https://github.com/apache/cloudstack/pull/9977#issuecomment-2704077687

   Hello,
   Sorry for the delay since the last message.
   
   Would it be possible to keep a generic object field (`config`) to allow for 
vpn protocol-specific fields ?
   
   ES:
   
   # createRemoteAccessVpn
   ### Request
   
   | Parameter        | Type   | Required | Description                         
                            |
   
|------------------|--------|----------|-----------------------------------------------------------------|
   | `publicipid`     | UUID   | Yes      | The public IP address ID for the 
VPN                            |
   | `account`        | String | No       | The account associated with the VPN 
(only for admins)           |
   | `domainid`       | UUID   | No       | The domain ID associated with the 
VPN (only for admins)         |
   | `fordisplay`     | Bool   | No       | Whether to display the VPN to the 
end user                      |
   | `openfirewall`   | Bool   | No       | Whether to automatically create a 
firewall rule (default: true) |
   | `projectid`      | UUID   | No       | The project ID associated with the 
VPN                          |
   | `vpcid`          | UUID   | No       | The VPC ID associated with the VPN  
                            |
   
   #### New params (common)
   | Parameter    | Type      | Required | Default                        | 
Description                             |
   |--------------|-----------|----------|--------------------------------| 
--------------------------------------- |
   | `listenport` | Int       | No       | decided by the chosen protocol | 
Listening port for VPN Server           |
   | `vpnsubnet`  | String    | No       | `10.8.0.0/24`                  | 
Subnet used by the vpn to allocate host |
   | `protocol`   | String    | No       | `L2TP`                         | VPN 
protocol to use (`L2TP`, `WireGuard`, `OpenVPN`), defaults to current behavior 
if not provided |
   | `config`     | Object    | Yes if protocol != L2TP | NULL | params 
specific for the vpn protocol |
   
   
   #### config object for wireguard
   | Parameter         | Type   | Required | Description |
   |------------------|--------|----------|-------------|
   | `wgPublicKey`    | String | No (WG) | Public key for WireGuard server |
   | `wgPrivateKey`    | String | No (WG) | Private key for WireGuard server |
   
   This would make the APIs more modular and potentially allow for easier vpn 
integrations in the future.
   
   I am sorry if this solution was already used in other APIs I tried to look 
around I cannot find anything like this, so I am asking.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to