Ejemplo n.º 1
0
    def setUp(self):
        super(TestHaproxyNSDriver, self).setUp()

        conf = mock.Mock()
        conf.haproxy.loadbalancer_state_path = '/the/path'
        conf.interface_driver = 'intdriver'
        conf.haproxy.user_group = 'test_group'
        conf.haproxy.send_gratuitous_arp = 3
        self.conf = conf
        self.rpc_mock = mock.Mock()
        with mock.patch(
                'neutron.common.utils.load_class_by_alias_or_classname'):
            self.driver = namespace_driver.HaproxyNSDriver(conf, self.rpc_mock)
        self.vif_driver = mock.Mock()
        self.driver.vif_driver = self.vif_driver
        self._build_mock_data_models()
    def setUp(self):
        super(TestHaproxyNSDriver, self).setUp()

        conf = mock.Mock()
        conf.haproxy.loadbalancer_state_path = '/the/path'
        conf.interface_driver = 'intdriver'
        conf.haproxy.user_group = 'test_group'
        conf.haproxy.send_gratuitous_arp = 3
        self.conf = conf
        self.mock_importer = mock.patch.object(namespace_driver,
                                               'importutils').start()

        self.rpc_mock = mock.Mock()
        self.driver = namespace_driver.HaproxyNSDriver(conf, self.rpc_mock)
        self.vif_driver = mock.Mock()
        self.driver.vif_driver = self.vif_driver
        self._build_mock_data_models()
    def setUp(self):
        super(TestHaproxyNSDriver, self).setUp()

        conf = mock.Mock()
        conf.haproxy.loadbalancer_state_path = '/the/path'
        conf.interface_driver = 'intdriver'
        conf.haproxy.user_group = 'test_group'
        conf.haproxy.send_gratuitous_arp = 3
        self.conf = conf
        self.rpc_mock = mock.Mock()
        self.ensure_dir = mock.patch.object(fileutils, 'ensure_tree').start()
        self._process_monitor = mock.Mock()
        with mock.patch(
                'neutron_lib.utils.runtime.load_class_by_alias_or_classname'):
            self.driver = namespace_driver.HaproxyNSDriver(
                conf, self.rpc_mock, self._process_monitor)
        self.vif_driver = mock.Mock()
        self.driver.vif_driver = self.vif_driver
        self._build_mock_data_models()