)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"7a117d817a2115776c058c4d0a27992a8f97a5db","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"db13a5e4_a641a892","updated":"2022-11-08 09:43:25.000000000","message":"Thank you, Rafael! 😄 Looks like you again chose one of those modules with strange/unexpected behaviour 😕\n\nFrom user pov it is not working as the other modules, because it only adds or deletes metadata what one passes to the module. Other modules try hard to set resources to the state that the user requested, so in this case one would expect that after calling the module the server metadata would match *exactly* the content one passed to the module.\n\nWe should definitely document this non-obvious behaviour in the docs.\n\n","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"0d6d913d29db8ed1472ab7999d6cc97deba6d29e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"b8dcd85c_268ec616","updated":"2022-11-10 10:16:54.000000000","message":"Awesome, thanks! \n\nPlease rebase on top of master and merge at your discretion 😊","commit_id":"94703298f7aa915451db0b2c0bd369c17f29312e"}],"ci/roles/server_metadata/tasks/main.yml":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"7a117d817a2115776c058c4d0a27992a8f97a5db","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"- name: Create test server"},{"line_number":3,"context_line":"  openstack.cloud.server:"},{"line_number":4,"context_line":"    cloud: \"{{ cloud }}\""},{"line_number":5,"context_line":"    state: present"},{"line_number":6,"context_line":"    name: ansible_server"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"12ca96ce_ea74e94a","line":3,"updated":"2022-11-08 09:43:25.000000000","message":"Dont we need a image? Maybe \u0027image: \"{{ image_name }}\"\u0027?","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c76dfac3ed87d70811985803ca049b95fae026eb","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"- name: Create test server"},{"line_number":3,"context_line":"  openstack.cloud.server:"},{"line_number":4,"context_line":"    cloud: \"{{ cloud }}\""},{"line_number":5,"context_line":"    state: present"},{"line_number":6,"context_line":"    name: ansible_server"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"559aa6c9_f467c08e","line":3,"in_reply_to":"12ca96ce_ea74e94a","updated":"2022-11-09 04:01:02.000000000","message":"Done","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"7a117d817a2115776c058c4d0a27992a8f97a5db","unresolved":true,"context_lines":[{"line_number":29,"context_line":"    cloud: \"{{ cloud }}\""},{"line_number":30,"context_line":"    name: \"{{ server.server.name }}\""},{"line_number":31,"context_line":"    meta:"},{"line_number":32,"context_line":"      test_key: test_value_2"},{"line_number":33,"context_line":"  register: server_metadata"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"- name: Assert updated metadata"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"e1b20415_a3223dfd","line":32,"updated":"2022-11-08 09:43:25.000000000","message":"Please add/delete more metadata to show the module\u0027s behaviour of not replacing stuff which is not mentioned in meta attribute.","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"5f7679e7cfe471b4165ccb28add8c9b2dd648c8c","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    cloud: \"{{ cloud }}\""},{"line_number":30,"context_line":"    name: \"{{ server.server.name }}\""},{"line_number":31,"context_line":"    meta:"},{"line_number":32,"context_line":"      test_key: test_value_2"},{"line_number":33,"context_line":"  register: server_metadata"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"- name: Assert updated metadata"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"0a768865_2caf0120","line":32,"in_reply_to":"d5f5d007_183dcad6","updated":"2022-11-09 17:57:12.000000000","message":"I misread these completely. Should be right now.","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c76dfac3ed87d70811985803ca049b95fae026eb","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    cloud: \"{{ cloud }}\""},{"line_number":30,"context_line":"    name: \"{{ server.server.name }}\""},{"line_number":31,"context_line":"    meta:"},{"line_number":32,"context_line":"      test_key: test_value_2"},{"line_number":33,"context_line":"  register: server_metadata"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"- name: Assert updated metadata"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"e3a5c205_1999bbb9","line":32,"in_reply_to":"e1b20415_a3223dfd","updated":"2022-11-09 04:01:02.000000000","message":"Done","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"5d6fee5953126a06f9a12fdf402f1ca0de6fb225","unresolved":true,"context_lines":[{"line_number":29,"context_line":"    cloud: \"{{ cloud }}\""},{"line_number":30,"context_line":"    name: \"{{ server.server.name }}\""},{"line_number":31,"context_line":"    meta:"},{"line_number":32,"context_line":"      test_key: test_value_2"},{"line_number":33,"context_line":"  register: server_metadata"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"- name: Assert updated metadata"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"d5f5d007_183dcad6","line":32,"in_reply_to":"e3a5c205_1999bbb9","updated":"2022-11-09 13:05:16.000000000","message":"Where?","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"7a117d817a2115776c058c4d0a27992a8f97a5db","unresolved":true,"context_lines":[{"line_number":57,"context_line":"    cloud: \"{{ cloud }}\""},{"line_number":58,"context_line":"    name: \"{{ server.server.id }}\""},{"line_number":59,"context_line":"    state: absent"},{"line_number":60,"context_line":"    meta:"},{"line_number":61,"context_line":"      test_key:"},{"line_number":62,"context_line":"  register: server_metadata"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"206f64f5_db228626","line":60,"updated":"2022-11-08 09:43:25.000000000","message":"Please add/delete more metadata to show the module\u0027s behaviour of not replacing stuff which is not mentioned in meta attribute.","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"5f7679e7cfe471b4165ccb28add8c9b2dd648c8c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    cloud: \"{{ cloud }}\""},{"line_number":58,"context_line":"    name: \"{{ server.server.id }}\""},{"line_number":59,"context_line":"    state: absent"},{"line_number":60,"context_line":"    meta:"},{"line_number":61,"context_line":"      test_key:"},{"line_number":62,"context_line":"  register: server_metadata"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"c578d63e_bf2ee13d","line":60,"in_reply_to":"04183be0_0af308e2","updated":"2022-11-09 17:57:12.000000000","message":"Done","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c76dfac3ed87d70811985803ca049b95fae026eb","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    cloud: \"{{ cloud }}\""},{"line_number":58,"context_line":"    name: \"{{ server.server.id }}\""},{"line_number":59,"context_line":"    state: absent"},{"line_number":60,"context_line":"    meta:"},{"line_number":61,"context_line":"      test_key:"},{"line_number":62,"context_line":"  register: server_metadata"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"41edffd3_1a71b389","line":60,"in_reply_to":"206f64f5_db228626","updated":"2022-11-09 04:01:02.000000000","message":"Done","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"5d6fee5953126a06f9a12fdf402f1ca0de6fb225","unresolved":true,"context_lines":[{"line_number":57,"context_line":"    cloud: \"{{ cloud }}\""},{"line_number":58,"context_line":"    name: \"{{ server.server.id }}\""},{"line_number":59,"context_line":"    state: absent"},{"line_number":60,"context_line":"    meta:"},{"line_number":61,"context_line":"      test_key:"},{"line_number":62,"context_line":"  register: server_metadata"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"04183be0_0af308e2","line":60,"in_reply_to":"41edffd3_1a71b389","updated":"2022-11-09 13:05:16.000000000","message":"Where?","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"}],"galaxy.yml":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"5d6fee5953126a06f9a12fdf402f1ca0de6fb225","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"namespace: openstack"},{"line_number":3,"context_line":"name: cloud"},{"line_number":4,"context_line":"readme: README.md"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"2eaaa565_2961b232","line":1,"updated":"2022-11-09 13:05:16.000000000","message":"Please undo the changes to this file.","commit_id":"f81629093f8989f6d81e02b9f36cc2f0f0979e95"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"5f7679e7cfe471b4165ccb28add8c9b2dd648c8c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"namespace: openstack"},{"line_number":3,"context_line":"name: cloud"},{"line_number":4,"context_line":"readme: README.md"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"7e42b123_07b8636a","line":1,"in_reply_to":"2eaaa565_2961b232","updated":"2022-11-09 17:57:12.000000000","message":"Done","commit_id":"f81629093f8989f6d81e02b9f36cc2f0f0979e95"}],"plugins/modules/server_metadata.py":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"7a117d817a2115776c058c4d0a27992a8f97a5db","unresolved":true,"context_lines":[{"line_number":18,"context_line":"     required: true"},{"line_number":19,"context_line":"     aliases: [\u0027server\u0027]"},{"line_number":20,"context_line":"     type: str"},{"line_number":21,"context_line":"   meta:"},{"line_number":22,"context_line":"     description:"},{"line_number":23,"context_line":"        - \u0027A list of key value pairs that should be provided as a metadata to"},{"line_number":24,"context_line":"          the instance or a string containing a list of key-value pairs."}],"source_content_type":"text/x-python","patch_set":7,"id":"037cc746_71506d01","line":21,"updated":"2022-11-08 09:43:25.000000000","message":"Perhaps rename to metadata to be in sync with server attribute name?","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c76dfac3ed87d70811985803ca049b95fae026eb","unresolved":false,"context_lines":[{"line_number":18,"context_line":"     required: true"},{"line_number":19,"context_line":"     aliases: [\u0027server\u0027]"},{"line_number":20,"context_line":"     type: str"},{"line_number":21,"context_line":"   meta:"},{"line_number":22,"context_line":"     description:"},{"line_number":23,"context_line":"        - \u0027A list of key value pairs that should be provided as a metadata to"},{"line_number":24,"context_line":"          the instance or a string containing a list of key-value pairs."}],"source_content_type":"text/x-python","patch_set":7,"id":"79a6098a_a0e8f714","line":21,"in_reply_to":"037cc746_71506d01","updated":"2022-11-09 04:01:02.000000000","message":"Done","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"7a117d817a2115776c058c4d0a27992a8f97a5db","unresolved":true,"context_lines":[{"line_number":39,"context_line":"- openstack.cloud.openstack"},{"line_number":40,"context_line":"\u0027\u0027\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"EXAMPLES \u003d \u0027\u0027\u0027"},{"line_number":43,"context_line":"# Creates or updates hostname\u003dtest1 as metadata of the server instance vm1"},{"line_number":44,"context_line":"- name: add metadata to compute instance"},{"line_number":45,"context_line":"  hosts: localhost"}],"source_content_type":"text/x-python","patch_set":7,"id":"a9af9890_1d2584d9","line":42,"updated":"2022-11-08 09:43:25.000000000","message":"Please reduce these examples to the important parts, e.g. drop playbook keywords and replace that \u0027auth\u0027 dict with a simple \u0027cloud: devstack\u0027 etc. like we do in other modules.","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c76dfac3ed87d70811985803ca049b95fae026eb","unresolved":false,"context_lines":[{"line_number":39,"context_line":"- openstack.cloud.openstack"},{"line_number":40,"context_line":"\u0027\u0027\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"EXAMPLES \u003d \u0027\u0027\u0027"},{"line_number":43,"context_line":"# Creates or updates hostname\u003dtest1 as metadata of the server instance vm1"},{"line_number":44,"context_line":"- name: add metadata to compute instance"},{"line_number":45,"context_line":"  hosts: localhost"}],"source_content_type":"text/x-python","patch_set":7,"id":"3593d5fd_a804c083","line":42,"in_reply_to":"a9af9890_1d2584d9","updated":"2022-11-09 04:01:02.000000000","message":"Done","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"7a117d817a2115776c058c4d0a27992a8f97a5db","unresolved":true,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class ServerMetadataModule(OpenStackModule):"},{"line_number":90,"context_line":"    argument_spec \u003d dict("},{"line_number":91,"context_line":"        server\u003ddict(required\u003dTrue, aliases\u003d[\u0027name\u0027]),"},{"line_number":92,"context_line":"        meta\u003ddict(required\u003dTrue, type\u003d\u0027dict\u0027),"},{"line_number":93,"context_line":"        state\u003ddict(default\u003d\u0027present\u0027, choices\u003d[\u0027absent\u0027, \u0027present\u0027]),"},{"line_number":94,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":7,"id":"141fbe8a_e8efae8e","line":91,"updated":"2022-11-08 09:43:25.000000000","message":"Please change attribute name and alias, like you did in docstring above.","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c76dfac3ed87d70811985803ca049b95fae026eb","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"class ServerMetadataModule(OpenStackModule):"},{"line_number":90,"context_line":"    argument_spec \u003d dict("},{"line_number":91,"context_line":"        server\u003ddict(required\u003dTrue, aliases\u003d[\u0027name\u0027]),"},{"line_number":92,"context_line":"        meta\u003ddict(required\u003dTrue, type\u003d\u0027dict\u0027),"},{"line_number":93,"context_line":"        state\u003ddict(default\u003d\u0027present\u0027, choices\u003d[\u0027absent\u0027, \u0027present\u0027]),"},{"line_number":94,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":7,"id":"bc7edecf_4595e064","line":91,"in_reply_to":"141fbe8a_e8efae8e","updated":"2022-11-09 04:01:02.000000000","message":"Done","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"7a117d817a2115776c058c4d0a27992a8f97a5db","unresolved":true,"context_lines":[{"line_number":111,"context_line":"        if state \u003d\u003d \u0027present\u0027:"},{"line_number":112,"context_line":"            update \u003d self._build_update(server.metadata, meta)"},{"line_number":113,"context_line":"            if update:"},{"line_number":114,"context_line":"                self.conn.compute.set_server_metadata(server, **meta)"},{"line_number":115,"context_line":"                changed \u003d True"},{"line_number":116,"context_line":"        elif state \u003d\u003d \u0027absent\u0027:"},{"line_number":117,"context_line":"            # Only remove keys that exist on the server"}],"source_content_type":"text/x-python","patch_set":7,"id":"2fc2cd10_2431d8e2","line":114,"updated":"2022-11-08 09:43:25.000000000","message":"This will add new or change existing metadata but it will not replace or delete metadata which is not in \"meta\" variable. This is not very idempotent and hard to use. Please document this behaviour in the module documentation.\n\nIn future we should think about adding a \u0027mode: replace\u0027 attribute which restores proper idempotent behaviour [1] and replaces the whole metadata a server.\n\n[1] https://github.com/opentelekomcloud/ansible-collection-cloud/blob/master/plugins/modules/tag.py#L91","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c76dfac3ed87d70811985803ca049b95fae026eb","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        if state \u003d\u003d \u0027present\u0027:"},{"line_number":112,"context_line":"            update \u003d self._build_update(server.metadata, meta)"},{"line_number":113,"context_line":"            if update:"},{"line_number":114,"context_line":"                self.conn.compute.set_server_metadata(server, **meta)"},{"line_number":115,"context_line":"                changed \u003d True"},{"line_number":116,"context_line":"        elif state \u003d\u003d \u0027absent\u0027:"},{"line_number":117,"context_line":"            # Only remove keys that exist on the server"}],"source_content_type":"text/x-python","patch_set":7,"id":"1eca84a1_ca0e63bf","line":114,"in_reply_to":"2fc2cd10_2431d8e2","updated":"2022-11-09 04:01:02.000000000","message":"Done. I\u0027ll add the replace mode in a follow up.","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"7a117d817a2115776c058c4d0a27992a8f97a5db","unresolved":true,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        if changed:"},{"line_number":125,"context_line":"            # refresh server object"},{"line_number":126,"context_line":"            server \u003d self.conn.compute.get_server(server)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self.exit_json("},{"line_number":129,"context_line":"            changed\u003dchanged, metadata\u003dserver.metadata)"}],"source_content_type":"text/x-python","patch_set":7,"id":"207b75cb_08db1c4f","line":126,"updated":"2022-11-08 09:43:25.000000000","message":"You can save this extra api call by simply updating the server\u0027s metadata with the new metadata and sent both to set_server_metadata. The latter will update server\u0027s metadata attribute for you [1]. The delete_server_metadata will do the same [2].\n\n[1] https://opendev.org/openstack/openstacksdk/src/commit/e7e28fe548a8b30a857227a9a6942cbab644d2b3/openstack/common/metadata.py#L53\n[2] https://opendev.org/openstack/openstacksdk/src/commit/e7e28fe548a8b30a857227a9a6942cbab644d2b3/openstack/common/metadata.py#L130","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c76dfac3ed87d70811985803ca049b95fae026eb","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        if changed:"},{"line_number":125,"context_line":"            # refresh server object"},{"line_number":126,"context_line":"            server \u003d self.conn.compute.get_server(server)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self.exit_json("},{"line_number":129,"context_line":"            changed\u003dchanged, metadata\u003dserver.metadata)"}],"source_content_type":"text/x-python","patch_set":7,"id":"8ea8a07a_7a3f894e","line":126,"in_reply_to":"207b75cb_08db1c4f","updated":"2022-11-09 04:01:02.000000000","message":"Done","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"5d6fee5953126a06f9a12fdf402f1ca0de6fb225","unresolved":true,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        if changed:"},{"line_number":125,"context_line":"            # refresh server object"},{"line_number":126,"context_line":"            server \u003d self.conn.compute.get_server(server)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self.exit_json("},{"line_number":129,"context_line":"            changed\u003dchanged, metadata\u003dserver.metadata)"}],"source_content_type":"text/x-python","patch_set":7,"id":"a5e6c12e_2e32527c","line":126,"in_reply_to":"8ea8a07a_7a3f894e","updated":"2022-11-09 13:05:16.000000000","message":"You have to merge the new metadata with the new metadata before returning the server object else server.metata will miss the data which existed prior to the update which has not been updated.","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"5f7679e7cfe471b4165ccb28add8c9b2dd648c8c","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        if changed:"},{"line_number":125,"context_line":"            # refresh server object"},{"line_number":126,"context_line":"            server \u003d self.conn.compute.get_server(server)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self.exit_json("},{"line_number":129,"context_line":"            changed\u003dchanged, metadata\u003dserver.metadata)"}],"source_content_type":"text/x-python","patch_set":7,"id":"bfeea900_d1c0d96d","line":126,"in_reply_to":"a5e6c12e_2e32527c","updated":"2022-11-09 17:57:12.000000000","message":"Ah, I read the sdk code wrong. I thought it was simply updating the existing metadata on the server object, not replacing it completely. Fixed.\n\nAnd tests should catch this now.","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"7a117d817a2115776c058c4d0a27992a8f97a5db","unresolved":true,"context_lines":[{"line_number":126,"context_line":"            server \u003d self.conn.compute.get_server(server)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self.exit_json("},{"line_number":129,"context_line":"            changed\u003dchanged, metadata\u003dserver.metadata)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _build_update(self, current\u003dNone, requested\u003dNone):"},{"line_number":132,"context_line":"        current \u003d current or {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"f2a5d789_672da0b4","line":129,"updated":"2022-11-08 09:43:25.000000000","message":"Previously we returned metadata and server_id. Why not return the whole dictified server object like we do in other modules? Then the user can decide what she needs and what not. It wont cost us anything because we already have the server object.","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"c76dfac3ed87d70811985803ca049b95fae026eb","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            server \u003d self.conn.compute.get_server(server)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self.exit_json("},{"line_number":129,"context_line":"            changed\u003dchanged, metadata\u003dserver.metadata)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _build_update(self, current\u003dNone, requested\u003dNone):"},{"line_number":132,"context_line":"        current \u003d current or {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"fc40bc36_7ca04702","line":129,"in_reply_to":"f2a5d789_672da0b4","updated":"2022-11-09 04:01:02.000000000","message":"Done","commit_id":"40e0a50383ea16248680b212c325fa52b7f64e5d"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"5d6fee5953126a06f9a12fdf402f1ca0de6fb225","unresolved":true,"context_lines":[{"line_number":404,"context_line":"                                                         keys_to_delete)"},{"line_number":405,"context_line":"                changed \u003d True"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        self.exit_json(changed\u003dchanged, metadata\u003dserver.metadata,"},{"line_number":408,"context_line":"                       server\u003dserver.to_dict(computed\u003dFalse))"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def _build_update(self, current\u003dNone, requested\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"409600c4_54d1e594","line":407,"updated":"2022-11-09 13:05:16.000000000","message":"metadata is returned as part of server dict, so no need to return metadata separately?!?","commit_id":"f81629093f8989f6d81e02b9f36cc2f0f0979e95"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"5f7679e7cfe471b4165ccb28add8c9b2dd648c8c","unresolved":false,"context_lines":[{"line_number":404,"context_line":"                                                         keys_to_delete)"},{"line_number":405,"context_line":"                changed \u003d True"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        self.exit_json(changed\u003dchanged, metadata\u003dserver.metadata,"},{"line_number":408,"context_line":"                       server\u003dserver.to_dict(computed\u003dFalse))"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def _build_update(self, current\u003dNone, requested\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"afd35a68_d91a88de","line":407,"in_reply_to":"409600c4_54d1e594","updated":"2022-11-09 17:57:12.000000000","message":"Initially left it for backwards compat, but you\u0027re right, let\u0027s simplify this.","commit_id":"f81629093f8989f6d81e02b9f36cc2f0f0979e95"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"5d6fee5953126a06f9a12fdf402f1ca0de6fb225","unresolved":true,"context_lines":[{"line_number":425,"context_line":"            update \u003d self._build_update(server.metadata, meta)"},{"line_number":426,"context_line":"            if update:"},{"line_number":427,"context_line":"                changed \u003d True"},{"line_number":428,"context_line":"                server.meta.update(update)"},{"line_number":429,"context_line":"        else:"},{"line_number":430,"context_line":"            keys \u003d self._get_keys_to_delete(server.metadata, meta)"},{"line_number":431,"context_line":"            for k in keys:"}],"source_content_type":"text/x-python","patch_set":11,"id":"8c3a0cab_61b21e50","line":428,"updated":"2022-11-09 13:05:16.000000000","message":"server.metadata instead of server.meta?\n\nCould server.metadata possibely be None and thus raise an error here?","commit_id":"f81629093f8989f6d81e02b9f36cc2f0f0979e95"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"5f7679e7cfe471b4165ccb28add8c9b2dd648c8c","unresolved":false,"context_lines":[{"line_number":425,"context_line":"            update \u003d self._build_update(server.metadata, meta)"},{"line_number":426,"context_line":"            if update:"},{"line_number":427,"context_line":"                changed \u003d True"},{"line_number":428,"context_line":"                server.meta.update(update)"},{"line_number":429,"context_line":"        else:"},{"line_number":430,"context_line":"            keys \u003d self._get_keys_to_delete(server.metadata, meta)"},{"line_number":431,"context_line":"            for k in keys:"}],"source_content_type":"text/x-python","patch_set":11,"id":"54ab07a6_93c73aac","line":428,"in_reply_to":"8c3a0cab_61b21e50","updated":"2022-11-09 17:57:12.000000000","message":"You\u0027re right! fixed","commit_id":"f81629093f8989f6d81e02b9f36cc2f0f0979e95"}]}
