forked from samhug/ndm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.device_classes.hcl
More file actions
97 lines (92 loc) · 2.58 KB
/
config.device_classes.hcl
File metadata and controls
97 lines (92 loc) · 2.58 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
device_class "cisco_isr" {
backup_target "startup_config" {
macro = <<-MACRO
expect("#")
sendLine("copy startup-config tftp://" + ctx.TFTPHost + "/" + ctx.TFTPFilename)
expect("["+ctx.TFTPHost+"]?")
sendLine("")
expect("["+ctx.TFTPFilename+"]?")
sendLine("")
expect("#")
MACRO
}
backup_target "running_config" {
macro = <<-MACRO
expect("#")
sendLine("copy running-config tftp://" + ctx.TFTPHost + "/" + ctx.TFTPFilename)
expect("["+ctx.TFTPHost+"]?")
sendLine("")
expect("["+ctx.TFTPFilename+"]?")
sendLine("")
expect("#")
MACRO
}
}
device_class "hp_switch" {
backup_target "startup_config" {
macro = <<-MACRO
expect(">")
sendLine("backup startup-configuration to " + ctx.TFTPHost + " " + ctx.TFTPFilename + ".cfg")
expect(">")
MACRO
}
}
device_class "adtran" {
backup_target "startup_config" {
macro = <<-MACRO
expect(">")
sendLine("enable")
expect("Password:")
sendLine(getAuthAttr("enable_password"))
expect("#")
sendLine("copy startup-config tftp")
expect("?")
sendLine(ctx.TFTPHost)
expect("?")
sendLine(ctx.TFTPFilename)
expect("#")
MACRO
}
backup_target "running_config" {
macro = <<-MACRO
expect(">")
sendLine("enable")
expect("Password:")
sendLine(getAuthAttr("enable_password"))
expect("#")
sendLine("copy running-config tftp")
expect("?")
sendLine(ctx.TFTPHost)
expect("?")
sendLine(ctx.TFTPFilename)
expect("#")
MACRO
}
}
device_class "watchguard" {
backup_target "config" {
macro = <<-MACRO
expect("#")
sendLine("export config to tftp://"+ctx.TFTPHost+"/"+ctx.TFTPFilename)
expect("#")
MACRO
}
}
device_class "aruba" {
backup_target "config" {
macro = <<-MACRO
expect("# ")
sendLine("copy config tftp " + ctx.TFTPHost + " " + ctx.TFTPFilename)
expect("# ")
MACRO
}
}
device_class "ubiquiti" {
backup_target "running_config" {
macro = <<-MACRO
expect("$ ")
sendLine("copy file running://config/ to tftp://"+ctx.TFTPHost+"/"+ctx.TFTPFilename)
expect("$ ")
MACRO
}
}