server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
# Destroy an instance, given its id. Note that this will destroy all
# instance data.
#
# If there is user-data dile asocciated with instance, remove this file as
# well.
Destroy an instance, given its id. Note that this will destroy all
instance data.

If there is user-data dile asocciated with instance, remove this file as
well.
Destroy an instance given its id . Note that this will destroy all instance data . If there is user - data dile asocciated with instance remove this file as well .
def destroy_instance(credentials, instance_id)
      vm = find_vm(credentials, instance_id)
      user_file = vm[:instance].config[:extraConfig].select { |k| k.key == 'user_iso_file' }.first
      VSphere::FileManager::delete_iso!(vm[:instance].send(:datastore).first, user_file.value) if user_file
      vm[:instance].Destroy_Task.wait_for_completion
    end
def destroy_instance ( credentials , instance_id ) vm = find_vm ( credentials , instance_id ) user_file = vm [ :instance ] . config [ :extraConfig ] . select { | k | k . key == 'user_iso_file' } . first VSphere :: FileManager :: delete_iso! ( vm [ :instance ] . send ( :datastore ) . first , user_file . value ) if user_file vm [ :instance ] . Destroy_Task . wait_for_completion end
Destroy an instance, given its id.
Destroy an instance given its id .
credentials
<not_specific>
instance_id
<not_specific>