Class: Chef::Knife::OrgList

Inherits:
Knife
  • Object
show all
Defined in:
lib/chef/knife/org_list.rb

Instance Method Summary collapse

Instance Method Details

#runObject



35
36
37
38
39
40
41
# File 'lib/chef/knife/org_list.rb', line 35

def run
  results = root_rest.get("organizations")
  unless config[:all_orgs]
    results = results.select { |k, v| !(k.length == 20 && k =~ /^[a-z]+$/) }
  end
  ui.output(ui.format_list_for_display(results))
end