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

@extensions.expected_errors(404)
def index(self, req, server_id):

    context = req.environ['nova.context']
    context.can((sm_policies.POLICY_ROOT % 'index'))
    return {'metadata': self._get_metadata(context, server_id)}
