forked from CheckPointSW/cp-mgmt-api-go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
31 lines (28 loc) · 719 Bytes
/
main.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
package main
import (
"fmt"
"github.com/CheckPointSW/cp-mgmt-api-go-sdk/Examples"
"os"
)
func main() {
if len(os.Args) < 2 {
fmt.Println("cp-mgmt-api-go-sdk main: Operation not found. Optional operations are rule/discard/add_host/show_hosts/dup_ip/auto_publish")
os.Exit(0)
}
switch os.Args[1] {
case "discard":
Examples.DiscardSessions()
case "rule":
Examples.AddAccessRule()
case "add_host":
Examples.AddHost()
case "show_hosts":
Examples.ShowHosts()
case "dup_ip":
Examples.DupIp()
case "auto_publish":
Examples.AutoPublish()
default:
fmt.Println("cp-mgmt-api-go-sdk main: Operation not supported. Optional operations are rule/discard/add_host/show_hosts/dup_ip/auto_publish")
}
}