)]}'
{"etc/nova/nova.conf.sample":[{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"5df2ebd5a8e3f100dfe4a61b62ac9ce18c41e64a","unresolved":false,"context_lines":[{"line_number":552,"context_line":"# Options defined in nova.compute"},{"line_number":553,"context_line":"#"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"# Whether to enale cell functionalities (boolean value)"},{"line_number":556,"context_line":"# enable_cells\u003dFalse"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAOn%2F%2FbGg%3D","line":555,"updated":"2013-05-10 01:09:22.000000000","message":"typo here: enale -\u003e enable","commit_id":"d7caed3b8e8afd597d42aa11138d4684eedf1710"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"c8baf4fc3b36f06907ec86c5508baceb5dc2094b","unresolved":false,"context_lines":[{"line_number":554,"context_line":""},{"line_number":555,"context_line":"# The full class name of the compute API class to use (string"},{"line_number":556,"context_line":"# value)"},{"line_number":557,"context_line":"# This option will be depreciated."},{"line_number":558,"context_line":"#compute_api_class\u003dnova.compute.api.API"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAO3%2F%2F%2Fo0%3D","line":557,"updated":"2013-05-15 10:01:21.000000000","message":"typo: \u0027deprecated\u0027","commit_id":"162d65dc8f860194644c603bf55c4aa7fc93885c"},{"author":{"_account_id":6495,"name":"Senhua Huang","email":"senhua.huang@gmail.com","username":"senhuang"},"change_message_id":"68eb1bbf2604abdfe30304ec99423b350788142e","unresolved":false,"context_lines":[{"line_number":554,"context_line":""},{"line_number":555,"context_line":"# The full class name of the compute API class to use (string"},{"line_number":556,"context_line":"# value)"},{"line_number":557,"context_line":"# This option will be depreciated."},{"line_number":558,"context_line":"#compute_api_class\u003dnova.compute.api.API"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAPH%2F%2F%2FiU%3D","line":557,"in_reply_to":"AAAAO3%2F%2F%2Fo0%3D","updated":"2013-05-16 22:36:49.000000000","message":"complied.","commit_id":"162d65dc8f860194644c603bf55c4aa7fc93885c"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"fa465fa4cadd675b12344a41c31d4449c84dee7b","unresolved":false,"context_lines":[{"line_number":554,"context_line":""},{"line_number":555,"context_line":"# The full class name of the compute API class to use (string"},{"line_number":556,"context_line":"# value)"},{"line_number":557,"context_line":"# This option will be deprecated."},{"line_number":558,"context_line":"#compute_api_class\u003dnova.compute.api.API"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":10,"id":"AAAAPH%2F%2FlKQ%3D","line":557,"updated":"2013-05-30 01:52:25.000000000","message":"This file is automatically generated, so this change will get lost","commit_id":"8bbe968fef7d042be9294714844e88bb2d15d45c"}],"nova/cells/opts.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"2dd519f25cbb47750f707f8969d5a51ef11fc115","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                help\u003d\u0027Percentage of cell capacity to hold in reserve. \u0027"},{"line_number":45,"context_line":"                     \u0027Affects both memory and disk utilization\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027cell_type\u0027,"},{"line_number":47,"context_line":"                default\u003d\u0027\u0027,"},{"line_number":48,"context_line":"                help\u003d\u0027type of this cell: api or compute\u0027),"},{"line_number":49,"context_line":"]"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPH%2F%2F30g%3D","line":47,"updated":"2013-05-21 09:03:32.000000000","message":"Just a minor nit:  I\u0027d probably default this to None vs \u0027\u0027.","commit_id":"3fe3ac7bde260b0c258293068e6a2a92adc5d05a"},{"author":{"_account_id":6495,"name":"Senhua Huang","email":"senhua.huang@gmail.com","username":"senhuang"},"change_message_id":"20692159272f5bfdde043f12c6b3bc77f9a3a9a9","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                help\u003d\u0027Percentage of cell capacity to hold in reserve. \u0027"},{"line_number":45,"context_line":"                     \u0027Affects both memory and disk utilization\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027cell_type\u0027,"},{"line_number":47,"context_line":"                default\u003d\u0027\u0027,"},{"line_number":48,"context_line":"                help\u003d\u0027type of this cell: api or compute\u0027),"},{"line_number":49,"context_line":"]"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPH%2F%2Fw04%3D","line":47,"in_reply_to":"AAAAPH%2F%2F30g%3D","updated":"2013-05-23 16:18:59.000000000","message":"complied.","commit_id":"3fe3ac7bde260b0c258293068e6a2a92adc5d05a"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8c1e1c5ae10bba012e5adc5333899fdc3cef3e99","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                help\u003d\u0027Percentage of cell capacity to hold in reserve. \u0027"},{"line_number":45,"context_line":"                     \u0027Affects both memory and disk utilization\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027cell_type\u0027,"},{"line_number":47,"context_line":"                default\u003dNone,"},{"line_number":48,"context_line":"                help\u003d\u0027type of this cell: api or compute\u0027),"},{"line_number":49,"context_line":"]"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPH%2F%2FejM%3D","line":47,"updated":"2013-06-02 15:36:29.000000000","message":"Can a StrOpt be None. Should it not be \u0027\u0027?","commit_id":"8902d052d50406a05531e9ab039d9498c2e2d7fd"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"484c371188f7448b86dda12118c739759f1bb78b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                help\u003d\u0027Percentage of cell capacity to hold in reserve. \u0027"},{"line_number":45,"context_line":"                     \u0027Affects both memory and disk utilization\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027cell_type\u0027,"},{"line_number":47,"context_line":"                default\u003dNone,"},{"line_number":48,"context_line":"                help\u003d\u0027type of this cell: api or compute\u0027),"},{"line_number":49,"context_line":"]"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPH%2F%2FecU%3D","line":47,"in_reply_to":"AAAAPH%2F%2FejM%3D","updated":"2013-06-02 18:52:19.000000000","message":"It can be None.  It was an empty string in a past review, but I asked for it to be None because that absolutely signifies that the config value is \u0027unset\u0027.  It\u0027s the only way to tell whether or not someone has actually tried to use this option in their .conf, etc.","commit_id":"8902d052d50406a05531e9ab039d9498c2e2d7fd"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8c1e1c5ae10bba012e5adc5333899fdc3cef3e99","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                     \u0027Affects both memory and disk utilization\u0027),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027cell_type\u0027,"},{"line_number":47,"context_line":"                default\u003dNone,"},{"line_number":48,"context_line":"                help\u003d\u0027type of this cell: api or compute\u0027),"},{"line_number":49,"context_line":"]"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"cfg.CONF.register_opts(cells_opts, group\u003d\u0027cells\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPH%2F%2FejQ%3D","line":48,"updated":"2013-06-02 15:36:29.000000000","message":"Consider changing \u0027type of this cell\u0027 \u003d\u003e \u0027Type of cell\u0027 or \u0027Cell type\u0027","commit_id":"8902d052d50406a05531e9ab039d9498c2e2d7fd"}],"nova/compute/__init__.py":[{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"5df2ebd5a8e3f100dfe4a61b62ac9ce18c41e64a","unresolved":false,"context_lines":[{"line_number":22,"context_line":"# collisions with use of \u0027from nova.compute import \u003cfoo\u003e\u0027 elsewhere."},{"line_number":23,"context_line":"import nova.openstack.common.importutils"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"cell_enable_opt \u003d oslo.config.cfg.BoolOpt(\"enable_cell\","},{"line_number":26,"context_line":"                           default\u003dFalse,"},{"line_number":27,"context_line":"                           help\u003d\"Whether to enable cell functionalities\")"},{"line_number":28,"context_line":"oslo.config.cfg.CONF.register_opt(cell_enable_opt)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAOn%2F%2FbGI%3D","line":25,"updated":"2013-05-10 01:09:22.000000000","message":"In the config file you have \"enable_cells\" but here you have \"enable_cell\"","commit_id":"d7caed3b8e8afd597d42aa11138d4684eedf1710"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"c8baf4fc3b36f06907ec86c5508baceb5dc2094b","unresolved":false,"context_lines":[{"line_number":30,"context_line":"]"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"oslo.config.cfg.CONF.register_opts(_compute_opts)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def API(*args, **kwargs):"},{"line_number":36,"context_line":"    importutils \u003d nova.openstack.common.importutils"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAO3%2F%2F%2FoE%3D","side":"PARENT","line":33,"updated":"2013-05-15 10:01:21.000000000","message":"You should make sure the cells CONF option you\u0027re checking is actually loaded by calling: oslo.config.cfg.CONF.import_opt(\u0027enable\u0027, \u0027nova.cells.opts\u0027, group\u003d\u0027cells\u0027)","commit_id":"5dba32a23e67341bfdc03a00781ab491238e21f4"},{"author":{"_account_id":6495,"name":"Senhua Huang","email":"senhua.huang@gmail.com","username":"senhuang"},"change_message_id":"68eb1bbf2604abdfe30304ec99423b350788142e","unresolved":false,"context_lines":[{"line_number":30,"context_line":"]"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"oslo.config.cfg.CONF.register_opts(_compute_opts)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def API(*args, **kwargs):"},{"line_number":36,"context_line":"    importutils \u003d nova.openstack.common.importutils"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAO3%2F%2F%2Bo8%3D","side":"PARENT","line":33,"in_reply_to":"AAAAO3%2F%2F%2FoE%3D","updated":"2013-05-16 22:36:49.000000000","message":"Make sense. Will do.","commit_id":"5dba32a23e67341bfdc03a00781ab491238e21f4"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"c8baf4fc3b36f06907ec86c5508baceb5dc2094b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"oslo.config.cfg.CONF.register_opts(_compute_opts)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def get_compute_api_class_name():"},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    Returns the name of compute API class based on whether cell functionality"},{"line_number":38,"context_line":"    is enabled."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAO3%2F%2F%2Fn0%3D","line":35,"updated":"2013-05-15 10:01:21.000000000","message":"This method drops the support for \u0027compute_api_class_name\u0027, when it should still work somehow.   You marked it as deprecated in the sample conf... but it still needs to work until it is removed.  (I\u0027m not sure how to reasonably achieve this)","commit_id":"162d65dc8f860194644c603bf55c4aa7fc93885c"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"93ffb810a95185c2048cfc4b088a58275c2800d1","unresolved":false,"context_lines":[{"line_number":32,"context_line":"oslo.config.cfg.CONF.register_opts(_compute_opts)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def get_compute_api_class_name():"},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    Returns the name of compute API class based on whether cell functionality"},{"line_number":38,"context_line":"    is enabled."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAPH%2F%2F%2Fhg%3D","line":35,"in_reply_to":"AAAAO3%2F%2F%2Bo0%3D","updated":"2013-05-16 22:47:46.000000000","message":"Sure.  But the old config options need to somehow be made to work until they are removed.  Ie, we are marking this config option deprecated in Havana.  It will be removed in the \u0027I\u0027 release.  Until it is removed, it needs to work.  Your change here will break current deployers of cells unless they make config changes because every single cell will be considered an \u0027api\u0027 cell.","commit_id":"162d65dc8f860194644c603bf55c4aa7fc93885c"},{"author":{"_account_id":6495,"name":"Senhua Huang","email":"senhua.huang@gmail.com","username":"senhuang"},"change_message_id":"68eb1bbf2604abdfe30304ec99423b350788142e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"oslo.config.cfg.CONF.register_opts(_compute_opts)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"def get_compute_api_class_name():"},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    Returns the name of compute API class based on whether cell functionality"},{"line_number":38,"context_line":"    is enabled."}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAO3%2F%2F%2Bo0%3D","line":35,"in_reply_to":"AAAAO3%2F%2F%2Fn0%3D","updated":"2013-05-16 22:36:49.000000000","message":"I don\u0027t understand this part... With this method, compute_api_class_name can be obtained correctly without going through the nova.config. Actually it also avoid the error of having inconsistent configuration: compute.api.class set to nova.compute.api.API, and cells.enable\u003dtrue, and cells.cell_type\u003dapi.. Isn\u0027t it a good thing?","commit_id":"162d65dc8f860194644c603bf55c4aa7fc93885c"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"a55c4d420b78f46c4335ed787fae2e196060e6dc","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    compute_api_class_name \u003d \u0027nova.compute.api.API\u0027"},{"line_number":49,"context_line":"    # If cell is enabled and this cell is an API-cell, use cell specific"},{"line_number":50,"context_line":"    # computeAPI."},{"line_number":51,"context_line":"    if oslo.config.cfg.CONF.cells.enable:"},{"line_number":52,"context_line":"        if oslo.config.cfg.CONF.cells.cell_type \u003d\u003d \u0027api\u0027:"},{"line_number":53,"context_line":"            compute_api_class_name \u003d \u0027nova.compute.cells_api.ComputeCellsAPI\u0027"},{"line_number":54,"context_line":"    return compute_api_class_name"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAPH%2F%2F%2FhU%3D","line":51,"updated":"2013-05-16 22:48:44.000000000","message":"Same problem as last patch set here.","commit_id":"872b634e160ad6ff4a771789eefbc25168285003"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"2dd519f25cbb47750f707f8969d5a51ef11fc115","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # decide what compute_api_class to use."},{"line_number":49,"context_line":"        # If cell_type option is configured (and thus get the default value of"},{"line_number":50,"context_line":"        # \"\", use the deprecated compute_api_class option."},{"line_number":51,"context_line":"        if cell_type \u003d\u003d \u0027\u0027:"},{"line_number":52,"context_line":"            _compute_opts \u003d ["},{"line_number":53,"context_line":"                oslo.config.cfg.StrOpt(\u0027compute_api_class\u0027,"},{"line_number":54,"context_line":"                           default\u003d\u0027nova.compute.api.API\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPH%2F%2F30Y%3D","line":51,"updated":"2013-05-21 09:03:32.000000000","message":"this can be:  if not cell_type:","commit_id":"3fe3ac7bde260b0c258293068e6a2a92adc5d05a"},{"author":{"_account_id":6495,"name":"Senhua Huang","email":"senhua.huang@gmail.com","username":"senhuang"},"change_message_id":"20692159272f5bfdde043f12c6b3bc77f9a3a9a9","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        # decide what compute_api_class to use."},{"line_number":49,"context_line":"        # If cell_type option is configured (and thus get the default value of"},{"line_number":50,"context_line":"        # \"\", use the deprecated compute_api_class option."},{"line_number":51,"context_line":"        if cell_type \u003d\u003d \u0027\u0027:"},{"line_number":52,"context_line":"            _compute_opts \u003d ["},{"line_number":53,"context_line":"                oslo.config.cfg.StrOpt(\u0027compute_api_class\u0027,"},{"line_number":54,"context_line":"                           default\u003d\u0027nova.compute.api.API\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPH%2F%2Fw00%3D","line":51,"in_reply_to":"AAAAPH%2F%2F30Y%3D","updated":"2013-05-23 16:18:59.000000000","message":"compiled.","commit_id":"3fe3ac7bde260b0c258293068e6a2a92adc5d05a"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"2dd519f25cbb47750f707f8969d5a51ef11fc115","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                \u0027compute API class to use\u0027),"},{"line_number":57,"context_line":"            ]"},{"line_number":58,"context_line":"            oslo.config.cfg.CONF.register_opts(_compute_opts)"},{"line_number":59,"context_line":"            compute_api_class_name \u003d oslo.config.cfg.CONF.compute_api_class"},{"line_number":60,"context_line":"        elif cell_type \u003d\u003d \u0027api\u0027:"},{"line_number":61,"context_line":"            compute_api_class_name \u003d COMPUTE_CELL_API"},{"line_number":62,"context_line":"    return compute_api_class_name"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPH%2F%2F30I%3D","line":59,"updated":"2013-05-21 09:03:32.000000000","message":"get_compute_api_class_name() will be called multiple times.. I\u0027d think there\u0027d be a problem with registering this option more than once?\n\nI\u0027d actually keep it being registered at the top of this file.  There\u0027s a way to mark the option as deprecated via some sort of keyword arg.  You may have to dig into oslo.config source to figure it out... but I think we should definitely do that.","commit_id":"3fe3ac7bde260b0c258293068e6a2a92adc5d05a"},{"author":{"_account_id":6495,"name":"Senhua Huang","email":"senhua.huang@gmail.com","username":"senhuang"},"change_message_id":"20692159272f5bfdde043f12c6b3bc77f9a3a9a9","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                \u0027compute API class to use\u0027),"},{"line_number":57,"context_line":"            ]"},{"line_number":58,"context_line":"            oslo.config.cfg.CONF.register_opts(_compute_opts)"},{"line_number":59,"context_line":"            compute_api_class_name \u003d oslo.config.cfg.CONF.compute_api_class"},{"line_number":60,"context_line":"        elif cell_type \u003d\u003d \u0027api\u0027:"},{"line_number":61,"context_line":"            compute_api_class_name \u003d COMPUTE_CELL_API"},{"line_number":62,"context_line":"    return compute_api_class_name"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAPH%2F%2Fw0I%3D","line":59,"in_reply_to":"AAAAPH%2F%2F30I%3D","updated":"2013-05-23 16:18:59.000000000","message":"Good point. Moving it to the top of this file. \nThe deprecated option class in oslo.config is in the new oslo release (will do after the new release is available).","commit_id":"3fe3ac7bde260b0c258293068e6a2a92adc5d05a"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"5fbba7ad26564ebd1873d9db4e2c14cd5f52031e","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        # If cell_type option is configured (and thus get the default value of"},{"line_number":57,"context_line":"        # None, use the deprecated compute_api_class option."},{"line_number":58,"context_line":"        if cell_type is None:"},{"line_number":59,"context_line":"            compute_api_class_name \u003d oslo.config.cfg.CONF.compute_api_class"},{"line_number":60,"context_line":"        elif cell_type \u003d\u003d \u0027api\u0027:"},{"line_number":61,"context_line":"            compute_api_class_name \u003d COMPUTE_CELL_API"},{"line_number":62,"context_line":"    return compute_api_class_name"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FraQ%3D","line":59,"updated":"2013-05-27 14:46:37.000000000","message":"Can you log a warning here?","commit_id":"f072176dcb6f56c6b8f76968e9e70747a83f4b1d"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"5fbba7ad26564ebd1873d9db4e2c14cd5f52031e","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        if cell_type is None:"},{"line_number":59,"context_line":"            compute_api_class_name \u003d oslo.config.cfg.CONF.compute_api_class"},{"line_number":60,"context_line":"        elif cell_type \u003d\u003d \u0027api\u0027:"},{"line_number":61,"context_line":"            compute_api_class_name \u003d COMPUTE_CELL_API"},{"line_number":62,"context_line":"    return compute_api_class_name"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAPH%2F%2FraI%3D","line":61,"updated":"2013-05-27 14:46:37.000000000","message":"I would also add a case for \u003d\u003d \u0027compute\u0027 instead of just assuming that was the case.  Someone could typo \u0027apii\u0027 and we\u0027d assume a compute cell here.  I\u0027d rather we just log an error and fail completely on an unknown value.","commit_id":"f072176dcb6f56c6b8f76968e9e70747a83f4b1d"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"96372b6690d862c7f9c3647f5b16ff754c0e382e","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"# Importing full names to not pollute the namespace and cause possible"},{"line_number":22,"context_line":"# collisions with use of \u0027from nova.compute import \u003cfoo\u003e\u0027 elsewhere."},{"line_number":23,"context_line":"from nova import exception"},{"line_number":24,"context_line":"import nova.openstack.common.importutils"},{"line_number":25,"context_line":"from nova.openstack.common import log as logging"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FojQ%3D","line":23,"updated":"2013-05-28 21:32:56.000000000","message":"violates the comment above.  Please import nova.exception","commit_id":"d612281feb7095d7a67cba8c27d3d79f2e233551"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"96372b6690d862c7f9c3647f5b16ff754c0e382e","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            compute_api_class_name \u003d oslo.config.cfg.CONF.compute_api_class"},{"line_number":64,"context_line":"            LOG.warn(_(\"Use deprecated compute.api.class option,\""},{"line_number":65,"context_line":"                       \" since cell_type is not set to api or compute\"),"},{"line_number":66,"context_line":"                     locals())"},{"line_number":67,"context_line":"        elif cell_type \u003d\u003d \u0027api\u0027:"},{"line_number":68,"context_line":"            compute_api_class_name \u003d COMPUTE_CELL_API"},{"line_number":69,"context_line":"        elif cell_type !\u003d \u0027compute\u0027:"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAPH%2F%2FojI%3D","line":66,"updated":"2013-05-28 21:32:56.000000000","message":"No need for locals() here since you don\u0027t use it.  \u0027Use\u0027 should maybe be \u0027Using\u0027, too.  And \u0027compute.api.class\u0027 should be \u0027compute_api_class\u0027.","commit_id":"d612281feb7095d7a67cba8c27d3d79f2e233551"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"87e0d2b22f7cba7788b761ef00149d00f2b089ad","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                       \" since cell_type is not set to api or compute\"))"},{"line_number":66,"context_line":"        elif cell_type \u003d\u003d \u0027api\u0027:"},{"line_number":67,"context_line":"            compute_api_class_name \u003d COMPUTE_CELL_API"},{"line_number":68,"context_line":"        elif cell_type !\u003d \u0027compute\u0027:"},{"line_number":69,"context_line":"            msg \u003d _(\"cell_type must be configured as \u0027api\u0027 or \u0027compute\u0027\")"},{"line_number":70,"context_line":"            raise nova.exception.InvalidInput(reason\u003dmsg)"},{"line_number":71,"context_line":"    return compute_api_class_name"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAPH%2F%2FmF8%3D","line":68,"updated":"2013-05-29 17:33:25.000000000","message":"This code is correct but hard to read, because you set compute_api_class_name all the way at the top and then don\u0027t reset it in this case.  That technique does prevent uninitialized variables but it makes the various parts of the if statement asymmetrical and will make this harder to maintain.","commit_id":"8bbe968fef7d042be9294714844e88bb2d15d45c"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"5a87be55eea57d1b86595cbc9c242df9f93c7d14","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            msg \u003d _(\"cell_type must be configured as \u0027api\u0027 or \u0027compute\u0027\")"},{"line_number":73,"context_line":"            raise nova.exception.InvalidInput(reason\u003dmsg)"},{"line_number":74,"context_line":"    else:"},{"line_number":75,"context_line":"        compute_api_class_name \u003d COMPUTE_API"},{"line_number":76,"context_line":"    return compute_api_class_name"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPH%2F%2FeYY%3D","line":75,"updated":"2013-06-02 23:27:44.000000000","message":"nitpick only if you end up updating for some other reason ...\n\nYou can reduce indentation in this function by just doing:\n\nif not cells.enable:\n    return COMPUTE_API\n\n... everything in the big if block now ...","commit_id":"8902d052d50406a05531e9ab039d9498c2e2d7fd"}],"nova/tests/compute/test_compute.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8c1e1c5ae10bba012e5adc5333899fdc3cef3e99","unresolved":false,"context_lines":[{"line_number":9068,"context_line":"        result \u003d compute.get_compute_api_class_name()"},{"line_number":9069,"context_line":"        self.assertEqual(\u0027nova.compute.api.API\u0027, result)"},{"line_number":9070,"context_line":""},{"line_number":9071,"context_line":"    def test_ilegal_cell_compute_api_class_name(self):"},{"line_number":9072,"context_line":"        self.flags(enable\u003dTrue, group\u003d\u0027cells\u0027)"},{"line_number":9073,"context_line":"        self.flags(cell_type\u003d\u0027fake_cell_type\u0027, group\u003d\u0027cells\u0027)"},{"line_number":9074,"context_line":"        self.assertRaises(exception.InvalidInput,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAPH%2F%2FejU%3D","line":9071,"updated":"2013-06-02 15:36:29.000000000","message":"ilegal \u003d\u003e illegal","commit_id":"8902d052d50406a05531e9ab039d9498c2e2d7fd"}]}
