create CloudFormation outputs and enable 'Fn::GetAtt' to work.

This commit is contained in:
Joseph Lawson 2014-10-21 12:45:03 -04:00
commit 1d9ffafaa5
10 changed files with 269 additions and 8 deletions

View file

@ -4,6 +4,7 @@ import hashlib
import time
import re
from boto.exception import BotoServerError
from moto.core import BaseBackend
from moto.core.utils import camelcase_to_underscores, get_random_message_id
from .utils import generate_receipt_handle, unix_time_millis
@ -152,6 +153,15 @@ class Queue(object):
def add_message(self, message):
self._messages.append(message)
def get_cfn_attribute(self, attribute_name):
if attribute_name == 'Arn':
return self.queue_arn
elif attribute_name == 'QueueName':
return self.name
raise BotoServerError(400,
'Bad Request',
'Template error: resource {0} does not support attribute type {1} in Fn::GetAtt')
class SQSBackend(BaseBackend):
def __init__(self):