I just looked at this again in the light of my current work on 

    https://github.com/crowbar/barclamp-provisioner/pull/177

...

Vincent Untz (vu...@suse.com) wrote:
> Hi,
> 
> I just submitted this pull request, which I guess is worth discussing
> here:
>   https://github.com/crowbar/barclamp-crowbar/pull/589
> 
> Here's a copy and paste from the commit message:
> 
> ===================
> Until now, when creating a proposal with some existing json, it was
> required that the json contained a full proposal definition. Two big
> downsides of this are:
> 
> a) it's easy to break stuff by accident when changing a proposal
> b) if the schema changes to add new mandatory attributes, people can
> not simply re-use old json they had around; they have to update them
> 
> This commit allows passing an incomplete json with only a subset of
> attributes. It will take the default json, and overwrite any attribute
> there with the ones from the incomplete json.
> 
> Note that this is note using Chef::Mixin::DeepMerge::deep_merge! as a
> deep merge is also merging arrays in attribute values, which is
> something not desired here. The hash_only_merge! API is actually
> available in Chef 11 in Chef::Mixin::DeepMerge, so this is just a
> backport.

Why is merging of arrays not desired?  There are plenty of arrays
scattered around the JSON schema:

    $ grep -c sequence barclamps/*/chef/data_bags/crowbar/bc-template-*.schema 
| sort -t: -k2 -nr          
    barclamps/network/chef/data_bags/crowbar/bc-template-network.schema:9
    barclamps/dns/chef/data_bags/crowbar/bc-template-dns.schema:8
    barclamps/glance/chef/data_bags/crowbar/bc-template-glance.schema:7
    barclamps/deployer/chef/data_bags/crowbar/bc-template-deployer.schema:7
    barclamps/swift/chef/data_bags/crowbar/bc-template-swift.schema:6
    barclamps/quantum/chef/data_bags/crowbar/bc-template-quantum.schema:6
    barclamps/ntp/chef/data_bags/crowbar/bc-template-ntp.schema:6
    
barclamps/nova_dashboard/chef/data_bags/crowbar/bc-template-nova_dashboard.schema:6
    barclamps/nova/chef/data_bags/crowbar/bc-template-nova.schema:6
    barclamps/logging/chef/data_bags/crowbar/bc-template-logging.schema:6
    barclamps/keystone/chef/data_bags/crowbar/bc-template-keystone.schema:6
    barclamps/crowbar/chef/data_bags/crowbar/bc-template-crowbar.schema:6
    barclamps/cinder/chef/data_bags/crowbar/bc-template-cinder.schema:6
    barclamps/ceph/chef/data_bags/crowbar/bc-template-ceph.schema:6
    barclamps/test/chef/data_bags/crowbar/bc-template-test.schema:5
    barclamps/tempest/chef/data_bags/crowbar/bc-template-tempest.schema:5
    barclamps/rabbitmq/chef/data_bags/crowbar/bc-template-rabbitmq.schema:5
    
barclamps/provisioner/chef/data_bags/crowbar/bc-template-provisioner.schema:5
    barclamps/nagios/chef/data_bags/crowbar/bc-template-nagios.schema:5
    
barclamps/loadbalancer/chef/data_bags/crowbar/bc-template-loadbalancer.schema:5
    barclamps/ipmi/chef/data_bags/crowbar/bc-template-ipmi.schema:5
    barclamps/git/chef/data_bags/crowbar/bc-template-git.schema:5
    barclamps/ganglia/chef/data_bags/crowbar/bc-template-ganglia.schema:5
    barclamps/database/chef/data_bags/crowbar/bc-template-database.schema:5

_______________________________________________
Crowbar mailing list
Crowbar@dell.com
https://lists.us.dell.com/mailman/listinfo/crowbar
For more information: http://crowbar.github.com/

Reply via email to