Beispiel #1
0
 def setUp(self):
     super(BareMetalIbootPDUTestCase, self).setUp()
     self.node = bm_db_utils.new_bm_node(id=123,
                                         pm_address='192.168.1.254',
                                         pm_user='******',
                                         pm_password='******')
     self.pm = iboot_pdu.IBootManager(node=self.node)
Beispiel #2
0
    def test_construct_with_port_and_relay(self):
        self.node = bm_db_utils.new_bm_node(id=123,
                                            pm_address='192.168.1.254:1234,8',
                                            pm_user='******',
                                            pm_password='******')
        self.pm = iboot_pdu.IBootManager(node=self.node)

        self.assertEqual(self.pm.address, '192.168.1.254')
        self.assertEqual(self.pm.port, 1234)
        self.assertEqual(self.pm.relay_id, 8)
        self.assertEqual(self.pm.user, 'foo')
        self.assertEqual(self.pm.password, 'bar')