def glance_detail(request):
    '\n    OpenStack specific action to get image details from Glance\n    :param request: HTTPRequest\n    :return: rendered HTML\n    '
    required_fields = set(['imageId'])
    if (not required_fields.issubset(request.POST)):
        return render(request, 'ajax/ajaxError.html', {'error': 'Invalid Parameters in POST'})
    image_id = request.POST['imageId']
    image = get_object_or_404(Image, pk=image_id)
    if openstackUtils.connect_to_openstack():
        glance_id = openstackUtils.get_image_id_for_name(image.name)
        glance_json = dict()
        if (glance_id is not None):
            glance_json = openstackUtils.get_glance_image_detail(glance_id)
            logger.debug(('glance json of %s is' % glance_id))
            logger.debug(glance_json)
            logger.debug('---')
        return render(request, 'images/glance_detail.html', {'image': glance_json, 'image_id': image_id, 'glance_id': glance_id, 'openstack_host': configuration.openstack_host})
    else:
        return render(request, 'error.html', {'error': 'Could not connect to OpenStack'})
OpenStack specific action to get image details from Glance
:param request: HTTPRequest
:return: rendered HTML
def glance_detail(request):
    '\n    OpenStack specific action to get image details from Glance\n    :param request: HTTPRequest\n    :return: rendered HTML\n    '
    required_fields = set(['imageId'])
    if (not required_fields.issubset(request.POST)):
        return render(request, 'ajax/ajaxError.html', {'error': 'Invalid Parameters in POST'})
    image_id = request.POST['imageId']
    image = get_object_or_404(Image, pk=image_id)
    if openstackUtils.connect_to_openstack():
        glance_id = openstackUtils.get_image_id_for_name(image.name)
        glance_json = dict()
        if (glance_id is not None):
            glance_json = openstackUtils.get_glance_image_detail(glance_id)
            logger.debug(('glance json of %s is' % glance_id))
            logger.debug(glance_json)
            logger.debug('---')
        return render(request, 'images/glance_detail.html', {'image': glance_json, 'image_id': image_id, 'glance_id': glance_id, 'openstack_host': configuration.openstack_host})
    else:
        return render(request, 'error.html', {'error': 'Could not connect to OpenStack'})