diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2014-03-25 14:12:04 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-04-15 19:48:37 -0400 |
commit | 509875734bb5e935436d2b09192e8b5e4c1500cb (patch) | |
tree | 593466aadfb732c9f2f097bce363b474d29ff5ac /meta-openstack/recipes-devtools/python/python-neutron_git.bb | |
parent | 1768e94b9e600884d43e65b3ef05e379f043a196 (diff) | |
download | meta-cloud-services-509875734bb5e935436d2b09192e8b5e4c1500cb.tar.gz |
python-neutron: cleanup dhcp agent packaging
Cleanup packaging to get the necessary .ini and related files
into the dhcp-agent package. Add a cron job to keep things
clean.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-neutron_git.bb')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-neutron_git.bb | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb index b256c79..1621923 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb +++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb | |||
@@ -13,6 +13,8 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ | |||
13 | file://neutron-server.init \ | 13 | file://neutron-server.init \ |
14 | file://neutron-agent.init \ | 14 | file://neutron-agent.init \ |
15 | file://l3_agent.ini \ | 15 | file://l3_agent.ini \ |
16 | file://dhcp_agent.ini \ | ||
17 | file://neutron-dhcp-agent-netns-cleanup.cron \ | ||
16 | " | 18 | " |
17 | SRCREV="8cb9d895675f2a89c6b741da4b594f416fbeee5a" | 19 | SRCREV="8cb9d895675f2a89c6b741da4b594f416fbeee5a" |
18 | PV="2013.2.2+git${SRCPV}" | 20 | PV="2013.2.2+git${SRCPV}" |
@@ -64,6 +66,17 @@ do_install_append() { | |||
64 | install -m 0755 ${WORKDIR}/neutron-$PLUGIN.init.sh ${D}${sysconfdir}/init.d/neutron-$PLUGIN-agent | 66 | install -m 0755 ${WORKDIR}/neutron-$PLUGIN.init.sh ${D}${sysconfdir}/init.d/neutron-$PLUGIN-agent |
65 | fi | 67 | fi |
66 | 68 | ||
69 | AGENT=dhcp | ||
70 | ARGS="--config-file=${sysconfdir}/${SRCNAME}/neutron.conf --config-file=${sysconfdir}/${SRCNAME}/dhcp_agent.ini" | ||
71 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
72 | sed "s:@suffix@:$AGENT:;s:@args@:$ARGS:" < ${WORKDIR}/neutron-agent.init >${WORKDIR}/neutron-$AGENT.init.sh | ||
73 | install -m 0755 ${WORKDIR}/neutron-$AGENT.init.sh ${D}${sysconfdir}/init.d/neutron-$AGENT-agent | ||
74 | install -m 600 ${WORKDIR}/${AGENT}_agent.ini ${NEUTRON_CONF_DIR}/ | ||
75 | sed "s:@bindir@:${bindir}:g;s:@confdir@:${sysconfdir}:g" < ${WORKDIR}/neutron-dhcp-agent-netns-cleanup.cron >${WORKDIR}/neutron-dhcp-agent-netns-cleanup | ||
76 | install -d ${D}${sysconfdir}/cron.d | ||
77 | install -m 644 ${WORKDIR}/neutron-dhcp-agent-netns-cleanup ${D}${sysconfdir}/cron.d/ | ||
78 | fi | ||
79 | |||
67 | AGENT=l3 | 80 | AGENT=l3 |
68 | ARGS="--config-file=${sysconfdir}/${SRCNAME}/neutron.conf --config-file=${sysconfdir}/${SRCNAME}/l3_agent.ini" | 81 | ARGS="--config-file=${sysconfdir}/${SRCNAME}/neutron.conf --config-file=${sysconfdir}/${SRCNAME}/l3_agent.ini" |
69 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 82 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
@@ -152,7 +165,8 @@ FILES_${SRCNAME}-plugin-linuxbridge = " \ | |||
152 | FILES_${SRCNAME}-dhcp-agent = "${bindir}/neutron-dhcp-agent \ | 165 | FILES_${SRCNAME}-dhcp-agent = "${bindir}/neutron-dhcp-agent \ |
153 | ${bindir}/neutron-dhcp-agent-dnsmasq-lease-update \ | 166 | ${bindir}/neutron-dhcp-agent-dnsmasq-lease-update \ |
154 | ${sysconfdir}/${SRCNAME}/dhcp_agent.ini \ | 167 | ${sysconfdir}/${SRCNAME}/dhcp_agent.ini \ |
155 | ${sysconfdir}/init.d/dhcp_agent \ | 168 | ${sysconfdir}/init.d/neutron-dhcp-agent \ |
169 | ${sysconfdir}/cron.d/neutron-dhcp-agent-netns-cleanup \ | ||
156 | " | 170 | " |
157 | 171 | ||
158 | FILES_${SRCNAME}-l3-agent = "${bindir}/neutron-l3-agent \ | 172 | FILES_${SRCNAME}-l3-agent = "${bindir}/neutron-l3-agent \ |
@@ -212,12 +226,14 @@ RDEPENDS_${SRCNAME}-setup = "postgresql sudo" | |||
212 | 226 | ||
213 | RRECOMMENDS_${SRCNAME}-server = "${SRCNAME}-plugin-openvswitch" | 227 | RRECOMMENDS_${SRCNAME}-server = "${SRCNAME}-plugin-openvswitch" |
214 | 228 | ||
215 | INITSCRIPT_PACKAGES = "${SRCNAME}-server ${SRCNAME}-plugin-openvswitch ${SRCNAME}-plugin-linuxbridge ${SRCNAME}-l3-agent" | 229 | INITSCRIPT_PACKAGES = "${SRCNAME}-server ${SRCNAME}-plugin-openvswitch ${SRCNAME}-plugin-linuxbridge ${SRCNAME}-dhcp-agent ${SRCNAME}-l3-agent" |
216 | INITSCRIPT_NAME_${SRCNAME}-server = "neutron-server" | 230 | INITSCRIPT_NAME_${SRCNAME}-server = "neutron-server" |
217 | INITSCRIPT_PARAMS_${SRCNAME}-server = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 231 | INITSCRIPT_PARAMS_${SRCNAME}-server = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
218 | INITSCRIPT_NAME_${SRCNAME}-plugin-openvswitch = "neutron-openvswitch-agent" | 232 | INITSCRIPT_NAME_${SRCNAME}-plugin-openvswitch = "neutron-openvswitch-agent" |
219 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-openvswitch = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 233 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-openvswitch = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
220 | INITSCRIPT_NAME_${SRCNAME}-plugin-linuxbridge = "neutron-linuxbridge-agent" | 234 | INITSCRIPT_NAME_${SRCNAME}-plugin-linuxbridge = "neutron-linuxbridge-agent" |
221 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-linuxbridge = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 235 | INITSCRIPT_PARAMS_${SRCNAME}-plugin-linuxbridge = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
236 | INITSCRIPT_NAME_${SRCNAME}-dhcp-agent = "neutron-dhcp-agent" | ||
237 | INITSCRIPT_PARAMS_${SRCNAME}-dhcp-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | ||
222 | INITSCRIPT_NAME_${SRCNAME}-l3-agent = "neutron-l3-agent" | 238 | INITSCRIPT_NAME_${SRCNAME}-l3-agent = "neutron-l3-agent" |
223 | INITSCRIPT_PARAMS_${SRCNAME}-l3-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 239 | INITSCRIPT_PARAMS_${SRCNAME}-l3-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |