Beispiel #1
0
 def _check_persistence(self):
     try:
         pers_driver = tsk_driver.MysqlPersistenceDriver()
         with pers_driver.get_persistence() as pers:
             if pers.engine.dialect.name == 'sqlite':
                 return upgradecheck.Result(
                     upgradecheck.Code.WARNING,
                     _('Persistence database is using sqlite backend. '
                       'Verification required if persistence_connecton URL '
                       'has been set properly.'))
             return pers
     except Exception:
         return upgradecheck.Result(upgradecheck.Code.FAILURE,
                                    _('Failed to connect to persistence '
                                      'backend for AmphoraV2 provider.'))
Beispiel #2
0
    def __init__(self):

        self._amphora_repo = repo.AmphoraRepository()
        self._amphora_health_repo = repo.AmphoraHealthRepository()
        self._health_mon_repo = repo.HealthMonitorRepository()
        self._lb_repo = repo.LoadBalancerRepository()
        self._listener_repo = repo.ListenerRepository()
        self._member_repo = repo.MemberRepository()
        self._pool_repo = repo.PoolRepository()
        self._l7policy_repo = repo.L7PolicyRepository()
        self._l7rule_repo = repo.L7RuleRepository()
        self._flavor_repo = repo.FlavorRepository()
        self._az_repo = repo.AvailabilityZoneRepository()

        persistence = tsk_driver.MysqlPersistenceDriver()

        self.jobboard_driver = stevedore_driver.DriverManager(
            namespace='octavia.worker.jobboard_driver',
            name=CONF.task_flow.jobboard_backend_driver,
            invoke_args=(persistence, ),
            invoke_on_load=True).driver