@property
    def image_name(self):
        import glanceclient.exc as glance_exceptions  # noqa
        from openstack_dashboard.api import glance  # noqa

        if not self.image:
            return _("-")
        if hasattr(self.image, 'name'):
            return self.image.name
        if 'name' in self.image:
            return self.image['name']
        else:
            try:
                image = glance.image_get(self.request, self.image['id'])
                return image.name
            except glance_exceptions.ClientException:
                return _("-")
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/api/nova.py/Server.image_name/original