summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-02-28 13:30:07 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-02-28 13:30:07 -0800
commit7f46fe5870c1dcee8c6d04897514c3f923bc57c4 (patch)
tree31062a7f118cc8e6ae30fb4b1c270f5b71b00054
parent448f9b72dae691d02034c8c5b261978b5ad99473 (diff)
downloadvyatta-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.
-rwxr-xr-xscripts/vyatta-qos.pl15
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;
}