)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5bcfc9d7caf075b72838b0d77b8bc1a9dd55f3f2","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow users the ability to update the instance name"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This review introduces a new PATCH call for updating instance"},{"line_number":10,"context_line":"name and configurations. The long term plan is to deprecate PUT"},{"line_number":11,"context_line":"in favor of PATCH."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7adec928_4f1292b5","line":9,"updated":"2014-05-07 20:55:22.000000000","message":"I\u0027d suggest to re-write commit message body.\n\nPlease follow https://wiki.openstack.org/wiki/Gerrit_Workflow#Committing_Changes","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":5293,"name":"Nikhil","email":"SlickNik@gmail.com","username":"slicknik"},"change_message_id":"65b1f57b388d9f1aaadc7ae2b6b52916432a078d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow users the ability to update the instance name"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This review introduces a new PATCH call for updating instance"},{"line_number":10,"context_line":"name and configurations. The long term plan is to deprecate PUT"},{"line_number":11,"context_line":"in favor of PATCH."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7adec928_8cd3ba37","line":9,"in_reply_to":"7adec928_4f1292b5","updated":"2014-05-08 08:14:07.000000000","message":"I don\u0027t necessarily see anything wrong with this commit message body.","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5bcfc9d7caf075b72838b0d77b8bc1a9dd55f3f2","unresolved":false,"context_lines":[{"line_number":10,"context_line":"name and configurations. The long term plan is to deprecate PUT"},{"line_number":11,"context_line":"in favor of PATCH."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Related to bp update-instance-name"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I25c3b0906191afdc587f5ddd5777b3185dc080d4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7adec928_2fd8e61c","line":13,"updated":"2014-05-07 20:55:22.000000000","message":"Implements: blueprint update-instance-name","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":5293,"name":"Nikhil","email":"SlickNik@gmail.com","username":"slicknik"},"change_message_id":"65b1f57b388d9f1aaadc7ae2b6b52916432a078d","unresolved":false,"context_lines":[{"line_number":10,"context_line":"name and configurations. The long term plan is to deprecate PUT"},{"line_number":11,"context_line":"in favor of PATCH."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Related to bp update-instance-name"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I25c3b0906191afdc587f5ddd5777b3185dc080d4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7adec928_4cf1b2cc","line":13,"in_reply_to":"7adec928_2fd8e61c","updated":"2014-05-08 08:14:07.000000000","message":"Looks like Gerrit is picking up the bp just fine, so it looks like the syntax is okay.","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"12c3d69dc55ad07003fe07eb76fcf79692411436","unresolved":false,"context_lines":[{"line_number":13,"context_line":"instance name and/or configurations."},{"line_number":14,"context_line":"The long term plan is to deprecate PUT in favor of PATCH."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Implements: blueprint update-instance-name"},{"line_number":17,"context_line":"Author: Iccha Sethi \u003ciccha.sethi@rackspace.com\u003e"},{"line_number":18,"context_line":"Co-Authored-By: Theron Voran \u003ctheron.voran@rackspace.com\u003e"},{"line_number":19,"context_line":"Co-Authored-By: Riddhi Shah \u003cridhi.j.shah@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"fa98f980_5a81f4c1","line":16,"updated":"2014-09-11 17:54:16.000000000","message":"I don\u0027t find any blueprints by this name.\n\nI do see https://blueprints.launchpad.net/trove/+spec/modify-instance-name which talks about instance name but nothing about configurations.\n\nSo, I\u0027m not certain I know what the exact functionality regarding configurations is being sought to be implemented. I\u0027m trying to glean from the comments but this is not ideal.","commit_id":"a47d392d2365f5e041e9dadbd6e70d85e1848d35"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"c41ea4a37a4fa53261d7d4dcaa38b8cf6219f31c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"instance name and/or configurations."},{"line_number":14,"context_line":"The long term plan is to deprecate PUT in favor of PATCH."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Implements: blueprint Allow users the ability to update the instance name"},{"line_number":17,"context_line":"Author: Iccha Sethi \u003ciccha.sethi@rackspace.com\u003e"},{"line_number":18,"context_line":"Co-Authored-By: Theron Voran \u003ctheron.voran@rackspace.com\u003e"},{"line_number":19,"context_line":"Co-Authored-By: Riddhi Shah \u003cridhi.j.shah@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"9aa7fdbe_387e8de5","line":16,"updated":"2014-10-18 04:25:42.000000000","message":"only if someone places a -1 or -2 on this patch-set for a legitimate reason, i\u0027d ask you update this to \"Implements: blueprint update-instance-name\" since the above doesn\u0027t resolve.","commit_id":"2fe147c66e9a64abda15b5a6e162a6d4b3a04554"}],"trove/common/api.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5bcfc9d7caf075b72838b0d77b8bc1a9dd55f3f2","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027PUT\u0027]})"},{"line_number":84,"context_line":"        mapper.connect(\u0027/{tenant_id}/instances/{id}\u0027,"},{"line_number":85,"context_line":"                       controller\u003dinstance_resource,"},{"line_number":86,"context_line":"                       action\u003d\u0027edit\u0027,"},{"line_number":87,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027PATCH\u0027]})"},{"line_number":88,"context_line":"        mapper.connect(\"/{tenant_id}/instances/{id}\","},{"line_number":89,"context_line":"                       controller\u003dinstance_resource,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_af1156ae","line":86,"updated":"2014-05-07 20:55:22.000000000","message":"edit? can it be patch ?","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"5b326072939fb628208320c833f552a756cd2dbb","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027PUT\u0027]})"},{"line_number":84,"context_line":"        mapper.connect(\u0027/{tenant_id}/instances/{id}\u0027,"},{"line_number":85,"context_line":"                       controller\u003dinstance_resource,"},{"line_number":86,"context_line":"                       action\u003d\u0027edit\u0027,"},{"line_number":87,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027PATCH\u0027]})"},{"line_number":88,"context_line":"        mapper.connect(\"/{tenant_id}/instances/{id}\","},{"line_number":89,"context_line":"                       controller\u003dinstance_resource,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_9162ead6","line":86,"in_reply_to":"7adec928_ac94f637","updated":"2014-05-08 15:17:05.000000000","message":"The issue with keeping the same action update is that update implements PUT. So that means, when the body doesn\u0027t have \u0027configuration\u0027 it detaches the configuration. We want PATCH to detach the configuration only if it is explicitly have \u0027configuration\u0027 in the body and it is None. But however I like the idea of reusing the function, so will make edit use update.\nAnother issue with using the same update is, if we add name updation to PUT, it would break API contract. Since name deletion would happen whenever name is not specified in the PUT body.","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":5293,"name":"Nikhil","email":"SlickNik@gmail.com","username":"slicknik"},"change_message_id":"65b1f57b388d9f1aaadc7ae2b6b52916432a078d","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027PUT\u0027]})"},{"line_number":84,"context_line":"        mapper.connect(\u0027/{tenant_id}/instances/{id}\u0027,"},{"line_number":85,"context_line":"                       controller\u003dinstance_resource,"},{"line_number":86,"context_line":"                       action\u003d\u0027edit\u0027,"},{"line_number":87,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027PATCH\u0027]})"},{"line_number":88,"context_line":"        mapper.connect(\"/{tenant_id}/instances/{id}\","},{"line_number":89,"context_line":"                       controller\u003dinstance_resource,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_ac94f637","line":86,"in_reply_to":"7adec928_af1156ae","updated":"2014-05-08 08:14:07.000000000","message":"Is it possible to keep the same action (i.e. update) but with the PATCH method? \n\nIf so, this might be preferable. Thoughts?","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"}],"trove/common/apischema.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"12c3d69dc55ad07003fe07eb76fcf79692411436","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                \"properties\": {"},{"line_number":305,"context_line":"                    \"slave_of\": {},"},{"line_number":306,"context_line":"                    \"name\": non_empty_string,"},{"line_number":307,"context_line":"                    \"configuration_id\": configuration_id,"},{"line_number":308,"context_line":"                }"},{"line_number":309,"context_line":"            }"},{"line_number":310,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa98f980_fa71c80c","line":307,"updated":"2014-09-11 17:54:16.000000000","message":"this isn\u0027t part of the only blueprint I can find. Last time I\u0027ll mention this (promise).","commit_id":"a47d392d2365f5e041e9dadbd6e70d85e1848d35"}],"trove/instance/models.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"35ba47edbaf11efc6f8611296e65684caae96086","unresolved":false,"context_lines":[{"line_number":968,"context_line":"        overrides \u003d Configuration.get_configuration_overrides("},{"line_number":969,"context_line":"            self.context, configuration.id)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"        LOG.debug(\"Config overrides is %s.\" % overrides)"},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"        self.update_overrides(overrides)"},{"line_number":974,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_48cd1f86","line":971,"updated":"2014-09-08 15:58:27.000000000","message":"do we really need to print overrides?","commit_id":"dee035223be2927bb4ac1598fdb04d04e55daac6"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"12c3d69dc55ad07003fe07eb76fcf79692411436","unresolved":false,"context_lines":[{"line_number":964,"context_line":""},{"line_number":965,"context_line":"        config \u003d Configuration(self.context, configuration.id)"},{"line_number":966,"context_line":"        LOG.debug(\"Config config is %s.\" % config)"},{"line_number":967,"context_line":"        self.update_db(configuration_id\u003dconfiguration.id)"},{"line_number":968,"context_line":"        self.update_overrides(config)"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"    def update_overrides(self, config):"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa98f980_3a1fd06d","side":"PARENT","line":967,"updated":"2014-09-11 17:54:16.000000000","message":"I\u0027m not positive that I understand this change, especially given the change from the previous patch set.","commit_id":"43801e85da2df930cf64ed441b77cc0ce4a420a0"}],"trove/instance/service.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5bcfc9d7caf075b72838b0d77b8bc1a9dd55f3f2","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        \"\"\"Updates the instance to attach/detach configuration \"\"\""},{"line_number":265,"context_line":"        \"\"\"and/or update name.\"\"\""},{"line_number":266,"context_line":"        LOG.info(_(\"Updating instance for tenant id %s\") % tenant_id)"},{"line_number":267,"context_line":"        LOG.info(_(\"req: %s\") % req)"},{"line_number":268,"context_line":"        LOG.info(_(\"body: %s\") % body)"},{"line_number":269,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_2f1d46be","line":267,"updated":"2014-05-07 20:55:22.000000000","message":"LOG.info(logging.mask_password(_(\"req: %s\") % req)","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5bcfc9d7caf075b72838b0d77b8bc1a9dd55f3f2","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        \"\"\"and/or update name.\"\"\""},{"line_number":266,"context_line":"        LOG.info(_(\"Updating instance for tenant id %s\") % tenant_id)"},{"line_number":267,"context_line":"        LOG.info(_(\"req: %s\") % req)"},{"line_number":268,"context_line":"        LOG.info(_(\"body: %s\") % body)"},{"line_number":269,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"        instance \u003d models.Instance.load(context, id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_6f7e6ee6","line":268,"updated":"2014-05-07 20:55:22.000000000","message":"LOG.info(logging.mask_password(_(\"body: %s\") % body)","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"2b4650135e53527c95c03f87d0edf4553bcd0b96","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        # the new configuration."},{"line_number":275,"context_line":"        # if instance name is set, then we will update the instance name."},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        if \u0027instance\u0027 in body:"},{"line_number":278,"context_line":"            configuration_id \u003d self._configuration_parse(context, body)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"            if \u0027configuration\u0027 in body[\u0027instance\u0027]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_cfaf822a","line":277,"updated":"2014-05-07 21:04:41.000000000","message":"instance already in body, no need to check for its existance.","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"22858746f4b201e8bc940375bc36f7799bc3e76a","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        # the new configuration."},{"line_number":275,"context_line":"        # if instance name is set, then we will update the instance name."},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        if \u0027instance\u0027 in body:"},{"line_number":278,"context_line":"            configuration_id \u003d self._configuration_parse(context, body)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"            if \u0027configuration\u0027 in body[\u0027instance\u0027]:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_3682ec4f","line":277,"in_reply_to":"7adec928_cfaf822a","updated":"2014-05-08 14:39:34.000000000","message":"if the user makes a curl req with empty body is that check performed anywhere?","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"2b4650135e53527c95c03f87d0edf4553bcd0b96","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                    instance.assign_configuration(configuration_id)"},{"line_number":283,"context_line":"                else:"},{"line_number":284,"context_line":"                    instance.unassign_configuration()"},{"line_number":285,"context_line":"                del body[\u0027instance\u0027][\u0027configuration\u0027]"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"            if \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":288,"context_line":"                instance.update_db(body[\u0027instance\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_cf5dc24a","line":285,"updated":"2014-05-07 21:04:41.000000000","message":"no need to do this, because body attribute is not used anywhere else","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"6b9f9e0647782b828e563ac58d73f3843858d90c","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        configuration_id \u003d self._configuration_parse(context, body)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        if configuration_id:"},{"line_number":258,"context_line":"            instance.assign_configuration(configuration_id)"},{"line_number":259,"context_line":"        else:"},{"line_number":260,"context_line":"            instance.unassign_configuration()"},{"line_number":261,"context_line":"        return wsgi.Result(None, 202)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_4a48efb2","line":258,"updated":"2014-05-19 15:26:23.000000000","message":"The change to this function was done in the models.py\n\nSince the edit fn calls this update fn, which in turn uses models.py i think the changes in the new patch will be preserved for this change.","commit_id":"c2c302212dd3000b3f0c91e765200246a782aafa"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"296f3a4ef4afc13bf07e4585024e013628fb1fcf","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        if \u0027instance\u0027 in body:"},{"line_number":278,"context_line":"            if \u0027configuration\u0027 in body[\u0027instance\u0027]:"},{"line_number":279,"context_line":"                self.update(req, id, body, tenant_id)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"            if \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":282,"context_line":"                instance.update_db(name\u003dbody[\u0027instance\u0027][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_735d5821","line":279,"updated":"2014-05-08 23:56:11.000000000","message":"I believe there was a recent change [1] that only allows assign_configuration when there isn\u0027t an already assigned config (i.e. you have to do detach/unassign first). I\u0027m don\u0027t think this will work due to that. - however, I could be wrong\n\n[1] https://review.openstack.org/#/c/88591/","commit_id":"c2c302212dd3000b3f0c91e765200246a782aafa"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"6b9f9e0647782b828e563ac58d73f3843858d90c","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        if \u0027instance\u0027 in body:"},{"line_number":278,"context_line":"            if \u0027configuration\u0027 in body[\u0027instance\u0027]:"},{"line_number":279,"context_line":"                self.update(req, id, body, tenant_id)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"            if \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":282,"context_line":"                instance.update_db(name\u003dbody[\u0027instance\u0027][\u0027name\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_cad31fd3","line":279,"in_reply_to":"7adec928_735d5821","updated":"2014-05-19 15:26:23.000000000","message":"Addressed this concern in the comment above.","commit_id":"c2c302212dd3000b3f0c91e765200246a782aafa"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"1bd7f606fe039668299a3f79157534941c129887","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        \"\"\"Updates the instance to attach/detach configuration \"\"\""},{"line_number":265,"context_line":"        \"\"\"and/or update name.\"\"\""},{"line_number":266,"context_line":"        LOG.info(_(\"Updating instance for tenant id %s\") % tenant_id)"},{"line_number":267,"context_line":"        LOG.info(logging.mask_password(_(\"req: %s\") % req))"},{"line_number":268,"context_line":"        LOG.info(logging.mask_password(_(\"body: %s\") % body))"},{"line_number":269,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_4d1e4e0d","line":267,"updated":"2014-06-05 16:44:25.000000000","message":"wouldn\u0027t this and the next one be more appropriately LOG.debug?","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1fc9f74b5ff9bca52a3e96f2d34cb7364760ec91","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        \"\"\"Updates the instance to attach/detach configuration \"\"\""},{"line_number":265,"context_line":"        \"\"\"and/or update name.\"\"\""},{"line_number":266,"context_line":"        LOG.info(_(\"Updating instance for tenant id %s\") % tenant_id)"},{"line_number":267,"context_line":"        LOG.info(logging.mask_password(_(\"req: %s\") % req))"},{"line_number":268,"context_line":"        LOG.info(logging.mask_password(_(\"body: %s\") % body))"},{"line_number":269,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_f3f506cd","line":267,"in_reply_to":"1ae5cdf2_4d1e4e0d","updated":"2014-06-23 14:22:20.000000000","message":"changed.","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"598ae8c0177f6561a9d008ad21be700a7799bc3a","unresolved":false,"context_lines":[{"line_number":279,"context_line":"                self.update(req, id, body, tenant_id)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"            if \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":282,"context_line":"                instance.update_db(name\u003dbody[\u0027instance\u0027][\u0027name\u0027])"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        return wsgi.Result(None, 204)"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_5ad14bcc","line":282,"updated":"2014-06-09 14:17:18.000000000","message":"A PATCH must patch atomically (http://tools.ietf.org/html/rfc5789 - search for atomic).  This method makes two calls to update_db, so could theoretically allow someone to GET an instance with the old name and new configuration.","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1fc9f74b5ff9bca52a3e96f2d34cb7364760ec91","unresolved":false,"context_lines":[{"line_number":279,"context_line":"                self.update(req, id, body, tenant_id)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"            if \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":282,"context_line":"                instance.update_db(name\u003dbody[\u0027instance\u0027][\u0027name\u0027])"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        return wsgi.Result(None, 204)"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_b3237e57","line":282,"in_reply_to":"1ae5cdf2_5ad14bcc","updated":"2014-06-23 14:22:20.000000000","message":"good point. addressed in next patch.","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"28ffb8d7ebd5047e77178645bafb502bd5fe3e81","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        if configuration_id:"},{"line_number":263,"context_line":"            instance.assign_configuration(configuration_id)"},{"line_number":264,"context_line":"            instance.update_db(configuration_id\u003dconfiguration_id)"},{"line_number":265,"context_line":"        else:"},{"line_number":266,"context_line":"            instance.unassign_configuration()"},{"line_number":267,"context_line":"            instance.update_db(configuration_id\u003dNone)"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_ae422fa9","line":264,"updated":"2014-07-29 20:56:33.000000000","message":"I\u0027m curious about this change. The update_db() call was in assign_configuration() before and you\u0027ve moved it here.\n\nWhy have two of them? why not just have one with configuration_id \u003d configuration_id? or back in assign_configuration()\n\nThis is a smaller version of the kind of thing Auston seems to be pointing out below?","commit_id":"fbcb5b665fe29763e3a935630e735314759f268b"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"d054eb8f535d0381def0beac98c8ffc41f16cccb","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        if configuration_id:"},{"line_number":263,"context_line":"            instance.assign_configuration(configuration_id)"},{"line_number":264,"context_line":"            instance.update_db(configuration_id\u003dconfiguration_id)"},{"line_number":265,"context_line":"        else:"},{"line_number":266,"context_line":"            instance.unassign_configuration()"},{"line_number":267,"context_line":"            instance.update_db(configuration_id\u003dNone)"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_0da485a1","line":264,"in_reply_to":"baada198_ae422fa9","updated":"2014-08-01 22:02:16.000000000","message":"My guess is it\u0027s something to do with _configuration_parse() returning an empty string instead of None if there\u0027s no configuration id in the body.\n\nThe update_db calls were removed from the assign_configuration() routines in instance/model.py and taskmanager/model.py to make the PATCH call (below) more atomic. i.e. If name and configuration are passed on the same patch call then both need to be updated in one update_db call. That also affects this update() routine, hence the added update_db call.\n\nI\u0027ll try to simplify it à la **kwargs in the next patch.","commit_id":"fbcb5b665fe29763e3a935630e735314759f268b"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"32af49053ebc005db126373bcdb4e9738671f2de","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        # the new configuration."},{"line_number":284,"context_line":"        # if instance name is set, then we will update the instance name."},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        if \u0027instance\u0027 in body:"},{"line_number":287,"context_line":"            if \u0027configuration\u0027 in body[\u0027instance\u0027]:"},{"line_number":288,"context_line":"                # if configuration is set, then we will update the instance to"},{"line_number":289,"context_line":"                # use the new configuration.  If configuration is empty, we"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_5b423aac","line":286,"updated":"2014-07-29 17:28:05.000000000","message":"this logic is a bit repetitive, could be simplified into something resembling:\n\nargs \u003d {}\nif \u0027configuration\u0027 in body[\u0027instance\u0027]:\n    configuration_id \u003d self._configuration_parse(context, body)\n    if configuration_id:\n        instance.assign_configuration(configuration_id)\n        args[\u0027configuration_id\u0027] \u003d configuration_id\n    else:\n        instance.unassign_configuration()\n        args[\u0027configuration_id\u0027] \u003d None\nif \u0027name\u0027 in body[\u0027instance\u0027]:\n    args[\u0027name\u0027] \u003d body[\u0027instance\u0027][\u0027name\u0027]\nif args:\n    instance.update_db(**args)","commit_id":"fbcb5b665fe29763e3a935630e735314759f268b"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"d054eb8f535d0381def0beac98c8ffc41f16cccb","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        # the new configuration."},{"line_number":284,"context_line":"        # if instance name is set, then we will update the instance name."},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        if \u0027instance\u0027 in body:"},{"line_number":287,"context_line":"            if \u0027configuration\u0027 in body[\u0027instance\u0027]:"},{"line_number":288,"context_line":"                # if configuration is set, then we will update the instance to"},{"line_number":289,"context_line":"                # use the new configuration.  If configuration is empty, we"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_c4bdffb3","line":286,"in_reply_to":"baada198_5b423aac","updated":"2014-08-01 22:02:16.000000000","message":"Sure, that looks good.","commit_id":"fbcb5b665fe29763e3a935630e735314759f268b"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"32af49053ebc005db126373bcdb4e9738671f2de","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            elif \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":310,"context_line":"                instance.update_db(name\u003dbody[\u0027instance\u0027][\u0027name\u0027])"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        return wsgi.Result(None, 204)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def configuration(self, req, tenant_id, id):"},{"line_number":315,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_9bbbf2e3","line":312,"updated":"2014-07-29 17:28:05.000000000","message":"why is this a 204 vs. returning InstanceDetailView?","commit_id":"fbcb5b665fe29763e3a935630e735314759f268b"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"d054eb8f535d0381def0beac98c8ffc41f16cccb","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            elif \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":310,"context_line":"                instance.update_db(name\u003dbody[\u0027instance\u0027][\u0027name\u0027])"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        return wsgi.Result(None, 204)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def configuration(self, req, tenant_id, id):"},{"line_number":315,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_dfb22849","line":312,"in_reply_to":"baada198_9bbbf2e3","updated":"2014-08-01 22:02:16.000000000","message":"Looks like it was defined in the wiki spec that way, and the similar update() routine above doesn\u0027t return InstanceDetailView either.","commit_id":"fbcb5b665fe29763e3a935630e735314759f268b"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"c5a2755124fc850f61257c0a8d0de54c4e654ffe","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        configuration_id \u003d self._configuration_parse(context, body)"},{"line_number":258,"context_line":"        if configuration_id:"},{"line_number":259,"context_line":"            instance.assign_configuration(configuration_id)"},{"line_number":260,"context_line":"            update_args[\u0027configuration_id\u0027] \u003d configuration_id"},{"line_number":261,"context_line":"        else:"},{"line_number":262,"context_line":"            instance.unassign_configuration()"},{"line_number":263,"context_line":"            update_args[\u0027configuration_id\u0027] \u003d None"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_e9fb37bc","line":260,"updated":"2014-08-06 11:05:19.000000000","message":"unclear to me why you need two lines of code for this. Wouldn\u0027t the same purpose be served by making it just update_args[\u0027...\u0027]\u003d configuration_id, outside this IF?","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":7796,"name":"Riddhi Shah","email":"ridhi.j.shah@gmail.com","username":"ridhi-j-shah"},"change_message_id":"d80fa684067f77392f596ccd3fda95e55c5d4e6d","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        configuration_id \u003d self._configuration_parse(context, body)"},{"line_number":258,"context_line":"        if configuration_id:"},{"line_number":259,"context_line":"            instance.assign_configuration(configuration_id)"},{"line_number":260,"context_line":"            update_args[\u0027configuration_id\u0027] \u003d configuration_id"},{"line_number":261,"context_line":"        else:"},{"line_number":262,"context_line":"            instance.unassign_configuration()"},{"line_number":263,"context_line":"            update_args[\u0027configuration_id\u0027] \u003d None"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_345c6025","line":260,"in_reply_to":"baada198_a04cd776","updated":"2014-08-25 20:38:43.000000000","message":"Done","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"1de6d98e8cd082ec2225dfd32eff5547375e3a9b","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        configuration_id \u003d self._configuration_parse(context, body)"},{"line_number":258,"context_line":"        if configuration_id:"},{"line_number":259,"context_line":"            instance.assign_configuration(configuration_id)"},{"line_number":260,"context_line":"            update_args[\u0027configuration_id\u0027] \u003d configuration_id"},{"line_number":261,"context_line":"        else:"},{"line_number":262,"context_line":"            instance.unassign_configuration()"},{"line_number":263,"context_line":"            update_args[\u0027configuration_id\u0027] \u003d None"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_a04cd776","line":260,"in_reply_to":"baada198_e9fb37bc","updated":"2014-08-06 22:55:18.000000000","message":"+1, could be:\n\n    if configuration_id:\n        instance.assign_configuration(configuration_id)\n    else:\n        instance.unassign_configuration()\n\n    update_args[\u0027configuration_id\u0027] \u003d configuration_id\n    instance.update_db(**update_args)\n    return wsgi.Result(None, 202)","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"c5a2755124fc850f61257c0a8d0de54c4e654ffe","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        Updates the instance to attach/detach configuration"},{"line_number":270,"context_line":"        and/or update name."},{"line_number":271,"context_line":"        \"\"\""},{"line_number":272,"context_line":"        LOG.info(_(\"Updating instance for tenant id %s\") % tenant_id)"},{"line_number":273,"context_line":"        LOG.debug(logging.mask_password(_(\"req: %s\") % req))"},{"line_number":274,"context_line":"        LOG.debug(logging.mask_password(_(\"body: %s\") % body))"},{"line_number":275,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_c91593e7","line":272,"updated":"2014-08-06 11:05:19.000000000","message":"UPDATING would go to the PUT method. Just for simplicity, I\u0027d say call this EDITING or PATCHING. And please put a \u0027.\u0027 at the end of the message.","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"1de6d98e8cd082ec2225dfd32eff5547375e3a9b","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        Updates the instance to attach/detach configuration"},{"line_number":270,"context_line":"        and/or update name."},{"line_number":271,"context_line":"        \"\"\""},{"line_number":272,"context_line":"        LOG.info(_(\"Updating instance for tenant id %s\") % tenant_id)"},{"line_number":273,"context_line":"        LOG.debug(logging.mask_password(_(\"req: %s\") % req))"},{"line_number":274,"context_line":"        LOG.debug(logging.mask_password(_(\"body: %s\") % body))"},{"line_number":275,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_e06defcc","line":272,"in_reply_to":"baada198_c91593e7","updated":"2014-08-06 22:55:18.000000000","message":"agreed to changing \"Updating\" to \"Editing\", and adding a period.","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":7796,"name":"Riddhi Shah","email":"ridhi.j.shah@gmail.com","username":"ridhi-j-shah"},"change_message_id":"d80fa684067f77392f596ccd3fda95e55c5d4e6d","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        Updates the instance to attach/detach configuration"},{"line_number":270,"context_line":"        and/or update name."},{"line_number":271,"context_line":"        \"\"\""},{"line_number":272,"context_line":"        LOG.info(_(\"Updating instance for tenant id %s\") % tenant_id)"},{"line_number":273,"context_line":"        LOG.debug(logging.mask_password(_(\"req: %s\") % req))"},{"line_number":274,"context_line":"        LOG.debug(logging.mask_password(_(\"body: %s\") % body))"},{"line_number":275,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_94ba9421","line":272,"in_reply_to":"baada198_e06defcc","updated":"2014-08-25 20:38:43.000000000","message":"Done","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"c5a2755124fc850f61257c0a8d0de54c4e654ffe","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        edit_args \u003d {}"},{"line_number":286,"context_line":"        if \u0027configuration\u0027 in body[\u0027instance\u0027]:"},{"line_number":287,"context_line":"            configuration_id \u003d self._configuration_parse(context, body)"},{"line_number":288,"context_line":"            if configuration_id:"},{"line_number":289,"context_line":"                instance.assign_configuration(configuration_id)"},{"line_number":290,"context_line":"                edit_args[\u0027configuration_id\u0027] \u003d configuration_id"},{"line_number":291,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_69b567ec","line":288,"updated":"2014-08-06 11:05:19.000000000","message":"This block appears to be something that could be simplified.\n\nSince assigning a configuration of None is analogous to unassigning a configuration, this whole block could drop to two lines.","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"c5a2755124fc850f61257c0a8d0de54c4e654ffe","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                edit_args[\u0027configuration_id\u0027] \u003d None"},{"line_number":294,"context_line":"        if \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":295,"context_line":"            edit_args[\u0027name\u0027] \u003d body[\u0027instance\u0027][\u0027name\u0027]"},{"line_number":296,"context_line":"        if edit_args:"},{"line_number":297,"context_line":"            instance.update_db(**edit_args)"},{"line_number":298,"context_line":"        return wsgi.Result(None, 204)"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_a98dbf37","line":296,"updated":"2014-08-06 11:05:19.000000000","message":"Doesn\u0027t this mean that you\u0027ll never update the DB to indicate disassociating of the configuration group?","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":7796,"name":"Riddhi Shah","email":"ridhi.j.shah@gmail.com","username":"ridhi-j-shah"},"change_message_id":"d80fa684067f77392f596ccd3fda95e55c5d4e6d","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                edit_args[\u0027configuration_id\u0027] \u003d None"},{"line_number":294,"context_line":"        if \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":295,"context_line":"            edit_args[\u0027name\u0027] \u003d body[\u0027instance\u0027][\u0027name\u0027]"},{"line_number":296,"context_line":"        if edit_args:"},{"line_number":297,"context_line":"            instance.update_db(**edit_args)"},{"line_number":298,"context_line":"        return wsgi.Result(None, 204)"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_e6352cf8","line":296,"in_reply_to":"baada198_9d0faad3","updated":"2014-08-25 20:38:43.000000000","message":"Changed the client to explicitly specify if config group needs to be dropped.\nhttps://review.openstack.org/#/c/116369/","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"1de6d98e8cd082ec2225dfd32eff5547375e3a9b","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                edit_args[\u0027configuration_id\u0027] \u003d None"},{"line_number":294,"context_line":"        if \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":295,"context_line":"            edit_args[\u0027name\u0027] \u003d body[\u0027instance\u0027][\u0027name\u0027]"},{"line_number":296,"context_line":"        if edit_args:"},{"line_number":297,"context_line":"            instance.update_db(**edit_args)"},{"line_number":298,"context_line":"        return wsgi.Result(None, 204)"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_e0c96fac","line":296,"in_reply_to":"baada198_a98dbf37","updated":"2014-08-06 22:55:18.000000000","message":"good point. it turns out the cli only adds configuration to the instance body if it\u0027s not None.\n\n        if configuration is not None:\n            body[\"instance\"][\"configuration\"] \u003d configuration\n\nthis was fine when it was the only parameter you could edit on instances, but now the concept is broken, because with this code, there\u0027s no way to drop the configuration-group.\n\nfixing this to the old logic where the absense of a configuration_id means to drop isn\u0027t acceptable, as that\u0027d likely be shocking (\"i said to update the name, why did you drop the configuration-group on a PATCH?!\").\n\nnot sure how to fix this....","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"18712b07cd04e919490a9c76a6cfa0ca67c21490","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                edit_args[\u0027configuration_id\u0027] \u003d None"},{"line_number":294,"context_line":"        if \u0027name\u0027 in body[\u0027instance\u0027]:"},{"line_number":295,"context_line":"            edit_args[\u0027name\u0027] \u003d body[\u0027instance\u0027][\u0027name\u0027]"},{"line_number":296,"context_line":"        if edit_args:"},{"line_number":297,"context_line":"            instance.update_db(**edit_args)"},{"line_number":298,"context_line":"        return wsgi.Result(None, 204)"},{"line_number":299,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_9d0faad3","line":296,"in_reply_to":"baada198_e0c96fac","updated":"2014-08-12 00:30:52.000000000","message":"Auston, I\u0027ve been poking at ways to try and fix this and I\u0027m stumped. Not sure how to dig out of this.","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":5390,"name":"Steve Leon","username":"steve-leon","inactive":true},"change_message_id":"f4fb9dd5e8734285ed05a8a94b94a21dd90e0eac","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        # If instance name is set, then we will update the instance name."},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        edit_args \u003d {}"},{"line_number":286,"context_line":"        if \u0027configuration\u0027 in body[\u0027instance\u0027]:"},{"line_number":287,"context_line":"            configuration_id \u003d self._configuration_parse(context, body)"},{"line_number":288,"context_line":"            if configuration_id:"},{"line_number":289,"context_line":"                instance.assign_configuration(configuration_id)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_dc6b6f83","line":286,"updated":"2014-08-26 21:08:57.000000000","message":"Just nikpicking but you can remove this check since it is being done in _configuration.parse()","commit_id":"0c565dfe76c1c68e3100ee39bf79255320131958"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"1688c3101a59f8859f4f7f9658a1b40f57ce551e","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        # If instance name is set, then we will update the instance name."},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        edit_args \u003d {}"},{"line_number":286,"context_line":"        if \u0027configuration\u0027 in body[\u0027instance\u0027]:"},{"line_number":287,"context_line":"            configuration_id \u003d self._configuration_parse(context, body)"},{"line_number":288,"context_line":"            if configuration_id:"},{"line_number":289,"context_line":"                instance.assign_configuration(configuration_id)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa98f980_e1d4e921","line":286,"in_reply_to":"1abeadc6_dc6b6f83","updated":"2014-09-02 14:26:35.000000000","message":"+1","commit_id":"0c565dfe76c1c68e3100ee39bf79255320131958"},{"author":{"_account_id":8214,"name":"Auston McReynolds","email":"amcreynolds@ebaysf.com","username":"amcreynolds"},"change_message_id":"124a9834c1911b3587f5a484bc67de85396fac19","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        if edit_args:"},{"line_number":298,"context_line":"            instance.update_db(**edit_args)"},{"line_number":299,"context_line":"        return wsgi.Result(None, 204)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def configuration(self, req, tenant_id, id):"},{"line_number":302,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_c3d44249","line":299,"updated":"2014-09-02 17:57:29.000000000","message":"should be 202 vs. 204, because the request hasn\u0027t been fully serviced for configuration-group changes.","commit_id":"a205c9baf9ba7f8ec074c02fb3104266f66866bd"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"d3d042601500c7dc45d72ae1b82729368341f125","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        if edit_args:"},{"line_number":298,"context_line":"            instance.update_db(**edit_args)"},{"line_number":299,"context_line":"        return wsgi.Result(None, 204)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def configuration(self, req, tenant_id, id):"},{"line_number":302,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_a9271fb5","line":299,"in_reply_to":"fa98f980_c3d44249","updated":"2014-09-02 18:36:50.000000000","message":"Yeah this is my bad, when I wrote this initially totally didnt take into consideration that this is async. 202 sounds more appropriate.","commit_id":"a205c9baf9ba7f8ec074c02fb3104266f66866bd"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"40ed9e61019b20ed732f5bd8cdcbaa0064b26ab8","unresolved":false,"context_lines":[{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def edit(self, req, id, body, tenant_id):"},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        Updates the instance to attach/detach configuration"},{"line_number":270,"context_line":"        and/or update name."},{"line_number":271,"context_line":"        \"\"\""},{"line_number":272,"context_line":"        LOG.info(_(\"Editing instance for tenant id %s .\") % tenant_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_4b885dc5","line":269,"updated":"2014-09-03 00:57:27.000000000","message":"maybe worth updating this string. Call it patches, maybe?","commit_id":"5687c8333bc34adb3ed95e9adb432c5b95b76957"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"40ed9e61019b20ed732f5bd8cdcbaa0064b26ab8","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        instance \u003d models.Instance.load(context, id)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        # If configuration is set, then we will update the instance to"},{"line_number":280,"context_line":"        # use the new configuration. If configuration is empty, we"},{"line_number":281,"context_line":"        # want to disassociate the instance from the configuration"},{"line_number":282,"context_line":"        # group and remove the active overrides file."}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_765348e2","line":279,"range":{"start_line":279,"start_character":9,"end_line":279,"end_character":10},"updated":"2014-09-03 00:57:27.000000000","message":"the code here and in update() above could webll be merged. Considering how similar the comments are, I\u0027m assuming the code can\u0027t be too different.","commit_id":"5687c8333bc34adb3ed95e9adb432c5b95b76957"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"12c3d69dc55ad07003fe07eb76fcf79692411436","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        LOG.info(_(\"Updating database instance \u0027%(instance_id)s\u0027 for tenant \""},{"line_number":245,"context_line":"                   \"\u0027%(tenant_id)s\u0027\") %"},{"line_number":246,"context_line":"                 {\u0027instance_id\u0027: id, \u0027tenant_id\u0027: tenant_id})"},{"line_number":247,"context_line":"        LOG.debug(\"req: %s\" % req)"},{"line_number":248,"context_line":"        LOG.debug(\"body: %s\" % body)"},{"line_number":249,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"fa98f980_8d42443c","side":"PARENT","line":247,"updated":"2014-09-11 17:54:16.000000000","message":"I know you didn\u0027t change this but maybe you should mask_password() here?","commit_id":"43801e85da2df930cf64ed441b77cc0ce4a420a0"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"25197206ac5541dad128e4a66769698943eac83e","unresolved":false,"context_lines":[{"line_number":263,"context_line":"            instance.unassign_configuration()"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"        update_args[\u0027configuration_id\u0027] \u003d configuration_id"},{"line_number":266,"context_line":"        instance.update_db(**update_args)"},{"line_number":267,"context_line":"        return wsgi.Result(None, 202)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def edit(self, req, id, body, tenant_id):"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa98f980_c0b123e1","line":266,"updated":"2014-09-15 16:03:14.000000000","message":"General question: Why is update_db called? Isn\u0027t it called (directly or indirectly) in both assign_configuration and unassign_configuration?\n\nI see in the Gerrit comments that this has been understood by others but perhaps a comment in the code would help future readers of this code.","commit_id":"8c6c91569509df3c30e7b3c35561cc40eac09a72"}],"trove/tests/api/configurations.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5bcfc9d7caf075b72838b0d77b8bc1a9dd55f3f2","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        # test assigning a configuration to an instance"},{"line_number":264,"context_line":"        print(\"instance_info.id: %s\" % instance_info.id)"},{"line_number":265,"context_line":"        print(\"configuration_info: %s\" % configuration_info)"},{"line_number":266,"context_line":"        print(\"configuration_info.id: %s\" % configuration_info.id)"},{"line_number":267,"context_line":"        config_id \u003d configuration_info.id"},{"line_number":268,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":269,"context_line":"                                           configuration\u003dconfig_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_cf6ce239","line":266,"updated":"2014-05-07 20:55:22.000000000","message":"better to use reporter\n\nhttps://github.com/openstack/trove/blob/master/trove/tests/api/instances.py#L648","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"5bcfc9d7caf075b72838b0d77b8bc1a9dd55f3f2","unresolved":false,"context_lines":[{"line_number":274,"context_line":"    def test_assign_config_and_name_to_instance_using_patch(self):"},{"line_number":275,"context_line":"        # test assigning a configuration and name to an instance"},{"line_number":276,"context_line":"        new_name \u003d \u0027new_name\u0027"},{"line_number":277,"context_line":"        print(\"instance_info.id: %s\" % instance_info.id)"},{"line_number":278,"context_line":"        print(\"configuration_info: %s\" % configuration_info)"},{"line_number":279,"context_line":"        print(\"configuration_info.id: %s\" % configuration_info.id)"},{"line_number":280,"context_line":"        print(\"instance name:%s\" % instance_info.name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7adec928_af5f9671","line":277,"updated":"2014-05-07 20:55:22.000000000","message":"same","commit_id":"4dd3c3992a5c8d90cdd086b11b4f4451c760ca39"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"296f3a4ef4afc13bf07e4585024e013628fb1fcf","unresolved":false,"context_lines":[{"line_number":319,"context_line":"    @test(depends_on\u003d[test_assign_configuration_to_valid_instance_using_patch])"},{"line_number":320,"context_line":"    @time_out(10)"},{"line_number":321,"context_line":"    def test_get_configuration_details_from_instance_using_patch(self):"},{"line_number":322,"context_line":"        # validate that the configuraiton was applied correctly to the instance"},{"line_number":323,"context_line":"        inst \u003d instance_info.dbaas.instances.get(instance_info.id)"},{"line_number":324,"context_line":"        configuration_id \u003d inst.configuration[\u0027id\u0027]"},{"line_number":325,"context_line":"        assert_not_equal(None, inst.configuration[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_7018ee81","line":322,"updated":"2014-05-08 23:56:11.000000000","message":"minor - configuration spelled incorrectly","commit_id":"c2c302212dd3000b3f0c91e765200246a782aafa"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"6b9f9e0647782b828e563ac58d73f3843858d90c","unresolved":false,"context_lines":[{"line_number":319,"context_line":"    @test(depends_on\u003d[test_assign_configuration_to_valid_instance_using_patch])"},{"line_number":320,"context_line":"    @time_out(10)"},{"line_number":321,"context_line":"    def test_get_configuration_details_from_instance_using_patch(self):"},{"line_number":322,"context_line":"        # validate that the configuraiton was applied correctly to the instance"},{"line_number":323,"context_line":"        inst \u003d instance_info.dbaas.instances.get(instance_info.id)"},{"line_number":324,"context_line":"        configuration_id \u003d inst.configuration[\u0027id\u0027]"},{"line_number":325,"context_line":"        assert_not_equal(None, inst.configuration[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_0aaee72d","line":322,"in_reply_to":"7adec928_7018ee81","updated":"2014-05-19 15:26:23.000000000","message":"Thanks for pointing it out ! :)","commit_id":"c2c302212dd3000b3f0c91e765200246a782aafa"},{"author":{"_account_id":9746,"name":"Doug Shelley","email":"dougshelley66@gmail.com","username":"dougshelley"},"change_message_id":"296f3a4ef4afc13bf07e4585024e013628fb1fcf","unresolved":false,"context_lines":[{"line_number":329,"context_line":"    @test(depends_on\u003d[test_assign_config_and_name_to_instance_using_patch])"},{"line_number":330,"context_line":"    @time_out(10)"},{"line_number":331,"context_line":"    def test_get_config_details_and_name_from_instance_using_patch(self):"},{"line_number":332,"context_line":"        # validate that the configuraiton was applied correctly to the instance"},{"line_number":333,"context_line":"        inst \u003d instance_info.dbaas.instances.get(instance_info.id)"},{"line_number":334,"context_line":"        configuration_id \u003d inst.configuration[\u0027id\u0027]"},{"line_number":335,"context_line":"        assert_not_equal(None, inst.configuration[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_b0099633","line":332,"updated":"2014-05-08 23:56:11.000000000","message":"minor - configuration spelled incorrectly","commit_id":"c2c302212dd3000b3f0c91e765200246a782aafa"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"646d87e392b353d206ad7ca89636001a586a7912","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":270,"context_line":"                                           configuration\u003dconfig_id)"},{"line_number":271,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":272,"context_line":"        assert_equal(resp.status, 204)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @test"},{"line_number":275,"context_line":"    def test_assign_config_and_name_to_instance_using_patch(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_ac3021e9","line":272,"updated":"2014-06-03 04:09:42.000000000","message":"I\u0027d like to verify that the configuration was applied to the instance as well.","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1fc9f74b5ff9bca52a3e96f2d34cb7364760ec91","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":270,"context_line":"                                           configuration\u003dconfig_id)"},{"line_number":271,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":272,"context_line":"        assert_equal(resp.status, 204)"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    @test"},{"line_number":275,"context_line":"    def test_assign_config_and_name_to_instance_using_patch(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_f31c2617","line":272,"in_reply_to":"1ae5cdf2_ac3021e9","updated":"2014-06-23 14:22:20.000000000","message":"added in.","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"646d87e392b353d206ad7ca89636001a586a7912","unresolved":false,"context_lines":[{"line_number":286,"context_line":"                                           configuration\u003dconfig_id,"},{"line_number":287,"context_line":"                                           name\u003dnew_name)"},{"line_number":288,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":289,"context_line":"        assert_equal(resp.status, 204)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    @test(depends_on\u003d[test_assign_configuration_to_valid_instance])"},{"line_number":292,"context_line":"    def test_assign_configuration_to_instance_with_config(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_0c22f5a3","line":289,"updated":"2014-06-03 04:09:42.000000000","message":"I\u0027d like to see the instance name asserted as well as the configuration id and checking to see that the configuration was applied to the instance here.","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":1925,"name":"Vipul Sabhaya","email":"vipuls@gmail.com","username":"vipuls"},"change_message_id":"1c4cf3da4a8e399de43a8041238b197173890ecf","unresolved":false,"context_lines":[{"line_number":286,"context_line":"                                           configuration\u003dconfig_id,"},{"line_number":287,"context_line":"                                           name\u003dnew_name)"},{"line_number":288,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":289,"context_line":"        assert_equal(resp.status, 204)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    @test(depends_on\u003d[test_assign_configuration_to_valid_instance])"},{"line_number":292,"context_line":"    def test_assign_configuration_to_instance_with_config(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_863cfdc9","line":289,"in_reply_to":"1ae5cdf2_0c22f5a3","updated":"2014-06-04 00:31:14.000000000","message":"The edit call became a bit more complicated.  If we want to edit just the name of the instance, we also need to make sure the original configuration ID is also passed in.  Otherwise, the code will detach the configuration group from the instance.\n\nCan we add some tests for that scenario?","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"1fc9f74b5ff9bca52a3e96f2d34cb7364760ec91","unresolved":false,"context_lines":[{"line_number":286,"context_line":"                                           configuration\u003dconfig_id,"},{"line_number":287,"context_line":"                                           name\u003dnew_name)"},{"line_number":288,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":289,"context_line":"        assert_equal(resp.status, 204)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    @test(depends_on\u003d[test_assign_configuration_to_valid_instance])"},{"line_number":292,"context_line":"    def test_assign_configuration_to_instance_with_config(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_5314fae8","line":289,"in_reply_to":"1ae5cdf2_30195222","updated":"2014-06-23 14:22:20.000000000","message":"added in","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":1925,"name":"Vipul Sabhaya","email":"vipuls@gmail.com","username":"vipuls"},"change_message_id":"954d8de7b05bec25092b145bdd78ceb6903253ac","unresolved":false,"context_lines":[{"line_number":286,"context_line":"                                           configuration\u003dconfig_id,"},{"line_number":287,"context_line":"                                           name\u003dnew_name)"},{"line_number":288,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":289,"context_line":"        assert_equal(resp.status, 204)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    @test(depends_on\u003d[test_assign_configuration_to_valid_instance])"},{"line_number":292,"context_line":"    def test_assign_configuration_to_instance_with_config(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_30195222","line":289,"in_reply_to":"1ae5cdf2_863cfdc9","updated":"2014-06-05 18:18:33.000000000","message":"I may have jumped the gun here.  It seem that the configuration will only be detached if a \u0027configuration\u0027 attribute exists on the instance object.  So if we provide just a name, then configuration group should remain intact.","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"32a23d0d04481f3b2d9aeb6756256af46b106d94","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        inst \u003d instance_info.dbaas.instances.get(instance_info.id)"},{"line_number":324,"context_line":"        configuration_id \u003d inst.configuration[\u0027id\u0027]"},{"line_number":325,"context_line":"        assert_not_equal(None, inst.configuration[\u0027id\u0027])"},{"line_number":326,"context_line":"        _test_configuration_is_applied_to_instance(instance_info,"},{"line_number":327,"context_line":"                                                   configuration_id)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    @test(depends_on\u003d[test_assign_config_and_name_to_instance_using_patch])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_ad06bf1a","line":326,"updated":"2014-06-23 13:29:27.000000000","message":"the get tests here are meant to validate if it was applied. but will add in explicit assertions as well","commit_id":"2039b5c60e705b2eeafc1550339f3ddcc72065ec"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"28ffb8d7ebd5047e77178645bafb502bd5fe3e81","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"def _result_is_not_active(instance_id):"},{"line_number":146,"context_line":"    instance \u003d instance_info.dbaas.instances.get(instance_id)"},{"line_number":147,"context_line":"    if instance.status \u003d\u003d \"ACTIVE\":"},{"line_number":148,"context_line":"        return False"},{"line_number":149,"context_line":"    else:"},{"line_number":150,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_c97e7d6d","line":147,"updated":"2014-07-29 20:56:33.000000000","message":"You may want to consider changing this to \n\nreturn instance.status \u003d\u003d \"ACTIVE\"","commit_id":"fbcb5b665fe29763e3a935630e735314759f268b"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"d054eb8f535d0381def0beac98c8ffc41f16cccb","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"def _result_is_not_active(instance_id):"},{"line_number":146,"context_line":"    instance \u003d instance_info.dbaas.instances.get(instance_id)"},{"line_number":147,"context_line":"    if instance.status \u003d\u003d \"ACTIVE\":"},{"line_number":148,"context_line":"        return False"},{"line_number":149,"context_line":"    else:"},{"line_number":150,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_1fe74047","line":147,"in_reply_to":"baada198_c97e7d6d","updated":"2014-08-01 22:02:16.000000000","message":"Done","commit_id":"fbcb5b665fe29763e3a935630e735314759f268b"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"13ea155fd967e84b2f2990c18623d25824034fde","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        assert_true(converted_key_value in testconfig_info.values.items())"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"def _result_is_not_active(instance_id):"},{"line_number":146,"context_line":"    instance \u003d instance_info.dbaas.instances.get(instance_id)"},{"line_number":147,"context_line":"    return instance.status \u003d\u003d \"ACTIVE\""},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_82f2f466","line":145,"updated":"2014-08-04 08:06:36.000000000","message":"i think this method can be dropped off","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"34187eb6a8df1d54783b707f60e8f7635d06e9cf","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        assert_true(converted_key_value in testconfig_info.values.items())"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"def _result_is_not_active(instance_id):"},{"line_number":146,"context_line":"    instance \u003d instance_info.dbaas.instances.get(instance_id)"},{"line_number":147,"context_line":"    return instance.status \u003d\u003d \"ACTIVE\""},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_f31b756c","line":145,"in_reply_to":"baada198_82f2f466","updated":"2014-08-04 14:54:02.000000000","message":"Done","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":11428,"name":"Ajaya Agrawal","email":"ajku.agr@gmail.com","username":"ajayaa"},"change_message_id":"4cecc7b2764505343c985c3a57b61d31df94d29e","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        assert_equal(check.name, new_name)"},{"line_number":327,"context_line":"        # Restore instance name"},{"line_number":328,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":329,"context_line":"                                           name\u003dinstance_info.name)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    @test(depends_on\u003d[test_assign_configuration_to_valid_instance])"},{"line_number":332,"context_line":"    def test_assign_configuration_to_instance_with_config(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_65716a44","line":329,"updated":"2014-08-04 08:24:39.000000000","message":"add assertion call that validates http code from last call!","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"34187eb6a8df1d54783b707f60e8f7635d06e9cf","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        assert_equal(check.name, new_name)"},{"line_number":327,"context_line":"        # Restore instance name"},{"line_number":328,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":329,"context_line":"                                           name\u003dinstance_info.name)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    @test(depends_on\u003d[test_assign_configuration_to_valid_instance])"},{"line_number":332,"context_line":"    def test_assign_configuration_to_instance_with_config(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_732f6589","line":329,"in_reply_to":"baada198_65716a44","updated":"2014-08-04 14:54:02.000000000","message":"Done","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"13ea155fd967e84b2f2990c18623d25824034fde","unresolved":false,"context_lines":[{"line_number":751,"context_line":"        # remove the configuration from the instance"},{"line_number":752,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":753,"context_line":"                                           configuration\u003d\u0027\u0027)"},{"line_number":754,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":755,"context_line":"        assert_equal(resp.status, 204)"},{"line_number":756,"context_line":"        # restore instance name"},{"line_number":757,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_029ee405","line":754,"updated":"2014-08-04 08:06:36.000000000","message":"same here","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"34187eb6a8df1d54783b707f60e8f7635d06e9cf","unresolved":false,"context_lines":[{"line_number":751,"context_line":"        # remove the configuration from the instance"},{"line_number":752,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":753,"context_line":"                                           configuration\u003d\u0027\u0027)"},{"line_number":754,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":755,"context_line":"        assert_equal(resp.status, 204)"},{"line_number":756,"context_line":"        # restore instance name"},{"line_number":757,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_d34f5168","line":754,"in_reply_to":"baada198_029ee405","updated":"2014-08-04 14:54:02.000000000","message":"Done","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"13ea155fd967e84b2f2990c18623d25824034fde","unresolved":false,"context_lines":[{"line_number":756,"context_line":"        # restore instance name"},{"line_number":757,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":758,"context_line":"                                           name\u003dsaved_name)"},{"line_number":759,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":760,"context_line":"        assert_equal(resp.status, 204)"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    @test(depends_on\u003d[test_no_instances_on_configuration],"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_a2ed3890","line":759,"updated":"2014-08-04 08:06:36.000000000","message":"actually you don\u0027t have to do this, you could use:\n\nassert_equal(instance_info.dbaas.last_http_code, 204)\n\nthat\u0027s all","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"34187eb6a8df1d54783b707f60e8f7635d06e9cf","unresolved":false,"context_lines":[{"line_number":756,"context_line":"        # restore instance name"},{"line_number":757,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":758,"context_line":"                                           name\u003dsaved_name)"},{"line_number":759,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":760,"context_line":"        assert_equal(resp.status, 204)"},{"line_number":761,"context_line":""},{"line_number":762,"context_line":"    @test(depends_on\u003d[test_no_instances_on_configuration],"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_f3529510","line":759,"in_reply_to":"baada198_a2ed3890","updated":"2014-08-04 14:54:02.000000000","message":"Thanks, that\u0027s much nicer.","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"13ea155fd967e84b2f2990c18623d25824034fde","unresolved":false,"context_lines":[{"line_number":765,"context_line":"        # test that we can delete the configuration after no instances are"},{"line_number":766,"context_line":"        # assigned to it any longer"},{"line_number":767,"context_line":"        instance_info.dbaas.configurations.delete(configuration_info.id)"},{"line_number":768,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":769,"context_line":"        assert_equal(resp.status, 202)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"    @test(depends_on\u003d[test_delete_unassigned_configuration])"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_c2f06c68","line":768,"updated":"2014-08-04 08:06:36.000000000","message":"same here","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"34187eb6a8df1d54783b707f60e8f7635d06e9cf","unresolved":false,"context_lines":[{"line_number":765,"context_line":"        # test that we can delete the configuration after no instances are"},{"line_number":766,"context_line":"        # assigned to it any longer"},{"line_number":767,"context_line":"        instance_info.dbaas.configurations.delete(configuration_info.id)"},{"line_number":768,"context_line":"        resp, body \u003d instance_info.dbaas.client.last_response"},{"line_number":769,"context_line":"        assert_equal(resp.status, 202)"},{"line_number":770,"context_line":""},{"line_number":771,"context_line":"    @test(depends_on\u003d[test_delete_unassigned_configuration])"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_13562905","line":768,"in_reply_to":"baada198_c2f06c68","updated":"2014-08-04 14:54:02.000000000","message":"Done","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"c5a2755124fc850f61257c0a8d0de54c4e654ffe","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        assert_equal(resp.status, 202)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    @test"},{"line_number":308,"context_line":"    def test_assign_name_to_instance_using_patch(self):"},{"line_number":309,"context_line":"        # test assigning a name to an instance"},{"line_number":310,"context_line":"        new_name \u003d \u0027new_name_1\u0027"},{"line_number":311,"context_line":"        report \u003d CONFIG.get_report()"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_699ac763","line":308,"updated":"2014-08-06 11:05:19.000000000","message":"since the change appears to modify the way configurations are associated and disassociated from an instance, shouldn\u0027t there be tests for that?","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":5390,"name":"Steve Leon","username":"steve-leon","inactive":true},"change_message_id":"f4fb9dd5e8734285ed05a8a94b94a21dd90e0eac","unresolved":false,"context_lines":[{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        _test_configuration_is_applied_to_instance(instance_info,"},{"line_number":747,"context_line":"                                                   config_id)"},{"line_number":748,"context_line":"        # test assigning a configuration to an instance that"},{"line_number":749,"context_line":"        # already has an assigned configuration with patch"},{"line_number":750,"context_line":"        config_id \u003d configuration_info.id"},{"line_number":751,"context_line":"        assert_raises(exceptions.BadRequest,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_47e06ccc","line":748,"updated":"2014-08-26 21:08:57.000000000","message":"I would separate and put this negative test in a new test on his own. It will keep the tests cleaner and shorter.","commit_id":"0c565dfe76c1c68e3100ee39bf79255320131958"},{"author":{"_account_id":5293,"name":"Nikhil","email":"SlickNik@gmail.com","username":"slicknik"},"change_message_id":"2fe88372106953855979c124277f8f8911ee6757","unresolved":false,"context_lines":[{"line_number":778,"context_line":"        # assigned to it any longer"},{"line_number":779,"context_line":"        instance_info.dbaas.configurations.delete(configuration_info.id)"},{"line_number":780,"context_line":"        assert_equal(202, instance_info.dbaas.last_http_code)"},{"line_number":781,"context_line":""},{"line_number":782,"context_line":"    @test(depends_on\u003d[test_delete_unassigned_configuration])"},{"line_number":783,"context_line":"    @time_out(TIMEOUT_INSTANCE_DELETE)"},{"line_number":784,"context_line":"    def test_delete_configuration_instance(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_82a5ca48","line":781,"updated":"2014-09-03 00:12:37.000000000","message":"These tests should probably be moved out of the DeleteConfigurations class a different class (perhaps \"EditConfigurations\").","commit_id":"5687c8333bc34adb3ed95e9adb432c5b95b76957"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"35ba47edbaf11efc6f8611296e65684caae96086","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        # test assign config group to an invalid instance"},{"line_number":336,"context_line":"        invalid_id \u003d \"invalid-inst-id\""},{"line_number":337,"context_line":"        try:"},{"line_number":338,"context_line":"            instance_info.dbaas.instances.edit(invalid_id,"},{"line_number":339,"context_line":"                                               configuration_info.id)"},{"line_number":340,"context_line":"        except exceptions.NotFound:"},{"line_number":341,"context_line":"            resp, body \u003d instance_info.dbaas.client.last_response"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_6878232c","line":338,"updated":"2014-09-08 15:58:27.000000000","message":"theres a assert_raises method, you might need to use it.","commit_id":"dee035223be2927bb4ac1598fdb04d04e55daac6"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"25197206ac5541dad128e4a66769698943eac83e","unresolved":false,"context_lines":[{"line_number":779,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":780,"context_line":"                                           remove_configuration\u003dTrue)"},{"line_number":781,"context_line":"        assert_equal(202, instance_info.dbaas.last_http_code)"},{"line_number":782,"context_line":"        # restore instance name"},{"line_number":783,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":784,"context_line":"                                           name\u003dsaved_name)"},{"line_number":785,"context_line":"        assert_equal(202, instance_info.dbaas.last_http_code)"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa98f980_b321db9f","line":782,"updated":"2014-09-15 16:03:14.000000000","message":"Should \"restore\" code go in tearDown?","commit_id":"8c6c91569509df3c30e7b3c35561cc40eac09a72"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"a97c04e47a711844fe06c4f28270cc76c9562c4b","unresolved":false,"context_lines":[{"line_number":779,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":780,"context_line":"                                           remove_configuration\u003dTrue)"},{"line_number":781,"context_line":"        assert_equal(202, instance_info.dbaas.last_http_code)"},{"line_number":782,"context_line":"        # restore instance name"},{"line_number":783,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":784,"context_line":"                                           name\u003dsaved_name)"},{"line_number":785,"context_line":"        assert_equal(202, instance_info.dbaas.last_http_code)"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa98f980_134707bd","line":782,"in_reply_to":"fa98f980_b321db9f","updated":"2014-09-15 16:19:50.000000000","message":"It doesn\u0027t really matter since this type of test executes certain scenarios. Even if proposed API was examined twice \u003d).","commit_id":"8c6c91569509df3c30e7b3c35561cc40eac09a72"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"ff48d520c87afa5a74107517a66f3f821df8b78d","unresolved":false,"context_lines":[{"line_number":782,"context_line":""},{"line_number":783,"context_line":"    @test(runs_after\u003d[test_assign_config_and_name_to_instance_using_patch])"},{"line_number":784,"context_line":"    def test_unassign_configuration_after_patch(self):"},{"line_number":785,"context_line":"        # remove the configuration from the instance"},{"line_number":786,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":787,"context_line":"                                           remove_configuration\u003dTrue)"},{"line_number":788,"context_line":"        assert_equal(202, instance_info.dbaas.last_http_code)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baa201ad_91bce107","line":785,"updated":"2014-10-17 13:23:39.000000000","message":"Configuration group that is being used seems a bit inappropriate (according to rdjenkins logs)\n\nAssertion gets failed because of:\n\nactual value:\n\n{u\u0027innodb_buffer_pool_size\u0027: 57671680, u\u0027join_buffer_size\u0027: 1048576}\n\nincome value:\n\nconverted_key_value: (\u0027innodb_buffer_pool_size\u0027, 157286400)\n\nSo, as i can see, we\u0027re trying to compare two different entities. \u0027converted_key_value\u0027 should be a dict, but it appears to be a list.\n\n\nTest trace: http://paste.openstack.org/show/121639/ taken from https://rdjenkins.dyndns.org/job/Trove-Gate/6066/console","commit_id":"878fa4917670fa1de3469844313cc0ef6961b027"},{"author":{"_account_id":7796,"name":"Riddhi Shah","email":"ridhi.j.shah@gmail.com","username":"ridhi-j-shah"},"change_message_id":"119315cb1066e1ea4f7e362507093e8d167b929e","unresolved":false,"context_lines":[{"line_number":782,"context_line":""},{"line_number":783,"context_line":"    @test(runs_after\u003d[test_assign_config_and_name_to_instance_using_patch])"},{"line_number":784,"context_line":"    def test_unassign_configuration_after_patch(self):"},{"line_number":785,"context_line":"        # remove the configuration from the instance"},{"line_number":786,"context_line":"        instance_info.dbaas.instances.edit(instance_info.id,"},{"line_number":787,"context_line":"                                           remove_configuration\u003dTrue)"},{"line_number":788,"context_line":"        assert_equal(202, instance_info.dbaas.last_http_code)"}],"source_content_type":"text/x-python","patch_set":29,"id":"baa201ad_56cb4771","line":785,"in_reply_to":"baa201ad_91bce107","updated":"2014-10-17 17:12:48.000000000","message":"I think the problem is not comparison of different entities. The failure is because the config values of the parameters are different.\ntestconfig_info_values \u003d {u\u0027innodb_buffer_pool_size\u0027: 57671680, u\u0027join_buffer_size\u0027: 1048576}\ntestconfig_info_values.items() \u003d [(u\u0027innodb_buffer_pool_size\u0027, 57671680), (u\u0027join_buffer_size\u0027, 1048576)]\n\nBut, converted_key_value \u003d  (\u0027innodb_buffer_pool_size\u0027, 157286400)\n\nHence , the assertion, converted_key_value in testconfig_info.values.items() fails. \n\nFor some reason, the config values of the parameter \u0027innodb_buffer_pool_size\u0027 are different.","commit_id":"878fa4917670fa1de3469844313cc0ef6961b027"}],"trove/tests/api/instances.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"13ea155fd967e84b2f2990c18623d25824034fde","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"        assert_equal(new_name, result.name)"},{"line_number":1187,"context_line":"        # Restore instance name because other tests depend on it"},{"line_number":1188,"context_line":"        result \u003d dbaas.instances.edit(instance_info.id,"},{"line_number":1189,"context_line":"                                      name\u003dinstance_info.name)"},{"line_number":1190,"context_line":""},{"line_number":1191,"context_line":"    @test"},{"line_number":1192,"context_line":"    def test_update_name_to_invalid_instance(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_22af682c","line":1189,"updated":"2014-08-04 08:06:36.000000000","message":"i\u0027d suggest to add assertion call that validates http code from last call","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"34187eb6a8df1d54783b707f60e8f7635d06e9cf","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"        assert_equal(new_name, result.name)"},{"line_number":1187,"context_line":"        # Restore instance name because other tests depend on it"},{"line_number":1188,"context_line":"        result \u003d dbaas.instances.edit(instance_info.id,"},{"line_number":1189,"context_line":"                                      name\u003dinstance_info.name)"},{"line_number":1190,"context_line":""},{"line_number":1191,"context_line":"    @test"},{"line_number":1192,"context_line":"    def test_update_name_to_invalid_instance(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_934b1927","line":1189,"in_reply_to":"baada198_22af682c","updated":"2014-08-04 14:54:02.000000000","message":"Done","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"13ea155fd967e84b2f2990c18623d25824034fde","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"        # test assigning to an instance that does not exist"},{"line_number":1194,"context_line":"        invalid_id \u003d \"invalid-inst-id\""},{"line_number":1195,"context_line":"        try:"},{"line_number":1196,"context_line":"            instance_info.dbaas.instances.edit(invalid_id,"},{"line_number":1197,"context_line":"                                               name\u003d\u0027name\u0027)"},{"line_number":1198,"context_line":"        except exceptions.NotFound:"},{"line_number":1199,"context_line":"            resp, body \u003d instance_info.dbaas.client.last_response"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_82a03437","line":1196,"updated":"2014-08-04 08:06:36.000000000","message":"this test can be simplified.\n\nyou need to use assert_raises method","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":11606,"name":"Theron Voran","email":"theron.voran@rackspace.com","username":"tvoran"},"change_message_id":"34187eb6a8df1d54783b707f60e8f7635d06e9cf","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"        # test assigning to an instance that does not exist"},{"line_number":1194,"context_line":"        invalid_id \u003d \"invalid-inst-id\""},{"line_number":1195,"context_line":"        try:"},{"line_number":1196,"context_line":"            instance_info.dbaas.instances.edit(invalid_id,"},{"line_number":1197,"context_line":"                                               name\u003d\u0027name\u0027)"},{"line_number":1198,"context_line":"        except exceptions.NotFound:"},{"line_number":1199,"context_line":"            resp, body \u003d instance_info.dbaas.client.last_response"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_d3b831c9","line":1196,"in_reply_to":"baada198_82a03437","updated":"2014-08-04 14:54:02.000000000","message":"Done","commit_id":"3c3949d986112430dcaa0e0d01752de6c32ae8a7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"800c7e2333db5e3425dc08f54125b47bccb5dc04","unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    def test_create_failure_with_volume_size_and_disabled_for_datastore(self):"},{"line_number":413,"context_line":"        instance_name \u003d \"instance-failure-volume-size_and_volume_disabled\""},{"line_number":414,"context_line":"        databases \u003d []"},{"line_number":415,"context_line":"        datastore \u003d \u0027redis\u0027"},{"line_number":416,"context_line":"        assert_equal(CONFIG.get(datastore, \u0027redis\u0027)[\u0027volume_support\u0027], False)"},{"line_number":417,"context_line":"        volume \u003d {\u0027size\u0027: 2}"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_81572001","line":414,"updated":"2014-08-05 10:12:38.000000000","message":"this seems to be unneeded, for provisioning you just need:\n1. flavor.\n2. name.\n3. datastore.\n4. volume.","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"800c7e2333db5e3425dc08f54125b47bccb5dc04","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        assert_raises(exceptions.HTTPNotImplemented, dbaas.instances.create,"},{"line_number":419,"context_line":"                      instance_name, instance_info.dbaas_flavor_href,"},{"line_number":420,"context_line":"                      volume, databases, datastore\u003ddatastore)"},{"line_number":421,"context_line":"        assert_equal(501, dbaas.last_http_code)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"    @test(enabled\u003dEPHEMERAL_SUPPORT)"},{"line_number":424,"context_line":"    def test_create_failure_with_no_ephemeral_flavor(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_61776c8f","line":421,"updated":"2014-08-05 10:12:38.000000000","message":"and i really wonder why is it HTTP NotImplemented 501?\nAs for me, it looks like it should be HTTP Forbidden 403. Because server would not allow to create redis instance with volume because volume support for this type of datastore was forbidden.","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":7796,"name":"Riddhi Shah","email":"ridhi.j.shah@gmail.com","username":"ridhi-j-shah"},"change_message_id":"d80fa684067f77392f596ccd3fda95e55c5d4e6d","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        assert_raises(exceptions.HTTPNotImplemented, dbaas.instances.create,"},{"line_number":419,"context_line":"                      instance_name, instance_info.dbaas_flavor_href,"},{"line_number":420,"context_line":"                      volume, databases, datastore\u003ddatastore)"},{"line_number":421,"context_line":"        assert_equal(501, dbaas.last_http_code)"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"    @test(enabled\u003dEPHEMERAL_SUPPORT)"},{"line_number":424,"context_line":"    def test_create_failure_with_no_ephemeral_flavor(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_a0515cda","line":421,"in_reply_to":"baada198_61776c8f","updated":"2014-08-25 20:38:43.000000000","message":"Well, thats how the api contract for the volume support exception is implemented.","commit_id":"0fc9031d50550ab7a50732dc7492d2492046404f"},{"author":{"_account_id":5293,"name":"Nikhil","email":"SlickNik@gmail.com","username":"slicknik"},"change_message_id":"2fe88372106953855979c124277f8f8911ee6757","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"@test(depends_on_classes\u003d[WaitForGuestInstallationToFinish],"},{"line_number":1179,"context_line":"      groups\u003d[GROUP, GROUP_START, GROUP_START_SIMPLE, \"dbaas.update\"])"},{"line_number":1180,"context_line":"class TestInstanceUpdate(object):"},{"line_number":1181,"context_line":"    \"\"\"Test the updation of the instance information.\"\"\""},{"line_number":1182,"context_line":""},{"line_number":1183,"context_line":"    @before_class"},{"line_number":1184,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_62e386a4","line":1181,"updated":"2014-09-03 00:12:37.000000000","message":"Updation isn\u0027t a real word.","commit_id":"5687c8333bc34adb3ed95e9adb432c5b95b76957"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"40ed9e61019b20ed732f5bd8cdcbaa0064b26ab8","unresolved":false,"context_lines":[{"line_number":1202,"context_line":""},{"line_number":1203,"context_line":"    @test"},{"line_number":1204,"context_line":"    def test_update_name_to_invalid_instance(self):"},{"line_number":1205,"context_line":"        # test assigning to an instance that does not exist"},{"line_number":1206,"context_line":"        invalid_id \u003d \"invalid-inst-id\""},{"line_number":1207,"context_line":"        assert_raises(exceptions.NotFound, instance_info.dbaas.instances.edit,"},{"line_number":1208,"context_line":"                      invalid_id, name\u003d\u0027name\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_162afc2b","line":1205,"updated":"2014-09-03 00:57:27.000000000","message":"I think we need another test or three of the edit() method and the update() method, given that not only was edit() added but update was changed().","commit_id":"5687c8333bc34adb3ed95e9adb432c5b95b76957"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"914bbb2c9bd6f3a3caeed341cc8a8c69e734b5ea","unresolved":false,"context_lines":[{"line_number":1178,"context_line":"@test(depends_on_classes\u003d[WaitForGuestInstallationToFinish],"},{"line_number":1179,"context_line":"      groups\u003d[GROUP, GROUP_START, GROUP_START_SIMPLE, \"dbaas.update\"])"},{"line_number":1180,"context_line":"class TestInstanceUpdate(object):"},{"line_number":1181,"context_line":"    \"\"\"Test the updation of the instance information.\"\"\""},{"line_number":1182,"context_line":""},{"line_number":1183,"context_line":"    @before_class"},{"line_number":1184,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":23,"id":"fa98f980_2696d53f","line":1181,"updated":"2014-09-11 19:24:26.000000000","message":"updation still isn\u0027t a real word ;)","commit_id":"a47d392d2365f5e041e9dadbd6e70d85e1848d35"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"25197206ac5541dad128e4a66769698943eac83e","unresolved":false,"context_lines":[{"line_number":1196,"context_line":"        result \u003d dbaas.instances.get(instance_info.id)"},{"line_number":1197,"context_line":"        assert_equal(200, dbaas.last_http_code)"},{"line_number":1198,"context_line":"        assert_equal(new_name, result.name)"},{"line_number":1199,"context_line":"        # Restore instance name because other tests depend on it"},{"line_number":1200,"context_line":"        dbaas.instances.edit(instance_info.id, name\u003dinstance_info.name)"},{"line_number":1201,"context_line":"        assert_equal(202, dbaas.last_http_code)"},{"line_number":1202,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"fa98f980_534fcf6a","line":1199,"updated":"2014-09-15 16:03:14.000000000","message":"Should \"restore\" code go in tearDown?","commit_id":"8c6c91569509df3c30e7b3c35561cc40eac09a72"}]}
