)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"41e7b3112b45027a1f015c64aa6824f0f5f2e9ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9bb6078b_78a81602","updated":"2023-03-30 07:12:27.000000000","message":"Please see comments below on how to fix the callside. Class StateMachine is working as expected in both cases.","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"}],"plugins/module_utils/resource.py":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"dd18dbfe98ac63bf5ef2ad3f51404e5566d581cb","unresolved":true,"context_lines":[{"line_number":104,"context_line":"        resource_attributes \u003d dict("},{"line_number":105,"context_line":"            (k, attributes[k])"},{"line_number":106,"context_line":"            for k in comparison_attributes"},{"line_number":107,"context_line":"            if attributes.get(k) is not None and not self._is_equal("},{"line_number":108,"context_line":"                attributes.get(k), resource.get(k)))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if resource_attributes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"e1f9a6aa_ff1c6ba4","line":107,"updated":"2023-03-28 12:38:38.000000000","message":"The caller/user of StateMachine has to ensure that attributes has no nullified dictionary items. If attributes has keys whose values are None, then we expect the user (of StateMachine, not user in sense of user of a Ansible module) to do this intentionally. So the previous code works as expected, doesnt it?","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32787,"name":"Polina Gubina","email":"polinagubina6@gmail.com","username":"pollinagubina"},"change_message_id":"1e03876ea76f3edc4e1b77383ddd45e077b29f42","unresolved":true,"context_lines":[{"line_number":104,"context_line":"        resource_attributes \u003d dict("},{"line_number":105,"context_line":"            (k, attributes[k])"},{"line_number":106,"context_line":"            for k in comparison_attributes"},{"line_number":107,"context_line":"            if attributes.get(k) is not None and not self._is_equal("},{"line_number":108,"context_line":"                attributes.get(k), resource.get(k)))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if resource_attributes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"77d0bb8f_e744140e","line":107,"in_reply_to":"2b9eef58_899fb5ee","updated":"2023-03-28 14:36:47.000000000","message":"of course, i made pr\nhttps://review.opendev.org/c/openstack/ansible-collections-openstack/+/878780/1","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"41e7b3112b45027a1f015c64aa6824f0f5f2e9ce","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        resource_attributes \u003d dict("},{"line_number":105,"context_line":"            (k, attributes[k])"},{"line_number":106,"context_line":"            for k in comparison_attributes"},{"line_number":107,"context_line":"            if attributes.get(k) is not None and not self._is_equal("},{"line_number":108,"context_line":"                attributes.get(k), resource.get(k)))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if resource_attributes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"8359f5f7_62ad8b9b","line":107,"in_reply_to":"77d0bb8f_e744140e","updated":"2023-03-30 07:12:27.000000000","message":"You have to filter \u0027attributes\u0027 for None values before handing them over to StateMachine. Please have a look at the federation_idp module [1] and the identity_{domain,group,...} modules for how StateMachine is supposed to be used.\n\n[1] https://opendev.org/openstack/ansible-collections-openstack/src/commit/ad9594dcd71ae680855d69487bf4a7d9dac6482e/plugins/modules/federation_idp.py#L128","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"fcc7d899dde5cfe60859d34c9e1fdc363367afb2","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        resource_attributes \u003d dict("},{"line_number":105,"context_line":"            (k, attributes[k])"},{"line_number":106,"context_line":"            for k in comparison_attributes"},{"line_number":107,"context_line":"            if attributes.get(k) is not None and not self._is_equal("},{"line_number":108,"context_line":"                attributes.get(k), resource.get(k)))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if resource_attributes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"210d6e61_228c3b99","line":107,"in_reply_to":"8359f5f7_62ad8b9b","updated":"2023-03-30 07:13:45.000000000","message":"The StateMachine does not check for None values by design. If StateMachine would drop all keys which None values, then one would not be able to pass None values to SDK even if he would like to set a value to None.","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"44835d011e26adf3aa0167fdf2a50cf1e4ebfaac","unresolved":true,"context_lines":[{"line_number":104,"context_line":"        resource_attributes \u003d dict("},{"line_number":105,"context_line":"            (k, attributes[k])"},{"line_number":106,"context_line":"            for k in comparison_attributes"},{"line_number":107,"context_line":"            if attributes.get(k) is not None and not self._is_equal("},{"line_number":108,"context_line":"                attributes.get(k), resource.get(k)))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if resource_attributes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"2b9eef58_899fb5ee","line":107,"in_reply_to":"a67ea83c_80e2007a","updated":"2023-03-28 14:23:49.000000000","message":"Could you please give me an example of how you use the StateMachine? e.g. link to module or PR","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32787,"name":"Polina Gubina","email":"polinagubina6@gmail.com","username":"pollinagubina"},"change_message_id":"8a0a53b4deef56665dd7fffa298b1c973ada1dc2","unresolved":true,"context_lines":[{"line_number":104,"context_line":"        resource_attributes \u003d dict("},{"line_number":105,"context_line":"            (k, attributes[k])"},{"line_number":106,"context_line":"            for k in comparison_attributes"},{"line_number":107,"context_line":"            if attributes.get(k) is not None and not self._is_equal("},{"line_number":108,"context_line":"                attributes.get(k), resource.get(k)))"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        if resource_attributes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"a67ea83c_80e2007a","line":107,"in_reply_to":"e1f9a6aa_ff1c6ba4","updated":"2023-03-28 14:10:45.000000000","message":"it doesn\u0027t work for me as comparison_attributes contains attributes updateable - nonupdateable (all updateable attributes), but some of them might not have been passed by user, then attrbutes[k] is failing. maybe i don\u0027t understand idea how it must work, then please explain if i am wrong","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"dd18dbfe98ac63bf5ef2ad3f51404e5566d581cb","unresolved":true,"context_lines":[{"line_number":233,"context_line":"        resource_attributes \u003d update.get(\u0027resource_attributes\u0027)"},{"line_number":234,"context_line":"        if resource_attributes:"},{"line_number":235,"context_line":"            for k, v in resource_attributes.items():"},{"line_number":236,"context_line":"                setattr(resource, k, v)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        return resource"}],"source_content_type":"text/x-python","patch_set":2,"id":"0b292fcf_98aa1fec","line":236,"updated":"2023-03-28 12:38:38.000000000","message":"Why?","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32787,"name":"Polina Gubina","email":"polinagubina6@gmail.com","username":"pollinagubina"},"change_message_id":"8a0a53b4deef56665dd7fffa298b1c973ada1dc2","unresolved":true,"context_lines":[{"line_number":233,"context_line":"        resource_attributes \u003d update.get(\u0027resource_attributes\u0027)"},{"line_number":234,"context_line":"        if resource_attributes:"},{"line_number":235,"context_line":"            for k, v in resource_attributes.items():"},{"line_number":236,"context_line":"                setattr(resource, k, v)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        return resource"}],"source_content_type":"text/x-python","patch_set":2,"id":"782b80c7_2f09841b","line":236,"in_reply_to":"0b292fcf_98aa1fec","updated":"2023-03-28 14:10:45.000000000","message":"it doesn\u0027t work for me for attributes which are not properties of class target resource, but this attributes should be in result by doc, and when user want to set/update them, it is failing with the following mistake :  \"raise KeyError(\\nKeyError: \u0027encapsulation_mode is not found. openstack.network.v2.vpn_ipsec_policy.VpnIpsecPolicy objects do not support setting arbitrary keys through the dict interface.\" It is not the best solution, but i think we need to solve this problem somehow","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"41e7b3112b45027a1f015c64aa6824f0f5f2e9ce","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        resource_attributes \u003d update.get(\u0027resource_attributes\u0027)"},{"line_number":234,"context_line":"        if resource_attributes:"},{"line_number":235,"context_line":"            for k, v in resource_attributes.items():"},{"line_number":236,"context_line":"                setattr(resource, k, v)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        return resource"}],"source_content_type":"text/x-python","patch_set":2,"id":"27a0893b_3984a183","line":236,"in_reply_to":"76a30d1d_73c70277","updated":"2023-03-30 07:12:27.000000000","message":"VpnIpsecPolicy has no encapsulation_mode attribute [1] and thus you cannot set this key. Using setattr() will not fix your code, as sdk will not send attributes it does not know.","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"44835d011e26adf3aa0167fdf2a50cf1e4ebfaac","unresolved":true,"context_lines":[{"line_number":233,"context_line":"        resource_attributes \u003d update.get(\u0027resource_attributes\u0027)"},{"line_number":234,"context_line":"        if resource_attributes:"},{"line_number":235,"context_line":"            for k, v in resource_attributes.items():"},{"line_number":236,"context_line":"                setattr(resource, k, v)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        return resource"}],"source_content_type":"text/x-python","patch_set":2,"id":"f6e7a681_49594de4","line":236,"in_reply_to":"782b80c7_2f09841b","updated":"2023-03-28 14:23:49.000000000","message":"Ditto (example, please).","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32787,"name":"Polina Gubina","email":"polinagubina6@gmail.com","username":"pollinagubina"},"change_message_id":"a3c64b6a51247aba9fae8b885b575543f6582a3d","unresolved":true,"context_lines":[{"line_number":233,"context_line":"        resource_attributes \u003d update.get(\u0027resource_attributes\u0027)"},{"line_number":234,"context_line":"        if resource_attributes:"},{"line_number":235,"context_line":"            for k, v in resource_attributes.items():"},{"line_number":236,"context_line":"                setattr(resource, k, v)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        return resource"}],"source_content_type":"text/x-python","patch_set":2,"id":"76a30d1d_73c70277","line":236,"in_reply_to":"f3765797_97119453","updated":"2023-03-28 14:38:38.000000000","message":"it is impossible here to upload screenshot unfortunately","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"},{"author":{"_account_id":32787,"name":"Polina Gubina","email":"polinagubina6@gmail.com","username":"pollinagubina"},"change_message_id":"1e03876ea76f3edc4e1b77383ddd45e077b29f42","unresolved":true,"context_lines":[{"line_number":233,"context_line":"        resource_attributes \u003d update.get(\u0027resource_attributes\u0027)"},{"line_number":234,"context_line":"        if resource_attributes:"},{"line_number":235,"context_line":"            for k, v in resource_attributes.items():"},{"line_number":236,"context_line":"                setattr(resource, k, v)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"        return resource"}],"source_content_type":"text/x-python","patch_set":2,"id":"f3765797_97119453","line":236,"in_reply_to":"f6e7a681_49594de4","updated":"2023-03-28 14:36:47.000000000","message":"in my pr(see prev comment) when i am trying to update \u0027encapsulation_mode\u0027 with check_mode: True, i get \n\"ansible_collections/openstack/cloud/plugins/module_utils/resource.py\\\", line 235, in _simulate_update\n\nFile \\\"/Users/polinagubina/ans_collections/ansiblevenv/lib/python3.9/site-packages/openstack/resource.py\\\", line 701, in __setitem__\\n\n\nraise KeyError(\\nKeyError: \u0027encapsulation_mode is not found. openstack.network.v2.vpn_ipsec_policy.VpnIpsecPolicy objects do not support setting arbitrary keys through the dict interface\"","commit_id":"ff85dd42ce49c8e0dca582c1533e0c877a9e79ef"}]}
