conf: Rename '[api] neutron_default_tenant_id'
Neutron has used the term project instead of tenant for a long time now. Rename the option accordingly and drop deprecated group and deprecated name aliases from other options in the '[api]' group. Change-Id: I5a547c7b6232c24b3a0f0c6d0ac916229a91b038 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
@@ -69,9 +69,8 @@ class TenantNetworkController(wsgi.Controller):
|
|||||||
LOG.exception("Failed to get default networks")
|
LOG.exception("Failed to get default networks")
|
||||||
|
|
||||||
def _get_default_networks(self):
|
def _get_default_networks(self):
|
||||||
project_id = CONF.api.neutron_default_tenant_id
|
project_id = CONF.api.neutron_default_project_id
|
||||||
ctx = nova_context.RequestContext(user_id=None,
|
ctx = nova_context.RequestContext(user_id=None, project_id=project_id)
|
||||||
project_id=project_id)
|
|
||||||
return self.network_api.get_all(ctx)
|
return self.network_api.get_all(ctx)
|
||||||
|
|
||||||
@wsgi.api_version("2.1", MAX_PROXY_API_SUPPORT_VERSION)
|
@wsgi.api_version("2.1", MAX_PROXY_API_SUPPORT_VERSION)
|
||||||
|
@@ -46,7 +46,6 @@ metadata_opts = [
|
|||||||
cfg.StrOpt("config_drive_skip_versions",
|
cfg.StrOpt("config_drive_skip_versions",
|
||||||
default=("1.0 2007-01-19 2007-03-01 2007-08-29 2007-10-10 "
|
default=("1.0 2007-01-19 2007-03-01 2007-08-29 2007-10-10 "
|
||||||
"2007-12-15 2008-02-01 2008-09-01"),
|
"2007-12-15 2008-02-01 2008-09-01"),
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
When gathering the existing metadata for a config drive, the EC2-style
|
When gathering the existing metadata for a config drive, the EC2-style
|
||||||
metadata is returned for all versions that don't appear in this option.
|
metadata is returned for all versions that don't appear in this option.
|
||||||
@@ -79,7 +78,6 @@ Possible values:
|
|||||||
'for ``vendor_data2.json``.'),
|
'for ``vendor_data2.json``.'),
|
||||||
]),
|
]),
|
||||||
default=['StaticJSON'],
|
default=['StaticJSON'],
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
A list of vendordata providers.
|
A list of vendordata providers.
|
||||||
|
|
||||||
@@ -100,7 +98,6 @@ Related options:
|
|||||||
"""),
|
"""),
|
||||||
cfg.ListOpt('vendordata_dynamic_targets',
|
cfg.ListOpt('vendordata_dynamic_targets',
|
||||||
default=[],
|
default=[],
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
A list of targets for the dynamic vendordata provider. These targets are of
|
A list of targets for the dynamic vendordata provider. These targets are of
|
||||||
the form ``<name>@<url>``.
|
the form ``<name>@<url>``.
|
||||||
@@ -111,7 +108,6 @@ is documented in the vendordata.rst file in the nova developer reference.
|
|||||||
"""),
|
"""),
|
||||||
cfg.StrOpt('vendordata_dynamic_ssl_certfile',
|
cfg.StrOpt('vendordata_dynamic_ssl_certfile',
|
||||||
default='',
|
default='',
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
Path to an optional certificate file or CA bundle to verify dynamic
|
Path to an optional certificate file or CA bundle to verify dynamic
|
||||||
vendordata REST services ssl certificates against.
|
vendordata REST services ssl certificates against.
|
||||||
@@ -131,7 +127,6 @@ Related options:
|
|||||||
cfg.IntOpt('vendordata_dynamic_connect_timeout',
|
cfg.IntOpt('vendordata_dynamic_connect_timeout',
|
||||||
default=5,
|
default=5,
|
||||||
min=3,
|
min=3,
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
Maximum wait time for an external REST service to connect.
|
Maximum wait time for an external REST service to connect.
|
||||||
|
|
||||||
@@ -152,7 +147,6 @@ Related options:
|
|||||||
cfg.IntOpt('vendordata_dynamic_read_timeout',
|
cfg.IntOpt('vendordata_dynamic_read_timeout',
|
||||||
default=5,
|
default=5,
|
||||||
min=0,
|
min=0,
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
Maximum wait time for an external REST service to return data once connected.
|
Maximum wait time for an external REST service to return data once connected.
|
||||||
|
|
||||||
@@ -185,7 +179,6 @@ Related options:
|
|||||||
cfg.IntOpt("metadata_cache_expiration",
|
cfg.IntOpt("metadata_cache_expiration",
|
||||||
default=15,
|
default=15,
|
||||||
min=0,
|
min=0,
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
This option is the time (in seconds) to cache metadata. When set to 0,
|
This option is the time (in seconds) to cache metadata. When set to 0,
|
||||||
metadata caching is disabled entirely; this is generally not recommended for
|
metadata caching is disabled entirely; this is generally not recommended for
|
||||||
@@ -207,7 +200,6 @@ Neutron metadata-agent to point to the corresponding nova-metadata API
|
|||||||
service.
|
service.
|
||||||
"""),
|
"""),
|
||||||
cfg.StrOpt("dhcp_domain",
|
cfg.StrOpt("dhcp_domain",
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
default="novalocal",
|
default="novalocal",
|
||||||
help="""
|
help="""
|
||||||
Domain name used to configure FQDN for instances.
|
Domain name used to configure FQDN for instances.
|
||||||
@@ -226,7 +218,6 @@ Possible values:
|
|||||||
|
|
||||||
file_opts = [
|
file_opts = [
|
||||||
cfg.StrOpt("vendordata_jsonfile_path",
|
cfg.StrOpt("vendordata_jsonfile_path",
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
Cloud providers may store custom data in vendor data file that will then be
|
Cloud providers may store custom data in vendor data file that will then be
|
||||||
available to the instances via the metadata service, and to the rendering of
|
available to the instances via the metadata service, and to the rendering of
|
||||||
@@ -249,15 +240,11 @@ osapi_opts = [
|
|||||||
cfg.IntOpt("max_limit",
|
cfg.IntOpt("max_limit",
|
||||||
default=1000,
|
default=1000,
|
||||||
min=0,
|
min=0,
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
deprecated_name="osapi_max_limit",
|
|
||||||
help="""
|
help="""
|
||||||
As a query can potentially return many thousands of items, you can limit the
|
As a query can potentially return many thousands of items, you can limit the
|
||||||
maximum number of items in a single response by setting this option.
|
maximum number of items in a single response by setting this option.
|
||||||
"""),
|
"""),
|
||||||
cfg.StrOpt("compute_link_prefix",
|
cfg.StrOpt("compute_link_prefix",
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
deprecated_name="osapi_compute_link_prefix",
|
|
||||||
help="""
|
help="""
|
||||||
This string is prepended to the normal URL that is returned in links to the
|
This string is prepended to the normal URL that is returned in links to the
|
||||||
OpenStack Compute API. If it is empty (the default), the URLs are returned
|
OpenStack Compute API. If it is empty (the default), the URLs are returned
|
||||||
@@ -268,8 +255,6 @@ Possible values:
|
|||||||
* Any string, including an empty string (the default).
|
* Any string, including an empty string (the default).
|
||||||
"""),
|
"""),
|
||||||
cfg.StrOpt("glance_link_prefix",
|
cfg.StrOpt("glance_link_prefix",
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
deprecated_name="osapi_glance_link_prefix",
|
|
||||||
help="""
|
help="""
|
||||||
This string is prepended to the normal URL that is returned in links to
|
This string is prepended to the normal URL that is returned in links to
|
||||||
Glance resources. If it is empty (the default), the URLs are returned
|
Glance resources. If it is empty (the default), the URLs are returned
|
||||||
@@ -362,18 +347,17 @@ more information.
|
|||||||
os_network_opts = [
|
os_network_opts = [
|
||||||
cfg.BoolOpt("use_neutron_default_nets",
|
cfg.BoolOpt("use_neutron_default_nets",
|
||||||
default=False,
|
default=False,
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
When True, the TenantNetworkController will query the Neutron API to get the
|
When True, the TenantNetworkController will query the Neutron API to get the
|
||||||
default networks to use.
|
default networks to use.
|
||||||
|
|
||||||
Related options:
|
Related options:
|
||||||
|
|
||||||
* neutron_default_tenant_id
|
* neutron_default_project_id
|
||||||
"""),
|
"""),
|
||||||
cfg.StrOpt("neutron_default_tenant_id",
|
cfg.StrOpt("neutron_default_project_id",
|
||||||
|
deprecated_name="neutron_default_tenant_id",
|
||||||
default="default",
|
default="default",
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
Tenant ID for getting the default network from Neutron API (also referred in
|
Tenant ID for getting the default network from Neutron API (also referred in
|
||||||
some places as the 'project ID') to use.
|
some places as the 'project ID') to use.
|
||||||
@@ -387,7 +371,6 @@ Related options:
|
|||||||
enable_inst_pw_opts = [
|
enable_inst_pw_opts = [
|
||||||
cfg.BoolOpt("enable_instance_password",
|
cfg.BoolOpt("enable_instance_password",
|
||||||
default=True,
|
default=True,
|
||||||
deprecated_group="DEFAULT",
|
|
||||||
help="""
|
help="""
|
||||||
Enables returning of the instance password by the relevant server API calls
|
Enables returning of the instance password by the relevant server API calls
|
||||||
such as create, rebuild, evacuate, or rescue. If the hypervisor does not
|
such as create, rebuild, evacuate, or rescue. If the hypervisor does not
|
||||||
|
@@ -48,11 +48,9 @@ DEFAULT_NETWORK = [
|
|||||||
NETWORKS_WITH_DEFAULT_NET = copy.deepcopy(NETWORKS)
|
NETWORKS_WITH_DEFAULT_NET = copy.deepcopy(NETWORKS)
|
||||||
NETWORKS_WITH_DEFAULT_NET.extend(DEFAULT_NETWORK)
|
NETWORKS_WITH_DEFAULT_NET.extend(DEFAULT_NETWORK)
|
||||||
|
|
||||||
DEFAULT_TENANT_ID = CONF.api.neutron_default_tenant_id
|
|
||||||
|
|
||||||
|
|
||||||
def fake_network_api_get_all(context):
|
def fake_network_api_get_all(context):
|
||||||
if context.project_id == DEFAULT_TENANT_ID:
|
if context.project_id == CONF.api.neutron_default_project_id:
|
||||||
return DEFAULT_NETWORK
|
return DEFAULT_NETWORK
|
||||||
else:
|
else:
|
||||||
return NETWORKS
|
return NETWORKS
|
||||||
|
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The ``[api] neutron_default_tenant_id`` option has been renamed to
|
||||||
|
``[api] neutron_default_project_id`` and the legacy ``[DEFAULT]
|
||||||
|
neutron_default_tenant_id`` alias removed.
|
||||||
|
- |
|
||||||
|
The following aliases for ``[api]`` options have been removed. They have
|
||||||
|
been deprecated since the 15.0.0 (Ocata) release.
|
||||||
|
|
||||||
|
- ``[DEFAULT] config_drive_skip_versions``
|
||||||
|
- ``[DEFAULT] vendordata_providers``
|
||||||
|
- ``[DEFAULT] vendordata_dynamic_targets``
|
||||||
|
- ``[DEFAULT] vendordata_dynamic_ssl_certfile``
|
||||||
|
- ``[DEFAULT] vendordata_dynamic_connect_timeout``
|
||||||
|
- ``[DEFAULT] vendordata_dynamic_read_timeout``
|
||||||
|
- ``[DEFAULT] metadata_cache_expiration``
|
||||||
|
- ``[DEFAULT] dhcp_domain``
|
||||||
|
- ``[DEFAULT] vendordata_jsonfile_path``
|
||||||
|
- ``[DEFAULT] max_limit``
|
||||||
|
- ``[DEFAULT] compute_link_prefix``
|
||||||
|
- ``[DEFAULT] glance_link_prefix``
|
||||||
|
- ``[DEFAULT] use_neutron_default_nets``
|
||||||
|
- ``[DEFAULT] enable_instance_password``
|
||||||
|
|
||||||
|
In all cases, the replacement is the same option in the ``[api]`` group.
|
Reference in New Issue
Block a user