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 970c25d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/gateway/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

func (c *Client) Create() *cobra.Command {
var projectID, vnID, reservationID string
var netSize int32
var netSize int

// createMetalGatewayCmd represents the createMetalGateway command
createMetalGatewayCmd := &cobra.Command{
Expand Down 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().IntVarP(&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 970c25d

Please sign in to comment.