Class: Chef::Knife::ClcOperationShow
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::ClcOperationShow
- Includes:
- ClcBase
- Defined in:
- lib/chef/knife/clc_operation_show.rb
Instance Method Summary collapse
Methods included from ClcBase
Instance Method Details
#execute ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/chef/knife/clc_operation_show.rb', line 23 def execute operation_id = name_args[0] if config[:clc_wait] ui.info 'Waiting for operation completion...' connection.wait_for(operation_id) { putc '.' } ui.info "\n" ui.info 'Operation has been completed' else status = connection.show_operation(operation_id)['status'] ui.info "#{ui.color('Status', :bold)}: #{status}" end end |
#parse_and_validate_parameters ⇒ Object
17 18 19 20 21 |
# File 'lib/chef/knife/clc_operation_show.rb', line 17 def parse_and_validate_parameters unless name_args[0] errors << 'Operation ID is required' end end |