diff --git a/devstack/ml2-ovs-local.conf.sample b/devstack/ml2-ovs-local.conf.sample index 05256d2beb8..51344bb92d0 100644 --- a/devstack/ml2-ovs-local.conf.sample +++ b/devstack/ml2-ovs-local.conf.sample @@ -66,7 +66,7 @@ verbose = True [[post-config|/$Q_PLUGIN_CONF_FILE]] [ml2] type_drivers=flat,gre,vlan,vxlan -tenant_network_types=vxlan +project_network_types=vxlan mechanism_drivers=openvswitch,l2population [agent] @@ -74,7 +74,7 @@ tunnel_types=vxlan,gre # You can add more config options here for ml2_conf.ini, for instance # you can uncomment the followings to set the segment ID ranges for -# various tenant network types. +# various project network types. #[ml2_type_vxlan] #vni_ranges=1:10000 @@ -86,4 +86,4 @@ tunnel_types=vxlan,gre #tunnel_id_ranges = 1:10000 #[ml2_type_vlan] -#network_vlan_ranges = tenant:1:1000 +#network_vlan_ranges = project:1:1000 diff --git a/doc/source/admin/config-dvr-ha-snat.rst b/doc/source/admin/config-dvr-ha-snat.rst index c0a17e73faf..85c4e414b04 100644 --- a/doc/source/admin/config-dvr-ha-snat.rst +++ b/doc/source/admin/config-dvr-ha-snat.rst @@ -85,7 +85,7 @@ Controller node configuration [ml2] type_drivers = flat,vxlan - tenant_network_types = vxlan + project_network_types = vxlan mechanism_drivers = openvswitch,l2population extension_drivers = port_security @@ -100,7 +100,7 @@ Controller node configuration .. note:: - The first value in the ``tenant_network_types`` option becomes the + The first value in the ``project_network_types`` option becomes the default project network type when a regular user creates a network. Network nodes diff --git a/doc/source/admin/config-ovs-offload.rst b/doc/source/admin/config-ovs-offload.rst index 63b51cdf22e..ef8ea095c5b 100644 --- a/doc/source/admin/config-ovs-offload.rst +++ b/doc/source/admin/config-ovs-offload.rst @@ -251,7 +251,7 @@ Configure Nodes (VLAN Configuration) .. code-block:: ini [ml2] - tenant_network_types = vlan + project_network_types = vlan type_drivers = vlan mechanism_drivers = openvswitch @@ -295,7 +295,7 @@ Configure Nodes (VXLAN Configuration) .. code-block:: ini [ml2] - tenant_network_types = vxlan + project_network_types = vxlan type_drivers = vxlan mechanism_drivers = openvswitch diff --git a/doc/source/admin/config-trunking.rst b/doc/source/admin/config-trunking.rst index 2668c111113..3dded825143 100644 --- a/doc/source/admin/config-trunking.rst +++ b/doc/source/admin/config-trunking.rst @@ -46,7 +46,7 @@ required by certain drivers like OVS. At this time the following The ``segmentation-type`` and ``segmentation-id`` specified by the user on the subports is intentionally decoupled from the ``segmentation-type`` and ID of the networks. For example, it is possible to configure the Networking service -with ``tenant_network_types = vxlan`` and still create subports with +with ``project_network_types = vxlan`` and still create subports with ``segmentation_type = vlan``. The Networking service performs remapping as necessary. diff --git a/doc/source/admin/deploy-ovs-provider.rst b/doc/source/admin/deploy-ovs-provider.rst index 27e8e7a7f43..4d06aeba48c 100644 --- a/doc/source/admin/deploy-ovs-provider.rst +++ b/doc/source/admin/deploy-ovs-provider.rst @@ -122,7 +122,7 @@ Controller node [ml2] type_drivers = flat,vlan - tenant_network_types = + project_network_types = mechanism_drivers = openvswitch extension_drivers = port_security @@ -138,7 +138,7 @@ Controller node .. note:: - The ``tenant_network_types`` option contains no value because the + The ``project_network_types`` option contains no value because the architecture does not support self-service networks. .. note:: diff --git a/doc/source/admin/deploy-ovs-selfservice.rst b/doc/source/admin/deploy-ovs-selfservice.rst index 0f2d533f216..042c4005fb2 100644 --- a/doc/source/admin/deploy-ovs-selfservice.rst +++ b/doc/source/admin/deploy-ovs-selfservice.rst @@ -70,7 +70,7 @@ Controller node [ml2] type_drivers = flat,vlan,vxlan - tenant_network_types = vxlan + project_network_types = vxlan * Enable the layer-2 population mechanism driver. diff --git a/doc/source/admin/shared/deploy-ha-vrrp.txt b/doc/source/admin/shared/deploy-ha-vrrp.txt index 1a8158ed722..38b92251741 100644 --- a/doc/source/admin/shared/deploy-ha-vrrp.txt +++ b/doc/source/admin/shared/deploy-ha-vrrp.txt @@ -9,7 +9,7 @@ During normal operation, ``keepalived`` on the master router periodically transmits *heartbeat* packets over a hidden network that connects all VRRP routers for a particular project. Each project with VRRP routers uses a separate hidden network. By default this network uses the first value in -the ``tenant_network_types`` option in the ``ml2_conf.ini`` file. For +the ``project_network_types`` option in the ``ml2_conf.ini`` file. For additional control, you can specify the self-service network type and physical network name for the hidden network using the ``l3_ha_network_type`` and ``l3_ha_network_name`` options in the ``neutron.conf`` file. diff --git a/doc/source/install/controller-install-option1-rdo.rst b/doc/source/install/controller-install-option1-rdo.rst index 7ea98bc5b1b..c9c7603faf3 100644 --- a/doc/source/install/controller-install-option1-rdo.rst +++ b/doc/source/install/controller-install-option1-rdo.rst @@ -171,7 +171,7 @@ and switching) virtual networking infrastructure for instances. [ml2] # ... - tenant_network_types = + project_network_types = .. end diff --git a/doc/source/install/controller-install-option1-ubuntu.rst b/doc/source/install/controller-install-option1-ubuntu.rst index 92266ce2728..1b4f289a63d 100644 --- a/doc/source/install/controller-install-option1-ubuntu.rst +++ b/doc/source/install/controller-install-option1-ubuntu.rst @@ -172,7 +172,7 @@ and switching) virtual networking infrastructure for instances. [ml2] # ... - tenant_network_types = + project_network_types = .. end diff --git a/doc/source/install/controller-install-option2-rdo.rst b/doc/source/install/controller-install-option2-rdo.rst index c4731b51acf..4c1bb8205b5 100644 --- a/doc/source/install/controller-install-option2-rdo.rst +++ b/doc/source/install/controller-install-option2-rdo.rst @@ -169,7 +169,7 @@ and switching) virtual networking infrastructure for instances. [ml2] # ... - tenant_network_types = vxlan + project_network_types = vxlan .. end diff --git a/doc/source/install/controller-install-option2-ubuntu.rst b/doc/source/install/controller-install-option2-ubuntu.rst index e254c636436..cf60802ad48 100644 --- a/doc/source/install/controller-install-option2-ubuntu.rst +++ b/doc/source/install/controller-install-option2-ubuntu.rst @@ -170,7 +170,7 @@ and switching) virtual networking infrastructure for instances. [ml2] # ... - tenant_network_types = vxlan + project_network_types = vxlan .. end diff --git a/doc/source/install/ovn/manual_install.rst b/doc/source/install/ovn/manual_install.rst index 3863136b401..0e4f01e782e 100644 --- a/doc/source/install/ovn/manual_install.rst +++ b/doc/source/install/ovn/manual_install.rst @@ -155,7 +155,7 @@ information. ``/etc/neutron/plugins/ml2/ml2_conf.ini`` file: * Configure the OVN mechanism driver, network type drivers, self-service - (tenant) network types, and enable the port security extension. + (project) network types, and enable the port security extension. .. code-block:: ini @@ -163,7 +163,7 @@ information. ... mechanism_drivers = ovn type_drivers = local,flat,vlan,geneve - tenant_network_types = geneve + project_network_types = geneve extension_drivers = port_security overlay_ip_version = 4 @@ -171,7 +171,7 @@ information. To enable VLAN self-service networks, make sure that OVN version 2.11 (or higher) is used, then add ``vlan`` to the - ``tenant_network_types`` option. The first network type in the + ``project_network_types`` option. The first network type in the list becomes the default self-service network type. To use IPv6 for all overlay (tunnel) network endpoints, diff --git a/doc/source/install/verify.rst b/doc/source/install/verify.rst index b3d3ced75af..a519ae1a880 100644 --- a/doc/source/install/verify.rst +++ b/doc/source/install/verify.rst @@ -52,7 +52,7 @@ Verify operation | | | subnet. | | Quota management support | quotas | Expose functions for | | | | quotas management per | - | | | tenant | + | | | project | | Provider Network | provider | Expose mapping of virtual | | | | networks to physical | | | | networks | @@ -93,7 +93,7 @@ Verify operation | | | extension. | | RBAC Policies | rbac-policies | Allows creation and | | | | modification of policies | - | | | that control tenant access | + | | | that control project access| | | | to resources. | | standard-attr-description | standard-attr-description | Extension to add | | | | descriptions to standard | diff --git a/neutron/common/ovn/utils.py b/neutron/common/ovn/utils.py index 92ce8519ab7..5b3e402d212 100644 --- a/neutron/common/ovn/utils.py +++ b/neutron/common/ovn/utils.py @@ -1487,7 +1487,7 @@ def validate_port_forwarding_configuration(): provider_network_types = ['vlan', 'flat'] if any(net_type in provider_network_types - for net_type in cfg.CONF.ml2.tenant_network_types): + for net_type in cfg.CONF.ml2.project_network_types): raise ovn_exc.InvalidPortForwardingConfiguration() diff --git a/neutron/conf/agent/database/agentschedulers_db.py b/neutron/conf/agent/database/agentschedulers_db.py index a46a18a2626..9aa27832d1a 100644 --- a/neutron/conf/agent/database/agentschedulers_db.py +++ b/neutron/conf/agent/database/agentschedulers_db.py @@ -29,10 +29,10 @@ AGENTS_SCHEDULER_OPTS = [ 'agents.')), cfg.IntOpt('dhcp_agents_per_network', default=1, min=1, - help=_('Number of DHCP agents scheduled to host a tenant ' + help=_('Number of DHCP agents scheduled to host a project ' 'network. If this number is greater than 1, the ' 'scheduler automatically assigns multiple DHCP agents ' - 'for a given tenant network, providing high ' + 'for a given project network, providing high ' 'availability for the DHCP service. However this does ' 'not provide high availability for the IPv6 metadata ' 'service in isolated networks.')), diff --git a/neutron/conf/db/dvr_mac_db.py b/neutron/conf/db/dvr_mac_db.py index ec7420fefcc..ac46bce5ae4 100644 --- a/neutron/conf/db/dvr_mac_db.py +++ b/neutron/conf/db/dvr_mac_db.py @@ -25,8 +25,8 @@ DVR_MAC_ADDRESS_OPTS = [ "also be used. The others will be randomly generated. " "The 'dvr_base_mac' *must* be different from " "'base_mac' to avoid mixing it up with MAC's " - "allocated for tenant ports. A 4-octet example would be " - "dvr_base_mac = fa:16:3f:4f:00:00. The default is 3 " + "allocated for project ports. A 4-octet example would " + "be dvr_base_mac = fa:16:3f:4f:00:00. The default is 3 " "octets")), ] diff --git a/neutron/conf/db/l3_hamode_db.py b/neutron/conf/db/l3_hamode_db.py index 9b2257c0a88..54d3ba73e78 100644 --- a/neutron/conf/db/l3_hamode_db.py +++ b/neutron/conf/db/l3_hamode_db.py @@ -32,7 +32,7 @@ L3_HA_OPTS = [ cfg.StrOpt('l3_ha_network_type', default='', help=_("The network type to use when creating the L3 HA " "network for an HA router. By default, or if empty, the " - "first 'tenant_network_types' value is used. This is " + "first 'project_network_types' value is used. This is " "helpful when the VRRP traffic should use a specific " "network which is not the default one.")), cfg.StrOpt('l3_ha_network_physical_name', default='', diff --git a/neutron/conf/plugins/ml2/config.py b/neutron/conf/plugins/ml2/config.py index bb58f9a6828..d511afbc0b3 100644 --- a/neutron/conf/plugins/ml2/config.py +++ b/neutron/conf/plugins/ml2/config.py @@ -27,9 +27,10 @@ ml2_opts = [ constants.TYPE_VXLAN, constants.TYPE_GENEVE], help=_("List of network type driver entrypoints to be loaded " "from the neutron.ml2.type_drivers namespace.")), - cfg.ListOpt('tenant_network_types', + cfg.ListOpt('project_network_types', + deprecated_name='tenant_network_types', default=[constants.TYPE_LOCAL], - help=_("Ordered list of network_types to allocate as tenant " + help=_("Ordered list of network_types to allocate as project " "networks. The default value 'local' is useful for " "single-box testing but provides no connectivity " "between hosts.")), @@ -63,7 +64,7 @@ ml2_opts = [ "provider attributes are specified. By default it is " "None, which means that if provider attributes are not " "specified while creating external networks then they " - "will have the same type as tenant networks. Allowed " + "will have the same type as project networks. Allowed " "values for external_network_type config option depend " "on the network type values configured in type_drivers " "config option.")), diff --git a/neutron/conf/plugins/ml2/drivers/driver_type.py b/neutron/conf/plugins/ml2/drivers/driver_type.py index 8eb3ae40c47..c8fefd12af1 100644 --- a/neutron/conf/plugins/ml2/drivers/driver_type.py +++ b/neutron/conf/plugins/ml2/drivers/driver_type.py @@ -24,7 +24,7 @@ gre_opts = [ default=[], help=_("Comma-separated list of : tuples " "enumerating ranges of GRE tunnel IDs that are " - "available for tenant network allocation")) + "available for project network allocation")) ] flat_opts = [ @@ -41,7 +41,7 @@ geneve_opts = [ default=[], help=_("Comma-separated list of : tuples " "enumerating ranges of Geneve VNI IDs that are " - "available for tenant network allocation. " + "available for project network allocation. " "Note OVN does not use the actual values.")), cfg.IntOpt('max_header_size', default=p_const.GENEVE_ENCAP_MIN_OVERHEAD, @@ -60,7 +60,7 @@ vxlan_opts = [ default=[], help=_("Comma-separated list of : tuples " "enumerating ranges of VXLAN VNI IDs that are " - "available for tenant network allocation")), + "available for project network allocation")), cfg.StrOpt('vxlan_group', help=_("Multicast group for VXLAN. When configured, will " "enable sending all broadcast traffic to this multicast " @@ -73,9 +73,9 @@ vlan_opts = [ default=[], help=_("List of :: or " " specifying physical_network names " - "usable for VLAN provider and tenant networks, as " + "usable for VLAN provider and project networks, as " "well as ranges of VLAN tags on each available for " - "allocation to tenant networks. If no range is " + "allocation to project networks. If no range is " "defined, the whole valid VLAN ID set [1, 4094] will " "be assigned.")) ] diff --git a/neutron/conf/quota.py b/neutron/conf/quota.py index e5c03d1505f..b266886a780 100644 --- a/neutron/conf/quota.py +++ b/neutron/conf/quota.py @@ -44,19 +44,19 @@ DEFAULT_QUOTA_RBAC = 10 core_quota_opts = [ cfg.IntOpt('default_quota', default=DEFAULT_QUOTA, - help=_('Default number of resources allowed per tenant. ' + help=_('Default number of resources allowed per project. ' 'A negative value means unlimited.')), cfg.IntOpt('quota_network', default=DEFAULT_QUOTA_NETWORK, - help=_('Number of networks allowed per tenant. ' + help=_('Number of networks allowed per project. ' 'A negative value means unlimited.')), cfg.IntOpt('quota_subnet', default=DEFAULT_QUOTA_SUBNET, - help=_('Number of subnets allowed per tenant, ' + help=_('Number of subnets allowed per project, ' 'A negative value means unlimited.')), cfg.IntOpt('quota_port', default=DEFAULT_QUOTA_PORT, - help=_('Number of ports allowed per tenant. ' + help=_('Number of ports allowed per project. ' 'A negative value means unlimited.')), cfg.StrOpt('quota_driver', default=QUOTA_DB_DRIVER, @@ -78,11 +78,11 @@ core_quota_opts = [ security_group_quota_opts = [ cfg.IntOpt('quota_security_group', default=DEFAULT_QUOTA_SG, - help=_('Number of security groups allowed per tenant. ' + help=_('Number of security groups allowed per project. ' 'A negative value means unlimited.')), cfg.IntOpt('quota_security_group_rule', default=DEFAULT_QUOTA_SG_RULE, - help=_('Number of security group rules allowed per tenant. ' + help=_('Number of security group rules allowed per project. ' 'A negative value means unlimited.')), ] @@ -90,18 +90,18 @@ security_group_quota_opts = [ l3_quota_opts = [ cfg.IntOpt('quota_router', default=DEFAULT_QUOTA_ROUTER, - help=_('Number of routers allowed per tenant. ' + help=_('Number of routers allowed per project. ' 'A negative value means unlimited.')), cfg.IntOpt('quota_floatingip', default=DEFAULT_QUOTA_FIP, - help=_('Number of floating IPs allowed per tenant. ' + help=_('Number of floating IPs allowed per project. ' 'A negative value means unlimited.')), ] # rbac_quota_opts from neutron/extensions/rbac.py rbac_quota_opts = [ cfg.IntOpt('quota_rbac_policy', default=DEFAULT_QUOTA_RBAC, - help=_('Default number of RBAC entries allowed per tenant. ' + help=_('Default number of RBAC entries allowed per project. ' 'A negative value means unlimited.')) ] diff --git a/neutron/plugins/ml2/drivers/type_flat.py b/neutron/plugins/ml2/drivers/type_flat.py index 058c443c1f1..093f29b8e57 100644 --- a/neutron/plugins/ml2/drivers/type_flat.py +++ b/neutron/plugins/ml2/drivers/type_flat.py @@ -110,7 +110,7 @@ class FlatTypeDriver(helpers.BaseTypeDriver): return segment def allocate_tenant_segment(self, context, filters=None): - # Tenant flat networks are not supported. + # Project flat networks are not supported. return def release_segment(self, context, segment): diff --git a/neutron/plugins/ml2/managers.py b/neutron/plugins/ml2/managers.py index 397674195a4..0bb5934990a 100644 --- a/neutron/plugins/ml2/managers.py +++ b/neutron/plugins/ml2/managers.py @@ -58,7 +58,7 @@ class TypeManager(stevedore.named.NamedExtensionManager): invoke_on_load=True) LOG.info("Loaded type driver names: %s", self.names()) self._register_types() - self._check_tenant_network_types(cfg.CONF.ml2.tenant_network_types) + self._check_project_network_types(cfg.CONF.ml2.project_network_types) self._check_external_network_type(cfg.CONF.ml2.external_network_type) def _register_types(self): @@ -75,15 +75,15 @@ class TypeManager(stevedore.named.NamedExtensionManager): self.drivers[network_type] = ext LOG.info("Registered types: %s", self.drivers.keys()) - def _check_tenant_network_types(self, types): - self.tenant_network_types = [] + def _check_project_network_types(self, types): + self.project_network_types = [] for network_type in types: if network_type not in self.drivers: - LOG.error("No type driver for tenant network_type: %s. " + LOG.error("No type driver for project network_type: %s. " "Service terminated!", network_type) raise SystemExit(1) - self.tenant_network_types.append(network_type) - LOG.info("Tenant network_types: %s", self.tenant_network_types) + self.project_network_types.append(network_type) + LOG.info("Project network_types: %s", self.project_network_types) def _check_external_network_type(self, ext_network_type): if ext_network_type and ext_network_type not in self.drivers: @@ -208,10 +208,10 @@ class TypeManager(stevedore.named.NamedExtensionManager): segments_db.update_network_segment( context, network_id, segmentation_id) - def create_network_segments(self, context, network, tenant_id): + def create_network_segments(self, context, network, project_id): """Call type drivers to create network segments.""" segments = self._process_provider_create(network) - filters = {'project_id': tenant_id} + filters = {'project_id': project_id} with db_api.CONTEXT_WRITER.using(context): network_id = network['id'] if segments: @@ -226,7 +226,7 @@ class TypeManager(stevedore.named.NamedExtensionManager): context, filters=filters) self._add_network_segment(context, network_id, segment) else: - segment = self._allocate_tenant_net_segment( + segment = self._allocate_project_net_segment( context, filters=filters) self._add_network_segment(context, network_id, segment) @@ -302,11 +302,12 @@ class TypeManager(stevedore.named.NamedExtensionManager): def _allocate_segment(self, context, network_type, filters=None): driver = self.drivers.get(network_type) if isinstance(driver.obj, api.TypeDriver): - return driver.obj.allocate_tenant_segment(context.session, filters) + return driver.obj.allocate_tenant_segment(context.session, + filters) return driver.obj.allocate_tenant_segment(context, filters) - def _allocate_tenant_net_segment(self, context, filters=None): - for network_type in self.tenant_network_types: + def _allocate_project_net_segment(self, context, filters=None): + for network_type in self.project_network_types: segment = self._allocate_segment(context, network_type, filters) if segment: return segment diff --git a/neutron/tests/functional/base.py b/neutron/tests/functional/base.py index f052807a059..4ae4c42260c 100644 --- a/neutron/tests/functional/base.py +++ b/neutron/tests/functional/base.py @@ -160,7 +160,7 @@ class TestOVNFunctionalBase(testlib_api.MySQLTestCaseMixin, ml2_config.cfg.CONF.set_override('extension_drivers', self._extension_drivers, group='ml2') - ml2_config.cfg.CONF.set_override('tenant_network_types', + ml2_config.cfg.CONF.set_override('project_network_types', ['geneve'], group='ml2') ml2_config.cfg.CONF.set_override('vni_ranges', diff --git a/neutron/tests/unit/common/ovn/test_utils.py b/neutron/tests/unit/common/ovn/test_utils.py index 7f762caa82b..49c9d8a0d14 100644 --- a/neutron/tests/unit/common/ovn/test_utils.py +++ b/neutron/tests/unit/common/ovn/test_utils.py @@ -1274,7 +1274,7 @@ class ValidatePortForwardingConfigurationTestCase(base.BaseTestCase): cfg.CONF.set_override( 'enable_distributed_floating_ip', False, group='ovn') cfg.CONF.set_override('service_plugins', 'some_plugin,port_forwarding') - cfg.CONF.set_override('tenant_network_types', 'geneve,vlan', + cfg.CONF.set_override('project_network_types', 'geneve,vlan', group='ml2') utils.validate_port_forwarding_configuration() @@ -1282,7 +1282,7 @@ class ValidatePortForwardingConfigurationTestCase(base.BaseTestCase): cfg.CONF.set_override( 'enable_distributed_floating_ip', True, group='ovn') cfg.CONF.set_override('service_plugins', 'some_plugin') - cfg.CONF.set_override('tenant_network_types', 'geneve,vlan', + cfg.CONF.set_override('project_network_types', 'geneve,vlan', group='ml2') utils.validate_port_forwarding_configuration() @@ -1290,7 +1290,7 @@ class ValidatePortForwardingConfigurationTestCase(base.BaseTestCase): cfg.CONF.set_override( 'enable_distributed_floating_ip', True, group='ovn') cfg.CONF.set_override('service_plugins', 'some_plugin,port_forwarding') - cfg.CONF.set_override('tenant_network_types', 'geneve,vxlan', + cfg.CONF.set_override('project_network_types', 'geneve,vxlan', group='ml2') utils.validate_port_forwarding_configuration() @@ -1298,7 +1298,7 @@ class ValidatePortForwardingConfigurationTestCase(base.BaseTestCase): cfg.CONF.set_override( 'enable_distributed_floating_ip', True, group='ovn') cfg.CONF.set_override('service_plugins', 'some_plugin,port_forwarding') - cfg.CONF.set_override('tenant_network_types', 'geneve,vlan', + cfg.CONF.set_override('project_network_types', 'geneve,vlan', group='ml2') self.assertRaises( ovn_exc.InvalidPortForwardingConfiguration, diff --git a/neutron/tests/unit/plugins/ml2/drivers/base_type_tunnel.py b/neutron/tests/unit/plugins/ml2/drivers/base_type_tunnel.py index 10fb3500c9c..a95b7ca9521 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/base_type_tunnel.py +++ b/neutron/tests/unit/plugins/ml2/drivers/base_type_tunnel.py @@ -207,7 +207,7 @@ class TunnelTypeTestMixin: segment[api.SEGMENTATION_ID] = tunnel_id self.driver.release_segment(self.context, segment) - def test_allocate_tenant_segment(self): + def test_allocate_project_segment(self): tunnel_ids = set() for x in range(TUN_MIN, TUN_MAX + 1): segment = self.driver.allocate_tenant_segment(self.context) diff --git a/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/extensions/test_qos.py b/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/extensions/test_qos.py index 723e76c27ef..2cfb25a167b 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/extensions/test_qos.py +++ b/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/extensions/test_qos.py @@ -86,14 +86,14 @@ class TestOVNClientQosExtension(test_plugin.Ml2PluginV2TestCase): common_config.register_common_config_options() ovn_conf.register_opts() driver_type.register_ml2_drivers_geneve_opts() - self.tenant_type = constants.TYPE_GENEVE + self.project_type = constants.TYPE_GENEVE cfg.CONF.set_override('extension_drivers', self._extension_drivers, group='ml2') cfg.CONF.set_override('enable_distributed_floating_ip', 'False', group='ovn') cfg.CONF.set_override('external_network_type', 'vlan', group='ml2') - cfg.CONF.set_override('tenant_network_types', [self.tenant_type], + cfg.CONF.set_override('project_network_types', [self.project_type], group='ml2') cfg.CONF.set_override('vni_ranges', ['1:200'], group='ml2_type_geneve') cfg.CONF.set_override('max_header_size', 38, group='ml2_type_geneve') @@ -451,7 +451,7 @@ class TestOVNClientQosExtension(test_plugin.Ml2PluginV2TestCase): self.context, mock.ANY, self.networks[0], original_network) self.assertEqual(reference_ports, reviewed_port_ids) calls = [mock.call(mock.ANY, mock.ANY, self.ports[0].id, - self.ports[0].network_id, self.tenant_type, + self.ports[0].network_id, self.project_type, qos_policy_id, None)] self.mock_rules.assert_has_calls(calls) self.mock_rules.reset_mock() @@ -528,7 +528,7 @@ class TestOVNClientQosExtension(test_plugin.Ml2PluginV2TestCase): reset=True) self.assertEqual(reference_ports, reviewed_port_ids) calls = [mock.call(mock.ANY, mock.ANY, self.ports[0].id, - self.ports[0].network_id, self.tenant_type, + self.ports[0].network_id, self.project_type, qos_policy_id, None)] self.mock_rules.assert_has_calls(calls) self.mock_rules.reset_mock() @@ -561,7 +561,7 @@ class TestOVNClientQosExtension(test_plugin.Ml2PluginV2TestCase): self.assertEqual(reference_ports, reviewed_port_ids) calls = [mock.call( mock.ANY, mock.ANY, self.ports[0].id, - self.ports[0].network_id, self.tenant_type, qos_policy_id, + self.ports[0].network_id, self.project_type, qos_policy_id, None)] self.mock_rules.assert_has_calls(calls) self.mock_rules.reset_mock() @@ -614,12 +614,12 @@ class TestOVNClientQosExtension(test_plugin.Ml2PluginV2TestCase): # Ports updated from "update_port": self.ports[1], self.ports[4] updated_ports = [self.ports[1], self.ports[4]] calls = [mock.call(mock.ANY, self.txn, port.id, - port.network_id, self.tenant_type, + port.network_id, self.project_type, self.qos_policies[0].id, mock_qos_rules, lsp=None) for port in updated_ports] # Port updated from "update_network": self.ports[3] calls.append(mock.call(mock.ANY, self.txn, self.ports[3].id, - self.ports[3].network_id, self.tenant_type, + self.ports[3].network_id, self.project_type, self.qos_policies[0].id, mock_qos_rules)) # We can't ensure the call order because we are not enforcing any order diff --git a/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py b/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py index 7559a511911..821a5108900 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py +++ b/neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py @@ -164,7 +164,7 @@ class TestOVNMechanismDriverBase(MechDriverSetupBase, cfg.CONF.set_override('extension_drivers', self._extension_drivers, group='ml2') - cfg.CONF.set_override('tenant_network_types', + cfg.CONF.set_override('project_network_types', ['geneve'], group='ml2') cfg.CONF.set_override('vni_ranges', @@ -3493,7 +3493,7 @@ class OVNMechanismDriverTestCase(MechDriverSetupBase, if enable_metadata: ovn_conf.cfg.CONF.set_override('ovn_metadata_enabled', True, group='ovn') - cfg.CONF.set_override('tenant_network_types', + cfg.CONF.set_override('project_network_types', ['geneve'], group='ml2') cfg.CONF.set_override('vni_ranges', diff --git a/neutron/tests/unit/plugins/ml2/drivers/test_type_flat.py b/neutron/tests/unit/plugins/ml2/drivers/test_type_flat.py index 0a9bccf4a44..34a1d1a7804 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/test_type_flat.py +++ b/neutron/tests/unit/plugins/ml2/drivers/test_type_flat.py @@ -121,7 +121,7 @@ class FlatTypeTest(testlib_api.SqlTestCase): self.driver.reserve_provider_segment, self.context, segment) - def test_allocate_tenant_segment(self): + def test_allocate_project_segment(self): self.assertIsNone(self.driver.allocate_tenant_segment(self.context)) def test_get_mtu(self): diff --git a/neutron/tests/unit/plugins/ml2/drivers/test_type_local.py b/neutron/tests/unit/plugins/ml2/drivers/test_type_local.py index 39df68c9488..62f88fcf710 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/test_type_local.py +++ b/neutron/tests/unit/plugins/ml2/drivers/test_type_local.py @@ -60,7 +60,7 @@ class LocalTypeTest(base.BaseTestCase): observed = self.driver.reserve_provider_segment(self.context, segment) self.driver.release_segment(self.context, observed) - def test_allocate_tenant_segment(self): + def test_allocate_project_segment(self): expected = {api.NETWORK_TYPE: p_const.TYPE_LOCAL} observed = self.driver.allocate_tenant_segment(self.context) self.assertEqual(expected, observed) diff --git a/neutron/tests/unit/plugins/ml2/drivers/test_type_vlan.py b/neutron/tests/unit/plugins/ml2/drivers/test_type_vlan.py index 60b0f2fee86..38dab3a8b13 100644 --- a/neutron/tests/unit/plugins/ml2/drivers/test_type_vlan.py +++ b/neutron/tests/unit/plugins/ml2/drivers/test_type_vlan.py @@ -283,7 +283,7 @@ class VlanTypeTest(testlib_api.SqlTestCase): self.driver.physnet_mtus = {} self.assertEqual(0, self.driver.get_mtu('physnet1')) - def test_allocate_tenant_segment(self): + def test_allocate_project_segment(self): cfg.CONF.set_override('network_vlan_ranges', TENANT_VLAN_RANGES, group='ml2_type_vlan') driver = type_vlan.VlanTypeDriver() @@ -297,7 +297,7 @@ class VlanTypeTest(testlib_api.SqlTestCase): self.assertLess(vlan_id, VLAN_MAX + 1) self.assertEqual(TENANT_NET, segment[api.PHYSICAL_NETWORK]) - def test_allocate_tenant_segment_no_available(self): + def test_allocate_project_segment_no_available(self): cfg.CONF.set_override('network_vlan_ranges', TENANT_VLAN_RANGES, group='ml2_type_vlan') driver = type_vlan.VlanTypeDriver() @@ -326,7 +326,7 @@ class VlanTypeTest(testlib_api.SqlTestCase): class VlanTypeAllocationTest(testlib_api.SqlTestCase): - def test_allocate_tenant_segment_in_order_of_config(self): + def test_allocate_project_segment_in_order_of_config(self): ranges = NETWORK_VLAN_RANGES + ['phys_net3:20:30'] cfg.CONF.set_override('network_vlan_ranges', ranges, diff --git a/neutron/tests/unit/plugins/ml2/test_plugin.py b/neutron/tests/unit/plugins/ml2/test_plugin.py index a09f517d49f..91f7c562757 100644 --- a/neutron/tests/unit/plugins/ml2/test_plugin.py +++ b/neutron/tests/unit/plugins/ml2/test_plugin.py @@ -703,7 +703,7 @@ class TestExternalNetwork(Ml2PluginV2TestCase): network = self._create_external_network() # For external network, expected network type to be - # tenant_network_types which is by default 'local'. + # project_network_types which is by default 'local'. self.assertEqual(constants.TYPE_LOCAL, network['network'][pnet.NETWORK_TYPE]) # No physical network specified, expected 'None'. diff --git a/releasenotes/notes/tenant_network_types_to_project_network_types-f742c272f71aebc4.yaml b/releasenotes/notes/tenant_network_types_to_project_network_types-f742c272f71aebc4.yaml new file mode 100644 index 00000000000..9cae0de9c0d --- /dev/null +++ b/releasenotes/notes/tenant_network_types_to_project_network_types-f742c272f71aebc4.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + The ``tenant_network_types`` option of the ML2 configuration has been + deprecated and replaced with the ``project_network_types`` option. + The old option name will continue to work as it does today, but will + be removed in the ``2027.1`` release. diff --git a/tools/ovn_migration/migrate-to-ovn.yml b/tools/ovn_migration/migrate-to-ovn.yml index f49e6ac34f2..22a4a64a0f1 100644 --- a/tools/ovn_migration/migrate-to-ovn.yml +++ b/tools/ovn_migration/migrate-to-ovn.yml @@ -101,7 +101,7 @@ - { dest: '/etc/neutron/neutron.conf', section: 'DEFAULT', option: 'notification_drivers', value: 'ovn-qos' } - { dest: '/etc/neutron/plugins/ml2/ml2_conf.ini', section: 'ml2', option: 'mechanism_drivers', value: 'ovn' } - { dest: '/etc/neutron/plugins/ml2/ml2_conf.ini', section: 'ml2', option: 'type_drivers', value: 'geneve,vxlan,vlan,flat' } - - { dest: '/etc/neutron/plugins/ml2/ml2_conf.ini', section: 'ml2', option: 'tenant_network_types', value: 'geneve' } + - { dest: '/etc/neutron/plugins/ml2/ml2_conf.ini', section: 'ml2', option: 'project_network_types', value: 'geneve' } - { dest: '/etc/neutron/plugins/ml2/ml2_conf.ini', section: 'ml2_type_geneve', option: 'vni_ranges', value: '1:65536' } - { dest: '/etc/neutron/plugins/ml2/ml2_conf.ini', section: 'ml2_type_geneve', option: 'max_header_size', value: '38' } - { dest: '/etc/neutron/plugins/ml2/ml2_conf.ini', section: 'ovn', option: 'ovn_nb_connection', value: '"tcp:{{ ovn_db_ip }}:6641"' }