diff --git a/contrib/heat_zaqar/heat_zaqar/resources/queue.py b/contrib/heat_zaqar/heat_zaqar/resources/queue.py index 1e4217062..3d743a469 100644 --- a/contrib/heat_zaqar/heat_zaqar/resources/queue.py +++ b/contrib/heat_zaqar/heat_zaqar/resources/queue.py @@ -54,9 +54,9 @@ class ZaqarQueue(resource.Resource): cache_mode=attributes.Schema.CACHE_NONE, support_status=support.SupportStatus( status=support.DEPRECATED, - message=_("Deprecated in kilo. " - "Use get_resource|Ref command instead. " - "For example: { get_resource : }") + message=_("Use get_resource|Ref command instead. " + "For example: { get_resource : }"), + version='2015.1' ) ), HREF: attributes.Schema( diff --git a/contrib/rackspace/rackspace/resources/cloudnetworks.py b/contrib/rackspace/rackspace/resources/cloudnetworks.py index e56898999..3869d9392 100644 --- a/contrib/rackspace/rackspace/resources/cloudnetworks.py +++ b/contrib/rackspace/rackspace/resources/cloudnetworks.py @@ -48,8 +48,9 @@ class CloudNetwork(resource.Resource): """ support_status = support.SupportStatus( - support.DEPRECATED, - _('Use OS::Neutron::Net instead.'), + status=support.DEPRECATED, + message=_('Use OS::Neutron::Net instead.'), + version='2015.1' ) PROPERTIES = ( diff --git a/heat/engine/resources/openstack/cinder/volume.py b/heat/engine/resources/openstack/cinder/volume.py index 42ba60bbe..9eb62f4a0 100644 --- a/heat/engine/resources/openstack/cinder/volume.py +++ b/heat/engine/resources/openstack/cinder/volume.py @@ -106,8 +106,9 @@ class CinderVolume(aws_vol.Volume): properties.Schema.STRING, _('The ID of the image to create the volume from.'), support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % IMAGE) + status=support.DEPRECATED, + message=_('Use property %s.') % IMAGE, + version='2014.1') ), IMAGE: properties.Schema( properties.Schema.STRING, diff --git a/heat/engine/resources/openstack/heat/cloud_watch.py b/heat/engine/resources/openstack/heat/cloud_watch.py index 7d5a98609..d350a21e4 100644 --- a/heat/engine/resources/openstack/heat/cloud_watch.py +++ b/heat/engine/resources/openstack/heat/cloud_watch.py @@ -143,7 +143,8 @@ class CloudWatchAlarm(resource.Resource): support_status = support.SupportStatus( status=support.DEPRECATED, message=_('OS::Heat::CWLiteAlarm is deprecated, ' - 'use OS::Ceilometer::Alarm instead.')) + 'use OS::Ceilometer::Alarm instead.'), + version='2014.2') def handle_create(self): wr = watchrule.WatchRule(context=self.context, diff --git a/heat/engine/resources/openstack/heat/ha_restarter.py b/heat/engine/resources/openstack/heat/ha_restarter.py index 0a062c0cf..32408d4e0 100644 --- a/heat/engine/resources/openstack/heat/ha_restarter.py +++ b/heat/engine/resources/openstack/heat/ha_restarter.py @@ -29,12 +29,13 @@ class Restarter(signal_responder.SignalResponder): support_status = support.SupportStatus( support.DEPRECATED, - _('The HARestarter resource type is unsupported and will be removed ' + _('The HARestarter resource type is deprecated and will be removed ' 'in a future release of Heat, once it has support for auto-healing ' 'any type of resource. Note that HARestarter does *not* actually ' 'restart servers - it deletes and then recreates them. It also does ' 'the same to all dependent resources, and may therefore exhibit ' - 'unexpected and undesirable behaviour. Avoid.') + 'unexpected and undesirable behaviour. Avoid.'), + version='2015.1' ) PROPERTIES = ( diff --git a/heat/engine/resources/openstack/heat/random_string.py b/heat/engine/resources/openstack/heat/random_string.py index f964e5c1e..dcc8e101f 100644 --- a/heat/engine/resources/openstack/heat/random_string.py +++ b/heat/engine/resources/openstack/heat/random_string.py @@ -79,8 +79,9 @@ class RandomString(resource.Resource): 'octdigits']), ], support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % CHARACTER_CLASSES + status=support.DEPRECATED, + message=_('Use property %s.') % CHARACTER_CLASSES, + version='2014.2' ) ), CHARACTER_CLASSES: properties.Schema( diff --git a/heat/engine/resources/openstack/neutron/floatingip.py b/heat/engine/resources/openstack/neutron/floatingip.py index 7c7c410f9..367b65ac9 100644 --- a/heat/engine/resources/openstack/neutron/floatingip.py +++ b/heat/engine/resources/openstack/neutron/floatingip.py @@ -44,8 +44,9 @@ class FloatingIP(neutron.NeutronResource): FLOATING_NETWORK_ID: properties.Schema( properties.Schema.STRING, support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % FLOATING_NETWORK), + status=support.DEPRECATED, + message=_('Use property %s.') % FLOATING_NETWORK, + version='2014.2'), required=False, constraints=[ constraints.CustomConstraint('neutron.network') diff --git a/heat/engine/resources/openstack/neutron/loadbalancer.py b/heat/engine/resources/openstack/neutron/loadbalancer.py index 645e72c7c..d05414e85 100644 --- a/heat/engine/resources/openstack/neutron/loadbalancer.py +++ b/heat/engine/resources/openstack/neutron/loadbalancer.py @@ -213,8 +213,9 @@ class Pool(neutron.NeutronResource): SUBNET_ID: properties.Schema( properties.Schema.STRING, support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % SUBNET), + status=support.DEPRECATED, + message=_('Use property %s.') % SUBNET, + version='2014.2'), required=False, constraints=[ constraints.CustomConstraint('neutron.subnet') diff --git a/heat/engine/resources/openstack/neutron/network_gateway.py b/heat/engine/resources/openstack/neutron/network_gateway.py index 4c1452e63..8ca3647df 100644 --- a/heat/engine/resources/openstack/neutron/network_gateway.py +++ b/heat/engine/resources/openstack/neutron/network_gateway.py @@ -95,8 +95,9 @@ class NetworkGateway(neutron.NeutronResource): NETWORK_ID: properties.Schema( properties.Schema.STRING, support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % NETWORK), + status=support.DEPRECATED, + message=_('Use property %s.') % NETWORK, + version='2014.2'), required=False, constraints=[ constraints.CustomConstraint('neutron.network') diff --git a/heat/engine/resources/openstack/neutron/port.py b/heat/engine/resources/openstack/neutron/port.py index 2a17ec1be..d9dcf228b 100644 --- a/heat/engine/resources/openstack/neutron/port.py +++ b/heat/engine/resources/openstack/neutron/port.py @@ -66,8 +66,9 @@ class Port(neutron.NeutronResource): NETWORK_ID: properties.Schema( properties.Schema.STRING, support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % NETWORK), + status=support.DEPRECATED, + message=_('Use property %s.') % NETWORK, + version='2014.2'), constraints=[ constraints.CustomConstraint('neutron.network') ], @@ -112,8 +113,9 @@ class Port(neutron.NeutronResource): FIXED_IP_SUBNET_ID: properties.Schema( properties.Schema.STRING, support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % FIXED_IP_SUBNET), + status=support.DEPRECATED, + message=_('Use property %s.') % FIXED_IP_SUBNET, + version='2014.2 '), constraints=[ constraints.CustomConstraint('neutron.subnet') ] diff --git a/heat/engine/resources/openstack/neutron/router.py b/heat/engine/resources/openstack/neutron/router.py index 17c9e0acb..c1c906ea7 100644 --- a/heat/engine/resources/openstack/neutron/router.py +++ b/heat/engine/resources/openstack/neutron/router.py @@ -90,8 +90,9 @@ class Router(neutron.NeutronResource): 'users only.'), update_allowed=True, support_status=support.SupportStatus( - support.DEPRECATED, - _('Deprecated in Kilo. Use property %s.') % L3_AGENT_IDS), + status=support.DEPRECATED, + version='2015.1', + message=_('Use property %s.') % L3_AGENT_IDS), ), L3_AGENT_IDS: properties.Schema( properties.Schema.LIST, @@ -272,8 +273,9 @@ class RouterInterface(neutron.NeutronResource): properties.Schema.STRING, _('ID of the router.'), support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % ROUTER), + status=support.DEPRECATED, + message=_('Use property %s.') % ROUTER, + version='2015.1'), constraints=[ constraints.CustomConstraint('neutron.router') ], @@ -281,8 +283,9 @@ class RouterInterface(neutron.NeutronResource): SUBNET_ID: properties.Schema( properties.Schema.STRING, support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % SUBNET), + status=support.DEPRECATED, + message=_('Use property %s.') % SUBNET, + version='2014.2'), constraints=[ constraints.CustomConstraint('neutron.subnet') ] @@ -299,9 +302,9 @@ class RouterInterface(neutron.NeutronResource): properties.Schema.STRING, _('The port id, either subnet or port_id should be specified.'), support_status=support.SupportStatus( - support.DEPRECATED, - _('Deprecated in Kilo. ' - 'Use property %s.') % PORT), + status=support.DEPRECATED, + message=_('Use property %s.') % PORT, + version='2015.1'), constraints=[ constraints.CustomConstraint('neutron.port') ] @@ -383,10 +386,10 @@ class RouterInterface(neutron.NeutronResource): class RouterGateway(neutron.NeutronResource): support_status = support.SupportStatus( - support.DEPRECATED, - _('RouterGateway resource is deprecated and should not be used. ' - 'Instead use the `external_gateway_info` property in the router ' - 'resource to set up the gateway.') + status=support.DEPRECATED, + message=_('Use the `external_gateway_info` property in ' + 'the router resource to set up the gateway.'), + version='2014.1' ) PROPERTIES = ( @@ -407,8 +410,9 @@ class RouterGateway(neutron.NeutronResource): NETWORK_ID: properties.Schema( properties.Schema.STRING, support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % NETWORK), + status=support.DEPRECATED, + message=_('Use property %s.') % NETWORK, + version='2014.2'), required=False, constraints=[ constraints.CustomConstraint('neutron.network') diff --git a/heat/engine/resources/openstack/neutron/subnet.py b/heat/engine/resources/openstack/neutron/subnet.py index 4455577c2..524af2ca6 100644 --- a/heat/engine/resources/openstack/neutron/subnet.py +++ b/heat/engine/resources/openstack/neutron/subnet.py @@ -64,8 +64,9 @@ class Subnet(neutron.NeutronResource): NETWORK_ID: properties.Schema( properties.Schema.STRING, support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % NETWORK), + status=support.DEPRECATED, + message=_('Use property %s.') % NETWORK, + version='2014.2'), required=False, constraints=[ constraints.CustomConstraint('neutron.network') @@ -78,6 +79,7 @@ class Subnet(neutron.NeutronResource): constraints=[ constraints.CustomConstraint('neutron.network') ], + support_status=support.SupportStatus(version='2014.2') ), CIDR: properties.Schema( properties.Schema.STRING, diff --git a/heat/engine/resources/openstack/neutron/vpnservice.py b/heat/engine/resources/openstack/neutron/vpnservice.py index a5c8b25b1..70d4e5b01 100644 --- a/heat/engine/resources/openstack/neutron/vpnservice.py +++ b/heat/engine/resources/openstack/neutron/vpnservice.py @@ -60,8 +60,9 @@ class VPNService(neutron.NeutronResource): SUBNET_ID: properties.Schema( properties.Schema.STRING, support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % SUBNET), + status=support.DEPRECATED, + message=_('Use property %s.') % SUBNET, + version='2014.2'), required=False, constraints=[ constraints.CustomConstraint('neutron.subnet') @@ -81,8 +82,9 @@ class VPNService(neutron.NeutronResource): _('Unique identifier for the router to which the vpn service ' 'will be inserted.'), support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s') % ROUTER), + status=support.DEPRECATED, + message=_('Use property %s') % ROUTER, + version='2015.1'), constraints=[ constraints.CustomConstraint('neutron.router') ] @@ -90,6 +92,7 @@ class VPNService(neutron.NeutronResource): ROUTER: properties.Schema( properties.Schema.STRING, _('The router to which the vpn service will be inserted.'), + support_status=support.SupportStatus(version='2015.1'), constraints=[ constraints.CustomConstraint('neutron.router') ] diff --git a/heat/engine/resources/openstack/nova/server.py b/heat/engine/resources/openstack/nova/server.py index cdc1f3dfe..1cc205968 100644 --- a/heat/engine/resources/openstack/nova/server.py +++ b/heat/engine/resources/openstack/nova/server.py @@ -291,11 +291,12 @@ class Server(stack_user.StackUser): ADMIN_USER: properties.Schema( properties.Schema.STRING, _('Name of the administrative user to use on the server. ' - 'This property will be removed from Juno in favor of the ' - 'default cloud-init user set up for each image (e.g. "ubuntu" ' - 'for Ubuntu 12.04+, "fedora" for Fedora 19+ and "cloud-user" ' - 'for CentOS/RHEL 6.5).'), - support_status=support.SupportStatus(status=support.DEPRECATED) + 'The default cloud-init user set up for each image ' + '(e.g. "ubuntu" for Ubuntu 12.04+, "fedora" for Fedora 19+ ' + 'and "cloud-user" for CentOS/RHEL 6.5).'), + support_status=support.SupportStatus( + status=support.DEPRECATED, + version='2014.1') ), AVAILABILITY_ZONE: properties.Schema( properties.Schema.STRING, @@ -319,8 +320,9 @@ class Server(stack_user.StackUser): properties.Schema.STRING, _('ID of network to create a port on.'), support_status=support.SupportStatus( - support.DEPRECATED, - _('Use property %s.') % NETWORK_ID), + status=support.DEPRECATED, + message=_('Use property %s.') % NETWORK_ID, + version='2014.1'), constraints=[ constraints.CustomConstraint('neutron.network') ] @@ -448,6 +450,7 @@ class Server(stack_user.StackUser): 'addresses from more than one network.'), support_status=support.SupportStatus( status=support.DEPRECATED, + version='2014.2', message=_('Use the networks attribute instead of ' 'first_address. For example: "{get_attr: ' '[, networks, , 0]}"') diff --git a/heat/engine/resources/openstack/sahara/sahara_cluster.py b/heat/engine/resources/openstack/sahara/sahara_cluster.py index 6b88f7911..5bb7b2401 100644 --- a/heat/engine/resources/openstack/sahara/sahara_cluster.py +++ b/heat/engine/resources/openstack/sahara/sahara_cluster.py @@ -80,9 +80,9 @@ class SaharaCluster(resource.Resource): properties.Schema.STRING, _('Name or UUID of the image used to boot Hadoop nodes.'), support_status=support.SupportStatus( - support.DEPRECATED, - _('Property was deprecated in Kilo release. ' - 'Use property %s.') % IMAGE_ID), + status=support.DEPRECATED, + message=_('Use property %s.') % IMAGE_ID, + version='2015.1'), constraints=[ constraints.CustomConstraint('glance.image') ], @@ -93,6 +93,7 @@ class SaharaCluster(resource.Resource): constraints=[ constraints.CustomConstraint('sahara.image'), ], + support_status=support.SupportStatus(version='2015.1') ), MANAGEMENT_NETWORK: properties.Schema( properties.Schema.STRING, diff --git a/heat/engine/support.py b/heat/engine/support.py index aef73ca3d..1ab5aa4e6 100644 --- a/heat/engine/support.py +++ b/heat/engine/support.py @@ -21,6 +21,14 @@ SUPPORT_STATUSES = (UNKNOWN, SUPPORTED, PROTOTYPE, DEPRECATED, class SupportStatus(object): def __init__(self, status=SUPPORTED, message=None, version=None): + """Use SupportStatus for current status of object. + + :param status: current status of object. + :param version: version of OpenStack, from which current status is + valid. It may be None, but need to be defined for correct + doc generating. + :param message: specific status message for object. + """ if status in SUPPORT_STATUSES: self.status = status self.message = message