vnc_opts = [
    cfg.StrOpt('api_server_ip',
               default='127.0.0.1',
               help='IP address to connect to VNC controller'),
    cfg.StrOpt('api_server_port',
               default='8082',
               help='Port to connect to VNC controller'),
    cfg.DictOpt('contrail_extensions',
                default={
                    'contrail': None,
                    'service-interface': None,
                    'vf-binding': None
                },
                help='Enable Contrail extensions(policy, ipam)'),
    cfg.BoolOpt('use_ssl',
                default=False,
                help='Use SSL to connect with VNC controller'),
    cfg.BoolOpt('insecure',
                default=False,
                help='Insecurely connect to VNC controller'),
    cfg.StrOpt('certfile',
               default='',
               help='certfile to connect securely to VNC controller'),
    cfg.StrOpt('keyfile',
               default='',
               help='keyfile to connect securely to  VNC controller'),
    cfg.StrOpt('cafile',
               default='',
               help='cafile to connect securely to VNC controller'),
]
Esempio n. 2
0
from vnc_client import ipam_res_handler as ipam_handler
from vnc_client import policy_res_handler as policy_handler
from vnc_client import route_table_res_handler as route_table_handler
from vnc_client import router_res_handler as rtr_handler
from vnc_client import sg_res_handler as sg_handler
from vnc_client import sgrule_res_handler as sgrule_handler
from vnc_client import subnet_res_handler as subnet_handler
from vnc_client import svc_instance_res_handler as svc_instance_handler
from vnc_client import virtual_router_res_handler as vrouter_handler
from vnc_client import vmi_res_handler as vmi_handler
from vnc_client import vn_res_handler as vn_handler

LOG = logging.getLogger(__name__)

vnc_extra_opts = [
    cfg.BoolOpt('apply_subnet_host_routes', default=False),
    cfg.BoolOpt('multi_tenancy', default=False)
]


class NeutronPluginContrailCoreV3(plugin_base.NeutronPluginContrailCoreBase):

    PLUGIN_URL_PREFIX = '/neutron'

    def __init__(self):
        super(NeutronPluginContrailCoreV3, self).__init__()
        cfg.CONF.register_opts(vnc_extra_opts, 'APISERVER')
        self._vnc_lib = None
        self.connected = self._connect_to_vnc_server()
        self._res_handlers = {}
        self._prepare_res_handlers()