Ejemplo n.º 1
0
    def setUp(self):
        super(TestAmphoraAPIClientTest, self).setUp()
        self.driver = driver.AmphoraAPIClient()
        self.base_url = "https://127.0.0.1:9443/0.5"
        self.amp = models.Amphora(lb_network_ip='127.0.0.1', compute_id='123')
        self.port_info = dict(mac_address=FAKE_MAC_ADDRESS)
        # Override with much lower values for testing purposes..
        conf = oslo_fixture.Config(cfg.CONF)
        conf.config(group="haproxy_amphora", connection_max_retries=2)

        self.subnet_info = {'subnet_cidr': FAKE_CIDR,
                            'gateway': FAKE_GATEWAY,
                            'mac_address': FAKE_MAC_ADDRESS,
                            'vrrp_ip': self.amp.vrrp_ip}
        patcher = mock.patch('time.sleep').start()
        self.addCleanup(patcher.stop)
Ejemplo n.º 2
0
 def setUp(self):
     super(AmphoraAPIClientTest, self).setUp()
     self.driver = driver.AmphoraAPIClient()
     self.base_url = "https://127.0.0.1:9443/0.5"
     self.amp = models.Amphora(lb_network_ip='127.0.0.1', compute_id='123')
     self.port_info = dict(mac_address='123')