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,6 +29,10 @@ class Bay(resource.Resource):
deprecation_msg = _('Please use OS::Magnum::Cluster instead.')
support_status = support.SupportStatus(
status=support.HIDDEN,
message=deprecation_msg,
version='11.0.0',
previous_status=support.SupportStatus(
status=support.DEPRECATED,
message=deprecation_msg,
version='9.0.0',
@ -36,6 +40,7 @@ class Bay(resource.Resource):
status=support.SUPPORTED,
version='6.0.0')
)
)
PROPERTIES = (
NAME, BAYMODEL, NODE_COUNT, MASTER_COUNT, DISCOVERY_URL,

View File

@ -28,6 +28,10 @@ class BayModel(cluster_template.ClusterTemplate):
deprecate_msg = _('Please use OS::Magnum::ClusterTemplate instead.')
support_status = support.SupportStatus(
status=support.HIDDEN,
message=deprecate_msg,
version='11.0.0',
previous_status=support.SupportStatus(
status=support.DEPRECATED,
message=deprecate_msg,
version='9.0.0',
@ -36,6 +40,7 @@ class BayModel(cluster_template.ClusterTemplate):
version='5.0.0'),
substitute_class=cluster_template.ClusterTemplate
)
)
def translation_rules(self, props):
if props.get(self.SSH_AUTHORIZED_KEY):

View File

@ -38,11 +38,16 @@ class NovaFloatingIp(resource.Resource):
deprecation_msg = _('Please use OS::Neutron::FloatingIP instead.')
support_status = support.SupportStatus(
status=support.HIDDEN,
message=deprecation_msg,
version='11.0.0',
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'
@ -130,11 +135,16 @@ class NovaFloatingIpAssociation(resource.Resource):
deprecation_msg = _(
'Please use OS::Neutron::FloatingIPAssociation instead.')
support_status = support.SupportStatus(
status=support.HIDDEN,
message=deprecation_msg,
version='11.0.0',
previous_status=support.SupportStatus(
status=support.DEPRECATED,
message=deprecation_msg,
version='9.0.0',
previous_status=support.SupportStatus(version='2014.1')
)
)
PROPERTIES = (
SERVER, FLOATING_IP

View File

@ -44,11 +44,7 @@ class ResourceTypeTest(common.HeatTestCase):
mock_is_service_available.return_value = (True, None)
resources = self.eng.list_resource_types(self.ctx, "DEPRECATED")
self.assertEqual(set(['OS::Aodh::Alarm',
'OS::Magnum::Bay',
'OS::Magnum::BayModel',
'OS::Glance::Image',
'OS::Nova::FloatingIP',
'OS::Nova::FloatingIPAssociation']),
'OS::Glance::Image']),
set(resources))
@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.