summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Mazoyer <respawneral@gmail.com>2014-06-13 16:02:25 +0200
committerGuillaume Mazoyer <respawneral@gmail.com>2014-06-13 16:02:25 +0200
commitda73db1bf43b8950d33bd47b39b595f7f6e8756d (patch)
treeb14cef35a3fe832f1a463714024698a8891c1f61
parentb3845087ec0debd31d1860a24e5abe6ba0567c5f (diff)
No more 'no-more' for Juniper.
-rw-r--r--routers/juniper.php12
-rw-r--r--routers/router.php1
2 files changed, 7 insertions, 6 deletions
diff --git a/routers/juniper.php b/routers/juniper.php
index 14f431e..ff42e41 100644
--- a/routers/juniper.php
+++ b/routers/juniper.php
@@ -30,10 +30,10 @@ final class Juniper extends Router {
case 'bgp':
if (match_ipv4($parameters)) {
$commands[] = 'show route '.$parameters.
- ' protocol bgp table inet.0 active-path | no-more';
+ ' protocol bgp table inet.0 active-path';
} else if (match_ipv6($parameters)) {
$commands[] = 'show route '.$parameters.
- ' protocol bgp table inet6.0 active-path | no-more';
+ ' protocol bgp table inet6.0 active-path';
} else {
throw new Exception('The parameter is not an IPv4/IPv6 address.');
}
@@ -42,9 +42,9 @@ final class Juniper extends Router {
case 'as-path-regex':
if (match_aspath_regex($parameters)) {
$commands[] = 'show route aspath-regex '.$parameters.
- ' protocol bgp table inet.0 | no-more';
+ ' protocol bgp table inet.0';
$commands[] = 'show route aspath-regex '.$parameters.
- ' protocol bgp table inet6.0 | no-more';
+ ' protocol bgp table inet6.0';
} else {
throw new Exception('The parameter is not an AS-Path regular expression like ".*XXXX YYYY.*".');
}
@@ -53,9 +53,9 @@ final class Juniper extends Router {
case 'as':
if (match_as($parameters)) {
$commands[] = 'show route aspath-regex ^'.$parameters.
- '$ protocol bgp table inet.0 | no-more';
+ '$ protocol bgp table inet.0';
$commands[] = 'show route aspath-regex ^'.$parameters.
- '$ protocol bgp table inet6.0 | no-more';
+ '$ protocol bgp table inet6.0';
} else {
throw new Exception('The parameter is not an AS number.');
}
diff --git a/routers/router.php b/routers/router.php
index cb213da..e0e8d00 100644
--- a/routers/router.php
+++ b/routers/router.php
@@ -52,6 +52,7 @@ abstract class Router {
try {
$auth->connect();
+ $data = '';
foreach ($commands as $selected) {
$data .= $auth->send_command($selected);