def test_get_power_manager(self): n1 = bmdb_utils.new_bm_node( pm_address='10.1.1.1', id='1') pm1 = tilera_pdu.Pdu(n1) self.assertEqual(pm1._address, '10.1.1.1') self.assertEqual(pm1._node_id, '1') n2 = bmdb_utils.new_bm_node( pm_address='10.2.2.2', id='2') pm2 = tilera_pdu.Pdu(n2) self.assertEqual(pm2._address, '10.2.2.2') self.assertEqual(pm2._node_id, '2')
def setUp(self): super(BareMetalPduTestCase, self).setUp() self.node = bm_db_utils.new_bm_node( id=123, pm_address='fake-address', pm_user='******', pm_password='******') self.tilera_pdu = tilera_pdu.Pdu(self.node) self.tile_pdu_on = 1 self.tile_pdu_off = 2 self.tile_pdu_status = 9