1
1
package namespaces
2
2
3
3
import (
4
+ "os"
5
+
4
6
"github.com/scaleway/scaleway-cli/v2/internal/core"
5
7
accountv3 "github.com/scaleway/scaleway-cli/v2/internal/namespaces/account/v3"
6
8
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/alias"
@@ -27,6 +29,7 @@ import (
27
29
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/lb/v1"
28
30
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/marketplace/v2"
29
31
mnq "github.com/scaleway/scaleway-cli/v2/internal/namespaces/mnq/v1alpha1"
32
+ mnqBeta "github.com/scaleway/scaleway-cli/v2/internal/namespaces/mnq/v1beta1"
30
33
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/object/v1"
31
34
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/rdb/v1"
32
35
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/redis/v1"
@@ -38,10 +41,11 @@ import (
38
41
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpc/v2"
39
42
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/vpcgw/v1"
40
43
webhosting "github.com/scaleway/scaleway-cli/v2/internal/namespaces/webhosting/v1alpha1"
44
+ "github.com/scaleway/scaleway-sdk-go/scw"
41
45
)
42
46
43
47
// Enable beta in the code when products are in beta
44
- // var beta = os.Getenv(scw.ScwEnableBeta) == "true"
48
+ var beta = os .Getenv (scw .ScwEnableBeta ) == "true"
45
49
46
50
// GetCommands returns a list of all commands in the CLI.
47
51
// It is used by both scw and scw-qa.
@@ -80,16 +84,18 @@ func GetCommands() *core.Commands {
80
84
secret .GetCommands (),
81
85
shell .GetCommands (),
82
86
tem .GetCommands (),
83
- mnq .GetCommands (),
84
87
alias .GetCommands (),
85
88
webhosting .GetCommands (),
86
89
billing .GetCommands (),
87
90
ipfs .GetCommands (),
88
91
documentdb .GetCommands (),
89
92
)
90
93
91
- //if beta {
92
- //}
94
+ if beta {
95
+ commands .Merge (mnqBeta .GetCommands ())
96
+ } else {
97
+ commands .Merge (mnq .GetCommands ())
98
+ }
93
99
94
100
return commands
95
101
}
0 commit comments