'Returns the list of metadata for a given instance.'

@wsgi.Controller.api_version('2.1', MAX_IMAGE_META_PROXY_API_VERSION)
@extensions.expected_errors((403, 404))
def index(self, req, image_id):

    context = req.environ['nova.context']
    metadata = self._get_image(context, image_id)['properties']
    return dict(metadata=metadata)
