Skip to content

Commit

Permalink
fix: merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
avirtopeanu-ionos committed Jan 9, 2025
1 parent 43f085b commit ec78470
Show file tree
Hide file tree
Showing 42 changed files with 78 additions and 531 deletions.
2 changes: 1 addition & 1 deletion commands/cloudapi-v6/completer/ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func DatacenterIdsFilterLocation(loc string) []string {
return dcIds
}

func DataCentersIds() []string {
func DataCentersIds(filters ...func(datacenter ionoscloud.Datacenter) bool) []string {
datacenterSvc := resources.NewDataCenterService(client.Must(), context.Background())
datacenters, _, err := datacenterSvc.List(resources.ListQueryParams{})
if err != nil {
Expand Down
11 changes: 0 additions & 11 deletions commands/vpn/ipsec/completer/completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ import (
"context"

"github.com/ionos-cloud/ionosctl/v6/internal/client"
"github.com/ionos-cloud/ionosctl/v6/internal/config"
"github.com/ionos-cloud/ionosctl/v6/internal/constants"
"github.com/ionos-cloud/ionosctl/v6/pkg/functional"
vpn "github.com/ionos-cloud/sdk-go-vpn"
"github.com/spf13/viper"
)

// -- GATEWAYS
Expand All @@ -24,10 +21,6 @@ func GatewaysProperty[V any](f func(gateway vpn.IPSecGatewayRead) V, fs ...Gatew

// Gateways returns all distributions matching the given filters
func Gateways(fs ...GatewayFilter) (vpn.IPSecGatewayReadList, error) {
if url := config.GetServerUrl(); url == constants.DefaultApiURL || url == "" {
viper.Set(constants.ArgServerUrl, constants.DefaultVPNApiURL)
}

req := client.Must().VPNClient.IPSecGatewaysApi.IpsecgatewaysGet(context.Background())
for _, f := range fs {
var err error
Expand Down Expand Up @@ -57,10 +50,6 @@ func TunnelsProperty[V any](gatewayID string, f func(tunnel vpn.IPSecTunnelRead)

// Tunnels returns all distributions matching the given filters
func Tunnels(gatewayID string, fs ...TunnelFilter) (vpn.IPSecTunnelReadList, error) {
if url := config.GetServerUrl(); url == constants.DefaultApiURL || url == "" {
viper.Set(constants.ArgServerUrl, constants.DefaultVPNApiURL)
}

req := client.Must().VPNClient.IPSecTunnelsApi.IpsecgatewaysTunnelsGet(context.Background(), gatewayID)
for _, f := range fs {
var err error
Expand Down
2 changes: 1 addition & 1 deletion commands/vpn/ipsec/tunnel/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func Delete() *core.Command {
},
})

cmd.AddStringFlag(constants.FlagGatewayID, constants.FlagIdShort, "", "The ID of the IPSec Gateway",
cmd.AddStringFlag(constants.FlagGatewayID, "", "", "The ID of the IPSec Gateway",
core.RequiredFlagOption(),
core.WithCompletion(completer.GatewayIDs, constants.VPNApiRegionalURL),
)
Expand Down
2 changes: 1 addition & 1 deletion commands/vpn/ipsec/tunnel/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func Get() *core.Command {
InitClient: true,
})

cmd.AddStringFlag(constants.FlagGatewayID, constants.FlagIdShort, "", "The ID of the IPSec Gateway",
cmd.AddStringFlag(constants.FlagGatewayID, "", "", "The ID of the IPSec Gateway",
core.RequiredFlagOption(),
core.WithCompletion(completer.GatewayIDs, constants.VPNApiRegionalURL),
)
Expand Down
2 changes: 1 addition & 1 deletion commands/vpn/ipsec/tunnel/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func Update() *core.Command {
},
})

cmd.AddStringFlag(constants.FlagGatewayID, constants.FlagIdShort, "", "The ID of the IPSec Gateway",
cmd.AddStringFlag(constants.FlagGatewayID, "", "", "The ID of the IPSec Gateway",
core.RequiredFlagOption(),
core.WithCompletion(completer.GatewayIDs, constants.VPNApiRegionalURL),
)
Expand Down
11 changes: 0 additions & 11 deletions commands/vpn/wireguard/completer/completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ import (
"context"

"github.com/ionos-cloud/ionosctl/v6/internal/client"
"github.com/ionos-cloud/ionosctl/v6/internal/config"
"github.com/ionos-cloud/ionosctl/v6/internal/constants"
"github.com/ionos-cloud/ionosctl/v6/pkg/functional"
vpn "github.com/ionos-cloud/sdk-go-vpn"
"github.com/spf13/viper"
)

// -- GATEWAYS
Expand All @@ -24,10 +21,6 @@ func GatewaysProperty[V any](f func(gateway vpn.WireguardGatewayRead) V, fs ...G

// Gateways returns all distributions matching the given filters
func Gateways(fs ...GatewayFilter) (vpn.WireguardGatewayReadList, error) {
if url := config.GetServerUrl(); url == constants.DefaultApiURL || url == "" {
viper.Set(constants.ArgServerUrl, constants.DefaultVPNApiURL)
}

req := client.Must().VPNClient.WireguardGatewaysApi.WireguardgatewaysGet(context.Background())
for _, f := range fs {
var err error
Expand Down Expand Up @@ -59,10 +52,6 @@ func PeersProperty[V any](gatewayID string, f func(peer vpn.WireguardPeerRead) V

// Peers returns all distributions matching the given filters
func Peers(gatewayID string, fs ...PeerFilter) (vpn.WireguardPeerReadList, error) {
if url := config.GetServerUrl(); url == constants.DefaultApiURL || url == "" {
viper.Set(constants.ArgServerUrl, constants.DefaultVPNApiURL)
}

req := client.Must().VPNClient.WireguardPeersApi.WireguardgatewaysPeersGet(context.Background(), gatewayID)
for _, f := range fs {
var err error
Expand Down
2 changes: 1 addition & 1 deletion commands/vpn/wireguard/peer/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func Delete() *core.Command {
},
})

cmd.AddStringFlag(constants.FlagGatewayID, constants.FlagIdShort, "", "The ID of the WireGuard Gateway",
cmd.AddStringFlag(constants.FlagGatewayID, "", "", "The ID of the WireGuard Gateway",
core.RequiredFlagOption(),
core.WithCompletion(completer.GatewayIDs, constants.VPNApiRegionalURL),
)
Expand Down
2 changes: 1 addition & 1 deletion commands/vpn/wireguard/peer/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func Get() *core.Command {
InitClient: true,
})

cmd.AddStringFlag(constants.FlagGatewayID, constants.FlagIdShort, "", "The ID of the WireGuard Gateway",
cmd.AddStringFlag(constants.FlagGatewayID, "", "", "The ID of the WireGuard Gateway",
core.RequiredFlagOption(),
core.WithCompletion(completer.GatewayIDs, constants.VPNApiRegionalURL),
)
Expand Down
2 changes: 1 addition & 1 deletion commands/vpn/wireguard/peer/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func Update() *core.Command {
},
})

cmd.AddStringFlag(constants.FlagGatewayID, constants.FlagIdShort, "", "The ID of the WireGuard Gateway",
cmd.AddStringFlag(constants.FlagGatewayID, "", "", "The ID of the WireGuard Gateway",
core.RequiredFlagOption(),
core.WithCompletion(completer.GatewayIDs, constants.VPNApiRegionalURL),
)
Expand Down
58 changes: 0 additions & 58 deletions docs/subcommands/Kafka/cluster/create.md

This file was deleted.

54 changes: 0 additions & 54 deletions docs/subcommands/Kafka/cluster/delete.md

This file was deleted.

53 changes: 0 additions & 53 deletions docs/subcommands/Kafka/cluster/get.md

This file was deleted.

54 changes: 0 additions & 54 deletions docs/subcommands/Kafka/cluster/list.md

This file was deleted.

Loading

0 comments on commit ec78470

Please sign in to comment.