)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"128e8d10cd3cbd409cfbbb52c810ac888bfa6077","unresolved":false,"context_lines":[{"line_number":7,"context_line":"fix AggregateTypeAffinityFilter multi values support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows the AggregateTypeAffinityFilter to function when"},{"line_number":10,"context_line":"multiple instance_type names are set in the Aggregate Metadata"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I0618a300754d012db62df52faa12cc3cedfe2b65"},{"line_number":13,"context_line":"Closes-bug: #1399204"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a930d6b_184edf6f","line":10,"updated":"2015-01-22 18:21:45.000000000","message":"This commit message doesn\u0027t have enough detail for something that is really adding a new feature.\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"b5fc9cbe59363eeb01d9b01916a1693dc278d4fe"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"128e8d10cd3cbd409cfbbb52c810ac888bfa6077","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows the AggregateTypeAffinityFilter to function when"},{"line_number":10,"context_line":"multiple instance_type names are set in the Aggregate Metadata"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I0618a300754d012db62df52faa12cc3cedfe2b65"},{"line_number":13,"context_line":"Closes-bug: #1399204"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a930d6b_782443af","line":11,"updated":"2015-01-22 18:21:45.000000000","message":"This should have a DocImpact flag","commit_id":"b5fc9cbe59363eeb01d9b01916a1693dc278d4fe"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"34ebdab8f11847b05d34a3aa834043e299f48601","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows the AggregateTypeAffinityFilter to function when"},{"line_number":10,"context_line":"multiple instance_type names are set in the Aggregate Metadata"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I0618a300754d012db62df52faa12cc3cedfe2b65"},{"line_number":13,"context_line":"Closes-bug: #1399204"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a930d6b_b9005102","line":11,"in_reply_to":"1a930d6b_782443af","updated":"2015-01-23 12:46:18.000000000","message":"Erm, you\u0027re right","commit_id":"b5fc9cbe59363eeb01d9b01916a1693dc278d4fe"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"34140e8f4156d61b33ae7599be50c55e54488e54","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sean Mooney \u003csean.k.mooney@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-03 16:58:45 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix AggregateTypeAffinityFilter multi values support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows the AggregateTypeAffinityFilter to function when"},{"line_number":10,"context_line":"multiple instance_type names are set in the Aggregate Metadata."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3afb71cf_af8a5219","line":7,"updated":"2015-06-09 12:03:17.000000000","message":"This isn\u0027t a \"Fix\" this is adding multi value support.\n\nSaying something doesn\u0027t support X, is a feature request not a bug.","commit_id":"55e4cf2e90df886a294afd225ef0b275ce8c416a"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"c5794f33c32c4477544d6ff7148df27d0c5b5382","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sean Mooney \u003csean.k.mooney@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-03 16:58:45 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix AggregateTypeAffinityFilter multi values support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows the AggregateTypeAffinityFilter to function when"},{"line_number":10,"context_line":"multiple instance_type names are set in the Aggregate Metadata."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3afb71cf_c1466c7a","line":7,"in_reply_to":"3afb71cf_1b62b33e","updated":"2015-06-09 19:00:13.000000000","message":"I would prefer to use the word Add, I can go ahead and make the change myself and +W it after though.","commit_id":"55e4cf2e90df886a294afd225ef0b275ce8c416a"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"654897afebbfcc848224b30df7f98fdf5176fc54","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sean Mooney \u003csean.k.mooney@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-03 16:58:45 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix AggregateTypeAffinityFilter multi values support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows the AggregateTypeAffinityFilter to function when"},{"line_number":10,"context_line":"multiple instance_type names are set in the Aggregate Metadata."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3afb71cf_1b62b33e","line":7,"in_reply_to":"3afb71cf_92ae877f","updated":"2015-06-09 18:29:56.000000000","message":"hi i saw your cover message comment after responding so i think i missed your original point.\n\none of the reasons I originally opened this item as a bug was that the only documentation available not in the code simply states that the following.\n\n|AggregateTypeAffinityFilter| - limits instance_type by aggregate.\n\nas it does not provide any information as to how to use the filter or to its limitation of only supporting one instance type per aggregate i considered the implementation to be incomplete and opened it this as a bug instead of a blueprint/spec for a new feature as it was a relatively small change.\n\nthat is why i used the word \"Fix\" rather then add above but i could change it to \n\nAdds AggregateTypeAffinityFilter multi values support\n\ninstead though i would prefer not to rev the patch set again unless you feel strongly that this should be changed?","commit_id":"55e4cf2e90df886a294afd225ef0b275ce8c416a"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"728e22a745fa66cde9bb9f17bdb33a12e8957428","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sean Mooney \u003csean.k.mooney@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-03 16:58:45 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fix AggregateTypeAffinityFilter multi values support"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change allows the AggregateTypeAffinityFilter to function when"},{"line_number":10,"context_line":"multiple instance_type names are set in the Aggregate Metadata."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3afb71cf_92ae877f","line":7,"in_reply_to":"3afb71cf_af8a5219","updated":"2015-06-09 18:03:14.000000000","message":"hi, i have created a spec-less blueprint and linked it to the bug report for the purpose of tracking the addition of this new feature.\n\nhttps://blueprints.launchpad.net/nova/+spec/aggregatetypeaffinityfilter-multi-value-support\n\nis that sufficient to track the addition/extension of this feature?\nthis is a repetitively minor change to a pre-existing feature so i don\u0027t think a full spec is required in this case but i can submit one if you think its required.","commit_id":"55e4cf2e90df886a294afd225ef0b275ce8c416a"}],"doc/source/devref/filter_scheduler.rst":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"cfb7750e9358968e313f53d0d2824b2b674befe7","unresolved":false,"context_lines":[{"line_number":140,"context_line":"   if the aggregate metadata key \u0027instance_type\u0027 has the instance_type"},{"line_number":141,"context_line":"   name as a value. Multiple instance types can be enabled for an aggregate"},{"line_number":142,"context_line":"   by using a json array with the following syntax:"},{"line_number":143,"context_line":"   [\"instance_type_name1\",\"instance_type_name2\"] e.g. [\"m1.nano\",\"m1.small\"]"},{"line_number":144,"context_line":"* |ServerGroupAntiAffinityFilter| - This filter implements anti-affinity for a"},{"line_number":145,"context_line":"  server group.  First you must create a server group with a policy of"},{"line_number":146,"context_line":"  \u0027anti-affinity\u0027 via the server groups API.  Then, when you boot a new server,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a961159_a31809ce","line":143,"updated":"2015-01-14 16:56:56.000000000","message":"that\u0027s incorrect, you\u0027re still accepting a string which is a JSON-encoded list","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d3773ecca625276cd3fd6b0933580b39c827d772","unresolved":false,"context_lines":[{"line_number":140,"context_line":"   if the aggregate metadata key \u0027instance_type\u0027 has the instance_type"},{"line_number":141,"context_line":"   name as a value. Multiple instance types can be enabled for an aggregate"},{"line_number":142,"context_line":"   by using a json array with the following syntax:"},{"line_number":143,"context_line":"   [\"instance_type_name1\",\"instance_type_name2\"] e.g. [\"m1.nano\",\"m1.small\"]"},{"line_number":144,"context_line":"* |ServerGroupAntiAffinityFilter| - This filter implements anti-affinity for a"},{"line_number":145,"context_line":"  server group.  First you must create a server group with a policy of"},{"line_number":146,"context_line":"  \u0027anti-affinity\u0027 via the server groups API.  Then, when you boot a new server,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a961159_7dab11d6","line":143,"in_reply_to":"3a961159_39952888","updated":"2015-01-14 23:16:40.000000000","message":"I\u0027m referring to the notion of \u0027by using a json array\u0027 which is not right","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b13702b72337c562758f421f708786c38fe3b774","unresolved":false,"context_lines":[{"line_number":140,"context_line":"   if the aggregate metadata key \u0027instance_type\u0027 has the instance_type"},{"line_number":141,"context_line":"   name as a value. Multiple instance types can be enabled for an aggregate"},{"line_number":142,"context_line":"   by using a json array with the following syntax:"},{"line_number":143,"context_line":"   [\"instance_type_name1\",\"instance_type_name2\"] e.g. [\"m1.nano\",\"m1.small\"]"},{"line_number":144,"context_line":"* |ServerGroupAntiAffinityFilter| - This filter implements anti-affinity for a"},{"line_number":145,"context_line":"  server group.  First you must create a server group with a policy of"},{"line_number":146,"context_line":"  \u0027anti-affinity\u0027 via the server groups API.  Then, when you boot a new server,"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3a961159_39952888","line":143,"in_reply_to":"3a961159_a31809ce","updated":"2015-01-14 17:49:19.000000000","message":"the value of the metadata key pair is a string containing a json array.\ni have not said otherwise in the text above as i do not refer to the datatype of the keypair value.\n\nabove i stated that the content of the value of the metadata key pair can be a json array of instance_type names or the content of the value of the metadata key pair can be an instance_type name","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"2ad035f12b7cb8108bc2b78f6bb7b265351fada1","unresolved":false,"context_lines":[{"line_number":141,"context_line":"   the instance_type aggregate metadata value contains the name of the"},{"line_number":142,"context_line":"   instance_type requested. The value of the instance_type metadata entry is"},{"line_number":143,"context_line":"   a string that may contain either a single instance_type name or a list of"},{"line_number":144,"context_line":"   instance_type names encoded with json array syntax."},{"line_number":145,"context_line":"   e.g. \u0027m1.nano\u0027 or \u0027[\"m1.nano\",\"m1.small\"]\u0027"},{"line_number":146,"context_line":"* |ServerGroupAntiAffinityFilter| - This filter implements anti-affinity for a"},{"line_number":147,"context_line":"  server group.  First you must create a server group with a policy of"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a930d6b_dc098bde","line":144,"updated":"2015-01-23 13:27:19.000000000","message":"Do we really need the json array syntax thing instead of a simple comma separated string? \n\nIn the REST API...Will we end up with a json payload with one of the values which has a string which has json inside it? If we go down this route...(May not be for this exact review)","commit_id":"b5fc9cbe59363eeb01d9b01916a1693dc278d4fe"}],"nova/scheduler/filters/type_filter.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7cd305d39cd9b2d0a2b6a58337139b33c4991455","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        aggregate_vals \u003d utils.aggregate_values_from_db("},{"line_number":60,"context_line":"            filter_properties[\u0027context\u0027], host_state.host, \u0027instance_type\u0027)"},{"line_number":61,"context_line":"        return (not aggregate_vals or"},{"line_number":62,"context_line":"                any(instance_type[\u0027name\u0027] in x.split(\u0027,\u0027)"},{"line_number":63,"context_line":"                    for x in aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_9302fb6d","line":62,"updated":"2014-12-15 20:48:36.000000000","message":"Technically, you don\u0027t need to x.split(\u0027,\u0027), since \u0027x\u0027 in \u0027x,y,z\u0027 \u003d\u003d \u0027x\u0027 in set([\u0027x\u0027, \u0027y\u0027, \u0027z\u0027]), but that\u0027s not a big deal :)","commit_id":"d3b1ac8ca64db2c61e956c4746e1f9ae4926d1cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ac525dfea439eb557fd42ee3f546f2704a77f018","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        aggregate_vals \u003d utils.aggregate_values_from_db("},{"line_number":60,"context_line":"            filter_properties[\u0027context\u0027], host_state.host, \u0027instance_type\u0027)"},{"line_number":61,"context_line":"        return (not aggregate_vals or"},{"line_number":62,"context_line":"                any(instance_type[\u0027name\u0027] in x.split(\u0027,\u0027)"},{"line_number":63,"context_line":"                    for x in aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_77e1db99","line":62,"in_reply_to":"3a961159_571f7fb7","updated":"2014-12-16 17:37:44.000000000","message":"I\u0027m a little unclear : please modify http://docs.openstack.org/developer/nova/devref/filter_scheduler.html#filtering ie. http://git.openstack.org/cgit/openstack/nova/tree/doc/source/devref/filter_scheduler.rst","commit_id":"d3b1ac8ca64db2c61e956c4746e1f9ae4926d1cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"be649d3c466a401c150c9fea73287cf59c8e159f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        aggregate_vals \u003d utils.aggregate_values_from_db("},{"line_number":60,"context_line":"            filter_properties[\u0027context\u0027], host_state.host, \u0027instance_type\u0027)"},{"line_number":61,"context_line":"        return (not aggregate_vals or"},{"line_number":62,"context_line":"                any(instance_type[\u0027name\u0027] in x.split(\u0027,\u0027)"},{"line_number":63,"context_line":"                    for x in aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_571f7fb7","line":62,"in_reply_to":"3a961159_73757631","updated":"2014-12-16 17:35:07.000000000","message":"You need to update devref to mention that specific syntax for the aggregate metadata then...","commit_id":"d3b1ac8ca64db2c61e956c4746e1f9ae4926d1cf"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1191d62ed9389ce04a0abc83340d6fdb70f56616","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        aggregate_vals \u003d utils.aggregate_values_from_db("},{"line_number":60,"context_line":"            filter_properties[\u0027context\u0027], host_state.host, \u0027instance_type\u0027)"},{"line_number":61,"context_line":"        return (not aggregate_vals or"},{"line_number":62,"context_line":"                any(instance_type[\u0027name\u0027] in x.split(\u0027,\u0027)"},{"line_number":63,"context_line":"                    for x in aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_10241dc5","line":62,"in_reply_to":"3a961159_77e1db99","updated":"2014-12-16 19:21:53.000000000","message":"thanks i didn\u0027t know where that documentation was located. i will add the required documentation changes and re upload soon.\nthe current documentation  is rather limited.\n\n\"|AggregateTypeAffinityFilter| - limits instance_type by aggregate.\"","commit_id":"d3b1ac8ca64db2c61e956c4746e1f9ae4926d1cf"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"189ac3211e22de39f6f5b29b9ed8ae65e20f5ba4","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        aggregate_vals \u003d utils.aggregate_values_from_db("},{"line_number":60,"context_line":"            filter_properties[\u0027context\u0027], host_state.host, \u0027instance_type\u0027)"},{"line_number":61,"context_line":"        return (not aggregate_vals or"},{"line_number":62,"context_line":"                any(instance_type[\u0027name\u0027] in x.split(\u0027,\u0027)"},{"line_number":63,"context_line":"                    for x in aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_73757631","line":62,"in_reply_to":"3a961159_9302fb6d","updated":"2014-12-16 14:49:20.000000000","message":"aggregate_vals will contain something like the following\nset([\u0027x,y,z\u0027,\u0027a,b,c\u0027]) which is why we need the split to convert into\nx in set([\u0027x\u0027,\u0027y\u0027,\u0027z\u0027,\u0027a\u0027,\u0027b\u0027,\u0027c\u0027]) \n\nx in set([\u0027x,y,z\u0027,\u0027a,b,c\u0027]) is return false because it does not check if x is in each of the sub entries.","commit_id":"d3b1ac8ca64db2c61e956c4746e1f9ae4926d1cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"147639b849a4d0a799b7f08c9f8f93b1a9d97015","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        aggregate_vals \u003d utils.aggregate_values_from_db("},{"line_number":60,"context_line":"            filter_properties[\u0027context\u0027], host_state.host, \u0027instance_type\u0027)"},{"line_number":61,"context_line":"        return (not aggregate_vals or"},{"line_number":62,"context_line":"                any(instance_type[\u0027name\u0027] in x.split(\u0027,\u0027)"},{"line_number":63,"context_line":"                    for x in aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_b5d157cf","line":62,"updated":"2014-12-17 16:30:01.000000000","message":"Actually, I think you need to split(\u0027, \u0027) (including spaces)\nbecause a string like \"a, b\" would return [\u0027a\u0027, \u0027 b\u0027] which could fail","commit_id":"6db0ab59b7edb1882ad4f4458e70b673e6de96ac"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fcf5bf4d745cc330d7308b26a31fed61911761cb","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        aggregate_vals \u003d utils.aggregate_values_from_db("},{"line_number":60,"context_line":"            filter_properties[\u0027context\u0027], host_state.host, \u0027instance_type\u0027)"},{"line_number":61,"context_line":"        return (not aggregate_vals or"},{"line_number":62,"context_line":"                any(instance_type[\u0027name\u0027] in x.split(\u0027,\u0027)"},{"line_number":63,"context_line":"                    for x in aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_1d7151e0","line":62,"in_reply_to":"3a961159_9f12b556","updated":"2014-12-18 14:09:42.000000000","message":"Oh, yes indeed.\n\nI\u0027m just wondering if having commas would be good or if we should prefer a better format like a JSON string to decode...\n\nThat sounds more bulletproof than this hacky thing IMHO.","commit_id":"6db0ab59b7edb1882ad4f4458e70b673e6de96ac"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b7217779564d4eb88ade8121dac29c0492d0e0b2","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        aggregate_vals \u003d utils.aggregate_values_from_db("},{"line_number":60,"context_line":"            filter_properties[\u0027context\u0027], host_state.host, \u0027instance_type\u0027)"},{"line_number":61,"context_line":"        return (not aggregate_vals or"},{"line_number":62,"context_line":"                any(instance_type[\u0027name\u0027] in x.split(\u0027,\u0027)"},{"line_number":63,"context_line":"                    for x in aggregate_vals))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_9f12b556","line":62,"in_reply_to":"3a961159_b5d157cf","updated":"2014-12-17 18:46:55.000000000","message":"split(\u0027, \u0027) will not work for the case where the speace is before the comma but\n\n(not aggregate_vals or instance_type[\u0027name\u0027]  in [ y.strip() for y in x.split(\u0027,\u0027) for x in aggregate_vals])\n\nshould work for both leading and trailing white space","commit_id":"6db0ab59b7edb1882ad4f4458e70b673e6de96ac"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"12c0512f6a9523b60f8edae812278cb1de45e862","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        for val in aggregate_vals:"},{"line_number":63,"context_line":"            if (instance_type[\u0027name\u0027] in"},{"line_number":64,"context_line":"                map(lambda x: x.strip(), val.split(\u0027,\u0027))):"},{"line_number":65,"context_line":"                return True"},{"line_number":66,"context_line":"        return not aggregate_vals"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_bc9bd116","line":64,"updated":"2014-12-18 20:31:53.000000000","message":"lemme rephrase my previous question. Do you think it wouldn\u0027t be good to provide to try to decode a JSON string instead of hacking a string ?","commit_id":"1e7eae5bfdde661b325acb541bf26f04d8833e49"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"fbbcc796d65509c55e618467156959fc196243fe","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        for val in aggregate_vals:"},{"line_number":63,"context_line":"            if (instance_type[\u0027name\u0027] in"},{"line_number":64,"context_line":"                map(lambda x: x.strip(), val.split(\u0027,\u0027))):"},{"line_number":65,"context_line":"                return True"},{"line_number":66,"context_line":"        return not aggregate_vals"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_d6bcf4bd","line":64,"in_reply_to":"3a961159_bc9bd116","updated":"2014-12-18 23:39:32.000000000","message":"the original intention was to support only the following syntax:\n           m1.nano,m1.small\na comma separated list without spaces.\n\ni had considered using json but no i don\u0027t believe a json string would be better as json would not be backwards compatible with existing deployments.\n\na json decode of val will likely be as efficient or slower then the code proposed.\nthe for over aggregate_vals would still be required with a json decode\nso i do not see any performances penalty to the current implementation.\n\ni think the db migration and format conversion required to support backwards compatibility for the json approach on upgrade form juno etc is not warranted.","commit_id":"1e7eae5bfdde661b325acb541bf26f04d8833e49"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a71c64a11633232b1f5a5d8c81e9ab00f26774b8","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        for val in aggregate_vals:"},{"line_number":63,"context_line":"            if (instance_type[\u0027name\u0027] in"},{"line_number":64,"context_line":"                map(lambda x: x.strip(), val.split(\u0027,\u0027))):"},{"line_number":65,"context_line":"                return True"},{"line_number":66,"context_line":"        return not aggregate_vals"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_4145af13","line":64,"in_reply_to":"3a961159_d6bcf4bd","updated":"2015-01-05 13:36:03.000000000","message":"Mmmm, I don\u0027t get the point where a backwards compatibility can\u0027t be done : you just have to say that strings that can\u0027t be JSON loaded will be checked the old way.\n\nTo be clear, I know that we have multiple hacks for accepting commas etc. but I think it would be better to only accept JSON strings as a REST attribute (or non-JSON strings for backwards compat of course) and leave the python client create an encoded list when there are multiple values provided.","commit_id":"1e7eae5bfdde661b325acb541bf26f04d8833e49"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"cfb7750e9358968e313f53d0d2824b2b674befe7","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                if instance_type[\u0027name\u0027] in aggregate_instance_types:"},{"line_number":67,"context_line":"                    return True"},{"line_number":68,"context_line":"            except ValueError:"},{"line_number":69,"context_line":"                if instance_type[\u0027name\u0027] \u003d\u003d val:"},{"line_number":70,"context_line":"                    return True"},{"line_number":71,"context_line":"        return not aggregate_vals"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_e3ba11bf","line":69,"updated":"2015-01-14 16:56:56.000000000","message":"nit: a quick comment mentioning that you failback to the standard behaviour because that\u0027s not an expected JSON list would be worth it","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b13702b72337c562758f421f708786c38fe3b774","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                if instance_type[\u0027name\u0027] in aggregate_instance_types:"},{"line_number":67,"context_line":"                    return True"},{"line_number":68,"context_line":"            except ValueError:"},{"line_number":69,"context_line":"                if instance_type[\u0027name\u0027] \u003d\u003d val:"},{"line_number":70,"context_line":"                    return True"},{"line_number":71,"context_line":"        return not aggregate_vals"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_99645cb4","line":69,"in_reply_to":"3a961159_e3ba11bf","updated":"2015-01-14 17:49:19.000000000","message":"i can will add a comment to that effect","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"58c66c0c2a234e189c20b1c99b8ca041562239f8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        for val in aggregate_vals:"},{"line_number":58,"context_line":"            if (instance_type[\u0027name\u0027] in"},{"line_number":59,"context_line":"                map(lambda x: x.strip(), val.split(\u0027,\u0027))):"},{"line_number":60,"context_line":"                    return True"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        return not aggregate_vals"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_1cc73b99","line":60,"updated":"2015-05-29 19:13:53.000000000","message":"Style femtonit:  I\u0027d prefer this be indented like so:\n\n    if (instance_type[\u0027name\u0027] in\n            [x.strip() for x in val.split(\u0027,\u0027)]):\n        return True\n\n(Also notice the use of a list comprehension instead of map())","commit_id":"2859b91574a8911265f400839c96e18daab8976a"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7d4967ba85f06db0d573616e0242891758bd4125","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        for val in aggregate_vals:"},{"line_number":58,"context_line":"            if (instance_type[\u0027name\u0027] in"},{"line_number":59,"context_line":"                map(lambda x: x.strip(), val.split(\u0027,\u0027))):"},{"line_number":60,"context_line":"                    return True"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        return not aggregate_vals"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a016987_a714679f","line":60,"in_reply_to":"7a016987_1cc73b99","updated":"2015-06-01 13:59:33.000000000","message":"instance_type[\u0027name\u0027] in\n            [x.strip() for x in val.split(\u0027,\u0027)]\n\nis logically one statement so i think the    [x.strip() for x in val.split(\u0027,\u0027)] is logically over indented but visually more pleasing.\n\nhaving said that the return in my version is visually indented correctly but\nlogically over indented also.\n\ni think map vs list comprehension is more of a personal preference\ni dont personally think list comprehension is clearer or more pytonic but in \nthis case it is not any less clear so ill refactor as you suggest and upload tomorrow.","commit_id":"2859b91574a8911265f400839c96e18daab8976a"}],"nova/tests/unit/scheduler/filters/test_type_filters.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"be649d3c466a401c150c9fea73287cf59c8e159f","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        filter3_properties \u003d {\u0027context\u0027: mock.sentinel.ctx,"},{"line_number":49,"context_line":"                              \u0027instance_type\u0027: {\u0027name\u0027: \u0027fake3\u0027}}"},{"line_number":50,"context_line":"        host \u003d fakes.FakeHostState(\u0027fake_host\u0027, \u0027fake_node\u0027, {})"},{"line_number":51,"context_line":"        agg_mock.return_value \u003d set([\u0027fake1,fake3\u0027])"},{"line_number":52,"context_line":"        # True since no aggregates"},{"line_number":53,"context_line":"        self.assertTrue(self.filt_cls.host_passes(host, filter_properties))"},{"line_number":54,"context_line":"        agg_mock.assert_called_once_with(mock.sentinel.ctx,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_17e6d716","line":51,"updated":"2014-12-16 17:35:07.000000000","message":"I would split the test into 2 distinct ones : \n - one for a single value, one for the set you add","commit_id":"d3b1ac8ca64db2c61e956c4746e1f9ae4926d1cf"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"cfb7750e9358968e313f53d0d2824b2b674befe7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"#    a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_03e39dd8","line":1,"updated":"2015-01-14 16:56:56.000000000","message":"nit: not necessary","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b13702b72337c562758f421f708786c38fe3b774","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"#    a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_06548bc4","line":1,"in_reply_to":"3a961159_03e39dd8","updated":"2015-01-14 17:49:19.000000000","message":"this is reverting an un needed change i introduced in patchset 2","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5f8cda0b42cb211337fe68bfa1025bc6e9b33b18","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":2,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":3,"context_line":"#    a copy of the License at"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_021d4c73","line":1,"in_reply_to":"3a961159_06548bc4","updated":"2015-01-14 23:15:12.000000000","message":"my bad","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"cfb7750e9358968e313f53d0d2824b2b674befe7","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class TestTypeFilter(test.NoDBTestCase):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    @mock.patch(\u0027nova.db.instance_get_all_by_host_and_not_type\u0027)"},{"line_number":23,"context_line":"    def test_type_filter(self, get_mock):"},{"line_number":24,"context_line":"        self.filt_cls \u003d type_filter.TypeAffinityFilter()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_63cd415d","line":21,"updated":"2015-01-14 16:56:56.000000000","message":"nit: not necessary","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5f8cda0b42cb211337fe68bfa1025bc6e9b33b18","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class TestTypeFilter(test.NoDBTestCase):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    @mock.patch(\u0027nova.db.instance_get_all_by_host_and_not_type\u0027)"},{"line_number":23,"context_line":"    def test_type_filter(self, get_mock):"},{"line_number":24,"context_line":"        self.filt_cls \u003d type_filter.TypeAffinityFilter()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_220ec83d","line":21,"in_reply_to":"3a961159_46f853c4","updated":"2015-01-14 23:15:12.000000000","message":"my bad","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b13702b72337c562758f421f708786c38fe3b774","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class TestTypeFilter(test.NoDBTestCase):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    @mock.patch(\u0027nova.db.instance_get_all_by_host_and_not_type\u0027)"},{"line_number":23,"context_line":"    def test_type_filter(self, get_mock):"},{"line_number":24,"context_line":"        self.filt_cls \u003d type_filter.TypeAffinityFilter()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_46f853c4","line":21,"in_reply_to":"3a961159_63cd415d","updated":"2015-01-14 17:49:19.000000000","message":"here i removed a blank line i introduced in patchset 2 by mistake","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"cfb7750e9358968e313f53d0d2824b2b674befe7","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # True as instance_type is allowed for aggregate"},{"line_number":65,"context_line":"        self.assertTrue(self.filt_cls.host_passes(host, filter_properties))"},{"line_number":66,"context_line":"        # False as instance_type is not allowed for aggregate"},{"line_number":67,"context_line":"        self.assertFalse(self.filt_cls.host_passes(host, filter2_properties))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # tests when multiple instance_type metadata are defined for aggregate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_43f7658c","line":66,"updated":"2015-01-14 16:56:56.000000000","message":"please don\u0027t change what you consider wrong in the same patch if that\u0027s not related to your change. Please create a 2nd patch rather","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b13702b72337c562758f421f708786c38fe3b774","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # True as instance_type is allowed for aggregate"},{"line_number":65,"context_line":"        self.assertTrue(self.filt_cls.host_passes(host, filter_properties))"},{"line_number":66,"context_line":"        # False as instance_type is not allowed for aggregate"},{"line_number":67,"context_line":"        self.assertFalse(self.filt_cls.host_passes(host, filter2_properties))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # tests when multiple instance_type metadata are defined for aggregate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_e6be9fd3","line":66,"in_reply_to":"3a961159_43f7658c","updated":"2015-01-14 17:49:19.000000000","message":"the addtion of the not is correcting a typo i had in patch set 2 and 3.\nthis is directly related to my change.","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5f8cda0b42cb211337fe68bfa1025bc6e9b33b18","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # True as instance_type is allowed for aggregate"},{"line_number":65,"context_line":"        self.assertTrue(self.filt_cls.host_passes(host, filter_properties))"},{"line_number":66,"context_line":"        # False as instance_type is not allowed for aggregate"},{"line_number":67,"context_line":"        self.assertFalse(self.filt_cls.host_passes(host, filter2_properties))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # tests when multiple instance_type metadata are defined for aggregate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_620b702b","line":66,"in_reply_to":"3a961159_e6be9fd3","updated":"2015-01-14 23:15:12.000000000","message":"my bad","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5f8cda0b42cb211337fe68bfa1025bc6e9b33b18","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.assertFalse(self.filt_cls.host_passes(host, filter2_properties))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # tests when multiple instance_type metadata are defined for aggregate"},{"line_number":70,"context_line":"        agg_mock.return_value \u003d set([\u0027[\"fake1\",\"fake2\"]\u0027])"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # True as instance_type is allowed for aggregate"},{"line_number":73,"context_line":"        self.assertTrue(self.filt_cls.host_passes(host, filter_properties))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_fd2aa17c","line":70,"updated":"2015-01-14 23:15:12.000000000","message":"please split the test into multiple methods for each value","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f073948a0f110790c64b0abb5f8997058b52a5d2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.assertFalse(self.filt_cls.host_passes(host, filter2_properties))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        # tests when multiple instance_type metadata are defined for aggregate"},{"line_number":70,"context_line":"        agg_mock.return_value \u003d set([\u0027[\"fake1\",\"fake2\"]\u0027])"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # True as instance_type is allowed for aggregate"},{"line_number":73,"context_line":"        self.assertTrue(self.filt_cls.host_passes(host, filter_properties))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_23cdea30","line":70,"in_reply_to":"3a961159_fd2aa17c","updated":"2015-01-15 00:48:18.000000000","message":"Ok i will split this large testcase into 4 separate methods.\n\n-no instance_type metadata defined\n\n-host is part of 1 host aggreages with a 1 instance_type defined (legacy synatx and json syntax)\n\n-host is part of 2 host aggreages  each with a 1 instance_type defined (legacy syntax and json syntax)\n\n-host is part of 1 host aggreage with a 2 instance_types defined (json syntax)","commit_id":"c82a95b4585ef1353b07a8f80f2e3c57012cd749"}]}
