# Path: os_brick/i18n.py
# DOMAIN = 'os-brick'
# 
# Path: os_brick/privileged/nvmeof.py
# LOG = logging.getLogger(__name__)
# def create_hostnqn():


import functools
import inspect
import logging as py_logging
import time
import tenacity  # noqa
from typing import Callable, Tuple, Type, Union   # noqa: H301
from oslo_concurrency import processutils
from oslo_log import log as logging
from oslo_utils import strutils
from os_brick.i18n import _
from os_brick.privileged import nvmeof as priv_nvme
            mask_result = strutils.mask_password(result)
        else:
            mask_result = result

        logger.debug('<== %(func)s: return (%(time)dms) %(result)r',
                     {'func': func_name,
                      'time': total_time,
                      'result': mask_result})
        return result
    return trace_logging_wrapper


def convert_str(text: Union[bytes, str]) -> str:
    """Convert to native string.

    Convert bytes and Unicode strings to native strings:

    * convert to Unicode on Python 3: decode bytes from UTF-8
    """
    if isinstance(text, bytes):
        return text.decode('utf-8')
    else:
        return text


def get_host_nqn():
    try:
        with open('/etc/nvme/hostnqn', 'r') as f:
            host_nqn = f.read().strip()
    except IOError:

# Path: os_brick/i18n.py
# DOMAIN = 'os-brick'
# 
# Path: os_brick/privileged/nvmeof.py
# LOG = logging.getLogger(__name__)
# def create_hostnqn():


# Path: os_brick/utils.py
import functools
import inspect
import logging as py_logging
import time
import tenacity  # noqa
from typing import Callable, Tuple, Type, Union   # noqa: H301
from oslo_concurrency import processutils
from oslo_log import log as logging
from oslo_utils import strutils
from os_brick.i18n import _
from os_brick.privileged import nvmeof as priv_nvme

            mask_result = strutils.mask_password(result)
        else:
            mask_result = result

        logger.debug('<== %(func)s: return (%(time)dms) %(result)r',
                     {'func': func_name,
                      'time': total_time,
                      'result': mask_result})
        return result
    return trace_logging_wrapper


def convert_str(text: Union[bytes, str]) -> str:
    """Convert to native string.

    Convert bytes and Unicode strings to native strings:

    * convert to Unicode on Python 3: decode bytes from UTF-8
    """
    if isinstance(text, bytes):
        return text.decode('utf-8')
    else:
        return text


def get_host_nqn():
    try:
        with open('/etc/nvme/hostnqn', 'r') as f:
            host_nqn = f.read().strip()
    except IOError:

        host_nqn = priv_nvme.create_hostnqn()