)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c1aba91e0af2a31fda8fc355a984d8c257ff6abd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add match_root_device_hints() to the utils.py module"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is adding a function called match_root_device_hints() to the"},{"line_number":10,"context_line":"utils.py module. This function try to find a device that matches all the"},{"line_number":11,"context_line":"given root device hints."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1561137"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"fa7ab95a_3e18dbd2","line":10,"range":{"start_line":10,"start_character":31,"end_line":10,"end_character":34},"updated":"2016-08-30 13:18:51.000000000","message":"Nit: tries","commit_id":"5b84bbd61662c85387ef9041c6c89aa84bcabd58"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d744b233efa0a5b0d3e90be128c90c01efe11dee","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add match_root_device_hints() to the utils.py module"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is adding a function called match_root_device_hints() to the"},{"line_number":10,"context_line":"utils.py module. This function try to find a device that matches all the"},{"line_number":11,"context_line":"given root device hints."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1561137"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"fa7ab95a_8802346e","line":10,"range":{"start_line":10,"start_character":31,"end_line":10,"end_character":34},"in_reply_to":"fa7ab95a_3e18dbd2","updated":"2016-08-31 13:53:10.000000000","message":"Done","commit_id":"5b84bbd61662c85387ef9041c6c89aa84bcabd58"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c1aba91e0af2a31fda8fc355a984d8c257ff6abd","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is adding a function called match_root_device_hints() to the"},{"line_number":10,"context_line":"utils.py module. This function try to find a device that matches all the"},{"line_number":11,"context_line":"given root device hints."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1561137"},{"line_number":14,"context_line":"Change-Id: Ia3ad098d6334ba22387c0f6d17b4bd518b178ca9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"fa7ab95a_21bd1ad8","line":12,"updated":"2016-08-30 13:18:51.000000000","message":"I guess the ultimate purpose is scheduling here, maybe worth mentioning.","commit_id":"5b84bbd61662c85387ef9041c6c89aa84bcabd58"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d744b233efa0a5b0d3e90be128c90c01efe11dee","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is adding a function called match_root_device_hints() to the"},{"line_number":10,"context_line":"utils.py module. This function try to find a device that matches all the"},{"line_number":11,"context_line":"given root device hints."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-Bug: #1561137"},{"line_number":14,"context_line":"Change-Id: Ia3ad098d6334ba22387c0f6d17b4bd518b178ca9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"fa7ab95a_a801b83b","line":12,"in_reply_to":"fa7ab95a_21bd1ad8","updated":"2016-08-31 13:53:10.000000000","message":"it\u0027s actually not because finding the disk to deploy the image onto happens after the instance have been scheduled (the node was pick already)","commit_id":"5b84bbd61662c85387ef9041c6c89aa84bcabd58"}],"ironic_lib/tests/test_utils.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"8d0639610979af7e7fcc0e72bfd630a5527d49ba","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        self.serial \u003d serial"},{"line_number":418,"context_line":"        self.vendor \u003d vendor"},{"line_number":419,"context_line":"        self.wwn \u003d wwn"},{"line_number":420,"context_line":"        self.wwn_with_extension \u003d wwn_with_extension"},{"line_number":421,"context_line":"        self.rotational \u003d rotational"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_299a5cb9","line":420,"updated":"2016-08-23 17:51:12.000000000","message":"wwn_vendor_extension missing.","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4c81a890111327e17a1542ecd051569e283b27f1","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        self.serial \u003d serial"},{"line_number":418,"context_line":"        self.vendor \u003d vendor"},{"line_number":419,"context_line":"        self.wwn \u003d wwn"},{"line_number":420,"context_line":"        self.wwn_with_extension \u003d wwn_with_extension"},{"line_number":421,"context_line":"        self.rotational \u003d rotational"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_64528d36","line":420,"in_reply_to":"1ac06dbe_299a5cb9","updated":"2016-08-24 11:36:58.000000000","message":"Done","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"8d0639610979af7e7fcc0e72bfd630a5527d49ba","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        self.assertEqual(\u0027/dev/sdc\u0027, dev.name)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def test_match_root_device_hints_multiple_hints(self):"},{"line_number":446,"context_line":"        root_device_hints \u003d {\u0027size\u0027: \u0027\u003e\u003d 50\u0027, \u0027model\u0027: \u0027model%202\u0027}"},{"line_number":447,"context_line":"        dev \u003d utils.match_root_device_hints(self.devices, root_device_hints)"},{"line_number":448,"context_line":"        self.assertEqual(\u0027/dev/sdb\u0027, dev.name)"},{"line_number":449,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_c9110806","line":446,"updated":"2016-08-23 17:51:12.000000000","message":"I\u0027d love to see more elaborate tests with \u003cin\u003e and \u003cor\u003e","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4c81a890111327e17a1542ecd051569e283b27f1","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        self.assertEqual(\u0027/dev/sdc\u0027, dev.name)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def test_match_root_device_hints_multiple_hints(self):"},{"line_number":446,"context_line":"        root_device_hints \u003d {\u0027size\u0027: \u0027\u003e\u003d 50\u0027, \u0027model\u0027: \u0027model%202\u0027}"},{"line_number":447,"context_line":"        dev \u003d utils.match_root_device_hints(self.devices, root_device_hints)"},{"line_number":448,"context_line":"        self.assertEqual(\u0027/dev/sdb\u0027, dev.name)"},{"line_number":449,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_446b11b7","line":446,"in_reply_to":"1ac06dbe_c9110806","updated":"2016-08-24 11:36:58.000000000","message":"Done","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"806a141b6de4a7bfa9df0b1974a747b59306ee7f","unresolved":false,"context_lines":[{"line_number":471,"context_line":"        self.devices \u003d ["},{"line_number":472,"context_line":"            Device(name\u003d\u0027/dev/sda\u0027, size\u003d64424509440, model\u003d\u0027ok model\u0027),"},{"line_number":473,"context_line":"            Device(name\u003d\u0027/dev/sdb\u0027, size\u003d128849018880, model\u003d\u0027big model\u0027),"},{"line_number":474,"context_line":"            Device(name\u003d\u0027/dev/sdc\u0027, size\u003d10737418240, model\u003d\u0027small model\u0027,"},{"line_number":475,"context_line":"                   rotational\u003dFalse),"},{"line_number":476,"context_line":"        ]"},{"line_number":477,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_2c08722d","line":474,"updated":"2016-08-24 13:58:00.000000000","message":"I know we needed to extend the parsing to handle spaces, but do you think the norm would be to have model names with spaces? Might be good to include one that doesn\u0027t.","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5e9d361d4aff08b19c7e4ef7a2e05715c68f8d04","unresolved":false,"context_lines":[{"line_number":471,"context_line":"        self.devices \u003d ["},{"line_number":472,"context_line":"            Device(name\u003d\u0027/dev/sda\u0027, size\u003d64424509440, model\u003d\u0027ok model\u0027),"},{"line_number":473,"context_line":"            Device(name\u003d\u0027/dev/sdb\u0027, size\u003d128849018880, model\u003d\u0027big model\u0027),"},{"line_number":474,"context_line":"            Device(name\u003d\u0027/dev/sdc\u0027, size\u003d10737418240, model\u003d\u0027small model\u0027,"},{"line_number":475,"context_line":"                   rotational\u003dFalse),"},{"line_number":476,"context_line":"        ]"},{"line_number":477,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_78397bd8","line":474,"in_reply_to":"1ac06dbe_2c08722d","updated":"2016-08-24 16:32:46.000000000","message":"Agreed","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"806a141b6de4a7bfa9df0b1974a747b59306ee7f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1ac06dbe_afbd74d9","line":509,"updated":"2016-08-24 13:58:00.000000000","message":"maybe a test with a root device hint that isn\u0027t valid. Although if it is already parsed, it must be valid. So maybe not needed. except that the code checks for that.","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5e9d361d4aff08b19c7e4ef7a2e05715c68f8d04","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"1ac06dbe_9830b7ea","line":509,"in_reply_to":"1ac06dbe_afbd74d9","updated":"2016-08-24 16:32:46.000000000","message":"Yeah, I\u0027m not sure it would be a valid test because we assume that the dictionary has been parsed and had its syntax checked already","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c1aba91e0af2a31fda8fc355a984d8c257ff6abd","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        dev \u003d utils.match_root_device_hints(self.devices, root_device_hints)"},{"line_number":531,"context_line":"        self.assertIsNone(dev)"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    def test_match_root_device_hints_empty_device_attribute(self):"},{"line_number":534,"context_line":"        empty_dev \u003d [{\u0027name\u0027: \u0027/dev/sda\u0027, \u0027model\u0027: \u0027 \u0027}]"},{"line_number":535,"context_line":"        dev \u003d utils.match_root_device_hints(empty_dev, {\u0027model\u0027: \u0027foo\u0027})"},{"line_number":536,"context_line":"        self.assertIsNone(dev)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_d566e5eb","line":533,"updated":"2016-08-30 13:18:51.000000000","message":"maybe add @mock.patch.object(utils.LOG, \u0027warning\u0027, autospec\u003dTrue) so that it is obvious None is returned because of the except ValueError block being executed?","commit_id":"5b84bbd61662c85387ef9041c6c89aa84bcabd58"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d744b233efa0a5b0d3e90be128c90c01efe11dee","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        dev \u003d utils.match_root_device_hints(self.devices, root_device_hints)"},{"line_number":531,"context_line":"        self.assertIsNone(dev)"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    def test_match_root_device_hints_empty_device_attribute(self):"},{"line_number":534,"context_line":"        empty_dev \u003d [{\u0027name\u0027: \u0027/dev/sda\u0027, \u0027model\u0027: \u0027 \u0027}]"},{"line_number":535,"context_line":"        dev \u003d utils.match_root_device_hints(empty_dev, {\u0027model\u0027: \u0027foo\u0027})"},{"line_number":536,"context_line":"        self.assertIsNone(dev)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_087e24ae","line":533,"in_reply_to":"fa7ab95a_d566e5eb","updated":"2016-08-31 13:53:10.000000000","message":"Done","commit_id":"5b84bbd61662c85387ef9041c6c89aa84bcabd58"}],"ironic_lib/utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e1fc38b6bdadecc3e2e979d67a844c39b2b83173","unresolved":false,"context_lines":[{"line_number":309,"context_line":"def match_root_device_hints(devices, root_device_hints):"},{"line_number":310,"context_line":"    \"\"\"Try to find a device that matches the root device hints."},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    Try to find a device that matches the root device hints, in order"},{"line_number":313,"context_line":"    to a device to be matched it needs to satisfy all the given hints."},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    :param devices: A list of devices objects."}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_f0eb04da","line":312,"updated":"2016-08-23 18:34:23.000000000","message":"s/, in order/. In order/","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4c81a890111327e17a1542ecd051569e283b27f1","unresolved":false,"context_lines":[{"line_number":309,"context_line":"def match_root_device_hints(devices, root_device_hints):"},{"line_number":310,"context_line":"    \"\"\"Try to find a device that matches the root device hints."},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    Try to find a device that matches the root device hints, in order"},{"line_number":313,"context_line":"    to a device to be matched it needs to satisfy all the given hints."},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    :param devices: A list of devices objects."}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_69a706a7","line":312,"in_reply_to":"1ac06dbe_f0eb04da","updated":"2016-08-24 11:36:58.000000000","message":"Done","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e1fc38b6bdadecc3e2e979d67a844c39b2b83173","unresolved":false,"context_lines":[{"line_number":310,"context_line":"    \"\"\"Try to find a device that matches the root device hints."},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    Try to find a device that matches the root device hints, in order"},{"line_number":313,"context_line":"    to a device to be matched it needs to satisfy all the given hints."},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    :param devices: A list of devices objects."},{"line_number":316,"context_line":"    :param root_device_hints: A dictionary with the root device hints"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_30c0fc4f","line":313,"updated":"2016-08-23 18:34:23.000000000","message":"s/to a/for a/","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4c81a890111327e17a1542ecd051569e283b27f1","unresolved":false,"context_lines":[{"line_number":310,"context_line":"    \"\"\"Try to find a device that matches the root device hints."},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    Try to find a device that matches the root device hints, in order"},{"line_number":313,"context_line":"    to a device to be matched it needs to satisfy all the given hints."},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    :param devices: A list of devices objects."},{"line_number":316,"context_line":"    :param root_device_hints: A dictionary with the root device hints"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_09af727d","line":313,"in_reply_to":"1ac06dbe_30c0fc4f","updated":"2016-08-24 11:36:58.000000000","message":"Done","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e1fc38b6bdadecc3e2e979d67a844c39b2b83173","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    Try to find a device that matches the root device hints, in order"},{"line_number":313,"context_line":"    to a device to be matched it needs to satisfy all the given hints."},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    :param devices: A list of devices objects."},{"line_number":316,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":317,"context_line":"                              already parsed."},{"line_number":318,"context_line":"    :returns: True if the device matches all the given hints or False"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_9081f0fd","line":315,"updated":"2016-08-23 18:34:23.000000000","message":"what kind of objects (class) are these?","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4c81a890111327e17a1542ecd051569e283b27f1","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    Try to find a device that matches the root device hints, in order"},{"line_number":313,"context_line":"    to a device to be matched it needs to satisfy all the given hints."},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    :param devices: A list of devices objects."},{"line_number":316,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":317,"context_line":"                              already parsed."},{"line_number":318,"context_line":"    :returns: True if the device matches all the given hints or False"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_89e402ac","line":315,"in_reply_to":"1ac06dbe_9081f0fd","updated":"2016-08-24 11:36:58.000000000","message":"BlockDevices from IPA.\n\nPerhaps I should expect something more generic ? Such as a dictionary ?","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e1fc38b6bdadecc3e2e979d67a844c39b2b83173","unresolved":false,"context_lines":[{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    :param devices: A list of devices objects."},{"line_number":316,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":317,"context_line":"                              already parsed."},{"line_number":318,"context_line":"    :returns: True if the device matches all the given hints or False"},{"line_number":319,"context_line":"              if it does not."},{"line_number":320,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_b0934c5a","line":317,"updated":"2016-08-23 18:34:23.000000000","message":"what does that mean, \u0027already parsed\u0027? The dictionary has key: value, where key is a hint name, and value is the hint value?","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4c81a890111327e17a1542ecd051569e283b27f1","unresolved":false,"context_lines":[{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    :param devices: A list of devices objects."},{"line_number":316,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":317,"context_line":"                              already parsed."},{"line_number":318,"context_line":"    :returns: True if the device matches all the given hints or False"},{"line_number":319,"context_line":"              if it does not."},{"line_number":320,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_c9971aea","line":317,"in_reply_to":"1ac06dbe_b0934c5a","updated":"2016-08-24 11:36:58.000000000","message":"I mean parsed with parse_root_device_hints() method. Will make it more clear","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e1fc38b6bdadecc3e2e979d67a844c39b2b83173","unresolved":false,"context_lines":[{"line_number":315,"context_line":"    :param devices: A list of devices objects."},{"line_number":316,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":317,"context_line":"                              already parsed."},{"line_number":318,"context_line":"    :returns: True if the device matches all the given hints or False"},{"line_number":319,"context_line":"              if it does not."},{"line_number":320,"context_line":"    \"\"\""},{"line_number":321,"context_line":"    for dev in devices:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_30959c32","line":318,"updated":"2016-08-23 18:34:23.000000000","message":"there\u0027s a list of devices. So is it true if there\u0027s a match for any device in the list? Oh, looks like you are returning the matched device.","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4c81a890111327e17a1542ecd051569e283b27f1","unresolved":false,"context_lines":[{"line_number":315,"context_line":"    :param devices: A list of devices objects."},{"line_number":316,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":317,"context_line":"                              already parsed."},{"line_number":318,"context_line":"    :returns: True if the device matches all the given hints or False"},{"line_number":319,"context_line":"              if it does not."},{"line_number":320,"context_line":"    \"\"\""},{"line_number":321,"context_line":"    for dev in devices:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_29750eca","line":318,"in_reply_to":"1ac06dbe_30959c32","updated":"2016-08-24 11:36:58.000000000","message":"Ops indeed, yeah I return the matched device","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e1fc38b6bdadecc3e2e979d67a844c39b2b83173","unresolved":false,"context_lines":[{"line_number":319,"context_line":"              if it does not."},{"line_number":320,"context_line":"    \"\"\""},{"line_number":321,"context_line":"    for dev in devices:"},{"line_number":322,"context_line":"        for hint in VALID_ROOT_DEVICE_HINTS:"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"            if hint not in root_device_hints:"},{"line_number":325,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_90e730ab","line":322,"updated":"2016-08-23 18:34:23.000000000","message":"I\u0027m curious, why didn\u0027t you do a for loop on the keys in root_device_hints? Those are the only ones of interest, right?","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4c81a890111327e17a1542ecd051569e283b27f1","unresolved":false,"context_lines":[{"line_number":319,"context_line":"              if it does not."},{"line_number":320,"context_line":"    \"\"\""},{"line_number":321,"context_line":"    for dev in devices:"},{"line_number":322,"context_line":"        for hint in VALID_ROOT_DEVICE_HINTS:"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"            if hint not in root_device_hints:"},{"line_number":325,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_c9339a12","line":322,"in_reply_to":"1ac06dbe_90e730ab","updated":"2016-08-24 11:36:58.000000000","message":"Good point, I can do that yes.","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e1fc38b6bdadecc3e2e979d67a844c39b2b83173","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            # NOTE(lucasagomes): The rotational hint holds a boolean value"},{"line_number":335,"context_line":"            # which is not supported by specs_matcher.match() so we need to"},{"line_number":336,"context_line":"            # do the comparison ourselves"},{"line_number":337,"context_line":"            if hint \u003d\u003d \u0027rotational\u0027:"},{"line_number":338,"context_line":"                if device_value \u003d\u003d hint_value:"},{"line_number":339,"context_line":"                    continue"},{"line_number":340,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_90fd7070","line":337,"updated":"2016-08-23 18:34:23.000000000","message":"Wouldn\u0027t it be more general if you checked for hint_type is bool?","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4c81a890111327e17a1542ecd051569e283b27f1","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            # NOTE(lucasagomes): The rotational hint holds a boolean value"},{"line_number":335,"context_line":"            # which is not supported by specs_matcher.match() so we need to"},{"line_number":336,"context_line":"            # do the comparison ourselves"},{"line_number":337,"context_line":"            if hint \u003d\u003d \u0027rotational\u0027:"},{"line_number":338,"context_line":"                if device_value \u003d\u003d hint_value:"},{"line_number":339,"context_line":"                    continue"},{"line_number":340,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_a9361e00","line":337,"in_reply_to":"1ac06dbe_90fd7070","updated":"2016-08-24 11:36:58.000000000","message":"Another good point, yes","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e1fc38b6bdadecc3e2e979d67a844c39b2b83173","unresolved":false,"context_lines":[{"line_number":342,"context_line":"            if hint \u003d\u003d \u0027size\u0027:"},{"line_number":343,"context_line":"                # Since we don\u0027t support units yet we expect the size"},{"line_number":344,"context_line":"                # in GiB for now"},{"line_number":345,"context_line":"                device_value \u003d device_value / units.Gi"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"            if not specs_matcher.match(device_value, hint_value):"},{"line_number":348,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_700ef48c","line":345,"updated":"2016-08-23 18:34:23.000000000","message":"and we can assume the hint value is already in GiB?","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"4c81a890111327e17a1542ecd051569e283b27f1","unresolved":false,"context_lines":[{"line_number":342,"context_line":"            if hint \u003d\u003d \u0027size\u0027:"},{"line_number":343,"context_line":"                # Since we don\u0027t support units yet we expect the size"},{"line_number":344,"context_line":"                # in GiB for now"},{"line_number":345,"context_line":"                device_value \u003d device_value / units.Gi"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"            if not specs_matcher.match(device_value, hint_value):"},{"line_number":348,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_a4048514","line":345,"in_reply_to":"1ac06dbe_700ef48c","updated":"2016-08-24 11:36:58.000000000","message":"It\u0027s possible but then the conversion should happen in IPA and Inspector.\n\nIn the future I would like to add support for units, so one could specify it like: 20GiB, 100MB and so on...","commit_id":"5650737f555401c8baba1466dc02d9caad9a02b8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"d7138a202fd45a849329a2c98f63dc94741770af","unresolved":false,"context_lines":[{"line_number":316,"context_line":"    for a device to be matched it needs to satisfy all the given hints."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    :param devices: A list of :class:`BlockDevices` objects from"},{"line_number":319,"context_line":"                    ironic-pyton-agent."},{"line_number":320,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":321,"context_line":"                              parsed by the `parse_root_device_hints`"},{"line_number":322,"context_line":"                              function."}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_a372baae","line":319,"range":{"start_line":319,"start_character":20,"end_line":319,"end_character":39},"updated":"2016-08-24 11:55:03.000000000","message":"Maybe changing it to \"as defined in ironic-python-agent\"?  Just seems like this is going to change. now that it is moving into ironic-lib.","commit_id":"87f26479beb1d867088ac1604c1738dd83c85eb8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0109115b3df2744133256a469973877ef98851be","unresolved":false,"context_lines":[{"line_number":316,"context_line":"    for a device to be matched it needs to satisfy all the given hints."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    :param devices: A list of :class:`BlockDevices` objects from"},{"line_number":319,"context_line":"                    ironic-pyton-agent."},{"line_number":320,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":321,"context_line":"                              parsed by the `parse_root_device_hints`"},{"line_number":322,"context_line":"                              function."}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_dd7fcb64","line":319,"range":{"start_line":319,"start_character":20,"end_line":319,"end_character":39},"in_reply_to":"1ac06dbe_a372baae","updated":"2016-08-24 13:13:21.000000000","message":"+1 sounds good","commit_id":"87f26479beb1d867088ac1604c1738dd83c85eb8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"82236207d2b9615def352739c823aed5995062da","unresolved":false,"context_lines":[{"line_number":315,"context_line":"    Try to find a device that matches the root device hints. In order"},{"line_number":316,"context_line":"    for a device to be matched it needs to satisfy all the given hints."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    :param devices: A list of :class:`BlockDevices` objects from"},{"line_number":319,"context_line":"                    as defined in ironic-python-agent."},{"line_number":320,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":321,"context_line":"                              parsed by the `parse_root_device_hints`"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_ac92a249","line":318,"updated":"2016-08-24 13:48:15.000000000","message":"s/from//","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5e9d361d4aff08b19c7e4ef7a2e05715c68f8d04","unresolved":false,"context_lines":[{"line_number":315,"context_line":"    Try to find a device that matches the root device hints. In order"},{"line_number":316,"context_line":"    for a device to be matched it needs to satisfy all the given hints."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    :param devices: A list of :class:`BlockDevices` objects from"},{"line_number":319,"context_line":"                    as defined in ironic-python-agent."},{"line_number":320,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":321,"context_line":"                              parsed by the `parse_root_device_hints`"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_78017b39","line":318,"in_reply_to":"1ac06dbe_ac92a249","updated":"2016-08-24 16:32:46.000000000","message":"Done","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"82236207d2b9615def352739c823aed5995062da","unresolved":false,"context_lines":[{"line_number":316,"context_line":"    for a device to be matched it needs to satisfy all the given hints."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    :param devices: A list of :class:`BlockDevices` objects from"},{"line_number":319,"context_line":"                    as defined in ironic-python-agent."},{"line_number":320,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":321,"context_line":"                              parsed by the `parse_root_device_hints`"},{"line_number":322,"context_line":"                              function."}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_4cd04ef8","line":319,"updated":"2016-08-24 13:48:15.000000000","message":"Yeah, I think it should be something more generic because the library should be able to stand alone without knowing about ipa. Or at least, describe it in a generic way. Eg, an object that is expected to have attributes ...","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5e9d361d4aff08b19c7e4ef7a2e05715c68f8d04","unresolved":false,"context_lines":[{"line_number":316,"context_line":"    for a device to be matched it needs to satisfy all the given hints."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    :param devices: A list of :class:`BlockDevices` objects from"},{"line_number":319,"context_line":"                    as defined in ironic-python-agent."},{"line_number":320,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":321,"context_line":"                              parsed by the `parse_root_device_hints`"},{"line_number":322,"context_line":"                              function."}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_9b16f1ef","line":319,"in_reply_to":"1ac06dbe_4cd04ef8","updated":"2016-08-24 16:32:46.000000000","message":"We can accept a list of dictionaries that represents the devices","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"82236207d2b9615def352739c823aed5995062da","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                    as defined in ironic-python-agent."},{"line_number":320,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":321,"context_line":"                              parsed by the `parse_root_device_hints`"},{"line_number":322,"context_line":"                              function."},{"line_number":323,"context_line":"    :returns: A device that matches all the hints or None."},{"line_number":324,"context_line":"    \"\"\""},{"line_number":325,"context_line":"    for dev in devices:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_ec0f7a86","line":322,"updated":"2016-08-24 13:48:15.000000000","message":"why not do the parsing here, instead of expecting the caller to invoke the parsing, then invoking match_root_device_hints?","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5e9d361d4aff08b19c7e4ef7a2e05715c68f8d04","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                    as defined in ironic-python-agent."},{"line_number":320,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":321,"context_line":"                              parsed by the `parse_root_device_hints`"},{"line_number":322,"context_line":"                              function."},{"line_number":323,"context_line":"    :returns: A device that matches all the hints or None."},{"line_number":324,"context_line":"    \"\"\""},{"line_number":325,"context_line":"    for dev in devices:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_fb80c54b","line":322,"in_reply_to":"1ac06dbe_ec0f7a86","updated":"2016-08-24 16:32:46.000000000","message":"That\u0027s a great point! I didn\u0027t think about it, It would be handier to invoke a single method indeed.","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"82236207d2b9615def352739c823aed5995062da","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":321,"context_line":"                              parsed by the `parse_root_device_hints`"},{"line_number":322,"context_line":"                              function."},{"line_number":323,"context_line":"    :returns: A device that matches all the hints or None."},{"line_number":324,"context_line":"    \"\"\""},{"line_number":325,"context_line":"    for dev in devices:"},{"line_number":326,"context_line":"        for hint in root_device_hints:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_0c82d6c8","line":323,"updated":"2016-08-24 13:48:15.000000000","message":"the first device, right? (just a nit)","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5e9d361d4aff08b19c7e4ef7a2e05715c68f8d04","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":321,"context_line":"                              parsed by the `parse_root_device_hints`"},{"line_number":322,"context_line":"                              function."},{"line_number":323,"context_line":"    :returns: A device that matches all the hints or None."},{"line_number":324,"context_line":"    \"\"\""},{"line_number":325,"context_line":"    for dev in devices:"},{"line_number":326,"context_line":"        for hint in root_device_hints:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_98543722","line":323,"in_reply_to":"1ac06dbe_0c82d6c8","updated":"2016-08-24 16:32:46.000000000","message":"Yes, will update it","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"82236207d2b9615def352739c823aed5995062da","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        for hint in root_device_hints:"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"            if hint not in VALID_ROOT_DEVICE_HINTS:"},{"line_number":329,"context_line":"                continue"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"            hint_type \u003d VALID_ROOT_DEVICE_HINTS[hint]"},{"line_number":332,"context_line":"            device_value \u003d getattr(dev, hint)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_0ce776ad","line":329,"updated":"2016-08-24 13:48:15.000000000","message":"just want to check this. we skip any hints that we don\u0027t recognize, vs flagging some error that it is being ignored?","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5e9d361d4aff08b19c7e4ef7a2e05715c68f8d04","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        for hint in root_device_hints:"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"            if hint not in VALID_ROOT_DEVICE_HINTS:"},{"line_number":329,"context_line":"                continue"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"            hint_type \u003d VALID_ROOT_DEVICE_HINTS[hint]"},{"line_number":332,"context_line":"            device_value \u003d getattr(dev, hint)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_fb3565a8","line":329,"in_reply_to":"1ac06dbe_0ce776ad","updated":"2016-08-24 16:32:46.000000000","message":"That\u0027s a silly check indeed because on parse_root_device_hints we already check for invalid hints. Will be removed","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"806a141b6de4a7bfa9df0b1974a747b59306ee7f","unresolved":false,"context_lines":[{"line_number":329,"context_line":"                continue"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"            hint_type \u003d VALID_ROOT_DEVICE_HINTS[hint]"},{"line_number":332,"context_line":"            device_value \u003d getattr(dev, hint)"},{"line_number":333,"context_line":"            hint_value \u003d root_device_hints[hint]"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"            if hint_type is str:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_8f751834","line":332,"updated":"2016-08-24 13:58:00.000000000","message":"should we check if AttributeError is raised or if device_value is None?","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5e9d361d4aff08b19c7e4ef7a2e05715c68f8d04","unresolved":false,"context_lines":[{"line_number":329,"context_line":"                continue"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"            hint_type \u003d VALID_ROOT_DEVICE_HINTS[hint]"},{"line_number":332,"context_line":"            device_value \u003d getattr(dev, hint)"},{"line_number":333,"context_line":"            hint_value \u003d root_device_hints[hint]"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"            if hint_type is str:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_1b5cc1ec","line":332,"in_reply_to":"1ac06dbe_8f751834","updated":"2016-08-24 16:32:46.000000000","message":"Yeah let\u0027s play the safe card and check. I was assuming that IPA won\u0027t add a None in the list of devices.","commit_id":"86673d758668dce495dfb8e864a86dfc50d35172"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"eeac7cd114e0afb0552f6d6f9842db41ae6ff2bf","unresolved":false,"context_lines":[{"line_number":318,"context_line":"    :param devices: A list of dictionaries representing the devices."},{"line_number":319,"context_line":"    :param root_device_hints: A dictionary with the root device hints"},{"line_number":320,"context_line":"                              parsed by the `parse_root_device_hints`"},{"line_number":321,"context_line":"                              function."},{"line_number":322,"context_line":"    :raises: ValueError, if some information is invalid."},{"line_number":323,"context_line":"    :returns: The first device to match all the hints or None."},{"line_number":324,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_a92e07a3","line":321,"updated":"2016-08-24 16:33:25.000000000","message":"doesn\u0027t need to be parsed anymore","commit_id":"85ab0030504a0943c338c67bccff783742a4e74c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"45c684f98ba4261d0eb73e463a3ecfca4101edda","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        for hint in root_device_hints:"},{"line_number":326,"context_line":"            hint_type \u003d VALID_ROOT_DEVICE_HINTS[hint]"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"            device_value \u003d dev.get(hint)"},{"line_number":329,"context_line":"            if device_value is None:"},{"line_number":330,"context_line":"                break"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_7ec67e4a","line":328,"updated":"2016-08-24 17:46:39.000000000","message":"if device_value is an empty string (eg \u0027\u0027), you\u0027ll get a pyparsing.ParseException from _extract_hint_operator_and_values() (via the _normalize_string_hint() call)","commit_id":"6548c4beee027a1289453fe613edcbc776f3f609"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"990f6057b8eab6a90c7a248c401a45e815135b66","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        for hint in root_device_hints:"},{"line_number":326,"context_line":"            hint_type \u003d VALID_ROOT_DEVICE_HINTS[hint]"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"            device_value \u003d dev.get(hint)"},{"line_number":329,"context_line":"            if device_value is None:"},{"line_number":330,"context_line":"                break"},{"line_number":331,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1ac06dbe_fadc0d1a","line":328,"in_reply_to":"1ac06dbe_7ec67e4a","updated":"2016-08-25 08:47:29.000000000","message":"Ops, thanks I will fix it in this patch!","commit_id":"6548c4beee027a1289453fe613edcbc776f3f609"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c77a469817307cb2f46ac9e48d2650a87c2baf40","unresolved":false,"context_lines":[{"line_number":353,"context_line":"            # specs_matcher.match(), so we need to do the comparison"},{"line_number":354,"context_line":"            # ourselves"},{"line_number":355,"context_line":"            if hint_type is bool:"},{"line_number":356,"context_line":"                if device_value \u003d\u003d hint_value:"},{"line_number":357,"context_line":"                    continue"},{"line_number":358,"context_line":"                break"},{"line_number":359,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1ac06dbe_e6590e37","line":356,"updated":"2016-08-25 12:15:21.000000000","message":"just want to check. the value of the root_device_hints could be a string and the call to parse_root_device_hints() converts it to a bool What about for the devices; are they bools or could they also be strings?","commit_id":"cc0854d04e14feb7f4a49d6988050d3443610a24"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"401981cff59f2154ffe07d757f938f29205901d1","unresolved":false,"context_lines":[{"line_number":353,"context_line":"            # specs_matcher.match(), so we need to do the comparison"},{"line_number":354,"context_line":"            # ourselves"},{"line_number":355,"context_line":"            if hint_type is bool:"},{"line_number":356,"context_line":"                if device_value \u003d\u003d hint_value:"},{"line_number":357,"context_line":"                    continue"},{"line_number":358,"context_line":"                break"},{"line_number":359,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1ac06dbe_46845db0","line":356,"in_reply_to":"1ac06dbe_e6590e37","updated":"2016-08-25 13:29:26.000000000","message":"Yes, it\u0027s a boolean: https://github.com/openstack/ironic-python-agent/blob/master/ironic_python_agent/hardware.py#L159","commit_id":"cc0854d04e14feb7f4a49d6988050d3443610a24"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c77a469817307cb2f46ac9e48d2650a87c2baf40","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            if not specs_matcher.match(device_value, hint_value):"},{"line_number":366,"context_line":"                break"},{"line_number":367,"context_line":"        else:"},{"line_number":368,"context_line":"            LOG.debug(\u0027Device found! The device \"%s\" matches the root\u0027"},{"line_number":369,"context_line":"                      \u0027device hints\u0027 % dev)"},{"line_number":370,"context_line":"            return dev"},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1ac06dbe_46dd826f","line":368,"updated":"2016-08-25 12:15:21.000000000","message":"missing space at end","commit_id":"cc0854d04e14feb7f4a49d6988050d3443610a24"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"401981cff59f2154ffe07d757f938f29205901d1","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            if not specs_matcher.match(device_value, hint_value):"},{"line_number":366,"context_line":"                break"},{"line_number":367,"context_line":"        else:"},{"line_number":368,"context_line":"            LOG.debug(\u0027Device found! The device \"%s\" matches the root\u0027"},{"line_number":369,"context_line":"                      \u0027device hints\u0027 % dev)"},{"line_number":370,"context_line":"            return dev"},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1ac06dbe_06b9c579","line":368,"in_reply_to":"1ac06dbe_46dd826f","updated":"2016-08-25 13:29:26.000000000","message":"Done","commit_id":"cc0854d04e14feb7f4a49d6988050d3443610a24"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c26e1b4820246a6e196c801f0b2a2e5e81a870ac","unresolved":false,"context_lines":[{"line_number":363,"context_line":"            # specs_matcher.match(), so we need to do the comparison"},{"line_number":364,"context_line":"            # ourselves"},{"line_number":365,"context_line":"            if hint_type is bool:"},{"line_number":366,"context_line":"                if device_value \u003d\u003d hint_value:"},{"line_number":367,"context_line":"                    continue"},{"line_number":368,"context_line":"                break"},{"line_number":369,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_c86391af","line":366,"updated":"2016-08-30 18:56:48.000000000","message":"Continuing my comment from patch set 12. root_device_hints was parsed, to convert any boolean string eg \u0027True\u0027 to true. If we are assuming that the devices dictionary has values that are the expected types (because we aren\u0027t doing any conversion here), I wonder if we should add a comment above, about that. IPA is going to call this so the code will work, but since this is a library, we might want to document it.","commit_id":"5b84bbd61662c85387ef9041c6c89aa84bcabd58"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d744b233efa0a5b0d3e90be128c90c01efe11dee","unresolved":false,"context_lines":[{"line_number":363,"context_line":"            # specs_matcher.match(), so we need to do the comparison"},{"line_number":364,"context_line":"            # ourselves"},{"line_number":365,"context_line":"            if hint_type is bool:"},{"line_number":366,"context_line":"                if device_value \u003d\u003d hint_value:"},{"line_number":367,"context_line":"                    continue"},{"line_number":368,"context_line":"                break"},{"line_number":369,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_5b25585a","line":366,"in_reply_to":"fa7ab95a_c86391af","updated":"2016-08-31 13:53:10.000000000","message":"Good point. I think we can use the strutils.bool_from_string() to convert the device\u0027s value here as well, nothing to lose, if the value is a Boolean already the operation will be no-op.\n\nIndependent that, documenting the expected device fields is a must, I agree.","commit_id":"5b84bbd61662c85387ef9041c6c89aa84bcabd58"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"c1aba91e0af2a31fda8fc355a984d8c257ff6abd","unresolved":false,"context_lines":[{"line_number":375,"context_line":"            if not specs_matcher.match(device_value, hint_value):"},{"line_number":376,"context_line":"                break"},{"line_number":377,"context_line":"        else:"},{"line_number":378,"context_line":"            LOG.debug(\u0027Device found! The device \"%s\" matches the root \u0027"},{"line_number":379,"context_line":"                      \u0027device hints\u0027 % dev)"},{"line_number":380,"context_line":"            return dev"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    LOG.debug(\u0027No device found that matches the root device hints\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_0c2f6d3f","line":379,"range":{"start_line":378,"start_character":23,"end_line":379,"end_character":35},"updated":"2016-08-30 13:18:51.000000000","message":"please, consider adding the matching hint to the log message","commit_id":"5b84bbd61662c85387ef9041c6c89aa84bcabd58"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d744b233efa0a5b0d3e90be128c90c01efe11dee","unresolved":false,"context_lines":[{"line_number":375,"context_line":"            if not specs_matcher.match(device_value, hint_value):"},{"line_number":376,"context_line":"                break"},{"line_number":377,"context_line":"        else:"},{"line_number":378,"context_line":"            LOG.debug(\u0027Device found! The device \"%s\" matches the root \u0027"},{"line_number":379,"context_line":"                      \u0027device hints\u0027 % dev)"},{"line_number":380,"context_line":"            return dev"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    LOG.debug(\u0027No device found that matches the root device hints\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa7ab95a_28176855","line":379,"range":{"start_line":378,"start_character":23,"end_line":379,"end_character":35},"in_reply_to":"fa7ab95a_0c2f6d3f","updated":"2016-08-31 13:53:10.000000000","message":"Done","commit_id":"5b84bbd61662c85387ef9041c6c89aa84bcabd58"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bf1b12aacdf4111bca5938195529d4b52b10885b","unresolved":false,"context_lines":[{"line_number":334,"context_line":"    for a device to be matched it needs to satisfy all the given hints."},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    :param devices: A list of dictionaries representing the devices"},{"line_number":337,"context_line":"                    containg one or more of the following keys:"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        :name: (String) The device name, e.g /dev/sda"},{"line_number":340,"context_line":"        :size: (Integer) Size of the device in *bytes*"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa7ab95a_740ea9e6","line":337,"range":{"start_line":337,"start_character":20,"end_line":337,"end_character":28},"updated":"2016-08-31 14:23:12.000000000","message":"typo: containing\n\nWill fix in case I need a new patch-set.","commit_id":"84537e76a41b4efb9a7bb85f4114589c8d051d9e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b8dc7e792fa4908b0365f8e26da776d810af4616","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                    device_value \u003d strutils.bool_from_string(device_value,"},{"line_number":383,"context_line":"                                                             strict\u003dTrue)"},{"line_number":384,"context_line":"                except ValueError:"},{"line_number":385,"context_line":"                    LOG.warning(_LW(\u0027The attribute \"%(attr)s of device \u0027"},{"line_number":386,"context_line":"                                    \u0027\"%(dev)s\" is not a valid Boolean. \u0027"},{"line_number":387,"context_line":"                                    \u0027Skipping device.\u0027), {\u0027attr\u0027: hint,"},{"line_number":388,"context_line":"                                                          \u0027dev\u0027: dev})"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa7ab95a_8e474e76","line":385,"updated":"2016-09-01 14:55:34.000000000","message":"s/(attr)s/(attr)s\"/\n\nWondering if it might be useful to also output the value. Eg\n\nThe attribute \"\u003cattr\u003e\" (\u003d\u003cvalue\u003e) of device ...\n\nThe attribute \"\u003cattr\u003e\" (with value \"\u003cvalue\u003e\") of device ...\n\nOr maybe \u0027.. is not a valid Boolean; it is \"\u003cvalue\u003e\".\u0027","commit_id":"84537e76a41b4efb9a7bb85f4114589c8d051d9e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"f2d5b10e08f3c5335db2b55b9055cc87840f6d89","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                    device_value \u003d strutils.bool_from_string(device_value,"},{"line_number":383,"context_line":"                                                             strict\u003dTrue)"},{"line_number":384,"context_line":"                except ValueError:"},{"line_number":385,"context_line":"                    LOG.warning(_LW(\u0027The attribute \"%(attr)s of device \u0027"},{"line_number":386,"context_line":"                                    \u0027\"%(dev)s\" is not a valid Boolean. \u0027"},{"line_number":387,"context_line":"                                    \u0027Skipping device.\u0027), {\u0027attr\u0027: hint,"},{"line_number":388,"context_line":"                                                          \u0027dev\u0027: dev})"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa7ab95a_d22c94ae","line":385,"in_reply_to":"fa7ab95a_8e474e76","updated":"2016-09-01 16:27:15.000000000","message":"++, will do","commit_id":"84537e76a41b4efb9a7bb85f4114589c8d051d9e"}]}
