def list_glance_images(request):
    if openstackUtils.connect_to_openstack():
        image_list = openstackUtils.list_glance_images()
        context = {'error': image_list}
        return render(request, 'error.html', context)
    context = {'error': 'Could not connect to OpenStack'}
    return render(request, 'error.html', context)
def list_glance_images(request):
    if openstackUtils.connect_to_openstack():
        image_list = openstackUtils.list_glance_images()
        context = {'error': image_list}
        return render(request, 'error.html', context)
    context = {'error': 'Could not connect to OpenStack'}
    return render(request, 'error.html', context)