예제 #1
0
파일: client.py 프로젝트: sebrandon1/cinder
 def is_lun_io_ready(lun):
     utils.update_res_without_poll(lun)
     if not lun.existed:
         return False
     lun_state = lun.state
     if lun_state == common.LUNState.INITIALIZING:
         return False
     elif lun_state in [common.LUNState.READY, common.LUNState.FAULTED]:
         return lun.operation == "None"
     else:
         # Quick exit wait_until when the lun is other state to avoid
         # long-time timeout.
         msg = _("Volume %(name)s was created in VNX, " "but in %(state)s state.") % {
             "name": lun.name,
             "state": lun_state,
         }
         raise exception.VolumeBackendAPIException(data=msg)
예제 #2
0
 def is_lun_io_ready(lun):
     utils.update_res_without_poll(lun)
     if not lun.existed:
         return False
     lun_state = lun.state
     if lun_state == common.LUNState.INITIALIZING:
         return False
     elif lun_state in [common.LUNState.READY,
                        common.LUNState.FAULTED]:
         return lun.operation == 'None'
     else:
         # Quick exit wait_until when the lun is other state to avoid
         # long-time timeout.
         msg = (_('Volume %(name)s was created in VNX, '
                  'but in %(state)s state.')
                % {'name': lun.name,
                   'state': lun_state})
         raise exception.VolumeBackendAPIException(data=msg)
예제 #3
0
 def is_mirror_synced(mirror):
     utils.update_res_without_poll(mirror)
     return (
         mirror.secondary_image.state ==
         storops.VNXMirrorImageState.SYNCHRONIZED)
예제 #4
0
 def is_lun_expanded(lun, new_size):
     utils.update_res_without_poll(lun)
     return new_size == lun.total_capacity_gb
예제 #5
0
 def is_lun_ops_ready(lun):
     utils.update_res_without_poll(lun)
     return 'None' == lun.operation
예제 #6
0
 def is_object_existed(vnx_obj):
     utils.update_res_without_poll(vnx_obj)
     return vnx_obj.existed
예제 #7
0
 def get_pool_name(self, lun_name):
     lun = self.get_lun(name=lun_name)
     utils.update_res_without_poll(lun)
     return lun.pool_name
예제 #8
0
파일: client.py 프로젝트: C2python/cinder
 def is_mirror_synced(mirror):
     utils.update_res_without_poll(mirror)
     return (
         mirror.secondary_image.state ==
         storops.VNXMirrorImageState.SYNCHRONIZED)
예제 #9
0
파일: client.py 프로젝트: C2python/cinder
 def is_lun_expanded(lun, new_size):
     utils.update_res_without_poll(lun)
     return new_size == lun.total_capacity_gb
예제 #10
0
파일: client.py 프로젝트: C2python/cinder
 def is_lun_ops_ready(lun):
     utils.update_res_without_poll(lun)
     return 'None' == lun.operation
예제 #11
0
파일: client.py 프로젝트: C2python/cinder
 def is_object_existed(vnx_obj):
     utils.update_res_without_poll(vnx_obj)
     return vnx_obj.existed
예제 #12
0
파일: client.py 프로젝트: C2python/cinder
 def get_pool_name(self, lun_name):
     lun = self.get_lun(name=lun_name)
     utils.update_res_without_poll(lun)
     return lun.pool_name