)]}'
{"nova/scheduler/filters/aggregate_instance_extra_specs.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"73ef3c20d447f3dd3d431401dc4a5dc2208180a0","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            if aggregate_val is None:"},{"line_number":45,"context_line":"                return False"},{"line_number":46,"context_line":"            aggregate_val \u003d \u0027\u0027.join(str(w) + \u0027 \u0027 for w in aggregate_val)"},{"line_number":47,"context_line":"            if not extra_specs_ops.match(aggregate_val.rstrip(), req):"},{"line_number":48,"context_line":"                LOG.debug(_(\"%(host_state)s fails instance_type extra_specs \""},{"line_number":49,"context_line":"                    \"requirements\"), locals())"},{"line_number":50,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FnaE%3D","line":47,"updated":"2012-08-27 11:39:52.000000000","message":"Multiple values can be assigned to a given metadata key on a host aggregate\n\nThe existing behaviour is that, in order for the host to pass the filter, each extra specs value must match at least one of the aggregate values associated with the corresponding key\n\nWe shouldn\u0027t be changing that behaviour except to add support for operators i.e.\n\n  for key, req in instance_type[\u0027extra_specs\u0027].iteritems():\n      aggregate_vals \u003d metadata.get(key, None)\n      if not aggregate_vals:\n          return False\n\n      for aggregate_val in aggregate_vals:\n          if match(aggregate_val, req):\n              break\n      else:\n          return False","commit_id":"cf26ace6e3f4f1494e91c066271fc008a0a8c0bc"},{"author":{"_account_id":1176,"name":"Jinwoo \"Joseph\" Suh","username":"jsuh"},"change_message_id":"08740216aba5b9f09f477b17399501cde42a5632","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            if aggregate_val is None:"},{"line_number":45,"context_line":"                return False"},{"line_number":46,"context_line":"            aggregate_val \u003d \u0027\u0027.join(str(w) + \u0027 \u0027 for w in aggregate_val)"},{"line_number":47,"context_line":"            if not extra_specs_ops.match(aggregate_val.rstrip(), req):"},{"line_number":48,"context_line":"                LOG.debug(_(\"%(host_state)s fails instance_type extra_specs \""},{"line_number":49,"context_line":"                    \"requirements\"), locals())"},{"line_number":50,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FnN8%3D","line":47,"in_reply_to":"AAAALH%2F%2FnaE%3D","updated":"2012-08-27 16:03:20.000000000","message":"Done","commit_id":"cf26ace6e3f4f1494e91c066271fc008a0a8c0bc"}],"nova/scheduler/filters/extra_specs_ops.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"73ef3c20d447f3dd3d431401dc4a5dc2208180a0","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    if op \u003d\u003d \u0027\u003chas\u003e\u0027:"},{"line_number":63,"context_line":"        if words[0] in value.split():"},{"line_number":64,"context_line":"            return True"},{"line_number":65,"context_line":"        return False"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    if words and method(value, words[0]):"},{"line_number":68,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FnaA%3D","line":65,"updated":"2012-08-27 11:39:52.000000000","message":"This should be a separate patch. I don\u0027t think it has anything to do with the aggregate extra specs support","commit_id":"cf26ace6e3f4f1494e91c066271fc008a0a8c0bc"},{"author":{"_account_id":1176,"name":"Jinwoo \"Joseph\" Suh","username":"jsuh"},"change_message_id":"08740216aba5b9f09f477b17399501cde42a5632","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    if op \u003d\u003d \u0027\u003chas\u003e\u0027:"},{"line_number":63,"context_line":"        if words[0] in value.split():"},{"line_number":64,"context_line":"            return True"},{"line_number":65,"context_line":"        return False"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    if words and method(value, words[0]):"},{"line_number":68,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FnN4%3D","line":65,"in_reply_to":"AAAALH%2F%2FnaA%3D","updated":"2012-08-27 16:03:20.000000000","message":"Done","commit_id":"cf26ace6e3f4f1494e91c066271fc008a0a8c0bc"}],"nova/tests/scheduler/test_host_filters.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"73ef3c20d447f3dd3d431401dc4a5dc2208180a0","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        self._do_test_aggregate_filter_extra_specs("},{"line_number":792,"context_line":"            emeta\u003d{\u0027opt1\u0027: 1, \u0027opt2\u0027: 2},"},{"line_number":793,"context_line":"            especs\u003d{\u0027opt1\u0027: \u00271\u0027},"},{"line_number":794,"context_line":"            passes\u003dTrue)"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def test_aggregate_filter_passes_extra_specs_simple2(self):"},{"line_number":797,"context_line":"        self._do_test_aggregate_filter_extra_specs("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FnZ0%3D","line":794,"updated":"2012-08-27 11:39:52.000000000","message":"All these tests are an exact copy of the ComputeCapabilitiesFilter tests\n\nThis means if we add a new operation, we need to add the same test in two places\n\nThis is poor practice. We should have a comprehensive set of tests for extra_specs_ops.py and the ComputeCapabilitiesFilter/AggregateInstanceExtraSpecsFilter tests should merely test the the filter does the right thing if matches() returns True or False\n\ni.e. in nova/tests/scheduler/test_extra_specs_ops.py, I\u0027d do:\n\n class ExtraSpecsOpsTestCase(test.TestCase):\n\n    def _do_extra_specs_ops_test(self, value, req, matches):\n        assertion \u003d self.assertTrue if matches else self.assertFalse\n        assertion(extra_specs_ops.match(value, req))\n\n    def test_extra_specs_matches_simple(self):\n        self._do_extra_specs_ops_test(\n            value\u003d\u00271\u0027,\n            req\u003d\u00271\u0027,\n            matches\u003dTrue)\n\n    def test_extra_specs_fails_simple(self):\n        self._do_extra_specs_ops_test(\n            value\u003d\u00271\u0027,\n            req\u003d\u00271111\u0027,\n            matches\u003dFalse)\n\n    ....","commit_id":"cf26ace6e3f4f1494e91c066271fc008a0a8c0bc"},{"author":{"_account_id":1176,"name":"Jinwoo \"Joseph\" Suh","username":"jsuh"},"change_message_id":"08740216aba5b9f09f477b17399501cde42a5632","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        self._do_test_aggregate_filter_extra_specs("},{"line_number":792,"context_line":"            emeta\u003d{\u0027opt1\u0027: 1, \u0027opt2\u0027: 2},"},{"line_number":793,"context_line":"            especs\u003d{\u0027opt1\u0027: \u00271\u0027},"},{"line_number":794,"context_line":"            passes\u003dTrue)"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def test_aggregate_filter_passes_extra_specs_simple2(self):"},{"line_number":797,"context_line":"        self._do_test_aggregate_filter_extra_specs("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FnN0%3D","line":794,"in_reply_to":"AAAALH%2F%2FnZ0%3D","updated":"2012-08-27 16:03:20.000000000","message":"Done","commit_id":"cf26ace6e3f4f1494e91c066271fc008a0a8c0bc"}]}
