Class: Chef::Knife::Cloud::OraclecloudImageList
Instance Method Summary
collapse
included
#check_for_missing_config_values!, #create_service_instance, #verify_ssl?
Instance Method Details
#before_exec_command ⇒ Object
36
37
38
39
40
41
42
43
|
# File 'lib/chef/knife/oraclecloud_image_list.rb', line 36
def before_exec_command
@columns_with_info = [
{ label: 'Image Name', key: 'name' },
{ label: 'Description', key: 'description' }
]
@sort_by_field = 'name'
end
|
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/chef/knife/oraclecloud_image_list.rb', line 49
def format_status_value(status)
status = status.downcase
status_color = case status
when 'ready'
:green
when 'stopped'
:red
else
:yellow
end
ui.color(status, status_color)
end
|
#query_resource ⇒ Object
45
46
47
|
# File 'lib/chef/knife/oraclecloud_image_list.rb', line 45
def query_resource
service.list_images
end
|