#!/usr/bin/make -f include /usr/share/openstack-pkg-tools/pkgos.make DHCP_CONF=$(CURDIR)/debian/neutron-common/usr/share/neutron-common/dhcp_agent.ini L3_CONF=$(CURDIR)/debian/neutron-common/usr/share/neutron-common/l3_agent.ini ML2_CONF=$(CURDIR)/debian/neutron-common/usr/share/neutron-common/plugins/ml2/ml2_conf.ini OVS_CONF=$(CURDIR)/debian/neutron-common/usr/share/neutron-common/plugins/ml2/openvswitch_agent.ini N_CONF=$(CURDIR)/debian/neutron-common/usr/share/neutron-common/neutron.conf %: dh $@ --buildsystem=python_distutils --with python3,sphinxdoc override_dh_auto_clean: python3 setup.py clean find . -type f -name "*.pyc" | xargs rm -fr rm -rf build neutron.egg-info .stestr rm -f debian/neutron-common.config \ debian/neutron-common.postinst \ debian/neutron-api.config \ debian/neutron-api.postinst \ debian/neutron-dhcp-agent.postinst \ debian/neutron-metadata-agent.config \ debian/neutron-metadata-agent.postinst \ debian/neutron-common.postrm rm -f debian/*.init debian/*.service debian/*.upstart debian/neutron-common.templates override_dh_clean: dh_clean find . -type f -name "*.pyc" -delete rm -f AUTHORS ChangeLog override_dh_auto_build: /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func neutron-common.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func neutron-common.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func neutron-api.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func neutron-api.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func neutron-dhcp-agent.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func neutron-metadata-agent.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func neutron-metadata-agent.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func neutron-openvswitch-agent.postinst /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func neutron-openvswitch-agent.config /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_postrm neutron-common.postrm pkgos-merge-templates neutron-api neutron endpoint pkgos-merge-templates neutron-common neutron db rabbit ksat override_dh_auto_test: echo "Doing nothing..." override_dh_auto_install: echo "Do nothing..." override_dh_install: python3 setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages pkgos-dh_auto_test --no-py2 'neutron\.tests\.unit(?!.*test_wsgi.*|.*agent\.dhcp\.test_agent\.TestDhcpAgent\.test_dhcp_agent_manager.*|.*common\.test_utils\.TestDelayedStringRenderer\.test_not_called_with_low_log_level.*|.*services\.trunk\.drivers\.openvswitch\.agent\.test_ovsdb_handler\.TestOVSDBHandler\.test_handle_trunk_remove_trunk_manager_failure.*|.*agent\.l3\.test_agent\.TestBasicRouterOperations\.test_interface_driver_init.*|.*plugins\.ml2\.drivers\.openvswitch\.agent\.test_ovs_tunnel\.TunnelTestUseVethIntercoOSKen\.test_daemon_loop.*|.*plugins\.ml2\.drivers\.openvswitch\.agent\.test_ovs_tunnel\.TunnelTestOSKen\.test_daemon_loop.*|.*plugins\.ml2\.drivers\.openvswitch\.agent\.test_ovs_tunnel\.TunnelTestWithMTUOSKen\.test_daemon_loop.*|.*plugins\.ml2\.drivers\.openvswitch\.agent\.test_ovs_neutron_agent\.TestOvsNeutronAgentOSKen\.test_fdb_add_flows.*|.*plugins\.ml2\.drivers\.openvswitch\.agent\.test_ovs_neutron_agent\.TestOvsNeutronAgentOSKen\.test_fdb_del_flows.*|.*test_manager\.NeutronManagerTestCase\.test_service_plugin_is_loaded.*)' endif cp -auxf neutron $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages rm -rf $(CURDIR)/debian/tmp/usr/etc # dhcp_agent.ini mkdir -p $(CURDIR)/debian/neutron-common/usr/share/neutron-common PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-common/usr/share/neutron-common/dhcp_agent.ini \ --wrap-width 140 \ --namespace neutron.az.agent \ --namespace neutron.base.agent \ --namespace neutron.dhcp.agent \ --namespace oslo.log pkgos-fix-config-default $(DHCP_CONF) DEFAULT interface_driver openvswitch pkgos-fix-config-default $(DHCP_CONF) DEFAULT enable_isolated_metadata True # l3_agent.ini mkdir -p $(CURDIR)/debian/neutron-common/usr/share/neutron-common PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-common/usr/share/neutron-common/l3_agent.ini \ --wrap-width 140 \ --namespace neutron.az.agent \ --namespace neutron.base.agent \ --namespace neutron.l3.agent \ --namespace oslo.log pkgos-fix-config-default $(L3_CONF) DEFAULT interface_driver openvswitch pkgos-fix-config-default $(L3_CONF) DEFAULT external_network_bridge br-ex pkgos-fix-config-default $(L3_CONF) DEFAULT ovs_use_veth False # linuxbridge_agent.ini mkdir -p $(CURDIR)/debian/neutron-linuxbridge-agent/etc/neutron/plugins/ml2 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-linuxbridge-agent/etc/neutron/plugins/ml2/linuxbridge_agent.ini \ --wrap-width 140 \ --namespace neutron.ml2.linuxbridge.agent \ --namespace oslo.log # macvtap_agent.ini mkdir -p $(CURDIR)/debian/neutron-macvtap-agent/etc/neutron/plugins/ml2 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-macvtap-agent/etc/neutron/plugins/ml2/macvtap_agent.ini \ --wrap-width 140 \ --namespace neutron.ml2.macvtap.agent \ --namespace oslo.log # metadata_agent.ini mkdir -p $(CURDIR)/debian/neutron-metadata-agent/usr/share/neutron-metadata-agent PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-metadata-agent/usr/share/neutron-metadata-agent/metadata_agent.ini \ --wrap-width 140 \ --namespace neutron.metadata.agent \ --namespace oslo.log \ --namespace oslo.cache # sed -i 's|^[ #\t]*nova_metadata_protocol[ \t]*=.*|nova_metadata_protocol = http|' $(CURDIR)/debian/neutron-metadata-agent/usr/share/neutron-metadata-agent/metadata_agent.ini # sed -i 's|^[ #\t]*nova_metadata_ip[ \t]*=.*|nova_metadata_ip = 127.0.0.1|' $(CURDIR)/debian/neutron-metadata-agent/usr/share/neutron-metadata-agent/metadata_agent.ini # metering_agent.ini mkdir -p $(CURDIR)/debian/neutron-metering-agent/etc/neutron PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-metering-agent/etc/neutron/metering_agent.ini \ --wrap-width 140 \ --namespace neutron.base.agent \ --namespace neutron.metering.agent \ --namespace oslo.log # ml2_conf.ini mkdir -p $(CURDIR)/debian/neutron-common/usr/share/neutron-common/plugins/ml2 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-common/usr/share/neutron-common/plugins/ml2/ml2_conf.ini \ --wrap-width 140 \ --namespace neutron.ml2 \ --namespace oslo.log pkgos-fix-config-default $(ML2_CONF) ml2 type_drivers flat,vxlan pkgos-fix-config-default $(ML2_CONF) ml2 tenant_network_types vxlan pkgos-fix-config-default $(ML2_CONF) ml2 mechanism_drivers openvswitch,l2population pkgos-fix-config-default $(ML2_CONF) ml2_type_flat flat_networks external pkgos-fix-config-default $(ML2_CONF) ml2_type_vxlan vni_ranges 1:1000 pkgos-fix-config-default $(ML2_CONF) securitygroup enable_security_group True pkgos-fix-config-default $(ML2_CONF) securitygroup enable_ipset True pkgos-fix-config-default $(ML2_CONF) ml2 extension_drivers port_security,qos # neutron.conf mkdir -p $(CURDIR)/debian/neutron-common/usr/share/neutron-common PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-common/usr/share/neutron-common/neutron.conf \ --wrap-width 140 \ --namespace neutron \ --namespace neutron.agent \ --namespace neutron.db \ --namespace neutron.extensions \ --namespace nova.auth \ --namespace ironic.auth \ --namespace oslo.log \ --namespace oslo.db \ --namespace oslo.policy \ --namespace oslo.privsep \ --namespace oslo.concurrency \ --namespace oslo.messaging \ --namespace oslo.middleware.cors \ --namespace oslo.middleware.http_proxy_to_wsgi \ --namespace oslo.service.sslutils \ --namespace oslo.service.wsgi \ --namespace keystonemiddleware.auth_token pkgos-readd-keystone-authtoken-missing-options $(CURDIR)/debian/neutron-common/usr/share/neutron-common/neutron.conf keystone_authtoken neutron # Config default for neutron.conf pkgos-fix-config-default $(N_CONF) DEFAULT core_plugin ml2 pkgos-fix-config-default $(N_CONF) oslo_concurrency lock_path /var/lock/neutron pkgos-fix-config-default $(N_CONF) DEFAULT interface_driver openvswitch pkgos-fix-config-default $(N_CONF) DEFAULT service_plugins router,metering,qos pkgos-fix-config-default $(N_CONF) DEFAULT auth_strategy keystone pkgos-fix-config-default $(N_CONF) DEFAULT allow_overlapping_ips True pkgos-fix-config-default $(N_CONF) DEFAULT notify_nova_on_port_status_changes True pkgos-fix-config-default $(N_CONF) DEFAULT notify_nova_on_port_data_changes True pkgos-fix-config-default $(N_CONF) database connection sqlite:///var/lib/neutron/neutrondb pkgos-fix-config-default $(N_CONF) oslo_policy policy_file /etc/neutron/policy.json pkgos-fix-config-default $(N_CONF) nova auth_type password pkgos-fix-config-default $(N_CONF) nova project_domain_name default pkgos-fix-config-default $(N_CONF) nova user_domain_name default # Workaround, as pkgos-fix-config-default don't support more than one word sed -i 's|^[ #\t]*root_helper[ \t]*=.*|root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf|' $(N_CONF) # Add a [designate] configuration example cat debian/designate-addition.txt >> $(CURDIR)/debian/neutron-common/usr/share/neutron-common/neutron.conf # neutron_ovn_metadata_agent.ini mkdir -p $(CURDIR)/debian/neutron-ovn-metadata-agent/etc/neutron PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-ovn-metadata-agent/etc/neutron/neutron_ovn_metadata_agent.ini \ --wrap-width 140 \ --namespace neutron.ovn.metadata.agent \ --namespace oslo.log # openvswitch_agent.ini mkdir -p $(CURDIR)/debian/neutron-common/usr/share/neutron-common/plugins/ml2 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-common/usr/share/neutron-common/plugins/ml2/openvswitch_agent.ini \ --wrap-width 140 \ --namespace neutron.ml2.ovs.agent \ --namespace neutron.ml2.xenapi \ --namespace oslo.log pkgos-fix-config-default ${OVS_CONF} agent tunnel_types vxlan pkgos-fix-config-default ${OVS_CONF} ovs bridge_mappings external:br-ex pkgos-fix-config-default ${OVS_CONF} ovs integration_bridge br-int pkgos-fix-config-default ${OVS_CONF} ovs tunnel_bridge br-tun pkgos-fix-config-default ${OVS_CONF} securitygroup firewall_driver openvswitch pkgos-fix-config-default ${OVS_CONF} securitygroup enable_security_group True pkgos-fix-config-default ${OVS_CONF} securitygroup enable_ipset True # ovn.ini mkdir -p $(CURDIR)/debian/neutron-common/usr/share/neutron-common PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-common/usr/share/neutron-common/ovn.ini \ --wrap-width 140 \ --namespace neutron.ml2.ovn \ --namespace oslo.log # sriov_agent.ini mkdir -p $(CURDIR)/debian/neutron-common/etc/neutron/plugins/ml2 PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslo-config-generator \ --output-file $(CURDIR)/debian/neutron-common/etc/neutron/plugins/ml2/sriov_agent.ini \ --wrap-width 140 \ --namespace neutron.ml2.sriov.agent \ --namespace oslo.log # policy.json mkdir -p $(CURDIR)/debian/neutron-common/etc/neutron/policy.d PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages oslopolicy-sample-generator \ --output-file $(CURDIR)/debian/neutron-common/etc/neutron/policy.d/00_default_policy.yaml \ --format yaml \ --namespace neutron # Use the policy.d folder pkgos-fix-config-default $(CURDIR)/debian/neutron-common/usr/share/neutron-common/neutron.conf oslo_policy policy_dirs /etc/neutron/policy.d # Install neutron-plugin-manage maintainer script mkdir -p $(CURDIR)/debian/neutron-common/usr/bin cp debian/neutron-plugin-manage $(CURDIR)/debian/neutron-common/usr/bin/neutron-plugin-manage dh_install # This is a TripleO stuff, we don't care about it rm -f $(CURDIR)/neutron-common/usr/bin/ovn_migration.sh rm -rf $(CURDIR)/neutron-common/usr/share/ansible dh_missing --fail-missing -X/usr/etc override_dh_sphinxdoc: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. python3 -m sphinx -b html doc/source $(CURDIR)/debian/neutron-doc/usr/share/doc/neutron-doc/html dh_sphinxdoc endif override_dh_python3: dh_python3 --shebang=/usr/bin/python3