)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"734a8b37a7bdf7a58c6c38a47ba3a92b6949c6cd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"aa99299a_25edf5ad","updated":"2022-03-14 09:05:12.000000000","message":"I cannot reproduce this error with both OpenStack SDK 0.61 and 0.36, this is what i did:\n\n    openstack aggregate create test1\n    python3 -c \"import openstack; conn \u003d openstack.connect(); aggregates \u003d list(conn.search_aggregates())[0]; print(aggregates.get(\u0027hosts\u0027, []))\"\n\nIt will return a empty list, not None.\n\nWhich OpenStack SDK do you use and which OpenStack API to you test against?","commit_id":"dbebe00dcb7cdf2d09300b41a142a3a34a97ffb6"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"9ead084a3463a437a1df2cddc7d70c9544d3535e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"bdac6ad1_c7190684","in_reply_to":"9cf34ba2_4926bc71","updated":"2022-03-18 07:59:34.000000000","message":"Got it, thanks! \n\nOpenStack\u0027s response when creating aggregates does not contain a \"hosts\" field [1] and OpenStack SDK thus uses the default value for hosts which is None [2].\n\n[1] https://docs.openstack.org/api-ref/compute/?expanded\u003dcreate-aggregate-detail#id247\n[2] https://github.com/openstack/openstacksdk/blob/stable/yoga/openstack/compute/v2/aggregate.py#L42","commit_id":"dbebe00dcb7cdf2d09300b41a142a3a34a97ffb6"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"218e27a43c65ad9034da5f5951ea17a1bff44450","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9cf34ba2_4926bc71","in_reply_to":"aa99299a_25edf5ad","updated":"2022-03-17 16:34:28.000000000","message":"Thanks for the review. Here is the reproducer for OpenStack SDK 0.61:\n\n    Python 3.6.8 (default, Oct 19 2021, 05:14:06) \n    [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)] on linux\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    \u003e\u003e\u003e import openstack\n    \u003e\u003e\u003e conn \u003d openstack.connect()\n    \u003e\u003e\u003e aggregate \u003d conn.create_aggregate(\n    ... name \u003d \u0027test1\u0027)\n    \u003e\u003e\u003e aggregate.get(\u0027hosts\u0027, [])\n    \u003e\u003e\u003e print(aggregate.get(\u0027hosts\u0027, []))\n    None\n\nYour example is subtly different as you are retrieving an aggregate that has already been created. Arguably this difference in behaviour is actually a bug in the openstacksdk, but versions with that issue are in the wild now.","commit_id":"dbebe00dcb7cdf2d09300b41a142a3a34a97ffb6"}]}
