Merge "Deprecate QUEUE_ID in heat_zaqar"

This commit is contained in:
Jenkins 2015-01-22 13:03:56 +00:00 committed by Gerrit Code Review
commit 12a717f926
2 changed files with 9 additions and 3 deletions

View File

@ -17,6 +17,7 @@ from heat.engine import attributes
from heat.engine import clients
from heat.engine import properties
from heat.engine import resource
from heat.engine import support
def resource_mapping():
@ -58,7 +59,13 @@ class ZaqarQueue(resource.Resource):
attributes_schema = {
QUEUE_ID: attributes.Schema(
_("ID of the queue."),
cache_mode=attributes.Schema.CACHE_NONE
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 : <resource_name> }")
)
),
HREF: attributes.Schema(
_("The resource href of the queue.")

View File

@ -46,7 +46,7 @@ wp_template = '''
},
"Outputs" : {
"queue_id": {
"Value": { "Fn::GetAtt" : [ "MyQueue2", "queue_id" ]},
"Value": { "Ref" : "MyQueue2" },
"Description": "queue name"
},
"queue_href": {
@ -116,7 +116,6 @@ class ZaqarMessageQueueTest(common.HeatTestCase):
scheduler.TaskRunner(queue.create)()
self.fc.api_url = 'http://127.0.0.1:8888/v1'
self.assertEqual('myqueue', queue.FnGetAtt('queue_id'))
self.assertEqual('http://127.0.0.1:8888/v1/queues/myqueue',
queue.FnGetAtt('href'))