def __init__(self):
        self._loadbalancer_repo = f5_repos.LoadBalancerRepository()
        self._esd = esd_repo.EsdRepository()
        self._amphora_repo = repo.AmphoraRepository()
        self._health_mon_repo = repo.HealthMonitorRepository()
        self._lb_repo = repo.LoadBalancerRepository()
        self._listener_repo = repo.ListenerRepository()
        self._member_repo = repo.MemberRepository()
        self._pool_repo = f5_repos.PoolRepository()
        self._l7policy_repo = f5_repos.L7PolicyRepository()
        self._l7rule_repo = repo.L7RuleRepository()
        self._flavor_repo = repo.FlavorRepository()
        self._vip_repo = repo.VipRepository()
        self.bigip = BigipAS3RestClient(
            bigip_urls=CONF.f5_agent.bigip_urls,
            enable_verify=CONF.f5_agent.bigip_verify,
            enable_token=CONF.f5_agent.bigip_token,
            esd=self._esd)

        self.network_driver = driver_utils.get_network_driver()
        self.cert_manager = cert_manager.CertManagerWrapper()
        self.status = status.StatusManager(self.bigip)
        worker = periodics.PeriodicWorker([(self.pending_sync, None, None)])
        t = threading.Thread(target=worker.start)
        t.daemon = True
        t.start()

        if cfg.CONF.f5_agent.prometheus:
            prometheus_port = CONF.f5_agent.prometheus_port
            LOG.info('Starting Prometheus HTTP server on port {}'.format(
                prometheus_port))
            prometheus.start_http_server(prometheus_port)

        super(ControllerWorker, self).__init__()
 def __init__(self, **kwargs):
     self.repos = repo.Repositories()
     self.vthunder_repo = a10_repo.VThunderRepository()
     self.vrid_repo = a10_repo.VRIDRepository()
     self.amphora_repo = repo.AmphoraRepository()
     self.member_repo = a10_repo.MemberRepository()
     self.loadbalancer_repo = a10_repo.LoadBalancerRepository()
     self.vip_repo = repo.VipRepository()
     self.listener_repo = repo.ListenerRepository()
     super(BaseDatabaseTask, self).__init__(**kwargs)
Example #3
0
 def setUp(self):
     super(BaseRepositoryTest, self).setUp()
     self.pool_repo = repo.PoolRepository()
     self.member_repo = repo.MemberRepository()
     self.lb_repo = repo.LoadBalancerRepository()
     self.vip_repo = repo.VipRepository()
     self.listener_repo = repo.ListenerRepository()
     self.listener_stats_repo = repo.ListenerStatisticsRepository()
     self.sp_repo = repo.SessionPersistenceRepository()
     self.hm_repo = repo.HealthMonitorRepository()
     self.sni_repo = repo.SNIRepository()
     self.amphora_repo = repo.AmphoraRepository()
 def __init__(self, **kwargs):
     self.repos = repo.Repositories()
     self.vthunder_repo = a10_repo.VThunderRepository()
     self.vrid_repo = a10_repo.VRIDRepository()
     self.amphora_repo = repo.AmphoraRepository()
     self.member_repo = a10_repo.MemberRepository()
     self.loadbalancer_repo = a10_repo.LoadBalancerRepository()
     self.vip_repo = repo.VipRepository()
     self.listener_repo = repo.ListenerRepository()
     self.flavor_repo = repo.FlavorRepository()
     self.flavor_profile_repo = repo.FlavorProfileRepository()
     self.nat_pool_repo = a10_repo.NatPoolRepository()
     self.vrrp_set_repo = a10_repo.VrrpSetRepository()
     super(BaseDatabaseTask, self).__init__(**kwargs)
Example #5
0
    def __init__(self):
        self._repositories = repo.Repositories()
        self._loadbalancer_repo = f5_repos.LoadBalancerRepository()
        self._amphora_repo = repo.AmphoraRepository()
        self._health_mon_repo = repo.HealthMonitorRepository()
        self._listener_repo = f5_repos.ListenerRepository()
        self._member_repo = repo.MemberRepository()
        self._pool_repo = f5_repos.PoolRepository()
        self._l7policy_repo = f5_repos.L7PolicyRepository()
        self._l7rule_repo = repo.L7RuleRepository()
        self._vip_repo = repo.VipRepository()
        self._quota_repo = repo.QuotasRepository()

        self.status = status_manager.StatusManager()
        self.sync = sync_manager.SyncManager(self.status,
                                             self._loadbalancer_repo)
        self.network_driver = driver_utils.get_network_driver()
        self.queue = SetQueue()
        worker = periodics.PeriodicWorker([
            (self.pending_sync, None, None),
            (self.full_sync_reappearing_devices, None, None),
            (self.cleanup_orphaned_tenants, None, None)
        ])
        t = threading.Thread(target=worker.start)
        t.daemon = True
        t.start()

        LOG.info("Starting as3worker")
        as3worker = threading.Thread(target=self.as3worker)
        as3worker.setDaemon(True)
        as3worker.start()

        if cfg.CONF.f5_agent.prometheus:
            prometheus_port = CONF.f5_agent.prometheus_port
            LOG.info('Starting Prometheus HTTP server on port {}'.format(
                prometheus_port))
            prometheus.start_http_server(prometheus_port)

        super(ControllerWorker, self).__init__()