def update(self, lease_id, name=None, prolong_for=None, reduce_by=None,
               advance_by=None, defer_by=None):
        values = {}
        if name:
            values['name'] = name

        lease_end_date_change = prolong_for or reduce_by
        lease_start_date_change = defer_by or advance_by
        lease = None

        if lease_end_date_change:
            lease = self.get(lease_id)
            self._add_lease_date(values, lease, 'end_date',
                                 lease_end_date_change,
                                 prolong_for is not None)

        if lease_start_date_change:
            if lease is None:
                lease = self.get(lease_id)
            self._add_lease_date(values, lease, 'start_date',
                                 lease_start_date_change,
                                 defer_by is not None)

        if not values:
            return _('No values to update passed.')
        return self._update('/leases/%s' % lease_id, values,
                            response_key='lease')
Update attributes of the lease.
dataset/ETHPy150Open openstack/python-blazarclient/climateclient/v1/leases.py/LeaseClientManager.update