)]}'
{"heat/engine/constraints.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    ) \u003d ("},{"line_number":63,"context_line":"        \u0027integer\u0027,"},{"line_number":64,"context_line":"        \u0027string\u0027, \u0027number\u0027, \u0027boolean\u0027,"},{"line_number":65,"context_line":"        \u0027map\u0027, \u0027list\u0027"},{"line_number":66,"context_line":"    )"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __init__(self, data_type, description\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp1Q%3D","line":65,"updated":"2014-01-10 02:50:00.000000000","message":"Hmmm. I\u0027d like to arrange it in such a way that no types were defined in the schema, since the schema for different things (e.g. Parameters vs. Properties) and different template formats will have different types.\n\nOne way to do this would be to define in the constraints:\n\n  valid_types \u003d (\u0027INTEGER\u0027, \u0027NUMBER\u0027)\n\n(though obviously we would define constants for those)\ninstead of\n\n  valid_types \u003d (Schema.INTEGER, Schema.NUMBER)\n\nand then at line 99 do:\n\n  if not any(self.type \u003d\u003d getattr(self, t) for t in c.valid_types):","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    ) \u003d ("},{"line_number":63,"context_line":"        \u0027integer\u0027,"},{"line_number":64,"context_line":"        \u0027string\u0027, \u0027number\u0027, \u0027boolean\u0027,"},{"line_number":65,"context_line":"        \u0027map\u0027, \u0027list\u0027"},{"line_number":66,"context_line":"    )"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __init__(self, data_type, description\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FnlI%3D","line":65,"in_reply_to":"AAAAUH%2F%2Fp1Q%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"2826bc56d36cb3f2a94688aff939e62740e9c6d8","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    ) \u003d ("},{"line_number":63,"context_line":"        \u0027integer\u0027,"},{"line_number":64,"context_line":"        \u0027string\u0027, \u0027number\u0027, \u0027boolean\u0027,"},{"line_number":65,"context_line":"        \u0027map\u0027, \u0027list\u0027"},{"line_number":66,"context_line":"    )"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __init__(self, data_type, description\u003dNone,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fl8M%3D","line":65,"in_reply_to":"AAAAUH%2F%2Fp1Q%3D","updated":"2014-01-10 17:31:31.000000000","message":"On further reflection, we should at the very least factor this check out into a separate method (constraint_is_valid() or something) that subclasses can override.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if isinstance(schema, type(self)):"},{"line_number":80,"context_line":"            if self.type !\u003d Schema.LIST:"},{"line_number":81,"context_line":"                msg \u003d _(\u0027Single schema valid only for \u0027"},{"line_number":82,"context_line":"                        \u0027%(ltype)s, not %(utype)s\u0027) % dict(ltype\u003dSchema.LIST,"},{"line_number":83,"context_line":"                                                           utype\u003dself.type)"},{"line_number":84,"context_line":"                raise InvalidSchemaError(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp08%3D","line":81,"updated":"2014-01-10 02:50:00.000000000","message":"This should be self.LIST, not Schema.LIST. That way every template format can define its own type names and we get the correct ones in error messages like this automatically.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if isinstance(schema, type(self)):"},{"line_number":80,"context_line":"            if self.type !\u003d Schema.LIST:"},{"line_number":81,"context_line":"                msg \u003d _(\u0027Single schema valid only for \u0027"},{"line_number":82,"context_line":"                        \u0027%(ltype)s, not %(utype)s\u0027) % dict(ltype\u003dSchema.LIST,"},{"line_number":83,"context_line":"                                                           utype\u003dself.type)"},{"line_number":84,"context_line":"                raise InvalidSchemaError(msg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fn3M%3D","line":81,"in_reply_to":"AAAAUH%2F%2Fp08%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"4ec9724b7b2300faead5df87e39ae199fe28db47","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \u0027LIST\u0027,"},{"line_number":66,"context_line":"    )"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    # Default type names for data types used in templates; can be overrided by"},{"line_number":69,"context_line":"    # subclasses"},{"line_number":70,"context_line":"    TYPES \u003d ("},{"line_number":71,"context_line":"        INTEGER, STRING, NUMBER, BOOLEAN, MAP, LIST,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FcwM%3D","line":68,"updated":"2014-01-13 21:21:55.000000000","message":"\u0027overridden\u0027 (Irregular verbs. I hate them.)","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"6b0687469398b790c7736e5141bd5e2a53aca07d","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \u0027LIST\u0027,"},{"line_number":66,"context_line":"    )"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    # Default type names for data types used in templates; can be overrided by"},{"line_number":69,"context_line":"    # subclasses"},{"line_number":70,"context_line":"    TYPES \u003d ("},{"line_number":71,"context_line":"        INTEGER, STRING, NUMBER, BOOLEAN, MAP, LIST,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FYZY%3D","line":68,"in_reply_to":"AAAAUH%2F%2FcwM%3D","updated":"2014-01-15 16:03:46.000000000","message":"Doh, of course.","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"4ec9724b7b2300faead5df87e39ae199fe28db47","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        self.constraints \u003d constraints"},{"line_number":106,"context_line":"        for c in constraints:"},{"line_number":107,"context_line":"            if not any(self.type \u003d\u003d getattr(self, t) for t in c.valid_types):"},{"line_number":108,"context_line":"                err_msg \u003d _(\u0027%(name)s constraint \u0027"},{"line_number":109,"context_line":"                            \u0027invalid for %(utype)s\u0027) % dict("},{"line_number":110,"context_line":"                                name\u003dtype(c).__name__,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FcxU%3D","line":107,"updated":"2014-01-13 21:21:55.000000000","message":"This looks good. It might pay to pass a default to getattr, so that if we get an unknown value in a constraint we will end up raising InvalidSchemaError instead of KeyError.\n\nI think it will also pay to make this a method, so that in the future when we have plug-in template formats, it will be easy to override this method of checking for valid constraints:\n\n  def _is_valid_constraint(self, constraint):\n      valid_types \u003d getattr(constraint, \u0027valid_types\u0027, [])\n      return any(self.type \u003d\u003d getattr(self, t, None) for t in valid_types)\n\nIt seems like this and the TYPE_KEYS changes above and below represent an independent change, and could go in a separate patch prior to this one.","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"6b0687469398b790c7736e5141bd5e2a53aca07d","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        self.constraints \u003d constraints"},{"line_number":106,"context_line":"        for c in constraints:"},{"line_number":107,"context_line":"            if not any(self.type \u003d\u003d getattr(self, t) for t in c.valid_types):"},{"line_number":108,"context_line":"                err_msg \u003d _(\u0027%(name)s constraint \u0027"},{"line_number":109,"context_line":"                            \u0027invalid for %(utype)s\u0027) % dict("},{"line_number":110,"context_line":"                                name\u003dtype(c).__name__,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FYKQ%3D","line":107,"in_reply_to":"AAAAUH%2F%2FcxU%3D","updated":"2014-01-15 16:03:46.000000000","message":"I agree that it makes sense to split this into a method so a change for overriding it in the future is easier. I would opt for doing it in the course of the current refactoring.","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":6577,"name":"Sergey Kraynev","email":"sergejyit@gmail.com","username":"skraynev"},"change_message_id":"246194bc47470d2f02876812b3db6e8bd6aae479","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            self.schema \u003d AnyIndexDict(schema)"},{"line_number":95,"context_line":"        else:"},{"line_number":96,"context_line":"            self.schema \u003d schema"},{"line_number":97,"context_line":"        if self.schema is not None and self.type not in (Schema.LIST,"},{"line_number":98,"context_line":"                                                         Schema.MAP):"},{"line_number":99,"context_line":"            msg \u003d _(\u0027Schema valid only for %(ltype)s or \u0027"},{"line_number":100,"context_line":"                    \u0027%(mtype)s, not %(utype)s\u0027) % dict(ltype\u003dSchema.LIST,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FHkE%3D","line":97,"updated":"2014-01-17 09:10:36.000000000","message":"Why do in the previous place you use self.LIST, but here Schema.LIST and Schema.MAP?","commit_id":"2bbd757856440b5d99d9a12fb8af8d04e7403aec"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"db011ff1bfae20484c07e7b5737ac634e3a3f77c","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            self.schema \u003d AnyIndexDict(schema)"},{"line_number":95,"context_line":"        else:"},{"line_number":96,"context_line":"            self.schema \u003d schema"},{"line_number":97,"context_line":"        if self.schema is not None and self.type not in (Schema.LIST,"},{"line_number":98,"context_line":"                                                         Schema.MAP):"},{"line_number":99,"context_line":"            msg \u003d _(\u0027Schema valid only for %(ltype)s or \u0027"},{"line_number":100,"context_line":"                    \u0027%(mtype)s, not %(utype)s\u0027) % dict(ltype\u003dSchema.LIST,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FGqs%3D","line":97,"in_reply_to":"AAAAUH%2F%2FHkE%3D","updated":"2014-01-17 11:59:22.000000000","message":"Oh yes, I think you are right here. Thanks! Fixed in next patch set.","commit_id":"2bbd757856440b5d99d9a12fb8af8d04e7403aec"}],"heat/engine/hot.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                     \u0027min\u0027, \u0027max\u0027, \u0027allowed_values\u0027, \u0027allowed_pattern\u0027)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"PARAM_TYPES \u003d (STRING, NUMBER, COMMA_DELIMITED_LIST, JSON) \u003d \\"},{"line_number":36,"context_line":"              (\u0027string\u0027, \u0027number\u0027, \u0027comma_delimited_list\u0027, \u0027json\u0027)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"_CFN_TO_HOT_SECTIONS \u003d {template.VERSION: VERSION,"},{"line_number":39,"context_line":"                        template.DESCRIPTION: DESCRIPTION,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp5Y%3D","line":36,"updated":"2014-01-10 02:50:00.000000000","message":"I think these should be defined on the HOTParamSchema class.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                     \u0027min\u0027, \u0027max\u0027, \u0027allowed_values\u0027, \u0027allowed_pattern\u0027)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"PARAM_TYPES \u003d (STRING, NUMBER, COMMA_DELIMITED_LIST, JSON) \u003d \\"},{"line_number":36,"context_line":"              (\u0027string\u0027, \u0027number\u0027, \u0027comma_delimited_list\u0027, \u0027json\u0027)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"_CFN_TO_HOT_SECTIONS \u003d {template.VERSION: VERSION,"},{"line_number":39,"context_line":"                        template.DESCRIPTION: DESCRIPTION,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fmtc%3D","line":36,"in_reply_to":"AAAAUH%2F%2Fp5Y%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":269,"context_line":"    \"\"\"HOT parameter schema.\"\"\""},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    @classmethod"},{"line_number":272,"context_line":"    def from_legacy(cls, schema_dict):"},{"line_number":273,"context_line":"        \"\"\""},{"line_number":274,"context_line":"        Return a Parameter Schema object from a legacy schema dictionary."},{"line_number":275,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp5o%3D","line":272,"updated":"2014-01-10 02:50:00.000000000","message":"from_template() maybe?","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"4ec9724b7b2300faead5df87e39ae199fe28db47","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        # make update_allowed true by default on TemplateResources"},{"line_number":315,"context_line":"        # as the template should deal with this."},{"line_number":316,"context_line":"        return cls(schema_dict[HOTParamSchema.TYPE],"},{"line_number":317,"context_line":"                   description\u003dschema_dict.get(HOTParamSchema.DESCRIPTION),"},{"line_number":318,"context_line":"                   default\u003dschema_dict.get(HOTParamSchema.DEFAULT),"},{"line_number":319,"context_line":"                   required\u003dparameters.DEFAULT not in schema_dict,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2Fcew%3D","line":316,"updated":"2014-01-13 21:21:55.000000000","message":"cls.TYPE would be slightly better.","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"6b0687469398b790c7736e5141bd5e2a53aca07d","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        # make update_allowed true by default on TemplateResources"},{"line_number":315,"context_line":"        # as the template should deal with this."},{"line_number":316,"context_line":"        return cls(schema_dict[HOTParamSchema.TYPE],"},{"line_number":317,"context_line":"                   description\u003dschema_dict.get(HOTParamSchema.DESCRIPTION),"},{"line_number":318,"context_line":"                   default\u003dschema_dict.get(HOTParamSchema.DEFAULT),"},{"line_number":319,"context_line":"                   required\u003dparameters.DEFAULT not in schema_dict,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FYXs%3D","line":316,"in_reply_to":"AAAAUH%2F%2Fcew%3D","updated":"2014-01-15 16:03:46.000000000","message":"Done","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"4ec9724b7b2300faead5df87e39ae199fe28db47","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        return cls(schema_dict[HOTParamSchema.TYPE],"},{"line_number":317,"context_line":"                   description\u003dschema_dict.get(HOTParamSchema.DESCRIPTION),"},{"line_number":318,"context_line":"                   default\u003dschema_dict.get(HOTParamSchema.DEFAULT),"},{"line_number":319,"context_line":"                   required\u003dparameters.DEFAULT not in schema_dict,"},{"line_number":320,"context_line":"                   constraints\u003dlist(constraints()),"},{"line_number":321,"context_line":"                   hidden\u003dschema_dict.get(HOTParamSchema.HIDDEN, False))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FcWU%3D","line":319,"updated":"2014-01-13 21:21:55.000000000","message":"\u0027required\u0027 doesn\u0027t map to anything in the schema, which makes me think it shouldn\u0027t be an argument in the constructor, but instead be calculated in the constructor and passed from there to the constraints.Schema constructor.\n\n(Note that when ParamSchema and CfnParamSchema go their separate ways, this bit of code would stay with ParamSchema, so all authors of new template formats would get it for free.)","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"6b0687469398b790c7736e5141bd5e2a53aca07d","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        return cls(schema_dict[HOTParamSchema.TYPE],"},{"line_number":317,"context_line":"                   description\u003dschema_dict.get(HOTParamSchema.DESCRIPTION),"},{"line_number":318,"context_line":"                   default\u003dschema_dict.get(HOTParamSchema.DEFAULT),"},{"line_number":319,"context_line":"                   required\u003dparameters.DEFAULT not in schema_dict,"},{"line_number":320,"context_line":"                   constraints\u003dlist(constraints()),"},{"line_number":321,"context_line":"                   hidden\u003dschema_dict.get(HOTParamSchema.HIDDEN, False))"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FYV4%3D","line":319,"in_reply_to":"AAAAUH%2F%2FcWU%3D","updated":"2014-01-15 16:03:46.000000000","message":"Good point, will change this.","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"4f8893a8fa462915b18b0c6a2bb10d3c661b61d9","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        # make update_allowed true by default on TemplateResources"},{"line_number":296,"context_line":"        # as the template should deal with this."},{"line_number":297,"context_line":"        return cls(schema_dict[cls.TYPE],"},{"line_number":298,"context_line":"                   description\u003dschema_dict.get(HOTParamSchema.DESCRIPTION),"},{"line_number":299,"context_line":"                   default\u003dschema_dict.get(HOTParamSchema.DEFAULT),"},{"line_number":300,"context_line":"                   constraints\u003dlist(constraints()),"},{"line_number":301,"context_line":"                   hidden\u003dschema_dict.get(HOTParamSchema.HIDDEN, False))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FPdo%3D","line":298,"updated":"2014-01-16 00:48:16.000000000","message":"Can we change all of these to cls.DESCRIPTION, cls.DEFAULT, cls.HIDDEN?","commit_id":"886e7ea2d7bd49abfee44c20b2f9f3541b081e38"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"ff2b1c9525c4ed8660f068f9782749209c58b8fc","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        # make update_allowed true by default on TemplateResources"},{"line_number":296,"context_line":"        # as the template should deal with this."},{"line_number":297,"context_line":"        return cls(schema_dict[cls.TYPE],"},{"line_number":298,"context_line":"                   description\u003dschema_dict.get(HOTParamSchema.DESCRIPTION),"},{"line_number":299,"context_line":"                   default\u003dschema_dict.get(HOTParamSchema.DEFAULT),"},{"line_number":300,"context_line":"                   constraints\u003dlist(constraints()),"},{"line_number":301,"context_line":"                   hidden\u003dschema_dict.get(HOTParamSchema.HIDDEN, False))"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAUH%2F%2FN%2FA%3D","line":298,"in_reply_to":"AAAAUH%2F%2FPdo%3D","updated":"2014-01-16 09:08:25.000000000","message":"Good point. I will change this; I saw that this can and should also be changed in the from_dict method of parameters.Schema.","commit_id":"886e7ea2d7bd49abfee44c20b2f9f3541b081e38"}],"heat/engine/parameters.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    \u0027Type\u0027, \u0027Default\u0027, \u0027NoEcho\u0027, \u0027AllowedValues\u0027, \u0027AllowedPattern\u0027,"},{"line_number":29,"context_line":"    \u0027MaxLength\u0027, \u0027MinLength\u0027, \u0027MaxValue\u0027, \u0027MinValue\u0027,"},{"line_number":30,"context_line":"    \u0027Description\u0027, \u0027ConstraintDescription\u0027"},{"line_number":31,"context_line":")"},{"line_number":32,"context_line":"PARAMETER_TYPES \u003d ("},{"line_number":33,"context_line":"    STRING, NUMBER, COMMA_DELIMITED_LIST, JSON"},{"line_number":34,"context_line":") \u003d ("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp34%3D","line":31,"updated":"2014-01-10 02:50:00.000000000","message":"This needs to be moved into the Schema class. That way for a given schema you can determine its type by comparing my_schema.type \u003d\u003d my_schema.STRING, my_schema.type \u003d\u003d my_schema.NUMBER, \u0026c. This will save a lot of translations in various places.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"8d65e59a948f08fdaf22a2e0953188ae98b96e44","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    \u0027Type\u0027, \u0027Default\u0027, \u0027NoEcho\u0027, \u0027AllowedValues\u0027, \u0027AllowedPattern\u0027,"},{"line_number":29,"context_line":"    \u0027MaxLength\u0027, \u0027MinLength\u0027, \u0027MaxValue\u0027, \u0027MinValue\u0027,"},{"line_number":30,"context_line":"    \u0027Description\u0027, \u0027ConstraintDescription\u0027"},{"line_number":31,"context_line":")"},{"line_number":32,"context_line":"PARAMETER_TYPES \u003d ("},{"line_number":33,"context_line":"    STRING, NUMBER, COMMA_DELIMITED_LIST, JSON"},{"line_number":34,"context_line":") \u003d ("}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fo4A%3D","line":31,"in_reply_to":"AAAAUH%2F%2Fp34%3D","updated":"2014-01-10 08:10:14.000000000","message":"Yes, I was also having something like this in mind. Will work this into the next patch set.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        return val"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @classmethod"},{"line_number":71,"context_line":"    def from_legacy(cls, schema_dict):"},{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        Return a Parameter Schema object from a legacy schema dictionary."},{"line_number":74,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp7k%3D","line":71,"updated":"2014-01-10 02:50:00.000000000","message":"A better name for this might be from_template or something like that.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"8d65e59a948f08fdaf22a2e0953188ae98b96e44","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        return val"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    @classmethod"},{"line_number":71,"context_line":"    def from_legacy(cls, schema_dict):"},{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        Return a Parameter Schema object from a legacy schema dictionary."},{"line_number":74,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fo38%3D","line":71,"in_reply_to":"AAAAUH%2F%2Fp7k%3D","updated":"2014-01-10 08:10:14.000000000","message":"Agree, my idea would be from_template_dict.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # map of parameter types to corresponding Schema types"},{"line_number":77,"context_line":"        param_type_map \u003d {"},{"line_number":78,"context_line":"            STRING: Schema.STRING,"},{"line_number":79,"context_line":"            NUMBER: Schema.NUMBER,"},{"line_number":80,"context_line":"            COMMA_DELIMITED_LIST: Schema.LIST,"},{"line_number":81,"context_line":"            JSON: Schema.MAP"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp78%3D","line":78,"updated":"2014-01-10 02:50:00.000000000","message":"cls.STRING","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # map of parameter types to corresponding Schema types"},{"line_number":77,"context_line":"        param_type_map \u003d {"},{"line_number":78,"context_line":"            STRING: Schema.STRING,"},{"line_number":79,"context_line":"            NUMBER: Schema.NUMBER,"},{"line_number":80,"context_line":"            COMMA_DELIMITED_LIST: Schema.LIST,"},{"line_number":81,"context_line":"            JSON: Schema.MAP"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FniY%3D","line":78,"in_reply_to":"AAAAUH%2F%2Fp78%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            schema \u003d Schema.from_legacy(schema)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        param_type \u003d param_type_map.get(schema[Schema.TYPE])"},{"line_number":144,"context_line":"        if param_type \u003d\u003d STRING:"},{"line_number":145,"context_line":"            ParamClass \u003d StringParam"},{"line_number":146,"context_line":"        elif param_type \u003d\u003d NUMBER:"},{"line_number":147,"context_line":"            ParamClass \u003d NumberParam"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp7c%3D","line":144,"updated":"2014-01-10 02:50:00.000000000","message":"This should just be:\n\n  if schema.type \u003d\u003d schema.STRING:\n\nand forget all the translation above.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            schema \u003d Schema.from_legacy(schema)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"        param_type \u003d param_type_map.get(schema[Schema.TYPE])"},{"line_number":144,"context_line":"        if param_type \u003d\u003d STRING:"},{"line_number":145,"context_line":"            ParamClass \u003d StringParam"},{"line_number":146,"context_line":"        elif param_type \u003d\u003d NUMBER:"},{"line_number":147,"context_line":"            ParamClass \u003d NumberParam"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FniQ%3D","line":144,"in_reply_to":"AAAAUH%2F%2Fp7c%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        Return whether the parameter should be sanitised in any output to"},{"line_number":187,"context_line":"        the user."},{"line_number":188,"context_line":"        \u0027\u0027\u0027"},{"line_number":189,"context_line":"        return str(self.schema.get(Schema.HIDDEN, \u0027false\u0027)).lower() \u003d\u003d \u0027true\u0027"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def description(self):"},{"line_number":192,"context_line":"        \u0027\u0027\u0027Return the description of the parameter.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp64%3D","line":189,"updated":"2014-01-10 02:50:00.000000000","message":"Should be:\n\n  return self.schema.hidden\n\nor maybe just delete this method and replace self.hidden() with self.schema.hidden.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        Return whether the parameter should be sanitised in any output to"},{"line_number":187,"context_line":"        the user."},{"line_number":188,"context_line":"        \u0027\u0027\u0027"},{"line_number":189,"context_line":"        return str(self.schema.get(Schema.HIDDEN, \u0027false\u0027)).lower() \u003d\u003d \u0027true\u0027"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def description(self):"},{"line_number":192,"context_line":"        \u0027\u0027\u0027Return the description of the parameter.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FnQw%3D","line":189,"in_reply_to":"AAAAUH%2F%2Fp64%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def description(self):"},{"line_number":192,"context_line":"        \u0027\u0027\u0027Return the description of the parameter.\u0027\u0027\u0027"},{"line_number":193,"context_line":"        return self.schema.get(Schema.DESCRIPTION, \u0027\u0027)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def has_default(self):"},{"line_number":196,"context_line":"        \u0027\u0027\u0027Return whether the parameter has a default value.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp6g%3D","line":193,"updated":"2014-01-10 02:50:00.000000000","message":"ditto, self.schema.description.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def description(self):"},{"line_number":192,"context_line":"        \u0027\u0027\u0027Return the description of the parameter.\u0027\u0027\u0027"},{"line_number":193,"context_line":"        return self.schema.get(Schema.DESCRIPTION, \u0027\u0027)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def has_default(self):"},{"line_number":196,"context_line":"        \u0027\u0027\u0027Return whether the parameter has a default value.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FnQs%3D","line":193,"in_reply_to":"AAAAUH%2F%2Fp6g%3D","updated":"2014-01-13 18:46:20.000000000","message":"Current expected behavior (e.g. in test cases) is that an empty string is returned when description is None, so I would opt to keep this line as is.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def has_default(self):"},{"line_number":196,"context_line":"        \u0027\u0027\u0027Return whether the parameter has a default value.\u0027\u0027\u0027"},{"line_number":197,"context_line":"        return Schema.DEFAULT in self.schema"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def default(self):"},{"line_number":200,"context_line":"        \u0027\u0027\u0027Return the default value of the parameter.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp6Y%3D","line":197,"updated":"2014-01-10 02:50:00.000000000","message":"self.schema.default is not None","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    def has_default(self):"},{"line_number":196,"context_line":"        \u0027\u0027\u0027Return whether the parameter has a default value.\u0027\u0027\u0027"},{"line_number":197,"context_line":"        return Schema.DEFAULT in self.schema"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def default(self):"},{"line_number":200,"context_line":"        \u0027\u0027\u0027Return the default value of the parameter.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FnQc%3D","line":197,"in_reply_to":"AAAAUH%2F%2Fp6Y%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def default(self):"},{"line_number":200,"context_line":"        \u0027\u0027\u0027Return the default value of the parameter.\u0027\u0027\u0027"},{"line_number":201,"context_line":"        return self.schema.get(Schema.DEFAULT)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def __str__(self):"},{"line_number":204,"context_line":"        \u0027\u0027\u0027Return a string representation of the parameter\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp6M%3D","line":201,"updated":"2014-01-10 02:50:00.000000000","message":"self.schema.default","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def default(self):"},{"line_number":200,"context_line":"        \u0027\u0027\u0027Return the default value of the parameter.\u0027\u0027\u0027"},{"line_number":201,"context_line":"        return self.schema.get(Schema.DEFAULT)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def __str__(self):"},{"line_number":204,"context_line":"        \u0027\u0027\u0027Return a string representation of the parameter\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FnQY%3D","line":201,"in_reply_to":"AAAAUH%2F%2Fp6M%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        \u0027\u0027\u0027"},{"line_number":321,"context_line":"        def parameters():"},{"line_number":322,"context_line":"            yield Parameter(PARAM_STACK_ID,"},{"line_number":323,"context_line":"                            Schema.from_legacy({TYPE: STRING,"},{"line_number":324,"context_line":"                                                DESCRIPTION: \u0027Stack ID\u0027,"},{"line_number":325,"context_line":"                                                DEFAULT: str(stack_id)}))"},{"line_number":326,"context_line":"            if stack_name is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp54%3D","line":323,"updated":"2014-01-10 02:50:00.000000000","message":"This should probably just use the constructor directly:\n\n  Schema(Schema.STRING,\n         _(\u0027Stack ID\u0027),\n         default\u003dstr(stack_id))","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        \u0027\u0027\u0027"},{"line_number":321,"context_line":"        def parameters():"},{"line_number":322,"context_line":"            yield Parameter(PARAM_STACK_ID,"},{"line_number":323,"context_line":"                            Schema.from_legacy({TYPE: STRING,"},{"line_number":324,"context_line":"                                                DESCRIPTION: \u0027Stack ID\u0027,"},{"line_number":325,"context_line":"                                                DEFAULT: str(stack_id)}))"},{"line_number":326,"context_line":"            if stack_name is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fm%2BA%3D","line":323,"in_reply_to":"AAAAUH%2F%2Fp54%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"4ec9724b7b2300faead5df87e39ae199fe28db47","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                 required\u003dFalse, constraints\u003d[],"},{"line_number":62,"context_line":"                 hidden\u003dFalse):"},{"line_number":63,"context_line":"        super(Schema, self).__init__(data_type, description, default,"},{"line_number":64,"context_line":"                                     schema, required, constraints)"},{"line_number":65,"context_line":"        self.hidden \u003d hidden"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FcVg%3D","line":64,"updated":"2014-01-13 21:21:55.000000000","message":"As noted in a previous comment, I would vote for passing \"required\u003ddefault is not None\" here and dropping required from the parameter list.\n\nAlso, passing these as named (rather than positional) arguments wouldn\u0027t hurt here (i.e. \"default\u003ddefault,\" \u0026c.).","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"6b0687469398b790c7736e5141bd5e2a53aca07d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                 required\u003dFalse, constraints\u003d[],"},{"line_number":62,"context_line":"                 hidden\u003dFalse):"},{"line_number":63,"context_line":"        super(Schema, self).__init__(data_type, description, default,"},{"line_number":64,"context_line":"                                     schema, required, constraints)"},{"line_number":65,"context_line":"        self.hidden \u003d hidden"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FYNU%3D","line":64,"in_reply_to":"AAAAUH%2F%2FcVg%3D","updated":"2014-01-15 16:03:46.000000000","message":"Done","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"4ec9724b7b2300faead5df87e39ae199fe28db47","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        \u0027\u0027\u0027"},{"line_number":366,"context_line":"        Set the AWS::StackId pseudo parameter value"},{"line_number":367,"context_line":"        \u0027\u0027\u0027"},{"line_number":368,"context_line":"        self.params[PARAM_STACK_ID].user_value \u003d stack_id"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def _validate(self, user_params):"},{"line_number":371,"context_line":"        schemata \u003d self.tmpl.param_schemata()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FcSw%3D","line":368,"updated":"2014-01-13 21:21:55.000000000","message":"The reason we set the stack ID in the default instead of in the user_value is that looking for a user_value is how we determine which parameters were passed by the user and which were generated internally. Maybe one of the Schema classes needs to grow a set_default() method.","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"6b0687469398b790c7736e5141bd5e2a53aca07d","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        \u0027\u0027\u0027"},{"line_number":366,"context_line":"        Set the AWS::StackId pseudo parameter value"},{"line_number":367,"context_line":"        \u0027\u0027\u0027"},{"line_number":368,"context_line":"        self.params[PARAM_STACK_ID].user_value \u003d stack_id"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    def _validate(self, user_params):"},{"line_number":371,"context_line":"        schemata \u003d self.tmpl.param_schemata()"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FYGk%3D","line":368,"in_reply_to":"AAAAUH%2F%2FcSw%3D","updated":"2014-01-15 16:03:46.000000000","message":"Done. I introduced a set_default() method in constraints.Schema","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"}],"heat/engine/properties.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        # make update_allowed true by default on TemplateResources"},{"line_number":129,"context_line":"        # as the template should deal with this."},{"line_number":130,"context_line":"        return cls(data_type\u003dparam.get(Schema.TYPE),"},{"line_number":131,"context_line":"                   description\u003dparam.get(Schema.DESCRIPTION),"},{"line_number":132,"context_line":"                   required\u003dSchema.DEFAULT not in param,"},{"line_number":133,"context_line":"                   constraints\u003dparam.constraints,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FqCM%3D","line":130,"updated":"2014-01-10 02:50:00.000000000","message":"We want to pass a parameters.Schema object here, not a dictionary.\n\nSo this should be:\n\n  param_type_map.get(param.type, cls.MAP)\n\nwhere:\n\nparam_type_map \u003d {\t\t\n            param.STRING: cls.STRING,\t\t\n            param.NUMBER: cls.NUMBER,\t\t\n            param.COMMA_DELIMITED_LIST: cls.LIST,\t\t\n            param.JSON: cls.MAP\t\t\n        }","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        # make update_allowed true by default on TemplateResources"},{"line_number":129,"context_line":"        # as the template should deal with this."},{"line_number":130,"context_line":"        return cls(data_type\u003dparam.get(Schema.TYPE),"},{"line_number":131,"context_line":"                   description\u003dparam.get(Schema.DESCRIPTION),"},{"line_number":132,"context_line":"                   required\u003dSchema.DEFAULT not in param,"},{"line_number":133,"context_line":"                   constraints\u003dparam.constraints,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fmyk%3D","line":130,"in_reply_to":"AAAAUH%2F%2FqCM%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # make update_allowed true by default on TemplateResources"},{"line_number":129,"context_line":"        # as the template should deal with this."},{"line_number":130,"context_line":"        return cls(data_type\u003dparam.get(Schema.TYPE),"},{"line_number":131,"context_line":"                   description\u003dparam.get(Schema.DESCRIPTION),"},{"line_number":132,"context_line":"                   required\u003dSchema.DEFAULT not in param,"},{"line_number":133,"context_line":"                   constraints\u003dparam.constraints,"},{"line_number":134,"context_line":"                   update_allowed\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FqCA%3D","line":131,"updated":"2014-01-10 02:50:00.000000000","message":"Should be:\n\n  param.description","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # make update_allowed true by default on TemplateResources"},{"line_number":129,"context_line":"        # as the template should deal with this."},{"line_number":130,"context_line":"        return cls(data_type\u003dparam.get(Schema.TYPE),"},{"line_number":131,"context_line":"                   description\u003dparam.get(Schema.DESCRIPTION),"},{"line_number":132,"context_line":"                   required\u003dSchema.DEFAULT not in param,"},{"line_number":133,"context_line":"                   constraints\u003dparam.constraints,"},{"line_number":134,"context_line":"                   update_allowed\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fmyg%3D","line":131,"in_reply_to":"AAAAUH%2F%2FqCA%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # as the template should deal with this."},{"line_number":130,"context_line":"        return cls(data_type\u003dparam.get(Schema.TYPE),"},{"line_number":131,"context_line":"                   description\u003dparam.get(Schema.DESCRIPTION),"},{"line_number":132,"context_line":"                   required\u003dSchema.DEFAULT not in param,"},{"line_number":133,"context_line":"                   constraints\u003dparam.constraints,"},{"line_number":134,"context_line":"                   update_allowed\u003dTrue)"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FqAE%3D","line":132,"updated":"2014-01-10 02:50:00.000000000","message":"Should be:\n\n  param.default is not None","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"3a9809a5a73ecc5148980219c0cbeec92b66623f","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # as the template should deal with this."},{"line_number":130,"context_line":"        return cls(data_type\u003dparam.get(Schema.TYPE),"},{"line_number":131,"context_line":"                   description\u003dparam.get(Schema.DESCRIPTION),"},{"line_number":132,"context_line":"                   required\u003dSchema.DEFAULT not in param,"},{"line_number":133,"context_line":"                   constraints\u003dparam.constraints,"},{"line_number":134,"context_line":"                   update_allowed\u003dTrue)"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FmyY%3D","line":132,"in_reply_to":"AAAAUH%2F%2FqAE%3D","updated":"2014-01-13 18:46:20.000000000","message":"Done","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            return"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"        # Schema TYPES are all lowercase, so use lowercase to compare"},{"line_number":348,"context_line":"        schema_type \u003d str(schema[TYPE]).lower()"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"        if schema_type \u003d\u003d Schema.LIST:"},{"line_number":351,"context_line":"            params[path] \u003d {parameters.TYPE: parameters.COMMA_DELIMITED_LIST}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fp%2F4%3D","line":348,"updated":"2014-01-10 02:50:00.000000000","message":"As you pointed out, this will go away when I66255246e273dba414d9230b6e92bb86390dc8af gets merged.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"4ec9724b7b2300faead5df87e39ae199fe28db47","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.update_allowed \u003d update_allowed"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @classmethod"},{"line_number":61,"context_line":"    def from_dict(cls, schema_dict):"},{"line_number":62,"context_line":"        \"\"\""},{"line_number":63,"context_line":"        Return a Property Schema object from a legacy schema dictionary."},{"line_number":64,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FcQ8%3D","line":61,"updated":"2014-01-13 21:21:55.000000000","message":"I think we should keep the name from_legacy for properties.Schema, because no new resource types should be defined using dicts. (I2da66244760f782e774b332b07b08e526ce5a7ba was, I believe, the last one remaining to be switched over to using the properties.Schema class directly.) So I think this will be deprecated in Icehouse and removed in Juno or K.","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"6b0687469398b790c7736e5141bd5e2a53aca07d","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        self.update_allowed \u003d update_allowed"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @classmethod"},{"line_number":61,"context_line":"    def from_dict(cls, schema_dict):"},{"line_number":62,"context_line":"        \"\"\""},{"line_number":63,"context_line":"        Return a Property Schema object from a legacy schema dictionary."},{"line_number":64,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FYLI%3D","line":61,"in_reply_to":"AAAAUH%2F%2FcQ8%3D","updated":"2014-01-15 16:03:46.000000000","message":"Done","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"4ec9724b7b2300faead5df87e39ae199fe28db47","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            param.LIST: cls.LIST,"},{"line_number":133,"context_line":"            param.MAP: cls.MAP"},{"line_number":134,"context_line":"        }"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        # make update_allowed true by default on TemplateResources"},{"line_number":137,"context_line":"        # as the template should deal with this."},{"line_number":138,"context_line":"        return cls(data_type\u003dparam_type_map.get(param.type, cls.MAP),"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FcPs%3D","line":135,"updated":"2014-01-13 21:21:55.000000000","message":"Yaaaay! :)\n\nIt feels so good to delete all this cruft :))","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"8619e9df5c194727ab6b4ecf47924d67dce9b46c","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        Schema for the corresponding resource facade."},{"line_number":127,"context_line":"        \"\"\""},{"line_number":128,"context_line":"        param_type_map \u003d {"},{"line_number":129,"context_line":"            parameters.ParamSchema.STRING: Schema.STRING,"},{"line_number":130,"context_line":"            parameters.ParamSchema.NUMBER: Schema.NUMBER,"},{"line_number":131,"context_line":"            parameters.ParamSchema.COMMA_DELIMITED_LIST: Schema.LIST,"},{"line_number":132,"context_line":"            parameters.ParamSchema.JSON: Schema.MAP"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAUH%2F%2B7rM%3D","line":129,"updated":"2014-01-20 16:42:08.000000000","message":"So the final thing we want here is:\n\n  param.STRING: cls.STRING,\n\nand I can\u0027t see any reason not to jump straight to that implementation. That said, this gets fixed in I4a1dc2e65e7b118347933bdf18aba49c058aa28b so I\u0027ll ignore it.","commit_id":"b4b66b7560a9eaafed24d6703b79b9a6b93ce75f"}],"heat/engine/service.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"4ec9724b7b2300faead5df87e39ae199fe28db47","unresolved":false,"context_lines":[{"line_number":556,"context_line":""},{"line_number":557,"context_line":"        def properties_schema():"},{"line_number":558,"context_line":"            for name, schema_dict in resource_class.properties_schema.items():"},{"line_number":559,"context_line":"                schema \u003d properties.Schema.from_dict(schema_dict)"},{"line_number":560,"context_line":"                if schema.implemented:"},{"line_number":561,"context_line":"                    yield name, dict(schema)"},{"line_number":562,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FcOI%3D","line":559,"updated":"2014-01-13 21:21:55.000000000","message":"per previous comment, I think this was a bit more find-and-replace than we wanted.","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"6b0687469398b790c7736e5141bd5e2a53aca07d","unresolved":false,"context_lines":[{"line_number":556,"context_line":""},{"line_number":557,"context_line":"        def properties_schema():"},{"line_number":558,"context_line":"            for name, schema_dict in resource_class.properties_schema.items():"},{"line_number":559,"context_line":"                schema \u003d properties.Schema.from_dict(schema_dict)"},{"line_number":560,"context_line":"                if schema.implemented:"},{"line_number":561,"context_line":"                    yield name, dict(schema)"},{"line_number":562,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FYK8%3D","line":559,"in_reply_to":"AAAAUH%2F%2FcOI%3D","updated":"2014-01-15 16:03:46.000000000","message":"Done","commit_id":"edbb1aed1bd722d96ccd6d20d0693d8ffc4864e5"}],"heat/tests/test_parameters.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":228,"context_line":"# (CommaDelimited)List would be a list of lists, because one entry in the"},{"line_number":229,"context_line":"# AllowedValues list would be one valid value for the param, which is a list."},{"line_number":230,"context_line":"# The way it is used below mis-uses AllowedValues (IMHO)."},{"line_number":231,"context_line":"# Therefore, commenting the following two tests out for now."},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"#     def test_list_value_list_good(self):"},{"line_number":234,"context_line":"#         schema \u003d {\u0027Type\u0027: \u0027CommaDelimitedList\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FqFM%3D","line":231,"updated":"2014-01-10 02:50:00.000000000","message":"It depends whether you think of CommaDelimitedList as a list or a string. It _is_ a string but it exists to provide list semantics, so that\u0027s why I originally implemented AllowedValues with list semantics. IMO none of the constraints (this or e.g. Min/MaxLength) make much sense with string semantics, so the choice is between disallowing them all or giving them list semantics. Since the user is not obliged to use constraints, the latter seems better to me.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"2826bc56d36cb3f2a94688aff939e62740e9c6d8","unresolved":false,"context_lines":[{"line_number":228,"context_line":"# (CommaDelimited)List would be a list of lists, because one entry in the"},{"line_number":229,"context_line":"# AllowedValues list would be one valid value for the param, which is a list."},{"line_number":230,"context_line":"# The way it is used below mis-uses AllowedValues (IMHO)."},{"line_number":231,"context_line":"# Therefore, commenting the following two tests out for now."},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"#     def test_list_value_list_good(self):"},{"line_number":234,"context_line":"#         schema \u003d {\u0027Type\u0027: \u0027CommaDelimitedList\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fl%2BU%3D","line":231,"in_reply_to":"AAAAUH%2F%2Fo6g%3D","updated":"2014-01-10 17:31:31.000000000","message":"Yes, that gets my vote, unless anybody else disagrees?","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"8d65e59a948f08fdaf22a2e0953188ae98b96e44","unresolved":false,"context_lines":[{"line_number":228,"context_line":"# (CommaDelimited)List would be a list of lists, because one entry in the"},{"line_number":229,"context_line":"# AllowedValues list would be one valid value for the param, which is a list."},{"line_number":230,"context_line":"# The way it is used below mis-uses AllowedValues (IMHO)."},{"line_number":231,"context_line":"# Therefore, commenting the following two tests out for now."},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"#     def test_list_value_list_good(self):"},{"line_number":234,"context_line":"#         schema \u003d {\u0027Type\u0027: \u0027CommaDelimitedList\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fo6g%3D","line":231,"in_reply_to":"AAAAUH%2F%2FqFM%3D","updated":"2014-01-10 08:10:14.000000000","message":"So you are saying we should keep the same semantics as we have today, i.e. make the testcase below succeed? If so, I will make the AllowedValues constraint class provide that behavior.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":293,"context_line":"# a Map would be a list of Maps, because one entry in the AllowedValues list"},{"line_number":294,"context_line":"# would be one valid value for the param, which is a Map."},{"line_number":295,"context_line":"# The way it is used below mis-uses AllowedValues (IMHO)."},{"line_number":296,"context_line":"# Therefore, commenting the following two tests out for now."},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"#     def test_map_values_good(self):"},{"line_number":299,"context_line":"#         \u0027\u0027\u0027Happy path for map keys.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FqEo%3D","line":296,"updated":"2014-01-10 02:50:00.000000000","message":"CloudFormation doesn\u0027t have a Json type.\n\nI agree that this doesn\u0027t make much sense. The blueprint parameter-nested-schema is a better way forward for this.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"},{"author":{"_account_id":7193,"name":"Thomas Spatzier","email":"thomas.spatzier@icloud.com","username":"thomasspatzier"},"change_message_id":"8d65e59a948f08fdaf22a2e0953188ae98b96e44","unresolved":false,"context_lines":[{"line_number":293,"context_line":"# a Map would be a list of Maps, because one entry in the AllowedValues list"},{"line_number":294,"context_line":"# would be one valid value for the param, which is a Map."},{"line_number":295,"context_line":"# The way it is used below mis-uses AllowedValues (IMHO)."},{"line_number":296,"context_line":"# Therefore, commenting the following two tests out for now."},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"#     def test_map_values_good(self):"},{"line_number":299,"context_line":"#         \u0027\u0027\u0027Happy path for map keys.\u0027\u0027\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fo6U%3D","line":296,"in_reply_to":"AAAAUH%2F%2FqEo%3D","updated":"2014-01-10 08:10:14.000000000","message":"Ok, so I will take this out unless anyone objects.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"}],"heat/tests/test_validate.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"12389a6ea411011e43baa2e6dfc36ba7457b98ff","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        # Changing expected result below since parameter object with new"},{"line_number":649,"context_line":"        # Schema class is returned, which contains keys as used by Schema"},{"line_number":650,"context_line":"        # class and more information."},{"line_number":651,"context_line":"        # Is this assumption correct?"},{"line_number":652,"context_line":"        self.assertEqual(res[\u0027Parameters\u0027], {\u0027KeyName\u0027: {"},{"line_number":653,"context_line":"            \u0027type\u0027: \u0027string\u0027,"},{"line_number":654,"context_line":"            \u0027description\u0027: \u0027Name of an existing EC2KeyPair to enable SSH \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FqD8%3D","line":651,"updated":"2014-01-10 02:50:00.000000000","message":"No; this is an external API that needs to remain stable.\n\nWe probably need to create a new API that undoes some of my mistakes and removes some of these aws-isms like camel-case keys.","commit_id":"d26b1e3ba7fef0dd0b043fafba5ee69d5806165a"}]}
