diff options
author | ricolin <rico.lin.guanyu@gmail.com> | 2019-03-12 16:43:12 +0800 |
---|---|---|
committer | Rabi Mishra <ramishra@redhat.com> | 2019-03-13 06:52:02 +0000 |
commit | 680d7a0ecf40e6414f8b2ea143074d90d203d242 (patch) | |
tree | 9263270d872bc4666381cd446a3779c0a0ddcce1 | |
parent | 16e35cfbb092e03b93037f785f4cfe3a0d45f241 (diff) | |
download | heat-680d7a0ecf40e6414f8b2ea143074d90d203d242.tar.gz |
Deprecate `personality` for `OS::Nova::Server`
This patch deprecate personality property for `OS::Nova::Server`.
Since that property is deprecated by nova since version 2.57,
we should plan to Hidden that property soon.
please use ``user_data`` or ``metadata`` instead. If that
property really required, use config ``max_nova_api_microversion``
to set the maximum nova API microversion <2.57 for nova client
plugin to support personality property.
Add config option ``max_nova_api_microversion`` to set the maximum
nova API microversion for nova client plugin.
Story: #2004188
Task: #29979
Change-Id: I1852739e818ec67ac5a821e436e243eaa72f0938
-rw-r--r-- | heat/common/config.py | 5 | ||||
-rw-r--r-- | heat/engine/clients/os/nova.py | 2 | ||||
-rw-r--r-- | heat/engine/resources/openstack/nova/server.py | 11 | ||||
-rw-r--r-- | releasenotes/notes/deprecate_personality_property-6bcda7c7c0e07151.yaml | 14 |
4 files changed, 31 insertions, 1 deletions
diff --git a/heat/common/config.py b/heat/common/config.py index 40a23fcfa..c4c9e1d2e 100644 --- a/heat/common/config.py +++ b/heat/common/config.py @@ -152,6 +152,11 @@ engine_opts = [ default=10, help=_('Number of times to check whether an interface has ' 'been attached or detached.')), + cfg.FloatOpt('max_nova_api_microversion', + help=_('Maximum nova API version for client plugin. With ' + 'this limitation, any nova feature supported with ' + 'microversion number above max_nova_api_microversion ' + 'will not be available.')), cfg.IntOpt('event_purge_batch_size', min=1, default=200, diff --git a/heat/engine/clients/os/nova.py b/heat/engine/clients/os/nova.py index 031fffa8f..d19fa19c3 100644 --- a/heat/engine/clients/os/nova.py +++ b/heat/engine/clients/os/nova.py @@ -63,7 +63,7 @@ class NovaClientPlugin(microversion_mixin.MicroversionMixin, NOVA_API_VERSION = '2.1' - max_microversion = None + max_microversion = cfg.CONF.max_nova_api_microversion service_types = [COMPUTE] = ['compute'] diff --git a/heat/engine/resources/openstack/nova/server.py b/heat/engine/resources/openstack/nova/server.py index 3a1400fb0..3815b7938 100644 --- a/heat/engine/resources/openstack/nova/server.py +++ b/heat/engine/resources/openstack/nova/server.py @@ -579,6 +579,17 @@ class Server(server_base.BaseServer, sh.SchedulerHintsMixin, properties.Schema.MAP, _('A map of files to create/overwrite on the server upon boot. ' 'Keys are file names and values are the file contents.'), + support_status=support.SupportStatus( + status=support.DEPRECATED, + version='12.0.0', + message=_('This is not supported with nova api ' + 'microversion 2.57 and above. ' + 'OS::Nova::Server resource will not support ' + 'it in the future. Please use user_data or metadata ' + 'instead. However, you can set heat config option ' + 'max_nova_api_microversion < 2.57 to use ' + 'this property in the meantime.') + ), default={} ), ADMIN_PASS: properties.Schema( diff --git a/releasenotes/notes/deprecate_personality_property-6bcda7c7c0e07151.yaml b/releasenotes/notes/deprecate_personality_property-6bcda7c7c0e07151.yaml new file mode 100644 index 000000000..bfeef1a0c --- /dev/null +++ b/releasenotes/notes/deprecate_personality_property-6bcda7c7c0e07151.yaml @@ -0,0 +1,14 @@ +--- +upgrade: + - | + New config ``max_nova_api_microversion`` to set the maximum nova + API microversion for nova client plugin. If``max_nova_api_microversion`` + is set, any nova features supported with microversion number above + max_nova_api_microversion will not be available. +deprecations: + - | + ``personality`` property of ``OS::Nova::Server`` is now deprecated, please + use ``user_data`` or ``metadata`` instead. If that property really + required, use config ``max_nova_api_microversion`` to set the maximum nova + API microversion <2.57 for nova client plugin to support personality + property. |