예제 #1
0
def install_packages():
    status_set('maintenance', 'Installing apt packages')
    apt_update()
    # NOTE(jamespage): ensure early install of dkms related
    #                  dependencies for kernels which need
    #                  openvswitch via dkms (12.04).
    dkms_packages = determine_dkms_package()
    if dkms_packages:
        apt_install([headers_package()] + dkms_packages, fatal=True)
    apt_install(filter_installed_packages(determine_packages()))
def get_early_packages():
    '''Return a list of package for pre-install based on configured plugin'''
    if config('plugin') in [OVS]:
        pkgs = determine_dkms_package()
    else:
        return []

    # ensure headers are installed build any required dkms packages
    if [p for p in pkgs if 'dkms' in p]:
        return pkgs + [headers_package()]
    return pkgs
def install_packages():
    apt_update()
    # NOTE(jamespage): install neutron-common package so we always
    #                  get a clear signal on which OS release is
    #                  being deployed
    apt_install(filter_installed_packages(['neutron-common']),
                fatal=True)
    # NOTE(jamespage): ensure early install of dkms related
    #                  dependencies for kernels which need
    #                  openvswitch via dkms (12.04).
    dkms_packages = determine_dkms_package()
    if dkms_packages:
        apt_install([headers_package()] + dkms_packages, fatal=True)
    missing_packages = filter_installed_packages(determine_packages())
    if missing_packages:
        status_set('maintenance', 'Installing packages')
        apt_install(missing_packages,
                    fatal=True)
    if use_dpdk():
        enable_ovs_dpdk()
예제 #4
0
 def test_determine_dkms_package_new_kernel(self, _kernel_version):
     _kernel_version.return_value = (3, 13)
     dkms_package = neutron.determine_dkms_package()
     self.assertEquals(dkms_package, [])
예제 #5
0
 def test_determine_dkms_package_old_kernel(self, _kernel_version):
     _kernel_version.return_value = (3, 10)
     dkms_package = neutron.determine_dkms_package()
     self.assertEquals(dkms_package, ['openvswitch-datapath-dkms'])