Class: Opc::OpcOrgList
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Opc::OpcOrgList
- Includes:
- Chef::Mixin::RootRestv0
- Defined in:
- lib/chef/knife/opc_org_list.rb
Instance Method Summary collapse
Methods included from Chef::Mixin::RootRestv0
Instance Method Details
#run ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/chef/knife/opc_org_list.rb', line 37 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 |