def _check_ovs_vxlan_version(self, installed_usr_version, installed_klm_version, min_vers, expecting_ok):
     with mock.patch("neutron.agent.linux.ovs_lib.get_installed_ovs_klm_version") as klm_cmd:
         with mock.patch("neutron.agent.linux.ovs_lib.get_installed_ovs_usr_version") as usr_cmd:
             try:
                 klm_cmd.return_value = installed_klm_version
                 usr_cmd.return_value = installed_usr_version
                 self.agent.tunnel_types = "vxlan"
                 ovs_neutron_agent.check_ovs_version(min_vers, root_helper="sudo")
                 version_ok = True
             except SystemExit as e:
                 self.assertEqual(e.code, 1)
                 version_ok = False
         self.assertEqual(version_ok, expecting_ok)
 def _check_ovs_vxlan_version(self, installed_usr_version,
                              installed_klm_version, min_vers,
                              expecting_ok):
     with mock.patch(
             'neutron.agent.linux.ovs_lib.get_installed_ovs_klm_version'
     ) as klm_cmd:
         with mock.patch(
             'neutron.agent.linux.ovs_lib.get_installed_ovs_usr_version'
         ) as usr_cmd:
             try:
                 klm_cmd.return_value = installed_klm_version
                 usr_cmd.return_value = installed_usr_version
                 self.agent.tunnel_types = 'vxlan'
                 ovs_neutron_agent.check_ovs_version(min_vers,
                                                     root_helper='sudo')
                 version_ok = True
             except SystemExit as e:
                 self.assertEqual(e.code, 1)
                 version_ok = False
         self.assertEqual(version_ok, expecting_ok)