-
Notifications
You must be signed in to change notification settings - Fork 20
/
nlb.go
36 lines (30 loc) · 845 Bytes
/
nlb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package cmd
import (
"fmt"
"os"
"time"
"github.com/spf13/cobra"
)
var nlbCmd = &cobra.Command{
Use: "load-balancer",
Short: "Network Load Balancers management",
Aliases: []string{"nlb"},
}
var deprecatedNLBCmd = &cobra.Command{
Use: "nlb",
Short: "Network Load Balancers management",
PersistentPreRun: func(_ *cobra.Command, _ []string) {
fmt.Fprintln(os.Stderr,
`**********************************************************************
The "exo nlb" commands are deprecated and will be removed in a future
version, please use "exo compute load-balancer" replacement commands.
**********************************************************************`)
time.Sleep(3 * time.Second)
},
Hidden: true,
}
func init() {
computeCmd.AddCommand(nlbCmd)
// FIXME: remove this someday.
RootCmd.AddCommand(deprecatedNLBCmd)
}