)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d607540c3fcf5cda9bc97034124ddb961e404df9","unresolved":false,"context_lines":[{"line_number":10,"context_line":"availability zone (which is stored as part of the metadata field). Some"},{"line_number":11,"context_line":"tests are stubbing out the AggregateAPI to return a fake aggregate"},{"line_number":12,"context_line":"object with a null availability zone, which is an invalid state. The"},{"line_number":13,"context_line":"Aggregate object will also always reject setting the availability zone"},{"line_number":14,"context_line":"in the metadata to None by raising a ValueError."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Because of this, these tests are invalid and are removed."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa69d971_2c811bfc","line":13,"updated":"2016-01-07 22:47:02.000000000","message":"This seems to imply that you can get a null AZ out of the aggregate object though since it defaults to returning None:\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/aggregate.py#L151\n\nOr is it just that we have that there in case the metadata doesn\u0027t have the AZ key, since if it did it\u0027d have to have a value because DictOfStringsField doesn\u0027t allow null values for it\u0027s keys?","commit_id":"4c78c2346e254ac0d3cf8e12647c9c1b80fd9c9d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"982051884bc505bd08a270533450b54b5874b671","unresolved":false,"context_lines":[{"line_number":10,"context_line":"availability zone (which is stored as part of the metadata field). Some"},{"line_number":11,"context_line":"tests are stubbing out the AggregateAPI to return a fake aggregate"},{"line_number":12,"context_line":"object with a null availability zone, which is an invalid state. The"},{"line_number":13,"context_line":"Aggregate object will also always reject setting the availability zone"},{"line_number":14,"context_line":"in the metadata to None by raising a ValueError."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Because of this, these tests are invalid and are removed."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa69d971_8c1607a6","line":13,"in_reply_to":"fa69d971_2c811bfc","updated":"2016-01-07 22:51:19.000000000","message":"The az can be set in the metadata or not. It cannot be set to None. The property returns none to mirror the behavior we had before, which is that we\u0027d do a dict.get(\u0027az\u0027) and if that returned None, we default to \"nova\".","commit_id":"4c78c2346e254ac0d3cf8e12647c9c1b80fd9c9d"}],"nova/tests/unit/api/openstack/compute/test_aggregates.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"05c1447b893f5d5c8fa5a9cf54339cffc83f7d30","unresolved":false,"context_lines":[{"line_number":220,"context_line":"    def test_create_with_null_availability_zone(self):"},{"line_number":221,"context_line":"        aggregate \u003d {\"name\": \"aggregate1\","},{"line_number":222,"context_line":"                     \"id\": \"1\","},{"line_number":223,"context_line":"                     \"availability_zone\": None,"},{"line_number":224,"context_line":"                     \"metadata\": {},"},{"line_number":225,"context_line":"                     \"hosts\": []}"},{"line_number":226,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_6f7385b5","side":"PARENT","line":223,"updated":"2016-01-07 23:03:37.000000000","message":"So this is not a possible thing to fake out in terms of actually setting it. However, If you replace this dict thing with an object that just doesn\u0027t have az set in the metadata, then the @property will return None as you expect.\n\nHowever, this doesn\u0027t actually test that the None is handled. That is does in compute_api, which is mocked out here. So, yeah, we pass back an aggregate that has az\u003dNone from the mock, but all this really does is test that _marshal_aggregate() works. BUT, it doesn\u0027t do any special handling in there for az.\n\nSo I still assert that this test is useless and should be removed.","commit_id":"bff71e602ba437e482c696f208d01d6814a8af7b"}]}
