)]}'
{"os_brick/encryptors/luks.py":[{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"ee683ed96c1be006e2586e85eae112f87286eda6","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    try:"},{"line_number":33,"context_line":"        # check to see if the device uses LUKS: exit status is 0"},{"line_number":34,"context_line":"        # if the device is a LUKS partition and non-zero if not"},{"line_number":35,"context_line":"        priv_rootwrap.execute(\u0027cryptsetup\u0027, \u0027isLuks\u0027, \u0027--verbose\u0027, device,"},{"line_number":36,"context_line":"                              run_as_root\u003dTrue, root_helper\u003droot_helper,"},{"line_number":37,"context_line":"                              check_exit_code\u003dTrue)"},{"line_number":38,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_ba4f7f90","line":35,"updated":"2016-06-02 03:25:04.000000000","message":"Why isn\u0027t this being done through `self._execute` ?","commit_id":"8d955d14e9312ce32fb425c16d8b5aa96196b4c5"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"4f44d43ebac9730bb3528698922442b2470ce0cf","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    try:"},{"line_number":33,"context_line":"        # check to see if the device uses LUKS: exit status is 0"},{"line_number":34,"context_line":"        # if the device is a LUKS partition and non-zero if not"},{"line_number":35,"context_line":"        priv_rootwrap.execute(\u0027cryptsetup\u0027, \u0027isLuks\u0027, \u0027--verbose\u0027, device,"},{"line_number":36,"context_line":"                              run_as_root\u003dTrue, root_helper\u003droot_helper,"},{"line_number":37,"context_line":"                              check_exit_code\u003dTrue)"},{"line_number":38,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_bb3e37b6","line":35,"in_reply_to":"7aa08908_18f311a0","updated":"2016-06-06 08:50:09.000000000","message":"That looks like it will pick up the os_brick executor dependency injection, yes.\n\nWhen might `execute` param be None?  I\u0027m wondering if we can just make the parameter mandatory and remove a codebranch that otherwise needs additional testing.","commit_id":"8d955d14e9312ce32fb425c16d8b5aa96196b4c5"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"826f3fd1659d9c9aa234677cdb9c4fe7121783ce","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    try:"},{"line_number":33,"context_line":"        # check to see if the device uses LUKS: exit status is 0"},{"line_number":34,"context_line":"        # if the device is a LUKS partition and non-zero if not"},{"line_number":35,"context_line":"        priv_rootwrap.execute(\u0027cryptsetup\u0027, \u0027isLuks\u0027, \u0027--verbose\u0027, device,"},{"line_number":36,"context_line":"                              run_as_root\u003dTrue, root_helper\u003droot_helper,"},{"line_number":37,"context_line":"                              check_exit_code\u003dTrue)"},{"line_number":38,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_18f311a0","line":35,"in_reply_to":"7aa08908_2d25f0aa","updated":"2016-06-06 08:40:50.000000000","message":"I would like to keep is_luks out of the class from its function. I add a parameter called execute to transfer self._execute. Is it ok?","commit_id":"8d955d14e9312ce32fb425c16d8b5aa96196b4c5"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"10e94baa11b9d56f970cce7edd7bb0d5ecc005a6","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    try:"},{"line_number":33,"context_line":"        # check to see if the device uses LUKS: exit status is 0"},{"line_number":34,"context_line":"        # if the device is a LUKS partition and non-zero if not"},{"line_number":35,"context_line":"        priv_rootwrap.execute(\u0027cryptsetup\u0027, \u0027isLuks\u0027, \u0027--verbose\u0027, device,"},{"line_number":36,"context_line":"                              run_as_root\u003dTrue, root_helper\u003droot_helper,"},{"line_number":37,"context_line":"                              check_exit_code\u003dTrue)"},{"line_number":38,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_2d25f0aa","line":35,"in_reply_to":"7aa08908_37e26104","updated":"2016-06-06 06:49:03.000000000","message":"The `self.execute` dependency injection used in os_brick obviously won\u0027t work with `is_luks` when it is broken out like this.  That wasn\u0027t a concern in nova, where just calling `utils.execute()` directly was normal.  I would personally consider changing the code to the standard os_brick code structure to be a part of moving this code between projects.\n\nFurthermore, you have a unique opportunity to refactor this code right now, when you know there are no other callers using `is_luks`.  Later you will have additional concerns over whether someone is using this method and how you will provide backwards compatibility.\n\nMeh, this isn\u0027t my change or project, so I\u0027ll drop this minor comment at this point.","commit_id":"8d955d14e9312ce32fb425c16d8b5aa96196b4c5"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"454584784152dbf944d687a49bf0d674f3098ba0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    try:"},{"line_number":33,"context_line":"        # check to see if the device uses LUKS: exit status is 0"},{"line_number":34,"context_line":"        # if the device is a LUKS partition and non-zero if not"},{"line_number":35,"context_line":"        priv_rootwrap.execute(\u0027cryptsetup\u0027, \u0027isLuks\u0027, \u0027--verbose\u0027, device,"},{"line_number":36,"context_line":"                              run_as_root\u003dTrue, root_helper\u003droot_helper,"},{"line_number":37,"context_line":"                              check_exit_code\u003dTrue)"},{"line_number":38,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_37e26104","line":35,"in_reply_to":"7aa08908_86acc9ee","updated":"2016-06-06 05:46:18.000000000","message":"In fact I didn\u0027t find out a reson that must put this method out of the class.\n\nThis patch is to move nova/encryptors to os-brick. I didn\u0027t do lots of changes. \n \nhttps://github.com/openstack/nova/blob/master/nova/volume/encryptors/luks.py","commit_id":"8d955d14e9312ce32fb425c16d8b5aa96196b4c5"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"3946739f2551c331886ecef02cd5fa9f35956c06","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    try:"},{"line_number":33,"context_line":"        # check to see if the device uses LUKS: exit status is 0"},{"line_number":34,"context_line":"        # if the device is a LUKS partition and non-zero if not"},{"line_number":35,"context_line":"        priv_rootwrap.execute(\u0027cryptsetup\u0027, \u0027isLuks\u0027, \u0027--verbose\u0027, device,"},{"line_number":36,"context_line":"                              run_as_root\u003dTrue, root_helper\u003droot_helper,"},{"line_number":37,"context_line":"                              check_exit_code\u003dTrue)"},{"line_number":38,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_5bc55e8c","line":35,"in_reply_to":"7aa08908_bb3e37b6","updated":"2016-06-07 02:03:09.000000000","message":"I checked whether execute is None in the function. If it is None, it uses os_brick.priviledged.rootwrap.execute. \n\nThe check code branch can\u0027t be deleted as the parameter may be set as None when calling.","commit_id":"8d955d14e9312ce32fb425c16d8b5aa96196b4c5"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"5e624115e54ad48ecd625631d9e8a0e455ebda36","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    try:"},{"line_number":33,"context_line":"        # check to see if the device uses LUKS: exit status is 0"},{"line_number":34,"context_line":"        # if the device is a LUKS partition and non-zero if not"},{"line_number":35,"context_line":"        priv_rootwrap.execute(\u0027cryptsetup\u0027, \u0027isLuks\u0027, \u0027--verbose\u0027, device,"},{"line_number":36,"context_line":"                              run_as_root\u003dTrue, root_helper\u003droot_helper,"},{"line_number":37,"context_line":"                              check_exit_code\u003dTrue)"},{"line_number":38,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_86acc9ee","line":35,"in_reply_to":"9abb7d3a_3adb4a1d","updated":"2016-06-06 03:24:31.000000000","message":"I understand, but is there a reason it couldn\u0027t be moved into a method on the class below?","commit_id":"8d955d14e9312ce32fb425c16d8b5aa96196b4c5"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"11f58274153c1c5ea66f5ae019d279c3f14fa6f3","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    try:"},{"line_number":33,"context_line":"        # check to see if the device uses LUKS: exit status is 0"},{"line_number":34,"context_line":"        # if the device is a LUKS partition and non-zero if not"},{"line_number":35,"context_line":"        priv_rootwrap.execute(\u0027cryptsetup\u0027, \u0027isLuks\u0027, \u0027--verbose\u0027, device,"},{"line_number":36,"context_line":"                              run_as_root\u003dTrue, root_helper\u003droot_helper,"},{"line_number":37,"context_line":"                              check_exit_code\u003dTrue)"},{"line_number":38,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_3adb4a1d","line":35,"in_reply_to":"9abb7d3a_ba4f7f90","updated":"2016-06-03 03:21:34.000000000","message":"This is not in a class.","commit_id":"8d955d14e9312ce32fb425c16d8b5aa96196b4c5"}]}
