def install():
    status_set('maintenance', 'Executing pre-install')
    execd_preinstall()
    src = config('openstack-origin')
    if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and
            src == 'distro'):
        src = 'cloud:precise-icehouse'
    configure_installation_source(src)
    status_set('maintenance', 'Installing apt packages')
    apt_update(fatal=True)
    apt_install('python-six', fatal=True)  # Force upgrade
    if valid_plugin():
        apt_install(filter_installed_packages(get_early_packages()),
                    fatal=True)
        apt_install(filter_installed_packages(get_packages()),
                    fatal=True)
    else:
        message = 'Please provide a valid plugin config'
        log(message, level=ERROR)
        status_set('blocked', message)
        sys.exit(1)

    # Legacy HA for Icehouse
    update_legacy_ha_files()

    # Install systemd overrides to remove service startup race between
    # n-gateway and n-cloud-controller services.
    install_systemd_override()
Ejemplo n.º 2
0
 def test_get_early_packages_ovs(self):
     self.config.return_value = 'ovs'
     self.determine_dkms_package.return_value = [
         'openvswitch-datapath-dkms'
     ]
     self.assertEqual(neutron_utils.get_early_packages(),
                      ['openvswitch-datapath-dkms', 'linux-headers-2.6.18'])
Ejemplo n.º 3
0
 def test_get_early_packages_ovs(self):
     self.config.return_value = 'ovs'
     self.determine_dkms_package.return_value = [
         'openvswitch-datapath-dkms']
     self.assertEquals(
         neutron_utils.get_early_packages(),
         ['openvswitch-datapath-dkms', 'linux-headers-2.6.18'])
Ejemplo n.º 4
0
def install():
    status_set('maintenance', 'Executing pre-install')
    execd_preinstall()
    src = config('openstack-origin')
    if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and src == 'distro'):
        src = 'cloud:precise-icehouse'
    configure_installation_source(src)
    status_set('maintenance', 'Installing apt packages')
    apt_update(fatal=True)
    apt_install('python-six', fatal=True)  # Force upgrade
    if valid_plugin():
        apt_install(filter_installed_packages(get_early_packages()),
                    fatal=True)
        apt_install(filter_installed_packages(get_packages()), fatal=True)
        status_set('maintenance', 'Git install')
        git_install(config('openstack-origin-git'))
    else:
        message = 'Please provide a valid plugin config'
        log(message, level=ERROR)
        status_set('blocked', message)
        sys.exit(1)

    # Legacy HA for Icehouse
    update_legacy_ha_files()

    # Install systemd overrides to remove service startup race between
    # n-gateway and n-cloud-controller services.
    install_systemd_override()
Ejemplo n.º 5
0
def install():
    status_set('maintenance', 'Executing pre-install')
    execd_preinstall()
    src = config('openstack-origin')
    if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and
            src == 'distro'):
        src = 'cloud:precise-icehouse'
    configure_installation_source(src)
    status_set('maintenance', 'Installing apt packages')
    apt_update(fatal=True)
    apt_install('python-six', fatal=True)  # Force upgrade
    if valid_plugin():
        apt_install(filter_installed_packages(get_early_packages()),
                    fatal=True)
        apt_install(filter_installed_packages(get_packages()),
                    fatal=True)
    else:
        message = 'Please provide a valid plugin config'
        log(message, level=ERROR)
        status_set('blocked', message)
        sys.exit(1)

    # Legacy HA for Icehouse
    update_legacy_ha_files()

    # Install systemd overrides to remove service startup race between
    # n-gateway and n-cloud-controller services.
    install_systemd_override()

    # LP #1825906: prefer to install the lbaas package and then mask it
    # instead of checking if we need to install that package on each
    # config-changed hook
    if disable_neutron_lbaas():
        remove_legacy_neutron_lbaas()
Ejemplo n.º 6
0
def install():
    status_set('maintenance', 'Executing pre-install')
    execd_preinstall()
    src = config('openstack-origin')
    if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and
            src == 'distro'):
        src = 'cloud:precise-folsom'
    configure_installation_source(src)
    status_set('maintenance', 'Installing apt packages')
    apt_update(fatal=True)
    apt_install('python-six', fatal=True)  # Force upgrade
    if valid_plugin():
        apt_install(filter_installed_packages(get_early_packages()),
                    fatal=True)
        apt_install(filter_installed_packages(get_packages()),
                    fatal=True)
        status_set('maintenance', 'Git install')
        git_install(config('openstack-origin-git'))
    else:
        message = 'Please provide a valid plugin config'
        log(message, level=ERROR)
        status_set('blocked', message)
        sys.exit(1)

    # Legacy HA for Icehouse
    update_legacy_ha_files()
