)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b1e75f2464682f49e1895cb63ff9208d9fdf1d26","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Charlle Dias \u003ccharlledaniel@lsd.ufcg.edu.br\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-09-19 21:06:16 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement the validation to verify if the node is free or in use by Ironic"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Following the requirement, a validation method was implemented to verify this"},{"line_number":10,"context_line":"on the driver\u0027s side. The validation was added to the \"deploy_utils\" module"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a8ec9b2_c839a7da","line":7,"updated":"2016-09-19 22:38:30.000000000","message":"Please mention oneview here or on the top of message.","commit_id":"4daf1417ecf09432236b1b8e851d083f644be6b4"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"146c0d40bdb2584419021069a96311695ee33bcc","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Charlle Dias \u003ccharlledaniel@lsd.ufcg.edu.br\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-09-19 21:06:16 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement the validation to verify if the node is free or in use by Ironic"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Following the requirement, a validation method was implemented to verify this"},{"line_number":10,"context_line":"on the driver\u0027s side. The validation was added to the \"deploy_utils\" module"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a8ec9b2_dab854ca","line":7,"in_reply_to":"7a8ec9b2_c839a7da","updated":"2016-09-20 19:05:59.000000000","message":"Done","commit_id":"4daf1417ecf09432236b1b8e851d083f644be6b4"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1a976c3bf221aed970f48eefbc4dd99479b0b5b1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Charlle Daniel \u003ccharlledaniel@lsd.ufcg.edu.br\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-09-22 15:27:07 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implements the validation to verify if the node is free or in use by Ironic"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Following the requirement. The validation is used within \"OneViewPower.validate\"."},{"line_number":10,"context_line":"As a result it enforces that a machine is owned by OneView, thus it cannot be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a8bc5a2_aae7ea10","line":7,"updated":"2016-09-22 16:36:08.000000000","message":"Please wrap lines in the commit message to 72 characters.","commit_id":"161d48731647d5420c1e02fa555263f181a9cd0a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"280e749cceae382e1141d58437afb8671dc324df","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Charlle Daniel \u003ccharlledaniel@lsd.ufcg.edu.br\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-09-23 13:27:22 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implements the verification if the node is free or in use by Ironic"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Following the requirement. The validation is used within"},{"line_number":10,"context_line":"\"OneViewPower.validate\". As a result it enforces that a machine"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5a8bc5a2_b6c72311","line":7,"updated":"2016-09-23 14:14:45.000000000","message":"I\u0027d suggest\n\n Ensure that oneview nodes are free for use by ironic","commit_id":"ea2a7278c22f1ef4746dbe92e09527f91f6b4f7a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"27df7ca7aa7e6f1f3f016c7d71ea2d1d5a9a67ab","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Following the requirement. The validation is used within"},{"line_number":10,"context_line":"\"OneViewPower.validate\". As a result it enforces that a machine"},{"line_number":11,"context_line":"is owned by OneView, thus it cannot be powered on or off by the"},{"line_number":12,"context_line":"Ironic driver. Raising an exception otherwise."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ibf500577b7a3b5976fd49fd217c1be3d3e9c0f46"},{"line_number":15,"context_line":"Closes-Bug: 1627034"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"ba5da102_f155751d","line":12,"updated":"2016-10-27 02:45:08.000000000","message":"For me it looks like \"validate\" is not raising exception otherwise, but rather in this exact case when node *is* owned by OneView.","commit_id":"02712a52f7a14aa1438fcabfd8f454ba81b8ca5c"}],"ironic/drivers/modules/oneview/deploy_utils.py":[{"author":{"_account_id":10917,"name":"Gabriel Bezerra","email":"gabrielb@lsd.ufcg.edu.br","username":"gabriel.bezerra"},"change_message_id":"6c5b1598b6a8a4cfc5465e950aa142cb8a4707f7","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"def node_can_be_used_by_ironic(node):"},{"line_number":162,"context_line":"    \"\"\"Check if node it is free or use by ironic in OneView."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    :param node: an ironic node object"},{"line_number":165,"context_line":"    :returns: Boolean value. True if node it is free or use by ironic,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_bd4e7f94","line":162,"updated":"2016-09-22 04:44:40.000000000","message":"Docs need refactoring. Instead of explaining what the method does, it should explain what it means: When can a node be used by Ironic?\n\nIts name is a bit misleading, as well. When a node is free, it can be reserved (have a Server Profile applied) by ironic, and have its power state changed -- so that it can be reserved. If a machine could have its Server Profile applied while it was turned on, this exception would not be allowed.\n\nWhen it is reserved (it has a Server Profile), then Ironic can do whatever it has to do.\n\nHence, \"used\" is too general for what the intended use is.\n\nI\u0027d simplify this by just checking if the node is in use by OneView in the PowerInterface, as in:\n\n    if deploy_utils.node_is_in_use_by_oneview(task.node):\n        raise ...","commit_id":"9f165ccd658bb0e8a6e275c70361d32cbbe30c37"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"2927248447f8586339e8b293b20716583bcc4160","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"def node_not_in_use_by_oneview(func):"},{"line_number":172,"context_line":"    \"\"\"Check if the node is in use by OneView."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    \"\"\""},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_d9687abd","line":172,"updated":"2016-11-15 21:21:15.000000000","message":"Check if is in use by OneView or not in use? I think you can explain here why do you have the methods: is_node_in_use_by_oneview and node_not_in_use_by_oneview. I\u0027m a little confusing.","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"af1124a9653f69fc7fa10852a3aff37572f519bf","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"def node_not_in_use_by_oneview(func):"},{"line_number":172,"context_line":"    \"\"\"Check if the node is in use by OneView."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    \"\"\""},{"line_number":175,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_c2a141ab","line":172,"in_reply_to":"7a77a97e_d9687abd","updated":"2016-11-16 12:50:22.000000000","message":"Done","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"2927248447f8586339e8b293b20716583bcc4160","unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def inner(*args, **kwargs):"},{"line_number":177,"context_line":"        task \u003d args[1]"},{"line_number":178,"context_line":"        in_use_by_oneview \u003d False"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            in_use_by_oneview \u003d is_node_in_use_by_oneview(task.node)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_fead1c32","line":178,"updated":"2016-11-15 21:21:15.000000000","message":"You don\u0027t need to set the variable here.","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"af1124a9653f69fc7fa10852a3aff37572f519bf","unresolved":false,"context_lines":[{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def inner(*args, **kwargs):"},{"line_number":177,"context_line":"        task \u003d args[1]"},{"line_number":178,"context_line":"        in_use_by_oneview \u003d False"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            in_use_by_oneview \u003d is_node_in_use_by_oneview(task.node)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_02ac199f","line":178,"in_reply_to":"7a77a97e_fead1c32","updated":"2016-11-16 12:50:22.000000000","message":"Done","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"2927248447f8586339e8b293b20716583bcc4160","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            in_use_by_oneview \u003d is_node_in_use_by_oneview(task.node)"},{"line_number":182,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":183,"context_line":"            raise oneview_exc"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        if in_use_by_oneview:"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_1e9498e0","line":183,"updated":"2016-11-15 21:21:15.000000000","message":"be more specific.","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"af1124a9653f69fc7fa10852a3aff37572f519bf","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            in_use_by_oneview \u003d is_node_in_use_by_oneview(task.node)"},{"line_number":182,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":183,"context_line":"            raise oneview_exc"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        if in_use_by_oneview:"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_a29b6571","line":183,"in_reply_to":"7a77a97e_1e9498e0","updated":"2016-11-16 12:50:22.000000000","message":"Done","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"2927248447f8586339e8b293b20716583bcc4160","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"            msg \u003d (_(\"Invalid operation due node %s in use by OneView.\") %"},{"line_number":188,"context_line":"                   task.node.uuid)"},{"line_number":189,"context_line":"            LOG.debug(msg)"},{"line_number":190,"context_line":"            raise exception.OneViewError(error\u003dmsg)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_9efee869","line":189,"updated":"2016-11-15 21:21:15.000000000","message":"You\u0027re logging a debug and then raising an exception. This is not making sense.","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"af1124a9653f69fc7fa10852a3aff37572f519bf","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"            msg \u003d (_(\"Invalid operation due node %s in use by OneView.\") %"},{"line_number":188,"context_line":"                   task.node.uuid)"},{"line_number":189,"context_line":"            LOG.debug(msg)"},{"line_number":190,"context_line":"            raise exception.OneViewError(error\u003dmsg)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        return func(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_029a5963","line":189,"in_reply_to":"7a77a97e_9efee869","updated":"2016-11-16 12:50:22.000000000","message":"Done","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"034e7cd2ca75187565a35b0972c9562506082e28","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        try:"},{"line_number":188,"context_line":"            in_use_by_oneview \u003d is_node_in_use_by_oneview(task.node)"},{"line_number":189,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":190,"context_line":"            msg \u003d _(\"ResourceNotFoundError: %s\") % oneview_exc"},{"line_number":191,"context_line":"            LOG.error(msg)"},{"line_number":192,"context_line":"            raise exception.OneViewError(error\u003dmsg)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"7a77a97e_3d220c01","line":190,"updated":"2016-11-16 17:24:27.000000000","message":"Use _LE()","commit_id":"d4faf9ffe41b9e898b4478cfd78f89d9c1ba6adb"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"8eb7cd74436482d0e381b3f30c9d2ad11d084e58","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        try:"},{"line_number":188,"context_line":"            in_use_by_oneview \u003d is_node_in_use_by_oneview(task.node)"},{"line_number":189,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":190,"context_line":"            msg \u003d _(\"ResourceNotFoundError: %s\") % oneview_exc"},{"line_number":191,"context_line":"            LOG.error(msg)"},{"line_number":192,"context_line":"            raise exception.OneViewError(error\u003dmsg)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"7a77a97e_639fccb4","line":190,"in_reply_to":"7a77a97e_3312ed09","updated":"2016-11-21 19:53:12.000000000","message":"Hi Joanna, the method \"is_node_in_use_by_oneview\" raise an exception if you can not get information from the OneView and this is the only reason to raise this exception. But I changed the message to \"OneViewResourceNotFoundError\". Thank you for review!","commit_id":"d4faf9ffe41b9e898b4478cfd78f89d9c1ba6adb"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"61d96fcbf2af86a9e6b1423fadfa8025bb23da8a","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        try:"},{"line_number":188,"context_line":"            in_use_by_oneview \u003d is_node_in_use_by_oneview(task.node)"},{"line_number":189,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":190,"context_line":"            msg \u003d _(\"ResourceNotFoundError: %s\") % oneview_exc"},{"line_number":191,"context_line":"            LOG.error(msg)"},{"line_number":192,"context_line":"            raise exception.OneViewError(error\u003dmsg)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"7a77a97e_3312ed09","line":190,"in_reply_to":"7a77a97e_3d220c01","updated":"2016-11-18 02:29:26.000000000","message":"is it always caused by not found? Can there be any other reason for this error?\nI\u0027m also not sure about mimicking ResourceNotFoundError by OneViewError.","commit_id":"d4faf9ffe41b9e898b4478cfd78f89d9c1ba6adb"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"034e7cd2ca75187565a35b0972c9562506082e28","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            raise exception.OneViewError(error\u003dmsg)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"        if in_use_by_oneview:"},{"line_number":195,"context_line":"            msg \u003d (_(\"Invalid operation due node %s in use by OneView.\") %"},{"line_number":196,"context_line":"                   task.node.uuid)"},{"line_number":197,"context_line":"            LOG.error(msg)"},{"line_number":198,"context_line":"            raise exception.OneViewError(error\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"7a77a97e_5d1d08bc","line":195,"updated":"2016-11-16 17:24:27.000000000","message":"ditto.","commit_id":"d4faf9ffe41b9e898b4478cfd78f89d9c1ba6adb"}],"ironic/drivers/modules/oneview/power.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b1e75f2464682f49e1895cb63ff9208d9fdf1d26","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        :param task: a task from TaskManager."},{"line_number":50,"context_line":"        :raises: MissingParameterValue if a required parameter is missing."},{"line_number":51,"context_line":"        :raises: InvalidParameterValue if parameters set are inconsistent with"},{"line_number":52,"context_line":"                 resources in OneView"},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        common.verify_node_info(task.node)"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_88087f2a","line":52,"updated":"2016-09-19 22:38:30.000000000","message":"Maybe extend this info also.","commit_id":"4daf1417ecf09432236b1b8e851d083f644be6b4"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"146c0d40bdb2584419021069a96311695ee33bcc","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        :param task: a task from TaskManager."},{"line_number":50,"context_line":"        :raises: MissingParameterValue if a required parameter is missing."},{"line_number":51,"context_line":"        :raises: InvalidParameterValue if parameters set are inconsistent with"},{"line_number":52,"context_line":"                 resources in OneView"},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        common.verify_node_info(task.node)"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_3aca1850","line":52,"in_reply_to":"7a8ec9b2_88087f2a","updated":"2016-09-20 19:05:59.000000000","message":"Done","commit_id":"4daf1417ecf09432236b1b8e851d083f644be6b4"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b1e75f2464682f49e1895cb63ff9208d9fdf1d26","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        if not deploy_utils.node_can_be_used_by_ironic(task.node):"},{"line_number":57,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":58,"context_line":"                \"Node {} is neither free nor in use by ironic.\".format("},{"line_number":59,"context_line":"                    task.node.uuid))"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_c5afd029","line":58,"updated":"2016-09-19 22:38:30.000000000","message":"Please use translation with _()","commit_id":"4daf1417ecf09432236b1b8e851d083f644be6b4"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"146c0d40bdb2584419021069a96311695ee33bcc","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        if not deploy_utils.node_can_be_used_by_ironic(task.node):"},{"line_number":57,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":58,"context_line":"                \"Node {} is neither free nor in use by ironic.\".format("},{"line_number":59,"context_line":"                    task.node.uuid))"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_5ac5243b","line":58,"in_reply_to":"7a8ec9b2_c5afd029","updated":"2016-09-20 19:05:59.000000000","message":"Done","commit_id":"4daf1417ecf09432236b1b8e851d083f644be6b4"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"4aa6ac41bbddf097db214e8d5a0eddd32ecb3430","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        enclosure_group_uri. Also, checks if the server profile of the node is"},{"line_number":45,"context_line":"        applied, if NICs are valid for the server profile of the node, and if"},{"line_number":46,"context_line":"        the server hardware attributes (ram, memory, vcpus count) are"},{"line_number":47,"context_line":"        consistent with OneView. It validate if the node is being used by"},{"line_number":48,"context_line":"        Ironic or free as well."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        :param task: a task from TaskManager."}],"source_content_type":"text/x-python","patch_set":11,"id":"3a98d1f4_8b55f91e","line":47,"range":{"start_line":47,"start_character":36,"end_line":47,"end_character":44},"updated":"2016-09-28 14:05:52.000000000","message":"s/validate/validates/","commit_id":"cc23f9b4d19d4715049b1ae7a5d10e203fa5858b"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"4aa6ac41bbddf097db214e8d5a0eddd32ecb3430","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        if deploy_utils.is_node_in_use_by_oneview(task.node):"},{"line_number":58,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":59,"context_line":"                _(\"Node %s is being used by OneView.\") %"},{"line_number":60,"context_line":"                task.node.uuid)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a98d1f4_8b2c19ad","line":59,"range":{"start_line":59,"start_character":19,"end_line":59,"end_character":52},"updated":"2016-09-28 14:05:52.000000000","message":"s/Node %s is being used by OneView./Node %s is in use by OneView./","commit_id":"cc23f9b4d19d4715049b1ae7a5d10e203fa5858b"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"27df7ca7aa7e6f1f3f016c7d71ea2d1d5a9a67ab","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        enclosure_group_uri. Also, checks if the server profile of the node is"},{"line_number":45,"context_line":"        applied, if NICs are valid for the server profile of the node, and if"},{"line_number":46,"context_line":"        the server hardware attributes (ram, memory, vcpus count) are"},{"line_number":47,"context_line":"        consistent with OneView. It validates if the node is being used by"},{"line_number":48,"context_line":"        Ironic or free as well."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        :param task: a task from TaskManager."}],"source_content_type":"text/x-python","patch_set":14,"id":"ba5da102_11182984","line":47,"updated":"2016-10-27 02:45:08.000000000","message":"I would follow the \"is_node_in_use_by_oneview\" function name, and change: s/Ironic/OneView/","commit_id":"02712a52f7a14aa1438fcabfd8f454ba81b8ca5c"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ef2a7e3e6c69c8e074b8ffe80be4a82fbd015834","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        common.verify_node_info(task.node)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        if deploy_utils.is_node_in_use_by_oneview(task.node):"},{"line_number":58,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":59,"context_line":"                _(\"Node %s is in use by OneView.\") %"},{"line_number":60,"context_line":"                task.node.uuid)"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a629dbe_c344674b","line":58,"updated":"2016-11-11 11:29:30.000000000","message":"is_node_in_use_by_oneview may raise OneViewError here, it should be catched.","commit_id":"5c57906f92cd59460b07ab2ccd57377d60f4c3a0"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ef2a7e3e6c69c8e074b8ffe80be4a82fbd015834","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        if deploy_utils.is_node_in_use_by_oneview(task.node):"},{"line_number":58,"context_line":"            raise exception.InvalidParameterValue("},{"line_number":59,"context_line":"                _(\"Node %s is in use by OneView.\") %"},{"line_number":60,"context_line":"                task.node.uuid)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a629dbe_836d0fce","line":59,"range":{"start_line":59,"start_character":19,"end_line":59,"end_character":48},"updated":"2016-11-11 11:29:30.000000000","message":"The management driver shows \"Node %s is not in use by ironic.\" [0] I think we should use the same error for both cases, I prefer to update management to \"Node %s is in use by OneView.\" also.\n\nhttps://github.com/openstack/ironic/blob/4858dd2e6870e6c41d002ceec197aab76d6a907b/ironic/drivers/modules/oneview/management.py#L72","commit_id":"5c57906f92cd59460b07ab2ccd57377d60f4c3a0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2b486b6f1b9f6dd7d5b3d03fa7a0c2806b2a0726","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            common.validate_oneview_resources_compatibility(task)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(task.node):"},{"line_number":61,"context_line":"                raise exception.InvalidParameterValue("},{"line_number":62,"context_line":"                    _(\"Node %s is in use by OneView.\") %"},{"line_number":63,"context_line":"                    task.node.uuid)"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9a629dbe_123bd09d","line":61,"range":{"start_line":61,"start_character":22,"end_line":61,"end_character":53},"updated":"2016-11-14 10:17:23.000000000","message":"I really wonder if validate() is the right place to raise such error. The validate() method is used by all other drivers to figure out whether the node has been configured properly or not.\n\nIn this situation validate() will fail independent of it. It will fail even if the node contains all the right information but the machine is being used by another system which is totally out of the hand of the operator. This will make validate() pretty unreliable and not consistent with any other driver in tree.\n\nThe exception itself InvalidParameterValue() already doesn\u0027t match with the error being raised, the node being used is not due an invalid parameter being passed.\n\nI don\u0027t know if we really have a good place for a check like this to be honest, but I think as-is now, I don\u0027t think validate() is the right place :-/\n\n...\n\nWould having the check at set_power_state() be a problem ? Even tho it\u0027s not perfect, at least that method could (and will) raise errors which is not only related to the information passed to the node.","commit_id":"2f18785c97be6e15d9bd2f6ad75001e52921caf0"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"2a4c12e02ed93da12f85c6de28cdadb5dcf51b2a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            common.validate_oneview_resources_compatibility(task)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(task.node):"},{"line_number":61,"context_line":"                raise exception.InvalidParameterValue("},{"line_number":62,"context_line":"                    _(\"Node %s is in use by OneView.\") %"},{"line_number":63,"context_line":"                    task.node.uuid)"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7a77a97e_854bd086","line":61,"range":{"start_line":61,"start_character":22,"end_line":61,"end_character":53},"in_reply_to":"9a629dbe_123bd09d","updated":"2016-11-16 14:03:00.000000000","message":"Hi Lucas, thank you for the suggestions, they do make sense. I am working to do this validation directly in the method you have suggeted.","commit_id":"2f18785c97be6e15d9bd2f6ad75001e52921caf0"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"2927248447f8586339e8b293b20716583bcc4160","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        applied, if NICs are valid for the server profile of the node, and if"},{"line_number":50,"context_line":"        the server hardware attributes (ram, memory, vcpus count) are"},{"line_number":51,"context_line":"        consistent with OneView. It validates if the node is being used by"},{"line_number":52,"context_line":"        Oneview."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        :param task: a task from TaskManager."},{"line_number":55,"context_line":"        :raises: MissingParameterValue if a required parameter is missing."}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_d996ba93","line":52,"updated":"2016-11-15 21:21:15.000000000","message":"Not anymore.","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"af1124a9653f69fc7fa10852a3aff37572f519bf","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        applied, if NICs are valid for the server profile of the node, and if"},{"line_number":50,"context_line":"        the server hardware attributes (ram, memory, vcpus count) are"},{"line_number":51,"context_line":"        consistent with OneView. It validates if the node is being used by"},{"line_number":52,"context_line":"        Oneview."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        :param task: a task from TaskManager."},{"line_number":55,"context_line":"        :raises: MissingParameterValue if a required parameter is missing."}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_1645436f","line":52,"in_reply_to":"7a77a97e_d996ba93","updated":"2016-11-16 12:50:22.000000000","message":"Done","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"2927248447f8586339e8b293b20716583bcc4160","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        :raises: InvalidParameterValue if an invalid power state was specified."},{"line_number":102,"context_line":"        :raises: PowerStateFailure if the power couldn\u0027t be set to power_state."},{"line_number":103,"context_line":"        :raises: OneViewError if OneView fails setting the power state or the"},{"line_number":104,"context_line":"                 node in use by OneView1."},{"line_number":105,"context_line":"        \"\"\""},{"line_number":106,"context_line":"        oneview_info \u003d common.get_oneview_info(task.node)"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_d9ddda71","line":104,"updated":"2016-11-15 21:21:15.000000000","message":"Create another :raises: for the new exception, don\u0027t use \u0027or\u0027. s/OneView1/OneView","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"af1124a9653f69fc7fa10852a3aff37572f519bf","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        :raises: InvalidParameterValue if an invalid power state was specified."},{"line_number":102,"context_line":"        :raises: PowerStateFailure if the power couldn\u0027t be set to power_state."},{"line_number":103,"context_line":"        :raises: OneViewError if OneView fails setting the power state or the"},{"line_number":104,"context_line":"                 node in use by OneView1."},{"line_number":105,"context_line":"        \"\"\""},{"line_number":106,"context_line":"        oneview_info \u003d common.get_oneview_info(task.node)"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_b6548f21","line":104,"in_reply_to":"7a77a97e_d9ddda71","updated":"2016-11-16 12:50:22.000000000","message":"Done","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"61d96fcbf2af86a9e6b1423fadfa8025bb23da8a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        :raises: InvalidParameterValue if an invalid power state was specified."},{"line_number":101,"context_line":"        :raises: PowerStateFailure if the power couldn\u0027t be set to power_state."},{"line_number":102,"context_line":"        :raises: OneViewError if OneView fails setting the power state."},{"line_number":103,"context_line":"        :raises: OneViewError if the node in use by OneView."},{"line_number":104,"context_line":"        \"\"\""},{"line_number":105,"context_line":"        oneview_info \u003d common.get_oneview_info(task.node)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"7a77a97e_f364f5b9","line":103,"updated":"2016-11-18 02:29:26.000000000","message":"I think \"if node is in use by OneView.\" looks better. \nAlso, param node should be removed.","commit_id":"d4faf9ffe41b9e898b4478cfd78f89d9c1ba6adb"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"8eb7cd74436482d0e381b3f30c9d2ad11d084e58","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        :raises: InvalidParameterValue if an invalid power state was specified."},{"line_number":101,"context_line":"        :raises: PowerStateFailure if the power couldn\u0027t be set to power_state."},{"line_number":102,"context_line":"        :raises: OneViewError if OneView fails setting the power state."},{"line_number":103,"context_line":"        :raises: OneViewError if the node in use by OneView."},{"line_number":104,"context_line":"        \"\"\""},{"line_number":105,"context_line":"        oneview_info \u003d common.get_oneview_info(task.node)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"7a77a97e_6386ec66","line":103,"in_reply_to":"7a77a97e_f364f5b9","updated":"2016-11-21 19:53:12.000000000","message":"Nice,thank you!","commit_id":"d4faf9ffe41b9e898b4478cfd78f89d9c1ba6adb"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c7762dc9820f871074fb162cf33d860b8eac1230","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            raise exception.InvalidParameterValue(oneview_exc)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(task.node):"},{"line_number":72,"context_line":"                msg \u003d _LE(\"Node %s is in use by OneView.\") % task.node.uuid"},{"line_number":73,"context_line":"                raise exception.OneViewError(error\u003dmsg)"},{"line_number":74,"context_line":"        except exception.OneViewError as oneview_exc:"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_d1f575cb","line":71,"updated":"2016-11-25 12:04:14.000000000","message":"as I said on IRC, validate is run asynchronously in many places, as it\u0027s assumed to be cheap. Also there is nothing wrong (IIUC) to get_power_state of nodes in use, so I suggest moving this check to calls setting power state.","commit_id":"8eebfaf987be9b93479f3b0a37b2e91f0cffcecd"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"0ca03cf1faa2144131ac7f69cc7179d3e3e550b4","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            raise exception.InvalidParameterValue(oneview_exc)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(task.node):"},{"line_number":72,"context_line":"                msg \u003d _LE(\"Node %s is in use by OneView.\") % task.node.uuid"},{"line_number":73,"context_line":"                raise exception.OneViewError(error\u003dmsg)"},{"line_number":74,"context_line":"        except exception.OneViewError as oneview_exc:"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_96b3aa09","line":71,"in_reply_to":"5a74a57a_d1f575cb","updated":"2016-11-28 15:15:17.000000000","message":"Hey dmitry, I understand your concerns about the whole thing. As discussed in the IRC, I consider this place as the best cost/benefit to keep this validation for now too, considering that we don\u0027t have a specific place for those validations in ironic. Since we are far from touching the BMC like in https://review.openstack.org/#/c/99121/, it\u0027s just a single request to oneview that does a fast fail to prevent the operator of provisioning a machine that could not be provided, that\u0027s cause is occupied by another system, in this case OneView. Agree? :)","commit_id":"8eebfaf987be9b93479f3b0a37b2e91f0cffcecd"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c7762dc9820f871074fb162cf33d860b8eac1230","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(task.node):"},{"line_number":72,"context_line":"                msg \u003d _LE(\"Node %s is in use by OneView.\") % task.node.uuid"},{"line_number":73,"context_line":"                raise exception.OneViewError(error\u003dmsg)"},{"line_number":74,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":75,"context_line":"            LOG.error(oneview_exc)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_f10431c1","line":72,"updated":"2016-11-25 12:04:14.000000000","message":"this is a user-visible string, so it should use _()","commit_id":"8eebfaf987be9b93479f3b0a37b2e91f0cffcecd"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"ee51545ce38b612735ed25dde61f8b840fd8c8a7","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(task.node):"},{"line_number":72,"context_line":"                msg \u003d _LE(\"Node %s is in use by OneView.\") % task.node.uuid"},{"line_number":73,"context_line":"                raise exception.OneViewError(error\u003dmsg)"},{"line_number":74,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":75,"context_line":"            LOG.error(oneview_exc)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_3649f6b7","line":72,"in_reply_to":"5a74a57a_f10431c1","updated":"2016-11-28 15:16:06.000000000","message":"Done","commit_id":"8eebfaf987be9b93479f3b0a37b2e91f0cffcecd"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ef0a07b2491e383e584943b8e90eed2b835030e3","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(self.oneview_client,"},{"line_number":77,"context_line":"                                                      task.node):"},{"line_number":78,"context_line":"                msg \u003d _(\"Node %s is in use by OneView.\") % task.node.uuid"},{"line_number":79,"context_line":"                raise exception.OneViewError(error\u003dmsg)"},{"line_number":80,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":81,"context_line":"            LOG.error(oneview_exc)"},{"line_number":82,"context_line":"            raise exception.OneViewError(error\u003doneview_exc)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_a892b5f4","line":79,"range":{"start_line":79,"start_character":16,"end_line":79,"end_character":55},"updated":"2016-12-19 05:26:07.000000000","message":"In many places conductor manager does power iface validation synchronously. This exception will cause wrong HTTP 500 on API side (\"The server encountered an unexpected condition which prevented it from fulfilling the request. \").","commit_id":"081ff0b571fd572c36c61f33dda4a6c99a8bfeea"},{"author":{"_account_id":21775,"name":"Ricardo Araújo Santos","email":"ricardo@lsd.ufcg.edu.br","username":"ricardoas"},"change_message_id":"d74a6aa351415a945db8dd0e39384a1728336a1c","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(self.oneview_client,"},{"line_number":77,"context_line":"                                                      task.node):"},{"line_number":78,"context_line":"                msg \u003d _(\"Node %s is in use by OneView.\") % task.node.uuid"},{"line_number":79,"context_line":"                raise exception.OneViewError(error\u003dmsg)"},{"line_number":80,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":81,"context_line":"            LOG.error(oneview_exc)"},{"line_number":82,"context_line":"            raise exception.OneViewError(error\u003doneview_exc)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_74113d5d","line":79,"range":{"start_line":79,"start_character":16,"end_line":79,"end_character":55},"in_reply_to":"1a6eadb0_0b03a30e","updated":"2016-12-19 15:43:08.000000000","message":"Taking a look at BaseInterface.validate contract, people are expecting exception from InvalidParameterValue tree... raising OneViewError breaks this contract. On the other hand, catch it and re-raise as a InvalidParameterValue, as it is being done at the management interface, solves the problem and it would be my choice for now despite being quite strange semantically. One could also change OneViewError for a new exception belonging to the InvalidParameterValue tree...","commit_id":"081ff0b571fd572c36c61f33dda4a6c99a8bfeea"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"e136dda5658cd5f38d23f89d8ca1d82547f723c7","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(self.oneview_client,"},{"line_number":77,"context_line":"                                                      task.node):"},{"line_number":78,"context_line":"                msg \u003d _(\"Node %s is in use by OneView.\") % task.node.uuid"},{"line_number":79,"context_line":"                raise exception.OneViewError(error\u003dmsg)"},{"line_number":80,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":81,"context_line":"            LOG.error(oneview_exc)"},{"line_number":82,"context_line":"            raise exception.OneViewError(error\u003doneview_exc)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_7e4caf76","line":79,"range":{"start_line":79,"start_character":16,"end_line":79,"end_character":55},"in_reply_to":"1a6eadb0_74113d5d","updated":"2016-12-19 18:47:09.000000000","message":"Hello Ricardo, I think you are correct, how have you seen the contract in BaseInterface.validate only expects a InvalidParameterValue, I am changing the type of exception. Thank you!","commit_id":"081ff0b571fd572c36c61f33dda4a6c99a8bfeea"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"3bf2319b6de50588facdf72f8dd6e7e032145f5d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(self.oneview_client,"},{"line_number":77,"context_line":"                                                      task.node):"},{"line_number":78,"context_line":"                msg \u003d _(\"Node %s is in use by OneView.\") % task.node.uuid"},{"line_number":79,"context_line":"                raise exception.OneViewError(error\u003dmsg)"},{"line_number":80,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":81,"context_line":"            LOG.error(oneview_exc)"},{"line_number":82,"context_line":"            raise exception.OneViewError(error\u003doneview_exc)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_0b03a30e","line":79,"range":{"start_line":79,"start_character":16,"end_line":79,"end_character":55},"in_reply_to":"1a6eadb0_a892b5f4","updated":"2016-12-19 05:32:16.000000000","message":"And also breaks error message generation in conductor manager for API.","commit_id":"081ff0b571fd572c36c61f33dda4a6c99a8bfeea"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"e136dda5658cd5f38d23f89d8ca1d82547f723c7","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            if deploy_utils.is_node_in_use_by_oneview(self.oneview_client,"},{"line_number":77,"context_line":"                                                      task.node):"},{"line_number":78,"context_line":"                msg \u003d _(\"Node %s is in use by OneView.\") % task.node.uuid"},{"line_number":79,"context_line":"                raise exception.OneViewError(error\u003dmsg)"},{"line_number":80,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":81,"context_line":"            LOG.error(oneview_exc)"},{"line_number":82,"context_line":"            raise exception.OneViewError(error\u003doneview_exc)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_63909ced","line":79,"range":{"start_line":79,"start_character":16,"end_line":79,"end_character":55},"in_reply_to":"1a6eadb0_a892b5f4","updated":"2016-12-19 18:47:09.000000000","message":"Hi Yuriy, I believe that the suggestion of Ricardo is the only possible until the moment, as was discussed on IRC and it was decided that the validate is the place to check this as in management interface. Thank you! https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/oneview/management.py#L79","commit_id":"081ff0b571fd572c36c61f33dda4a6c99a8bfeea"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"ef0a07b2491e383e584943b8e90eed2b835030e3","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                raise exception.OneViewError(error\u003dmsg)"},{"line_number":80,"context_line":"        except exception.OneViewError as oneview_exc:"},{"line_number":81,"context_line":"            LOG.error(oneview_exc)"},{"line_number":82,"context_line":"            raise exception.OneViewError(error\u003doneview_exc)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @METRICS.timer(\u0027OneViewPower.get_power_state\u0027)"},{"line_number":85,"context_line":"    def get_power_state(self, task):"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a6eadb0_e8baed70","line":82,"range":{"start_line":82,"start_character":12,"end_line":82,"end_character":59},"updated":"2016-12-19 05:26:07.000000000","message":"ditto","commit_id":"081ff0b571fd572c36c61f33dda4a6c99a8bfeea"}],"ironic/tests/unit/drivers/modules/oneview/test_deploy_utils.py":[{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"53938206a227db159a784bccf125e2898206ba9d","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                                                       task.node)"},{"line_number":256,"context_line":"            )"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    # Tests for is_node_in_use_by_ironic"},{"line_number":259,"context_line":"    def test_is_node_in_use_by_ironic(self, mock_get_ov_client):"},{"line_number":260,"context_line":"        \"\"\"Node has a Server Profile applied by ironic."},{"line_number":261,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"7a3c09a3_1e4c5d9d","line":258,"updated":"2017-01-16 19:06:36.000000000","message":"nit: unrelated, but seems to make sense.","commit_id":"2505cb58f74b05c534a6a513080919063cc65fa9"}],"ironic/tests/unit/drivers/modules/oneview/test_power.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1a976c3bf221aed970f48eefbc4dd99479b0b5b1","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @mock.patch.object(common, \u0027validate_oneview_resources_compatibility\u0027,"},{"line_number":61,"context_line":"                       spect_set\u003dTrue, autospec\u003dTrue)"},{"line_number":62,"context_line":"    @mock.patch.object(deploy_utils, \u0027is_node_in_use_by_oneview\u0027,"},{"line_number":63,"context_line":"                       spect_set\u003dTrue, autospec\u003dTrue)"},{"line_number":64,"context_line":"    def test_power_interface_validate(self, mock_used,"},{"line_number":65,"context_line":"                                      mock_validate, mock_get_ov_client):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a8bc5a2_8ae22e02","line":62,"updated":"2016-09-22 16:36:08.000000000","message":"You need to add a separate test case where a node is used by oneview, meaning mock_used.return_value \u003d True, and adding  mock_used.return_value \u003d False in all the other places where the validate is called.","commit_id":"161d48731647d5420c1e02fa555263f181a9cd0a"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"4aa6ac41bbddf097db214e8d5a0eddd32ecb3430","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                       spect_set\u003dTrue, autospec\u003dTrue)"},{"line_number":62,"context_line":"    @mock.patch.object(deploy_utils, \u0027is_node_in_use_by_oneview\u0027,"},{"line_number":63,"context_line":"                       spect_set\u003dTrue, autospec\u003dTrue)"},{"line_number":64,"context_line":"    def test_power_interface_validate(self, mock_used,"},{"line_number":65,"context_line":"                                      mock_validate, mock_get_ov_client):"},{"line_number":66,"context_line":"        mock_used.return_value \u003d False"},{"line_number":67,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a98d1f4_764b305a","line":64,"range":{"start_line":64,"start_character":44,"end_line":64,"end_character":53},"updated":"2016-09-28 14:05:52.000000000","message":"I think that it could be more readable:\n\ns/mock_used/mock_is_node_in_use_by_oneview/","commit_id":"cc23f9b4d19d4715049b1ae7a5d10e203fa5858b"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"4aa6ac41bbddf097db214e8d5a0eddd32ecb3430","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                       spect_set\u003dTrue, autospec\u003dTrue)"},{"line_number":82,"context_line":"    @mock.patch.object(deploy_utils, \u0027is_node_in_use_by_oneview\u0027,"},{"line_number":83,"context_line":"                       spect_set\u003dTrue, autospec\u003dTrue)"},{"line_number":84,"context_line":"    def test_power_interface_validate_fail_exception(self, mock_use,"},{"line_number":85,"context_line":"                                                     mock_validate,"},{"line_number":86,"context_line":"                                                     mock_get_ov_client):"},{"line_number":87,"context_line":"        mock_use.return_value \u003d False"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a98d1f4_566554df","line":84,"range":{"start_line":84,"start_character":59,"end_line":84,"end_character":67},"updated":"2016-09-28 14:05:52.000000000","message":"ditto","commit_id":"cc23f9b4d19d4715049b1ae7a5d10e203fa5858b"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"4aa6ac41bbddf097db214e8d5a0eddd32ecb3430","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                              task.driver.power.validate,"},{"line_number":92,"context_line":"                              task)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test_power_validate_fail_node_used_by_oneview(self,"},{"line_number":95,"context_line":"                                                      mock_get_ov_client):"},{"line_number":96,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":97,"context_line":"            self.assertRaises(exception.InvalidParameterValue,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a98d1f4_9600bcac","line":94,"range":{"start_line":94,"start_character":8,"end_line":94,"end_character":53},"updated":"2016-09-28 14:05:52.000000000","message":"Make explicit that node is in use by oneview mocking the method \u0027is_node_in_use_by_oneview\u0027 and making it returning true.","commit_id":"cc23f9b4d19d4715049b1ae7a5d10e203fa5858b"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ef2a7e3e6c69c8e074b8ffe80be4a82fbd015834","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def test_power_validate_fail_node_used_by_oneview("},{"line_number":96,"context_line":"            self, mock_is_node_in_use_by_oneview, mock_get_ov_client):"},{"line_number":97,"context_line":"        mock_is_node_in_use_by_oneview.return_value \u003d True"},{"line_number":98,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":99,"context_line":"            self.assertRaises(exception.InvalidParameterValue,"},{"line_number":100,"context_line":"                              task.driver.power.validate,"},{"line_number":101,"context_line":"                              task)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a629dbe_63a1dbf7","line":98,"updated":"2016-11-11 11:29:30.000000000","message":"Please add a test when is_node_in_use_by_oneview raise Oneview error.","commit_id":"5c57906f92cd59460b07ab2ccd57377d60f4c3a0"},{"author":{"_account_id":14675,"name":"Hugo Nicodemos","email":"hugo.brito@windriver.com","username":"nicodemos"},"change_message_id":"2927248447f8586339e8b293b20716583bcc4160","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                       spect_set\u003dTrue, autospec\u003dTrue)"},{"line_number":97,"context_line":"    def test_set_power_state_fail_when_verify_fail_node_in_use_by_oneview("},{"line_number":98,"context_line":"            self, mock_is_node_in_use_by_oneview, mock_get_ov_client):"},{"line_number":99,"context_line":"        mock_is_node_in_use_by_oneview.side_effect \u003d \\"},{"line_number":100,"context_line":"            exception.OneViewError(\"message\")"},{"line_number":101,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":102,"context_line":"            self.assertRaises(exception.OneViewError,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_39bc0e05","line":99,"updated":"2016-11-15 21:21:15.000000000","message":"Use () instead of \\","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"},{"author":{"_account_id":23609,"name":"Charlle Daniel","email":"charlledaniel@lsd.ufcg.edu.br","username":"charlledani2"},"change_message_id":"af1124a9653f69fc7fa10852a3aff37572f519bf","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                       spect_set\u003dTrue, autospec\u003dTrue)"},{"line_number":97,"context_line":"    def test_set_power_state_fail_when_verify_fail_node_in_use_by_oneview("},{"line_number":98,"context_line":"            self, mock_is_node_in_use_by_oneview, mock_get_ov_client):"},{"line_number":99,"context_line":"        mock_is_node_in_use_by_oneview.side_effect \u003d \\"},{"line_number":100,"context_line":"            exception.OneViewError(\"message\")"},{"line_number":101,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":102,"context_line":"            self.assertRaises(exception.OneViewError,"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a77a97e_02b5f9ec","line":99,"in_reply_to":"7a77a97e_39bc0e05","updated":"2016-11-16 12:50:22.000000000","message":"Done","commit_id":"913d4506591c2f09a8a555e3e463edb1016fa93e"}],"releasenotes/notes/oneview-node-free-for-ironic-61b05fee827664cb.yaml":[{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"4aa6ac41bbddf097db214e8d5a0eddd32ecb3430","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - Validation within \u0027OneViewPower.validate\u0027 that"},{"line_number":4,"context_line":"    ensures if a node is not in use by OneView. It"},{"line_number":5,"context_line":"    does not allow a state change by Ironic on the"},{"line_number":6,"context_line":"    node if it has a Server Profile assigned by"},{"line_number":7,"context_line":"    OneView."}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3a98d1f4_7677b002","line":4,"range":{"start_line":4,"start_character":12,"end_line":4,"end_character":14},"updated":"2016-09-28 14:05:52.000000000","message":"s/if/when/","commit_id":"cc23f9b4d19d4715049b1ae7a5d10e203fa5858b"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"4aa6ac41bbddf097db214e8d5a0eddd32ecb3430","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - Validation within \u0027OneViewPower.validate\u0027 that"},{"line_number":4,"context_line":"    ensures if a node is not in use by OneView. It"},{"line_number":5,"context_line":"    does not allow a state change by Ironic on the"},{"line_number":6,"context_line":"    node if it has a Server Profile assigned by"},{"line_number":7,"context_line":"    OneView."},{"line_number":8,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3a98d1f4_b65f7874","line":5,"range":{"start_line":5,"start_character":13,"end_line":5,"end_character":18},"updated":"2016-09-28 14:05:52.000000000","message":"s/allow/allows/","commit_id":"cc23f9b4d19d4715049b1ae7a5d10e203fa5858b"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"4aa6ac41bbddf097db214e8d5a0eddd32ecb3430","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    ensures if a node is not in use by OneView. It"},{"line_number":5,"context_line":"    does not allow a state change by Ironic on the"},{"line_number":6,"context_line":"    node if it has a Server Profile assigned by"},{"line_number":7,"context_line":"    OneView."},{"line_number":8,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3a98d1f4_76e5f0a6","line":7,"range":{"start_line":7,"start_character":4,"end_line":7,"end_character":11},"updated":"2016-09-28 14:05:52.000000000","message":"s/OneView/OneView user/","commit_id":"cc23f9b4d19d4715049b1ae7a5d10e203fa5858b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c67af9426980f18f1d471399811248390d3e8d1c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - Validation within \u0027OneViewPower.validate\u0027 that"},{"line_number":4,"context_line":"    ensures when a node is not in use by OneView. It"},{"line_number":5,"context_line":"    does not allows a state change by Ironic on the"},{"line_number":6,"context_line":"    node if it has a Server Profile assigned by"},{"line_number":7,"context_line":"    OneView user."},{"line_number":8,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":13,"id":"fa6399be_f93e2128","line":7,"range":{"start_line":3,"start_character":4,"end_line":7,"end_character":17},"updated":"2016-10-18 16:03:30.000000000","message":"I\u0027d suggest:\n\nFixes an issue with nodes in-use by oneview allowing to change their power state via ironic.","commit_id":"67432a05c5bbc942779bf132d9c7c5662af9c1b7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"259de45709e419edbf57d6a0bf863a06395da01e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - Validation within \u0027OneViewPower.validate\u0027 that"},{"line_number":4,"context_line":"    ensures when a node is not in use by OneView. It"},{"line_number":5,"context_line":"    does not allows a state change by Ironic on the"},{"line_number":6,"context_line":"    node if it has a Server Profile assigned by"},{"line_number":7,"context_line":"    OneView user."},{"line_number":8,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":13,"id":"fa6399be_307ee3ae","line":7,"range":{"start_line":3,"start_character":4,"end_line":7,"end_character":17},"in_reply_to":"fa6399be_f93e2128","updated":"2016-10-18 19:26:33.000000000","message":"+1, this should be shortened and clarified. You definitely need to say \"power state\" here, in my opinion.\n\nHow about this:\n\nFixes an issue with ironic being able to change the power state of nodes currently in use by OneView.","commit_id":"67432a05c5bbc942779bf132d9c7c5662af9c1b7"}],"releasenotes/notes/version-foo-809d1f905a395d34.yaml":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"280e749cceae382e1141d58437afb8671dc324df","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Replace this text with content to appear at the"},{"line_number":4,"context_line":"    top of the section for this release. All of the"},{"line_number":5,"context_line":"    prelude content is merged together and then rendered"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5a8bc5a2_d6e02fcf","line":2,"updated":"2016-09-23 14:14:45.000000000","message":"You should obviously add some proper content here, it\u0027s just a template :) the only things that should be left here is fixes section with proper description of what was done.","commit_id":"ea2a7278c22f1ef4746dbe92e09527f91f6b4f7a"}]}
