Don't install openvswitch-datapath-dkms on newer kernels
On kernels >= 3.13 for Ubuntu, there is no need to install the
openvswitch-datapath-dkms package anymore. Consequently we don't need the
dkms package anymore, nor the linux headers.
Update the opendaylight devstack code to correctly check for this and make
the right decision.
While here, also utilize get_packages() and common code where possible.
Change-Id: Idd6a71951f6f77b6e3c4e536e735dfead6a40bc1
Closes-Bug: #1331111
diff --git a/lib/opendaylight b/lib/opendaylight
index 0ac7f2b..33b3f0a 100644
--- a/lib/opendaylight
+++ b/lib/opendaylight
@@ -122,22 +122,10 @@
unzip -u $ODL_PKG
}
-# install_opendaylight-compute - Make sure OVS is install
+# install_opendaylight-compute - Make sure OVS is installed
function install_opendaylight-compute {
- local kernel_version
- # Install deps
- # FIXME add to ``files/apts/neutron``, but don't install if not needed!
- if is_ubuntu; then
- kernel_version=`cat /proc/version | cut -d " " -f3`
- install_package make fakeroot dkms openvswitch-switch openvswitch-datapath-dkms linux-headers-$kernel_version
- elif is_fedora; then
- install_package openvswitch
- # Ensure that the service is started
- restart_service openvswitch
- elif is_suse; then
- install_package openvswitch-switch
- restart_service openvswitch-switch
- fi
+ # packages are the same as for Neutron OVS agent
+ _neutron_ovs_base_install_agent_packages
}
# start_opendaylight() - Start running processes, including screen