예제 #1
0
 def __init__(self):
     super(NsxDvsV2, self).__init__()
     LOG.debug('Driver support: DVS: %s' % dvs_utils.dvs_is_enabled())
     neutron_extensions.append_api_extensions_path(
         [vmware_nsx.NSX_EXT_PATH])
     self.cfg_group = 'dvs'  # group name for dvs section in nsx.ini
     self._dvs = dvs.SingleDvsManager()
     self.setup_dhcpmeta_access()
예제 #2
0
 def __init__(self):
     dvs_utils.dvs_register_exceptions()
     self._extension_manager = nsx_managers.ExtensionManager()
     super(NsxDvsV2, self).__init__()
     LOG.debug('Driver support: DVS: %s' % dvs_utils.dvs_is_enabled())
     self._extension_manager.initialize()
     self.supported_extension_aliases.extend(
         self._extension_manager.extension_aliases())
     neutron_extensions.append_api_extensions_path(
         [vmware_nsx.NSX_EXT_PATH])
     self.cfg_group = 'dvs'  # group name for dvs section in nsx.ini
     self._dvs = dvs.SingleDvsManager()
     self.setup_dhcpmeta_access()
예제 #3
0
def validate_nsxv_config_options():
    if (cfg.CONF.nsxv.manager_uri is None or cfg.CONF.nsxv.user is None
            or cfg.CONF.nsxv.password is None):
        error = _("manager_uri, user, and password must be configured!")
        raise nsx_exc.NsxPluginException(err_msg=error)
    if cfg.CONF.nsxv.dvs_id is None:
        LOG.warning(_LW("dvs_id must be configured to support VLANs!"))
    if cfg.CONF.nsxv.vdn_scope_id is None:
        LOG.warning(_LW("vdn_scope_id must be configured to support VXLANs!"))
    if cfg.CONF.nsxv.use_dvs_features and not dvs_utils.dvs_is_enabled():
        error = _("dvs host/vcenter credentials must be defined to use "
                  "dvs features")
        raise nsx_exc.NsxPluginException(err_msg=error)
예제 #4
0
def validate_nsxv_config_options():
    if (cfg.CONF.nsxv.manager_uri is None or
        cfg.CONF.nsxv.user is None or
        cfg.CONF.nsxv.password is None):
        error = _("manager_uri, user, and password must be configured!")
        raise nsx_exc.NsxPluginException(err_msg=error)
    if cfg.CONF.nsxv.dvs_id is None:
        LOG.warning(_LW("dvs_id must be configured to support VLANs!"))
    if cfg.CONF.nsxv.vdn_scope_id is None:
        LOG.warning(_LW("vdn_scope_id must be configured to support VXLANs!"))
    if cfg.CONF.nsxv.use_dvs_features and not dvs_utils.dvs_is_enabled():
        error = _("dvs host/vcenter credentials must be defined to use "
                  "dvs features")
        raise nsx_exc.NsxPluginException(err_msg=error)
예제 #5
0
    def __init__(self):
        super(NsxDvsV2, self).__init__()
        LOG.debug('Driver support: DVS: %s' % dvs_utils.dvs_is_enabled())
        neutron_extensions.append_api_extensions_path(
            [vmware_nsx.NSX_EXT_PATH])
        self.cfg_group = 'dvs'  # group name for dvs section in nsx.ini
        self._dvs = dvs.DvsManager()

        # Common driver code
        self.base_binding_dict = {
            pbin.VIF_TYPE: nsx_constants.VIF_TYPE_DVS,
            pbin.VIF_DETAILS: {
                # TODO(rkukura): Replace with new VIF security details
                pbin.CAP_PORT_FILTER:
                'security-group' in self.supported_extension_aliases}}

        self.setup_dhcpmeta_access()
예제 #6
0
    def __init__(self):
        super(NsxDvsV2, self).__init__()
        LOG.debug('Driver support: DVS: %s' % dvs_utils.dvs_is_enabled())
        neutron_extensions.append_api_extensions_path(
            [vmware_nsx.NSX_EXT_PATH])
        self.cfg_group = 'dvs'  # group name for dvs section in nsx.ini
        self._dvs = dvs.DvsManager()

        # Common driver code
        self.base_binding_dict = {
            pbin.VIF_TYPE: nsx_constants.VIF_TYPE_DVS,
            pbin.VIF_DETAILS: {
                # TODO(rkukura): Replace with new VIF security details
                pbin.CAP_PORT_FILTER:
                'security-group' in self.supported_extension_aliases}}

        self.setup_dhcpmeta_access()
예제 #7
0
 def __init__(self):
     self._is_sub_plugin = tvd_utils.is_tvd_core_plugin()
     dvs_utils.dvs_register_exceptions()
     super(NsxDvsV2, self).__init__()
     if self._is_sub_plugin:
         extension_drivers = cfg.CONF.nsx_tvd.dvs_extension_drivers
     else:
         extension_drivers = cfg.CONF.nsx_extension_drivers
     self._extension_manager = nsx_managers.ExtensionManager(
          extension_drivers=extension_drivers)
     LOG.debug('Driver support: DVS: %s' % dvs_utils.dvs_is_enabled())
     self._extension_manager.initialize()
     self.supported_extension_aliases.extend(
         self._extension_manager.extension_aliases())
     neutron_extensions.append_api_extensions_path(
         [vmware_nsx.NSX_EXT_PATH])
     self.cfg_group = 'dvs'  # group name for dvs section in nsx.ini
     self._dvs = dvs.SingleDvsManager()
     self.setup_dhcpmeta_access()
예제 #8
0
 def test_dvs_set(self):
     self._dvs_fake_cfg_set()
     self.assertTrue(dvs_utils.dvs_is_enabled())
예제 #9
0
 def test_default_configuration(self):
     self.assertFalse(dvs_utils.dvs_is_enabled())
예제 #10
0
 def test_dvs_set(self):
     self._dvs_fake_cfg_set()
     self.assertTrue(dvs_utils.dvs_is_enabled())
예제 #11
0
 def test_default_configuration(self):
     self.assertFalse(dvs_utils.dvs_is_enabled())