)]}'
{"ironic/api/controllers/v1/node.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c311f004ac0e99006570fde50bce96a617bbabf3","unresolved":false,"context_lines":[{"line_number":1638,"context_line":"    def _decode_instance_info_traits(node):"},{"line_number":1639,"context_line":"        \"\"\"Parse traits in a node\u0027s instance_info and decode if necessary."},{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":"        Instance info traits are set via Nova, where the traits are defined in"},{"line_number":1642,"context_line":"        the Flavor extra_spec and passed to Ironic by the Nova Ironic driver."},{"line_number":1643,"context_line":""},{"line_number":1644,"context_line":"        NOTE: Although our API fully supports JSON fields, to maintain the"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_00cb1f1e","line":1641,"updated":"2018-02-15 22:09:56.000000000","message":"i think we can use nova as an example, but we shouldn\u0027t assume that it is *only* set via nova. (I don\u0027t see why others would set it but who knows... useful when the deploy templates work is done...)","commit_id":"561cd679fc930f747e45d1f2a97d343e7a8303e1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c311f004ac0e99006570fde50bce96a617bbabf3","unresolved":false,"context_lines":[{"line_number":1643,"context_line":""},{"line_number":1644,"context_line":"        NOTE: Although our API fully supports JSON fields, to maintain the"},{"line_number":1645,"context_line":"        backward compatibility with Nova in Queens we need to handle the case"},{"line_number":1646,"context_line":"        where the instance_info traits list is JSON encoded."},{"line_number":1647,"context_line":""},{"line_number":1648,"context_line":"        :param node: a Node object."},{"line_number":1649,"context_line":"        :raises: InvalidParameterValue if the node\u0027s instance_info.traits is"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_20e3bba6","line":1646,"updated":"2018-02-15 22:09:56.000000000","message":"maybe link to a bug?","commit_id":"561cd679fc930f747e45d1f2a97d343e7a8303e1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c311f004ac0e99006570fde50bce96a617bbabf3","unresolved":false,"context_lines":[{"line_number":1859,"context_line":"        #             be mapped onto the hash ring."},{"line_number":1860,"context_line":"        if not node.uuid:"},{"line_number":1861,"context_line":"            node.uuid \u003d uuidutils.generate_uuid()"},{"line_number":1862,"context_line":""},{"line_number":1863,"context_line":"        try:"},{"line_number":1864,"context_line":"            topic \u003d pecan.request.rpcapi.get_topic_for(node)"},{"line_number":1865,"context_line":"        except exception.NoValidHost as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_a06b4bef","line":1862,"updated":"2018-02-15 22:09:56.000000000","message":"we should check for node.instance_info[\u0027traits\u0027] here (or anywhere before L1877 I guess) too, I think it can be set when creating a node. (Or are we going to check/prevent that if a node doesn\u0027t have any traits yet? but even if we do, that code hasn\u0027t landed yet.)","commit_id":"561cd679fc930f747e45d1f2a97d343e7a8303e1"}],"ironic/common/utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c311f004ac0e99006570fde50bce96a617bbabf3","unresolved":false,"context_lines":[{"line_number":511,"context_line":"                    \"v1/nodes/\u003cnode\u003e/vifs should be used instead.\")"},{"line_number":512,"context_line":""},{"line_number":513,"context_line":""},{"line_number":514,"context_line":"def decode_instance_info_traits(instance_traits, node_uuid):"},{"line_number":515,"context_line":"    \"\"\"Parse traits in instance_info and decode if necessary."},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    Instance info traits are set via Nova, where the traits are defined in"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_db2528ad","line":514,"updated":"2018-02-15 22:09:56.000000000","message":"i was going to suggest generalizing this since it could decode any thing, not necessarily instance_info[\u0027traits\u0027] but it would mean passing in the error msg so not worth it.","commit_id":"561cd679fc930f747e45d1f2a97d343e7a8303e1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c311f004ac0e99006570fde50bce96a617bbabf3","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    NOTE: Although our API fully supports JSON fields, to maintain the backward"},{"line_number":521,"context_line":"    compatibility with Nova in Queens we need to handle the case where"},{"line_number":522,"context_line":"    instance_info traits list is JSON encoded."},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    :param instance_traits: a list of trait strings, or a JSON encoded list of"},{"line_number":525,"context_line":"        trait strings."}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_5b3118ec","line":522,"updated":"2018-02-15 22:09:56.000000000","message":"maybe add the bug. we should probably add a TODO here and in node.py, to remove in S*. Not that we\u0027d ever forget ;)","commit_id":"561cd679fc930f747e45d1f2a97d343e7a8303e1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c311f004ac0e99006570fde50bce96a617bbabf3","unresolved":false,"context_lines":[{"line_number":522,"context_line":"    instance_info traits list is JSON encoded."},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    :param instance_traits: a list of trait strings, or a JSON encoded list of"},{"line_number":525,"context_line":"        trait strings."},{"line_number":526,"context_line":"    :raises: InvalidParameterValue if the node\u0027s instance_info.traits is not a"},{"line_number":527,"context_line":"        list or a JSON encoded list."},{"line_number":528,"context_line":"    :returns: A list of trait strings, decoded from JSON if necessary."}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_20589b54","line":525,"updated":"2018-02-15 22:09:56.000000000","message":"is node_uuid just used for error/msgs?","commit_id":"561cd679fc930f747e45d1f2a97d343e7a8303e1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c311f004ac0e99006570fde50bce96a617bbabf3","unresolved":false,"context_lines":[{"line_number":530,"context_line":""},{"line_number":531,"context_line":"    def parse_error():"},{"line_number":532,"context_line":"        error_msg \u003d (_(\"Error parsing traits from Node %(node)s instance_info \""},{"line_number":533,"context_line":"                       \"field. A list or a JSON encoded list is expected.\")"},{"line_number":534,"context_line":"                     % {\"node\": node_uuid})"},{"line_number":535,"context_line":"        raise exception.InvalidParameterValue(error_msg)"},{"line_number":536,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_600c6342","line":533,"updated":"2018-02-15 22:09:56.000000000","message":"might be useful to also print out the vaiue.\n\nHow about\n\n\"The Node \u003c..\u003e\u0027s instance_info[\u0027traits\u0027] field is \u0027%s\u0027. It must be a list or JSON-encoded list.\"","commit_id":"561cd679fc930f747e45d1f2a97d343e7a8303e1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c311f004ac0e99006570fde50bce96a617bbabf3","unresolved":false,"context_lines":[{"line_number":540,"context_line":"        except (ValueError, TypeError):"},{"line_number":541,"context_line":"            parse_error()"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"    if not isinstance(instance_traits, list):"},{"line_number":544,"context_line":"        parse_error()"},{"line_number":545,"context_line":""},{"line_number":546,"context_line":"    return instance_traits"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa0c359_bba37c00","line":543,"updated":"2018-02-15 22:09:56.000000000","message":"do you know if instance_traits can be None and if it is OK for it to be None? If yes, we need to code for that. This will cause it to fail.","commit_id":"561cd679fc930f747e45d1f2a97d343e7a8303e1"}]}
