'Update an attachment record.
Update a reserved attachment record with connector information and set
up the appropriate connection_info from the driver.
Expected format of the input parameter \'body\':
.. code:: json
"attachment":
"connector":
"initiator": "iqn.1993-08.org.debian:01:cad181614cec",
"ip":"192.168.1.20",
"platform": "x86_64",
"host": "tempest-1",
"os_type": "linux2",
"multipath": False,
"mountpoint": "/dev/vdb",
"mode": None|"rw"|"ro",'

@wsgi.Controller.api_version(API_VERSION)
def update(self, req, id, body):

    context = req.environ['cinder.context']
    attachment_ref = objects.VolumeAttachment.get_by_id(context, id)
    connector = body['attachment'].get('connector', None)
    if (not connector):
        raise webob.exc.HTTPBadRequest(explanation=_("Must    specify    'connector'    to    update    attachment."))
    err_msg = None
    try:
        attachment_ref = self.volume_api.attachment_update(context, attachment_ref, connector)
    except exception.NotAuthorized:
        raise
    except exception.CinderException as ex:
        err_msg = (_('Unable    to    update    attachment.(%s).') % ex.msg)
        LOG.exception(err_msg)
    except Exception:
        err_msg = _('Unable    to    update    the    attachment.')
        LOG.exception(err_msg)
    finally:
        if err_msg:
            raise webob.exc.HTTPInternalServerError(explanation=err_msg)
    return attachment_views.ViewBuilder.detail(attachment_ref)
