示例#1
0
 def __init__(self):
     super(AmphoraProviderDriver, self).__init__()
     self.target = messaging.Target(
         namespace=consts.RPC_NAMESPACE_CONTROLLER_AGENT,
         topic=consts.TOPIC_AMPHORA_V2, version="2.0", fanout=False)
     self.client = rpc.get_client(self.target)
     self.repositories = repositories.Repositories()
示例#2
0
 def __init__(self):
     super().__init__()
     topic = cfg.CONF.oslo_messaging.topic
     self.target = messaging.Target(
         namespace=constants.RPC_NAMESPACE_CONTROLLER_AGENT,
         topic=topic, version="1.0", fanout=False)
     self.client = rpc.get_client(self.target)
示例#3
0
    def __init__(self):
        LOG.info('Health Manager starting.')
        self.seq = 0
        self.amp_repo = repo.AmphoraRepository()
        self.listener_repo = repo.ListenerRepository()
        self.amp_health_repo = repo.AmphoraHealthRepository()
        self.lb_repo = repo.LoadBalancerRepository()
        self.health_executor = futurist.ThreadPoolExecutor(
            max_workers=CONF.health_manager.health_update_threads)
        self.stats_executor = futurist.ThreadPoolExecutor(
            max_workers=CONF.health_manager.stats_update_threads)
        self.bigips = [bigip for bigip in self.initialize_bigips()]
        # Cache reachability of every bigip
        self.bigip_status = {bigip.hostname: False for bigip in self.bigips}
        self._active_bigip = None
        self._last_failover_check = 0
        self._last_cleanup_check = 0

        # Create RPC Client
        topic = cfg.CONF.oslo_messaging.topic
        self.target = messaging.Target(
            namespace=o_const.RPC_NAMESPACE_CONTROLLER_AGENT,
            topic=topic,
            version="1.0",
            fanout=False)
        self.client = rpc.get_client(self.target)

        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)
示例#4
0
 def __init__(self):
     super(AmphoraProviderDriver, self).__init__()
     topic = cfg.CONF.oslo_messaging.topic
     self.target = messaging.Target(
         namespace=consts.RPC_NAMESPACE_CONTROLLER_AGENT,
         topic=topic, version="1.0", fanout=False)
     self.client = rpc.get_client(self.target)
     self.repositories = repositories.Repositories()
示例#5
0
 def __init__(self, amp_id):
     super(FailoverController, self).__init__()
     topic = cfg.CONF.oslo_messaging.topic
     self.target = messaging.Target(
         namespace=constants.RPC_NAMESPACE_CONTROLLER_AGENT,
         topic=topic, version="1.0", fanout=False)
     self.client = rpc.get_client(self.target)
     self.amp_id = amp_id
示例#6
0
 def __init__(self):
     super(A10ProviderDriver, self).__init__()
     self.target = messaging.Target(
         namespace=constants.RPC_NAMESPACE_CONTROLLER_AGENT,
         topic='a10_octavia',
         version='1.0',
         fanout=False)
     self.client = rpc.get_client(self.target)
     self.repositories = repositories.Repositories()
示例#7
0
文件: driver.py 项目: ycx516/octavia
 def __init__(self):
     super().__init__()
     self.target = messaging.Target(
         namespace=consts.RPC_NAMESPACE_CONTROLLER_AGENT,
         topic=consts.TOPIC_AMPHORA_V2, version="2.0", fanout=False)
     self.client = rpc.get_client(self.target)
     self.repositories = repositories.Repositories()
     key = utils.get_compatible_server_certs_key_passphrase()
     self.fernet = fernet.Fernet(key)
示例#8
0
 def __init__(self):
     super(AmphoraProviderDriver, self).__init__()
     topic = cfg.CONF.oslo_messaging.topic
     self.target = messaging.Target(
         namespace=consts.RPC_NAMESPACE_CONTROLLER_AGENT,
         topic=topic,
         version="1.0",
         fanout=False)
     self.client = rpc.get_client(self.target)
     self.repositories = repositories.Repositories()
示例#9
0
 def __init__(self, amp_id):
     super().__init__()
     if CONF.api_settings.default_provider_driver == constants.AMPHORAV2:
         topic = constants.TOPIC_AMPHORA_V2
         version = "2.0"
     else:
         topic = cfg.CONF.oslo_messaging.topic
         version = "1.0"
     self.target = messaging.Target(
         namespace=constants.RPC_NAMESPACE_CONTROLLER_AGENT,
         topic=topic, version=version, fanout=False)
     self.client = rpc.get_client(self.target)
     self.amp_id = amp_id