diff options
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-neutron_git.bb')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-neutron_git.bb | 67 |
1 files changed, 43 insertions, 24 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb index 295db97..f961487 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb +++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb | |||
@@ -25,7 +25,7 @@ PV="2014.2.b3+git${SRCPV}" | |||
25 | 25 | ||
26 | S = "${WORKDIR}/git" | 26 | S = "${WORKDIR}/git" |
27 | 27 | ||
28 | inherit setuptools update-rc.d identity hosts default_configs | 28 | inherit setuptools update-rc.d identity hosts default_configs openstackchef |
29 | 29 | ||
30 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" | 30 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" |
31 | KEYSTONE_HOST="${CONTROLLER_IP}" | 31 | KEYSTONE_HOST="${CONTROLLER_IP}" |
@@ -60,11 +60,11 @@ do_install_append() { | |||
60 | install -m 600 ${S}/etc/api-paste.ini ${NEUTRON_CONF_DIR}/ | 60 | install -m 600 ${S}/etc/api-paste.ini ${NEUTRON_CONF_DIR}/ |
61 | install -m 600 ${S}/etc/policy.json ${NEUTRON_CONF_DIR}/ | 61 | install -m 600 ${S}/etc/policy.json ${NEUTRON_CONF_DIR}/ |
62 | 62 | ||
63 | sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ | 63 | #sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ |
64 | -i ${NEUTRON_CONF_DIR}/neutron.conf | 64 | # -i ${NEUTRON_CONF_DIR}/neutron.conf |
65 | sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${NEUTRON_CONF_DIR}/neutron.conf | 65 | #sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${NEUTRON_CONF_DIR}/neutron.conf |
66 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ | 66 | #sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ |
67 | -i ${NEUTRON_CONF_DIR}/neutron.conf | 67 | # -i ${NEUTRON_CONF_DIR}/neutron.conf |
68 | sed -e "s:^# core_plugin.*:core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2:g" \ | 68 | sed -e "s:^# core_plugin.*:core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2:g" \ |
69 | -i ${NEUTRON_CONF_DIR}/neutron.conf | 69 | -i ${NEUTRON_CONF_DIR}/neutron.conf |
70 | 70 | ||
@@ -74,15 +74,7 @@ do_install_append() { | |||
74 | sed -e "s:^# notify_nova_on_port_data_changes.*:notify_nova_on_port_data_changes = False:g" \ | 74 | sed -e "s:^# notify_nova_on_port_data_changes.*:notify_nova_on_port_data_changes = False:g" \ |
75 | -i ${NEUTRON_CONF_DIR}/neutron.conf | 75 | -i ${NEUTRON_CONF_DIR}/neutron.conf |
76 | 76 | ||
77 | sed -e "s:^# rabbit_host =.*:rabbit_host = ${CONTROLLER_IP}:" -i ${NEUTRON_CONF_DIR}/neutron.conf | 77 | sed -e "s:^# rabbit_host =.*:rabbit_host = %CONTROLLER_IP%:" -i ${NEUTRON_CONF_DIR}/neutron.conf |
78 | |||
79 | for file in plugins/openvswitch/ovs_neutron_plugin.ini plugins/linuxbridge/linuxbridge_conf.ini | ||
80 | do | ||
81 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${NEUTRON_CONF_DIR}/${file} | ||
82 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${NEUTRON_CONF_DIR}/${file} | ||
83 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${NEUTRON_CONF_DIR}/${file} | ||
84 | sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${NEUTRON_CONF_DIR}/${file} | ||
85 | done | ||
86 | 78 | ||
87 | PLUGIN=openvswitch | 79 | PLUGIN=openvswitch |
88 | ARGS="--config-file=${sysconfdir}/${SRCNAME}/neutron.conf --config-file=${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_neutron_plugin.ini" | 80 | ARGS="--config-file=${sysconfdir}/${SRCNAME}/neutron.conf --config-file=${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_neutron_plugin.ini" |
@@ -121,15 +113,23 @@ do_install_append() { | |||
121 | install -m 0755 ${WORKDIR}/neutron-$AGENT.init.sh ${D}${sysconfdir}/init.d/neutron-$AGENT-agent | 113 | install -m 0755 ${WORKDIR}/neutron-$AGENT.init.sh ${D}${sysconfdir}/init.d/neutron-$AGENT-agent |
122 | install -m 600 ${WORKDIR}/${AGENT}_agent.ini ${NEUTRON_CONF_DIR}/ | 114 | install -m 600 ${WORKDIR}/${AGENT}_agent.ini ${NEUTRON_CONF_DIR}/ |
123 | fi | 115 | fi |
124 | sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ | 116 | if [ -z "${OPENSTACKCHEF_ENABLED}" ]; then |
125 | -i ${NEUTRON_CONF_DIR}/metadata_agent.ini | 117 | for file in plugins/openvswitch/ovs_neutron_plugin.ini \ |
126 | sed -e "s:%SERVICE_USER%:${SRCNAME}:g" \ | 118 | plugins/linuxbridge/linuxbridge_conf.ini neutron.conf metadata_agent.ini; do |
127 | -i ${NEUTRON_CONF_DIR}/metadata_agent.ini | 119 | sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ |
128 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ | 120 | -i ${NEUTRON_CONF_DIR}/$file |
129 | -i ${NEUTRON_CONF_DIR}/metadata_agent.ini | 121 | sed -e "s:%SERVICE_USER%:${SRCNAME}:g" \ |
130 | sed -e "s:%METADATA_SHARED_SECRET%:${METADATA_SHARED_SECRET}:g" \ | 122 | -i ${NEUTRON_CONF_DIR}/$file |
131 | -i ${NEUTRON_CONF_DIR}/metadata_agent.ini | 123 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ |
132 | 124 | -i ${NEUTRON_CONF_DIR}/$file | |
125 | sed -e "s:%METADATA_SHARED_SECRET%:${METADATA_SHARED_SECRET}:g" \ | ||
126 | -i ${NEUTRON_CONF_DIR}/$file | ||
127 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${NEUTRON_CONF_DIR}/$file | ||
128 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${NEUTRON_CONF_DIR}/$file | ||
129 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${NEUTRON_CONF_DIR}/$file | ||
130 | sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${NEUTRON_CONF_DIR}/$file | ||
131 | done | ||
132 | fi | ||
133 | sed -e "s:^auth_host.*:#auth_host:g" -i ${NEUTRON_CONF_DIR}/neutron.conf | 133 | sed -e "s:^auth_host.*:#auth_host:g" -i ${NEUTRON_CONF_DIR}/neutron.conf |
134 | sed -e "s:^auth_port.*:#auth_port:g" -i ${NEUTRON_CONF_DIR}/neutron.conf | 134 | sed -e "s:^auth_port.*:#auth_port:g" -i ${NEUTRON_CONF_DIR}/neutron.conf |
135 | sed -e "s:^auth_protocol.*:#auth_protocol:g" -i ${NEUTRON_CONF_DIR}/neutron.conf | 135 | sed -e "s:^auth_protocol.*:#auth_protocol:g" -i ${NEUTRON_CONF_DIR}/neutron.conf |
@@ -157,6 +157,25 @@ pkg_postinst_${SRCNAME}-setup () { | |||
157 | --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini upgrade head | 157 | --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini upgrade head |
158 | } | 158 | } |
159 | 159 | ||
160 | CHEF_SERVICES_CONF_FILES := " \ | ||
161 | ${sysconfdir}/${SRCNAME}/neutron.conf \ | ||
162 | ${sysconfdir}/${SRCNAME}/metadata_agent.ini \ | ||
163 | ${sysconfdir}/${SRCNAME}/plugins/openvswitch/ovs_neutron_plugin.ini \ | ||
164 | ${sysconfdir}/${SRCNAME}/plugins/linuxbridge/linuxbridge_conf.ini \ | ||
165 | " | ||
166 | deploychef_services_special_func(){ | ||
167 | #This function is a callback function for the deploychef .bbclass | ||
168 | #We define this special callback funtion because we are doing | ||
169 | #more than a placeholder substitution. The variable CHEF_SERVICES_FILE_NAME | ||
170 | #is defined in deploychef_framework.bbclass | ||
171 | if [ -n "${CHEF_SERVICES_FILE_NAME}" ]; then | ||
172 | sed "s:^# rabbit_host =.*:rabbit_host = %CONTROLLER_IP%:" -i \ | ||
173 | ${CHEF_SERVICES_FILE_NAME} | ||
174 | fi | ||
175 | } | ||
176 | |||
177 | CHEF_SERVICES_SPECIAL_FUNC := "deploychef_services_special_func" | ||
178 | |||
160 | pkg_postinst_${SRCNAME}-plugin-openvswitch-setup () { | 179 | pkg_postinst_${SRCNAME}-plugin-openvswitch-setup () { |
161 | if [ "x$D" != "x" ]; then | 180 | if [ "x$D" != "x" ]; then |
162 | exit 1 | 181 | exit 1 |