Class: Chef::Knife::Cloud::OraclecloudServerDelete

Inherits:
ServerDeleteCommand
  • Object
show all
Includes:
OraclecloudServiceHelpers, OraclecloudServiceOptions, ServerDeleteOptions
Defined in:
lib/chef/knife/oraclecloud_server_delete.rb

Instance Method Summary collapse

Methods included from OraclecloudServiceOptions

included

Methods included from OraclecloudServiceHelpers

#check_for_missing_config_values!, #create_service_instance, #verify_ssl?

Instance Method Details

#execute_commandObject

overriding this method from knife-cloud so we can pull the instance label to pass to delete_from_chef rather than the resource ID



40
41
42
43
44
45
46
# File 'lib/chef/knife/oraclecloud_server_delete.rb', line 40

def execute_command
  @name_args.each do |instance_id|
    instance = service.get_server(instance_id)
    service.delete_server(instance_id)
    delete_from_chef(instance.label)
  end
end