def job_binary_update(self, context, id, values):

        values = copy.deepcopy(values)
        values['id'] = id
        # in cases where the credentials to access the job binary are
        # stored with the record and the external key manager is being
        # used, we need to delete the old key from the manager and
        # create a new one. the other option here would be to retrieve
        # the previous key and check to see if it has changed, but it
        # seems less expensive to just delete the old and create a new
        # one.
        if (CONF.use_barbican_key_manager and not
                CONF.use_domain_for_proxy_users):
            # first we retrieve the original record to get the old key
            # uuid, and delete it.
            jb_record = self.job_binary_get(context, id)
            if jb_record.get('extra') and jb_record['extra'].get('password'):
                key_manager.delete_secret(jb_record['extra']['password'],
                                          context)
            # next we create the new key.
            if values.get('extra') and values['extra'].get('password'):
                values['extra']['password'] = key_manager.store_secret(
                    values['extra']['password'], context)
        return self.db.job_binary_update(context, values)

    # JobBinaryInternal ops
Update a JobBinary from the values dictionary.
dataset/ETHPy150Open openstack/sahara/sahara/conductor/manager.py/ConductorManager.job_binary_update