)]}'
{"playbooks/inventory/bifrost.py":[{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"212d1933fc0475f4740e7de0f5140a0d1f69b0ee","unresolved":false,"context_lines":[{"line_number":15,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":16,"context_line":"# limitations under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"DOCUMENTATION \u003d \u0027\u0027\u0027"},{"line_number":19,"context_line":"Bifrost Inventory Module"},{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_3a4d09c5","line":18,"updated":"2015-05-25 17:03:37.000000000","message":"This should be mentioned in README.rst, I think.","commit_id":"793bcfa9e78663372a8c52d9cc909d25c0c147d6"},{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"e2b26199b47726f2b52b3df68f60cd1ad665483f","unresolved":false,"context_lines":[{"line_number":38,"context_line":"inventory."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Presently, the base mode of operation reads a file defined by the environment"},{"line_number":41,"context_line":"variable BAREMETAL_CSV_FILE, and returns structured JSON that is interpretted"},{"line_number":42,"context_line":"by Ansible."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Conceivably, this can be extended to allow for direct processing of JSON or"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_cc2f633d","line":41,"updated":"2015-05-25 15:24:41.000000000","message":"s/interpretted/interpreted/","commit_id":"793bcfa9e78663372a8c52d9cc909d25c0c147d6"},{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"e2b26199b47726f2b52b3df68f60cd1ad665483f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"One can also just direclty invoke bifrost.py in order to see the resulting"},{"line_number":54,"context_line":"JSON output."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"Deficienies"},{"line_number":57,"context_line":"-----------"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"Presently this module only supports inventory list mode and is not presently"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_ecb8dfea","line":56,"updated":"2015-05-25 15:24:41.000000000","message":"s/Deficienies/Deficiencies/","commit_id":"793bcfa9e78663372a8c52d9cc909d25c0c147d6"},{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"e2b26199b47726f2b52b3df68f60cd1ad665483f","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            # Basic default"},{"line_number":109,"context_line":"            host[\u0027ipmi_bridging\u0027] \u003d False"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"            # If we know there are greater than 12 columns, we can gleen"},{"line_number":112,"context_line":"            # additional information from the file."},{"line_number":113,"context_line":"            if len(row) \u003e 12:"},{"line_number":114,"context_line":"                host[\u0027ipmi_target_channel\u0027] \u003d _val_or_none(row, 12)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_0c9b3b74","line":111,"updated":"2015-05-25 15:24:41.000000000","message":"gleen?","commit_id":"793bcfa9e78663372a8c52d9cc909d25c0c147d6"},{"author":{"_account_id":11555,"name":"Peter Martini","email":"pmartini2@bloomberg.net","username":"PeterMartini"},"change_message_id":"5f7fd8b5c4f3b2af17446b0058b22e8d60d304c8","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            # Basic default"},{"line_number":109,"context_line":"            host[\u0027ipmi_bridging\u0027] \u003d False"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"            # If we know there are greater than 12 columns, we can gleen"},{"line_number":112,"context_line":"            # additional information from the file."},{"line_number":113,"context_line":"            if len(row) \u003e 12:"},{"line_number":114,"context_line":"                host[\u0027ipmi_target_channel\u0027] \u003d _val_or_none(row, 12)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a016987_4772fa7d","line":111,"in_reply_to":"7a016987_0c9b3b74","updated":"2015-05-27 03:47:27.000000000","message":"Should be \u0027glean\u0027.  I\u0027m not sure how to parse your question; was it just a matter of looking for the real word, or questioning the usage at all?","commit_id":"793bcfa9e78663372a8c52d9cc909d25c0c147d6"}],"playbooks/inventory/bifrost_inventory.py":[{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"1dc64cd693370e79ca3fc407191ff4eb32c99d79","unresolved":false,"context_lines":[{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This is a dynamic inventory module intended to provide a platform for"},{"line_number":23,"context_line":"consistent inventory information for Bifrost via a flexible platform"},{"line_number":24,"context_line":"for translation and decisions based upon inventory information."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"The inventory currently supplies two distinct groups:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_93486689","line":23,"updated":"2015-06-05 17:58:17.000000000","message":"This sentence is kind of confusing, especially since we\u0027re using some of the same terms twice. It seems to me that the important facts we want to get across are:\n- this is an inventory module\n- it dynamically generates the inventory\n- the inventory generated is consistent across runs\n\nAnd some questions:\n- we say that this is a flexible platform - how or why is it flexible?\n- we say that decisions can be made based on the inventory information - what are they?\n- I don\u0027t understand what \u0027translation\u0027 refers to in this context.\n\nI feel like this will be more clear if we can break it up into smaller bites and expand on some of these terms.","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9490cd2d45d4152b19543e62bac1ecc46cf7793a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"This is a dynamic inventory module intended to provide a platform for"},{"line_number":23,"context_line":"consistent inventory information for Bifrost via a flexible platform"},{"line_number":24,"context_line":"for translation and decisions based upon inventory information."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"The inventory currently supplies two distinct groups:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_d7a7b54d","line":23,"in_reply_to":"3afb71cf_93486689","updated":"2015-06-06 16:31:51.000000000","message":"I think part of the issue is the repetition that I had in place.  I\u0027ve streamlined it so hopefully easier to read and comprehend.\n\nI see it being flexible in that anyone, in the end, should be able to easily adapt to meet their operational needs.\n\nThe decisions I was referencing were decisions that could be made in playbooks based on information in the inventory.","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"1dc64cd693370e79ca3fc407191ff4eb32c99d79","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    - baremetal"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"The localhost group is supplied to Bifrost for local actions to be performed"},{"line_number":32,"context_line":"upon the local host such as installing Ironic."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"The baremetal group is supplied with all hosts that are presently loaded in"},{"line_number":35,"context_line":"via the original data source, a CSV file which defines the basic core set of"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_391d1367","line":32,"updated":"2015-06-05 17:58:17.000000000","message":"This is a bit repetitious - perhaps we could streamline it into something like\n\nThe localhost group is used for actions on localhost, such as installing ironic.","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9490cd2d45d4152b19543e62bac1ecc46cf7793a","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    - baremetal"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"The localhost group is supplied to Bifrost for local actions to be performed"},{"line_number":32,"context_line":"upon the local host such as installing Ironic."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"The baremetal group is supplied with all hosts that are presently loaded in"},{"line_number":35,"context_line":"via the original data source, a CSV file which defines the basic core set of"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_d74b35af","line":32,"in_reply_to":"3afb71cf_391d1367","updated":"2015-06-06 16:31:51.000000000","message":"Revised in the next revision.","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"1dc64cd693370e79ca3fc407191ff4eb32c99d79","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"The baremetal group is supplied with all hosts that are presently loaded in"},{"line_number":35,"context_line":"via the original data source, a CSV file which defines the basic core set of"},{"line_number":36,"context_line":"required information.  This allows actions to be invoked to explicitly perform"},{"line_number":37,"context_line":"actions such as enrollment and provisioning of baremetal nodes based upon the"},{"line_number":38,"context_line":"inventory."},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_3da4bf55","line":36,"updated":"2015-06-05 17:58:17.000000000","message":"The second sentence in this paragraph is a little confusing. Does \u0027this\u0027 refer to the data loaded from the CSV? It sounds like what we want to get across is:\n- we load data from the CSV\n- we use this to create the inventory\n- given the inventory, we can enroll and provision the baremetal nodes","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9490cd2d45d4152b19543e62bac1ecc46cf7793a","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"The baremetal group is supplied with all hosts that are presently loaded in"},{"line_number":35,"context_line":"via the original data source, a CSV file which defines the basic core set of"},{"line_number":36,"context_line":"required information.  This allows actions to be invoked to explicitly perform"},{"line_number":37,"context_line":"actions such as enrollment and provisioning of baremetal nodes based upon the"},{"line_number":38,"context_line":"inventory."},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_1752ed67","line":36,"in_reply_to":"3afb71cf_3da4bf55","updated":"2015-06-06 16:31:51.000000000","message":"Okay, I\u0027ve tried to revise this a little.","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"1dc64cd693370e79ca3fc407191ff4eb32c99d79","unresolved":false,"context_lines":[{"line_number":37,"context_line":"actions such as enrollment and provisioning of baremetal nodes based upon the"},{"line_number":38,"context_line":"inventory."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Presently, the base mode of operation reads a file defined by the environment"},{"line_number":41,"context_line":"variable BAREMETAL_CSV_FILE, and returns structured JSON that is interpreted"},{"line_number":42,"context_line":"by Ansible."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_7925cbc0","line":40,"updated":"2015-06-05 17:58:17.000000000","message":"We could incorporate mention of this variable into the previous paragraph and then combine these two paragraphs to describe how we could in future directly process the JSON.","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9490cd2d45d4152b19543e62bac1ecc46cf7793a","unresolved":false,"context_lines":[{"line_number":37,"context_line":"actions such as enrollment and provisioning of baremetal nodes based upon the"},{"line_number":38,"context_line":"inventory."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"Presently, the base mode of operation reads a file defined by the environment"},{"line_number":41,"context_line":"variable BAREMETAL_CSV_FILE, and returns structured JSON that is interpreted"},{"line_number":42,"context_line":"by Ansible."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_f74991d1","line":40,"in_reply_to":"3afb71cf_7925cbc0","updated":"2015-06-06 16:31:51.000000000","message":"Done, I\u0027ve reworded it to try and be updated and less awkward and represent the current state of the code.","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"1dc64cd693370e79ca3fc407191ff4eb32c99d79","unresolved":false,"context_lines":[{"line_number":41,"context_line":"variable BAREMETAL_CSV_FILE, and returns structured JSON that is interpreted"},{"line_number":42,"context_line":"by Ansible."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Conceivably, this can be extended to allow for direct processing of JSON or"},{"line_number":45,"context_line":"some other data source."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"How to use?"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_99b407d2","line":44,"updated":"2015-06-05 17:58:17.000000000","message":"Just to be clear - \"this\" here is the inventory module, right?","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9490cd2d45d4152b19543e62bac1ecc46cf7793a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"variable BAREMETAL_CSV_FILE, and returns structured JSON that is interpreted"},{"line_number":42,"context_line":"by Ansible."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"Conceivably, this can be extended to allow for direct processing of JSON or"},{"line_number":45,"context_line":"some other data source."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"How to use?"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_f7f2b199","line":44,"in_reply_to":"3afb71cf_99b407d2","updated":"2015-06-06 16:31:51.000000000","message":"It is.  Reworded.","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"ca0773d2d552569ad94c1a591af7cdc115de55fb","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    export BIFROST_INVENTORY_SOURCE\u003dCSV:/tmp/baremetal.csv"},{"line_number":51,"context_line":"    ansible-playbook playbook.yaml -i inventory/bifrost_inventory.py"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"One can also just direclty invoke bifrost.py in order to see the resulting"},{"line_number":54,"context_line":"JSON output.  This module also has a feature to support the pass-through"},{"line_number":55,"context_line":"of a pre-existing json document, which receives updates and formatting to"},{"line_number":56,"context_line":"be supplied to Ansible.  Ultimately the use of JSON will be far more"}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_c206751c","line":53,"updated":"2015-06-04 17:46:27.000000000","message":"bifrost.py or bifrost_inventory.py???","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a14f2fdb52715a6ef3e0b9304d78a702aa4f3e59","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    export BIFROST_INVENTORY_SOURCE\u003dCSV:/tmp/baremetal.csv"},{"line_number":51,"context_line":"    ansible-playbook playbook.yaml -i inventory/bifrost_inventory.py"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"One can also just direclty invoke bifrost.py in order to see the resulting"},{"line_number":54,"context_line":"JSON output.  This module also has a feature to support the pass-through"},{"line_number":55,"context_line":"of a pre-existing json document, which receives updates and formatting to"},{"line_number":56,"context_line":"be supplied to Ansible.  Ultimately the use of JSON will be far more"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_b89ea105","line":53,"in_reply_to":"5afe65bd_c206751c","updated":"2015-06-04 21:15:33.000000000","message":"bifrost_inventory.py.  Good catch, I\u0027ll update in my next update of this revision.","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"1dc64cd693370e79ca3fc407191ff4eb32c99d79","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"One can also just direclty invoke bifrost.py in order to see the resulting"},{"line_number":54,"context_line":"JSON output.  This module also has a feature to support the pass-through"},{"line_number":55,"context_line":"of a pre-existing json document, which receives updates and formatting to"},{"line_number":56,"context_line":"be supplied to Ansible.  Ultimately the use of JSON will be far more"},{"line_number":57,"context_line":"flexible and should be the preferred path forward."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_19d8171d","line":55,"updated":"2015-06-05 17:58:17.000000000","message":"Capitalize JSON here.","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9490cd2d45d4152b19543e62bac1ecc46cf7793a","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"One can also just direclty invoke bifrost.py in order to see the resulting"},{"line_number":54,"context_line":"JSON output.  This module also has a feature to support the pass-through"},{"line_number":55,"context_line":"of a pre-existing json document, which receives updates and formatting to"},{"line_number":56,"context_line":"be supplied to Ansible.  Ultimately the use of JSON will be far more"},{"line_number":57,"context_line":"flexible and should be the preferred path forward."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_5703c573","line":55,"in_reply_to":"3afb71cf_19d8171d","updated":"2015-06-06 16:31:51.000000000","message":"Done","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"1dc64cd693370e79ca3fc407191ff4eb32c99d79","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    ansible-playbook playbook.yaml -i inventory/bifrost_inventory.py"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"Deficienices"},{"line_number":99,"context_line":"-----------"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Presently this module only supports inventory list mode and is not presently"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_0b055ec1","line":98,"updated":"2015-06-05 17:58:17.000000000","message":"typo - \u0027deficiencies\u0027","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9490cd2d45d4152b19543e62bac1ecc46cf7793a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    ansible-playbook playbook.yaml -i inventory/bifrost_inventory.py"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"Deficienices"},{"line_number":99,"context_line":"-----------"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Presently this module only supports inventory list mode and is not presently"}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_776da103","line":98,"in_reply_to":"3afb71cf_0b055ec1","updated":"2015-06-06 16:31:51.000000000","message":"Done","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"1dc64cd693370e79ca3fc407191ff4eb32c99d79","unresolved":false,"context_lines":[{"line_number":98,"context_line":"Deficienices"},{"line_number":99,"context_line":"-----------"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Presently this module only supports inventory list mode and is not presently"},{"line_number":102,"context_line":"intended to be updated to support specific host queries."},{"line_number":103,"context_line":"\u0027\u0027\u0027"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_bda78f4e","line":101,"updated":"2015-06-05 17:58:17.000000000","message":"To avoid repeating ourselves here we could say something like:\n\n\"At present, this module only supports inventory list mode and is not intended to support specific host queries.\"","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9490cd2d45d4152b19543e62bac1ecc46cf7793a","unresolved":false,"context_lines":[{"line_number":98,"context_line":"Deficienices"},{"line_number":99,"context_line":"-----------"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"Presently this module only supports inventory list mode and is not presently"},{"line_number":102,"context_line":"intended to be updated to support specific host queries."},{"line_number":103,"context_line":"\u0027\u0027\u0027"},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3afb71cf_5772a5e6","line":101,"in_reply_to":"3afb71cf_bda78f4e","updated":"2015-06-06 16:31:51.000000000","message":"I like it!  Done!","commit_id":"d802c4bd44121c55028d73442e5a242e76b48359"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3f6ed214972aacad72a73f146d993de03b884c4f","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def _process_baremetal_json(baremetal_file, groups, hostvars):"},{"line_number":125,"context_line":"    with open(baremetal_file, \u0027rb\u0027) as jsonfile:"},{"line_number":126,"context_line":"        json_data \u003d json.loads(jsonfile.read())"},{"line_number":127,"context_line":"        for name in json_data:"},{"line_number":128,"context_line":"            host \u003d json_data[name]"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_5604077d","line":126,"updated":"2015-06-05 12:05:55.000000000","message":"nit: json_data \u003d json.load(jsonfile)","commit_id":"a9ce245a01ed53ddb005bbf6e9070e1431308588"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"1862f242ef9508ef6083fffc90f34c0564ebf3d7","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"def _process_baremetal_json(baremetal_file, groups, hostvars):"},{"line_number":125,"context_line":"    with open(baremetal_file, \u0027rb\u0027) as jsonfile:"},{"line_number":126,"context_line":"        json_data \u003d json.loads(jsonfile.read())"},{"line_number":127,"context_line":"        for name in json_data:"},{"line_number":128,"context_line":"            host \u003d json_data[name]"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_314f5594","line":126,"in_reply_to":"3afb71cf_5604077d","updated":"2015-06-05 12:42:51.000000000","message":"I tried that originally and it didn\u0027t work, but maybe it was something else I was doing.","commit_id":"a9ce245a01ed53ddb005bbf6e9070e1431308588"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3f6ed214972aacad72a73f146d993de03b884c4f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    with open(baremetal_file, \u0027rb\u0027) as csvfile:"},{"line_number":143,"context_line":"        csvcontents \u003d csv.reader(csvfile, delimiter\u003d\u0027,\u0027)"},{"line_number":144,"context_line":"        for row in csvcontents:"},{"line_number":145,"context_line":"            if len(row) is 0:"},{"line_number":146,"context_line":"                break"},{"line_number":147,"context_line":"            host \u003d {}"},{"line_number":148,"context_line":"            driver \u003d None"}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_36098b96","line":145,"updated":"2015-06-05 12:05:55.000000000","message":"better\n\n if not row:\n\ninteger interning, while always happens with cpython, generally should not be relied upon","commit_id":"a9ce245a01ed53ddb005bbf6e9070e1431308588"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"1862f242ef9508ef6083fffc90f34c0564ebf3d7","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    with open(baremetal_file, \u0027rb\u0027) as csvfile:"},{"line_number":143,"context_line":"        csvcontents \u003d csv.reader(csvfile, delimiter\u003d\u0027,\u0027)"},{"line_number":144,"context_line":"        for row in csvcontents:"},{"line_number":145,"context_line":"            if len(row) is 0:"},{"line_number":146,"context_line":"                break"},{"line_number":147,"context_line":"            host \u003d {}"},{"line_number":148,"context_line":"            driver \u003d None"}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_b15b4554","line":145,"in_reply_to":"3afb71cf_36098b96","updated":"2015-06-05 12:42:51.000000000","message":"Oh, good point, I\u0027ll change that!","commit_id":"a9ce245a01ed53ddb005bbf6e9070e1431308588"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"4e2b2424bc2eb0c2489a4276f72ce1ed9f8565c4","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            host[\u0027nics\u0027] \u003d [{"},{"line_number":153,"context_line":"                \u0027mac\u0027: _val_or_none(row, 0)}]"},{"line_number":154,"context_line":"            # Temporary variables for ease of reading"},{"line_number":155,"context_line":"            management_username \u003d _val_or_none(row, 1)"},{"line_number":156,"context_line":"            management_password \u003d _val_or_none(row, 2)"},{"line_number":157,"context_line":"            management_address \u003d _val_or_none(row, 3)"},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_45cc4135","line":155,"updated":"2015-06-05 19:06:59.000000000","message":"I think we can get rid of _val_or_none and do something like:\n\nmanagement_username \u003d row[1] or None","commit_id":"815df03e1c5f453664b064ca238bd988d27b25b5"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"4e2b2424bc2eb0c2489a4276f72ce1ed9f8565c4","unresolved":false,"context_lines":[{"line_number":230,"context_line":"    (groups, hostvars) \u003d _prepare_inventory()"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    if \u0027BIFROST_INVENTORY_SOURCE\u0027 not in os.environ:"},{"line_number":233,"context_line":"        print(\u0027ERROR: Please define a BIFROST_INVENTORY_SOURCE environment \u0027"},{"line_number":234,"context_line":"              \u0027variable with a comma separated list of data sources\u0027)"},{"line_number":235,"context_line":"        exit(1)"},{"line_number":236,"context_line":"    # TODO try/except wrapping"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_0373e181","line":233,"updated":"2015-06-05 19:06:59.000000000","message":"We might want to explain here what the format is for the environment variable - specifically, that you can have CSV:filename or JSON:filename.","commit_id":"815df03e1c5f453664b064ca238bd988d27b25b5"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"4e2b2424bc2eb0c2489a4276f72ce1ed9f8565c4","unresolved":false,"context_lines":[{"line_number":240,"context_line":"    # if \u0027ironic\u0027 in os.environ[\u0027BIFROST_INVENTORY_SOURCE\u0027]:"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    data_source \u003d os.environ[\u0027BIFROST_INVENTORY_SOURCE\u0027]"},{"line_number":243,"context_line":"    if \u0027:\u0027 in data_source:"},{"line_number":244,"context_line":"        (type, file) \u003d data_source.split(\u0027:\u0027)"},{"line_number":245,"context_line":"        if not os.path.isfile(file):"},{"line_number":246,"context_line":"            print(\u0027ERROR: BIFROST_INVENTORY_SOURCE does not define a file\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_a373ed4c","line":243,"updated":"2015-06-05 19:06:59.000000000","message":"We could also look at the file extension here to determine type rather than specifying it explicitly.","commit_id":"815df03e1c5f453664b064ca238bd988d27b25b5"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"4e2b2424bc2eb0c2489a4276f72ce1ed9f8565c4","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        if not os.path.isfile(file):"},{"line_number":246,"context_line":"            print(\u0027ERROR: BIFROST_INVENTORY_SOURCE does not define a file\u0027)"},{"line_number":247,"context_line":"            exit(1)"},{"line_number":248,"context_line":"        if \u0027CSV\u0027 in type:"},{"line_number":249,"context_line":"            (groups, hostvars) \u003d _process_baremetal_csv(file, groups, hostvars)"},{"line_number":250,"context_line":"        if \u0027JSON\u0027 in type:"},{"line_number":251,"context_line":"            (groups, hostvars) \u003d _process_baremetal_json(file, groups, hostvars)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_e3232504","line":248,"updated":"2015-06-05 19:06:59.000000000","message":"A different take on this would be to open your file, then just try processing it as CSV and deal with the exception by falling back to processing it as JSON, then fail if that fails.","commit_id":"815df03e1c5f453664b064ca238bd988d27b25b5"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"811ddfb899bdf91ec85ea9b507a8a849c0372a9c","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        if not os.path.isfile(file):"},{"line_number":246,"context_line":"            print(\u0027ERROR: BIFROST_INVENTORY_SOURCE does not define a file\u0027)"},{"line_number":247,"context_line":"            exit(1)"},{"line_number":248,"context_line":"        if \u0027CSV\u0027 in type:"},{"line_number":249,"context_line":"            (groups, hostvars) \u003d _process_baremetal_csv(file, groups, hostvars)"},{"line_number":250,"context_line":"        if \u0027JSON\u0027 in type:"},{"line_number":251,"context_line":"            (groups, hostvars) \u003d _process_baremetal_json(file, groups, hostvars)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_cb1362b7","line":248,"in_reply_to":"3afb71cf_7a09082c","updated":"2015-06-08 19:35:22.000000000","message":"Sounds fine to me. If we do that we can get rid of the check for the user manually specifying the data type too.","commit_id":"815df03e1c5f453664b064ca238bd988d27b25b5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"514fe3550cf0902803d221b13685ec0e82d57381","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        if not os.path.isfile(file):"},{"line_number":246,"context_line":"            print(\u0027ERROR: BIFROST_INVENTORY_SOURCE does not define a file\u0027)"},{"line_number":247,"context_line":"            exit(1)"},{"line_number":248,"context_line":"        if \u0027CSV\u0027 in type:"},{"line_number":249,"context_line":"            (groups, hostvars) \u003d _process_baremetal_csv(file, groups, hostvars)"},{"line_number":250,"context_line":"        if \u0027JSON\u0027 in type:"},{"line_number":251,"context_line":"            (groups, hostvars) \u003d _process_baremetal_json(file, groups, hostvars)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_7a09082c","line":248,"in_reply_to":"3afb71cf_e3232504","updated":"2015-06-06 16:50:22.000000000","message":"I think this would actually be best.  Open the file once, attempt to parse, and if parsing is successful hand it off to the helper with the object to process.  Thoughts?","commit_id":"815df03e1c5f453664b064ca238bd988d27b25b5"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"5110cbe6517bc7bb4651741c90dd85d4cdeda57d","unresolved":false,"context_lines":[{"line_number":93,"context_line":"}"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    export BIFROST_INVENTORY_SOURCE\u003dJSON:/tmp/baremetal.json"},{"line_number":96,"context_line":"    ansible-playbook playbook.yaml -i inventory/bifrost_inventory.py"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"Deficiencies"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_5aecde8e","line":96,"updated":"2015-06-08 18:15:53.000000000","message":"this example seems strangely placed. it is the same as the above example just the input format is changed. may be easier to represent in the above example as: \"BIFROST_INVENTORY_SOURCE\u003dJSON:/tmp/baremetal.{ csv | json }\"","commit_id":"8c1f38d4145869074f8986946db18c78f332ceb3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9a5334a5385a7f2f1f067f944a29639f7b077533","unresolved":false,"context_lines":[{"line_number":93,"context_line":"}"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    export BIFROST_INVENTORY_SOURCE\u003dJSON:/tmp/baremetal.json"},{"line_number":96,"context_line":"    ansible-playbook playbook.yaml -i inventory/bifrost_inventory.py"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"Deficiencies"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_02c71846","line":96,"in_reply_to":"3afb71cf_5aecde8e","updated":"2015-06-09 18:41:17.000000000","message":"Agreed, will update the reference above.  Changing the formatting to be auto-detected in the next revision.","commit_id":"8c1f38d4145869074f8986946db18c78f332ceb3"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"5110cbe6517bc7bb4651741c90dd85d4cdeda57d","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    ansible-playbook playbook.yaml -i inventory/bifrost_inventory.py"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"Deficiencies"},{"line_number":100,"context_line":"------------"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"At present, this module only supports inventory list mode and is not"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_9a7db6e9","line":99,"updated":"2015-06-08 18:15:53.000000000","message":"may be Known Issues, Deficiencies just doesn\u0027t sound right to me.","commit_id":"8c1f38d4145869074f8986946db18c78f332ceb3"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"9a5334a5385a7f2f1f067f944a29639f7b077533","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    ansible-playbook playbook.yaml -i inventory/bifrost_inventory.py"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"Deficiencies"},{"line_number":100,"context_line":"------------"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"At present, this module only supports inventory list mode and is not"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_e2c51c3c","line":99,"in_reply_to":"3afb71cf_9a7db6e9","updated":"2015-06-09 18:41:17.000000000","message":"Done","commit_id":"8c1f38d4145869074f8986946db18c78f332ceb3"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"f6b7f1dea741cf3729f5bfeab7615ea8f7f87d9e","unresolved":false,"context_lines":[{"line_number":110,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"opts \u003d ["},{"line_number":113,"context_line":"    cfg.BoolOpt(\u0027list\u0027,"},{"line_number":114,"context_line":"                default\u003dTrue,"},{"line_number":115,"context_line":"                help\u003d\u0027List active hosts\u0027),"},{"line_number":116,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":11,"id":"3afb71cf_15a5d745","line":113,"updated":"2015-06-10 15:46:04.000000000","message":"I\u0027m guessing we\u0027ll document this option when host queries are implemented?","commit_id":"4e372ca33a3081cbeeb02f5fd2dd7ce34926bd6a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"32a95f6eba40f2e1f83cf11c6fb5dd8bbcf3fbfd","unresolved":false,"context_lines":[{"line_number":110,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"opts \u003d ["},{"line_number":113,"context_line":"    cfg.BoolOpt(\u0027list\u0027,"},{"line_number":114,"context_line":"                default\u003dTrue,"},{"line_number":115,"context_line":"                help\u003d\u0027List active hosts\u0027),"},{"line_number":116,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":11,"id":"3afb71cf_ce00a204","line":113,"in_reply_to":"3afb71cf_15a5d745","updated":"2015-06-10 19:17:40.000000000","message":"Truly it so the script does not fail when --list is passed to it, as Ansible does so.  I personally don\u0027t see a need to implement host mode for the inventory.","commit_id":"4e372ca33a3081cbeeb02f5fd2dd7ce34926bd6a"}]}
