{"action":"created","issue":{"url":"https://api.github.com/repos/cloudtools/troposphere/issues/70","labels_url":"https://api.github.com/repos/cloudtools/troposphere/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/cloudtools/troposphere/issues/70/comments","events_url":"https://api.github.com/repos/cloudtools/troposphere/issues/70/events","html_url":"https://github.com/cloudtools/troposphere/pull/70","id":30452667,"number":70,"title":"Improved cfn2py","user":{"login":"mbrossard","id":376855,"avatar_url":"https://avatars.githubusercontent.com/u/376855?v=3","gravatar_id":"","url":"https://api.github.com/users/mbrossard","html_url":"https://github.com/mbrossard","followers_url":"https://api.github.com/users/mbrossard/followers","following_url":"https://api.github.com/users/mbrossard/following{/other_user}","gists_url":"https://api.github.com/users/mbrossard/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrossard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrossard/subscriptions","organizations_url":"https://api.github.com/users/mbrossard/orgs","repos_url":"https://api.github.com/users/mbrossard/repos","events_url":"https://api.github.com/users/mbrossard/events{/privacy}","received_events_url":"https://api.github.com/users/mbrossard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-03-29T21:02:36Z","updated_at":"2015-01-19T00:19:49Z","closed_at":"2015-01-19T00:19:34Z","pull_request":{"url":"https://api.github.com/repos/cloudtools/troposphere/pulls/70","html_url":"https://github.com/cloudtools/troposphere/pull/70","diff_url":"https://github.com/cloudtools/troposphere/pull/70.diff","patch_url":"https://github.com/cloudtools/troposphere/pull/70.patch"},"body":"Hi,\r\n\r\nI improved cfn2py to the point where it can roundtrip the examples (except for the OpenStack examples). It also works with some private files that include AWS::CloudFormation::Init sections.\r\n\r\nThough not perfect and not used every day, cfn2py was my gateway to using troposphere. I think these improvements might help the next future users to step onboard.\r\n\r\nTo test with the examples, I used the following script:\r\n```bash\r\n#!/bin/sh\r\n\r\nif ! [ -d tmp ] ; then mkdir tmp ; fi\r\n\r\nfor i in examples/*.py ; do\r\n    BASE=tmp/`basename $i .py`\r\n    if python $i >$BASE.json1 2>&1 ; then\r\n        echo $i;\r\n        ./scripts/cfn2py $BASE.json1 > $BASE.py ;\r\n        python $BASE.py > $BASE.json2 ;\r\n        cmp $BASE.json1 $BASE.json2\r\n    fi\r\ndone\r\n```\r\n\r\nSincerely,\r\nMathias Brossard\r\nPS: I haven't coded much in Python, so there is probably some room for improvement."},"comment":{"url":"https://api.github.com/repos/cloudtools/troposphere/issues/comments/70433852","html_url":"https://github.com/cloudtools/troposphere/pull/70#issuecomment-70433852","issue_url":"https://api.github.com/repos/cloudtools/troposphere/issues/70","id":70433852,"user":{"login":"phobologic","id":517334,"avatar_url":"https://avatars.githubusercontent.com/u/517334?v=3","gravatar_id":"","url":"https://api.github.com/users/phobologic","html_url":"https://github.com/phobologic","followers_url":"https://api.github.com/users/phobologic/followers","following_url":"https://api.github.com/users/phobologic/following{/other_user}","gists_url":"https://api.github.com/users/phobologic/gists{/gist_id}","starred_url":"https://api.github.com/users/phobologic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phobologic/subscriptions","organizations_url":"https://api.github.com/users/phobologic/orgs","repos_url":"https://api.github.com/users/phobologic/repos","events_url":"https://api.github.com/users/phobologic/events{/privacy}","received_events_url":"https://api.github.com/users/phobologic/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T00:19:49Z","updated_at":"2015-01-19T00:19:49Z","body":"Thanks @mbrossard for rebasing this and for the PR!"}}