Skip to content

Commit

Permalink
Merge pull request boto#3515 from JordonPhillips/stack-name-fix
Browse files Browse the repository at this point in the history
Stack name fix
  • Loading branch information
JordonPhillips committed Mar 30, 2016
2 parents 46bc5a1 + 7b82d50 commit 1d75b6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion boto/cloudformation/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@ def __init__(self, connection=None):
self.tags = []
self.stack_id = None
self.stack_status = None
self.stack_status_reason = None
self.stack_name = None
self.stack_name_reason = None
self.timeout_in_minutes = None

@property
def stack_name_reason(self):
return self.stack_status_reason

@stack_name_reason.setter
def stack_name_reason(self, value):
self.stack_status_reason = value

def startElement(self, name, attrs, connection):
if name == "Parameters":
self.parameters = ResultSet([('member', Parameter)])
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/cloudformation/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ def default_body(self):
<member>
<StackId>arn:aws:cfn:us-east-1:1:stack</StackId>
<StackStatus>CREATE_COMPLETE</StackStatus>
<StackStatusReason>REASON</StackStatusReason>
<StackName>MyStack</StackName>
<StackStatusReason/>
<Description>My Description</Description>
<CreationTime>2012-05-16T22:55:31Z</CreationTime>
<Capabilities>
Expand Down Expand Up @@ -444,7 +444,8 @@ def test_describe_stacks(self):
self.assertEqual(stack.stack_id, 'arn:aws:cfn:us-east-1:1:stack')
self.assertEqual(stack.stack_status, 'CREATE_COMPLETE')
self.assertEqual(stack.stack_name, 'MyStack')
self.assertEqual(stack.stack_name_reason, None)
self.assertEqual(stack.stack_name_reason, 'REASON')
self.assertEqual(stack.stack_status_reason, 'REASON')
self.assertEqual(stack.timeout_in_minutes, None)

self.assertEqual(len(stack.outputs), 1)
Expand Down

0 comments on commit 1d75b6d

Please sign in to comment.