)]}'
{"ironic/api/controllers/v1/node.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"31b9c3d34d9035d927bc0e49b50fafd28bb93ca0","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import datetime"},{"line_number":19,"context_line":"import jsonpatch"},{"line_number":20,"context_line":"from oslo.config import cfg"},{"line_number":21,"context_line":"import pecan"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FsNc%3D","line":18,"updated":"2014-01-09 15:35:11.000000000","message":"Need an empty line between \"import datetime\" and \"import jsonpatch\"\n\nImports should be grouped in the following order:\n\n1 - standard library imports\n\n2 - related third party imports\n\n3 - local application/library specific imports","commit_id":"08716725abd5e768f3018df63c27ec223862b095"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"31b9c3d34d9035d927bc0e49b50fafd28bb93ca0","unresolved":false,"context_lines":[{"line_number":305,"context_line":"                     extra\u003d{}, updated_at\u003dtime, created_at\u003dtime)"},{"line_number":306,"context_line":"        # NOTE(matty_dubs): The chassis_uuid getter() is based on the"},{"line_number":307,"context_line":"        # _chassis_uuid variable:"},{"line_number":308,"context_line":"        sample._chassis_uuid\u003d\u0027edcad704-b2da-41d5-96d9-afd580ecfa12\u0027"},{"line_number":309,"context_line":"        return sample"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FsNA%3D","line":308,"updated":"2014-01-09 15:35:11.000000000","message":"whitespace around operator:\n\nsample._chassis_uuid \u003d \u0027edcad704-b2da-41d5-96d9-afd580ecfa12\u0027","commit_id":"08716725abd5e768f3018df63c27ec223862b095"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10f005b537178f173b415320ed0d228b3a9bf44c","unresolved":false,"context_lines":[{"line_number":295,"context_line":"    @classmethod"},{"line_number":296,"context_line":"    def sample(cls):"},{"line_number":297,"context_line":"        time \u003d datetime.datetime(2000, 1, 1, 12, 0, 0)"},{"line_number":298,"context_line":"        sample \u003d cls(uuid\u003d\u00271be26c0b-03f2-4d2e-ae87-c02d7f33c123\u0027,"},{"line_number":299,"context_line":"                     power_state\u003dir_states.NOSTATE,"},{"line_number":300,"context_line":"                     target_power_state\u003dir_states.NOSTATE,"},{"line_number":301,"context_line":"                     provision_state\u003dir_states.NOSTATE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FqhA%3D","line":298,"updated":"2014-01-09 22:29:53.000000000","message":"It was hard for me to see what/if anything was missing from this sample. It would help if they were ordered in the same order that they are mentioned above (from line 208), with the stuff from base (updated_at, created_at) either before or after. What do you think?","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10f005b537178f173b415320ed0d228b3a9bf44c","unresolved":false,"context_lines":[{"line_number":296,"context_line":"    def sample(cls):"},{"line_number":297,"context_line":"        time \u003d datetime.datetime(2000, 1, 1, 12, 0, 0)"},{"line_number":298,"context_line":"        sample \u003d cls(uuid\u003d\u00271be26c0b-03f2-4d2e-ae87-c02d7f33c123\u0027,"},{"line_number":299,"context_line":"                     power_state\u003dir_states.NOSTATE,"},{"line_number":300,"context_line":"                     target_power_state\u003dir_states.NOSTATE,"},{"line_number":301,"context_line":"                     provision_state\u003dir_states.NOSTATE,"},{"line_number":302,"context_line":"                     target_provision_state\u003dir_states.NOSTATE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FqkI%3D","line":299,"updated":"2014-01-09 22:29:53.000000000","message":"This is a sample. I think it would be more useful/interesting if we showed something other than None. How about ir_states.POWER_ON?","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"83e43922396a3176aa25306ce2caa5e4ebc6d708","unresolved":false,"context_lines":[{"line_number":296,"context_line":"    def sample(cls):"},{"line_number":297,"context_line":"        time \u003d datetime.datetime(2000, 1, 1, 12, 0, 0)"},{"line_number":298,"context_line":"        sample \u003d cls(uuid\u003d\u00271be26c0b-03f2-4d2e-ae87-c02d7f33c123\u0027,"},{"line_number":299,"context_line":"                     power_state\u003dir_states.NOSTATE,"},{"line_number":300,"context_line":"                     target_power_state\u003dir_states.NOSTATE,"},{"line_number":301,"context_line":"                     provision_state\u003dir_states.NOSTATE,"},{"line_number":302,"context_line":"                     target_provision_state\u003dir_states.NOSTATE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Fdts%3D","line":299,"in_reply_to":"AAAAUH%2F%2FfSI%3D","updated":"2014-01-13 16:13:08.000000000","message":"Thx Lucas. Yes, the info for a successfully deployed node would be good.","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"48e79baa7b73e61187d28fd1f3dd80bec78b730c","unresolved":false,"context_lines":[{"line_number":296,"context_line":"    def sample(cls):"},{"line_number":297,"context_line":"        time \u003d datetime.datetime(2000, 1, 1, 12, 0, 0)"},{"line_number":298,"context_line":"        sample \u003d cls(uuid\u003d\u00271be26c0b-03f2-4d2e-ae87-c02d7f33c123\u0027,"},{"line_number":299,"context_line":"                     power_state\u003dir_states.NOSTATE,"},{"line_number":300,"context_line":"                     target_power_state\u003dir_states.NOSTATE,"},{"line_number":301,"context_line":"                     provision_state\u003dir_states.NOSTATE,"},{"line_number":302,"context_line":"                     target_provision_state\u003dir_states.NOSTATE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FfSI%3D","line":299,"in_reply_to":"AAAAUH%2F%2FkrA%3D","updated":"2014-01-13 11:54:00.000000000","message":"It depends what we want to show, I also think it would be a good idea to show different states. For e.g a machine that has been successfully deployed would have:\n\npower_state \u003d ir_states.POWER_ON\n\ntarget_power_state \u003d ir_states.NOSTATE\n\nprovision_state \u003d ir_states.ACTIVE\n\ntarget_provision_state \u003d ir_states.NOSTATE","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":7411,"name":"Matt Wagner","email":"matt.wagner@redhat.com","username":"matty_dubs"},"change_message_id":"6867d8e92accb2769316392ab847abdb660111fd","unresolved":false,"context_lines":[{"line_number":296,"context_line":"    def sample(cls):"},{"line_number":297,"context_line":"        time \u003d datetime.datetime(2000, 1, 1, 12, 0, 0)"},{"line_number":298,"context_line":"        sample \u003d cls(uuid\u003d\u00271be26c0b-03f2-4d2e-ae87-c02d7f33c123\u0027,"},{"line_number":299,"context_line":"                     power_state\u003dir_states.NOSTATE,"},{"line_number":300,"context_line":"                     target_power_state\u003dir_states.NOSTATE,"},{"line_number":301,"context_line":"                     provision_state\u003dir_states.NOSTATE,"},{"line_number":302,"context_line":"                     target_provision_state\u003dir_states.NOSTATE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FkrA%3D","line":299,"in_reply_to":"AAAAUH%2F%2FqkI%3D","updated":"2014-01-10 21:49:15.000000000","message":"That sounds like a good idea. I had a hard time finding real-world sample data, so I leaned heavily on tests. Should target_power_state, provision_state, and target_provision_state remain None (NOSTATE)?","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10f005b537178f173b415320ed0d228b3a9bf44c","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                     target_provision_state\u003dir_states.NOSTATE,"},{"line_number":303,"context_line":"                     last_error\u003dNone, instance_uuid\u003dNone, driver\u003d\u0027fake\u0027,"},{"line_number":304,"context_line":"                     driver_info\u003d{}, properties\u003d{\u0027memory_mb\u0027: \u00271024\u0027,"},{"line_number":305,"context_line":"                     \u0027local_gb\u0027: \u002710\u0027, \u0027cpus\u0027: \u00271\u0027}, reservation\u003dNone,"},{"line_number":306,"context_line":"                     extra\u003d{}, updated_at\u003dtime, created_at\u003dtime)"},{"line_number":307,"context_line":"        # NOTE(matty_dubs): The chassis_uuid getter() is based on the"},{"line_number":308,"context_line":"        # _chassis_uuid variable:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Fqjs%3D","line":305,"updated":"2014-01-09 22:29:53.000000000","message":"Not sure we want \u0027reservation\u0027?","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"48e79baa7b73e61187d28fd1f3dd80bec78b730c","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                     target_provision_state\u003dir_states.NOSTATE,"},{"line_number":303,"context_line":"                     last_error\u003dNone, instance_uuid\u003dNone, driver\u003d\u0027fake\u0027,"},{"line_number":304,"context_line":"                     driver_info\u003d{}, properties\u003d{\u0027memory_mb\u0027: \u00271024\u0027,"},{"line_number":305,"context_line":"                     \u0027local_gb\u0027: \u002710\u0027, \u0027cpus\u0027: \u00271\u0027}, reservation\u003dNone,"},{"line_number":306,"context_line":"                     extra\u003d{}, updated_at\u003dtime, created_at\u003dtime)"},{"line_number":307,"context_line":"        # NOTE(matty_dubs): The chassis_uuid getter() is based on the"},{"line_number":308,"context_line":"        # _chassis_uuid variable:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FfTM%3D","line":305,"in_reply_to":"AAAAUH%2F%2FkvU%3D","updated":"2014-01-13 11:54:00.000000000","message":"Yea, in the moment reservation is not part of the Node\u0027s attributes, it might be included in the future. So yea I would remove it for now","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":7411,"name":"Matt Wagner","email":"matt.wagner@redhat.com","username":"matty_dubs"},"change_message_id":"6867d8e92accb2769316392ab847abdb660111fd","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                     target_provision_state\u003dir_states.NOSTATE,"},{"line_number":303,"context_line":"                     last_error\u003dNone, instance_uuid\u003dNone, driver\u003d\u0027fake\u0027,"},{"line_number":304,"context_line":"                     driver_info\u003d{}, properties\u003d{\u0027memory_mb\u0027: \u00271024\u0027,"},{"line_number":305,"context_line":"                     \u0027local_gb\u0027: \u002710\u0027, \u0027cpus\u0027: \u00271\u0027}, reservation\u003dNone,"},{"line_number":306,"context_line":"                     extra\u003d{}, updated_at\u003dtime, created_at\u003dtime)"},{"line_number":307,"context_line":"        # NOTE(matty_dubs): The chassis_uuid getter() is based on the"},{"line_number":308,"context_line":"        # _chassis_uuid variable:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FkvU%3D","line":305,"in_reply_to":"AAAAUH%2F%2Fqjs%3D","updated":"2014-01-10 21:49:15.000000000","message":"I had based this on the get_test_node() method in ironic/tests/db/utils.py, which includes that parameter. I don\u0027t see it used anywhere in the controllers, though, so I agree that its inclusion here is erroneous.","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10f005b537178f173b415320ed0d228b3a9bf44c","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                     last_error\u003dNone, instance_uuid\u003dNone, driver\u003d\u0027fake\u0027,"},{"line_number":304,"context_line":"                     driver_info\u003d{}, properties\u003d{\u0027memory_mb\u0027: \u00271024\u0027,"},{"line_number":305,"context_line":"                     \u0027local_gb\u0027: \u002710\u0027, \u0027cpus\u0027: \u00271\u0027}, reservation\u003dNone,"},{"line_number":306,"context_line":"                     extra\u003d{}, updated_at\u003dtime, created_at\u003dtime)"},{"line_number":307,"context_line":"        # NOTE(matty_dubs): The chassis_uuid getter() is based on the"},{"line_number":308,"context_line":"        # _chassis_uuid variable:"},{"line_number":309,"context_line":"        sample._chassis_uuid \u003d \u0027edcad704-b2da-41d5-96d9-afd580ecfa12\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Fqg0%3D","line":306,"updated":"2014-01-09 22:29:53.000000000","message":"Do we want to show links and/or ports?","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10f005b537178f173b415320ed0d228b3a9bf44c","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        collection.nodes \u003d [Node.convert_with_links(n, expand) for n in nodes]"},{"line_number":327,"context_line":"        collection.next \u003d collection.get_next(limit, url\u003durl, **kwargs)"},{"line_number":328,"context_line":"        return collection"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"class NodeVendorPassthruController(rest.RestController):"},{"line_number":332,"context_line":"    \"\"\"REST controller for VendorPassthru."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Fqgs%3D","line":329,"updated":"2014-01-09 22:29:53.000000000","message":"Were you going to add a sample for NodeCollection?","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ae09c30272f589fb523b50db9cf57b7ee09124eb","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        collection.nodes \u003d [Node.convert_with_links(n, expand) for n in nodes]"},{"line_number":327,"context_line":"        collection.next \u003d collection.get_next(limit, url\u003durl, **kwargs)"},{"line_number":328,"context_line":"        return collection"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"class NodeVendorPassthruController(rest.RestController):"},{"line_number":332,"context_line":"    \"\"\"REST controller for VendorPassthru."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FRnE%3D","line":329,"in_reply_to":"AAAAUH%2F%2FfVA%3D","updated":"2014-01-15 15:49:10.000000000","message":"Hey Lucas, I just looked at the ports one, and it doesn\u0027t show links. Should it?","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"48e79baa7b73e61187d28fd1f3dd80bec78b730c","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        collection.nodes \u003d [Node.convert_with_links(n, expand) for n in nodes]"},{"line_number":327,"context_line":"        collection.next \u003d collection.get_next(limit, url\u003durl, **kwargs)"},{"line_number":328,"context_line":"        return collection"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"class NodeVendorPassthruController(rest.RestController):"},{"line_number":332,"context_line":"    \"\"\"REST controller for VendorPassthru."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FfVA%3D","line":329,"in_reply_to":"AAAAUH%2F%2Fqgs%3D","updated":"2014-01-13 11:54:00.000000000","message":"+1\n\nThat\u0027s should be pretty straight forward, take a look at the ports one:\n\nhttps://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/port.py#L152-156","commit_id":"c665380af0de55356d36781e800ad1a0df652130"},{"author":{"_account_id":7411,"name":"Matt Wagner","email":"matt.wagner@redhat.com","username":"matty_dubs"},"change_message_id":"2cc94f086faa9dc52bc8554caf17c78441bd606a","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        # NOTE(matty_dubs): Documentation is stripping out the \u0027links\u0027"},{"line_number":317,"context_line":"        # and \u0027ports\u0027 attributes, so we need to wedge them in here:"},{"line_number":318,"context_line":"        objects.Node.fields[\u0027links\u0027] \u003d {}"},{"line_number":319,"context_line":"        objects.Node.fields[\u0027ports\u0027] \u003d {}"},{"line_number":320,"context_line":"        node_uuid \u003d \u00271be26c0b-03f2-4d2e-ae87-c02d7f33c123\u0027"},{"line_number":321,"context_line":"        # NOTE(matty_dubs): We can\u0027t use convert_with_links here"},{"line_number":322,"context_line":"        # because it reference pecan.request"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FVBk%3D","line":319,"updated":"2014-01-15 00:31:19.000000000","message":"Is there a cleaner way of doing this? I was unable to get these attributes to flow through to the docs any other way, but this feels a little bit like a hack.","commit_id":"69eac42c484a8e43ce0f66c3bc1bd0ce5bf4c62b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6c65191de4623b4431543e417d4fa1488c4c73d3","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        # NOTE(matty_dubs): Documentation is stripping out the \u0027links\u0027"},{"line_number":317,"context_line":"        # and \u0027ports\u0027 attributes, so we need to wedge them in here:"},{"line_number":318,"context_line":"        objects.Node.fields[\u0027links\u0027] \u003d {}"},{"line_number":319,"context_line":"        objects.Node.fields[\u0027ports\u0027] \u003d {}"},{"line_number":320,"context_line":"        node_uuid \u003d \u00271be26c0b-03f2-4d2e-ae87-c02d7f33c123\u0027"},{"line_number":321,"context_line":"        # NOTE(matty_dubs): We can\u0027t use convert_with_links here"},{"line_number":322,"context_line":"        # because it reference pecan.request"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FPCs%3D","line":319,"in_reply_to":"AAAAUH%2F%2FRjM%3D","updated":"2014-01-16 03:27:18.000000000","message":"Adding a 4th parameter would work too, although I thought it might be nice to avoid dealing with objects.Node if it isn\u0027t really needed.\n\nI\u0027d rather modify a function to make it more general, than copy/paste -- the latter makes code harder to maintain (and understand) in the long run.","commit_id":"69eac42c484a8e43ce0f66c3bc1bd0ce5bf4c62b"},{"author":{"_account_id":7411,"name":"Matt Wagner","email":"matt.wagner@redhat.com","username":"matty_dubs"},"change_message_id":"4b43116f38c13378d5fb2065324ba78d11da522b","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        # NOTE(matty_dubs): Documentation is stripping out the \u0027links\u0027"},{"line_number":317,"context_line":"        # and \u0027ports\u0027 attributes, so we need to wedge them in here:"},{"line_number":318,"context_line":"        objects.Node.fields[\u0027links\u0027] \u003d {}"},{"line_number":319,"context_line":"        objects.Node.fields[\u0027ports\u0027] \u003d {}"},{"line_number":320,"context_line":"        node_uuid \u003d \u00271be26c0b-03f2-4d2e-ae87-c02d7f33c123\u0027"},{"line_number":321,"context_line":"        # NOTE(matty_dubs): We can\u0027t use convert_with_links here"},{"line_number":322,"context_line":"        # because it reference pecan.request"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FRjM%3D","line":319,"in_reply_to":"AAAAUH%2F%2FRpQ%3D","updated":"2014-01-15 16:13:10.000000000","message":"That could work. My thought was to just add a fifth parameter, and, if present, use that; otherwise, use pecan.request.host_url. That feels less invasive. I was just reluctant to touch the method at all, unless there was agreement that it\u0027s a good idea.","commit_id":"69eac42c484a8e43ce0f66c3bc1bd0ce5bf4c62b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3d444eabff8beaa86d8ef9e95d96cd7154f42ad6","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        # NOTE(matty_dubs): Documentation is stripping out the \u0027links\u0027"},{"line_number":317,"context_line":"        # and \u0027ports\u0027 attributes, so we need to wedge them in here:"},{"line_number":318,"context_line":"        objects.Node.fields[\u0027links\u0027] \u003d {}"},{"line_number":319,"context_line":"        objects.Node.fields[\u0027ports\u0027] \u003d {}"},{"line_number":320,"context_line":"        node_uuid \u003d \u00271be26c0b-03f2-4d2e-ae87-c02d7f33c123\u0027"},{"line_number":321,"context_line":"        # NOTE(matty_dubs): We can\u0027t use convert_with_links here"},{"line_number":322,"context_line":"        # because it reference pecan.request"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FRpQ%3D","line":319,"in_reply_to":"AAAAUH%2F%2FVBk%3D","updated":"2014-01-15 15:47:19.000000000","message":"Here\u0027s an idea (although I haven\u0027t tested it out). Add eg a\n_convert_with_links(cls, node, url, expand) that does mostly\neverything convert_with_links does. And change\nconvert_with_links() to do:\n    node \u003d Node(...)\n    _convert_with_links(cls, node, pecan.request.host_url, expand)\n    return node\n\nThen after you create your Node, you can call _convert_with_links() and you\u0027ll get the links/ports.","commit_id":"69eac42c484a8e43ce0f66c3bc1bd0ce5bf4c62b"},{"author":{"_account_id":7411,"name":"Matt Wagner","email":"matt.wagner@redhat.com","username":"matty_dubs"},"change_message_id":"2cc94f086faa9dc52bc8554caf17c78441bd606a","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                                     \u0027nodes\u0027, node_uuid + \u0027/ports\u0027),"},{"line_number":329,"context_line":"                link.Link.make_link(\u0027bookmark\u0027, \u0027http://localhost:6385\u0027,"},{"line_number":330,"context_line":"                                    \u0027nodes\u0027, node_uuid + \u0027/ports\u0027,"},{"line_number":331,"context_line":"                                     bookmark\u003dTrue)]"},{"line_number":332,"context_line":"        sample \u003d cls(uuid\u003dnode_uuid, instance_uuid\u003dNone,"},{"line_number":333,"context_line":"                     power_state\u003dir_states.POWER_ON,"},{"line_number":334,"context_line":"                     target_power_state\u003dir_states.NOSTATE,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FVAw%3D","line":331,"updated":"2014-01-15 00:31:19.000000000","message":"I toyed with modifying convert_with_links to allow the caller to manually specify a fixed hostname that would be used (if specified) instead of calling pecan.request. That would eliminate this near-duplication. In the end, I decided not to do that, because it felt wrong to modify \u0027real\u0027 code to simplify the method that is just documenting a sample object. I don\u0027t think there\u0027s any other reason it would be a useful change. If others feel this would be a constructive change, though, I will do that.","commit_id":"69eac42c484a8e43ce0f66c3bc1bd0ce5bf4c62b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3d444eabff8beaa86d8ef9e95d96cd7154f42ad6","unresolved":false,"context_lines":[{"line_number":365,"context_line":"    def sample(cls):"},{"line_number":366,"context_line":"        sample \u003d cls()"},{"line_number":367,"context_line":"        node \u003d Node.sample()"},{"line_number":368,"context_line":"        except_list \u003d [\u0027instance_uuid\u0027, \u0027target_power_state\u0027, \u0027uuid\u0027,"},{"line_number":369,"context_line":"                       \u0027links\u0027, \u0027target_provision_state\u0027, \u0027last_error\u0027,"},{"line_number":370,"context_line":"                       \u0027power_state\u0027, \u0027provision_state\u0027]"},{"line_number":371,"context_line":"        node.unset_fields_except(except_list)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FRoc%3D","line":368,"updated":"2014-01-15 15:47:19.000000000","message":"Wondering where/how you came up with this list.","commit_id":"69eac42c484a8e43ce0f66c3bc1bd0ce5bf4c62b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"20ea9668bca30c974618870121905dd8db558080","unresolved":false,"context_lines":[{"line_number":365,"context_line":"    def sample(cls):"},{"line_number":366,"context_line":"        sample \u003d cls()"},{"line_number":367,"context_line":"        node \u003d Node.sample()"},{"line_number":368,"context_line":"        except_list \u003d [\u0027instance_uuid\u0027, \u0027target_power_state\u0027, \u0027uuid\u0027,"},{"line_number":369,"context_line":"                       \u0027links\u0027, \u0027target_provision_state\u0027, \u0027last_error\u0027,"},{"line_number":370,"context_line":"                       \u0027power_state\u0027, \u0027provision_state\u0027]"},{"line_number":371,"context_line":"        node.unset_fields_except(except_list)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FPDM%3D","line":368,"in_reply_to":"AAAAUH%2F%2FQcU%3D","updated":"2014-01-16 03:23:58.000000000","message":"That doesn\u0027t seem right to me. Shouldn\u0027t a node collection just be a list of nodes? It seems odd that we\u0027d remove information from nodes in the list, if we show the info for an individual node. Maybe someone else knows.","commit_id":"69eac42c484a8e43ce0f66c3bc1bd0ce5bf4c62b"},{"author":{"_account_id":7411,"name":"Matt Wagner","email":"matt.wagner@redhat.com","username":"matty_dubs"},"change_message_id":"3bf1b25d683818cb07fca68b5a07808ad6f893df","unresolved":false,"context_lines":[{"line_number":365,"context_line":"    def sample(cls):"},{"line_number":366,"context_line":"        sample \u003d cls()"},{"line_number":367,"context_line":"        node \u003d Node.sample()"},{"line_number":368,"context_line":"        except_list \u003d [\u0027instance_uuid\u0027, \u0027target_power_state\u0027, \u0027uuid\u0027,"},{"line_number":369,"context_line":"                       \u0027links\u0027, \u0027target_provision_state\u0027, \u0027last_error\u0027,"},{"line_number":370,"context_line":"                       \u0027power_state\u0027, \u0027provision_state\u0027]"},{"line_number":371,"context_line":"        node.unset_fields_except(except_list)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FQcU%3D","line":368,"in_reply_to":"AAAAUH%2F%2FRdQ%3D","updated":"2014-01-15 20:02:15.000000000","message":"Okay, confirmed that except_list matches the parameters being returned via the API. http://paste.openstack.org/show/61299/ as an example.","commit_id":"69eac42c484a8e43ce0f66c3bc1bd0ce5bf4c62b"},{"author":{"_account_id":7411,"name":"Matt Wagner","email":"matt.wagner@redhat.com","username":"matty_dubs"},"change_message_id":"4b43116f38c13378d5fb2065324ba78d11da522b","unresolved":false,"context_lines":[{"line_number":365,"context_line":"    def sample(cls):"},{"line_number":366,"context_line":"        sample \u003d cls()"},{"line_number":367,"context_line":"        node \u003d Node.sample()"},{"line_number":368,"context_line":"        except_list \u003d [\u0027instance_uuid\u0027, \u0027target_power_state\u0027, \u0027uuid\u0027,"},{"line_number":369,"context_line":"                       \u0027links\u0027, \u0027target_provision_state\u0027, \u0027last_error\u0027,"},{"line_number":370,"context_line":"                       \u0027power_state\u0027, \u0027provision_state\u0027]"},{"line_number":371,"context_line":"        node.unset_fields_except(except_list)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FRdQ%3D","line":368,"in_reply_to":"AAAAUH%2F%2FRoc%3D","updated":"2014-01-15 16:13:10.000000000","message":"These are the only parameters returned from ironicclient.node.list(), whereas node.get(some_uuid) returned the full list. Though I\u0027m now wondering if this was a client thing, as I can\u0027t find any code that would strip those parameters out in the controller. Let me dig a bit deeper.","commit_id":"69eac42c484a8e43ce0f66c3bc1bd0ce5bf4c62b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"487cdd68d4e094ed7d595e8f934d3f485fa7769f","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        # NOTE(matty_dubs): These match what is in Node\u0027s"},{"line_number":359,"context_line":"        # convert_with_links method, plus the added links attribute."},{"line_number":360,"context_line":"        # (See the \u0027if not expand\u0027 section of that method.)"},{"line_number":361,"context_line":"        except_list \u003d [\u0027instance_uuid\u0027, \u0027power_state\u0027,"},{"line_number":362,"context_line":"                       \u0027provision_state\u0027, \u0027uuid\u0027, \u0027links\u0027]"},{"line_number":363,"context_line":"        node.unset_fields_except(except_list)"},{"line_number":364,"context_line":"        sample.nodes \u003d [node]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2B540%3D","line":361,"updated":"2014-01-20 21:43:02.000000000","message":"Here\u0027s a suggestion. instead of doing these two lines, how about adding an \u0027expand\u003dTrue\u0027 parameter to your new Node.sample(), and calling it with expand\u003dFalse.","commit_id":"b503137e6980f08a32a48516a2a5f8b3e5ba8159"},{"author":{"_account_id":7411,"name":"Matt Wagner","email":"matt.wagner@redhat.com","username":"matty_dubs"},"change_message_id":"94949de8aa3453d492e5ecdadc14a96c0922b734","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        # NOTE(matty_dubs): These match what is in Node\u0027s"},{"line_number":359,"context_line":"        # convert_with_links method, plus the added links attribute."},{"line_number":360,"context_line":"        # (See the \u0027if not expand\u0027 section of that method.)"},{"line_number":361,"context_line":"        except_list \u003d [\u0027instance_uuid\u0027, \u0027power_state\u0027,"},{"line_number":362,"context_line":"                       \u0027provision_state\u0027, \u0027uuid\u0027, \u0027links\u0027]"},{"line_number":363,"context_line":"        node.unset_fields_except(except_list)"},{"line_number":364,"context_line":"        sample.nodes \u003d [node]"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2B51g%3D","line":361,"in_reply_to":"AAAAUH%2F%2B540%3D","updated":"2014-01-20 21:55:24.000000000","message":"Ooh, nice one! Will resubmit.","commit_id":"b503137e6980f08a32a48516a2a5f8b3e5ba8159"}]}
