)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":33487,"name":"João Victor Portal","display_name":"J. Portal","email":"Joao.VictorPortal@windriver.com","username":"jvportal"},"change_message_id":"cdfb82a1bb980dffb9aaae25a350ed15d3ec9a16","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"2949e35b_8735677f","updated":"2022-10-21 00:48:19.000000000","message":"Ready for review.\n\nAs the error messages are difficult to read in the commit message, it\u0027s written below the log of the commands before and after the changes.\n\n\nBefore:\n\nsysadmin@controller-0:~$ dcmanager subcloud manage subcloud1\nb\u0027\u003chtml\u003e\\n \u003chead\u003e\\n  \u003ctitle\u003e403 Forbidden\u003c/title\u003e\\n \u003c/head\u003e\\n \u003cbody\u003e\\n  \u003ch1\u003e403 Forbidden\u003c/h1\u003e\\n  Access was denied to this resource.\u003cbr /\u003e\u003cbr /\u003e\\n\\n\\n\\n \u003c/body\u003e\\n\u003c/html\u003e\u0027\nERROR (app) Unable to manage subcloud subcloud1\n\nsysadmin@controller-0:~$ dcmanager subcloud-group add --name test\nERROR (app) b\u0027\u003chtml\u003e\\n \u003chead\u003e\\n  \u003ctitle\u003e403 Forbidden\u003c/title\u003e\\n \u003c/head\u003e\\n \u003cbody\u003e\\n  \u003ch1\u003e403 Forbidden\u003c/h1\u003e\\n  Access was denied to this resource.\u003cbr /\u003e\u003cbr /\u003e\\n\\n\\n\\n \u003c/body\u003e\\n\u003c/html\u003e\u0027\n\nsysadmin@controller-0:~$ dcmanager subcloud reconfig --deploy-config file001 subcloud1\nEnter the sysadmin password for the subcloud: \nRe-enter sysadmin password to confirm: \nERROR (app) Unable to reconfigure subcloud subcloud1\n\n\nAfter:\n\nsysadmin@controller-0:~$ dcmanager subcloud manage subcloud1\nAccess was denied to this resource.\nERROR (app) Unable to manage subcloud subcloud1\n\nsysadmin@controller-0:~$ dcmanager subcloud-group add --name test\nERROR (app) Access was denied to this resource.\n\nsysadmin@controller-0:~$ dcmanager subcloud reconfig --deploy-config file001 subcloud1\nEnter the sysadmin password for the subcloud: \nRe-enter sysadmin password to confirm: \nAccess was denied to this resource.\nERROR (app) Unable to reconfigure subcloud subcloud1","commit_id":"e0d8e1fcc686439ec81a75de933121f309f879ab"}],"distributedcloud-client/dcmanagerclient/api/base.py":[{"author":{"_account_id":33549,"name":"Kyle MacLeod","email":"Kyle.MacLeod@windriver.com","username":"kmacleod"},"change_message_id":"0ed68d47df921b99decfdf5f31d19aa85c135cf9","unresolved":true,"context_lines":[{"line_number":136,"context_line":"            line_list \u003d soup.body.get_text().lstrip().rstrip().split(\u0027\\n\u0027)[1:]"},{"line_number":137,"context_line":"            error_msg \u003d line_list[0].lstrip().rstrip()"},{"line_number":138,"context_line":"            for line in line_list[1:]:"},{"line_number":139,"context_line":"                error_msg +\u003d \u0027 \u0027 + line.lstrip().rstrip()"},{"line_number":140,"context_line":"        except Exception:"},{"line_number":141,"context_line":"            error_msg \u003d resp.content"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"73693501_e744edc3","line":139,"range":{"start_line":139,"start_character":29,"end_line":139,"end_character":32},"updated":"2022-10-24 21:49:50.000000000","message":"Do we need to handle adding a \u0027\\n\u0027 if line_list[1:] is multiple entries?","commit_id":"e0d8e1fcc686439ec81a75de933121f309f879ab"},{"author":{"_account_id":28486,"name":"Tee Ngo","email":"tee.ngo@windriver.com","username":"teewrs"},"change_message_id":"3d106ce399862650ea2a5083f3cfe1cfb353916b","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            line_list \u003d soup.body.get_text().lstrip().rstrip().split(\u0027\\n\u0027)[1:]"},{"line_number":137,"context_line":"            error_msg \u003d line_list[0].lstrip().rstrip()"},{"line_number":138,"context_line":"            for line in line_list[1:]:"},{"line_number":139,"context_line":"                error_msg +\u003d \u0027 \u0027 + line.lstrip().rstrip()"},{"line_number":140,"context_line":"        except Exception:"},{"line_number":141,"context_line":"            error_msg \u003d resp.content"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ebb109de_63eb8e64","line":139,"range":{"start_line":139,"start_character":29,"end_line":139,"end_character":32},"in_reply_to":"45b0c8b1_1dcec644","updated":"2022-10-25 14:53:53.000000000","message":"Can you show a sample output before and after the change?","commit_id":"e0d8e1fcc686439ec81a75de933121f309f879ab"},{"author":{"_account_id":33487,"name":"João Victor Portal","display_name":"J. Portal","email":"Joao.VictorPortal@windriver.com","username":"jvportal"},"change_message_id":"9a17930dbf4fd5aca6927dc478d414f6863d67fa","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            line_list \u003d soup.body.get_text().lstrip().rstrip().split(\u0027\\n\u0027)[1:]"},{"line_number":137,"context_line":"            error_msg \u003d line_list[0].lstrip().rstrip()"},{"line_number":138,"context_line":"            for line in line_list[1:]:"},{"line_number":139,"context_line":"                error_msg +\u003d \u0027 \u0027 + line.lstrip().rstrip()"},{"line_number":140,"context_line":"        except Exception:"},{"line_number":141,"context_line":"            error_msg \u003d resp.content"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"45b0c8b1_1dcec644","line":139,"range":{"start_line":139,"start_character":29,"end_line":139,"end_character":32},"in_reply_to":"73693501_e744edc3","updated":"2022-10-25 13:18:00.000000000","message":"This space is added to print multiple lines in a single line.","commit_id":"e0d8e1fcc686439ec81a75de933121f309f879ab"},{"author":{"_account_id":33487,"name":"João Victor Portal","display_name":"J. Portal","email":"Joao.VictorPortal@windriver.com","username":"jvportal"},"change_message_id":"1ea02a161d5460e3b4d93d7c4fceb606707f1827","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            line_list \u003d soup.body.get_text().lstrip().rstrip().split(\u0027\\n\u0027)[1:]"},{"line_number":137,"context_line":"            error_msg \u003d line_list[0].lstrip().rstrip()"},{"line_number":138,"context_line":"            for line in line_list[1:]:"},{"line_number":139,"context_line":"                error_msg +\u003d \u0027 \u0027 + line.lstrip().rstrip()"},{"line_number":140,"context_line":"        except Exception:"},{"line_number":141,"context_line":"            error_msg \u003d resp.content"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"870d4f15_621d946e","line":139,"range":{"start_line":139,"start_character":29,"end_line":139,"end_character":32},"in_reply_to":"ebb109de_63eb8e64","updated":"2022-10-25 15:11:26.000000000","message":"Examples are presented in this comment: https://review.opendev.org/c/starlingx/distcloud-client/+/862195/comments/2949e35b_8735677f .","commit_id":"e0d8e1fcc686439ec81a75de933121f309f879ab"}],"distributedcloud-client/dcmanagerclient/commands/v1/subcloud_manager.py":[{"author":{"_account_id":28486,"name":"Tee Ngo","email":"tee.ngo@windriver.com","username":"teewrs"},"change_message_id":"3d106ce399862650ea2a5083f3cfe1cfb353916b","unresolved":true,"context_lines":[{"line_number":544,"context_line":"            return dcmanager_client.subcloud_manager.reconfigure_subcloud("},{"line_number":545,"context_line":"                subcloud_ref\u003dsubcloud_ref, files\u003dfiles, data\u003ddata)"},{"line_number":546,"context_line":"        except Exception as e:"},{"line_number":547,"context_line":"            print(e)"},{"line_number":548,"context_line":"            error_msg \u003d \"Unable to reconfigure subcloud %s\" % (subcloud_ref)"},{"line_number":549,"context_line":"            raise exceptions.DCManagerClientException(error_msg)"},{"line_number":550,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"29e75a8f_7bccaf0b","line":547,"range":{"start_line":547,"start_character":12,"end_line":547,"end_character":19},"updated":"2022-10-25 14:53:53.000000000","message":"Please remove. The users should not see the stack trace","commit_id":"e0d8e1fcc686439ec81a75de933121f309f879ab"},{"author":{"_account_id":33487,"name":"João Victor Portal","display_name":"J. Portal","email":"Joao.VictorPortal@windriver.com","username":"jvportal"},"change_message_id":"1ea02a161d5460e3b4d93d7c4fceb606707f1827","unresolved":false,"context_lines":[{"line_number":544,"context_line":"            return dcmanager_client.subcloud_manager.reconfigure_subcloud("},{"line_number":545,"context_line":"                subcloud_ref\u003dsubcloud_ref, files\u003dfiles, data\u003ddata)"},{"line_number":546,"context_line":"        except Exception as e:"},{"line_number":547,"context_line":"            print(e)"},{"line_number":548,"context_line":"            error_msg \u003d \"Unable to reconfigure subcloud %s\" % (subcloud_ref)"},{"line_number":549,"context_line":"            raise exceptions.DCManagerClientException(error_msg)"},{"line_number":550,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"f9c49985_4ba125fd","line":547,"range":{"start_line":547,"start_character":12,"end_line":547,"end_character":19},"in_reply_to":"29e75a8f_7bccaf0b","updated":"2022-10-25 15:11:26.000000000","message":"This print just shows the error message, it doesn\u0027t show the stack trace. In the log shown below, the \"print(e)\" causes the message \"Access was denied to this resource.\" to be printed (the user doesn\u0027t have the needed privileges, so the access was denied).\n\nsysadmin@controller-0:~$ dcmanager subcloud reconfig --deploy-config file001 subcloud1\nEnter the sysadmin password for the subcloud: \nRe-enter sysadmin password to confirm: \nAccess was denied to this resource.\nERROR (app) Unable to reconfigure subcloud subcloud1\n\nThis \"print(e)\" is found in other implementations of methods \"_get_resources\". For example, see lines 359, 399, 485, 628, 715 and 772 in this file.","commit_id":"e0d8e1fcc686439ec81a75de933121f309f879ab"},{"author":{"_account_id":28486,"name":"Tee Ngo","email":"tee.ngo@windriver.com","username":"teewrs"},"change_message_id":"ab1011f3e98f58f64416776513813b77f6183310","unresolved":false,"context_lines":[{"line_number":544,"context_line":"            return dcmanager_client.subcloud_manager.reconfigure_subcloud("},{"line_number":545,"context_line":"                subcloud_ref\u003dsubcloud_ref, files\u003dfiles, data\u003ddata)"},{"line_number":546,"context_line":"        except Exception as e:"},{"line_number":547,"context_line":"            print(e)"},{"line_number":548,"context_line":"            error_msg \u003d \"Unable to reconfigure subcloud %s\" % (subcloud_ref)"},{"line_number":549,"context_line":"            raise exceptions.DCManagerClientException(error_msg)"},{"line_number":550,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"506d73d2_993d451e","line":547,"range":{"start_line":547,"start_character":12,"end_line":547,"end_character":19},"in_reply_to":"f9c49985_4ba125fd","updated":"2022-10-25 15:15:59.000000000","message":"missed that, thx","commit_id":"e0d8e1fcc686439ec81a75de933121f309f879ab"}]}
