)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"0ff6e9923c3361cc32549be3e118a9754736e90f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"43369d9a_9937ebed","updated":"2023-03-30 07:18:01.000000000","message":"Please have a look at the federation_idp module [1] and the identity_{domain,group,...} modules to see how StateMachine is supposed to be used. \n\nYou will most likely be able to use StateMachine directly without having to subclass it in _StateMachine. This will make your code much shorter and easier to understand. \n\nPlease also remove all references to OTC specific code, such as otcextensions. These cannot be used in this collection.\n\n[1] https://opendev.org/openstack/ansible-collections-openstack/src/commit/ad9594dcd71ae680855d69487bf4a7d9dac6482e/plugins/modules/federation_idp.py#L128 ","commit_id":"6d106461c625e66422a225a042314028520185d9"},{"author":{"_account_id":32787,"name":"Polina Gubina","email":"polinagubina6@gmail.com","username":"pollinagubina"},"change_message_id":"0188da28fc6a2ddaeb9388f0c6ae97da4bb22aff","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4dd6b33c_95b81769","in_reply_to":"11545733_63202a4a","updated":"2023-04-04 16:26:42.000000000","message":"because if we pass updateable_attributes\u003dNone, then each time (even when parameters are updated) we will get changed\u003dTrue, because _build_update will return attributes.keys() (not empty list)","commit_id":"6d106461c625e66422a225a042314028520185d9"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"8e7fca0c18bfa11bcd9d9c4d7792e674bf5fa1b2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"38317583_1fe2294e","in_reply_to":"33404907_d9157e96","updated":"2023-03-31 12:59:26.000000000","message":"You could try something like this in your module(s):\n\n\n    ```\n    def run(self):\n        crud_functions \u003d StateMachine.default_crud_functions(\n            connection\u003dself.conn,\n            service_name\u003d\u0027network\u0027,\n            type_name\u003d\u0027vpn_ike_policy\u0027)\n        crud_functions[\u0027list\u0027] \u003d \\\n            getattr(self.conn.network, \u0027vpn_ike_policies\u0027)\n\n        sm \u003d StateMachine(connection\u003dself.conn,\n                          service_name\u003d\u0027network\u0027,\n                          type_name\u003d\u0027vpn_ike_policy\u0027,\n                          sdk\u003dself.sdk,\n                          crud_functions\u003dcrud_functions)\n\n        kwargs \u003d dict((k, self.params[k])\n                      for k in [\u0027state\u0027, \u0027timeout\u0027]\n                      if self.params[k] is not None)\n\n        kwargs[\u0027attributes\u0027] \u003d \\\n            dict((k, self.params[k])\n                 for k in [\u0027YOUR\u0027, \u0027ATTRIBUTES\u0027, \u0027HERE\u0027]\n                 if self.params[k] is not None)\n\n        vpn_ike_policy, is_changed \u003d \\\n            sm(check_mode\u003dself.ansible.check_mode,\n               updateable_attributes\u003dNone,\n               wait\u003dFalse,\n               **kwargs)\n\n        if vpn_ike_policy is None:\n            self.exit_json(changed\u003dis_changed)\n        else:\n            self.exit_json(\n                changed\u003dis_changed,\n                vpn_ike_policy\u003dvpn_ike_policy.to_dict(computed\u003dFalse))\n      ```\n\nThis is an example only, you have to adapt it to your attributes.","commit_id":"6d106461c625e66422a225a042314028520185d9"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"c70d335445935926fa7afeb072a4ec4653c6c1a7","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"cd772b92_117ddf9f","in_reply_to":"38317583_1fe2294e","updated":"2023-03-31 13:00:44.000000000","message":"Ah, maybe even shorter:\n\n    ```\n    crud_functions[\u0027list\u0027] \u003d self.conn.network.vpn_ike_policies\n    ```","commit_id":"6d106461c625e66422a225a042314028520185d9"},{"author":{"_account_id":32787,"name":"Polina Gubina","email":"polinagubina6@gmail.com","username":"pollinagubina"},"change_message_id":"8ce2fd943c0e1ea0b034dda7b3b7e8cf3fd5ff9a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"33404907_d9157e96","in_reply_to":"43369d9a_9937ebed","updated":"2023-03-30 08:23:53.000000000","message":"i made subclass just because the list function is set incorrectly in default_crud_functions(), it was going to be vpc_ike_polisYS() instead of vpc_ike_polisIES(). My fixes are not related to this. Ciuld you please clarify how i need to use \u0027updateable_parameters\u0027 because it is not clear in identity_group","commit_id":"6d106461c625e66422a225a042314028520185d9"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff723900d0a65efed088c6530ba84d5ec3b4bc59","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"f76bf73a_8a265942","in_reply_to":"4dd6b33c_95b81769","updated":"2023-04-06 06:38:02.000000000","message":"You have to check openstack\u0027s api ref [1] and find out ike/ipsec policy attributes can be updated. Then you add the corresponding sdk attribute names to updateable_attributes or non_updateable_attributes depending on whether you want to define a allowlist or a blocklist for attributes.\n\n[1] https://docs.openstack.org/api-ref/","commit_id":"6d106461c625e66422a225a042314028520185d9"},{"author":{"_account_id":32787,"name":"Polina Gubina","email":"polinagubina6@gmail.com","username":"pollinagubina"},"change_message_id":"41b8372ec0cd08e3f8018a41024a92e4b44ab323","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"11545733_63202a4a","in_reply_to":"7fef44d5_d34fbbc9","updated":"2023-04-04 10:33:08.000000000","message":"what is the idea of \u0027updateable_attributes\u0027? it seems i use it wrongly","commit_id":"6d106461c625e66422a225a042314028520185d9"},{"author":{"_account_id":32787,"name":"Polina Gubina","email":"polinagubina6@gmail.com","username":"pollinagubina"},"change_message_id":"e7b7247df5d82f9ab4aae2cdbc21fe8ce4384321","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"7fef44d5_d34fbbc9","in_reply_to":"cd772b92_117ddf9f","updated":"2023-04-04 09:01:40.000000000","message":"Thank you Jakob! could you clarify, updateable_attributes\u003dNone is just example or it need to be None?","commit_id":"6d106461c625e66422a225a042314028520185d9"}]}
