Class: Chef::Knife::ClcServerDelete
- Inherits:
-
Chef::Knife
- Object
- Chef::Knife
- Chef::Knife::ClcServerDelete
- Includes:
- ClcBase
- Defined in:
- lib/chef/knife/clc_server_delete.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_server_delete.rb', line 23 def execute ui.info 'Requesting server deletion...' links = connection.delete_server(name_args[0]) if config[:clc_wait] connection.wait_for(links['operation']['id']) { putc '.' } ui.info "\n" ui.info 'Server has been deleted' else ui.info 'Deletion request has been sent' ui.info "You can check deletion operation status with 'knife clc operation show #{links['operation']['id']}'" end end |
#parse_and_validate_parameters ⇒ Object
17 18 19 20 21 |
# File 'lib/chef/knife/clc_server_delete.rb', line 17 def parse_and_validate_parameters unless name_args[0] errors << 'Server ID is required' end end |