Make merge.py installable as a package using pbr
Now that merge.py is invokable from another script (Ia6b6416fe10358d23f2b120283eecaf4c1178cfd) and from comments at that review, it makes sense to offer a nicer way to consume the merge functionality. Once you git clone tripleo-heat-templates you can python setup.py install and get /usr/bin/tripleo_heat_merge as well as a tripleo_heat_merge package in python2.7/site-packages. Makefile edits required because we moved merge.py into the tripleo_heat_merge directory for the packaging. Change-Id: I587fa7a826f93f89e8e5c266af7f5765438fe738
This commit is contained in:
parent
f6289d0127
commit
c9ce27c981
4
.gitignore
vendored
4
.gitignore
vendored
@ -45,3 +45,7 @@ nosetests.xml
|
|||||||
*.swp
|
*.swp
|
||||||
|
|
||||||
doc/_build
|
doc/_build
|
||||||
|
|
||||||
|
# Built by pbr (python setup.py sdist):
|
||||||
|
AUTHORS
|
||||||
|
ChangeLog
|
||||||
|
10
Makefile
10
Makefile
@ -1,23 +1,23 @@
|
|||||||
overcloud.yaml: overcloud-source.yaml nova-compute-instance.yaml swift-source.yaml
|
overcloud.yaml: overcloud-source.yaml nova-compute-instance.yaml swift-source.yaml
|
||||||
# $^ won't work here because we want to list nova-compute-instance.yaml as
|
# $^ won't work here because we want to list nova-compute-instance.yaml as
|
||||||
# a prerequisite but don't want to pass it into merge.py
|
# a prerequisite but don't want to pass it into merge.py
|
||||||
python merge.py overcloud-source.yaml swift-source.yaml > $@.tmp
|
python ./tripleo_heat_merge/merge.py overcloud-source.yaml swift-source.yaml > $@.tmp
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
undercloud-vm.yaml: undercloud-source.yaml undercloud-vm-source.yaml
|
undercloud-vm.yaml: undercloud-source.yaml undercloud-vm-source.yaml
|
||||||
python merge.py $^ > $@.tmp
|
python ./tripleo_heat_merge/merge.py $^ > $@.tmp
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
undercloud-bm.yaml: undercloud-source.yaml undercloud-bm-source.yaml
|
undercloud-bm.yaml: undercloud-source.yaml undercloud-bm-source.yaml
|
||||||
python merge.py $^ > $@.tmp
|
python ./tripleo_heat_merge/merge.py $^ > $@.tmp
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
undercloud-vm-tuskar.yaml: undercloud-source.yaml undercloud-vm-source.yaml tuskar-source.yaml
|
undercloud-vm-tuskar.yaml: undercloud-source.yaml undercloud-vm-source.yaml tuskar-source.yaml
|
||||||
python merge.py $^ > $@.tmp
|
python ./tripleo_heat_merge/merge.py $^ > $@.tmp
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
undercloud-vm-ironic.yaml: undercloud-source.yaml undercloud-vm-source.yaml ironic-source.yaml
|
undercloud-vm-ironic.yaml: undercloud-source.yaml undercloud-vm-source.yaml ironic-source.yaml
|
||||||
python merge.py $^ > $@.tmp
|
python ./tripleo_heat_merge/merge.py $^ > $@.tmp
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
10
setup.cfg
10
setup.cfg
@ -17,8 +17,8 @@ classifier =
|
|||||||
Environment :: Console
|
Environment :: Console
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
data_files =
|
packages =
|
||||||
share/tripleo-heat-tempaltes/examples = examples/*
|
tripleo_heat_merge
|
||||||
share/tripleo-heat-templates =
|
[entry_points]
|
||||||
Makefile
|
console_scripts =
|
||||||
*.yaml
|
tripleo-heat-merge = tripleo_heat_merge.merge:main
|
||||||
|
@ -23,10 +23,11 @@ run_test() {
|
|||||||
cleanup
|
cleanup
|
||||||
}
|
}
|
||||||
echo
|
echo
|
||||||
run_test "python merge.py examples/source.yaml" examples/source_lib_result.yaml
|
merge_py="./tripleo_heat_merge/merge.py"
|
||||||
run_test "python merge.py examples/source2.yaml" examples/source2_lib_result.yaml
|
run_test "python $merge_py examples/source.yaml" examples/source_lib_result.yaml
|
||||||
run_test "python merge.py examples/source_include_subkey.yaml" examples/source_include_subkey_result.yaml
|
run_test "python $merge_py examples/source2.yaml" examples/source2_lib_result.yaml
|
||||||
run_test "python merge.py examples/launchconfig1.yaml examples/launchconfig2.yaml" examples/launchconfig_result.yaml
|
run_test "python $merge_py examples/source_include_subkey.yaml" examples/source_include_subkey_result.yaml
|
||||||
|
run_test "python $merge_py examples/launchconfig1.yaml examples/launchconfig2.yaml" examples/launchconfig_result.yaml
|
||||||
echo
|
echo
|
||||||
trap - EXIT
|
trap - EXIT
|
||||||
exit $fail
|
exit $fail
|
||||||
|
0
tripleo_heat_merge/__init__.py
Normal file
0
tripleo_heat_merge/__init__.py
Normal file
Loading…
Reference in New Issue
Block a user