'update a deployment config with changes'

def add_modifications(self, deploymentconfig):

    if self.deploymentconfig:
        result = self.deploymentconfig.get_env_var('REGISTRY_HTTP_SECRET')
        if result:
            deploymentconfig.update_env_var('REGISTRY_HTTP_SECRET', result['value'])
    for (key, value) in self.config.config_options['env_vars'].get('value', {}).items():
        if (not deploymentconfig.exists_env_key(key)):
            deploymentconfig.add_env_value(key, value)
        else:
            deploymentconfig.update_env_var(key, value)
    for volume in self.volumes:
        deploymentconfig.update_volume(volume)
    for vol_mount in self.volume_mounts:
        deploymentconfig.update_volume_mount(vol_mount)
    edit_results = []
    for edit in self.config.config_options['edits'].get('value', []):
        if (edit['action'] == 'put'):
            edit_results.append(deploymentconfig.put(edit['key'], edit['value']))
        if (edit['action'] == 'update'):
            edit_results.append(deploymentconfig.update(edit['key'], edit['value'], edit.get('index', None), edit.get('curr_value', None)))
        if (edit['action'] == 'append'):
            edit_results.append(deploymentconfig.append(edit['key'], edit['value']))
    if (edit_results and (not any([res[0] for res in edit_results]))):
        return None
    return deploymentconfig.yaml_dict
