def _get(self, resource_id, fields=None):
        """Retrieve a resource.

        :param resource_id: Identifier of the resource.
        :param fields: List of specific fields to be returned.
        """

        if fields is not None:
            resource_id = '%s?fields=' % resource_id
            resource_id += ','.join(fields)

        try:
            return self._list(self._path(resource_id))[0]
        except IndexError:
            return None
dataset/ETHPy150Open openstack/python-ironicclient/ironicclient/common/base.py/Manager._get/original