)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"24694afd969aa1cfb9fe23e82af1892c20a8377f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Shachar Snapiri \u003cshachar.snapiri@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-11-23 14:05:14 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add dragonflow model printers - first stage"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add a parser for the dragonflow model and allow printing the model to"},{"line_number":10,"context_line":"stdout. In the next stages we want to add different representations as"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ff82abbf_c2e2d301","line":7,"updated":"2017-11-23 12:41:13.000000000","message":"Please also add to setup.cfg (as a provided binary).","commit_id":"93d2f58a19f15fe4fda61b63f5717c2c348fbf39"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"8c902a09e0eefbcceca556bfdaca8f4bd043fd04","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Shachar Snapiri \u003cshachar.snapiri@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-11-23 14:05:14 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add dragonflow model printers - first stage"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add a parser for the dragonflow model and allow printing the model to"},{"line_number":10,"context_line":"stdout. In the next stages we want to add different representations as"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ff82abbf_78fa9775","line":7,"in_reply_to":"ff82abbf_c2e2d301","updated":"2017-11-23 15:47:39.000000000","message":"Done","commit_id":"93d2f58a19f15fe4fda61b63f5717c2c348fbf39"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"a1232f39d93ef12d74ed36234cd62fe03b7f0d39","unresolved":false,"context_lines":[{"line_number":11,"context_line":"well: e.g. jsonschema, UML, etc."},{"line_number":12,"context_line":"This is a standalone app, currently not taking any argument. We will add"},{"line_number":13,"context_line":"arguments in the future when more parsers will be added."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I6cb92a676ed7ecf2f23a9c1c4b18ecf57fa409d8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ff82abbf_02875bd9","line":14,"updated":"2017-11-23 12:33:39.000000000","message":"please link it to the launchpad issue this patch addresses","commit_id":"93d2f58a19f15fe4fda61b63f5717c2c348fbf39"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"8c902a09e0eefbcceca556bfdaca8f4bd043fd04","unresolved":false,"context_lines":[{"line_number":11,"context_line":"well: e.g. jsonschema, UML, etc."},{"line_number":12,"context_line":"This is a standalone app, currently not taking any argument. We will add"},{"line_number":13,"context_line":"arguments in the future when more parsers will be added."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I6cb92a676ed7ecf2f23a9c1c4b18ecf57fa409d8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ff82abbf_98f51b86","line":14,"in_reply_to":"ff82abbf_02875bd9","updated":"2017-11-23 15:47:39.000000000","message":"Done","commit_id":"93d2f58a19f15fe4fda61b63f5717c2c348fbf39"}],"dragonflow/cli/df_model.py":[{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"cf4f5e1e59905036b6ad73941b9baebc7887c4ce","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class DfModelParser(object):"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _stringify_field_type(self, field):"},{"line_number":64,"context_line":"        if field is six.string_types:"},{"line_number":65,"context_line":"            return \u0027String\u0027, None"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_cdcc43be","line":62,"updated":"2017-11-23 14:52:44.000000000","message":"Redundant","commit_id":"47beaf08c1e4d691861c5b30df36e2a74ea8ac7d"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"8c902a09e0eefbcceca556bfdaca8f4bd043fd04","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class DfModelParser(object):"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _stringify_field_type(self, field):"},{"line_number":64,"context_line":"        if field is six.string_types:"},{"line_number":65,"context_line":"            return \u0027String\u0027, None"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_38f40f86","line":62,"in_reply_to":"ff82abbf_cdcc43be","updated":"2017-11-23 15:47:39.000000000","message":"Done","commit_id":"47beaf08c1e4d691861c5b30df36e2a74ea8ac7d"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"cf4f5e1e59905036b6ad73941b9baebc7887c4ce","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                                               to_many, restrictions))"},{"line_number":104,"context_line":"        return current_model"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def parse_model(self, printer):"},{"line_number":107,"context_line":"        for model in model_framework.iter_models_by_dependency_order(False):"},{"line_number":108,"context_line":"            printer.output_model(self._process_model(model))"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_4db9132c","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":19},"updated":"2017-11-23 14:52:44.000000000","message":"I think parse_models is a more correct name (since it parse all models)","commit_id":"47beaf08c1e4d691861c5b30df36e2a74ea8ac7d"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"8c902a09e0eefbcceca556bfdaca8f4bd043fd04","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                                               to_many, restrictions))"},{"line_number":104,"context_line":"        return current_model"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def parse_model(self, printer):"},{"line_number":107,"context_line":"        for model in model_framework.iter_models_by_dependency_order(False):"},{"line_number":108,"context_line":"            printer.output_model(self._process_model(model))"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_f82b07e8","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":19},"in_reply_to":"ff82abbf_4db9132c","updated":"2017-11-23 15:47:39.000000000","message":"Done","commit_id":"47beaf08c1e4d691861c5b30df36e2a74ea8ac7d"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"49d9fec774680ad60c21f564ce41ed35e89524b4","unresolved":false,"context_lines":[{"line_number":26,"context_line":"                 to_many\u003dFalse, restrictions\u003dNone):"},{"line_number":27,"context_line":"        self.name \u003d name"},{"line_number":28,"context_line":"        self.type \u003d field_type"},{"line_number":29,"context_line":"        self.to_many \u003d to_many"},{"line_number":30,"context_line":"        self.restrictions \u003d restrictions"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_757b5cbd","line":29,"updated":"2017-11-26 10:17:30.000000000","message":"What the mean of to_many ?","commit_id":"58d6d1377f0ed792b111643deea665b980b82573"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"ed6027cc61633473fe30126bd0f2183224f2f9fc","unresolved":false,"context_lines":[{"line_number":26,"context_line":"                 to_many\u003dFalse, restrictions\u003dNone):"},{"line_number":27,"context_line":"        self.name \u003d name"},{"line_number":28,"context_line":"        self.type \u003d field_type"},{"line_number":29,"context_line":"        self.to_many \u003d to_many"},{"line_number":30,"context_line":"        self.restrictions \u003d restrictions"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_e7681fba","line":29,"in_reply_to":"ff82abbf_757b5cbd","updated":"2017-11-26 12:35:18.000000000","message":"It means that the object is referencing multiple objects of the second type.","commit_id":"58d6d1377f0ed792b111643deea665b980b82573"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"49d9fec774680ad60c21f564ce41ed35e89524b4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"class ModelClass(object):"},{"line_number":34,"context_line":"    def __init__(self, name):"},{"line_number":35,"context_line":"        self.name \u003d name"},{"line_number":36,"context_line":"        self.fields \u003d []"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def add_field(self, field):"},{"line_number":39,"context_line":"        self.fields.append(field)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_f53d2cdd","line":36,"updated":"2017-11-26 10:17:30.000000000","message":"Whats happend if the field it\u0027s an instance it\u0027s class itself (for example logical subnet located on lswitch  )","commit_id":"58d6d1377f0ed792b111643deea665b980b82573"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"ed6027cc61633473fe30126bd0f2183224f2f9fc","unresolved":false,"context_lines":[{"line_number":33,"context_line":"class ModelClass(object):"},{"line_number":34,"context_line":"    def __init__(self, name):"},{"line_number":35,"context_line":"        self.name \u003d name"},{"line_number":36,"context_line":"        self.fields \u003d []"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def add_field(self, field):"},{"line_number":39,"context_line":"        self.fields.append(field)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_a75e970f","line":36,"in_reply_to":"ff82abbf_f53d2cdd","updated":"2017-11-26 12:35:18.000000000","message":"I am not sure I understand the question. The fields are the above structure...","commit_id":"58d6d1377f0ed792b111643deea665b980b82573"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"49d9fec774680ad60c21f564ce41ed35e89524b4","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def output_model(self, model_):"},{"line_number":51,"context_line":"        print(\u0027\\n-------------\\n{}\\n-------------\u0027.format(model_.name))"},{"line_number":52,"context_line":"        for field in model_.fields:"},{"line_number":53,"context_line":"            if field.restrictions:"},{"line_number":54,"context_line":"                print(\u0027{} - {} {}, {}\u0027.format("},{"line_number":55,"context_line":"                    field.name, field.type, field.restrictions, field.to_many))"},{"line_number":56,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_b55ec441","line":53,"updated":"2017-11-26 10:17:30.000000000","message":"nit , maybe it\u0027s will be more nice to build the string in part..","commit_id":"58d6d1377f0ed792b111643deea665b980b82573"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"ed6027cc61633473fe30126bd0f2183224f2f9fc","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def output_model(self, model_):"},{"line_number":51,"context_line":"        print(\u0027\\n-------------\\n{}\\n-------------\u0027.format(model_.name))"},{"line_number":52,"context_line":"        for field in model_.fields:"},{"line_number":53,"context_line":"            if field.restrictions:"},{"line_number":54,"context_line":"                print(\u0027{} - {} {}, {}\u0027.format("},{"line_number":55,"context_line":"                    field.name, field.type, field.restrictions, field.to_many))"},{"line_number":56,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_479d4bba","line":53,"in_reply_to":"ff82abbf_b55ec441","updated":"2017-11-26 12:35:18.000000000","message":"Agreed, fixed in a later patch","commit_id":"58d6d1377f0ed792b111643deea665b980b82573"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"89cd847bfa287429769a92c9f33728e7651ff992","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class DfModelParser(object):"},{"line_number":62,"context_line":"    def _stringify_field_type(self, field):"},{"line_number":63,"context_line":"        if field is six.string_types:"},{"line_number":64,"context_line":"            return \u0027String\u0027, None"},{"line_number":65,"context_line":"        elif isinstance(field, field_types.EnumField):"},{"line_number":66,"context_line":"            field_type \u003d type(field).__name__"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_d686b9b9","line":63,"updated":"2017-11-28 19:29:30.000000000","message":"nit: Does this case ever happen?","commit_id":"58d6d1377f0ed792b111643deea665b980b82573"},{"author":{"_account_id":26131,"name":"Eyal Leshem","email":"eyal.leshem@toganetworks.com","username":"leyal"},"change_message_id":"49d9fec774680ad60c21f564ce41ed35e89524b4","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        elif isinstance(field, field_types.EnumField):"},{"line_number":66,"context_line":"            field_type \u003d type(field).__name__"},{"line_number":67,"context_line":"            restrictions \u003d []"},{"line_number":68,"context_line":"            restrictions.extend(field._valid_values)"},{"line_number":69,"context_line":"            return field_type, restrictions"},{"line_number":70,"context_line":"        elif isinstance(field, field_types.ReferenceField):"},{"line_number":71,"context_line":"            model \u003d field._model"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_952620ce","line":68,"updated":"2017-11-26 10:17:30.000000000","message":"why we want to print all valid value in enum?","commit_id":"58d6d1377f0ed792b111643deea665b980b82573"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"ed6027cc61633473fe30126bd0f2183224f2f9fc","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        elif isinstance(field, field_types.EnumField):"},{"line_number":66,"context_line":"            field_type \u003d type(field).__name__"},{"line_number":67,"context_line":"            restrictions \u003d []"},{"line_number":68,"context_line":"            restrictions.extend(field._valid_values)"},{"line_number":69,"context_line":"            return field_type, restrictions"},{"line_number":70,"context_line":"        elif isinstance(field, field_types.ReferenceField):"},{"line_number":71,"context_line":"            model \u003d field._model"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_67a2cfff","line":68,"in_reply_to":"ff82abbf_952620ce","updated":"2017-11-26 12:35:18.000000000","message":"This is important for anyone who wants to get a better view of our schema without looking into the code","commit_id":"58d6d1377f0ed792b111643deea665b980b82573"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"89cd847bfa287429769a92c9f33728e7651ff992","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                to_many \u003d True"},{"line_number":91,"context_line":"                types \u003d field.items_types"},{"line_number":92,"context_line":"                # We will only get the last type"},{"line_number":93,"context_line":"                for field_type in types:"},{"line_number":94,"context_line":"                    field_type, restrictions \u003d \\"},{"line_number":95,"context_line":"                        self._stringify_field_type(field_type)"},{"line_number":96,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff82abbf_b6069551","line":93,"updated":"2017-11-28 19:29:30.000000000","message":"Then why not?:\nfield_type, restrictions \u003d self._stringify_filed_type(types[-1])\n\nAdditionally, you reuse field_type.","commit_id":"58d6d1377f0ed792b111643deea665b980b82573"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"5879d15c9c8254dbd3cad45adc8237bab1d63d24","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        print(\u0027\\n-------------\\n{}\\n-------------\u0027.format(model_.name))"},{"line_number":52,"context_line":"        for field in model_.fields:"},{"line_number":53,"context_line":"            if field.restrictions:"},{"line_number":54,"context_line":"                print(\u0027{} - {} {}, {}\u0027.format("},{"line_number":55,"context_line":"                    field.name, field.type, field.restrictions, field.to_many))"},{"line_number":56,"context_line":"            else:"},{"line_number":57,"context_line":"                print(\u0027{} - {}, {}\u0027.format(field.name, field.type,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_10fbadc0","line":54,"range":{"start_line":54,"start_character":21,"end_line":54,"end_character":39},"updated":"2017-11-29 14:42:50.000000000","message":"Nit: Why not use parameters in order to make the formatting more readable?\nprint(\u0027{name} - {type} {restriction}, {to_many}\u0027.format(name\u003dfield.name, ..... )","commit_id":"54dfb5387db9d518bb8056519cf849ec2308f3ec"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"2682459ba6e7dd169a495577a1f2beb82260a60e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        print(\u0027\\n-------------\\n{}\\n-------------\u0027.format(model_.name))"},{"line_number":52,"context_line":"        for field in model_.fields:"},{"line_number":53,"context_line":"            if field.restrictions:"},{"line_number":54,"context_line":"                print(\u0027{} - {} {}, {}\u0027.format("},{"line_number":55,"context_line":"                    field.name, field.type, field.restrictions, field.to_many))"},{"line_number":56,"context_line":"            else:"},{"line_number":57,"context_line":"                print(\u0027{} - {}, {}\u0027.format(field.name, field.type,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_90333d14","line":54,"range":{"start_line":54,"start_character":21,"end_line":54,"end_character":39},"in_reply_to":"ff82abbf_10fbadc0","updated":"2017-11-29 15:03:51.000000000","message":"Done","commit_id":"54dfb5387db9d518bb8056519cf849ec2308f3ec"},{"author":{"_account_id":23235,"name":"Lihi Wishnitzer","email":"lihiwish@gmail.com","username":"lihiwish"},"change_message_id":"5879d15c9c8254dbd3cad45adc8237bab1d63d24","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                to_many \u003d True"},{"line_number":91,"context_line":"                types \u003d field.items_types"},{"line_number":92,"context_line":"                # We will only get the last type"},{"line_number":93,"context_line":"                for field_type in types:"},{"line_number":94,"context_line":"                    field_type, restrictions \u003d \\"},{"line_number":95,"context_line":"                        self._stringify_field_type(field_type)"},{"line_number":96,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_9001fd07","line":93,"updated":"2017-11-29 14:42:50.000000000","message":"If the loop is not required, why not access the last element directly?","commit_id":"54dfb5387db9d518bb8056519cf849ec2308f3ec"},{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"2682459ba6e7dd169a495577a1f2beb82260a60e","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                to_many \u003d True"},{"line_number":91,"context_line":"                types \u003d field.items_types"},{"line_number":92,"context_line":"                # We will only get the last type"},{"line_number":93,"context_line":"                for field_type in types:"},{"line_number":94,"context_line":"                    field_type, restrictions \u003d \\"},{"line_number":95,"context_line":"                        self._stringify_field_type(field_type)"},{"line_number":96,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff82abbf_b0368102","line":93,"in_reply_to":"ff82abbf_9001fd07","updated":"2017-11-29 15:03:51.000000000","message":"Done. Taking the first one as we do not care if it is the first or last","commit_id":"54dfb5387db9d518bb8056519cf849ec2308f3ec"}]}
