def remove_all_snapshots(name, kwargs=None, call=None):
 if (call != 'action'):
  raise SaltCloudSystemExit('The remove_all_snapshots action must be called with -a or --action.')
 connection = (_str_to_bool(kwargs.get('merge_snapshots')) if (kwargs and ('merge_snapshots' in kwargs)) else True)
 vm_ref = salt.utils.vmware.get_mor_by_property(_get_si(), vim.VirtualMachine, name)
 try:
  task = vm_ref.RemoveAllSnapshots()
  salt.utils.vmware.wait_for_task(task, name, 'remove snapshots', 5, 'info')
 except Exception as exc:
  log.error('Error while removing snapshots on VM {0}: {1}'.format(name, exc), exc_info_on_loglevel=logging.DEBUG)
  return 'failed to remove snapshots'
 return 'removed all snapshots'

def remove_all_snapshots ( name , kwargs = None , call = None ) : if ( call != 'action' ) : raise SaltCloudSystemExit ( 'The remove_all_snapshots action must be called with -a or --action.' ) connection = ( _str_to_bool ( kwargs . get ( 'merge_snapshots' ) ) if ( kwargs and ( 'merge_snapshots' in kwargs ) ) else True ) vm_ref = salt . utils . vmware . get_mor_by_property ( _get_si ( ) , vim . VirtualMachine , name ) try : task = vm_ref . RemoveAllSnapshots ( ) salt . utils . vmware . wait_for_task ( task , name , 'remove snapshots' , 5 , 'info' ) except Exception as exc : log . error ( 'Error while removing snapshots on VM {0}: {1}' . format ( name , exc ) , exc_info_on_loglevel = logging . DEBUG ) return 'failed to remove snapshots' return 'removed all snapshots'
remove all the snapshots present for the specified virtual machine .