@api_wrapper
def update_pool(module, system, pool):
 changed = False
 size = module.params['size']
 vsize = module.params['vsize']
 ssd_cache = module.params['ssd_cache']
 if size:
  physical_capacity = Capacity(size).roundup(((6 * 64) * KiB))
  if (pool.get_physical_capacity() != physical_capacity):
   if (not module.check_mode):
    pool.update_physical_capacity(physical_capacity)
   changed = True
 if vsize:
  virtual_capacity = Capacity(vsize).roundup(((6 * 64) * KiB))
  if (pool.get_virtual_capacity() != virtual_capacity):
   if (not module.check_mode):
    pool.update_virtual_capacity(virtual_capacity)
   changed = True
 if (pool.get_ssd_enabled() != ssd_cache):
  if (not module.check_mode):
   pool.update_ssd_enabled(ssd_cache)
  changed = True
 module.exit_json(changed=changed)

@ api_wrapper def update_pool ( module , system , pool ) : changed = False size = module . params [ 'size' ] vsize = module . params [ 'vsize' ] ssd_cache = module . params [ 'ssd_cache' ] if size : physical_capacity = Capacity ( size ) . roundup ( ( ( 6 * 64 ) * KiB ) ) if ( pool . get_physical_capacity ( ) != physical_capacity ) : if ( not module . check_mode ) : pool . update_physical_capacity ( physical_capacity ) changed = True if vsize : virtual_capacity = Capacity ( vsize ) . roundup ( ( ( 6 * 64 ) * KiB ) ) if ( pool . get_virtual_capacity ( ) != virtual_capacity ) : if ( not module . check_mode ) : pool . update_virtual_capacity ( virtual_capacity ) changed = True if ( pool . get_ssd_enabled ( ) != ssd_cache ) : if ( not module . check_mode ) : pool . update_ssd_enabled ( ssd_cache ) changed = True module . exit_json ( changed = changed )
update pool .