Пример #1
0
 def test_get_node_id_valid_duplicate(self):
     node = self._get_node()
     handler = nodes.find_driver_handler('pxe_ipmitool')
     node_map = {'mac': {'aaa': 'id'},
                 'pm_addr': {'foo.bar': 'id'}}
     self.assertEqual('id', nodes._get_node_id(node, handler, node_map))
Пример #2
0
 def test_get_node_id_valid_duplicate(self):
     node = self._get_node()
     handler = nodes._find_driver_handler('pxe_ipmitool')
     node_map = {'mac': {'aaa': 'id'}, 'pm_addr': {'foo.bar': 'id'}}
     self.assertEqual('id', nodes._get_node_id(node, handler, node_map))
Пример #3
0
 def test__get_node_id_fake_pxe(self):
     node = self._get_node()
     node['pm_type'] = 'fake_pxe'
     handler = nodes.find_driver_handler('fake_pxe')
     node_map = {'mac': {'aaa': 'abcdef'}, 'pm_addr': {}}
     self.assertEqual('abcdef', nodes._get_node_id(node, handler, node_map))
Пример #4
0
 def test__get_node_id_fake_pxe(self):
     node = self._get_node()
     node['pm_type'] = 'fake_pxe'
     handler = nodes._find_driver_handler('fake_pxe')
     node_map = {'mac': {'aaa': 'abcdef'}, 'pm_addr': {}}
     self.assertEqual('abcdef', nodes._get_node_id(node, handler, node_map))