)]}'
{"marconi/proxy/storage/memory/partitions.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"1d4fb3194974e34ee4d508740428b7db23db6f2d","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                           \u0027h\u0027: hosts}"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def update(self, name, **kwargs):"},{"line_number":49,"context_line":"        fields \u003d dict((k[0], v) for k, v in kwargs.items()"},{"line_number":50,"context_line":"                      if k in (\u0027hosts\u0027, \u0027weight\u0027) and v is not None)"},{"line_number":51,"context_line":"        assert fields, \u0027`hosts` or `weight` not found in kwargs\u0027"},{"line_number":52,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2F0B8%3D","line":49,"updated":"2013-10-09 14:08:07.000000000","message":"six.iteritems ?","commit_id":"b811cbb664736852366a33cae768222ff11295ec"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"b4a9204a5fdb235c95e61495a269e693163362cd","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                           \u0027h\u0027: hosts}"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def update(self, name, **kwargs):"},{"line_number":49,"context_line":"        fields \u003d dict((k[0], v) for k, v in kwargs.items()"},{"line_number":50,"context_line":"                      if k in (\u0027hosts\u0027, \u0027weight\u0027) and v is not None)"},{"line_number":51,"context_line":"        assert fields, \u0027`hosts` or `weight` not found in kwargs\u0027"},{"line_number":52,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2F0AU%3D","line":49,"in_reply_to":"AAAATH%2F%2F0B8%3D","updated":"2013-10-09 14:14:08.000000000","message":"I didn\u0027t feel iteritems was necessary here since the transport layer already shrinks kwargs to be less than or equal to 2 items.","commit_id":"b811cbb664736852366a33cae768222ff11295ec"}],"marconi/proxy/storage/mongodb/partitions.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"1d4fb3194974e34ee4d508740428b7db23db6f2d","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    @utils.raises_conn_error"},{"line_number":88,"context_line":"    def update(self, name, **kwargs):"},{"line_number":89,"context_line":"        fields \u003d dict((k[0], v) for k, v in kwargs.items()"},{"line_number":90,"context_line":"                      if k in (\u0027hosts\u0027, \u0027weight\u0027) and v is not None)"},{"line_number":91,"context_line":"        assert fields, \u0027`hosts` or `weight` not found in kwargs\u0027"},{"line_number":92,"context_line":"        res \u003d self._col.update({\u0027n\u0027: name},"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2F0CA%3D","line":89,"updated":"2013-10-09 14:08:07.000000000","message":"six.iteritems ?","commit_id":"b811cbb664736852366a33cae768222ff11295ec"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"b4a9204a5fdb235c95e61495a269e693163362cd","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    @utils.raises_conn_error"},{"line_number":88,"context_line":"    def update(self, name, **kwargs):"},{"line_number":89,"context_line":"        fields \u003d dict((k[0], v) for k, v in kwargs.items()"},{"line_number":90,"context_line":"                      if k in (\u0027hosts\u0027, \u0027weight\u0027) and v is not None)"},{"line_number":91,"context_line":"        assert fields, \u0027`hosts` or `weight` not found in kwargs\u0027"},{"line_number":92,"context_line":"        res \u003d self._col.update({\u0027n\u0027: name},"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2Fz%2F4%3D","line":89,"in_reply_to":"AAAATH%2F%2F0CA%3D","updated":"2013-10-09 14:14:08.000000000","message":"As in the memory storage driver.","commit_id":"b811cbb664736852366a33cae768222ff11295ec"}],"marconi/proxy/transport/wsgi/partitions.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"1d4fb3194974e34ee4d508740428b7db23db6f2d","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in six.iteritems(data)"},{"line_number":174,"context_line":"                          if k in (\u0027hosts\u0027, \u0027weight\u0027)"},{"line_number":175,"context_line":"                          and v is not None)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"            self._ctrl.update(partition, **fields)"},{"line_number":178,"context_line":"        except exceptions.PartitionNotFound as ex:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2F0Bo%3D","line":175,"updated":"2013-10-09 14:08:07.000000000","message":"It feels like this code could be pulled out into a helper function. Thoughts?","commit_id":"b811cbb664736852366a33cae768222ff11295ec"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"b4a9204a5fdb235c95e61495a269e693163362cd","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in six.iteritems(data)"},{"line_number":174,"context_line":"                          if k in (\u0027hosts\u0027, \u0027weight\u0027)"},{"line_number":175,"context_line":"                          and v is not None)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"            self._ctrl.update(partition, **fields)"},{"line_number":178,"context_line":"        except exceptions.PartitionNotFound as ex:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2Fz%2FU%3D","line":175,"in_reply_to":"AAAATH%2F%2F0Bo%3D","updated":"2013-10-09 14:14:08.000000000","message":"Since it was used in just one place, I abstained from separating this out. However, generalizing it later to a form:\n\n    get_fields(names, dict) \u003d\u003e dict\n\nWould be cool.","commit_id":"b811cbb664736852366a33cae768222ff11295ec"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"e05bcd7306ced1149fb524e717317d227b1f7a38","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in six.iteritems(data)"},{"line_number":174,"context_line":"                          if k in (\u0027hosts\u0027, \u0027weight\u0027)"},{"line_number":175,"context_line":"                          and v is not None)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"            self._ctrl.update(partition, **fields)"},{"line_number":178,"context_line":"        except exceptions.PartitionNotFound as ex:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2FwOA%3D","line":175,"in_reply_to":"AAAATH%2F%2Fwkw%3D","updated":"2013-10-10 10:24:03.000000000","message":"Haha, turns out I overlooked that! I\u0027ve addressed this in a later patch: https://review.openstack.org/#/c/50815/1/marconi/common/utils.py\n\nTurns out generalizing that function lead to some really nifty ideas. I could\u0027ve taken it a step further, looking at it now, using key_filter and val_filter functions, instead of matching the keys against a given set. However, this is good enough for now.\n\nI\u0027ll update the proxy drivers to use that function as soon as they get merged and I can rebase from my latest patch.","commit_id":"b811cbb664736852366a33cae768222ff11295ec"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"8a0e52465d267ce5ed9f3ff727b512dc4758791d","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        try:"},{"line_number":173,"context_line":"            fields \u003d dict((k, v) for k, v in six.iteritems(data)"},{"line_number":174,"context_line":"                          if k in (\u0027hosts\u0027, \u0027weight\u0027)"},{"line_number":175,"context_line":"                          and v is not None)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"            self._ctrl.update(partition, **fields)"},{"line_number":178,"context_line":"        except exceptions.PartitionNotFound as ex:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2Fwkw%3D","line":175,"in_reply_to":"AAAATH%2F%2Fz%2FU%3D","updated":"2013-10-10 08:30:20.000000000","message":"mmh, but isn\u0027t this the same code being used in the memory and mongodb storage? It looks the same to me but I may be missing something (besides the iteritmes part).","commit_id":"b811cbb664736852366a33cae768222ff11295ec"}],"tests/unit/proxy/storage/base.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"1d4fb3194974e34ee4d508740428b7db23db6f2d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    def test_update_with_missing_hosts_and_weight_raises(self):"},{"line_number":106,"context_line":"        self.assertRaises(AssertionError,"},{"line_number":107,"context_line":"                          self.controller.update,"},{"line_number":108,"context_line":"                          \u0027a\u0027, cat\u003d\u0027adorable\u0027)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_update_on_nonexisting_raises(self):"},{"line_number":111,"context_line":"        self.assertRaises(exceptions.PartitionNotFound,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2F0CY%3D","line":108,"updated":"2013-10-09 14:08:07.000000000","message":"dogs are adorable!!!!","commit_id":"b811cbb664736852366a33cae768222ff11295ec"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"b4a9204a5fdb235c95e61495a269e693163362cd","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    def test_update_with_missing_hosts_and_weight_raises(self):"},{"line_number":106,"context_line":"        self.assertRaises(AssertionError,"},{"line_number":107,"context_line":"                          self.controller.update,"},{"line_number":108,"context_line":"                          \u0027a\u0027, cat\u003d\u0027adorable\u0027)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def test_update_on_nonexisting_raises(self):"},{"line_number":111,"context_line":"        self.assertRaises(exceptions.PartitionNotFound,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAATH%2F%2Fz%2FM%3D","line":108,"in_reply_to":"AAAATH%2F%2F0CY%3D","updated":"2013-10-09 14:14:08.000000000","message":"Especially corgis, haha. :P","commit_id":"b811cbb664736852366a33cae768222ff11295ec"}]}
