summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-08 14:09:58 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-08 14:09:58 -0700
commitfea24d2de3efef33a080fe52f4ae9638477710a7 (patch)
tree4fd153b14226ae38dc5dff3d8f4dcf516e514128 /scripts
parent6ae27ba3ef8fc49cf61eaff1165ee480dbdbad20 (diff)
downloadvyatta-cfg-qos-fea24d2de3efef33a080fe52f4ae9638477710a7.tar.gz
vyatta-cfg-qos-fea24d2de3efef33a080fe52f4ae9638477710a7.zip
Print correct names for completion
Want the policy names, not the policy type.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-qos.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl
index 0547b4b..4245e5e 100755
--- a/scripts/vyatta-qos.pl
+++ b/scripts/vyatta-qos.pl
@@ -94,9 +94,13 @@ sub list_policy {
$config->setLevel('qos-policy');
while ( my $direction = shift ) {
- my @types =
- grep { defined $policies{$direction}{$_} } $config->listNodes();
- print join( ' ', @types );
+ my @qos = grep { $policies{$direction}{$_} } $config->listNodes();
+ my @names = ();
+ foreach my $type (@qos) {
+ my @n = $config->listNodes($type);
+ push @names, @n;
+ }
+ print join( ' ', @names ), "\n";
}
}