Project

General

Profile

« Previous | Next » 

Revision 26a3ca45

Added by Marc Dequènes almost 15 years ago

  • ID 26a3ca452bdc8e837baee4a42b170d9ffd67196c

[evol] the 'list' command now display the number of items

View differences:

TODO
- delete item
- create item (aspect-less, with at least MUST fields with a field=val syntax, and multiple occurences of the same field allowed to specify multiple values for multi-valued fields)
- remove/add aspect (removing obsolete fields/adding new MUST fields accordingly)
- binary fields: allow upload from file (using field[+-]=path syntax in 'mod' operation when detecting binary field)
bin/shadowwalker
obj_hdl = args.shift.singularize
case obj_hdl
when ':object'
puts "=== List of LDAP objects ==="
$ldapctl.objects.each do |obj_name|
list = $ldapctl.objects
puts "=== List of LDAP objects (#{list.size}) ==="
list.each do |obj_name|
puts " - #{obj_name}"
end
when ':aspect'
......
end
subobj_human_name = Translator.translate_object_name(subobj_hdl)
puts "=== List of LDAP aspects of #{subobj_human_name.pluralize} ==="
obj_klass.possible_aspects.each do |subobj_name|
list = obj_klass.possible_aspects
puts "=== List of LDAP aspects of #{subobj_human_name.pluralize} (#{list.size}) ==="
list.each do |subobj_name|
puts " - #{subobj_name}"
end
else
lib/ldap_shadows/display_utils.rb
end
def self.display_item_list(title, obj_list)
puts "=== #{title} ==="
puts "=== #{title} (#{obj_list.size}) ==="
obj_list.each do |obj|
str = obj.human_name
str += " [#{obj.name}]" if $program_options[:handles]

Also available in: Unified diff