)]}'
{"nova/cmd/status.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e441d906297edbc3aaba12e45f993bb0d613e3fb","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        \"\"\"Queries the API database for cell mappings."},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        .. note:: This method is unique in that it queries the database using"},{"line_number":201,"context_line":"                  CellMappingList.get_all() rather than a direct query using"},{"line_number":202,"context_line":"                  the sqlalchemy models. This is because"},{"line_number":203,"context_line":"                  CellMapping.database_connection can be a template and the"},{"line_number":204,"context_line":"                  object takes care of formatting the URL. We cannot use"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_2602fdbb","line":201,"range":{"start_line":201,"start_character":18,"end_line":201,"end_character":43},"updated":"2019-03-05 15:02:42.000000000","message":"I figured you\u0027d want to still query it manually and just use the templating functions to fill it out, but whatever you want is cool with me.\n\nWas nova-status supposed to run against N-1 code and DB? If so, would this be a problem?","commit_id":"38f2ce549ce4b21d5085824df701f9d2392b5604"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6c7bdb452337564ab94c7055a513a2e5330b7795","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        \"\"\"Queries the API database for cell mappings."},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        .. note:: This method is unique in that it queries the database using"},{"line_number":201,"context_line":"                  CellMappingList.get_all() rather than a direct query using"},{"line_number":202,"context_line":"                  the sqlalchemy models. This is because"},{"line_number":203,"context_line":"                  CellMapping.database_connection can be a template and the"},{"line_number":204,"context_line":"                  object takes care of formatting the URL. We cannot use"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_461ce176","line":201,"range":{"start_line":201,"start_character":18,"end_line":201,"end_character":43},"in_reply_to":"9fdfeff1_068579cf","updated":"2019-03-05 15:21:47.000000000","message":"\u003e That\u0027s what I started with and tried to explain here and in the\n \u003e commit message that you can\u0027t do RowProxy[\u0027database_connection\u0027] \u003d\n \u003e CellMapping.format_db_url(...) because RowProxy is read-only, it\n \u003e pukes on item assignment.\n\nYou could just dictify it of course, but yeah.\n\n \u003e Yes it can run against N-1 code but I don\u0027t see how\n \u003e CellMappingList.get_all() is going to be a problem for that since\n \u003e that method is pretty straight-forward and has been around forever.\n \u003e Otherwise I\u0027m not sure what you\u0027re thinking might be a problem?\n\nSorry, confusing wording. I meant that you couldn\u0027t (easily) do the more targeted thing of not using the object to load if you have to run against both versions of the code. Obviously from the perspective of this code, the object interface hasn\u0027t changed and thus we\u0027re better off doing it this way (hence the +2) :)","commit_id":"38f2ce549ce4b21d5085824df701f9d2392b5604"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3d6a23781ec2d5dcbe0137d79f43af73d887cb7c","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        \"\"\"Queries the API database for cell mappings."},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        .. note:: This method is unique in that it queries the database using"},{"line_number":201,"context_line":"                  CellMappingList.get_all() rather than a direct query using"},{"line_number":202,"context_line":"                  the sqlalchemy models. This is because"},{"line_number":203,"context_line":"                  CellMapping.database_connection can be a template and the"},{"line_number":204,"context_line":"                  object takes care of formatting the URL. We cannot use"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_068579cf","line":201,"range":{"start_line":201,"start_character":18,"end_line":201,"end_character":43},"in_reply_to":"9fdfeff1_2602fdbb","updated":"2019-03-05 15:10:58.000000000","message":"\u003e I figured you\u0027d want to still query it manually and just use the templating functions to fill it out, but whatever you want is cool with me.\n\nThat\u0027s what I started with and tried to explain here and in the commit message that you can\u0027t do RowProxy[\u0027database_connection\u0027] \u003d CellMapping.format_db_url(...) because RowProxy is read-only, it pukes on item assignment.\n\n\u003e Was nova-status supposed to run against N-1 code and DB? If so, would this be a problem?\n\nYes it can run against N-1 code but I don\u0027t see how CellMappingList.get_all() is going to be a problem for that since that method is pretty straight-forward and has been around forever. Otherwise I\u0027m not sure what you\u0027re thinking might be a problem?","commit_id":"38f2ce549ce4b21d5085824df701f9d2392b5604"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ea8f8786712c36de8f7d40e6e5f1e457c91bb2e0","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        \"\"\"Queries the API database for cell mappings."},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        .. note:: This method is unique in that it queries the database using"},{"line_number":201,"context_line":"                  CellMappingList.get_all() rather than a direct query using"},{"line_number":202,"context_line":"                  the sqlalchemy models. This is because"},{"line_number":203,"context_line":"                  CellMapping.database_connection can be a template and the"},{"line_number":204,"context_line":"                  object takes care of formatting the URL. We cannot use"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_4d2d1945","line":201,"range":{"start_line":201,"start_character":18,"end_line":201,"end_character":43},"in_reply_to":"9fdfeff1_461ce176","updated":"2019-03-05 17:28:05.000000000","message":"\u003e You could just dictify it of course, but yeah.\n\nI thought about that as well but things like target_cell are going to expect an object type thing with attribute access so if I was going to create a dummy object for __getattr__ methods we might as well just use the CellMapping object we already have.","commit_id":"38f2ce549ce4b21d5085824df701f9d2392b5604"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"699e6138febefd5d81f87cffbd0205ba23e11025","unresolved":false,"context_lines":[{"line_number":204,"context_line":"                  object takes care of formatting the URL. We cannot use"},{"line_number":205,"context_line":"                  RowProxy objects from sqlalchemy because we cannot set the"},{"line_number":206,"context_line":"                  formatted \u0027database_connection\u0027 value back on those objects"},{"line_number":207,"context_line":"                  (they are read-only)."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        :param include_cell0: True if cell0 should be returned, False if cell0"},{"line_number":210,"context_line":"            should be excluded from the results."}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_cd7589ce","line":207,"updated":"2019-03-05 17:53:58.000000000","message":"thanks for the detailed explanation, it helps understanding why you use objects.","commit_id":"38f2ce549ce4b21d5085824df701f9d2392b5604"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"699e6138febefd5d81f87cffbd0205ba23e11025","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        cell_mappings \u003d cell_mapping_obj.CellMappingList.get_all(ctxt)"},{"line_number":215,"context_line":"        if not include_cell0:"},{"line_number":216,"context_line":"            # Since CellMappingList does not implement remove() we have to"},{"line_number":217,"context_line":"            # create a new list and exclude cell0."},{"line_number":218,"context_line":"            mappings \u003d [mapping for mapping in cell_mappings"},{"line_number":219,"context_line":"                        if not mapping.is_cell0()]"},{"line_number":220,"context_line":"            cell_mappings \u003d cell_mapping_obj.CellMappingList(objects\u003dmappings)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_4d199986","line":217,"updated":"2019-03-05 17:53:58.000000000","message":"yeah. Fortunately we don\u0027t have a large size of magnitude for the number of cells.\nThat said, I guess we could *later* (eg. if needed more than once) provide an argument to the get_all() object method so it wouldn\u0027t need to loop again :-)","commit_id":"38f2ce549ce4b21d5085824df701f9d2392b5604"}]}
