From 7f46fe5870c1dcee8c6d04897514c3f923bc57c4 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 28 Feb 2008 13:30:07 -0800 Subject: cleanup variable names for clarity No functional change just change listName to listPolicy to make it clearer what is going on. --- scripts/vyatta-qos.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl index 5996e92..2c3ca07 100755 --- a/scripts/vyatta-qos.pl +++ b/scripts/vyatta-qos.pl @@ -13,25 +13,26 @@ my @updateInterface = (); my @deleteInterface = (); my @updatePolicy = (); my $deletePolicy = undef; -my $listName = undef; +my $listPolicy = undef; my @validateName = (); GetOptions( - "list-policy" => \$listName, "validate-name=s{2}" => \@validateName, "update-interface=s{3}" => \@updateInterface, "delete-interface=s{2}" => \@deleteInterface, + + "list-policy" => \$listPolicy, "update-policy=s{2}" => \@updatePolicy, "delete-policy=s" => \$deletePolicy, ); ## list defined qos policy names -sub list_inuse { +sub list_policy { my $config = new VyattaConfig; my @nodes = (); - foreach my $policy ($config->listNodes($qosNode) ) { - foreach my $name ($config->listNodes("$qosNode $policy") ) { + foreach my $type ($config->listNodes($qosNode) ) { + foreach my $name ($config->listNodes("$qosNode $type") ) { push @nodes, $name; } } @@ -141,8 +142,8 @@ sub update_policy { } } -if ( defined $listName ) { - list_inuse(); +if ( defined $listPolicy ) { + list_policy(); exit 0; } -- cgit v1.2.3