diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-28 13:30:07 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-28 13:30:07 -0800 |
commit | 7f46fe5870c1dcee8c6d04897514c3f923bc57c4 (patch) | |
tree | 31062a7f118cc8e6ae30fb4b1c270f5b71b00054 /scripts/vyatta-qos.pl | |
parent | 448f9b72dae691d02034c8c5b261978b5ad99473 (diff) | |
download | vyatta-cfg-qos-7f46fe5870c1dcee8c6d04897514c3f923bc57c4.tar.gz vyatta-cfg-qos-7f46fe5870c1dcee8c6d04897514c3f923bc57c4.zip |
cleanup variable names for clarity
No functional change just change listName to listPolicy to make
it clearer what is going on.
Diffstat (limited to 'scripts/vyatta-qos.pl')
-rwxr-xr-x | scripts/vyatta-qos.pl | 15 |
1 files 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; } |