def __init__(self, conf, driver, l2_service=None):
     self.conf = conf
     self.driver = driver
     self.l2_service = l2_service
     self.service_adapter = driver.service_adapter
     self.listener_builder = listener_service.ListenerServiceBuilder(
         self.service_adapter, driver.cert_manager,
         conf.f5_parent_ssl_profile)
     self.pool_builder = pool_service.PoolServiceBuilder(
         self.service_adapter)
     self.l7service = l7policy_service.L7PolicyService(conf)
Example #2
0
    def __init__(self, conf, driver, l2_service=None):
        self.conf = conf
        self.driver = driver
        self.l2_service = l2_service
        self.service_adapter = driver.service_adapter
        self.listener_builder = listener_service.ListenerServiceBuilder(
            self.service_adapter, driver.cert_manager,
            conf.f5_parent_ssl_profile)
        self.pool_builder = pool_service.PoolServiceBuilder(
            self.service_adapter)
        self.l7service = l7policy_service.L7PolicyService(conf)
        self.esd = None

        # pzhang LBaaSBuilder is not a singleton, no race condition
        self.to_sync = False
    def target(self, mock_logger):

        service_adapter = Mock()
        resource_bigip = Mock()
        resource_type = Mock()
        self.freeze_resource_bigip = \
            f5_openstack_agent.lbaasv2.drivers.bigip.resource_helper.\
            BigIPResourceHelper
        self.freeze_resource_type = \
            f5_openstack_agent.lbaasv2.drivers.bigip.resource_helper.\
            ResourceType
        f5_openstack_agent.lbaasv2.drivers.bigip.resource_helper.\
            BigIPResourceHelper = resource_bigip
        f5_openstack_agent.lbaasv2.drivers.bigip.resource_helper.\
            ResourceType = resource_type
        self.resource_bigip = resource_bigip
        self.resource_type = resource_type
        self.logger = mock_logger

        target = pool_service.PoolServiceBuilder(service_adapter)

        return target