)]}'
{"doc/source/index.rst":[{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"1453fe1ff8b965f59b5e47fdbaaaddc4356a52b6","unresolved":false,"context_lines":[{"line_number":69,"context_line":"Inspector`_. Edit your default PXE/iPXE configuration and set"},{"line_number":70,"context_line":"``ipa-inspection-callback-url`` to the full endpoint of Ironic Inspector,"},{"line_number":71,"context_line":"for example::"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    ipa-inspection-callback-url\u003dhttp://IP:5050/v1/continue"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Make sure your DHCP environment is set to boot IPA by default."}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a4dcd0f_5e5b1a86","line":72,"updated":"2015-08-13 07:40:22.000000000","message":"It would be better adding [agent] here","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"94021e3868529f7f9a6daee17522a96f54b90d50","unresolved":false,"context_lines":[{"line_number":69,"context_line":"Inspector`_. Edit your default PXE/iPXE configuration and set"},{"line_number":70,"context_line":"``ipa-inspection-callback-url`` to the full endpoint of Ironic Inspector,"},{"line_number":71,"context_line":"for example::"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    ipa-inspection-callback-url\u003dhttp://IP:5050/v1/continue"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Make sure your DHCP environment is set to boot IPA by default."}],"source_content_type":"text/x-rst","patch_set":13,"id":"1a4dcd0f_0863fdb1","line":72,"in_reply_to":"1a4dcd0f_5e5b1a86","updated":"2015-08-13 12:58:32.000000000","message":"that\u0027s not a configuration file in our sense, it\u0027s pxelinux conf file.","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"4ead01275e236ec72bd66de959a4e6cad956a6f7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"``ipa-inspection-callback-url`` to the full endpoint of Ironic Inspector,"},{"line_number":71,"context_line":"for example::"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    ipa-inspection-callback-url\u003dhttp://IP:5050/v1/continue"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Make sure your DHCP environment is set to boot IPA by default."},{"line_number":76,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"da20952f_427b5fbe","line":73,"updated":"2015-09-04 17:25:35.000000000","message":"You may want to indicate that this can also be baked into the IPA image as a command line option.","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"30eca8b12b7ddffbe226f2d6c195487b5031247a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"~~~~~~~~~~"},{"line_number":68,"context_line":"IPA can conduct hardware inspection on start up and post data to the `Ironic"},{"line_number":69,"context_line":"Inspector`_. Edit your default PXE/iPXE configuration or kernel command"},{"line_number":70,"context_line":"options baked in the image, and set ``ipa-inspection-callback-url`` to the"},{"line_number":71,"context_line":"full endpoint of Ironic Inspector, for example::"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    ipa-inspection-callback-url\u003dhttp://IP:5050/v1/continue"}],"source_content_type":"text/x-rst","patch_set":19,"id":"da20952f_03086d27","line":70,"updated":"2015-09-09 18:01:45.000000000","message":"Well, I was thinking more like command line options baked into the IPA Command line in the image :)","commit_id":"096830414bc2096af2319d33a0098ae9aad1de71"}],"ironic_python_agent/agent.py":[{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"1453fe1ff8b965f59b5e47fdbaaaddc4356a52b6","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            # NOTE(dtantsur): data processing takes some time to finish."},{"line_number":287,"context_line":"            # If we fail lookup right after inspection, assume inspection"},{"line_number":288,"context_line":"            # didn\u0027t finish yet."},{"line_number":289,"context_line":"            max_attempts \u003d 3"},{"line_number":290,"context_line":"            for attempt in range(max_attempts):"},{"line_number":291,"context_line":"                try:"},{"line_number":292,"context_line":"                    content \u003d self.api_client.lookup_node("}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_cace7f59","line":289,"updated":"2015-08-13 07:40:22.000000000","message":"Why not make max_attempts configurable?","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"94021e3868529f7f9a6daee17522a96f54b90d50","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            # NOTE(dtantsur): data processing takes some time to finish."},{"line_number":287,"context_line":"            # If we fail lookup right after inspection, assume inspection"},{"line_number":288,"context_line":"            # didn\u0027t finish yet."},{"line_number":289,"context_line":"            max_attempts \u003d 3"},{"line_number":290,"context_line":"            for attempt in range(max_attempts):"},{"line_number":291,"context_line":"                try:"},{"line_number":292,"context_line":"                    content \u003d self.api_client.lookup_node("}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_886f0d91","line":289,"in_reply_to":"1a4dcd0f_cace7f59","updated":"2015-08-13 12:58:32.000000000","message":"Done","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"1453fe1ff8b965f59b5e47fdbaaaddc4356a52b6","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                        ctx.reraise \u003d not uuid or attempt \u003d\u003d max_attempts - 1"},{"line_number":300,"context_line":"                    self.log.debug(\u0027Retrying failed lookup after inspection, \u0027"},{"line_number":301,"context_line":"                                   \u0027attempt %d of %d\u0027, attempt, max_attempts)"},{"line_number":302,"context_line":"                    time.sleep(5)"},{"line_number":303,"context_line":"                else:"},{"line_number":304,"context_line":"                    break"},{"line_number":305,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_aa569359","line":302,"updated":"2015-08-13 07:40:22.000000000","message":"ditto","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"94021e3868529f7f9a6daee17522a96f54b90d50","unresolved":false,"context_lines":[{"line_number":299,"context_line":"                        ctx.reraise \u003d not uuid or attempt \u003d\u003d max_attempts - 1"},{"line_number":300,"context_line":"                    self.log.debug(\u0027Retrying failed lookup after inspection, \u0027"},{"line_number":301,"context_line":"                                   \u0027attempt %d of %d\u0027, attempt, max_attempts)"},{"line_number":302,"context_line":"                    time.sleep(5)"},{"line_number":303,"context_line":"                else:"},{"line_number":304,"context_line":"                    break"},{"line_number":305,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_286a7981","line":302,"in_reply_to":"1a4dcd0f_aa569359","updated":"2015-08-13 12:58:32.000000000","message":"Done","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"}],"ironic_python_agent/cmd/agent.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"792ec33f5bf64dc9a6eef4a3ba1f39c9b9233ccf","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                     \u0027any calls to Ironic API.\u0027),"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    cfg.StrOpt(\u0027inspection_callback_url\u0027,"},{"line_number":102,"context_line":"               default\u003dAPARAMS.get(\u0027ipa-inspection-callback-url\u0027),"},{"line_number":103,"context_line":"               help\u003d\u0027Endpoint of ironic-inspector. If set, hardware inventory \u0027"},{"line_number":104,"context_line":"                    \u0027will be collected and sent to ironic-inspector \u0027"},{"line_number":105,"context_line":"                    \u0027on start up.\u0027),"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_027fb9ab","line":102,"updated":"2015-08-25 22:13:14.000000000","message":"I think you need a default value passed as a second argument here -- at least there\u0027s one for all the other config falues.","commit_id":"1dfaa2cb4811d577571633b27cb29603550d2f6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ca5b96e93bc85ee77579939d8f2333712c5c1959","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                     \u0027any calls to Ironic API.\u0027),"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    cfg.StrOpt(\u0027inspection_callback_url\u0027,"},{"line_number":102,"context_line":"               default\u003dAPARAMS.get(\u0027ipa-inspection-callback-url\u0027),"},{"line_number":103,"context_line":"               help\u003d\u0027Endpoint of ironic-inspector. If set, hardware inventory \u0027"},{"line_number":104,"context_line":"                    \u0027will be collected and sent to ironic-inspector \u0027"},{"line_number":105,"context_line":"                    \u0027on start up.\u0027),"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_66cc7789","line":102,"in_reply_to":"fa1b9901_027fb9ab","updated":"2015-08-26 08:04:50.000000000","message":"None is a perfect default here, do you think I should make it explicit?","commit_id":"1dfaa2cb4811d577571633b27cb29603550d2f6f"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"792ec33f5bf64dc9a6eef4a3ba1f39c9b9233ccf","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                    \u0027a minimum requires set of plugins.\u0027),"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    cfg.StrOpt(\u0027boot_interface\u0027,"},{"line_number":114,"context_line":"               default\u003dAPARAMS.get(\u0027BOOTIF\u0027),"},{"line_number":115,"context_line":"               help\u003d\u0027MAC of interface used for PXE booting, required \u0027"},{"line_number":116,"context_line":"                    \u0027for inspection.\u0027),"},{"line_number":117,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_227c3db4","line":114,"updated":"2015-08-25 22:13:14.000000000","message":"I think you need a default value passed as a second argument here -- at least there\u0027s one for all the other config falues.","commit_id":"1dfaa2cb4811d577571633b27cb29603550d2f6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ca5b96e93bc85ee77579939d8f2333712c5c1959","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                    \u0027a minimum requires set of plugins.\u0027),"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    cfg.StrOpt(\u0027boot_interface\u0027,"},{"line_number":114,"context_line":"               default\u003dAPARAMS.get(\u0027BOOTIF\u0027),"},{"line_number":115,"context_line":"               help\u003d\u0027MAC of interface used for PXE booting, required \u0027"},{"line_number":116,"context_line":"                    \u0027for inspection.\u0027),"},{"line_number":117,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_26c2ff53","line":114,"in_reply_to":"fa1b9901_227c3db4","updated":"2015-08-26 08:04:50.000000000","message":"ditto","commit_id":"1dfaa2cb4811d577571633b27cb29603550d2f6f"},{"author":{"_account_id":12715,"name":"John Trowbridge","email":"trown@redhat.com","username":"trown"},"change_message_id":"7f1a2c0a035d32f17e139e970f8696808a902b43","unresolved":false,"context_lines":[{"line_number":108,"context_line":"               default\u003dAPARAMS.get(\u0027ipa-inspection-collectors\u0027, \u0027\u0027),"},{"line_number":109,"context_line":"               help\u003d\u0027Comma-separated list of plugins providing additional \u0027"},{"line_number":110,"context_line":"                    \u0027hardware data for inspection, empty value gives \u0027"},{"line_number":111,"context_line":"                    \u0027a minimum requires set of plugins.\u0027),"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    cfg.StrOpt(\u0027boot_interface\u0027,"},{"line_number":114,"context_line":"               default\u003dAPARAMS.get(\u0027BOOTIF\u0027),"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_323ee6da","line":111,"updated":"2015-08-28 19:09:30.000000000","message":"nit: s/requires/required/","commit_id":"54366e05e24ca6f6e96f11a3086413d8870143dc"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"4ead01275e236ec72bd66de959a4e6cad956a6f7","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                     \u0027any calls to Ironic API.\u0027),"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    cfg.StrOpt(\u0027inspection_callback_url\u0027,"},{"line_number":104,"context_line":"               default\u003dAPARAMS.get(\u0027ipa-inspection-callback-url\u0027),"},{"line_number":105,"context_line":"               help\u003d\u0027Endpoint of ironic-inspector. If set, hardware inventory \u0027"},{"line_number":106,"context_line":"                    \u0027will be collected and sent to ironic-inspector \u0027"},{"line_number":107,"context_line":"                    \u0027on start up.\u0027),"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_42527f36","line":104,"updated":"2015-09-04 17:25:35.000000000","message":"Shouldn\u0027t this, have a default, as all the other options do?","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b2bd1f18426995537b8e5d85b96cd5523b95ce10","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                     \u0027any calls to Ironic API.\u0027),"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    cfg.StrOpt(\u0027inspection_callback_url\u0027,"},{"line_number":104,"context_line":"               default\u003dAPARAMS.get(\u0027ipa-inspection-callback-url\u0027),"},{"line_number":105,"context_line":"               help\u003d\u0027Endpoint of ironic-inspector. If set, hardware inventory \u0027"},{"line_number":106,"context_line":"                    \u0027will be collected and sent to ironic-inspector \u0027"},{"line_number":107,"context_line":"                    \u0027on start up.\u0027),"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_fd17b6a0","line":104,"in_reply_to":"da20952f_42527f36","updated":"2015-09-04 17:36:56.000000000","message":"get() defaults to None, which is fine","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"4ead01275e236ec72bd66de959a4e6cad956a6f7","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                    \u0027a minimum required set of plugins.\u0027),"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    cfg.StrOpt(\u0027boot_interface\u0027,"},{"line_number":116,"context_line":"               default\u003dAPARAMS.get(\u0027BOOTIF\u0027),"},{"line_number":117,"context_line":"               help\u003d\u0027MAC of interface used for PXE booting, required \u0027"},{"line_number":118,"context_line":"                    \u0027for inspection.\u0027),"},{"line_number":119,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_c23c4fe3","line":116,"updated":"2015-09-04 17:25:35.000000000","message":"Why is this not namespaced in ipa-* ? Also no default here either.","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b2bd1f18426995537b8e5d85b96cd5523b95ce10","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                    \u0027a minimum required set of plugins.\u0027),"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    cfg.StrOpt(\u0027boot_interface\u0027,"},{"line_number":116,"context_line":"               default\u003dAPARAMS.get(\u0027BOOTIF\u0027),"},{"line_number":117,"context_line":"               help\u003d\u0027MAC of interface used for PXE booting, required \u0027"},{"line_number":118,"context_line":"                    \u0027for inspection.\u0027),"},{"line_number":119,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_7d24060c","line":116,"in_reply_to":"da20952f_c23c4fe3","updated":"2015-09-04 17:36:56.000000000","message":"BOOTIF is a standard kernel variable, not something I invent","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"}],"ironic_python_agent/hardware.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"792ec33f5bf64dc9a6eef4a3ba1f39c9b9233ccf","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        return out.strip()"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"def guess_root_disk(block_devices, min_disk_size\u003d4 * pow(1024, 3)):"},{"line_number":586,"context_line":"    \"\"\"Find suitable disk provided that root device hints are not given.\"\"\""},{"line_number":587,"context_line":"    # If no hints are passed find the first device larger than"},{"line_number":588,"context_line":"    # 4GB, assume it is the OS disk"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_f51a816e","line":585,"updated":"2015-08-25 22:13:14.000000000","message":"I didn\u0027t see this used anywhere else; did I miss it or is there another reason you broke this out?","commit_id":"1dfaa2cb4811d577571633b27cb29603550d2f6f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ca5b96e93bc85ee77579939d8f2333712c5c1959","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        return out.strip()"},{"line_number":583,"context_line":""},{"line_number":584,"context_line":""},{"line_number":585,"context_line":"def guess_root_disk(block_devices, min_disk_size\u003d4 * pow(1024, 3)):"},{"line_number":586,"context_line":"    \"\"\"Find suitable disk provided that root device hints are not given.\"\"\""},{"line_number":587,"context_line":"    # If no hints are passed find the first device larger than"},{"line_number":588,"context_line":"    # 4GB, assume it is the OS disk"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa1b9901_c6b6a3db","line":585,"in_reply_to":"fa1b9901_f51a816e","updated":"2015-08-26 08:04:50.000000000","message":"it\u0027s used in this file and in inspection, when we guess value for local_gb (inspector.py line #180).","commit_id":"1dfaa2cb4811d577571633b27cb29603550d2f6f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a01b0e98b402fcbd9b5c4eb79ced3803cd321a2c","unresolved":false,"context_lines":[{"line_number":585,"context_line":"def guess_root_disk(block_devices, min_disk_size\u003d4 * pow(1024, 3)):"},{"line_number":586,"context_line":"    \"\"\"Find suitable disk provided that root device hints are not given.\"\"\""},{"line_number":587,"context_line":"    # If no hints are passed find the first device larger than"},{"line_number":588,"context_line":"    # 4GB, assume it is the OS disk"},{"line_number":589,"context_line":"    # TODO(russellhaering): This isn\u0027t a valid assumption in"},{"line_number":590,"context_line":"    # all cases, is there a more reasonable default behavior?"},{"line_number":591,"context_line":"    for device in sorted(block_devices,"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_b2b772f4","line":588,"updated":"2015-09-03 09:30:30.000000000","message":"nit: feels like this comment should be in the docstring.","commit_id":"54366e05e24ca6f6e96f11a3086413d8870143dc"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a0f03b41317ec2802028b14715ab5949c4ac7098","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        return out.strip()"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"def guess_root_disk(block_devices, min_disk_size\u003d4 * pow(1024, 3)):"},{"line_number":597,"context_line":"    \"\"\"Find suitable disk provided that root device hints are not given."},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"    If no hints are passed find the first device larger than min_disk_size,"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_b3f40ff1","line":596,"updated":"2015-09-04 18:25:56.000000000","message":"Idea: 4 * units.Gi    ??","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"}],"ironic_python_agent/inspector.py":[{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"1453fe1ff8b965f59b5e47fdbaaaddc4356a52b6","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    If ``inspection_callback_url`` is set in the configuration, get"},{"line_number":36,"context_line":"    the hardware inventory from the node and post it back to the inspector."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    :return: node UUID is inspection was successful, None if associated node"},{"line_number":39,"context_line":"             was note found in inspector cache. None is also returned if"},{"line_number":40,"context_line":"             inspector support is not enabled."},{"line_number":41,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_6d49855f","line":38,"updated":"2015-08-13 07:40:22.000000000","message":"s/is/if ?","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"94021e3868529f7f9a6daee17522a96f54b90d50","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    If ``inspection_callback_url`` is set in the configuration, get"},{"line_number":36,"context_line":"    the hardware inventory from the node and post it back to the inspector."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    :return: node UUID is inspection was successful, None if associated node"},{"line_number":39,"context_line":"             was note found in inspector cache. None is also returned if"},{"line_number":40,"context_line":"             inspector support is not enabled."},{"line_number":41,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_88f62dd5","line":38,"in_reply_to":"1a4dcd0f_6d49855f","updated":"2015-08-13 12:58:32.000000000","message":"Done","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"1453fe1ff8b965f59b5e47fdbaaaddc4356a52b6","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def discover_scheduling_properties(data):"},{"line_number":176,"context_line":"    cpu_info \u003d hardware.dispatch_to_managers(\u0027get_cpus\u0027)"},{"line_number":177,"context_line":"    data[\u0027cpus\u0027] \u003d cpu_info.count"},{"line_number":178,"context_line":"    data[\u0027cpu_arch\u0027] \u003d cpu_info.architecture"},{"line_number":179,"context_line":"    # FIXME(dtantsur): we could do much better than just take the 1st one"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_767f12ab","line":176,"updated":"2015-08-13 07:40:22.000000000","message":"we can collect these info easily by hardware.list_hardware_info. how do you think?","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"94021e3868529f7f9a6daee17522a96f54b90d50","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def discover_scheduling_properties(data):"},{"line_number":176,"context_line":"    cpu_info \u003d hardware.dispatch_to_managers(\u0027get_cpus\u0027)"},{"line_number":177,"context_line":"    data[\u0027cpus\u0027] \u003d cpu_info.count"},{"line_number":178,"context_line":"    data[\u0027cpu_arch\u0027] \u003d cpu_info.architecture"},{"line_number":179,"context_line":"    # FIXME(dtantsur): we could do much better than just take the 1st one"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_6822c153","line":176,"in_reply_to":"1a4dcd0f_767f12ab","updated":"2015-08-13 12:58:32.000000000","message":"yeah, why not","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"},{"author":{"_account_id":12715,"name":"John Trowbridge","email":"trown@redhat.com","username":"trown"},"change_message_id":"7f1a2c0a035d32f17e139e970f8696808a902b43","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        LOG.info(\u0027Inspection is disabled, skipping\u0027)"},{"line_number":45,"context_line":"        return"},{"line_number":46,"context_line":"    collector_names \u003d list(filter(None, CONF.inspection_collectors.split(\u0027,\u0027)))"},{"line_number":47,"context_line":"    LOG.info(\u0027inspection is enabled with collectors %s\u0027, collector_names)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    # NOTE(dtantsur): inspection process tries to delay raising any exceptions"},{"line_number":50,"context_line":"    # until after we posted some data back to inspector. This is because"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_9dfa6342","line":47,"updated":"2015-08-28 19:09:30.000000000","message":"This will log \"INFO: inspection is enabled with collectors \" by default which looks a bit odd. Maybe we should only log if there are non-default collectors? or log a different message for each case?","commit_id":"54366e05e24ca6f6e96f11a3086413d8870143dc"},{"author":{"_account_id":12715,"name":"John Trowbridge","email":"trown@redhat.com","username":"trown"},"change_message_id":"7f1a2c0a035d32f17e139e970f8696808a902b43","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    resp \u003d call_inspector(data, failures)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    # Now raise everything we were delaying"},{"line_number":81,"context_line":"    failures.raise_if_needed()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    if resp is None:"},{"line_number":84,"context_line":"        # Node was not found, stopping here"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_b8e09597","line":81,"updated":"2015-08-28 19:09:30.000000000","message":"If we raise an exception here, the agent process will crash on the ramdisk. Do we always want that to happen?\n\nI guess with collector plugins this is not such a big deal, since we could just disable the problem collector.","commit_id":"54366e05e24ca6f6e96f11a3086413d8870143dc"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ff5faffe90615482d322714505745149ceebfaee","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    resp \u003d call_inspector(data, failures)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    # Now raise everything we were delaying"},{"line_number":81,"context_line":"    failures.raise_if_needed()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    if resp is None:"},{"line_number":84,"context_line":"        # Node was not found, stopping here"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_6da2bd9c","line":81,"in_reply_to":"da20952f_b8e09597","updated":"2015-09-01 15:02:51.000000000","message":"Yes, that was my thought as well","commit_id":"54366e05e24ca6f6e96f11a3086413d8870143dc"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bbb010b4cb9090f88f4e9b21671be5838cb4ae0f","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    failures.raise_if_needed()"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    if resp is None:"},{"line_number":84,"context_line":"        # Node was not found, stopping here"},{"line_number":85,"context_line":"        return"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    # Optionally update IPMI credentials"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_b74e71bf","line":84,"updated":"2015-09-03 16:28:40.000000000","message":"Seems like a log statement here might be handy for debugging.","commit_id":"54366e05e24ca6f6e96f11a3086413d8870143dc"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bbb010b4cb9090f88f4e9b21671be5838cb4ae0f","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    if utils.try_execute(\u0027ipmitool\u0027, \u0027user\u0027, \u0027set\u0027,"},{"line_number":130,"context_line":"                         \u0027password\u0027, \u00272\u0027, password) is None:"},{"line_number":131,"context_line":"        raise errors.InspectionError(\u0027failed to set IPMI password\u0027)"},{"line_number":132,"context_line":"    utils.try_execute(\u0027ipmitool\u0027, \u0027user\u0027, \u0027enable\u0027, \u00272\u0027)"},{"line_number":133,"context_line":"    utils.try_execute(\u0027ipmitool\u0027, \u0027channel\u0027, \u0027setaccess\u0027, \u00271\u0027, \u00272\u0027,"},{"line_number":134,"context_line":"                      \u0027link\u003don\u0027, \u0027ipmi\u003don\u0027, \u0027callin\u003don\u0027, \u0027privilege\u003d4\u0027)"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_4a44081a","line":132,"updated":"2015-09-03 16:28:40.000000000","message":"Seems like you\u0027d want to raise here too (and next line). Or does ipmitool not return anything here and you can\u0027t check if it was successful? It also leads to a slightly confusing log message if the credentials were set successfully, but I can\u0027t use them.","commit_id":"54366e05e24ca6f6e96f11a3086413d8870143dc"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a01b0e98b402fcbd9b5c4eb79ced3803cd321a2c","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # partitioning and should be removed eventually"},{"line_number":184,"context_line":"        # FIXME(dtantsur): also this logic definitely belongs to inspector"},{"line_number":185,"context_line":"        # itself, not the ramdisk"},{"line_number":186,"context_line":"        data[\u0027local_gb\u0027] \u003d disk.size / 1024 / 1024 / 1024 - 1"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    for key in (\u0027cpus\u0027, \u0027local_gb\u0027, \u0027memory_mb\u0027):"},{"line_number":189,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_325e0213","line":186,"updated":"2015-09-03 09:30:30.000000000","message":"Nit: from oslo_utils import units","commit_id":"54366e05e24ca6f6e96f11a3086413d8870143dc"},{"author":{"_account_id":12715,"name":"John Trowbridge","email":"trown@redhat.com","username":"trown"},"change_message_id":"7f1a2c0a035d32f17e139e970f8696808a902b43","unresolved":false,"context_lines":[{"line_number":202,"context_line":"    # dropped after inspector is ready (probably in Mitaka cycle)."},{"line_number":203,"context_line":"    discover_network_properties(inventory, data, failures)"},{"line_number":204,"context_line":"    discover_scheduling_properties(inventory, data)"},{"line_number":205,"context_line":"    # In the future we will only need the current version of inventory"},{"line_number":206,"context_line":"    data[\u0027inventory\u0027] \u003d inventory"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_788f5d2a","line":205,"updated":"2015-08-28 19:09:30.000000000","message":"So these \"discover*\" functions would eventually just go into inspector plugin(s)?","commit_id":"54366e05e24ca6f6e96f11a3086413d8870143dc"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ff5faffe90615482d322714505745149ceebfaee","unresolved":false,"context_lines":[{"line_number":202,"context_line":"    # dropped after inspector is ready (probably in Mitaka cycle)."},{"line_number":203,"context_line":"    discover_network_properties(inventory, data, failures)"},{"line_number":204,"context_line":"    discover_scheduling_properties(inventory, data)"},{"line_number":205,"context_line":"    # In the future we will only need the current version of inventory"},{"line_number":206,"context_line":"    data[\u0027inventory\u0027] \u003d inventory"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_0d8c6134","line":205,"in_reply_to":"da20952f_788f5d2a","updated":"2015-09-01 15:02:51.000000000","message":"Exactly. I want as little logic on ramdisk side as possible","commit_id":"54366e05e24ca6f6e96f11a3086413d8870143dc"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a0f03b41317ec2802028b14715ab5949c4ac7098","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        LOG.info(\u0027Inspection is disabled, skipping\u0027)"},{"line_number":57,"context_line":"        return"},{"line_number":58,"context_line":"    collector_names \u003d [x.strip() for x in CONF.inspection_collectors.split(\u0027,\u0027)"},{"line_number":59,"context_line":"                       if x] or [_DEFAULT_COLLECTOR]"},{"line_number":60,"context_line":"    LOG.info(\u0027inspection is enabled with collectors %s\u0027, collector_names)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    # NOTE(dtantsur): inspection process tries to delay raising any exceptions"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_13ee1bed","line":59,"updated":"2015-09-04 18:25:56.000000000","message":"Is this expected?\n\n \u003e\u003e\u003e a \u003d \u0027 ,   ,hello\u0027\n \u003e\u003e\u003e [x.strip() for x in a.split(\u0027,\u0027) if x]\n [\u0027\u0027, \u0027\u0027, \u0027hello\u0027]\n\nI wonder if it should be:\n  .... if x.strip()","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a0f03b41317ec2802028b14715ab5949c4ac7098","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        (\u0027user\u0027, \u0027set\u0027, \u0027password\u0027, \u00272\u0027, password),"},{"line_number":134,"context_line":"        (\u0027user\u0027, \u0027enable\u0027, \u00272\u0027),"},{"line_number":135,"context_line":"        (\u0027channel\u0027, \u0027setaccess\u0027, \u00271\u0027, \u00272\u0027,"},{"line_number":136,"context_line":"         \u0027link\u003don\u0027, \u0027ipmi\u003don\u0027, \u0027callin\u003don\u0027, \u0027privilege\u003d4\u0027)"},{"line_number":137,"context_line":"    ]"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    for cmd in commands:"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_137e1baf","line":136,"updated":"2015-09-04 18:25:56.000000000","message":"nit: Add trailing comma","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a0f03b41317ec2802028b14715ab5949c4ac7098","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    for cmd in commands:"},{"line_number":140,"context_line":"        try:"},{"line_number":141,"context_line":"            utils.execute(\u0027ipmitool\u0027, *cmd)"},{"line_number":142,"context_line":"        except Exception:"},{"line_number":143,"context_line":"            LOG.exception(\u0027failed to update IPMI credentials\u0027)"},{"line_number":144,"context_line":"            raise errors.InspectionError(\u0027failed to update IPMI credentials\u0027)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_b33c0fe2","line":142,"updated":"2015-09-04 18:25:56.000000000","message":"I think this should be smaller, like a subprocess exception.\n\nAnd should log the exception result.\n\n-1 for this","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a0f03b41317ec2802028b14715ab5949c4ac7098","unresolved":false,"context_lines":[{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    Populates \u0027boot_interface\u0027, \u0027ipmi_address\u0027 and \u0027interfaces\u0027 keys."},{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    # These 2 properties might not be present, we don\u0027t count it as failure"},{"line_number":155,"context_line":"    data[\u0027boot_interface\u0027] \u003d CONF.boot_interface"},{"line_number":156,"context_line":"    LOG.info(\u0027boot devices was %s\u0027, CONF.boot_interface)"},{"line_number":157,"context_line":"    data[\u0027ipmi_address\u0027] \u003d inventory.get(\u0027bmc_address\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_f31cc667","line":154,"updated":"2015-09-04 18:25:56.000000000","message":"This comment confuses me. What is the property? Is it what is in \u0027data\u0027 or what is in CONF?","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b2b799ab1684243af42adb289208e422ae3e6ec3","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    \"\"\""},{"line_number":154,"context_line":"    # These 2 properties might not be present, we don\u0027t count it as failure"},{"line_number":155,"context_line":"    data[\u0027boot_interface\u0027] \u003d CONF.boot_interface"},{"line_number":156,"context_line":"    LOG.info(\u0027boot devices was %s\u0027, CONF.boot_interface)"},{"line_number":157,"context_line":"    data[\u0027ipmi_address\u0027] \u003d inventory.get(\u0027bmc_address\u0027)"},{"line_number":158,"context_line":"    LOG.info(\u0027BMC IP address: %s\u0027, data[\u0027ipmi_address\u0027])"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_4eb14e8e","line":156,"updated":"2015-09-04 16:06:44.000000000","message":"Sounds like DEBUG to me","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b2b799ab1684243af42adb289208e422ae3e6ec3","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    data[\u0027boot_interface\u0027] \u003d CONF.boot_interface"},{"line_number":156,"context_line":"    LOG.info(\u0027boot devices was %s\u0027, CONF.boot_interface)"},{"line_number":157,"context_line":"    data[\u0027ipmi_address\u0027] \u003d inventory.get(\u0027bmc_address\u0027)"},{"line_number":158,"context_line":"    LOG.info(\u0027BMC IP address: %s\u0027, data[\u0027ipmi_address\u0027])"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    data.setdefault(\u0027interfaces\u0027, {})"},{"line_number":161,"context_line":"    for iface in inventory[\u0027interfaces\u0027]:"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_6eae922f","line":158,"updated":"2015-09-04 16:06:44.000000000","message":"Sounds like DEBUG to me","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a0f03b41317ec2802028b14715ab5949c4ac7098","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    data.setdefault(\u0027interfaces\u0027, {})"},{"line_number":161,"context_line":"    for iface in inventory[\u0027interfaces\u0027]:"},{"line_number":162,"context_line":"        if iface.name.startswith(\u0027lo\u0027):"},{"line_number":163,"context_line":"            LOG.debug(\u0027ignoring local network interface %s\u0027, iface.name)"},{"line_number":164,"context_line":"            continue"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_b3b08e44","line":162,"updated":"2015-09-04 18:25:56.000000000","message":"Why not equal to \u0027lo\u0027?\n\nI\u0027m assuming I can\u0027t name my interface \u0027losangeles\u0027 :)\n\nI\u0027m unsure if there is a convention to not start any real interfaces with \u0027lo\u0027","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b2b799ab1684243af42adb289208e422ae3e6ec3","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        LOG.debug(\u0027found network interface %s\u0027, iface.name)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        if not iface.mac_address:"},{"line_number":169,"context_line":"            LOG.info(\u0027no link information for interface %s\u0027, iface.name)"},{"line_number":170,"context_line":"            continue"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        if not iface.ipv4_address:"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_ce631e19","line":169,"updated":"2015-09-04 16:06:44.000000000","message":"Sounds like DEBUG to me","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b2b799ab1684243af42adb289208e422ae3e6ec3","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            continue"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        if not iface.ipv4_address:"},{"line_number":173,"context_line":"            LOG.info(\u0027no IP address for interface %s\u0027, iface.name)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        data[\u0027interfaces\u0027][iface.name] \u003d {\u0027mac\u0027: iface.mac_address,"},{"line_number":176,"context_line":"                                          \u0027ip\u0027: iface.ipv4_address}"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_ee6862f7","line":173,"updated":"2015-09-04 16:06:44.000000000","message":"Sounds like DEBUG to me","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"4ead01275e236ec72bd66de959a4e6cad956a6f7","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    # Replicate the same logic as in deploy. This logic will be moved to"},{"line_number":190,"context_line":"    # inspector itself, but we need it for backward compatibility."},{"line_number":191,"context_line":"    disk \u003d hardware.guess_root_disk(inventory[\u0027disks\u0027])"},{"line_number":192,"context_line":"    if disk:"},{"line_number":193,"context_line":"        # -1 is required to give Ironic some spacing for partitioning"},{"line_number":194,"context_line":"        data[\u0027local_gb\u0027] \u003d disk.size / units.Gi - 1"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_dd4d1273","line":191,"updated":"2015-09-04 17:25:35.000000000","message":"You should not call hardware managers this way. You should use hardware.dispatch_to_managers() or move this method into utils.","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a0f03b41317ec2802028b14715ab5949c4ac7098","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            data[key] \u003d int(data[key])"},{"line_number":201,"context_line":"        except (KeyError, ValueError, TypeError):"},{"line_number":202,"context_line":"            LOG.warn(\u0027value for %s is missing or malformed: %s\u0027,"},{"line_number":203,"context_line":"                     key, data.get(key))"},{"line_number":204,"context_line":"        else:"},{"line_number":205,"context_line":"            LOG.info(\u0027value for %s is %s\u0027, key, data[key])"},{"line_number":206,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_f3d92657","line":203,"updated":"2015-09-04 18:25:56.000000000","message":"Should data[key] be set to None or something in this case? Or should the invalid value be left as is. I\u0027m thinking of the case where int(...) part fails.","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"eccc9a07eb4946b033b73a699469ace64999bf4a","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            data[key] \u003d int(data[key])"},{"line_number":201,"context_line":"        except (KeyError, ValueError, TypeError):"},{"line_number":202,"context_line":"            LOG.warn(\u0027value for %s is missing or malformed: %s\u0027,"},{"line_number":203,"context_line":"                     key, data.get(key))"},{"line_number":204,"context_line":"        else:"},{"line_number":205,"context_line":"            LOG.info(\u0027value for %s is %s\u0027, key, data[key])"},{"line_number":206,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_6d73eb4e","line":203,"in_reply_to":"da20952f_f3d92657","updated":"2015-09-04 21:28:18.000000000","message":"this just won\u0027t set data[key]","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"07d5a724ed07aa0aceb26aef009c0fd73ca58b94","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    data.setdefault(\u0027interfaces\u0027, {})"},{"line_number":163,"context_line":"    for iface in inventory[\u0027interfaces\u0027]:"},{"line_number":164,"context_line":"        if iface.name \u003d\u003d \u0027lo\u0027 or iface.ipv4_address \u003d\u003d \u0027127.0.0.1\u0027:"},{"line_number":165,"context_line":"            LOG.debug(\u0027ignoring local network interface %s\u0027, iface.name)"},{"line_number":166,"context_line":"            continue"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_500e0933","line":164,"updated":"2015-09-10 13:53:57.000000000","message":"While 127.0.0.1 is normal, localhost is actually 127.0.0.1/8 and I feel like I\u0027ve heard of systems binding to e.g. 127.0.1.1. IMBW but an edge case to look at :)","commit_id":"096830414bc2096af2319d33a0098ae9aad1de71"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fef69cc1876d0643a559c50f52adf94071c82493","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        failures.add(\u0027no network interfaces found\u0027)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"def discover_scheduling_properties(inventory, data):"},{"line_number":187,"context_line":"    data[\u0027cpus\u0027] \u003d inventory[\u0027cpu\u0027].count"},{"line_number":188,"context_line":"    data[\u0027cpu_arch\u0027] \u003d inventory[\u0027cpu\u0027].architecture"},{"line_number":189,"context_line":"    data[\u0027memory_mb\u0027] \u003d inventory[\u0027memory\u0027].physical_mb"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_9d2391a7","line":186,"updated":"2015-09-09 10:31:04.000000000","message":"nit: docstr","commit_id":"096830414bc2096af2319d33a0098ae9aad1de71"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fef69cc1876d0643a559c50f52adf94071c82493","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            LOG.info(\u0027value for %s is %s\u0027, key, data[key])"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"def collect_default(data, failures):"},{"line_number":212,"context_line":"    inventory \u003d hardware.dispatch_to_managers(\u0027list_hardware_info\u0027)"},{"line_number":213,"context_line":"    # These 2 calls are required for backward compatibility and should be"},{"line_number":214,"context_line":"    # dropped after inspector is ready (probably in Mitaka cycle)."}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_3d3925d9","line":211,"updated":"2015-09-09 10:31:04.000000000","message":"nit: docstr","commit_id":"096830414bc2096af2319d33a0098ae9aad1de71"}],"ironic_python_agent/tests/inspector.py":[{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"1453fe1ff8b965f59b5e47fdbaaaddc4356a52b6","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        self._call()"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        self.assertIn(\u0027no network interfaces\u0027, self.failures.get_error())"},{"line_number":238,"context_line":"        self.assertFalse(self.data[\u0027interfaces\u0027])"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_ok(self, mock_dispatch):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_302d12fe","line":237,"updated":"2015-08-13 07:40:22.000000000","message":"to be strict, \u0027no network interfaces found\u0027","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"94021e3868529f7f9a6daee17522a96f54b90d50","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        self._call()"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        self.assertIn(\u0027no network interfaces\u0027, self.failures.get_error())"},{"line_number":238,"context_line":"        self.assertFalse(self.data[\u0027interfaces\u0027])"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_ok(self, mock_dispatch):"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a4dcd0f_a8da0949","line":237,"in_reply_to":"1a4dcd0f_302d12fe","updated":"2015-08-13 12:58:32.000000000","message":"Done","commit_id":"02b7bb2b1f8ff388fe47d2577d7ef6d4c88bba64"}],"ironic_python_agent/tests/unit/test_agent.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a0f03b41317ec2802028b14715ab5949c4ac7098","unresolved":false,"context_lines":[{"line_number":210,"context_line":"            \u0027node\u0027: {"},{"line_number":211,"context_line":"                \u0027uuid\u0027: \u0027deadbeef-dabb-ad00-b105-f00d00bab10c\u0027"},{"line_number":212,"context_line":"            },"},{"line_number":213,"context_line":"            \u0027heartbeat_timeout\u0027: 300"},{"line_number":214,"context_line":"        }"},{"line_number":215,"context_line":"        self.agent.run()"},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_33bb1ee7","line":213,"updated":"2015-09-04 18:25:56.000000000","message":"nit: add trailing comma","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b2b799ab1684243af42adb289208e422ae3e6ec3","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            server_class\u003dsimple_server.WSGIServer)"},{"line_number":223,"context_line":"        wsgi_server.serve_forever.assert_called_once_with()"},{"line_number":224,"context_line":"        mocked_inspector.assert_called_once_with()"},{"line_number":225,"context_line":"        self.assertEqual(1, self.agent.api_client.lookup_node.call_count)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"        self.agent.heartbeater.start.assert_called_once_with()"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_b1a64f0d","line":225,"updated":"2015-09-04 16:06:44.000000000","message":"Don\u0027t we want to test that this was called with \u0027uuid\u0027, since that\u0027s what inspection returned?","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"}],"ironic_python_agent/tests/unit/test_inspector.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b2b799ab1684243af42adb289208e422ae3e6ec3","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        mock_call.assert_any_call(\u0027ipmitool\u0027, \u0027user\u0027, \u0027enable\u0027, \u00272\u0027)"},{"line_number":191,"context_line":"        mock_call.assert_any_call(\u0027ipmitool\u0027, \u0027channel\u0027, \u0027setaccess\u0027, \u00271\u0027, \u00272\u0027,"},{"line_number":192,"context_line":"                                  \u0027link\u003don\u0027, \u0027ipmi\u003don\u0027, \u0027callin\u003don\u0027,"},{"line_number":193,"context_line":"                                  \u0027privilege\u003d4\u0027)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def test_user_failed(self, mock_call):"},{"line_number":196,"context_line":"        mock_call.side_effect \u003d RuntimeError(\u0027boom\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_7170b772","line":193,"updated":"2015-09-04 16:06:44.000000000","message":"Why not make this an ordered list of mock.call()s?","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b2b799ab1684243af42adb289208e422ae3e6ec3","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        mock_call.assert_any_call(\u0027ipmitool\u0027, \u0027user\u0027, \u0027set\u0027, \u0027name\u0027,"},{"line_number":213,"context_line":"                                  \u00272\u0027, \u0027user\u0027)"},{"line_number":214,"context_line":"        mock_call.assert_any_call(\u0027ipmitool\u0027, \u0027user\u0027, \u0027set\u0027, \u0027password\u0027,"},{"line_number":215,"context_line":"                                  \u00272\u0027, \u0027pwd\u0027)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"class BaseDiscoverTest(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_d10503c2","line":215,"updated":"2015-09-04 16:06:44.000000000","message":"Ditto","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"}],"ironic_python_agent/utils.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a0f03b41317ec2802028b14715ab5949c4ac7098","unresolved":false,"context_lines":[{"line_number":244,"context_line":"    return hints"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"class AccumulatedFailure(object):"},{"line_number":248,"context_line":"    \"\"\"Object accumulated failures without raising exception.\"\"\""},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def __init__(self, exc_class\u003dRuntimeError):"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_62a463a5","line":247,"updated":"2015-09-04 18:25:56.000000000","message":"nit:\n\n AccumulatedFailures\n\nI think plural would be better","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b2b799ab1684243af42adb289208e422ae3e6ec3","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"class AccumulatedFailure(object):"},{"line_number":248,"context_line":"    \"\"\"Object accumulated failures without raising exception.\"\"\""},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def __init__(self, exc_class\u003dRuntimeError):"},{"line_number":251,"context_line":"        self._failures \u003d []"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_517d731a","line":248,"updated":"2015-09-04 16:06:44.000000000","message":"Nit: maybe better as \"Object to accumulate failures...\"","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b2b799ab1684243af42adb289208e422ae3e6ec3","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        \"\"\""},{"line_number":260,"context_line":"        if fmt:"},{"line_number":261,"context_line":"            fail \u003d fail % fmt"},{"line_number":262,"context_line":"        LOG.error(\u0027%s\u0027, fail)"},{"line_number":263,"context_line":"        self._failures.append(fail)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def get_error(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_91954b33","line":262,"updated":"2015-09-04 16:06:44.000000000","message":"Would LOG.exception be better so we get a traceback?","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"18450eabfa93a63c061f050c2f58b0f36a16828b","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        \"\"\""},{"line_number":260,"context_line":"        if fmt:"},{"line_number":261,"context_line":"            fail \u003d fail % fmt"},{"line_number":262,"context_line":"        LOG.error(\u0027%s\u0027, fail)"},{"line_number":263,"context_line":"        self._failures.append(fail)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def get_error(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"da20952f_654c2dc8","line":262,"in_reply_to":"da20952f_91954b33","updated":"2015-09-07 16:21:34.000000000","message":"I\u0027m not sure traceback will be often useful here... also fail is not always an exception","commit_id":"fe3437c4a5259204758fc05bf6044785413b18ee"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fef69cc1876d0643a559c50f52adf94071c82493","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            % min_size_required)"},{"line_number":302,"context_line":"    for device in block_devices:"},{"line_number":303,"context_line":"        if device.size \u003e\u003d min_size_required:"},{"line_number":304,"context_line":"            return device"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_5d9f3950","line":304,"updated":"2015-09-09 10:31:04.000000000","message":"... nothing to do with the patch because that\u0027s how it was before. I just want to point it out.\n\nBut I wonder if this logic is here really does makes sense, because this thing about finding the first device doesn\u0027t. The order of the devices may change on every boot [1]. We perhaps should rely on something more deterministic such as the largest device in size? And if you want a different one you can use the root device hints for that.\n\nAnyhoo, Food for thought\n\n[1] https://wiki.archlinux.org/index.php/Persistent_block_device_naming","commit_id":"096830414bc2096af2319d33a0098ae9aad1de71"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"07d5a724ed07aa0aceb26aef009c0fd73ca58b94","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            % min_size_required)"},{"line_number":302,"context_line":"    for device in block_devices:"},{"line_number":303,"context_line":"        if device.size \u003e\u003d min_size_required:"},{"line_number":304,"context_line":"            return device"}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_10b97115","line":304,"in_reply_to":"da20952f_5d9f3950","updated":"2015-09-10 13:53:57.000000000","message":"The devices are sroted by size in the first line, so the algorithm is actually \"smallest disk greater than min_size\".","commit_id":"096830414bc2096af2319d33a0098ae9aad1de71"}]}
