def vm_disk_snapshot_create(name, kwargs=None, call=None):
 if (call != 'action'):
  raise SaltCloudSystemExit('The vm_disk_snapshot_create action must be called with -a or --action.')
 if (kwargs is None):
  kwargs = {}
 disk_id = kwargs.get('disk_id', None)
 description = kwargs.get('description', None)
 if ((disk_id is None) or (description is None)):
  raise SaltCloudSystemExit("The vm_disk_snapshot_create function requires a 'disk_id' and a 'description' to be provided.")
 (server, user, password) = _get_xml_rpc()
 auth = ':'.join([user, password])
 vm_id = int(get_vm_id(kwargs={'name': name}))
 response = server.one.vm.disksnapshotcreate(auth, vm_id, int(disk_id), description)
 data = {'action': 'vm.disksnapshotcreate', 'created': response[0], 'snapshot_id': response[1], 'error_code': response[2]}
 return data

def vm_disk_snapshot_create ( name , kwargs = None , call = None ) : if ( call != 'action' ) : raise SaltCloudSystemExit ( 'The vm_disk_snapshot_create action must be called with -a or --action.' ) if ( kwargs is None ) : kwargs = { } disk_id = kwargs . get ( 'disk_id' , None ) description = kwargs . get ( 'description' , None ) if ( ( disk_id is None ) or ( description is None ) ) : raise SaltCloudSystemExit ( "The vm_disk_snapshot_create function requires a 'disk_id' and a 'description' to be provided." ) ( server , user , password ) = _get_xml_rpc ( ) auth = ':' . join ( [ user , password ] ) vm_id = int ( get_vm_id ( kwargs = { 'name' : name } ) ) response = server . one . vm . disksnapshotcreate ( auth , vm_id , int ( disk_id ) , description ) data = { 'action' : 'vm.disksnapshotcreate' , 'created' : response [ 0 ] , 'snapshot_id' : response [ 1 ] , 'error_code' : response [ 2 ] } return data
takes a new snapshot of the disk image .