)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"70b0a2bf1932a842bc8c2df2b20be8a45a3a463e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5e3e3c09_b68b8764","updated":"2023-10-20 07:13:36.000000000","message":"Welcome for your contribution. Please submit a spec for this feature.","commit_id":"08dc426c3528c9d18ecd3f5f13500aed9d1754c8"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"a1755e960a51f74901a6f181f4663a0dbd8e533f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"c379662b_a3d541f7","updated":"2023-10-23 09:15:34.000000000","message":"Sure, I\u0027ve just submitted a blueprint and a spec:\n\nhttps://blueprints.launchpad.net/watcher/+spec/maas-support\nhttps://review.opendev.org/c/openstack/watcher-specs/+/899026","commit_id":"e85da0ee2cad06a8e9129bb5eb7914e17c74344e"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"2bb5ca81f389a7e4ec80e31e5c472781e3ed5e69","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"332f0f86_c5dc5017","updated":"2023-11-14 06:25:54.000000000","message":"I will review it.","commit_id":"6deaf9df59574fc77d06710c29b004d32049feff"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"2bb702e61162ac6ab5f89ee6be5f31143f802ba7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1828c17f_9e228d8f","updated":"2023-10-26 10:20:14.000000000","message":"I\u0027ve added unit tests and fixed a few issues while at it. We have a problem though: one of MAAS\u0027s dependencies is incompatible with the Openstack upper constraints. Hopefully we\u0027ll get that patch merged soon.\n\nhttps://github.com/go-macaroon-bakery/py-macaroon-bakery/pull/90","commit_id":"6deaf9df59574fc77d06710c29b004d32049feff"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"07ccb60b2dda7e54bc09f15a02d801e42d281d35","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"fec34117_2b47ab00","updated":"2023-12-04 01:35:22.000000000","message":"If you have verified the scenario in a real environment, I hope you can provide detailed test data.","commit_id":"6deaf9df59574fc77d06710c29b004d32049feff"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d9298bb45bf161af4f10fff5b8a66efbd0d08b5e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"fdeaafda_b8877c23","updated":"2023-12-04 12:46:07.000000000","message":"Sure, here\u0027s a small demo.\n\nStep 1: Use the \"vm_workload_consolidation\" strategy first to rebalance the instances and disable unnecessary nova-compute services.\n\n```\n(openstack) ubuntu@maas:~$ openstack optimize actionplan show 507edec8-49e9-4d78-afa5-e55240333064\n+---------------------+-------------------------------------------------------------+\n| Field               | Value                                                       |\n+---------------------+-------------------------------------------------------------+\n| UUID                | 507edec8-49e9-4d78-afa5-e55240333064                        |\n| Created At          | 2023-12-04T10:18:30+00:00                                   |\n| Updated At          | 2023-12-04T10:22:37+00:00                                   |\n| Deleted At          | None                                                        |\n| Audit               | 5738222e-54b7-46c7-a220-a76eadba4a76                        |\n| Strategy            | vm_workload_consolidation                                   |\n| State               | SUCCEEDED                                                   |\n| Efficacy indicators | - Description: The total number of enabled compute nodes.   |\n|                     |   Name: compute_nodes_count                                 |\n|                     |   Unit: null                                                |\n|                     |   Value: 3.0                                                |\n|                     | - Description: The number of compute nodes to be released.  |\n|                     |   Name: released_compute_nodes_count                        |\n|                     |   Unit: null                                                |\n|                     |   Value: 2.0                                                |\n|                     | - Description: The number of VM migrations to be performed. |\n|                     |   Name: instance_migrations_count                           |\n|                     |   Unit: null                                                |\n|                     |   Value: 3.0                                                |\n|                     |                                                             |\n| Global efficacy     | Released_nodes_ratio: 66.67 %                               |\n|                     |                                                             |\n| Hostname            | juju-da2baa-1-lxd-29                                        |\n+---------------------+-------------------------------------------------------------+\n\n# Some Nova services should now be disabled by Watcher\n(openstack) ubuntu@maas:~$ nova service-list\n+--------------------------------------+----------------+---------------------+----------+----------+-------+----------------------------+------------------+-------------+\n| Id                                   | Binary         | Host                | Zone     | Status   | State | Updated_at                 | Disabled Reason  | Forced down |\n+--------------------------------------+----------------+---------------------+----------+----------+-------+----------------------------+------------------+-------------+\n| be22a6f0-cac7-423f-8b8f-86e5acff4e31 | nova-conductor | juju-da2baa-0-lxd-5 | internal | enabled  | up    | 2023-12-04T10:22:54.000000 | -                | False       |\n| ca4c7fe7-3942-4577-95fd-f619f5d5bdf6 | nova-scheduler | juju-da2baa-0-lxd-5 | internal | enabled  | up    | 2023-12-04T10:22:53.000000 | -                | False       |\n| c8c5dbea-5b1c-4a39-bee7-3fe450071797 | nova-compute   | compute3.maas       | nova     | enabled  | up    | 2023-12-04T10:22:55.000000 | -                | False       |\n| d6e41b72-cc8b-421a-9e51-0bfdabeeea34 | nova-compute   | compute1.maas       | nova     | disabled | up    | 2023-12-04T10:22:50.000000 | watcher_disabled | False       |\n| 73435e3f-36e0-4b82-a991-a46dfb732315 | nova-compute   | compute2.maas       | nova     | disabled | up    | 2023-12-04T10:22:55.000000 | watcher_disabled | False       |\n| bf2b8b7b-bc36-4e15-ba3e-a2668b39996b | nova-conductor | juju-da2baa-1-lxd-5 | internal | enabled  | up    | 2023-12-04T10:22:55.000000 | -                | False       |\n| 5305fd35-60e6-4161-a18b-cd593803c4ab | nova-scheduler | juju-da2baa-1-lxd-5 | internal | enabled  | up    | 2023-12-04T10:22:54.000000 | -                | False       |\n| ab3c6e56-4a6d-4217-adf8-f2aed35d3ea7 | nova-scheduler | juju-da2baa-2-lxd-5 | internal | enabled  | up    | 2023-12-04T10:22:52.000000 | -                | False       |\n| 36d6ce1d-2d59-4c35-8ce8-16562ebedb5d | nova-conductor | juju-da2baa-2-lxd-5 | internal | enabled  | up    | 2023-12-04T10:22:55.000000 | -                | False       |\n+--------------------------------------+----------------+---------------------+----------+----------+-------+----------------------------+------------------+-------------+\n```\n\nStep 2: Use the \"saving_energy\" strategy to power off unnecessary nodes\n\n```\n(openstack) ubuntu@maas:~$ openstack optimize audit create -a power-saving -p free_used_percent\u003d10.0 -p min_free_hosts_num\u003d0\n+---------------+------------------------------------------------------+\n| Field         | Value                                                |\n+---------------+------------------------------------------------------+\n| UUID          | cc463194-a825-411b-afc1-143e91b4673f                 |\n| Name          | saving_energy-2023-12-04T10:30:43.486602             |\n| Created At    | 2023-12-04T10:30:43.602195+00:00                     |\n| Updated At    | None                                                 |\n| Deleted At    | None                                                 |\n| State         | PENDING                                              |\n| Audit Type    | ONESHOT                                              |\n| Parameters    | {\u0027free_used_percent\u0027: 10.0, \u0027min_free_hosts_num\u0027: 0} |\n| Interval      | None                                                 |\n| Goal          | saving_energy                                        |\n| Strategy      | saving_energy                                        |\n| Audit Scope   | []                                                   |\n| Auto Trigger  | False                                                |\n| Next Run Time | None                                                 |\n| Hostname      | None                                                 |\n| Start Time    | None                                                 |\n| End Time      | None                                                 |\n| Force         | False                                                |\n+---------------+------------------------------------------------------+\n\n(openstack) ubuntu@maas:~$ openstack optimize actionplan start d3f9829a-9297-4c74-be6e-2005ead0a128\n+---------------------+--------------------------------------+\n| Field               | Value                                |\n+---------------------+--------------------------------------+\n| UUID                | d3f9829a-9297-4c74-be6e-2005ead0a128 |\n| Created At          | 2023-12-04T10:30:50+00:00            |\n| Updated At          | 2023-12-04T10:31:42+00:00            |\n| Deleted At          | None                                 |\n| Audit               | cc463194-a825-411b-afc1-143e91b4673f |\n| Strategy            | saving_energy                        |\n| State               | PENDING                              |\n| Efficacy indicators | []                                   |\n| Global efficacy     | []                                   |\n| Hostname            | None                                 |\n+---------------------+--------------------------------------+\n(openstack) ubuntu@maas:~$ openstack optimize actionplan show d3f9829a-9297-4c74-be6e-2005ead0a128\n+---------------------+--------------------------------------+\n| Field               | Value                                |\n+---------------------+--------------------------------------+\n| UUID                | d3f9829a-9297-4c74-be6e-2005ead0a128 |\n| Created At          | 2023-12-04T10:30:50+00:00            |\n| Updated At          | 2023-12-04T10:32:03+00:00            |\n| Deleted At          | None                                 |\n| Audit               | cc463194-a825-411b-afc1-143e91b4673f |\n| Strategy            | saving_energy                        |\n| State               | SUCCEEDED                            |\n| Efficacy indicators | []                                   |\n|                     |                                      |\n| Global efficacy     |                                      |\n| Hostname            | juju-da2baa-1-lxd-29                 |\n+---------------------+--------------------------------------+\n```\n\nStep 3: ensure that the compute nodes have been powered off.\n\n```\nroot@juju-da2baa-1-lxd-29:/var/log/watcher# grep \"power on\" watcher-decision-engine.log\n2023-12-04 10:30:50.063 2670101 INFO watcher.decision_engine.strategy.strategies.saving_energy [req-cd4f0355-6db7-44c3-92f6-e03e4f76f304 - - - - -] power off 76fs6a\n2023-12-04 10:30:50.065 2670101 INFO watcher.decision_engine.strategy.strategies.saving_energy [req-cd4f0355-6db7-44c3-92f6-e03e4f76f304 - - - - -] power off rh7ea6\nroot@juju-da2baa-1-lxd-29:/var/log/watcher# grep \"Powering off\" watcher-applier.log\n2023-12-04 10:31:47.986 2688784 INFO watcher.common.metal_helper.maas [-] Powering off MAAS node: compute2.maas 76fs6a\n2023-12-04 10:31:48.210 2688784 INFO watcher.common.metal_helper.maas [-] Powering off MAAS node: compute1.maas rh7ea6\n\n(openstack) ubuntu@maas:~$ nova service-list | grep nova-compute\n| c8c5dbea-5b1c-4a39-bee7-3fe450071797 | nova-compute   | compute3.maas       | nova     | enabled  | up    | 2023-12-04T10:36:45.000000 | -                | False       |\n| d6e41b72-cc8b-421a-9e51-0bfdabeeea34 | nova-compute   | compute1.maas       | nova     | disabled | down  | 2023-12-04T10:31:40.000000 | watcher_disabled | False       |\n| 73435e3f-36e0-4b82-a991-a46dfb732315 | nova-compute   | compute2.maas       | nova     | disabled | down  | 2023-12-04T10:31:45.000000 | watcher_disabled | False       |\n\n(openstack) ubuntu@maas:~$ juju machines | grep compute\n12       down     10.8.11.26   compute1             jammy   default  Deployed\n13       down     10.8.11.27   compute2             jammy   default  Deployed\n14       started  10.8.11.28   compute3             jammy   default  Deployed\n```\n\nStep 4: run the \"saving_energy\" strategy again, increasing the \"min_free_hosts_num\" count, forcing the nodes to be powered back on\n\n```\n(openstack) ubuntu@maas:~$ openstack optimize audit create -a power-saving -p min_free_hosts_num\u003d3\n+---------------+------------------------------------------------------+\n| Field         | Value                                                |\n+---------------+------------------------------------------------------+\n| UUID          | be227edd-640b-43c2-9b59-35728173ca0b                 |\n| Name          | saving_energy-2023-12-04T11:15:19.069537             |\n| Created At    | 2023-12-04T11:15:19.144973+00:00                     |\n| Updated At    | None                                                 |\n| Deleted At    | None                                                 |\n| State         | PENDING                                              |\n| Audit Type    | ONESHOT                                              |\n| Parameters    | {\u0027min_free_hosts_num\u0027: 3, \u0027free_used_percent\u0027: 10.0} |\n| Interval      | None                                                 |\n| Goal          | saving_energy                                        |\n| Strategy      | saving_energy                                        |\n| Audit Scope   | []                                                   |\n| Auto Trigger  | False                                                |\n| Next Run Time | None                                                 |\n| Hostname      | None                                                 |\n| Start Time    | None                                                 |\n| End Time      | None                                                 |\n| Force         | False                                                |\n+---------------+------------------------------------------------------+\n\nroot@juju-da2baa-1-lxd-29:/var/log/watcher# grep \"power on\" watcher-decision-engine.log\n2023-12-04 11:18:25.284 2709561 INFO watcher.decision_engine.strategy.strategies.saving_energy [req-246e2399-96c0-4f76-a01a-a91fd7ab2f8f - - - - -] power on rh7ea6\n2023-12-04 11:18:25.285 2709561 INFO watcher.decision_engine.strategy.strategies.saving_energy [req-246e2399-96c0-4f76-a01a-a91fd7ab2f8f - - - - -] power on 76fs6a\n\n(openstack) ubuntu@maas:~$ openstack optimize actionplan start 12ceb8e2-522b-4ff7-9047-bb77839cb1fd\n+---------------------+--------------------------------------+\n| Field               | Value                                |\n+---------------------+--------------------------------------+\n| UUID                | 12ceb8e2-522b-4ff7-9047-bb77839cb1fd |\n| Created At          | 2023-12-04T12:25:46+00:00            |\n| Updated At          | 2023-12-04T12:26:37+00:00            |\n| Deleted At          | None                                 |\n| Audit               | a2ed9e05-d66f-4a1d-ab18-493929db1964 |\n| Strategy            | saving_energy                        |\n| State               | PENDING                              |\n| Efficacy indicators | []                                   |\n| Global efficacy     | []                                   |\n| Hostname            | None                                 |\n+---------------------+--------------------------------------+\n```\n\nStep 5: Ensure that the nodes are running again\n\n```\nroot@juju-da2baa-1-lxd-29:/var/log/watcher# grep \"Powering on\" watcher-applier.log\n2023-12-04 12:26:43.388 2741476 INFO watcher.common.metal_helper.maas [-] Powering on MAAS node: compute2.maas 76fs6a\n2023-12-04 12:26:43.617 2741476 INFO watcher.common.metal_helper.maas [-] Powering on MAAS node: compute1.maas rh7ea6\n\n(openstack) ubuntu@maas:~$ juju machines | grep compute\n12        started  10.8.11.26   compute1              jammy   default  Deployed\n13        started  10.8.11.27   compute2              jammy   default  Deployed\n14        started  10.8.11.28   compute3              jammy   default  Deployed\n```\n\nThe above environment was deployed using Juju + MAAS, instead of Ironic. In order for Watcher to be able to issue MAAS requests, the following lines have been added to watcher.conf:\n\n```\n[maas_client]\nurl \u003d http://a.b.c.d:5240/MAAS\napi_key \u003d x:y:z\n```","commit_id":"6deaf9df59574fc77d06710c29b004d32049feff"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"1e6f9702ba5c8832dc2caa89573808b88308119c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"34f0dbd5_5b51f9fc","in_reply_to":"fdeaafda_b8877c23","updated":"2023-12-05 07:49:45.000000000","message":"Thanks","commit_id":"6deaf9df59574fc77d06710c29b004d32049feff"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"d9298bb45bf161af4f10fff5b8a66efbd0d08b5e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"438f0828_4ee939f4","in_reply_to":"fec34117_2b47ab00","updated":"2023-12-04 12:46:07.000000000","message":"das","commit_id":"6deaf9df59574fc77d06710c29b004d32049feff"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"eb7d72193f4a7cc2fbdcba5e7a62a1a134728b45","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"7929ecfe_12715118","updated":"2023-12-08 09:20:39.000000000","message":"There\u0027s one last step: we\u0027ll need the python-libmaas requirement to be added to global-requirements.txt: https://review.opendev.org/c/openstack/requirements/+/903134.","commit_id":"191ade104948b1b59fd881d9288ae4dcdf2f0b20"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"3b7b45c70be7a615bd5f703be92a0bfeea52646b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"a3b24267_80b96200","updated":"2024-01-09 08:37:49.000000000","message":"@chenker Hi, please let me know if you have any further questions about this patch. I was hoping we could merge it soon so that the Juju charms can be updated as well.\n\nhttps://review.opendev.org/c/openstack/charm-watcher/+/901445","commit_id":"c95ce4ec17aa7844f64e97d67cf66c017d656c47"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"a0a3d31ffa27e8ac1ee2b7ac858b0354a47c2b72","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"c00836ce_bd9de049","updated":"2023-12-18 08:46:27.000000000","message":"@chenker I think this change is ready to merge, please let me know what you think.","commit_id":"c95ce4ec17aa7844f64e97d67cf66c017d656c47"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"e46521d004e6770cf80abca31a5635ee4bebd7bc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"0769bfd4_22fb05a4","updated":"2023-12-18 09:14:21.000000000","message":"I will review it recently. If Ok, let\u0027s merge it.","commit_id":"c95ce4ec17aa7844f64e97d67cf66c017d656c47"},{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"ae1a931ee7103e8c35484bde56ecdf69e419fcd6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"ed00c6f6_7a21827c","in_reply_to":"c00836ce_bd9de049","updated":"2023-12-18 09:12:04.000000000","message":"Sorry, I am very busy now.","commit_id":"c95ce4ec17aa7844f64e97d67cf66c017d656c47"}],"watcher/common/metal_client/ironic.py":[{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"a1755e960a51f74901a6f181f4663a0dbd8e533f","unresolved":true,"context_lines":[{"line_number":51,"context_line":"        self._ironic_client.node.set_power_state(self.get_id(), \"off\")"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class IronicClient(base.BaseMetalClient):"},{"line_number":55,"context_line":"    @property"},{"line_number":56,"context_line":"    def _client(self):"},{"line_number":57,"context_line":"        if not getattr(self, \"_cached_client\", None):"}],"source_content_type":"text/x-python","patch_set":2,"id":"986dcc19_521348a0","line":54,"updated":"2023-10-23 09:15:34.000000000","message":"Please let me know if you prefer some other naming. Having a \"client\" that wraps another \"client\" may be less than ideal, we might call it \"driver\" or \"handler\".","commit_id":"e85da0ee2cad06a8e9129bb5eb7914e17c74344e"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"2bb702e61162ac6ab5f89ee6be5f31143f802ba7","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        self._ironic_client.node.set_power_state(self.get_id(), \"off\")"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class IronicClient(base.BaseMetalClient):"},{"line_number":55,"context_line":"    @property"},{"line_number":56,"context_line":"    def _client(self):"},{"line_number":57,"context_line":"        if not getattr(self, \"_cached_client\", None):"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf758724_bc6ca651","line":54,"in_reply_to":"2cddb2fd_909f69d5","updated":"2023-10-26 10:20:14.000000000","message":"Done","commit_id":"e85da0ee2cad06a8e9129bb5eb7914e17c74344e"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"317359897c84b556c3dbcfd002805e599a34aa14","unresolved":true,"context_lines":[{"line_number":51,"context_line":"        self._ironic_client.node.set_power_state(self.get_id(), \"off\")"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class IronicClient(base.BaseMetalClient):"},{"line_number":55,"context_line":"    @property"},{"line_number":56,"context_line":"    def _client(self):"},{"line_number":57,"context_line":"        if not getattr(self, \"_cached_client\", None):"}],"source_content_type":"text/x-python","patch_set":2,"id":"2cddb2fd_909f69d5","line":54,"in_reply_to":"986dcc19_521348a0","updated":"2023-10-24 11:23:51.000000000","message":"I think I\u0027ll just go with \"metal_helper\" and stay consistent with the other modules.","commit_id":"e85da0ee2cad06a8e9129bb5eb7914e17c74344e"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"317359897c84b556c3dbcfd002805e599a34aa14","unresolved":true,"context_lines":[{"line_number":58,"context_line":"            self._cached_client \u003d self._osc.ironic()"},{"line_number":59,"context_line":"        return self._cached_client"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def list_compute_nodes(self):"},{"line_number":62,"context_line":"        out_list \u003d []"},{"line_number":63,"context_line":"        node_list \u003d self._client.node.list()"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"a8e7d45e_9863ba9c","line":61,"updated":"2023-10-24 11:23:51.000000000","message":"For what is worth, I did consider making this generic, returning all nodes and not just compute nodes.\n\nHowever, I think Watcher is only interested in compute nodes anyway, so it\u0027s probably better to keep it simple.","commit_id":"e85da0ee2cad06a8e9129bb5eb7914e17c74344e"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"2bb702e61162ac6ab5f89ee6be5f31143f802ba7","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            self._cached_client \u003d self._osc.ironic()"},{"line_number":59,"context_line":"        return self._cached_client"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def list_compute_nodes(self):"},{"line_number":62,"context_line":"        out_list \u003d []"},{"line_number":63,"context_line":"        node_list \u003d self._client.node.list()"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"d97195db_1c8e8f1c","line":61,"in_reply_to":"a8e7d45e_9863ba9c","updated":"2023-10-26 10:20:14.000000000","message":"Done","commit_id":"e85da0ee2cad06a8e9129bb5eb7914e17c74344e"}],"watcher/common/metal_helper/constants.py":[{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"9af754e5a4eb3c812c8b318e9d9284c29a07d817","unresolved":true,"context_lines":[{"line_number":16,"context_line":"import enum"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class PowerState(str, enum.Enum):"},{"line_number":20,"context_line":"    ON \u003d \"on\""},{"line_number":21,"context_line":"    OFF \u003d \"off\""},{"line_number":22,"context_line":"    UNKNOWN \u003d \"unknown\""},{"line_number":23,"context_line":"    ERROR \u003d \"error\""}],"source_content_type":"text/x-python","patch_set":8,"id":"b7ab7164_95472327","line":23,"range":{"start_line":19,"start_character":0,"end_line":23,"end_character":19},"updated":"2023-12-20 03:54:29.000000000","message":"this part code show abstract to all common","commit_id":"c95ce4ec17aa7844f64e97d67cf66c017d656c47"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"2fe708ec48b625735e7ababdae1f8c60c9e641ca","unresolved":true,"context_lines":[{"line_number":16,"context_line":"import enum"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class PowerState(str, enum.Enum):"},{"line_number":20,"context_line":"    ON \u003d \"on\""},{"line_number":21,"context_line":"    OFF \u003d \"off\""},{"line_number":22,"context_line":"    UNKNOWN \u003d \"unknown\""},{"line_number":23,"context_line":"    ERROR \u003d \"error\""}],"source_content_type":"text/x-python","patch_set":8,"id":"6e2c6dd8_3d8ad24e","line":23,"range":{"start_line":19,"start_character":0,"end_line":23,"end_character":19},"in_reply_to":"b7ab7164_95472327","updated":"2023-12-20 07:45:32.000000000","message":"Yes, this power state enum is backend agnostic, it can be used for both Ironic and MAAS.","commit_id":"c95ce4ec17aa7844f64e97d67cf66c017d656c47"}],"watcher/decision_engine/model/collector/ironic.py":[{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"9af754e5a4eb3c812c8b318e9d9284c29a07d817","unresolved":true,"context_lines":[{"line_number":81,"context_line":"    def __init__(self, osc):"},{"line_number":82,"context_line":"        self.osc \u003d osc"},{"line_number":83,"context_line":"        self.model \u003d model_root.BaremetalModelRoot()"},{"line_number":84,"context_line":"        # TODO(lpetrut): add MAAS support"},{"line_number":85,"context_line":"        self.ironic_helper \u003d ironic_helper.IronicHelper(osc\u003dself.osc)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def add_ironic_node(self, node):"}],"source_content_type":"text/x-python","patch_set":8,"id":"89050cd9_1f65d84d","line":84,"range":{"start_line":84,"start_character":34,"end_line":84,"end_character":41},"updated":"2023-12-20 03:54:29.000000000","message":"got it.","commit_id":"c95ce4ec17aa7844f64e97d67cf66c017d656c47"}],"watcher/decision_engine/strategy/strategies/saving_energy.py":[{"author":{"_account_id":28748,"name":"chenker","email":"chen.ke14@zte.com.cn","username":"chenke"},"change_message_id":"9af754e5a4eb3c812c8b318e9d9284c29a07d817","unresolved":true,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        \"\"\""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        node_list \u003d self.metal_helper.list_compute_nodes()"},{"line_number":168,"context_line":"        for node in node_list:"},{"line_number":169,"context_line":"            hypervisor_node \u003d node.get_hypervisor_node().to_dict()"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"347ce356_a2630d80","line":167,"range":{"start_line":167,"start_character":25,"end_line":167,"end_character":37},"updated":"2023-12-20 03:54:29.000000000","message":"How do we differentiate between bare metal and older compute nodes?","commit_id":"c95ce4ec17aa7844f64e97d67cf66c017d656c47"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"2fe708ec48b625735e7ababdae1f8c60c9e641ca","unresolved":true,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        \"\"\""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        node_list \u003d self.metal_helper.list_compute_nodes()"},{"line_number":168,"context_line":"        for node in node_list:"},{"line_number":169,"context_line":"            hypervisor_node \u003d node.get_hypervisor_node().to_dict()"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"979abba0_685582df","line":167,"range":{"start_line":167,"start_character":25,"end_line":167,"end_character":37},"in_reply_to":"347ce356_a2630d80","updated":"2023-12-20 07:45:32.000000000","message":"The \"list_compute_nodes\" method skips metal nodes that do not have a corresponding Nova hypervisor:\n\nhttps://review.opendev.org/c/openstack/watcher/+/898790/8/watcher/common/metal_helper/ironic.py#80\nhttps://review.opendev.org/c/openstack/watcher/+/898790/8/watcher/common/metal_helper/maas.py#106","commit_id":"c95ce4ec17aa7844f64e97d67cf66c017d656c47"}]}
