)]}'
{"openstack/telemetry/v2/alarm.py":[{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"dfcf1890b34e8170b062237838e2d2872cb54942","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            val \u003d None"},{"line_number":54,"context_line":"        return val"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def __repr__(self):"},{"line_number":57,"context_line":"        return \"alarm: %s\" % self._attrs"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def change_state(self, session, next_state):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_ff2d7347","line":56,"updated":"2014-08-19 18:34:10.000000000","message":"If you set the class variable resource_key \u003d \u0027alarm\u0027 then you get this for free as the base class\u0027 repr.","commit_id":"15e17ab8a6e95a861ab74b559ee0e72d26231cb9"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"3e14a4b7a083c036df18f2bc939c4c1a421717f9","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            val \u003d None"},{"line_number":54,"context_line":"        return val"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def __repr__(self):"},{"line_number":57,"context_line":"        return \"alarm: %s\" % self._attrs"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def change_state(self, session, next_state):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_7f7883c4","line":56,"in_reply_to":"1abeadc6_ff2d7347","updated":"2014-08-19 18:50:10.000000000","message":"Setting the resource_key comes with side effects of having create retrieve and update operations expect a json wrapper.","commit_id":"15e17ab8a6e95a861ab74b559ee0e72d26231cb9"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"aefff6418eb442803b82e3b517b7d7056030c356","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    alarm_id \u003d resource.prop(\u0027alarm_id\u0027)"},{"line_number":32,"context_line":"    combination_rule \u003d resource.prop(\u0027combination_rule\u0027)"},{"line_number":33,"context_line":"    description \u003d resource.prop(\u0027description\u0027)"},{"line_number":34,"context_line":"    enabled \u003d resource.prop(\u0027enabled\u0027)"},{"line_number":35,"context_line":"    insufficient_data_actions \u003d resource.prop(\u0027insufficient_data_actions\u0027)"},{"line_number":36,"context_line":"    name \u003d resource.prop(\u0027name\u0027)"},{"line_number":37,"context_line":"    ok_actions \u003d resource.prop(\u0027ok_actions\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_db06de1c","line":34,"updated":"2014-08-20 18:18:27.000000000","message":"type\u003dbool","commit_id":"e45ebfc3cdb88a0767940b76b6efd243abfcf4e1"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"e8929913530abf4ebb93400e8825f811d36d4948","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    alarm_id \u003d resource.prop(\u0027alarm_id\u0027)"},{"line_number":32,"context_line":"    combination_rule \u003d resource.prop(\u0027combination_rule\u0027)"},{"line_number":33,"context_line":"    description \u003d resource.prop(\u0027description\u0027)"},{"line_number":34,"context_line":"    enabled \u003d resource.prop(\u0027enabled\u0027)"},{"line_number":35,"context_line":"    insufficient_data_actions \u003d resource.prop(\u0027insufficient_data_actions\u0027)"},{"line_number":36,"context_line":"    name \u003d resource.prop(\u0027name\u0027)"},{"line_number":37,"context_line":"    ok_actions \u003d resource.prop(\u0027ok_actions\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_3bd0b21e","line":34,"in_reply_to":"1abeadc6_db06de1c","updated":"2014-08-20 18:31:22.000000000","message":"Done","commit_id":"e45ebfc3cdb88a0767940b76b6efd243abfcf4e1"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"aefff6418eb442803b82e3b517b7d7056030c356","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    name \u003d resource.prop(\u0027name\u0027)"},{"line_number":37,"context_line":"    ok_actions \u003d resource.prop(\u0027ok_actions\u0027)"},{"line_number":38,"context_line":"    project_id \u003d resource.prop(\u0027project_id\u0027)"},{"line_number":39,"context_line":"    repeat_actions \u003d resource.prop(\u0027repeat_actions\u0027)"},{"line_number":40,"context_line":"    state \u003d resource.prop(\u0027state\u0027)"},{"line_number":41,"context_line":"    state_changed_at \u003d resource.prop(\u0027state_timestamp\u0027)"},{"line_number":42,"context_line":"    threshold_rule \u003d resource.prop(\u0027threshold_rule\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_1b0db637","line":39,"updated":"2014-08-20 18:18:27.000000000","message":"type\u003dbool","commit_id":"e45ebfc3cdb88a0767940b76b6efd243abfcf4e1"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"e8929913530abf4ebb93400e8825f811d36d4948","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    name \u003d resource.prop(\u0027name\u0027)"},{"line_number":37,"context_line":"    ok_actions \u003d resource.prop(\u0027ok_actions\u0027)"},{"line_number":38,"context_line":"    project_id \u003d resource.prop(\u0027project_id\u0027)"},{"line_number":39,"context_line":"    repeat_actions \u003d resource.prop(\u0027repeat_actions\u0027)"},{"line_number":40,"context_line":"    state \u003d resource.prop(\u0027state\u0027)"},{"line_number":41,"context_line":"    state_changed_at \u003d resource.prop(\u0027state_timestamp\u0027)"},{"line_number":42,"context_line":"    threshold_rule \u003d resource.prop(\u0027threshold_rule\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_fbb2ba04","line":39,"in_reply_to":"1abeadc6_1b0db637","updated":"2014-08-20 18:31:22.000000000","message":"Done","commit_id":"e45ebfc3cdb88a0767940b76b6efd243abfcf4e1"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"aefff6418eb442803b82e3b517b7d7056030c356","unresolved":false,"context_lines":[{"line_number":62,"context_line":"           The next_state may be one of: \u0027ok\u0027 \u0027insufficient data\u0027 \u0027alarm\u0027"},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        url \u003d utils.urljoin(self.base_path, self.id, \u0027state\u0027)"},{"line_number":65,"context_line":"        resp \u003d session.put(url, service\u003dself.service, json\u003dnext_state).body"},{"line_number":66,"context_line":"        return resp"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def check_state(self, session):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_7b8eaa7a","line":65,"updated":"2014-08-20 18:18:27.000000000","message":"does this actually work?  the docs for some reason say next_state is type dict, but there is no example","commit_id":"e45ebfc3cdb88a0767940b76b6efd243abfcf4e1"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"e8929913530abf4ebb93400e8825f811d36d4948","unresolved":false,"context_lines":[{"line_number":62,"context_line":"           The next_state may be one of: \u0027ok\u0027 \u0027insufficient data\u0027 \u0027alarm\u0027"},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        url \u003d utils.urljoin(self.base_path, self.id, \u0027state\u0027)"},{"line_number":65,"context_line":"        resp \u003d session.put(url, service\u003dself.service, json\u003dnext_state).body"},{"line_number":66,"context_line":"        return resp"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def check_state(self, session):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_9b71c646","line":65,"in_reply_to":"1abeadc6_7b8eaa7a","updated":"2014-08-20 18:31:22.000000000","message":"you can test it by using the example/action in https://review.openstack.org/#/c/115112/\n\nthe content retrieved is not wrapped at all on GET, and on PUT it does not accept any wrapping as a dict either.  \n\nThe docs are a bit lacking in that respect.","commit_id":"e45ebfc3cdb88a0767940b76b6efd243abfcf4e1"},{"author":{"_account_id":8736,"name":"Terry Howe","email":"terrylhowe@gmail.com","username":"terrylhowe"},"change_message_id":"aefff6418eb442803b82e3b517b7d7056030c356","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        url \u003d utils.urljoin(self.base_path, self.id, \u0027state\u0027)"},{"line_number":74,"context_line":"        resp \u003d session.get(url, service\u003dself.service).body"},{"line_number":75,"context_line":"        current_state \u003d resp.replace(\u0027\\\"\u0027, \u0027\u0027)"},{"line_number":76,"context_line":"        return current_state"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_3bdfd26a","line":75,"updated":"2014-08-20 18:18:27.000000000","message":"so this call just returns a string like \"ok\"","commit_id":"e45ebfc3cdb88a0767940b76b6efd243abfcf4e1"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"e8929913530abf4ebb93400e8825f811d36d4948","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        url \u003d utils.urljoin(self.base_path, self.id, \u0027state\u0027)"},{"line_number":74,"context_line":"        resp \u003d session.get(url, service\u003dself.service).body"},{"line_number":75,"context_line":"        current_state \u003d resp.replace(\u0027\\\"\u0027, \u0027\u0027)"},{"line_number":76,"context_line":"        return current_state"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_9bbf06aa","line":75,"in_reply_to":"1abeadc6_3bdfd26a","updated":"2014-08-20 18:31:22.000000000","message":"It returns the state, as a property getter would, and also coincidentally in the same for that you would sent to change_state to force a state change, see the note above.\n\nI tested this with the example/action script.","commit_id":"e45ebfc3cdb88a0767940b76b6efd243abfcf4e1"}]}
