adonig / aloisius

A Python library to create/update/delete AWS CloudFormation stacks in parallel
BSD 2-Clause "Simplified" License
15 stars 6 forks source link

Results #3

Closed diasjorge closed 7 years ago

diasjorge commented 7 years ago

This one builds on top of the previous pr. I'd like to have a method to iterate and get the result of all the stacks applied. I'm not too sure about the API and I'm open to ideas. What do you think?

adonig commented 7 years ago

Thank you for the commits! 71d34e4 is interesting. I'm not sure what I tried to achieve by submitting a future's result to the executor again using a lambda function. I hope it was a quirk in my brain :)

How about we add a list called stacks to aloisius/__init__.py? We could then do aloisius.stacks.append(self) in Stack.__init__. This would allow you to iterate all stacks and gather all results.

I also thought about using a collections.OrderedDict having StackNames as keys. But it would probably be more useful to make Stack a collections.Mapping using Stack._kwargs, so you can do stuff like stack['StackName'] etc. What do you think? :)

diasjorge commented 7 years ago

Hi,

I'll try to implement the suggestions in another pr.

I'd also like to add a method to know if anything failed to exit with a different status code

On 11 Mar 2017, at 13:29, Andreas Donig notifications@github.com wrote:

Thank you for the commits! 71d34e4 is interesting. I'm not sure what I tried to achieve by submitting a future's result to the executor again using a lambda function. I hope it was a quirk in my brain :)

How about we add a list called stacks to aloisius/init.py? We could then do aloisius.stacks.append(self) in Stack.init. This would allow you to iterate all stacks and gather all results.

I also thought about using a collections.OrderedDict having StackNames as keys. But it would probably be more useful to make Stack a collections.Mapping using Stack._kwargs, so you can do stuff like stack['StackName'] etc. What do you think? :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.