Ejemplo n.º 1
0
 def testConstructVXLAN(self):
     self.mox.StubOutWithMock(ovs_lib, 'get_installed_ovs_klm_version')
     ovs_lib.get_installed_ovs_klm_version().AndReturn("1.10")
     self.mox.StubOutWithMock(ovs_lib, 'get_installed_ovs_usr_version')
     ovs_lib.get_installed_ovs_usr_version('sudo').AndReturn("1.10")
     self.mox.ReplayAll()
     ovs_quantum_agent.OVSQuantumAgent(self.INT_BRIDGE, self.TUN_BRIDGE,
                                       '10.0.0.1', self.NET_MAPPING, 'sudo',
                                       2, 'vxlan')
     self.mox.VerifyAll()
Ejemplo n.º 2
0
 def testConstructVXLAN(self):
     self.mox.StubOutWithMock(ovs_lib, "get_installed_ovs_klm_version")
     ovs_lib.get_installed_ovs_klm_version().AndReturn("1.10")
     self.mox.StubOutWithMock(ovs_lib, "get_installed_ovs_usr_version")
     ovs_lib.get_installed_ovs_usr_version("sudo").AndReturn("1.10")
     self.mox.ReplayAll()
     ovs_quantum_agent.OVSQuantumAgent(
         self.INT_BRIDGE, self.TUN_BRIDGE, "10.0.0.1", self.NET_MAPPING, "sudo", 2, "vxlan"
     )
     self.mox.VerifyAll()
Ejemplo n.º 3
0
def check_ovs_version(min_required_version, root_helper):
    LOG.debug(_("Checking OVS version for VXLAN support"))
    installed_klm_version = ovs_lib.get_installed_ovs_klm_version()
    installed_usr_version = ovs_lib.get_installed_ovs_usr_version(root_helper)
    # First check the userspace version
    if installed_usr_version:
        if dist_version.StrictVersion(
                installed_usr_version) < dist_version.StrictVersion(
                    min_required_version):
            LOG.error(
                _('Failed userspace version check for Open '
                  'vSwitch with VXLAN support. To use '
                  'VXLAN tunnels with OVS, please ensure '
                  'the OVS version is %s '
                  'or newer!'), min_required_version)
            sys.exit(1)
        # Now check the kernel version
        if installed_klm_version:
            if dist_version.StrictVersion(
                    installed_klm_version) < dist_version.StrictVersion(
                        min_required_version):
                LOG.error(
                    _('Failed kernel version check for Open '
                      'vSwitch with VXLAN support. To use '
                      'VXLAN tunnels with OVS, please ensure '
                      'the OVS version is %s or newer!'), min_required_version)
                sys.exti(1)
            else:
                LOG.warning(
                    _('Cannot determine kernel Open vSwitch version, '
                      'please ensure your Open vSwitch kernel module '
                      'is at least version %s to support VXLAN '
                      'tunnels.'), min_required_version)
    else:
        LOG.warning(
            _('Unable to determine Open vSwitch version. Please '
              'ensure that its version is %s or newer to use VXLAN '
              'tunnels with OVS.'), min_required_version)
        sys.exit(1)
Ejemplo n.º 4
0
def check_ovs_version(min_required_version, root_helper):
    LOG.debug(_("Checking OVS version for VXLAN support"))
    installed_klm_version = ovs_lib.get_installed_ovs_klm_version()
    installed_usr_version = ovs_lib.get_installed_ovs_usr_version(root_helper)
    # First check the userspace version
    if installed_usr_version:
        if dist_version.StrictVersion(
                installed_usr_version) < dist_version.StrictVersion(
                min_required_version):
            LOG.error(_('Failed userspace version check for Open '
                        'vSwitch with VXLAN support. To use '
                        'VXLAN tunnels with OVS, please ensure '
                        'the OVS version is %s '
                        'or newer!'), min_required_version)
            sys.exit(1)
        # Now check the kernel version
        if installed_klm_version:
            if dist_version.StrictVersion(
                    installed_klm_version) < dist_version.StrictVersion(
                    min_required_version):
                LOG.error(_('Failed kernel version check for Open '
                            'vSwitch with VXLAN support. To use '
                            'VXLAN tunnels with OVS, please ensure '
                            'the OVS version is %s or newer!'),
                          min_required_version)
                sys.exti(1)
            else:
                LOG.warning(_('Cannot determine kernel Open vSwitch version, '
                              'please ensure your Open vSwitch kernel module '
                              'is at least version %s to support VXLAN '
                              'tunnels.'), min_required_version)
    else:
        LOG.warning(_('Unable to determine Open vSwitch version. Please '
                      'ensure that its version is %s or newer to use VXLAN '
                      'tunnels with OVS.'), min_required_version)
        sys.exit(1)