def test_dump_bonding_name2numeric(self): BOND_MODE = '0' OPT_NAME = 'arp_validate' VAL_NAME = 'none' VAL_NUMERIC = '0' try: opt_map = sysfs_options_mapper._get_bonding_options_name2numeric() except IOError as e: if e.errno == errno.EBUSY: raise SkipTest('Bond option mapping failed on EBUSY, ' 'Kernel version: %s' % os.uname()[2]) raise self.assertIn(BOND_MODE, opt_map) self.assertIn(OPT_NAME, opt_map[BOND_MODE]) self.assertIn(VAL_NAME, opt_map[BOND_MODE][OPT_NAME]) self.assertEqual(opt_map[BOND_MODE][OPT_NAME][VAL_NAME], VAL_NUMERIC)
def test_dump_bonding_name2numeric(self): BOND_MODE = '0' OPT_NAME = 'arp_validate' VAL_NAME = 'none' VAL_NUMERIC = '0' try: opt_map = sysfs_options_mapper._get_bonding_options_name2numeric() except IOError as e: if e.errno == errno.EBUSY: pytest.skip('Bond option mapping failed on EBUSY, ' 'Kernel version: %s' % os.uname()[2]) raise assert BOND_MODE in opt_map assert OPT_NAME in opt_map[BOND_MODE] assert VAL_NAME in opt_map[BOND_MODE][OPT_NAME] assert opt_map[BOND_MODE][OPT_NAME][VAL_NAME] == VAL_NUMERIC
def test_dump_bonding_name2numeric(self): BOND_MODE = '0' OPT_NAME = 'arp_validate' VAL_NAME = 'none' VAL_NUMERIC = '0' try: opt_map = sysfs_options_mapper._get_bonding_options_name2numeric() except IOError as e: if e.errno == errno.EBUSY: raise SkipTest('Bond option mapping failed on EBUSY, ' 'Kernel version: %s' % os.uname()[2]) raise self.assertIn(BOND_MODE, opt_map) self.assertIn(OPT_NAME, opt_map[BOND_MODE]) self.assertIn(VAL_NAME, opt_map[BOND_MODE][OPT_NAME]) self.assertEqual(opt_map[BOND_MODE][OPT_NAME][VAL_NAME], VAL_NUMERIC)