Hidden resources in Rocky

Resource type ``OS::Magnum::Bay`` is now hidden, please use
``OS::Magnum::Cluster`` instead.

Resource type ``OS::Magnum::BayModele`` is now hidden, please use
``OS::Magnum::ClusterTemplate`` instead.

Resource type ``OS::Nova::FloatingIP`` is now hidden, please use
``OS::Neutron::FloatingIP`` instead.

Resource type ``OS::Nova::FloatingIPAssociation`` is now hidden, please use
``OS::Neutron::FloatingIPAssociation`` instead.

Change-Id: I2ea1400cfe1f4eca24f2fb7b4b0ec27ca5e9538d
This commit is contained in:
ricolin 2018-07-26 23:29:57 +08:00
parent 2cd021b483
commit a8574936e5
5 changed files with 46 additions and 20 deletions

View File

@ -29,12 +29,17 @@ class Bay(resource.Resource):
deprecation_msg = _('Please use OS::Magnum::Cluster instead.') deprecation_msg = _('Please use OS::Magnum::Cluster instead.')
support_status = support.SupportStatus( support_status = support.SupportStatus(
status=support.DEPRECATED, status=support.HIDDEN,
message=deprecation_msg, message=deprecation_msg,
version='9.0.0', version='11.0.0',
previous_status=support.SupportStatus( previous_status=support.SupportStatus(
status=support.SUPPORTED, status=support.DEPRECATED,
version='6.0.0') message=deprecation_msg,
version='9.0.0',
previous_status=support.SupportStatus(
status=support.SUPPORTED,
version='6.0.0')
)
) )
PROPERTIES = ( PROPERTIES = (

View File

@ -28,13 +28,18 @@ class BayModel(cluster_template.ClusterTemplate):
deprecate_msg = _('Please use OS::Magnum::ClusterTemplate instead.') deprecate_msg = _('Please use OS::Magnum::ClusterTemplate instead.')
support_status = support.SupportStatus( support_status = support.SupportStatus(
status=support.DEPRECATED, status=support.HIDDEN,
message=deprecate_msg, message=deprecate_msg,
version='9.0.0', version='11.0.0',
previous_status=support.SupportStatus( previous_status=support.SupportStatus(
status=support.SUPPORTED, status=support.DEPRECATED,
version='5.0.0'), message=deprecate_msg,
substitute_class=cluster_template.ClusterTemplate version='9.0.0',
previous_status=support.SupportStatus(
status=support.SUPPORTED,
version='5.0.0'),
substitute_class=cluster_template.ClusterTemplate
)
) )
def translation_rules(self, props): def translation_rules(self, props):

View File

@ -38,10 +38,15 @@ class NovaFloatingIp(resource.Resource):
deprecation_msg = _('Please use OS::Neutron::FloatingIP instead.') deprecation_msg = _('Please use OS::Neutron::FloatingIP instead.')
support_status = support.SupportStatus( support_status = support.SupportStatus(
status=support.DEPRECATED, status=support.HIDDEN,
message=deprecation_msg, message=deprecation_msg,
version='9.0.0', version='11.0.0',
previous_status=support.SupportStatus(version='2014.1') previous_status=support.SupportStatus(
status=support.DEPRECATED,
message=deprecation_msg,
version='9.0.0',
previous_status=support.SupportStatus(version='2014.1')
)
) )
required_service_extension = 'os-floating-ips' required_service_extension = 'os-floating-ips'
@ -130,10 +135,15 @@ class NovaFloatingIpAssociation(resource.Resource):
deprecation_msg = _( deprecation_msg = _(
'Please use OS::Neutron::FloatingIPAssociation instead.') 'Please use OS::Neutron::FloatingIPAssociation instead.')
support_status = support.SupportStatus( support_status = support.SupportStatus(
status=support.DEPRECATED, status=support.HIDDEN,
message=deprecation_msg, message=deprecation_msg,
version='9.0.0', version='11.0.0',
previous_status=support.SupportStatus(version='2014.1') previous_status=support.SupportStatus(
status=support.DEPRECATED,
message=deprecation_msg,
version='9.0.0',
previous_status=support.SupportStatus(version='2014.1')
)
) )
PROPERTIES = ( PROPERTIES = (

View File

@ -44,11 +44,7 @@ class ResourceTypeTest(common.HeatTestCase):
mock_is_service_available.return_value = (True, None) mock_is_service_available.return_value = (True, None)
resources = self.eng.list_resource_types(self.ctx, "DEPRECATED") resources = self.eng.list_resource_types(self.ctx, "DEPRECATED")
self.assertEqual(set(['OS::Aodh::Alarm', self.assertEqual(set(['OS::Aodh::Alarm',
'OS::Magnum::Bay', 'OS::Glance::Image']),
'OS::Magnum::BayModel',
'OS::Glance::Image',
'OS::Nova::FloatingIP',
'OS::Nova::FloatingIPAssociation']),
set(resources)) set(resources))
@mock.patch.object(res.Resource, 'is_service_available') @mock.patch.object(res.Resource, 'is_service_available')

View File

@ -0,0 +1,10 @@
---
upgrade:
- Resource type ``OS::Magnum::Bay`` is now hidden, please use
``OS::Magnum::Cluster`` instead.
- Resource type ``OS::Magnum::BayModele`` is now hidden, please use
``OS::Magnum::ClusterTemplate`` instead.
- Resource type ``OS::Nova::FloatingIP`` is now hidden, please use
``OS::Neutron::FloatingIP`` instead.
- Resource type ``OS::Nova::FloatingIPAssociation`` is now hidden, please use
``OS::Neutron::FloatingIPAssociation`` instead.