def test_local_cert_manager(self): cfg.CONF.set_override( 'cert_manager_type', 'local', group='certificates') self.assertEqual(cert_manager.get_backend().CertManager, lcm.CertManager)
def test_barbican_cert_manager(self): cfg.CONF.set_override( 'cert_manager_type', 'barbican', group='certificates') self.assertEqual(get_backend().CertManager, bcm.CertManager)
def _get_default_cert(self, listener): if listener.default_tls_container_id: cert_backend = cert_manager.get_backend() if cert_backend: return cert_backend.CertManager().get_cert( project_id=listener.tenant_id, cert_ref=listener.default_tls_container_id, resource_ref=cert_backend.CertManager.get_service_url( listener.loadbalancer_id))
def _get_default_cert(self, listener): if listener.default_tls_container_id: cert_backend = cert_manager.get_backend() if cert_backend: return cert_backend.CertManager().get_cert( project_id=listener.tenant_id, cert_ref=listener.default_tls_container_id, resource_ref=cert_backend.CertManager.get_service_url(listener.loadbalancer_id), )
def cert_get(self, project_id, cert_ref): prov = 'Neutron LBaaS v2 Avi provider' CERT_MANAGER_PLUGIN = ncm.get_backend() cert_manager = CERT_MANAGER_PLUGIN.CertManager() os_cert = cert_manager.get_cert( project_id=project_id, cert_ref=cert_ref, resource_ref=None, # required arg for mitaka+ check_only=True, service_name=prov) return os_cert
def __init__(self, conf, sc): super(Lbv2Agent, self).__init__() self._conf = conf self._sc = sc self._cert_manager_plugin = cert_manager.get_backend() self._db_inst = super(Lbv2Agent, self)
import os import jinja2 from neutron_lib.utils import file as file_utils from oslo_config import cfg import six from neutron_lib import constants as nl_constants from neutron_lbaas._i18n import _ from neutron_lbaas.common import cert_manager from neutron_lbaas.common.tls_utils import cert_parser from neutron_lbaas.services.loadbalancer import constants from neutron_lbaas.services.loadbalancer import data_models CERT_MANAGER_PLUGIN = cert_manager.get_backend() PROTOCOL_MAP = { constants.PROTOCOL_TCP: 'tcp', constants.PROTOCOL_HTTP: 'http', constants.PROTOCOL_HTTPS: 'tcp', constants.PROTOCOL_TERMINATED_HTTPS: 'http' } BALANCE_MAP = { constants.LB_METHOD_ROUND_ROBIN: 'roundrobin', constants.LB_METHOD_LEAST_CONNECTIONS: 'leastconn', constants.LB_METHOD_SOURCE_IP: 'source' } STATS_MAP = {