afm-unit: Fix http port multi allocation 93/18993/1
authorJosé Bollo <jose.bollo@iot.bzh>
Tue, 18 Dec 2018 09:58:25 +0000 (10:58 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 18 Dec 2018 10:04:53 +0000 (11:04 +0100)
commitf8b04951b4ccafdf28b875825edd46316fafb519
treee86e965cd77f375fa1aee9858b56f34e7682a441
parenta8ffd5216cf61aa3dbf97d442e0e3184763d773f
afm-unit: Fix http port multi allocation

When serveral targets were set in the widget file, the
framework allocated the same HTTP port to each. This
lead to impossibility to run all targets or to a
systemd conflict.

This should fix the issue by allocating an HTTP port for
each target installed by the widget. To achieves that goal,
the afm-unit.conf tag for the port is moved from
'#metadata.http-port' to '#metatarget.http-port'.

Bug-AGL: SPEC-2068

Change-Id: I5376d6f052e0ffc5c77cc80041528637777aed1e
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
conf/unit/afm-unit-debug.conf.in
conf/unit/afm-unit.conf.in
conf/unit/generate-unit-conf/binder.inc
src/tests/test-unit/test-unit.c
src/wgtpkg-install.c
src/wgtpkg-mustach.c
src/wgtpkg-unit.c
src/wgtpkg-unit.h