3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/occi/cli/helpers/list_helper.rb', line 3
def helper_list(options, output = nil)
found = []
if resource_types.include?(options.resource) || resource_type_identifiers.include?(options.resource)
Occi::Cli::Log.debug "#{options.resource.inspect} is a resource type."
found = list options.resource
elsif mixin_types.include?(options.resource) || mixin_type_identifiers.include?(options.resource)
Occi::Cli::Log.debug "#{options.resource.inspect} is a mixin type."
found = mixin_list options.resource
else
Occi::Cli::Log.error "I have no idea what #{options.resource.inspect} is ..."
raise "Unknown resource #{options.resource.inspect}, there is nothing to list here!"
end
helper_list_output(found, options, output)
end
|