def validate_volume(mnt_base):
 command = ['getfattr', '-n', 'quobyte.info', mnt_base]
 try:
  utils.execute(*command)
 except processutils.ProcessExecutionError as exc:
  msg = (_('The mount %(mount_path)s is not a valid Quobyte volume. Error: %(exc)s') % {'mount_path': mnt_base, 'exc': exc})
  raise nova_exception.InternalError(msg)
 if (not os.access(mnt_base, (os.W_OK | os.X_OK))):
  msg = (_LE('Volume is not writable. Please broaden the file permissions. Mount: %s') % mnt_base)
  raise nova_exception.InternalError(msg)

def validate_volume ( mnt_base ) : command = [ 'getfattr' , '-n' , 'quobyte.info' , mnt_base ] try : utils . execute ( * command ) except processutils . ProcessExecutionError as exc : msg = ( _ ( 'The mount %(mount_path)s is not a valid Quobyte volume. Error: %(exc)s' ) % { 'mount_path' : mnt_base , 'exc' : exc } ) raise nova_exception . InternalError ( msg ) if ( not os . access ( mnt_base , ( os . W_OK | os . X_OK ) ) ) : msg = ( _LE ( 'Volume is not writable. Please broaden the file permissions. Mount: %s' ) % mnt_base ) raise nova_exception . InternalError ( msg )
wraps execute calls for checking validity of a quobyte volume .