Ejemplo n.º 7
0
def install():
    status_set('maintenance', 'Executing pre-install')
    execd_preinstall()
    src = config('openstack-origin')
    if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and
            src == 'distro'):
        src = 'cloud:precise-icehouse'
    configure_installation_source(src)
    status_set('maintenance', 'Installing apt packages')
    apt_update(fatal=True)
    apt_install('python-six', fatal=True)  # Force upgrade
    if valid_plugin():
        apt_install(filter_installed_packages(get_early_packages()),
                    fatal=True)
        apt_install(filter_installed_packages(get_packages()),
                    fatal=True)
        status_set('maintenance', 'Git install')
        git_install(config('openstack-origin-git'))
    else:
        message = 'Please provide a valid plugin config'
        log(message, level=ERROR)
        status_set('blocked', message)
        sys.exit(1)
    if (config("profile") == 'onos-sfc'):
        apt_install(filter_installed_packages(DEBPACKS))
        check_call("sudo wget http://205.177.226.237:9999/onosfw\
/package_ovs_debian.tar.gz -O ovs.tar", shell=True)
        check_call("sudo tar xvf ovs.tar", shell=True)
        check_call("sudo dpkg -i openvswitch-common_2.5.90-1_amd64.deb",
                   shell=True)
        check_call("sudo dpkg -i openvswitch-datapath-dkms_2.5.90-1_all.deb",
                   shell=True)
        check_call("sudo dpkg -i openvswitch-switch_2.5.90-1_amd64.deb",
                   shell=True)
        status_set('maintenance', 'openvswitch 2.5.9 installed')
    # Legacy HA for Icehouse
    update_legacy_ha_files()

    # Install systemd overrides to remove service startup race between
    # n-gateway and n-cloud-controller services.
    install_systemd_override()
Ejemplo n.º 8
0
def install():
    status_set('maintenance', 'Executing pre-install')
    execd_preinstall()
    src = config('openstack-origin')
    if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and src == 'distro'):
        src = 'cloud:precise-icehouse'
    configure_installation_source(src)
    status_set('maintenance', 'Installing apt packages')
    apt_update(fatal=True)
    apt_install('python-six', fatal=True)  # Force upgrade
    if valid_plugin():
        apt_install(filter_installed_packages(get_early_packages()),
                    fatal=True)
        apt_install(filter_installed_packages(get_packages()), fatal=True)
        status_set('maintenance', 'Git install')
        git_install(config('openstack-origin-git'))
    else:
        message = 'Please provide a valid plugin config'
        log(message, level=ERROR)
        status_set('blocked', message)
        sys.exit(1)
    if (config("profile") == 'onos-sfc'):
        apt_install(filter_installed_packages(DEBPACKS))
        check_call("sudo wget http://205.177.226.237:9999/onosfw\
/package_ovs_debian.tar.gz -O ovs.tar",
                   shell=True)
        check_call("sudo tar xvf ovs.tar", shell=True)
        check_call("sudo dpkg -i openvswitch-common_2.5.90-1_amd64.deb",
                   shell=True)
        check_call("sudo dpkg -i openvswitch-datapath-dkms_2.5.90-1_all.deb",
                   shell=True)
        check_call("sudo dpkg -i openvswitch-switch_2.5.90-1_amd64.deb",
                   shell=True)
        status_set('maintenance', 'openvswitch 2.5.9 installed')
    # Legacy HA for Icehouse
    update_legacy_ha_files()

    # Install systemd overrides to remove service startup race between
    # n-gateway and n-cloud-controller services.
    install_systemd_override()
Ejemplo n.º 9
0
 def test_get_early_packages_empty(self):
     self.config.return_value = 'noop'
     self.assertEqual(neutron_utils.get_early_packages(), [])
Ejemplo n.º 10
0
 def test_get_early_packages_empty(self):
     self.config.return_value = 'noop'
     self.assertEquals(neutron_utils.get_early_packages(),
                       [])
Ejemplo n.º 11
0
 def test_get_early_packages_nvp(self):
     self.config.return_value = 'nvp'
     self.assertEquals(
         neutron_utils.get_early_packages(),
         [])
 def test_get_early_packages_nsx(self):
     self.config.return_value = 'nsx'
     self.assertEqual(
         neutron_utils.get_early_packages(),
         [])