Class: Chef::Knife::Cloud::OraclecloudOrchestrationList
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
44
45
|
# File 'lib/chef/knife/oraclecloud_orchestration_list.rb', line 36
def before_exec_command
@columns_with_info = [
{ label: 'Orchestration ID', key: 'name_with_container' },
{ label: 'Description', key: 'description' },
{ label: 'Status', key: 'status', value_callback: method(:format_status_value) },
{ label: 'Instance Count', key: 'instance_count' }
]
@sort_by_field = 'name_with_container'
end
|
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/chef/knife/oraclecloud_orchestration_list.rb', line 51
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
47
48
49
|
# File 'lib/chef/knife/oraclecloud_orchestration_list.rb', line 47
def query_resource
service.list_orchestrations
end
|