)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d2eb22b38874fa1fde98c79fb7f28548496ce1ca","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add put method to API to create or update a node"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change adds put method to the NodesController to create or"},{"line_number":10,"context_line":"update a node provided its uuid."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I587778e1f5f6af81e52279927be804502b4e5432"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da86d52c_662ecbfc","line":10,"updated":"2015-02-06 03:39:41.000000000","message":"I think it would be useful to elaborate that creating \u003d\u003d all fields (handwaving here cuz it isn\u0027t \u0027all\u0027 but there is a set of required) need to be specified and the uuid in URI \u0026 body have to be the same.","commit_id":"e44bdbfa23ec4613025dc8acf7eebecd622fcd89"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"df63822197a897d77febdb2fd0055627b8633064","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change adds put method to the NodesController to create or"},{"line_number":10,"context_line":"update a node provided its uuid."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I587778e1f5f6af81e52279927be804502b4e5432"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da86d52c_6fecc590","line":11,"updated":"2015-02-06 17:55:21.000000000","message":"If possible a sample of how to call this API would be nice in the commit message.  If it is only a few lines.","commit_id":"e44bdbfa23ec4613025dc8acf7eebecd622fcd89"}],"ironic/api/controllers/v1/node.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"76bcd3afa4ce5903b0e644662156e35322823dc6","unresolved":false,"context_lines":[{"line_number":827,"context_line":""},{"line_number":828,"context_line":"        return self._create_node(node)"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"    @wsme_pecan.wsexpose(Node, types.uuid, body\u003dNode)"},{"line_number":831,"context_line":"    def put(self, node_uuid, node):"},{"line_number":832,"context_line":"        \"\"\"Create a new node or update an existing one."},{"line_number":833,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_ccad109d","line":830,"updated":"2014-11-25 00:48:04.000000000","message":"This means the node UUID can be specified in two places in the PUT command: the URL, and the BODY.\n\nThis seems like an incorrect REST semantic to me.... WDYT?","commit_id":"26c8f261b5c89f69c226b0e303ce865184d4dcd7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d2eb22b38874fa1fde98c79fb7f28548496ce1ca","unresolved":false,"context_lines":[{"line_number":880,"context_line":"                        \"Values of all of the following attributes should be \""},{"line_number":881,"context_line":"                        \"provided when doing PUT request: %(fields)s.\")"},{"line_number":882,"context_line":"                raise wsme.exc.ClientSideError("},{"line_number":883,"context_line":"                    msg % {\"field\": field, \"fields\": \u0027 \u0027.join(fields)}"},{"line_number":884,"context_line":"                )"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    @wsme_pecan.wsexpose(Node, types.uuid, body\u003dNode)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_260213b4","line":883,"updated":"2015-02-06 03:39:41.000000000","message":"probably want a comma-separated list of fields.\n\nI was thinking that it might be useful to go through all the fields, and the error msg could include a list of the missing fields instead of listing all the expected fields. eg, \u0027All the node\u0027s fields must be specified in the request body. These were missing: ...\u0027.","commit_id":"e44bdbfa23ec4613025dc8acf7eebecd622fcd89"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"fceedfcbd0d7852080c664b989dae288c43648d3","unresolved":false,"context_lines":[{"line_number":880,"context_line":"                        \"Values of all of the following attributes should be \""},{"line_number":881,"context_line":"                        \"provided when doing PUT request: %(fields)s.\")"},{"line_number":882,"context_line":"                raise wsme.exc.ClientSideError("},{"line_number":883,"context_line":"                    msg % {\"field\": field, \"fields\": \u0027 \u0027.join(fields)}"},{"line_number":884,"context_line":"                )"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    @wsme_pecan.wsexpose(Node, types.uuid, body\u003dNode)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_43e635e9","line":883,"in_reply_to":"da86d52c_260213b4","updated":"2015-02-12 10:02:08.000000000","message":"+1, I agree with collecting all the missing fields, it\u0027s more useful","commit_id":"e44bdbfa23ec4613025dc8acf7eebecd622fcd89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d2eb22b38874fa1fde98c79fb7f28548496ce1ca","unresolved":false,"context_lines":[{"line_number":895,"context_line":""},{"line_number":896,"context_line":"        if node.uuid !\u003d wtypes.Unset and node.uuid !\u003d node_uuid:"},{"line_number":897,"context_line":"            msg \u003d _(\"Node UUID provided in URI %(uri_uuid)s and node UUID \""},{"line_number":898,"context_line":"                    \"provided in request body %(req_uuid)s must be equal.\")"},{"line_number":899,"context_line":"            raise wsme.exc.ClientSideError(msg % {\"uri_uuid\": node_uuid,"},{"line_number":900,"context_line":"                                                  \"req_uuid\": node.uuid})"},{"line_number":901,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_e6155b40","line":898,"updated":"2015-02-06 03:39:41.000000000","message":"Just a nit. If we want the msg to be shorter, can do something like \u0027Node UUID in URI (...) and UUID in request body (..) must be the same\u0027.","commit_id":"e44bdbfa23ec4613025dc8acf7eebecd622fcd89"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d2eb22b38874fa1fde98c79fb7f28548496ce1ca","unresolved":false,"context_lines":[{"line_number":907,"context_line":"            chassis \u003d objects.Chassis.get_by_uuid(pecan.request.context,"},{"line_number":908,"context_line":"                                                  node.chassis_uuid)"},{"line_number":909,"context_line":"            node.chassis_id \u003d chassis.id"},{"line_number":910,"context_line":"        self._check_all_fields(node, fields + [\u0027chassis_uuid\u0027])"},{"line_number":911,"context_line":""},{"line_number":912,"context_line":"        try:"},{"line_number":913,"context_line":"            put_node \u003d self._create_node(node)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_668b2b1f","line":910,"updated":"2015-02-06 03:39:41.000000000","message":"I\u0027m a bit curious about chassis_uuid. if node.chassis_uuid \u003d\u003d wtypes.Unset, the _check_all_fields() will raise an exception. If so, why have the code in line 906. Or maybe the code in line 907-909 need to be done after this check? \n\nBut a node doesn\u0027t need to be associated with a chassis. In the request body, are we asking them to specify chassis_uuid\u003dNone?","commit_id":"e44bdbfa23ec4613025dc8acf7eebecd622fcd89"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"e5a3bd96a6501fd5546cdb429fa65a02049ac531","unresolved":false,"context_lines":[{"line_number":907,"context_line":"            chassis \u003d objects.Chassis.get_by_uuid(pecan.request.context,"},{"line_number":908,"context_line":"                                                  node.chassis_uuid)"},{"line_number":909,"context_line":"            node.chassis_id \u003d chassis.id"},{"line_number":910,"context_line":"        self._check_all_fields(node, fields + [\u0027chassis_uuid\u0027])"},{"line_number":911,"context_line":""},{"line_number":912,"context_line":"        try:"},{"line_number":913,"context_line":"            put_node \u003d self._create_node(node)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_cfbfff5e","line":910,"in_reply_to":"da86d52c_668b2b1f","updated":"2015-02-10 16:05:17.000000000","message":"Yes, it seems that better to move L907-909 after _check_all_fields.\n\nAnd also chassis_uuid should not be obligatory when creating a node and should not be enforced when we\u0027re updating a node without chassis associated, so it\u0027s a mistake here :)","commit_id":"e44bdbfa23ec4613025dc8acf7eebecd622fcd89"}]}
