Skip to content

Commit

Permalink
private subnet size as int instead of int32
Browse files Browse the repository at this point in the history
Signed-off-by: Ayush Rangwala <ayush.rangwala@gmail.com>
  • Loading branch information
aayushrangwala committed Nov 21, 2023
1 parent 937c467 commit ab368df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/metal_gateway_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ metal gateway create -p <project_UUID> --virtual-network <virtual_network_UUID>
```
-h, --help help for create
-r, --ip-reservation-id string UUID of the Public or VRF IP Reservation to assign.
-s, --private-subnet-size int32 Size of the private subnet to request (8 for /29)
-s, --private-subnet-size int Size of the private subnet to request (8 for /29)
-p, --project-id string The project's UUID. This flag is required, unless specified in the config created by metal init or set as METAL_PROJECT_ID environment variable.
-v, --virtual-network string UUID of the Virtual Network to assign.
```
Expand Down
4 changes: 2 additions & 2 deletions internal/gateway/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (c *Client) Create() *cobra.Command {
if reservationID != "" {
req.MetalGatewayCreateInput.SetIpReservationId(reservationID)
} else {
req.MetalGatewayCreateInput.SetPrivateIpv4SubnetSize(netSize)
req.MetalGatewayCreateInput.SetPrivateIpv4SubnetSize(int32(netSize))
}

n, _, err := c.Service.
Expand Down Expand Up @@ -95,7 +95,7 @@ func (c *Client) Create() *cobra.Command {
createMetalGatewayCmd.Flags().StringVarP(&projectID, "project-id", "p", "", "The project's UUID. This flag is required, unless specified in the config created by metal init or set as METAL_PROJECT_ID environment variable.")
createMetalGatewayCmd.Flags().StringVarP(&reservationID, "ip-reservation-id", "r", "", "UUID of the Public or VRF IP Reservation to assign.")
createMetalGatewayCmd.Flags().StringVarP(&vnID, "virtual-network", "v", "", "UUID of the Virtual Network to assign.")
createMetalGatewayCmd.Flags().Int32VarP(&netSize, "private-subnet-size", "s", 0, "Size of the private subnet to request (8 for /29)")
createMetalGatewayCmd.Flags().Int32VarP(&netSize, "private-subnet-size", "s", 0, "Integer size of the private subnet to request (ex: 8 for Integer s29)")

_ = createMetalGatewayCmd.MarkFlagRequired("project-id")
_ = createMetalGatewayCmd.MarkFlagRequired("virtual-network")
Expand Down

0 comments on commit ab368df

Please sign in to comment.