)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":8367,"name":"Arx Cruz","email":"arxcruz@redhat.com","username":"arxcruz"},"change_message_id":"20099d0c0710d6aa24946bcc517d37a8080f7468","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"52c31252_66d4ecdb","updated":"2022-06-13 10:00:35.000000000","message":"Adding Julia to ensure it works since we are not testing, from the logic, seems fine to me though","commit_id":"64bc99be2dbc1c20eb750442c43787b2d0456e41"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"52d69b2c619d74c60755853865defcd3ba6b2514","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"0020388a_7fa7228c","updated":"2022-06-27 08:04:25.000000000","message":"Let us try to get rid of IronicModule completely. Functionality in IronicModule (auth_type and ironic_url) had originally been introduced with shade library in 2016.\n\nhttps://github.com/ansible/ansible/commit/011267c04edefa912b4915ed2026a3d46f128cf1\n\nThis code has been kept for backward compat. But since we have openstacksdk and auth/cloud in OpenStackModule now, we may drop this old code. This would help us because we would have only a single base class OpenStackModule and save us from rebasing/reparenting IronicModule.\n\nDiscussion is ongoing in https://meetings.opendev.org/irclogs/%23openstack-ansible-sig/%23openstack-ansible-sig.2022-06-27.log.html\n","commit_id":"64bc99be2dbc1c20eb750442c43787b2d0456e41"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"0ecd6262_242e97dd","in_reply_to":"0020388a_7fa7228c","updated":"2022-07-26 12:08:35.000000000","message":"With [1] being merged into bifrost, we can finally get rid of ironic_url 😊\n\n[1] https://review.opendev.org/c/openstack/bifrost/+/848741","commit_id":"64bc99be2dbc1c20eb750442c43787b2d0456e41"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"1e9a8198629187dd29da6a8e7413887a890ccd23","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"a1085957_d62534d7","in_reply_to":"52c31252_66d4ecdb","updated":"2022-08-02 08:18:18.000000000","message":"We have an small test of this module: This module is called in our bifrost-collections-src and bifrost-keystone-collections-src jobs. For example, grep for the module name here [1]:\n\n  changed: [testvm1 -\u003e 127.0.0.1] \u003d\u003e {\n      \"changed\": true,\n      \"invocation\": {\n          \"module_args\": {\n              \"api_timeout\": null,\n              \"auth\": {\n                  \"endpoint\": \"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER\",\n                  \"password\": \"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER\",\n                  \"username\": \"VALUE_SPECIFIED_IN_NO_LOG_PARAMETER\"\n              },\n              \"auth_type\": \"http_basic\",\n              \"ca_cert\": \"\",\n              \"client_cert\": null,\n              \"client_key\": null,\n              \"interface\": \"public\",\n              \"mac\": null,\n              \"name\": \"testvm1\",\n              \"node\": \"testvm1\",\n              \"region_name\": null,\n              \"sdk_log_level\": \"INFO\",\n              \"sdk_log_path\": null,\n              \"timeout\": 1800,\n              \"uuid\": \"4e41df61-84b1-5856-bfb6-6b5f2cd3dd11\",\n              \"validate_certs\": null,\n              \"wait\": true\n          }\n      },\n      \"node\": {\n          \"allocation_id\": null,\n          \"bios_interface\": \"no-bios\",\n          \"boot_interface\": \"ipxe\",\n          \"boot_mode\": null,\n          \"chassis_id\": null,\n          \"clean_step\": {},\n          \"conductor\": \"ubuntu-focal-ovh-bhs1-0030593036\",\n          \"conductor_group\": \"\",\n          \"console_interface\": \"no-console\",\n          \"created_at\": \"2022-08-01T15:43:38+00:00\",\n          \"deploy_interface\": \"direct\",\n          \"deploy_step\": {},\n          \"driver\": \"ipmi\",\n          \"driver_info\": {\n              \"ipmi_address\": \"192.168.122.1\",\n              \"ipmi_password\": \"******\",\n              \"ipmi_port\": \"623\",\n              \"ipmi_username\": \"admin\",\n              \"redfish_address\": \"http://localhost:9132\",\n              \"redfish_password\": \"******\",\n              \"redfish_system_id\": \"/redfish/v1/Systems/testvm1\",\n              \"redfish_username\": \"admin\"\n          },\n          \"driver_internal_info\": {\n              \"agent_cached_clean_steps_refreshed\": \"2022-08-01T15:48:39.484483\",\n              \"agent_continue_if_ata_erase_failed\": false,\n              \"agent_continue_if_secure_erase_failed\": false,\n              \"agent_enable_ata_secure_erase\": true,\n              \"agent_enable_nvme_secure_erase\": true,\n              \"agent_erase_devices_iterations\": 1,\n              \"agent_erase_devices_zeroize\": true,\n              \"agent_erase_skip_read_only\": false,\n              \"agent_last_heartbeat\": \"2022-08-01T15:48:45.115537\",\n              \"agent_secret_token\": \"******\",\n              \"agent_url\": \"https://192.168.122.196:9999\",\n              \"agent_verify_ca\": \"/var/lib/ironic/certificates/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11.crt\",\n              \"agent_version\": \"8.6.1.dev40\",\n              \"clean_steps\": null,\n              \"deploy_boot_mode\": \"uefi\",\n              \"disk_erasure_concurrency\": 1,\n              \"hardware_manager_version\": {\n                  \"generic_hardware_manager\": \"1.1\"\n              },\n              \"last_power_state_change\": \"2022-08-01T15:44:02.975063\"\n          },\n          \"extra\": {},\n          \"fault\": null,\n          \"id\": \"4e41df61-84b1-5856-bfb6-6b5f2cd3dd11\",\n          \"inspect_interface\": \"inspector\",\n          \"instance_id\": null,\n          \"instance_info\": {},\n          \"is_automated_clean_enabled\": null,\n          \"is_console_enabled\": false,\n          \"is_maintenance\": false,\n          \"is_protected\": false,\n          \"is_retired\": false,\n          \"is_secure_boot\": null,\n          \"last_error\": null,\n          \"links\": [\n              {\n                  \"href\": \"********/v1/nodes/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11\",\n                  \"rel\": \"self\"\n              },\n              {\n                  \"href\": \"********/nodes/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11\",\n                  \"rel\": \"bookmark\"\n              }\n          ],\n          \"maintenance_reason\": null,\n          \"management_interface\": \"ipmitool\",\n          \"name\": \"testvm1\",\n          \"network_interface\": \"noop\",\n          \"owner\": null,\n          \"port_groups\": [\n              {\n                  \"href\": \"********/v1/nodes/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11/portgroups\",\n                  \"rel\": \"self\"\n              },\n              {\n                  \"href\": \"********/nodes/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11/portgroups\",\n                  \"rel\": \"bookmark\"\n              }\n          ],\n          \"ports\": [\n              {\n                  \"href\": \"********/v1/nodes/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11/ports\",\n                  \"rel\": \"self\"\n              },\n              {\n                  \"href\": \"********/nodes/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11/ports\",\n                  \"rel\": \"bookmark\"\n              }\n          ],\n          \"power_interface\": \"ipmitool\",\n          \"power_state\": \"power on\",\n          \"properties\": {\n              \"capabilities\": \"cpu_vt:true,cpu_hugepages:true\",\n              \"cpu_arch\": \"x86_64\",\n              \"cpus\": \"1\",\n              \"local_gb\": \"5\",\n              \"memory_mb\": \"1024\",\n              \"vendor\": \"unknown\"\n          },\n          \"protected_reason\": null,\n          \"provision_state\": \"available\",\n          \"raid_config\": {},\n          \"raid_interface\": \"no-raid\",\n          \"rescue_interface\": \"no-rescue\",\n          \"reservation\": null,\n          \"resource_class\": \"baremetal\",\n          \"retired_reason\": null,\n          \"states\": [\n              {\n                  \"href\": \"********/v1/nodes/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11/states\",\n                  \"rel\": \"self\"\n              },\n              {\n                  \"href\": \"********/nodes/4e41df61-84b1-5856-bfb6-6b5f2cd3dd11/states\",\n                  \"rel\": \"bookmark\"\n              }\n          ],\n          \"storage_interface\": \"noop\",\n          \"target_power_state\": null,\n          \"target_provision_state\": null,\n          \"target_raid_config\": {},\n          \"traits\": [],\n          \"updated_at\": \"2022-08-01T15:49:04+00:00\",\n          \"vendor_interface\": \"ipmitool\"\n      }\n  }\n\n[1] https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_276/843334/14/check/bifrost-collections-src/276c4b0/job-output.txt","commit_id":"64bc99be2dbc1c20eb750442c43787b2d0456e41"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"dab1da15_80ddd6c6","updated":"2022-07-26 15:41:23.000000000","message":"Thanks for the review, Jakob","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"a25878e9a05393af0c1c57269407acf558dca435","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"ab9794dc_f48aff0e","updated":"2022-08-02 08:06:21.000000000","message":"The latest patchset fixes the module results docs and adds assertions on return values. Return values can easily be verified with:\n\n  sorted(openstack.baremetal.v1.node.Node().to_dict(computed\u003dFalse).keys())\n  \nand:\n\n  https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/baremetal/v1/node.py","commit_id":"1728cd56e36187a2ff9d5e6dbbb21c6e6da22440"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"44f5563c19231ead0718f8a3ff74dfe09c4dbd20","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"5afce842_2dd5d7c4","updated":"2022-08-02 08:13:19.000000000","message":"The latest patchset renames module attribute \u0027node\u0027 to \u0027name\u0027 because the latter is what we use across modules to find resources by name or id.","commit_id":"d2eb98d04800bcfa180ae459483ddcb8a52497ec"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"36c6bad4cde76e66c1cd0967e11b1b896d0c40b7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"65c8e765_505c5535","updated":"2022-08-02 08:22:41.000000000","message":"This is an awesome refactoring, Rafael! Now its much cleaner, has less code and more info! 🤩","commit_id":"d2eb98d04800bcfa180ae459483ddcb8a52497ec"}],"plugins/modules/baremetal_inspect.py":[{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":18,"context_line":"      description:"},{"line_number":19,"context_line":"        - unique mac address that is used to attempt to identify the host."},{"line_number":20,"context_line":"      type: str"},{"line_number":21,"context_line":"    uuid:"},{"line_number":22,"context_line":"      description:"},{"line_number":23,"context_line":"        - globally unique identifier (UUID) to identify the host."},{"line_number":24,"context_line":"      type: str"}],"source_content_type":"text/x-python","patch_set":7,"id":"51b5d40b_9dcd8c4c","line":21,"updated":"2022-07-26 12:08:35.000000000","message":"nit: Maybe we want to rename this attribute from uuid to id to match openstacksdk\u0027s attributes? To remain backward compatibility we would want to add uuid to aliases.\n\nMaybe we want to add this as an inline TODO comment below.","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":18,"context_line":"      description:"},{"line_number":19,"context_line":"        - unique mac address that is used to attempt to identify the host."},{"line_number":20,"context_line":"      type: str"},{"line_number":21,"context_line":"    uuid:"},{"line_number":22,"context_line":"      description:"},{"line_number":23,"context_line":"        - globally unique identifier (UUID) to identify the host."},{"line_number":24,"context_line":"      type: str"}],"source_content_type":"text/x-python","patch_set":7,"id":"26436dbb_9cbd5a2f","line":21,"in_reply_to":"51b5d40b_9dcd8c4c","updated":"2022-07-26 15:41:23.000000000","message":"I\u0027ve changed this. It\u0027s not so clear cut because the sdk uses `id` but the ironic api uses `uuid`. Supporting both would be best.","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class BaremetalInspectModule(OpenStackModule):"},{"line_number":79,"context_line":"    argument_spec \u003d dict("},{"line_number":80,"context_line":"        uuid\u003ddict(required\u003dFalse),"},{"line_number":81,"context_line":"        name\u003ddict(required\u003dFalse),"},{"line_number":82,"context_line":"        mac\u003ddict(required\u003dFalse),"},{"line_number":83,"context_line":"        wait\u003ddict(default\u003dTrue, type\u003d\u0027bool\u0027, required\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":7,"id":"e752a07c_51fed1e6","line":80,"updated":"2022-07-26 12:08:35.000000000","message":"Please drop required\u003dFalse because it is the default.\n\nhttps://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#argument-spec","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class BaremetalInspectModule(OpenStackModule):"},{"line_number":79,"context_line":"    argument_spec \u003d dict("},{"line_number":80,"context_line":"        uuid\u003ddict(required\u003dFalse),"},{"line_number":81,"context_line":"        name\u003ddict(required\u003dFalse),"},{"line_number":82,"context_line":"        mac\u003ddict(required\u003dFalse),"},{"line_number":83,"context_line":"        wait\u003ddict(default\u003dTrue, type\u003d\u0027bool\u0027, required\u003dFalse),"}],"source_content_type":"text/x-python","patch_set":7,"id":"86c9e0a8_94dffa26","line":80,"in_reply_to":"e752a07c_51fed1e6","updated":"2022-07-26 15:41:23.000000000","message":"Done","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":80,"context_line":"        uuid\u003ddict(required\u003dFalse),"},{"line_number":81,"context_line":"        name\u003ddict(required\u003dFalse),"},{"line_number":82,"context_line":"        mac\u003ddict(required\u003dFalse),"},{"line_number":83,"context_line":"        wait\u003ddict(default\u003dTrue, type\u003d\u0027bool\u0027, required\u003dFalse),"},{"line_number":84,"context_line":"        timeout\u003ddict(default\u003d1200, type\u003d\u0027int\u0027, required\u003dFalse),"},{"line_number":85,"context_line":"    )"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"a66aefb0_64a0645a","line":83,"updated":"2022-07-26 12:08:35.000000000","message":"Please drop wait and timeout, because it is added by base class.\n\nThe only reason to keep timeout would be that it sets a different default value. But since this heavily depends on the use case anyway i am inclined to drop it and let users choose a value which suit their environment.\n\n[1] https://opendev.org/openstack/ansible-collections-openstack/src/commit/ceae5c1030d4b5149fa6d229a1172fb16f314329/plugins/module_utils/openstack.py#L101","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        uuid\u003ddict(required\u003dFalse),"},{"line_number":81,"context_line":"        name\u003ddict(required\u003dFalse),"},{"line_number":82,"context_line":"        mac\u003ddict(required\u003dFalse),"},{"line_number":83,"context_line":"        wait\u003ddict(default\u003dTrue, type\u003d\u0027bool\u0027, required\u003dFalse),"},{"line_number":84,"context_line":"        timeout\u003ddict(default\u003d1200, type\u003d\u0027int\u0027, required\u003dFalse),"},{"line_number":85,"context_line":"    )"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"821059b0_cf93942a","line":83,"in_reply_to":"a66aefb0_64a0645a","updated":"2022-07-26 15:41:23.000000000","message":"Done","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":91,"context_line":"            return self.params[\u0027name\u0027]"},{"line_number":92,"context_line":"        return None"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def get_node_by_mac(self, address):"},{"line_number":95,"context_line":"        ports \u003d self.conn.baremetal.ports(address\u003daddress)"},{"line_number":96,"context_line":"        ports \u003d list(ports)"},{"line_number":97,"context_line":"        if not ports:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9bcb7eb0_2fe01a14","line":94,"updated":"2022-07-26 12:08:35.000000000","message":"Please do not replicate code from openstacksdk in our modules. Use openstacksdk\u0027s  cloud.get_machine_by_mac() instead.\n\nYou maybe added this because parts of openstacksdk still returned Munch objects in the past. A proper fix would be sending a patch to openstacksdk, not copying and fixing the code here. Fortunately, Artem did so 2 month ago [1]. Munch objects should no longer be returned.\n\n[1] https://opendev.org/openstack/openstacksdk/commit/9efb589eeb2ecb57efccbd0025c5140b548e0029","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            return self.params[\u0027name\u0027]"},{"line_number":92,"context_line":"        return None"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def get_node_by_mac(self, address):"},{"line_number":95,"context_line":"        ports \u003d self.conn.baremetal.ports(address\u003daddress)"},{"line_number":96,"context_line":"        ports \u003d list(ports)"},{"line_number":97,"context_line":"        if not ports:"}],"source_content_type":"text/x-python","patch_set":7,"id":"73b88258_ebcbd3ac","line":94,"in_reply_to":"9bcb7eb0_2fe01a14","updated":"2022-07-26 15:41:23.000000000","message":"Done","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":102,"context_line":"    def introspect_node(self):"},{"line_number":103,"context_line":"        node \u003d None"},{"line_number":104,"context_line":"        if self.params[\u0027name\u0027] or self.params[\u0027uuid\u0027]:"},{"line_number":105,"context_line":"            node \u003d self.conn.baremetal.find_machine(self._choose_id_value())"},{"line_number":106,"context_line":"        elif self.params[\u0027mac\u0027]:"},{"line_number":107,"context_line":"            node \u003d self.get_node_by_mac(self.params[\u0027mac\u0027])"},{"line_number":108,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"42cc2d1f_3a299c35","line":105,"updated":"2022-07-26 12:08:35.000000000","message":"Replace this 6 lines function _choose_id_value() with a simple\n\n  self.params[\u0027uuid\u0027] if self.params[\u0027uuid\u0027] else self.params[\u0027name\u0027]\n  \nor if you want it to be more self-explanatory:\n\n  node_name_or_id \u003d self.params[\u0027uuid\u0027] if self.params[\u0027uuid\u0027] else self.params[\u0027name\u0027]\n  node \u003d self.conn.baremetal.find_node(node_name_or_id)","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":102,"context_line":"    def introspect_node(self):"},{"line_number":103,"context_line":"        node \u003d None"},{"line_number":104,"context_line":"        if self.params[\u0027name\u0027] or self.params[\u0027uuid\u0027]:"},{"line_number":105,"context_line":"            node \u003d self.conn.baremetal.find_machine(self._choose_id_value())"},{"line_number":106,"context_line":"        elif self.params[\u0027mac\u0027]:"},{"line_number":107,"context_line":"            node \u003d self.get_node_by_mac(self.params[\u0027mac\u0027])"},{"line_number":108,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"a87520d5_1c15a5b6","line":105,"updated":"2022-07-26 12:08:35.000000000","message":"find_machine is not a valid functionname in openstacksdk.\n\nhttps://codesearch.opendev.org/?q\u003dfind_machine\u0026i\u003dnope\u0026literal\u003dnope\u0026files\u003d\u0026excludeFiles\u003d\u0026repos\u003dopenstack/openstacksdk","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    def introspect_node(self):"},{"line_number":103,"context_line":"        node \u003d None"},{"line_number":104,"context_line":"        if self.params[\u0027name\u0027] or self.params[\u0027uuid\u0027]:"},{"line_number":105,"context_line":"            node \u003d self.conn.baremetal.find_machine(self._choose_id_value())"},{"line_number":106,"context_line":"        elif self.params[\u0027mac\u0027]:"},{"line_number":107,"context_line":"            node \u003d self.get_node_by_mac(self.params[\u0027mac\u0027])"},{"line_number":108,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"c031b0a2_f05175f0","line":105,"in_reply_to":"42cc2d1f_3a299c35","updated":"2022-07-26 15:41:23.000000000","message":"or even \n  self.params[\u0027uuid\u0027] or self.params[\u0027name\u0027]\n\nBut I\u0027ve changed the argspec so this isn\u0027t necessary at all.","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    def introspect_node(self):"},{"line_number":103,"context_line":"        node \u003d None"},{"line_number":104,"context_line":"        if self.params[\u0027name\u0027] or self.params[\u0027uuid\u0027]:"},{"line_number":105,"context_line":"            node \u003d self.conn.baremetal.find_machine(self._choose_id_value())"},{"line_number":106,"context_line":"        elif self.params[\u0027mac\u0027]:"},{"line_number":107,"context_line":"            node \u003d self.get_node_by_mac(self.params[\u0027mac\u0027])"},{"line_number":108,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"abf0ab91_c8381a2a","line":105,"in_reply_to":"a87520d5_1c15a5b6","updated":"2022-07-26 15:41:23.000000000","message":"Done","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"b382e196f629e81ce690eb70b58844e829f1bc54","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    def introspect_node(self):"},{"line_number":103,"context_line":"        node \u003d None"},{"line_number":104,"context_line":"        if self.params[\u0027name\u0027] or self.params[\u0027uuid\u0027]:"},{"line_number":105,"context_line":"            node \u003d self.conn.baremetal.find_machine(self._choose_id_value())"},{"line_number":106,"context_line":"        elif self.params[\u0027mac\u0027]:"},{"line_number":107,"context_line":"            node \u003d self.get_node_by_mac(self.params[\u0027mac\u0027])"},{"line_number":108,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"2380b4e3_61439d10","line":105,"in_reply_to":"c031b0a2_f05175f0","updated":"2022-08-02 08:21:49.000000000","message":"Your solution with aliases is the cleanest imho 😊","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"e7fe006250162d0d73414a89c46c32365c94909e","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            node \u003d self.conn.baremetal.find_machine(self._choose_id_value())"},{"line_number":106,"context_line":"        elif self.params[\u0027mac\u0027]:"},{"line_number":107,"context_line":"            node \u003d self.get_node_by_mac(self.params[\u0027mac\u0027])"},{"line_number":108,"context_line":"        else:"},{"line_number":109,"context_line":"            self.fail_json(msg\u003d\"The worlds did not align, \""},{"line_number":110,"context_line":"                               \"the host was not found as \""},{"line_number":111,"context_line":"                               \"no name, uuid, or mac was \""},{"line_number":112,"context_line":"                               \"defined.\")"},{"line_number":113,"context_line":"        if not node:"},{"line_number":114,"context_line":"            self.fail_json(msg\u003d\"node not found.\")"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"90949c8e_24c89be8","line":112,"range":{"start_line":108,"start_character":13,"end_line":112,"end_character":42},"updated":"2022-07-20 13:39:36.000000000","message":"lolz. I\u0027m amused this is still here.","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            node \u003d self.conn.baremetal.find_machine(self._choose_id_value())"},{"line_number":106,"context_line":"        elif self.params[\u0027mac\u0027]:"},{"line_number":107,"context_line":"            node \u003d self.get_node_by_mac(self.params[\u0027mac\u0027])"},{"line_number":108,"context_line":"        else:"},{"line_number":109,"context_line":"            self.fail_json(msg\u003d\"The worlds did not align, \""},{"line_number":110,"context_line":"                               \"the host was not found as \""},{"line_number":111,"context_line":"                               \"no name, uuid, or mac was \""},{"line_number":112,"context_line":"                               \"defined.\")"},{"line_number":113,"context_line":"        if not node:"},{"line_number":114,"context_line":"            self.fail_json(msg\u003d\"node not found.\")"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"439b6f64_64f99d48","line":112,"range":{"start_line":108,"start_character":13,"end_line":112,"end_character":42},"in_reply_to":"037073bc_fada1db7","updated":"2022-07-26 15:41:23.000000000","message":"Done, sadly","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":105,"context_line":"            node \u003d self.conn.baremetal.find_machine(self._choose_id_value())"},{"line_number":106,"context_line":"        elif self.params[\u0027mac\u0027]:"},{"line_number":107,"context_line":"            node \u003d self.get_node_by_mac(self.params[\u0027mac\u0027])"},{"line_number":108,"context_line":"        else:"},{"line_number":109,"context_line":"            self.fail_json(msg\u003d\"The worlds did not align, \""},{"line_number":110,"context_line":"                               \"the host was not found as \""},{"line_number":111,"context_line":"                               \"no name, uuid, or mac was \""},{"line_number":112,"context_line":"                               \"defined.\")"},{"line_number":113,"context_line":"        if not node:"},{"line_number":114,"context_line":"            self.fail_json(msg\u003d\"node not found.\")"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"037073bc_fada1db7","line":112,"range":{"start_line":108,"start_character":13,"end_line":112,"end_character":42},"in_reply_to":"90949c8e_24c89be8","updated":"2022-07-26 12:08:35.000000000","message":"Right. Please replace with Ansible\u0027s required_one_of.\n\nhttps://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#dependencies-between-module-options","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":113,"context_line":"        if not node:"},{"line_number":114,"context_line":"            self.fail_json(msg\u003d\"node not found.\")"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        self.conn.inspect_machine(node.uuid, wait\u003dTrue,"},{"line_number":117,"context_line":"                                  timeout\u003dself.params[\u0027timeout\u0027])"},{"line_number":118,"context_line":"        # retrieve node with updated properties"},{"line_number":119,"context_line":"        node \u003d self.conn.baremetal.find_machine(node.uuid)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7c4f070e_c54f0855","line":116,"updated":"2022-07-26 12:08:35.000000000","message":"Why not use the return value of inspect_machine [1] (which is up to date) instead of doing another api call in the next command?\n\n[1] https://opendev.org/openstack/openstacksdk/src/commit/1ce15c9a8758b4d978eb5239bae100ddc13c8875/openstack/cloud/_baremetal.py#L101","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        if not node:"},{"line_number":114,"context_line":"            self.fail_json(msg\u003d\"node not found.\")"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        self.conn.inspect_machine(node.uuid, wait\u003dTrue,"},{"line_number":117,"context_line":"                                  timeout\u003dself.params[\u0027timeout\u0027])"},{"line_number":118,"context_line":"        # retrieve node with updated properties"},{"line_number":119,"context_line":"        node \u003d self.conn.baremetal.find_machine(node.uuid)"}],"source_content_type":"text/x-python","patch_set":7,"id":"d757550d_7b14e169","line":116,"in_reply_to":"7c4f070e_c54f0855","updated":"2022-07-26 15:41:23.000000000","message":"Done","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":116,"context_line":"        self.conn.inspect_machine(node.uuid, wait\u003dTrue,"},{"line_number":117,"context_line":"                                  timeout\u003dself.params[\u0027timeout\u0027])"},{"line_number":118,"context_line":"        # retrieve node with updated properties"},{"line_number":119,"context_line":"        node \u003d self.conn.baremetal.find_machine(node.uuid)"},{"line_number":120,"context_line":"        node \u003d node.to_dict(computed\u003dFalse)"},{"line_number":121,"context_line":"        # TODO(TheJulia): diff properties, ?and ports? and determine"},{"line_number":122,"context_line":"        # if a change occurred.  In theory, the node is always changed"}],"source_content_type":"text/x-python","patch_set":7,"id":"6e978106_387fc92d","line":119,"updated":"2022-07-26 12:08:35.000000000","message":"find_machine is not a valid functionname in openstacksdk.\n\nhttps://codesearch.opendev.org/?q\u003dfind_machine\u0026i\u003dnope\u0026literal\u003dnope\u0026files\u003d\u0026excludeFiles\u003d\u0026repos\u003dopenstack/openstacksdk","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        self.conn.inspect_machine(node.uuid, wait\u003dTrue,"},{"line_number":117,"context_line":"                                  timeout\u003dself.params[\u0027timeout\u0027])"},{"line_number":118,"context_line":"        # retrieve node with updated properties"},{"line_number":119,"context_line":"        node \u003d self.conn.baremetal.find_machine(node.uuid)"},{"line_number":120,"context_line":"        node \u003d node.to_dict(computed\u003dFalse)"},{"line_number":121,"context_line":"        # TODO(TheJulia): diff properties, ?and ports? and determine"},{"line_number":122,"context_line":"        # if a change occurred.  In theory, the node is always changed"}],"source_content_type":"text/x-python","patch_set":7,"id":"7d86ce58_182ce262","line":119,"in_reply_to":"6e978106_387fc92d","updated":"2022-07-26 15:41:23.000000000","message":"Done","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":122,"context_line":"        # if a change occurred.  In theory, the node is always changed"},{"line_number":123,"context_line":"        # if introspection is able to update the record."},{"line_number":124,"context_line":"        self.exit_json(changed\u003dTrue,"},{"line_number":125,"context_line":"                       ansible_facts\u003dnode[\u0027properties\u0027])"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def run(self):"},{"line_number":128,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"899e1249_2008bc64","line":125,"updated":"2022-07-26 12:08:35.000000000","message":"Since we already have a complete node object from inspect_machine(), why not simply return the whole node object instead of imposing our will on the user and returning \u0027properties\u0027 only?\n\nFor example:\n\n        self.exit_json(changed\u003dTrue,node\u003dnode)","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"b382e196f629e81ce690eb70b58844e829f1bc54","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        # if a change occurred.  In theory, the node is always changed"},{"line_number":123,"context_line":"        # if introspection is able to update the record."},{"line_number":124,"context_line":"        self.exit_json(changed\u003dTrue,"},{"line_number":125,"context_line":"                       ansible_facts\u003dnode[\u0027properties\u0027])"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def run(self):"},{"line_number":128,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"f79507fe_f0848817","line":125,"in_reply_to":"57abe9e5_f1df764a","updated":"2022-08-02 08:21:49.000000000","message":"Oh wow, Node contains quite a lot of attributes. But thanks for documenting them all!","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        # if a change occurred.  In theory, the node is always changed"},{"line_number":123,"context_line":"        # if introspection is able to update the record."},{"line_number":124,"context_line":"        self.exit_json(changed\u003dTrue,"},{"line_number":125,"context_line":"                       ansible_facts\u003dnode[\u0027properties\u0027])"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def run(self):"},{"line_number":128,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"57abe9e5_f1df764a","line":125,"in_reply_to":"899e1249_2008bc64","updated":"2022-07-26 15:41:23.000000000","message":"This little maneuver\u0027s gonna cost us 51 years (because of return docs) (but done).","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":32962,"name":"Jakob Meng","email":"code@jakobmeng.de","username":"jakobmeng@web.de"},"change_message_id":"ff8c3cd3d0d6a17f1f984db6cc6d09ec4ee8ae29","unresolved":true,"context_lines":[{"line_number":125,"context_line":"                       ansible_facts\u003dnode[\u0027properties\u0027])"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def run(self):"},{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            self.introspect_node()"},{"line_number":130,"context_line":"        except self.sdk.exceptions.OpenStackCloudException as e:"},{"line_number":131,"context_line":"            self.fail_json(msg\u003dstr(e))"}],"source_content_type":"text/x-python","patch_set":7,"id":"4e3ae252_761cba2c","line":128,"updated":"2022-07-26 12:08:35.000000000","message":"Please drop the try-except clause since our parent class handles exceptions already [1]. Since nothing else is left in run(), please move code from introspect_node to run().\n \n[1] https://opendev.org/openstack/ansible-collections-openstack/src/commit/ceae5c1030d4b5149fa6d229a1172fb16f314329/plugins/module_utils/openstack.py#L421","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"},{"author":{"_account_id":34208,"name":"Rafael Castillo","email":"rcastill@redhat.com","username":"rcastill"},"change_message_id":"512492974bd9bff93f22dbdfd2edf40a91e65302","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                       ansible_facts\u003dnode[\u0027properties\u0027])"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def run(self):"},{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            self.introspect_node()"},{"line_number":130,"context_line":"        except self.sdk.exceptions.OpenStackCloudException as e:"},{"line_number":131,"context_line":"            self.fail_json(msg\u003dstr(e))"}],"source_content_type":"text/x-python","patch_set":7,"id":"c3f66ddd_c6391bf4","line":128,"in_reply_to":"4e3ae252_761cba2c","updated":"2022-07-26 15:41:23.000000000","message":"Done","commit_id":"26d0dd01cc276668447bff2d9292d69e7160c312"}]}
