@@ -10,7 +10,6 @@ import (
1010 "github.com/spf13/cobra"
1111 "github.com/stackitcloud/stackit-cli/internal/cmd/params"
1212 "github.com/stackitcloud/stackit-cli/internal/pkg/args"
13- "github.com/stackitcloud/stackit-cli/internal/pkg/errors"
1413 "github.com/stackitcloud/stackit-cli/internal/pkg/examples"
1514 "github.com/stackitcloud/stackit-cli/internal/pkg/globalflags"
1615 "github.com/stackitcloud/stackit-cli/internal/pkg/print"
@@ -25,17 +24,17 @@ type inputModel struct {
2524func NewCmd (params * params.CmdParams ) * cobra.Command {
2625 cmd := & cobra.Command {
2726 Use : "list" ,
28- Short : "Lists all STACKIT cloud public IP ranges. " ,
29- Long : "Lists all STACKIT cloud public IP ranges." ,
27+ Short : "Lists all STACKIT public-ip ranges" ,
28+ Long : "Lists all STACKIT public-ip ranges." ,
3029 Args : args .NoArgs ,
3130 Example : examples .Build (
3231 examples .NewExample (
33- `Lists all STACKIT cloud public IP ranges` ,
32+ `Lists all STACKIT public-ip ranges` ,
3433 "$ stackit public-ip ranges list" ,
3534 ),
3635 examples .NewExample (
37- `Lists all STACKIT cloud public IP ranges, piping to a tool like fzf for interactive selection` ,
38- "$ stackit public-ip ip- ranges list -o pretty | fzf" ,
36+ `Lists all STACKIT public-ip ranges, piping to a tool like fzf for interactive selection` ,
37+ "$ stackit public-ip ranges list -o pretty | fzf" ,
3938 ),
4039 ),
4140 RunE : func (cmd * cobra.Command , _ []string ) error {
@@ -72,9 +71,6 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
7271
7372func parseInput (p * print.Printer , cmd * cobra.Command ) (* inputModel , error ) {
7473 globalFlags := globalflags .Parse (p , cmd )
75- if globalFlags .ProjectId == "" {
76- return nil , & errors.ProjectIdError {}
77- }
7874
7975 model := inputModel {GlobalFlagModel : globalFlags }
8076
@@ -111,7 +107,7 @@ func outputResult(p *print.Printer, outputFormat string, networkListResponse iaa
111107 default :
112108 var publicIps []string
113109 for _ , item := range * networkListResponse .Items {
114- if item .Cidr != nil || * item .Cidr != "" {
110+ if item .Cidr != nil && * item .Cidr != "" {
115111 publicIps = append (publicIps , * item .Cidr )
116112 }
117113 }
0 commit comments