'Create a new volume.'

def create_volume(self, volume):

    start_time = time.time()
    LOG.debug('in    create_volume')
    LOG.debug('volume:    %s', volume.__dict__)
    reserve = self.configuration.san_thin_provision
    create_lun_name = self._gen_lun_name()
    create_lun_index = self.api_executor.create_lun(volume, self.configuration.qnap_poolname, create_lun_name, reserve)
    max_wait_sec = 600
    try_times = 0
    lun_naa = ''
    while True:
        created_lun = self.api_executor.get_lun_info(LUNIndex=create_lun_index)
        if (created_lun.find('LUNNAA') is not None):
            lun_naa = created_lun.find('LUNNAA').text
        try_times = (try_times + 3)
        eventlet.sleep(self.TIME_INTERVAL)
        if ((try_times > max_wait_sec) or (lun_naa is not None)):
            break
    LOG.debug('LUNNAA:    %s', lun_naa)
    _metadata = self._get_volume_metadata(volume)
    _metadata['LUNNAA'] = lun_naa
    _metadata['LunName'] = create_lun_name
    elapsed_time = (time.time() - start_time)
    LOG.debug('create_volume    elapsed_time:    %s', elapsed_time)
    return {'metadata': _metadata}
