Commit 47a1d9c9 authored by Mike Hibler's avatar Mike Hibler

Do not print out *_urn attributes unless -U is specified.

parent 3b750e77
#!/usr/bin/perl -w
#
# Copyright (c) 2013-2017 University of Utah and the Flux Group.
# Copyright (c) 2013-2019 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -38,6 +38,7 @@ sub usage()
print STDERR " -a Show all leases (admin only)\n";
print STDERR " -g Show only leases in the 'grace' state\n";
print STDERR " -l Long listing\n";
print STDERR " -U Really long listing (include URNs)\n";
print STDERR " -L Show lock holders (admin only)\n";
print STDERR " -D Describe the system-wide limits on leases\n";
print STDERR " -p pid Show all leases for project <pid>\n";
......@@ -45,7 +46,7 @@ sub usage()
print STDERR " lid ... Show named leases (name is <pid>/<id>)\n";
exit(-1);
}
my $optlist = "dhaLDp:u:gl";
my $optlist = "dhaLDp:u:glU";
my $debug = 0;
my $pid;
my $uid;
......@@ -110,6 +111,9 @@ if (defined($options{g})) {
if (defined($options{l})) {
$verbose = 1;
}
if (defined($options{U})) {
$verbose = 2;
}
if (defined($options{L})) {
$showlockers = 1;
}
......@@ -280,6 +284,7 @@ if (@lids > 0) {
#
# Get the attributes.
# Note that we treat size special and remove it from the attrlist.
# Note also that we treat URNs special, only including them for -U.
#
my $lsize = "";
my $attrstr = "";
......@@ -292,6 +297,9 @@ if (@lids > 0) {
$lsize = $v;
next;
}
if ($verbose < 2 && $k =~ /_urn$/) {
next;
}
$attrstr .= "$del$k=$v";
$del = ",";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment