forked from VisualizeNetworks/look
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlook-juniper.php
40 lines (35 loc) · 1.38 KB
/
look-juniper.php
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
<?php
class JuniperDevice extends BaseDevice {
function setup_cmds() {
foreach($GLOBALS["all_cmds"] as $key => $cmd) {
switch($cmd->display) {
case "ping":
$this->device_cmds[$key] = $cmd->display;
$cmd->set_command("ping %arg% count 5");
$cmd->allow_ip_argument();
$cmd->allow_device_argument();
break;
case "traceroute":
$this->device_cmds[$key] = $cmd->display;
$cmd->set_command("traceroute %arg% wait 10");
$cmd->allow_ip_argument();
$cmd->allow_device_argument();
break;
case "show route":
$this->device_cmds[$key] = $cmd->display;
$cmd->set_command("show route %arg%");
$cmd->allow_ip_argument();
$cmd->allow_device_argument();
break;
case "show bgp route":
$this->device_cmds[$key] = $cmd->display;
$cmd->set_command("show route protocol bgp %arg%");
$cmd->allow_ip_argument();
$cmd->allow_subnet_argument("bits");
$cmd->allow_device_argument();
break;
}
}
}
}
?>