)]}'
{"bin/melange":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from melange.common import config"},{"line_number":34,"context_line":"from melange.common import wsgi"},{"line_number":35,"context_line":"from melange.db import db_api"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAACX%2F%2F%2ByM%3D","line":35,"updated":"2011-09-26 17:43:32.000000000","message":"It feels wrong to have any db_api calls in the bin/melange executable. The way that Glance does things is to run configure_db() in the *Controller* of the server, which would eliminate the need to run configure_db() here...","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c32c4627aacd3ca6e9691ad5e46866edcdf647d6","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from melange.common import config"},{"line_number":34,"context_line":"from melange.common import wsgi"},{"line_number":35,"context_line":"from melange.db import db_api"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"if __name__ \u003d\u003d \u0027__main__\u0027:"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAACX%2F%2F%2Bl8%3D","line":35,"in_reply_to":"AAAACX%2F%2F%2ByM%3D","updated":"2011-09-27 13:08:55.000000000","message":"Done","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        conf, app \u003d config.load_paste_app(\u0027melange\u0027, options, args)"},{"line_number":50,"context_line":"        db_api.configure_db(conf)"},{"line_number":51,"context_line":"        port \u003d options.get(\u0027port\u0027, conf[\u0027bind_port\u0027])"},{"line_number":52,"context_line":"        server \u003d wsgi.Server(\"Melange\", app\u003dapp, port\u003dport,"},{"line_number":53,"context_line":"                             host\u003dconf[\u0027bind_host\u0027])"},{"line_number":54,"context_line":"        server.start()"},{"line_number":55,"context_line":"        server.wait()"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAACX%2F%2F%2ByI%3D","line":52,"updated":"2011-09-26 17:43:32.000000000","message":"I still suggest that bin/melange should be bin/melange-api instead.","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c32c4627aacd3ca6e9691ad5e46866edcdf647d6","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        conf, app \u003d config.load_paste_app(\u0027melange\u0027, options, args)"},{"line_number":50,"context_line":"        db_api.configure_db(conf)"},{"line_number":51,"context_line":"        port \u003d options.get(\u0027port\u0027, conf[\u0027bind_port\u0027])"},{"line_number":52,"context_line":"        server \u003d wsgi.Server(\"Melange\", app\u003dapp, port\u003dport,"},{"line_number":53,"context_line":"                             host\u003dconf[\u0027bind_host\u0027])"},{"line_number":54,"context_line":"        server.start()"},{"line_number":55,"context_line":"        server.wait()"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAACX%2F%2F%2Bl4%3D","line":52,"in_reply_to":"AAAACX%2F%2F%2ByI%3D","updated":"2011-09-27 13:08:55.000000000","message":"Done","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"}],"etc/melange/melange.conf.sample":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"debug \u003d True"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"bind_host \u003d 0.0.0.0"},{"line_number":7,"context_line":"bind_port \u003d 9898"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine"},{"line_number":10,"context_line":"sql_connection \u003d sqlite:///melange.sqlite"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAACX%2F%2F%2ByE%3D","line":7,"updated":"2011-09-26 17:43:32.000000000","message":"Should this be 80 or 8080? It\u0027s an HTTP service, right?","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"8932bc7571ca46b60506cead504115da70efe0fa","unresolved":false,"context_lines":[{"line_number":4,"context_line":"debug \u003d True"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"bind_host \u003d 0.0.0.0"},{"line_number":7,"context_line":"bind_port \u003d 9898"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine"},{"line_number":10,"context_line":"sql_connection \u003d sqlite:///melange.sqlite"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAACX%2F%2F%2BnQ%3D","line":7,"in_reply_to":"AAAACX%2F%2F%2ByE%3D","updated":"2011-09-27 12:23:41.000000000","message":"Just wanted to use a non-conflicting port within openstack. Based on the mailing list debate on this, we thought it was preferable to keep a non-conflicting port instead of the default 80/8080. This is anyways just a sample config, the port mentioned here has no hardcoding/bearing within the code itself. So it can be changed to 80/8080 for a production install.","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"[composite:melange]"},{"line_number":29,"context_line":"use \u003d egg:Paste#urlmap"},{"line_number":30,"context_line":"/v0.1: melangeapi"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"[pipeline:melangeapi]"},{"line_number":33,"context_line":"pipeline \u003d melangeapp"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAACX%2F%2F%2ByA%3D","line":30,"updated":"2011-09-26 17:43:32.000000000","message":"What does / return? :) Should return a 300 Multiple Choices with the version information eventually... just FYI.","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"8932bc7571ca46b60506cead504115da70efe0fa","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"[composite:melange]"},{"line_number":29,"context_line":"use \u003d egg:Paste#urlmap"},{"line_number":30,"context_line":"/v0.1: melangeapi"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"[pipeline:melangeapi]"},{"line_number":33,"context_line":"pipeline \u003d melangeapp"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAACX%2F%2F%2BnM%3D","line":30,"in_reply_to":"AAAACX%2F%2F%2ByA%3D","updated":"2011-09-27 12:23:41.000000000","message":"We had removed the \"/\" route for this merge prop. because of the size. In the subsequent merge, we will introduce the 300 Multiple choice thing.","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"}],"melange/common/auth.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import wsgi"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class AuthorizationMiddleware(wsgi.Middleware):"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def __init__(self, application, auth_providers, **local_config):"},{"line_number":26,"context_line":"        self.auth_providers \u003d auth_providers"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Bx8%3D","line":23,"updated":"2011-09-26 17:43:32.000000000","message":"This middleware should be in the Keystone project. In fact, I *think* you should be able to use the existing middleware in the Keystone project for your uses here.","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"8932bc7571ca46b60506cead504115da70efe0fa","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import wsgi"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class AuthorizationMiddleware(wsgi.Middleware):"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def __init__(self, application, auth_providers, **local_config):"},{"line_number":26,"context_line":"        self.auth_providers \u003d auth_providers"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2BmY%3D","line":23,"in_reply_to":"AAAACX%2F%2F%2Bx8%3D","updated":"2011-09-27 12:23:41.000000000","message":"This is a melange specific authorization middleware, there isnt anything in Keystone that we can use here. The keystone authentication middlewares would have to be added in the pipeline before this.\nBut i suppose this piece could move to Keystone, since keystone also contains the authorization middlewares that are specific to nova, glance and swift. I would prefer to move this to Keystone once we are sure there wont be major changes to this authorization code. I\u0027ll anyway initiate discussions with the keystone people about melange authorization in keystone.","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"56e8f149983734ded1e6467490eacb58ff8b6574","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            tenant_id \u003d\u003d match_for_tenant.group(\u0027tenant_id\u0027)):"},{"line_number":56,"context_line":"            return True"},{"line_number":57,"context_line":"        raise webob.exc.HTTPForbidden(_(\"User with tenant id %s cannot access \""},{"line_number":58,"context_line":"                                        \"this resource\") % tenant_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5fA%3D","line":58,"updated":"2011-10-31 22:47:03.000000000","message":"Do we need to do our own AuthZ inside of Melange?","commit_id":"94ca69599fe38d96b2e8a51116c39fcc869dda0a"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c6c30ddee3ff8bb67d5e538433284b382150ed90","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            tenant_id \u003d\u003d match_for_tenant.group(\u0027tenant_id\u0027)):"},{"line_number":56,"context_line":"            return True"},{"line_number":57,"context_line":"        raise webob.exc.HTTPForbidden(_(\"User with tenant id %s cannot access \""},{"line_number":58,"context_line":"                                        \"this resource\") % tenant_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F4zI%3D","line":58,"in_reply_to":"AAAACX%2F%2F5fA%3D","updated":"2011-11-03 12:15:36.000000000","message":"Keystone doesnt have anything similar last time I checked.\nI think we should move this into Keystone. Its on my list of to dos","commit_id":"94ca69599fe38d96b2e8a51116c39fcc869dda0a"}],"melange/common/config.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        return fix_path(args[0])"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    # Handle standard directory search for $app_name.conf"},{"line_number":145,"context_line":"    config_file_dirs \u003d [fix_path(os.getcwd()),"},{"line_number":146,"context_line":"                        fix_path(os.path.join(\u0027~\u0027, \u0027.\u0027 + config_dir)),"},{"line_number":147,"context_line":"                        fix_path(\u0027~\u0027),"},{"line_number":148,"context_line":"                        os.path.join(\u0027/etc\u0027, config_dir),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Bx4%3D","line":145,"updated":"2011-09-26 17:43:32.000000000","message":"Please remove the search on current working directory... apparently it is a security risk... https://bugs.launchpad.net/glance/+bug/828719","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c32c4627aacd3ca6e9691ad5e46866edcdf647d6","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        return fix_path(args[0])"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    # Handle standard directory search for $app_name.conf"},{"line_number":145,"context_line":"    config_file_dirs \u003d [fix_path(os.getcwd()),"},{"line_number":146,"context_line":"                        fix_path(os.path.join(\u0027~\u0027, \u0027.\u0027 + config_dir)),"},{"line_number":147,"context_line":"                        fix_path(\u0027~\u0027),"},{"line_number":148,"context_line":"                        os.path.join(\u0027/etc\u0027, config_dir),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Bl0%3D","line":145,"in_reply_to":"AAAACX%2F%2F%2Bx4%3D","updated":"2011-09-27 13:08:55.000000000","message":"Done","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    @classmethod"},{"line_number":233,"context_line":"    def get(cls, key, default\u003dNone):"},{"line_number":234,"context_line":"        return cls.instance.get(key, default)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Bx0%3D","line":234,"updated":"2011-09-26 17:43:32.000000000","message":"This class seems a bit superficial :) A dictionary has sufficed for a long time for this behaviour ;)","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"8932bc7571ca46b60506cead504115da70efe0fa","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    @classmethod"},{"line_number":233,"context_line":"    def get(cls, key, default\u003dNone):"},{"line_number":234,"context_line":"        return cls.instance.get(key, default)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2BnE%3D","line":234,"in_reply_to":"AAAACX%2F%2F%2Bx0%3D","updated":"2011-09-27 12:23:41.000000000","message":"This is done mainly for unit tests. We have a StubConfig class in unit tests that is used as follows:\n      with unit.StubConfig(some_config_key\u003d\"blah\"):\n            #access functions which read some_config_key\n            #and assert that they ended up with the \"blah\" value\n\nStubConfig is able to override the value of some_config_key by resetting Config.instance within the \"with\" block.\n\nAlso, we could add default values for certain keys here that cant work without a configured value. This will be difficult if we use just a dictionary.","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"}],"melange/common/wsgi.py":[{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"56e8f149983734ded1e6467490eacb58ff8b6574","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import webob"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from melange.common import exception"},{"line_number":27,"context_line":"from nova.api.openstack import wsgi as openstack_wsgi"},{"line_number":28,"context_line":"from nova import wsgi as nova_wsgi"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Router \u003d nova_wsgi.Router"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5fs%3D","line":27,"updated":"2011-10-31 22:47:03.000000000","message":"This may need to change based on Waldon\u0027s API v1 refactoring if his lands first","commit_id":"94ca69599fe38d96b2e8a51116c39fcc869dda0a"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c6c30ddee3ff8bb67d5e538433284b382150ed90","unresolved":false,"context_lines":[{"line_number":24,"context_line":"import webob"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from melange.common import exception"},{"line_number":27,"context_line":"from nova.api.openstack import wsgi as openstack_wsgi"},{"line_number":28,"context_line":"from nova import wsgi as nova_wsgi"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Router \u003d nova_wsgi.Router"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F4zE%3D","line":27,"in_reply_to":"AAAACX%2F%2F5fs%3D","updated":"2011-11-03 12:15:36.000000000","message":"I guess this wont be relavent right now as we finally decided not to merge into nova","commit_id":"94ca69599fe38d96b2e8a51116c39fcc869dda0a"}],"melange/db/sqlalchemy/session.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import contextlib"},{"line_number":19,"context_line":"import logging"},{"line_number":20,"context_line":"from sqlalchemy import create_engine"},{"line_number":21,"context_line":"from sqlalchemy import MetaData"},{"line_number":22,"context_line":"from sqlalchemy.orm import sessionmaker"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Bxs%3D","line":20,"updated":"2011-09-26 17:43:32.000000000","message":"Should be one newline above the sqlalchemy imports, since that is a 3rd party lib.","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c32c4627aacd3ca6e9691ad5e46866edcdf647d6","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import contextlib"},{"line_number":19,"context_line":"import logging"},{"line_number":20,"context_line":"from sqlalchemy import create_engine"},{"line_number":21,"context_line":"from sqlalchemy import MetaData"},{"line_number":22,"context_line":"from sqlalchemy.orm import sessionmaker"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Blw%3D","line":20,"in_reply_to":"AAAACX%2F%2F%2Bxs%3D","updated":"2011-09-27 13:08:55.000000000","message":"Done","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"}],"melange/ipam/models.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":469,"context_line":""},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"class NoMoreAddressesError(exception.MelangeError):"},{"line_number":472,"context_line":"    message \u003d _(\"no more addresses\")"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"class DuplicateAddressError(exception.MelangeError):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2BxM%3D","line":472,"updated":"2011-09-26 17:43:32.000000000","message":"Please capitalize \"no\" above...","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c32c4627aacd3ca6e9691ad5e46866edcdf647d6","unresolved":false,"context_lines":[{"line_number":469,"context_line":""},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"class NoMoreAddressesError(exception.MelangeError):"},{"line_number":472,"context_line":"    message \u003d _(\"no more addresses\")"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"class DuplicateAddressError(exception.MelangeError):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Bls%3D","line":472,"in_reply_to":"AAAACX%2F%2F%2BxM%3D","updated":"2011-09-27 13:08:55.000000000","message":"Done","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"}],"melange/ipv6/__init__.py":[{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"56e8f149983734ded1e6467490eacb58ff8b6574","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    if missing_params:"},{"line_number":35,"context_line":"        raise exception.ParamsMissingError(_(\"Required params are missing: %s\")"},{"line_number":36,"context_line":"                                           % (\u0027, \u0027.join(missing_params)))"},{"line_number":37,"context_line":"    return ip_generator(cidr, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5fM%3D","line":37,"updated":"2011-10-31 22:47:03.000000000","message":"Does a factory class actually solve anything here? It seems like passing the args on instation of the actual generator, when needed, would suffice. Also, why would you need to yell about the missing arguments? Seems the class proper should really handle that, if it\u0027s a concern, as said class could more intelligently explain what the missing args are for. Also, just checking argument lists is the job of the interpreter :-)","commit_id":"94ca69599fe38d96b2e8a51116c39fcc869dda0a"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c6c30ddee3ff8bb67d5e538433284b382150ed90","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    if missing_params:"},{"line_number":35,"context_line":"        raise exception.ParamsMissingError(_(\"Required params are missing: %s\")"},{"line_number":36,"context_line":"                                           % (\u0027, \u0027.join(missing_params)))"},{"line_number":37,"context_line":"    return ip_generator(cidr, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F4zA%3D","line":37,"in_reply_to":"AAAACX%2F%2F5fM%3D","updated":"2011-11-03 12:15:36.000000000","message":"This merge prop has only one ipv6 address generator. But the main melange code has two. So in that context the we would require a factory. \nWe wanted to make the ipv6 generator class as simple as possible for implementors. Now an implementor just has to fill the required_params attribute. \nWe do have more flexibility if we allow the generator class to raise errors, but that would mean an implementor would need to know what kind of exception to raise. If they raise arbitrary exceptions, we may not be able to map it to the right http error codes when it bubbles up to the http layer.","commit_id":"94ca69599fe38d96b2e8a51116c39fcc869dda0a"}],"melange/ipv6/tenant_based_generator.py":[{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"56e8f149983734ded1e6467490eacb58ff8b6574","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self._tenant_id \u003d kwargs[\u0027used_by_tenant\u0027]"},{"line_number":30,"context_line":"        self._mac_address \u003d netaddr.EUI(kwargs[\u0027mac_address\u0027])"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def next_ip(self):"},{"line_number":33,"context_line":"        address \u003d self._deduce_ip_address()"},{"line_number":34,"context_line":"        next_mac \u003d int(self._mac_address) + 1"},{"line_number":35,"context_line":"        self._mac_address \u003d netaddr.EUI(next_mac)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F5fI%3D","line":32,"updated":"2011-10-31 22:47:03.000000000","message":"This seems like the perfect place to make use of __iter__","commit_id":"94ca69599fe38d96b2e8a51116c39fcc869dda0a"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c6c30ddee3ff8bb67d5e538433284b382150ed90","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        self._tenant_id \u003d kwargs[\u0027used_by_tenant\u0027]"},{"line_number":30,"context_line":"        self._mac_address \u003d netaddr.EUI(kwargs[\u0027mac_address\u0027])"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def next_ip(self):"},{"line_number":33,"context_line":"        address \u003d self._deduce_ip_address()"},{"line_number":34,"context_line":"        next_mac \u003d int(self._mac_address) + 1"},{"line_number":35,"context_line":"        self._mac_address \u003d netaddr.EUI(next_mac)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAACX%2F%2F4y8%3D","line":32,"in_reply_to":"AAAACX%2F%2F5fI%3D","updated":"2011-11-03 12:15:36.000000000","message":"In the models module there is a class called IpAddressIterator that uses the __iter__ and wraps around this generator class.\nThis allows someone implementing the ipv6 generator to be oblivious of the use of __iters__. \nBut do you think this is an overkill? Would you expect most folks to understand iters enough that the extra layer of abstraction is unnecessary?","commit_id":"94ca69599fe38d96b2e8a51116c39fcc869dda0a"}],"melange/tests/__init__.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mox"},{"line_number":19,"context_line":"import unittest"},{"line_number":20,"context_line":"import urlparse"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Bwo%3D","line":18,"updated":"2011-09-26 17:43:32.000000000","message":"mox is a 3rd party lib. Please put separately between stdlib imports and melange local imports, separated by one newline on either side.","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c32c4627aacd3ca6e9691ad5e46866edcdf647d6","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mox"},{"line_number":19,"context_line":"import unittest"},{"line_number":20,"context_line":"import urlparse"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Blo%3D","line":18,"in_reply_to":"AAAACX%2F%2F%2Bwo%3D","updated":"2011-09-27 13:08:55.000000000","message":"Done","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"}],"melange/tests/functional/test_service.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    def stop(self):"},{"line_number":54,"context_line":"        os.system(\"ps x -o pid,command | grep -v \u0027grep\u0027|\""},{"line_number":55,"context_line":"                  \"grep \u0027bin/melange\u0027 | awk \u0027{print $1}\u0027| xargs kill -9\")"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _close_stdio(self):"},{"line_number":58,"context_line":"        with open(os.devnull, \u0027r+b\u0027) as nullfile:"},{"line_number":59,"context_line":"            for desc in (0, 1, 2):  # close stdio"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Bwk%3D","line":56,"updated":"2011-09-26 17:43:32.000000000","message":"Will this work on MacOSX? Certainly won\u0027t work on Windows :)","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"8932bc7571ca46b60506cead504115da70efe0fa","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    def stop(self):"},{"line_number":54,"context_line":"        os.system(\"ps x -o pid,command | grep -v \u0027grep\u0027|\""},{"line_number":55,"context_line":"                  \"grep \u0027bin/melange\u0027 | awk \u0027{print $1}\u0027| xargs kill -9\")"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _close_stdio(self):"},{"line_number":58,"context_line":"        with open(os.devnull, \u0027r+b\u0027) as nullfile:"},{"line_number":59,"context_line":"            for desc in (0, 1, 2):  # close stdio"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2BmM%3D","line":56,"in_reply_to":"AAAACX%2F%2F%2Bwk%3D","updated":"2011-09-27 12:23:41.000000000","message":"This works on MacOSX and also on ubuntu-maverick. Do openstack projects support Windows in any way? \n\nThis was the simplest way to restart melange. And this is used only in test code. So I would expect this to run only on developer machines. \nWe can go down the pid file way to restart if you think this way is quite fragile for development boxes running tests.","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"}],"melange/tests/unit/test_ipam_service.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"b8dcf3493faa69cea12e219c9c47b31273ce8b7c","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import routes"},{"line_number":18,"context_line":"import string"},{"line_number":19,"context_line":"import unittest"},{"line_number":20,"context_line":"import webob.exc"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Bwg%3D","line":17,"updated":"2011-09-26 17:43:32.000000000","message":"routes is a 3rd party lib, as is webob...","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"},{"author":{"_account_id":845,"name":"Rajaram Mallya","username":"rajarammallya"},"change_message_id":"c32c4627aacd3ca6e9691ad5e46866edcdf647d6","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"#    under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import routes"},{"line_number":18,"context_line":"import string"},{"line_number":19,"context_line":"import unittest"},{"line_number":20,"context_line":"import webob.exc"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2Blk%3D","line":17,"in_reply_to":"AAAACX%2F%2F%2Bwg%3D","updated":"2011-09-27 13:08:55.000000000","message":"Done","commit_id":"d27f2c295d789a34ad3a0ca0abdacfd6cacf6f69"}]}
