Changeset 40


Ignore:
Timestamp:
04/25/09 04:12:06 (15 years ago)
Author:
nanardon
Message:
  • allow to list supported objects and attribute
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/bin/la-config

    r38 r40  
    2020 
    2121    la-config [option] att 
     22    la-config [option] att objects_type 
    2223 
    2324=cut 
     
    5859    m/^att(ributes)?$/ and do { 
    5960        my $labase = $base ? $LA->base($base) : $LA->default_base; 
    60         my $otype = shift(@ARGV) || 'user'; 
    61         printf "Supported field for object type %s (base %s)\n", 
    62             $otype, 
    63             $LA->default_base_name || 'N/A'; 
    64         print "  $_\n" foreach($labase->list_canonicals_fields($otype)); 
     61        if (my $otype = shift(@ARGV)) { 
     62            printf "Supported field for object type %s (base %s)\n", 
     63                $otype, 
     64                $base ? $base : $LA->default_base_name; 
     65            print "  $_\n" foreach($labase->list_canonicals_fields($otype)); 
     66        } else { 
     67            printf "Supported object type by base %s\n", 
     68                $base ? $base : $LA->default_base_name; 
     69            print "  $_\n" foreach($labase->list_supported_objects); 
     70        } 
    6571    }; 
    6672} 
Note: See TracChangeset for help on using the changeset viewer.