Beispiel #1
0
 def __init__(self):
     super(A10ProviderDriver, self).__init__()
     topic = cfg.CONF.oslo_messaging.topic
     self.transport = messaging.get_rpc_transport(cfg.CONF)
     self.target = messaging.Target(
         namespace=consts.RPC_NAMESPACE_CONTROLLER_AGENT,
         topic=topic,
         version="1.0",
         fanout=False)
     self.client = messaging.RPCClient(self.transport, target=self.target)
     self.repositories = repositories.Repositories()
     self._octavia_driver_db = driver_lib.DriverLibrary()
Beispiel #2
0
 def setUp(self, mock_get_session, mock_lb_repo, mock_list_repo,
           mock_pool_repo, mock_member_repo, mock_health_repo,
           mock_l7p_repo, mock_l7r_repo):
     super(TestDriverLib, self).setUp()
     self.mock_session = "FAKE_DB_SESSION"
     mock_get_session.return_value = self.mock_session
     lb_mock = mock.MagicMock()
     mock_lb_repo.return_value = lb_mock
     self.mock_lb_repo = lb_mock
     list_mock = mock.MagicMock()
     mock_list_repo.return_value = list_mock
     self.mock_list_repo = list_mock
     pool_mock = mock.MagicMock()
     mock_pool_repo.return_value = pool_mock
     self.mock_pool_repo = pool_mock
     member_mock = mock.MagicMock()
     mock_member_repo.return_value = member_mock
     self.mock_member_repo = member_mock
     health_mock = mock.MagicMock()
     mock_health_repo.return_value = health_mock
     self.mock_health_repo = health_mock
     l7p_mock = mock.MagicMock()
     mock_l7p_repo.return_value = l7p_mock
     self.mock_l7p_repo = l7p_mock
     l7r_mock = mock.MagicMock()
     mock_l7r_repo.return_value = l7r_mock
     self.mock_l7r_repo = l7r_mock
     self.driver_lib = driver_lib.DriverLibrary()
     listener_stats_list = [{
         "id": 1,
         "active_connections": 10,
         "bytes_in": 20,
         "bytes_out": 30,
         "request_errors": 40,
         "total_connections": 50
     }, {
         "id": 2,
         "active_connections": 60,
         "bytes_in": 70,
         "bytes_out": 80,
         "request_errors": 90,
         "total_connections": 100
     }]
     self.listener_stats_dict = {"listeners": listener_stats_list}
Beispiel #3
0
    def __init__(self):
        self._lb_repo = repo.LoadBalancerRepository()
        self._listener_repo = repo.ListenerRepository()
        self._pool_repo = repo.PoolRepository()
        self._member_repo = repo.MemberRepository()
        self._health_mon_repo = repo.HealthMonitorRepository()
        self._l7policy_repo = repo.L7PolicyRepository()
        self._l7rule_repo = repo.L7RuleRepository()
        self._octavia_driver_db = driver_lib.DriverLibrary()
        self._lb_flows = a10_load_balancer_flows.LoadBalancerFlows()
        self._listener_flows = a10_listener_flows.ListenerFlows()
        self._pool_flows = a10_pool_flows.PoolFlows()
        self._member_flows = a10_member_flows.MemberFlows()
        self._health_monitor_flows = a10_health_monitor_flows.HealthMonitorFlows(
        )
        self._l7policy_flows = a10_l7policy_flows.L7PolicyFlows()
        self._l7rule_flows = a10_l7rule_flows.L7RuleFlows()
        self._vthunder_repo = a10repo.VThunderRepository()

        self._exclude_result_logging_tasks = ()
        super(A10ControllerWorker, self).__init__()
Beispiel #4
0
 def test_driver_lib_exists(self, mock_ready):
     driver_lib_class = driver_lib.DriverLibrary()
     self.assertIsInstance(driver_lib_class, lib_driver_lib.DriverLibrary)
 def __init__(self):
     self.c = acos_client.Client('138.197.107.20', acos_client.AXAPI_21,
                                 'admin', 'a10')
     self._lb_repo = repo.LoadBalancerRepository()
     self._octavia_driver_db = driver_lib.DriverLibrary()
Beispiel #6
0
 def __init__(self, status):
     self.status = status
     self._octavia_driver_db = driver_lib.DriverLibrary()
     thread = threading.Thread(target=self.updateStatus, args=())
     thread.daemon = True
     thread.start()