def shelve_server(servers_client, server_id, force_shelve_offload=False):
 servers_client.shelve_server(server_id)
 offload_time = CONF.compute.shelved_offload_time
 if (offload_time >= 0):
  waiters.wait_for_server_status(servers_client, server_id, 'SHELVED_OFFLOADED', extra_timeout=offload_time)
 else:
  waiters.wait_for_server_status(servers_client, server_id, 'SHELVED')
  if force_shelve_offload:
   servers_client.shelve_offload_server(server_id)
   waiters.wait_for_server_status(servers_client, server_id, 'SHELVED_OFFLOADED')

def shelve_server ( servers_client , server_id , force_shelve_offload = False ) : servers_client . shelve_server ( server_id ) offload_time = CONF . compute . shelved_offload_time if ( offload_time >= 0 ) : waiters . wait_for_server_status ( servers_client , server_id , 'SHELVED_OFFLOADED' , extra_timeout = offload_time ) else : waiters . wait_for_server_status ( servers_client , server_id , 'SHELVED' ) if force_shelve_offload : servers_client . shelve_offload_server ( server_id ) waiters . wait_for_server_status ( servers_client , server_id , 'SHELVED_OFFLOADED' )
common wrapper utility to shelve server .