)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9649,"name":"Adrian Vladu","email":"avladu@cloudbasesolutions.com","username":"avladu"},"change_message_id":"bfe296bd48bf73fc71fd037933f58ac789fe9475","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9ca01284_7f536cee","updated":"2024-08-12 09:01:22.000000000","message":"Hello, in the unit tests, you need to patch sleep, otherwise the unit tests will take way longer to run. usually, a tox unit test run should take less than or close to 3 minutes.","commit_id":"a76c1efecbc006eb2fd766a8ebe4ff9e1813312b"},{"author":{"_account_id":9649,"name":"Adrian Vladu","email":"avladu@cloudbasesolutions.com","username":"avladu"},"change_message_id":"15fe9450a6dc362a494a9fea6befd4d08a7b89b2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"6a2de314_21072720","updated":"2024-10-02 12:39:11.000000000","message":"recheck","commit_id":"8f43e774333d6c564185624d7b7a078a0306749f"},{"author":{"_account_id":9649,"name":"Adrian Vladu","email":"avladu@cloudbasesolutions.com","username":"avladu"},"change_message_id":"dbc894774c0c38b363d6466a4a08714aee46a6c9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"c905e1f2_b2df1f18","updated":"2024-10-09 11:34:47.000000000","message":"recheck","commit_id":"8f43e774333d6c564185624d7b7a078a0306749f"}],"cloudbaseinit/osutils/windows.py":[{"author":{"_account_id":9649,"name":"Adrian Vladu","email":"avladu@cloudbasesolutions.com","username":"avladu"},"change_message_id":"17aa0c3a8b636b56a5c0ddab877d635b9ae852e6","unresolved":true,"context_lines":[{"line_number":855,"context_line":"                    \u0027Setting MTU for interface \"%(name)s\" with \u0027"},{"line_number":856,"context_line":"                    \u0027value \"%(mtu)s\" failed\u0027 % {\u0027name\u0027: name, \u0027mtu\u0027: mtu})"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"    def rename_network_adapter(self, old_name, new_name):"},{"line_number":859,"context_line":"        try:"},{"line_number":860,"context_line":"            net_adapter \u003d self._get_network_msft_adapter(old_name)"},{"line_number":861,"context_line":"            net_adapter.rename(new_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"4423194d_2cc9b758","line":858,"updated":"2024-07-30 07:36:56.000000000","message":"hello, I would first try to add a retry decorator (we have been using those decorators for the netlbfo bonds).","commit_id":"8b32dc71d7c832ee312151db57a32984789cd700"},{"author":{"_account_id":9649,"name":"Adrian Vladu","email":"avladu@cloudbasesolutions.com","username":"avladu"},"change_message_id":"2846550e3e9a5023dc96e91dae39ba1b8117d442","unresolved":true,"context_lines":[{"line_number":859,"context_line":"        try:"},{"line_number":860,"context_line":"            net_adapter \u003d self._get_network_msft_adapter(old_name)"},{"line_number":861,"context_line":"            net_adapter.rename(new_name)"},{"line_number":862,"context_line":"            self._get_network_msft_adapter(new_name)"},{"line_number":863,"context_line":"        except Exception as ex:"},{"line_number":864,"context_line":"            LOG.warning(\u0027Renaming interface \"%(old_name)s\" to \"%(new_name)s\" \u0027"},{"line_number":865,"context_line":"                        \u0027via WMI failed: %(err)s\u0027 %"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ac82c3d_9818b30c","line":862,"updated":"2024-07-30 07:39:36.000000000","message":"There is no need for the indentation of the code bellow if you circuit break here, of course.","commit_id":"8b32dc71d7c832ee312151db57a32984789cd700"},{"author":{"_account_id":9649,"name":"Adrian Vladu","email":"avladu@cloudbasesolutions.com","username":"avladu"},"change_message_id":"17aa0c3a8b636b56a5c0ddab877d635b9ae852e6","unresolved":true,"context_lines":[{"line_number":867,"context_line":"                         \u0027new_name\u0027: new_name,"},{"line_number":868,"context_line":"                         \u0027err\u0027: ex})"},{"line_number":869,"context_line":""},{"line_number":870,"context_line":"            base_dir \u003d self._get_system_dir()"},{"line_number":871,"context_line":"            netsh_path \u003d os.path.join(base_dir, \u0027netsh.exe\u0027)"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"            args \u003d [netsh_path, \"interface\", \"set\", \"interface\","}],"source_content_type":"text/x-python","patch_set":1,"id":"2608d3e4_3151429f","line":870,"updated":"2024-07-30 07:36:56.000000000","message":"indentation is not needed for the code bellow.","commit_id":"8b32dc71d7c832ee312151db57a32984789cd700"},{"author":{"_account_id":9649,"name":"Adrian Vladu","email":"avladu@cloudbasesolutions.com","username":"avladu"},"change_message_id":"17aa0c3a8b636b56a5c0ddab877d635b9ae852e6","unresolved":true,"context_lines":[{"line_number":871,"context_line":"            netsh_path \u003d os.path.join(base_dir, \u0027netsh.exe\u0027)"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"            args \u003d [netsh_path, \"interface\", \"set\", \"interface\","},{"line_number":874,"context_line":"                    \u0027name\u003d%s\u0027 % old_name, \u0027newname\u003d%s\u0027 % new_name]"},{"line_number":875,"context_line":"            (_, err, ret_val) \u003d self.execute_process(args, shell\u003dFalse)"},{"line_number":876,"context_line":"            if ret_val:"},{"line_number":877,"context_line":"                raise exception.CloudbaseInitException("}],"source_content_type":"text/x-python","patch_set":1,"id":"34920ec2_e8f7990d","line":874,"updated":"2024-07-30 07:36:56.000000000","message":"in case that the netif has names with spaces, it would be to needed to have a string wrapped name using double quotes?","commit_id":"8b32dc71d7c832ee312151db57a32984789cd700"},{"author":{"_account_id":9649,"name":"Adrian Vladu","email":"avladu@cloudbasesolutions.com","username":"avladu"},"change_message_id":"17aa0c3a8b636b56a5c0ddab877d635b9ae852e6","unresolved":true,"context_lines":[{"line_number":895,"context_line":"            # An adapter with new name could not be found"},{"line_number":896,"context_line":"            # as winserver 2022 may not accept the change."},{"line_number":897,"context_line":"            # use \u0027Rename-NetAdapter\u0027 to rename the adapter"},{"line_number":898,"context_line":"            cmd \u003d [\u0027Rename-NetAdapter\u0027, \u0027-Name\u0027, \u0027\"\u0027 + old_name + \u0027\"\u0027,"},{"line_number":899,"context_line":"                   \u0027-NewName\u0027, \u0027\"\u0027 + new_name + \u0027\"\u0027]"},{"line_number":900,"context_line":"            (_, _, ret_val) \u003d self.execute_powershell_command(\u0027 \u0027.join(cmd))"},{"line_number":901,"context_line":"            if ret_val:"}],"source_content_type":"text/x-python","patch_set":1,"id":"05c50b60_e1949a65","line":898,"updated":"2024-07-30 07:36:56.000000000","message":"Rename-NetAdapter uses the same WMI API, so if it breaks above, it will most likely break here.\n\nOverall, I suggest adding the retry decorator and the old netsh as a fallback, and remove the powershell part.","commit_id":"8b32dc71d7c832ee312151db57a32984789cd700"},{"author":{"_account_id":8543,"name":"Lucian Petrut","email":"lpetrut@cloudbasesolutions.com","username":"plucian"},"change_message_id":"fe6efccff87ecfe6641fb96bdf0765d37f2a497c","unresolved":true,"context_lines":[{"line_number":861,"context_line":"        exceptions\u003dexception.CloudbaseInitException)"},{"line_number":862,"context_line":"    def rename_network_adapter(self, old_name, new_name):"},{"line_number":863,"context_line":"        try:"},{"line_number":864,"context_line":"            LOG.info(\u0027Renaming interface \"%(old_name)s\" to \"%(new_name)s\"...\u0027 %"},{"line_number":865,"context_line":"                     {\u0027old_name\u0027: old_name,"},{"line_number":866,"context_line":"                      \u0027new_name\u0027: new_name})"},{"line_number":867,"context_line":"            net_adapter \u003d self._get_network_msft_adapter(old_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"0366569d_719a9493","line":864,"updated":"2024-08-21 07:18:24.000000000","message":"Very minor nit: we usually avoid formatting log messages here, you can replace \"%\" with \",\". The idea is that log messages may not be printed due to the configured log level, in which case we can skip formatting them altogether, saving some time.","commit_id":"8f43e774333d6c564185624d7b7a078a0306749f"}]}
