-
Notifications
You must be signed in to change notification settings - Fork 48
/
os.go
53 lines (39 loc) · 1.19 KB
/
os.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// gRPC Runtime of CB-Spider.
// The CB-Spider is a sub-Framework of the Cloud-Barista Multi-Cloud Project.
// The CB-Spider Mission is to connect all the clouds with a single interface.
//
// * Cloud-Barista: https://github.com/cloud-barista
//
// by CB-Spider Team, 2020.09.
package cmd
import (
"github.com/spf13/cobra"
)
// ===== [ Constants and Variables ] =====
// ===== [ Types ] =====
// ===== [ Implementations ] =====
// ===== [ Private Functions ] =====
// ===== [ Public Functions ] =====
// NewOsCmd - Cloud OS 관리 기능을 수행하는 Cobra Command 생성
func NewOsCmd() *cobra.Command {
osCmd := &cobra.Command{
Use: "os",
Short: "This is a manageable command for cloud os",
Long: "This is a manageable command for cloud os",
}
// Adds the commands for application.
osCmd.AddCommand(NewOsListCmd())
return osCmd
}
// NewOsListCmd - Cloud OS 목록 기능을 수행하는 Cobra Command 생성
func NewOsListCmd() *cobra.Command {
listCmd := &cobra.Command{
Use: "list",
Short: "This is list command for cloud os",
Long: "This is list command for cloud os",
Run: func(cmd *cobra.Command, args []string) {
SetupAndRun(cmd, args)
},
}
return listCmd
}