From da73db1bf43b8950d33bd47b39b595f7f6e8756d Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Fri, 13 Jun 2014 16:02:25 +0200 Subject: No more 'no-more' for Juniper. --- routers/juniper.php | 12 ++++++------ routers/router.php | 1 + 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); -- cgit v1.2.3