)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5f1d2c931431d76eed7f9d00c554913ea0f25eb5","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Move logic from os-api-host into compute"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Renames host to host_name in various places to make it explicit what it"},{"line_number":10,"context_line":"is the api\u0027s are accepting and what we are passing around."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Moves logic out of the openstack api\u0027s host extension the compute"},{"line_number":13,"context_line":"library. This is in preparation for cells; cells provides its own"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAM3%2F%2Ft5w%3D","line":10,"updated":"2013-01-08 20:12:10.000000000","message":"apis.. or APIs maybe.  plural not possessive.","commit_id":"e78a4233039c35447fb3c4d3113f16b60a2df4bf"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5f1d2c931431d76eed7f9d00c554913ea0f25eb5","unresolved":false,"context_lines":[{"line_number":10,"context_line":"is the api\u0027s are accepting and what we are passing around."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Moves logic out of the openstack api\u0027s host extension the compute"},{"line_number":13,"context_line":"library. This is in preparation for cells; cells provides its own"},{"line_number":14,"context_line":"compute library that proxy\u0027s certain calls to child cells."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"In an effort to separate out the layers of code, we\u0027re moving all DB"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAM3%2F%2Ft6I%3D","line":13,"updated":"2013-01-08 20:12:10.000000000","message":"missing words.  \u0027...host extension into compute\u0027s HostAPI\u0027  perhaps?","commit_id":"e78a4233039c35447fb3c4d3113f16b60a2df4bf"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5f1d2c931431d76eed7f9d00c554913ea0f25eb5","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Moves logic out of the openstack api\u0027s host extension the compute"},{"line_number":13,"context_line":"library. This is in preparation for cells; cells provides its own"},{"line_number":14,"context_line":"compute library that proxy\u0027s certain calls to child cells."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"In an effort to separate out the layers of code, we\u0027re moving all DB"},{"line_number":17,"context_line":"related logic out of the openstack api layer and into compute library"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAM3%2F%2Ft6E%3D","line":14,"updated":"2013-01-08 20:12:10.000000000","message":"proxies.  plural not possessive :)","commit_id":"e78a4233039c35447fb3c4d3113f16b60a2df4bf"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5f1d2c931431d76eed7f9d00c554913ea0f25eb5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"related logic out of the openstack api layer and into compute library"},{"line_number":18,"context_line":"layer."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"For example @check_host which calls the DB should not be he openstack"},{"line_number":21,"context_line":"api layer. In the case of cells, we can\u0027t check for the existence of the"},{"line_number":22,"context_line":"host until we arrive at the cell that contains the host."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAM3%2F%2Ft50%3D","line":20,"updated":"2013-01-08 20:12:10.000000000","message":"\u0027be he openstack\u0027 typo.","commit_id":"e78a4233039c35447fb3c4d3113f16b60a2df4bf"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"f76d103c1c05b0380024389068aaff48bccc1cf9","unresolved":false,"context_lines":[{"line_number":17,"context_line":"related logic out of the openstack api layer and into compute library"},{"line_number":18,"context_line":"layer."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"For example @check_host which calls the DB should not be the openstack"},{"line_number":21,"context_line":"api layer. In the case of cells, we can\u0027t check for the existence of the"},{"line_number":22,"context_line":"host until we arrive at the cell that contains the host."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAM3%2F%2Ft00%3D","line":20,"updated":"2013-01-08 20:59:22.000000000","message":"one more typo yet... missing \u0027in\u0027..  \u0027in the openstack API\u0027 i assume.","commit_id":"2873c17c0a79b64ec4e200eb55566ef66ae8236b"}],"nova/api/openstack/compute/contrib/hosts.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":122,"context_line":"              {\u0027host_name\u0027: \u0027vol1.host.com\u0027,"},{"line_number":123,"context_line":"               \u0027service\u0027: \u0027volume\u0027}]}"},{"line_number":124,"context_line":"        \"\"\""},{"line_number":125,"context_line":"        authorize(req.environ[\u0027nova.context\u0027])"},{"line_number":126,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":127,"context_line":"        zone \u003d req.GET.get(\u0027zone\u0027, \u0027\u0027)"},{"line_number":128,"context_line":"        data \u003d self.api.list_hosts(context, zone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9yE%3D","line":125,"updated":"2012-12-18 18:12:13.000000000","message":"same dict lookup 2 lines in a row, might as well move the local assignment to context up a line \u0026 use it","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        \"\"\""},{"line_number":125,"context_line":"        authorize(req.environ[\u0027nova.context\u0027])"},{"line_number":126,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":127,"context_line":"        zone \u003d req.GET.get(\u0027zone\u0027, \u0027\u0027)"},{"line_number":128,"context_line":"        data \u003d self.api.list_hosts(context, zone)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        def change_host_to_host_name(row):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9yA%3D","line":127,"updated":"2012-12-18 18:12:13.000000000","message":"default to None?","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        zone \u003d req.GET.get(\u0027zone\u0027, \u0027\u0027)"},{"line_number":128,"context_line":"        data \u003d self.api.list_hosts(context, zone)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        def change_host_to_host_name(row):"},{"line_number":131,"context_line":"            row[\u0027host_name\u0027] \u003d row.pop(\u0027host\u0027)"},{"line_number":132,"context_line":"        map(change_host_to_host_name, data)"},{"line_number":133,"context_line":"        return {\u0027hosts\u0027: data}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9yk%3D","line":130,"updated":"2012-12-18 18:12:13.000000000","message":"Might as well move the \u0027host\u0027 to \u0027host_name\u0027 transformation inside the HostAPI since the other parameters are already transformed there.","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    @wsgi.serializers(xml\u003dHostUpdateTemplate)"},{"line_number":136,"context_line":"    @wsgi.deserializers(xml\u003dHostUpdateDeserializer)"},{"line_number":137,"context_line":"    def update(self, req, id, body):"},{"line_number":138,"context_line":"        \"\"\""},{"line_number":139,"context_line":"        :param body: example format {\u0027status\u0027: \u0027enable\u0027,"},{"line_number":140,"context_line":"                                     \u0027maintenance_mode\u0027: \u0027enable\u0027}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9wM%3D","line":137,"updated":"2012-12-18 18:12:13.000000000","message":"want to call id \u0027host_name\u0027 for consistency?","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        def read_enabled(orig_val, msg):"},{"line_number":144,"context_line":"            \"\"\""},{"line_number":145,"context_line":"            :param orig_val: A string with either \u0027enable\u0027 or \u0027disable\u0027. May"},{"line_number":146,"context_line":"                             be surronded by whitespace, and case doesn\u0027t"},{"line_number":147,"context_line":"                             matter"},{"line_number":148,"context_line":"            :param msg: The message to be passed to HTTPBadRequest. A single"},{"line_number":149,"context_line":"                        %s will be replaced with orig_val. The message should"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9x4%3D","line":146,"updated":"2012-12-18 18:12:13.000000000","message":"surrounded","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            :param orig_val: A string with either \u0027enable\u0027 or \u0027disable\u0027. May"},{"line_number":146,"context_line":"                             be surronded by whitespace, and case doesn\u0027t"},{"line_number":147,"context_line":"                             matter"},{"line_number":148,"context_line":"            :param msg: The message to be passed to HTTPBadRequest. A single"},{"line_number":149,"context_line":"                        %s will be replaced with orig_val. The message should"},{"line_number":150,"context_line":"                        be pre-translated with _()"},{"line_number":151,"context_line":"            :returns:   True for \u0027enabled\u0027 and False for \u0027disabled\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9yQ%3D","line":148,"updated":"2012-12-18 18:12:13.000000000","message":"Don\u0027t bother stating the msg is already i18n friendly.  That\u0027s done everywhere in Nova by default.","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":152,"context_line":"            \"\"\""},{"line_number":153,"context_line":"            val \u003d orig_val.strip().lower()"},{"line_number":154,"context_line":"            if val in (\"enable\", \"disable\"):"},{"line_number":155,"context_line":"                return val.startswith(\"enable\")  # Turn it into a boolean"},{"line_number":156,"context_line":"            else:"},{"line_number":157,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg % orig_val)"},{"line_number":158,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9yU%3D","line":155,"updated":"2012-12-18 18:12:13.000000000","message":"startswith is redundant since the above line already checks that the value is equal to enable or disable.","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":196,"context_line":"        except exception.NotFound as e:"},{"line_number":197,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.message)"},{"line_number":198,"context_line":"        if result not in (\"on_maintenance\", \"off_maintenance\"):"},{"line_number":199,"context_line":"            # An error message was returned"},{"line_number":200,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dresult)"},{"line_number":201,"context_line":"        return result"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9wE%3D","line":199,"updated":"2012-12-18 18:12:13.000000000","message":"delete obvious comment :)","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        except exception.NotFound as e:"},{"line_number":218,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.message)"},{"line_number":219,"context_line":"        if result not in (\"enabled\", \"disabled\"):"},{"line_number":220,"context_line":"            # An error message was returned"},{"line_number":221,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dresult)"},{"line_number":222,"context_line":"        return result"},{"line_number":223,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9wA%3D","line":220,"updated":"2012-12-18 18:12:13.000000000","message":"delete obvious comment :)","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        return self._host_power_action(req, host_name\u003did, action\u003d\"reboot\")"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    @wsgi.serializers(xml\u003dHostShowTemplate)"},{"line_number":251,"context_line":"    def show(self, req, id):"},{"line_number":252,"context_line":"        \"\"\"Shows the physical/usage resource given by hosts."},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        :param context: security context"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9v8%3D","line":251,"updated":"2012-12-18 18:12:13.000000000","message":"is id a host_name?","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        \"\"\"Shows the physical/usage resource given by hosts."},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        :param context: security context"},{"line_number":255,"context_line":"        :param host: hostname"},{"line_number":256,"context_line":"        :returns: expected to use HostShowTemplate."},{"line_number":257,"context_line":"            ex.::"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9v4%3D","line":255,"updated":"2012-12-18 18:12:13.000000000","message":"there is no \u0027host\u0027 param","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":261,"context_line":"                    \u0027cpu\u0027: 1, \u0027memory_mb\u0027: 2048, \u0027disk_gb\u0027: 30}"},{"line_number":262,"context_line":"        \"\"\""},{"line_number":263,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":264,"context_line":"        if not context.is_admin:"},{"line_number":265,"context_line":"            msg \u003d _(\"Describe-resource is admin only functionality\")"},{"line_number":266,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003dmsg)"},{"line_number":267,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9vI%3D","line":264,"updated":"2012-12-18 18:12:13.000000000","message":"I realize you didn\u0027t write this, but it\u0027s weird to check for admin here.  The DB layer already has a @require_admin_context that will raise an AdminRequired exception.  If I\u0027m not mistaken, this will automatically get translated into a 403 without any code here.","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"5f1d2c931431d76eed7f9d00c554913ea0f25eb5","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        context \u003d req.environ[\u0027nova.context\u0027]"},{"line_number":157,"context_line":"        authorize(context)"},{"line_number":158,"context_line":"        # See what the user wants to \u0027update\u0027"},{"line_number":159,"context_line":"        params \u003d dict([(k.strip().lower(), v) for k, v in body.iteritems()])"},{"line_number":160,"context_line":"        orig_status \u003d status \u003d params.pop(\u0027status\u0027, None)"},{"line_number":161,"context_line":"        orig_maint_mode \u003d maint_mode \u003d params.pop(\u0027maintenance_mode\u0027, None)"},{"line_number":162,"context_line":"        # Validate the request"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2Ft8s%3D","line":159,"updated":"2013-01-08 20:12:10.000000000","message":"orig code supports mixed-case values and lowers them.  Seems like you should v.strip().lower() here to match original code.","commit_id":"e78a4233039c35447fb3c4d3113f16b60a2df4bf"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"f76d103c1c05b0380024389068aaff48bccc1cf9","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                        %s will be replaced with orig_val."},{"line_number":147,"context_line":"            :returns:   True for \u0027enabled\u0027 and False for \u0027disabled\u0027"},{"line_number":148,"context_line":"            \"\"\""},{"line_number":149,"context_line":"            val \u003d orig_val.strip().lower()"},{"line_number":150,"context_line":"            if val \u003d\u003d \"enable\":"},{"line_number":151,"context_line":"                return True"},{"line_number":152,"context_line":"            elif val \u003d\u003d \"disable\":"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAM3%2F%2Ft1U%3D","line":149,"updated":"2013-01-08 20:59:22.000000000","message":"Ok, I see the strip/lower is here.  Feels like it\u0027s better on line 159, but okay ;)","commit_id":"2873c17c0a79b64ec4e200eb55566ef66ae8236b"}],"nova/compute/__init__.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    api"},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":"    importutils \u003d nova.openstack.common.importutils"},{"line_number":38,"context_line":"    hosts_api_class \u003d API().__class__.__module__ + \".HostAPI\""},{"line_number":39,"context_line":"    cls \u003d importutils.import_class(hosts_api_class)"},{"line_number":40,"context_line":"    return cls(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9uk%3D","line":38,"updated":"2012-12-18 18:12:13.000000000","message":"Assumes you can call API() with no arguments.  Use this instead to get the class and go from there?\n\nimportutils.import_class(compute_api_class)","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    importutils \u003d nova.openstack.common.importutils"},{"line_number":38,"context_line":"    hosts_api_class \u003d API().__class__.__module__ + \".HostAPI\""},{"line_number":39,"context_line":"    cls \u003d importutils.import_class(hosts_api_class)"},{"line_number":40,"context_line":"    return cls(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9uc%3D","line":40,"updated":"2012-12-18 18:12:13.000000000","message":"You could use the import_object shortcut in importutils if you wanted.","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"}],"nova/compute/api.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":2171,"context_line":"                host\u003dhost_name)"},{"line_number":2172,"context_line":""},{"line_number":2173,"context_line":"    def list_hosts(self, context, zone\u003dNone, service\u003dNone):"},{"line_number":2174,"context_line":"        \"\"\"Returns a summary list of enabled hosts, optionally filtering"},{"line_number":2175,"context_line":"        by zone and/or service type."},{"line_number":2176,"context_line":""},{"line_number":2177,"context_line":"        This is the \u0027no-cells\u0027 version, that just directly queries the DB"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9t0%3D","line":2174,"updated":"2012-12-18 18:12:13.000000000","message":"Is the service filtering used anywhere?  Do we need it?","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":2174,"context_line":"        \"\"\"Returns a summary list of enabled hosts, optionally filtering"},{"line_number":2175,"context_line":"        by zone and/or service type."},{"line_number":2176,"context_line":""},{"line_number":2177,"context_line":"        This is the \u0027no-cells\u0027 version, that just directly queries the DB"},{"line_number":2178,"context_line":"        \"\"\""},{"line_number":2179,"context_line":"        LOG.debug(_(\"Listing services locally only\"))"},{"line_number":2180,"context_line":"        services \u003d self.db.service_get_all(context, False)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9uA%3D","line":2177,"updated":"2012-12-18 18:12:13.000000000","message":"Drop this comment about no-cells","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":2176,"context_line":""},{"line_number":2177,"context_line":"        This is the \u0027no-cells\u0027 version, that just directly queries the DB"},{"line_number":2178,"context_line":"        \"\"\""},{"line_number":2179,"context_line":"        LOG.debug(_(\"Listing services locally only\"))"},{"line_number":2180,"context_line":"        services \u003d self.db.service_get_all(context, False)"},{"line_number":2181,"context_line":"        if zone:"},{"line_number":2182,"context_line":"            services \u003d [s for s in services if s[\u0027availability_zone\u0027] \u003d\u003d zone]"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9t8%3D","line":2179,"updated":"2012-12-18 18:12:13.000000000","message":"Drop comment","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":2182,"context_line":"            services \u003d [s for s in services if s[\u0027availability_zone\u0027] \u003d\u003d zone]"},{"line_number":2183,"context_line":"        hosts \u003d []"},{"line_number":2184,"context_line":"        for host in services:"},{"line_number":2185,"context_line":"            hosts.append({\u0027host\u0027: host[\u0027host\u0027], \u0027service\u0027: host[\u0027topic\u0027],"},{"line_number":2186,"context_line":"                          \u0027zone\u0027: host[\u0027availability_zone\u0027]})"},{"line_number":2187,"context_line":"        if service:"},{"line_number":2188,"context_line":"            hosts \u003d [host for host in hosts"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9tw%3D","line":2185,"updated":"2012-12-18 18:12:13.000000000","message":"Transform host to host_name here?","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":2256,"context_line":""},{"line_number":2257,"context_line":"            resources.append({\u0027resource\u0027: {\u0027host\u0027: host_name,"},{"line_number":2258,"context_line":"                              \u0027project\u0027: project_id,"},{"line_number":2259,"context_line":"                              \u0027cpu\u0027: reduce(lambda x, y: x + y, vcpus),"},{"line_number":2260,"context_line":"                              \u0027memory_mb\u0027: reduce(lambda x, y: x + y, mem),"},{"line_number":2261,"context_line":"                              \u0027disk_gb\u0027: reduce(lambda x, y: x + y, disk)}})"},{"line_number":2262,"context_line":"        return resources"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9to%3D","line":2259,"updated":"2012-12-18 18:12:13.000000000","message":"this could be simply: sum(vcpus)","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"}],"nova/tests/api/openstack/compute/contrib/test_hosts.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    def setUp(self):"},{"line_number":124,"context_line":"        super(HostTestCase, self).setUp()"},{"line_number":125,"context_line":"        self.controller \u003d os_hosts.HostController()"},{"line_number":126,"context_line":"        self.hostsApi \u003d self.controller.api"},{"line_number":127,"context_line":"        self.req \u003d FakeRequest()"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        # Pretend we have fake_hosts.HOST_LIST in the DB"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9tU%3D","line":126,"updated":"2012-12-18 18:12:13.000000000","message":"hosts_api instead of hostsApi","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"}],"nova/tests/compute/test_host_api.py":[{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"5fb290864d16794abe52c045c9d7e354d335413e","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class HostApiTestCase(test.TestCase):"},{"line_number":25,"context_line":"    \"\"\""},{"line_number":26,"context_line":"    Tests \u0027host\u0027 subset of the compute api"},{"line_number":27,"context_line":"    \"\"\""},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAM3%2F%2F9tQ%3D","line":25,"updated":"2012-12-18 18:12:13.000000000","message":"Add test for describe_host?","commit_id":"501e21accd7dcee9ec57bb519ce71212fc31eb4e"}]}
