from simplejson import JSONDecodeError from eventlet.greenthread import getcurrent from contrail_plugin_base import HttpResponseError import contrail_plugin_base as plugin_base from cfgm_common import utils as cfgmutils _DEFAULT_KS_CERT_BUNDLE="/tmp/keystonecertbundle.pem" _DEFAULT_API_CERT_BUNDLE="/tmp/apiservercertbundle.pem" _DEFAULT_SERVER_CONNECT="http" _DEFAULT_SECURE_SERVER_CONNECT="https" LOG = logging.getLogger(__name__) 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={}, help='Enable Contrail extensions(policy, ipam)'), ] analytics_opts = [ cfg.StrOpt('analytics_api_ip', default='127.0.0.1', help='IP address to connect to VNC collector'), cfg.StrOpt('analytics_api_port', default='8081', help='Port to connect to VNC collector'), ] class InvalidContrailExtensionError(exc.ServiceUnavailable): message = _("Invalid Contrail Extension: %(ext_name) %(ext_class)")
try: from neutron.openstack.common import log as logging except ImportError: from oslo_log import log as logging # Constant for max length of network interface names # eg 'bridge' in the Network class or 'devname' in # the VIF class NIC_NAME_LEN = 14 LOG = logging.getLogger(__name__) 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',
except ImportError: from oslo_serialization import jsonutils as json try: from neutron.openstack.common import log as logging except ImportError: from oslo_log import log as logging from simplejson import JSONDecodeError from eventlet.greenthread import getcurrent LOG = logging.getLogger(__name__) 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={}, 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='',
from neutron.api.v2 import attributes from neutron.common.config import cfg from neutron.common import exceptions as q_exc from neutron.db import models_v2 as qmodels from neutron.db import l3_db from neutron import manager from neutron.plugins.common import constants IPV6_ASSIGNMENT_ATTEMPTS = 1000 LOG = logging.getLogger(__name__) akanda_opts = [ cfg.StrOpt('akanda_ipv6_tenant_range', default='fdd6:a1fa:cfa8::/48', help='IPv6 address prefix'), cfg.IntOpt('akanda_ipv6_prefix_length', default=64, help='Default length of prefix to pre-assign'), cfg.ListOpt( 'akanda_allowed_cidr_ranges', default=['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', 'fc00::/7'], help='List of allowed subnet cidrs for non-admin users') ] cfg.CONF.register_opts(akanda_opts) SUPPORTED_EXTENSIONS = [ 'dhrouterstatus', ]
sg_res_handler) from neutron_plugin_contrail.plugins.opencontrail.vnc_client import ( sgrule_res_handler as sgrule_handler) from neutron_plugin_contrail.plugins.opencontrail.vnc_client import ( subnet_res_handler) from neutron_plugin_contrail.plugins.opencontrail.vnc_client import ( vmi_res_handler) from neutron_plugin_contrail.plugins.opencontrail.vnc_client import ( vn_res_handler) from oslo_log import log # from oslo_config import ocfg group_contrail = cfg.OptGroup(name='ml2_driver_contrail', title='Contrail controller details') contrail_opts = [ cfg.StrOpt('controller', default='127.0.0.1'), cfg.IntOpt('port', default=8082) ] cfg.CONF.register_group(group_contrail) cfg.CONF.register_opts(contrail_opts, group_contrail) vnc_extra_opts = [ cfg.BoolOpt('apply_subnet_host_routes', default=False), cfg.BoolOpt('multi_tenancy', default=False) ] logger = log.getLogger(__name__) def dump(obj):