'Update server then pass on to version-specific controller.'

@extensions.expected_errors((400, 404))
@validation.schema(schema_server_update_v20, '2.0', '2.0')
@validation.schema(schema_server_update, '2.1', '2.18')
@validation.schema(schema_server_update_v219, '2.19')
def update(self, req, id, body):

    ctxt = req.environ['nova.context']
    update_dict = {}
    instance = self._get_server(ctxt, req, id, is_detail=True)
    ctxt.can((server_policies.SERVERS % 'update'), target={'user_id': instance.user_id, 'project_id': instance.project_id})
    server = body['server']
    if ('name' in server):
        update_dict['display_name'] = common.normalize_name(server['name'])
    if ('description' in server):
        update_dict['display_description'] = server['description']
    helpers.translate_attributes(helpers.UPDATE, server, update_dict)
    try:
        instance = self.compute_api.update_instance(ctxt, instance, update_dict)
        return self._view_builder.show(req, instance, extend_address=False)
    except exception.InstanceNotFound:
        msg = _('Instance    could    not    be    found')
        raise exc.HTTPNotFound(explanation=msg)
