def downtime_steps(data_gb):
 downtime = CONF.libvirt.live_migration_downtime
 steps = CONF.libvirt.live_migration_downtime_steps
 delay = CONF.libvirt.live_migration_downtime_delay
 downtime_min = nova.conf.libvirt.LIVE_MIGRATION_DOWNTIME_MIN
 steps_min = nova.conf.libvirt.LIVE_MIGRATION_DOWNTIME_STEPS_MIN
 delay_min = nova.conf.libvirt.LIVE_MIGRATION_DOWNTIME_DELAY_MIN
 if (downtime < downtime_min):
  LOG.warning(_LW("Config option live_migration_downtime's value is less than minimum value %dms, rounded up to the minimum value and will raise ValueError in the future release."), downtime_min)
  downtime = downtime_min
 if (steps < steps_min):
  LOG.warning(_LW("Config option live_migration_downtime_steps's value is less than minimum value %dms, rounded up to the minimum value and will raise ValueError in the future release."), steps_min)
  steps = steps_min
 if (delay < delay_min):
  LOG.warning(_LW("Config option live_migration_downtime_delay's value is less than minimum value %dms, rounded up to the minimum value and will raise ValueError in the future release."), delay_min)
  delay = delay_min
 delay = int((delay * data_gb))
 offset = (downtime / float((steps + 1)))
 base = ((downtime - offset) ** (1 / float(steps)))
 for i in range((steps + 1)):
  (yield (int((delay * i)), int((offset + (base ** i)))))

def downtime_steps ( data_gb ) : downtime = CONF . libvirt . live_migration_downtime steps = CONF . libvirt . live_migration_downtime_steps delay = CONF . libvirt . live_migration_downtime_delay downtime_min = nova . conf . libvirt . LIVE_MIGRATION_DOWNTIME_MIN steps_min = nova . conf . libvirt . LIVE_MIGRATION_DOWNTIME_STEPS_MIN delay_min = nova . conf . libvirt . LIVE_MIGRATION_DOWNTIME_DELAY_MIN if ( downtime < downtime_min ) : LOG . warning ( _LW ( "Config option live_migration_downtime's value is less than minimum value %dms, rounded up to the minimum value and will raise ValueError in the future release." ) , downtime_min ) downtime = downtime_min if ( steps < steps_min ) : LOG . warning ( _LW ( "Config option live_migration_downtime_steps's value is less than minimum value %dms, rounded up to the minimum value and will raise ValueError in the future release." ) , steps_min ) steps = steps_min if ( delay < delay_min ) : LOG . warning ( _LW ( "Config option live_migration_downtime_delay's value is less than minimum value %dms, rounded up to the minimum value and will raise ValueError in the future release." ) , delay_min ) delay = delay_min delay = int ( ( delay * data_gb ) ) offset = ( downtime / float ( ( steps + 1 ) ) ) base = ( ( downtime - offset ) ** ( 1 / float ( steps ) ) ) for i in range ( ( steps + 1 ) ) : ( yield ( int ( ( delay * i ) ) , int ( ( offset + ( base ** i ) ) ) ) )
calculate downtime value steps and time between increases .