)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"c633a8e93141631340046b945c7f8c507c23c22d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Fengqian.Gao \u003cfengqian.gao@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-08-01 11:30:05 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add pagination support of API for database sqlalchemy and mongoDB"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Provide API support for database pagination query. It supports"},{"line_number":10,"context_line":"sqlalchemy and mongoDB with functions get_resources, get_meters,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"AAAAQn%2F%2FF7w%3D","line":7,"updated":"2013-08-07 11:06:12.000000000","message":"s/Add pagination support of API for database sqlalchemy and mongoDB/Add pagination support to selected APIs/\n\n(keep this patch focused on API changes only)","commit_id":"ec25bef77332aa7d494509f6f2ec78441b60f8b8"}],"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"dc3ea70b8a80c948f3b974872a13c75affaebaa5","unresolved":false,"context_lines":[{"line_number":668,"context_line":"        \"\"\""},{"line_number":669,"context_line":"        kwargs \u003d _query_to_kwargs(q, pecan.request.storage_conn.get_meters)"},{"line_number":670,"context_line":"        ret_pairs \u003d None"},{"line_number":671,"context_line":"        if markers is not None:"},{"line_number":672,"context_line":"            ret_pairs \u003d _get_marker_pairs(markers, Meter)"},{"line_number":673,"context_line":"        if sort_dir is not None:"},{"line_number":674,"context_line":"            sort_dir_op \u003d sort_dir_kind.validate(sort_dir)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FoBw%3D","line":671,"updated":"2013-07-26 08:54:38.000000000","message":"I think markers can never be None, the type is a array. So we can just call _get_marker_pairs, to validate it and translate it to a dict.","commit_id":"95c27f88fbbc56926c23087521fb34ce4299c836"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"dc3ea70b8a80c948f3b974872a13c75affaebaa5","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        if markers is not None:"},{"line_number":672,"context_line":"            ret_pairs \u003d _get_marker_pairs(markers, Meter)"},{"line_number":673,"context_line":"        if sort_dir is not None:"},{"line_number":674,"context_line":"            sort_dir_op \u003d sort_dir_kind.validate(sort_dir)"},{"line_number":675,"context_line":"        return [Meter.from_db_model(m)"},{"line_number":676,"context_line":"                for m in pecan.request.storage_conn.get_meters("},{"line_number":677,"context_line":"                limit\u003dlimit, marker_pairs\u003dret_pairs, sort_key\u003dsort_key,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FoBo%3D","line":674,"updated":"2013-07-26 08:54:38.000000000","message":"I think using \u0027sort_dir_kind\u0027 in the decorator will validate automatically this field.","commit_id":"95c27f88fbbc56926c23087521fb34ce4299c836"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"dc3ea70b8a80c948f3b974872a13c75affaebaa5","unresolved":false,"context_lines":[{"line_number":770,"context_line":"        \"\"\""},{"line_number":771,"context_line":"        kwargs \u003d _query_to_kwargs(q, pecan.request.storage_conn.get_resources)"},{"line_number":772,"context_line":"        ret_pairs \u003d None"},{"line_number":773,"context_line":"        if markers is not None:"},{"line_number":774,"context_line":"            ret_pairs \u003d _get_marker_pairs(markers, Resource)"},{"line_number":775,"context_line":"        if sort_dir is not None:"},{"line_number":776,"context_line":"            sort_dir_op \u003d sort_dir_kind.validate(sort_dir)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FoDQ%3D","line":773,"updated":"2013-07-26 08:54:38.000000000","message":"same","commit_id":"95c27f88fbbc56926c23087521fb34ce4299c836"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"dc3ea70b8a80c948f3b974872a13c75affaebaa5","unresolved":false,"context_lines":[{"line_number":773,"context_line":"        if markers is not None:"},{"line_number":774,"context_line":"            ret_pairs \u003d _get_marker_pairs(markers, Resource)"},{"line_number":775,"context_line":"        if sort_dir is not None:"},{"line_number":776,"context_line":"            sort_dir_op \u003d sort_dir_kind.validate(sort_dir)"},{"line_number":777,"context_line":"        resources \u003d ["},{"line_number":778,"context_line":"            Resource.from_db_and_links(r,"},{"line_number":779,"context_line":"                                       self._resource_links(r.resource_id))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FoEg%3D","line":776,"updated":"2013-07-26 08:54:38.000000000","message":"same","commit_id":"95c27f88fbbc56926c23087521fb34ce4299c836"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"dc3ea70b8a80c948f3b974872a13c75affaebaa5","unresolved":false,"context_lines":[{"line_number":972,"context_line":"        kwargs \u003d _query_to_kwargs(q,"},{"line_number":973,"context_line":"                                  pecan.request.storage_conn.get_alarms)"},{"line_number":974,"context_line":"        ret_pairs \u003d None"},{"line_number":975,"context_line":"        if markers is not None:"},{"line_number":976,"context_line":"            ret_pairs \u003d _get_marker_pairs(markers, Alarm)"},{"line_number":977,"context_line":"        if sort_dir is not None:"},{"line_number":978,"context_line":"            sort_dir_op \u003d sort_dir_kind.validate(sort_dir)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FoBk%3D","line":975,"updated":"2013-07-26 08:54:38.000000000","message":"same","commit_id":"95c27f88fbbc56926c23087521fb34ce4299c836"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"dc3ea70b8a80c948f3b974872a13c75affaebaa5","unresolved":false,"context_lines":[{"line_number":975,"context_line":"        if markers is not None:"},{"line_number":976,"context_line":"            ret_pairs \u003d _get_marker_pairs(markers, Alarm)"},{"line_number":977,"context_line":"        if sort_dir is not None:"},{"line_number":978,"context_line":"            sort_dir_op \u003d sort_dir_kind.validate(sort_dir)"},{"line_number":979,"context_line":"        return [Alarm.from_db_model(m)"},{"line_number":980,"context_line":"                for m in pecan.request.storage_conn.get_alarms("},{"line_number":981,"context_line":"                limit\u003dlimit, marker_pairs\u003dret_pairs, sort_key\u003dsort_key,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAQn%2F%2FoBg%3D","line":978,"updated":"2013-07-26 08:54:38.000000000","message":"same","commit_id":"95c27f88fbbc56926c23087521fb34ce4299c836"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"9e34561a72b4f5c67e899fcddb6a6fb8ab59e9ee","unresolved":false,"context_lines":[{"line_number":671,"context_line":"        :params sort_dir: Directions used to sort results (asc, desc)."},{"line_number":672,"context_line":"        \"\"\""},{"line_number":673,"context_line":"        kwargs \u003d _query_to_kwargs(q, pecan.request.storage_conn.get_meters)"},{"line_number":674,"context_line":"        ret_pairs \u003d _get_marker_pairs(markers, Meter)"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"        return [Meter.from_db_model(m)"},{"line_number":677,"context_line":"                for m in pecan.request.storage_conn.get_meters("}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQn%2F%2B7wE%3D","line":674,"updated":"2013-08-09 18:24:44.000000000","message":"out of curiosity, why ret_pairs, when they\u0027re marker_pairs?","commit_id":"54bc6781e6065fd48422d582d1d2099b048eb475"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3036cadd37e5a96607f0cf9dc8fd19d945df554d","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                rel\u003drel_name)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"class MarkerPair(_Base):"},{"line_number":288,"context_line":"    \"\"\"Marker pair to identify the marker object."},{"line_number":289,"context_line":"    \"\"\""},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F4b0%3D","line":287,"updated":"2013-08-15 20:04:47.000000000","message":"There\u0027s another changeset in progress now to deal with metadata fields with different types (https://review.openstack.org/#/c/38795/). Should we do something similar here?","commit_id":"7fbf745e19b2059bdc0f4ceca6d273af286f7cb3"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3036cadd37e5a96607f0cf9dc8fd19d945df554d","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                   )"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"def _get_marker_pair(marker_pair, db_model):"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    ret \u003d {}"},{"line_number":306,"context_line":"    if marker_pair:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F4bk%3D","line":303,"updated":"2013-08-15 20:04:47.000000000","message":"This function returns None if no marker_pair is provided. It should always return a dictionary (even if it is empty), so that callers do not have to check the return type.","commit_id":"7fbf745e19b2059bdc0f4ceca6d273af286f7cb3"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3036cadd37e5a96607f0cf9dc8fd19d945df554d","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"def _get_marker_pair(marker_pair, db_model):"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    ret \u003d {}"},{"line_number":306,"context_line":"    if marker_pair:"},{"line_number":307,"context_line":"        if hasattr(db_model, marker_pair.field):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F4bg%3D","line":304,"updated":"2013-08-15 20:04:47.000000000","message":"This function should be a method of the Model base class. That method can raise AttributeError, and the API code can convert to InvalidInput (to avoid needing WSME code imported into the storage package).","commit_id":"7fbf745e19b2059bdc0f4ceca6d273af286f7cb3"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3036cadd37e5a96607f0cf9dc8fd19d945df554d","unresolved":false,"context_lines":[{"line_number":662,"context_line":""},{"line_number":663,"context_line":"    @wsme_pecan.wsexpose([Meter], [Query], int, MarkerPair, wtypes.text,"},{"line_number":664,"context_line":"                         sort_dir_kind)"},{"line_number":665,"context_line":"    def get_all(self, q\u003d[], limit\u003dNone, marker\u003d{}, sort_key\u003d\u0027user_id\u0027,"},{"line_number":666,"context_line":"                sort_dir\u003d\u0027desc\u0027):"},{"line_number":667,"context_line":"        \"\"\"Return all known meters, based on the data recorded so far."},{"line_number":668,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F4Zg%3D","line":665,"updated":"2013-08-15 20:04:47.000000000","message":"I think I\u0027ve asked this before, but is one sort key enough? Should we support a list of pairs of sort keys and directions?","commit_id":"7fbf745e19b2059bdc0f4ceca6d273af286f7cb3"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3036cadd37e5a96607f0cf9dc8fd19d945df554d","unresolved":false,"context_lines":[{"line_number":663,"context_line":"    @wsme_pecan.wsexpose([Meter], [Query], int, MarkerPair, wtypes.text,"},{"line_number":664,"context_line":"                         sort_dir_kind)"},{"line_number":665,"context_line":"    def get_all(self, q\u003d[], limit\u003dNone, marker\u003d{}, sort_key\u003d\u0027user_id\u0027,"},{"line_number":666,"context_line":"                sort_dir\u003d\u0027desc\u0027):"},{"line_number":667,"context_line":"        \"\"\"Return all known meters, based on the data recorded so far."},{"line_number":668,"context_line":""},{"line_number":669,"context_line":"        :param q: Filter rules for the meters to be returned."}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F4Zw%3D","line":666,"updated":"2013-08-15 20:04:47.000000000","message":"Put all of the pagination arguments into a single structure, Pagination, and then update the API methods to take one argument of that type. That will cut down the number of raw arguments to each method and make it easier to document the pagination stuff consistently (since we can put the documentation in that class).","commit_id":"7fbf745e19b2059bdc0f4ceca6d273af286f7cb3"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"ffd888c144e5cc0db5c1195af376bdcca445d9a1","unresolved":false,"context_lines":[{"line_number":45,"context_line":"from ceilometer.openstack.common import timeutils"},{"line_number":46,"context_line":"from ceilometer import sample"},{"line_number":47,"context_line":"from ceilometer import storage"},{"line_number":48,"context_line":"from ceilometer.storage.base import Pagination as backend_pagination"},{"line_number":49,"context_line":"from ceilometer.api import acl"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAARn%2F%2F4ns%3D","line":48,"updated":"2013-08-20 17:21:56.000000000","message":"import modules not classes\n\nfrom ceilometer.storage import base","commit_id":"fa269a0c063de006b345a5edd20e9dfa680ef4c3"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"19f7cb68dd391570142720a6271c31085afa5e84","unresolved":false,"context_lines":[{"line_number":633,"context_line":"        pecan.request.context[\u0027meter_id\u0027] \u003d meter_id"},{"line_number":634,"context_line":"        self._id \u003d meter_id"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"    @wsme_pecan.wsexpose([Sample], [Query], int)"},{"line_number":637,"context_line":"    def get_all(self, q\u003d[], limit\u003dNone):"},{"line_number":638,"context_line":"        \"\"\"Return samples for the meter."},{"line_number":639,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAASX%2F%2F1jQ%3D","line":636,"updated":"2013-08-26 15:02:57.000000000","message":"there\u0027s a limit defined here. does this conflict with limit in pagination?","commit_id":"edf8296a40a725596d56b8fb95f9626e93e92817"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"1d5ebe043c1ead78ff8f9897db546ccec1d4a3a2","unresolved":false,"context_lines":[{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        return [Meter.from_db_model(m)"},{"line_number":795,"context_line":"                for m in pecan.request.storage_conn.get_meters("},{"line_number":796,"context_line":"                pagination\u003dbackend_pagination, **kwargs)]"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"class Resource(_Base):"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAASn%2F%2Fu1s%3D","line":796,"updated":"2013-08-30 09:17:39.000000000","message":"how about to keep the code more clean?\n\nkwargs.update({\u0027pagination\u0027: _convert_pagination_parameters(pagination)})?","commit_id":"0aaa11daa439b4bb108264346a29d4d1eb2caa0d"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c9c95586ed4a8cf8d0853b9745b86ea6e5396f0f","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"#NOTE(Fengqian): Move this method out of Query class because the marker_pair"},{"line_number":164,"context_line":"#of Pagination class also need to use it."},{"line_number":165,"context_line":"def get_value_as_type(value, convert_type):"},{"line_number":166,"context_line":"    \"\"\"Convert the data to specific type."},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    :param value: The input data."}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2Fpkc%3D","line":165,"updated":"2013-09-01 15:13:12.000000000","message":"This function should be marked private to the module by prefixing the name with _.","commit_id":"156b3cbd0478bf11ee05a9a49d66fc900a18e12c"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c9c95586ed4a8cf8d0853b9745b86ea6e5396f0f","unresolved":false,"context_lines":[{"line_number":384,"context_line":"    marker_type \u003d wtypes.text"},{"line_number":385,"context_line":"    \"The data type of marker\""},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"    sort_keys \u003d [wtypes.text]"},{"line_number":388,"context_line":"    \"Array of attributes passed in by users for sorting\""},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    sort_dirs \u003d [sort_dir_kind]"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2FpkQ%3D","line":387,"updated":"2013-09-01 15:13:12.000000000","message":"I\u0027m still worried that having two separate lists gives the user the opportunity to pass us bad data by having them not be equal in length. It would be better to define a SortKey type that has column and direction attributes, and make this sort_keys a list of SortKey instances.","commit_id":"156b3cbd0478bf11ee05a9a49d66fc900a18e12c"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c9c95586ed4a8cf8d0853b9745b86ea6e5396f0f","unresolved":false,"context_lines":[{"line_number":393,"context_line":"    def __init__(self, limit\u003dNone, primary_sort_dir\u003d\u0027desc\u0027, marker\u003dNone,"},{"line_number":394,"context_line":"                 marker_type\u003dNone, sort_keys\u003d[], sort_dirs\u003d[]):"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"        if limit is not None:"},{"line_number":397,"context_line":"            limit \u003d int(limit)"},{"line_number":398,"context_line":"        super(Pagination, self).__init__(limit\u003dlimit,"},{"line_number":399,"context_line":"                                         primary_sort_dir\u003dprimary_sort_dir,"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2FpkI%3D","line":396,"updated":"2013-09-01 15:13:12.000000000","message":"WSME will do this type conversion, so we don\u0027t need to.","commit_id":"156b3cbd0478bf11ee05a9a49d66fc900a18e12c"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c9c95586ed4a8cf8d0853b9745b86ea6e5396f0f","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        return get_value_as_type(self.marker, self.marker_type)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"def _convert_pagination_parameters(pagination\u003dNone):"},{"line_number":422,"context_line":"    \"\"\"Convert pagination parameters"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    Convert the pagination parameters from API level to"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2FpkA%3D","line":421,"updated":"2013-09-01 15:13:12.000000000","message":"This should be a private method of the API\u0027s Pagination class, above.","commit_id":"156b3cbd0478bf11ee05a9a49d66fc900a18e12c"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c9c95586ed4a8cf8d0853b9745b86ea6e5396f0f","unresolved":false,"context_lines":[{"line_number":427,"context_line":"    if pagination is None:"},{"line_number":428,"context_line":"        return None"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    if len(pagination.sort_keys) !\u003d len(pagination.sort_dirs):"},{"line_number":431,"context_line":"        msg \u003d _(\"sort keys and sort directions must have same length\")"},{"line_number":432,"context_line":"        raise wsme.exc.InvalidInput(\u0027length of (sort keys, sort_dirs)\u0027,"},{"line_number":433,"context_line":"                                    (len(pagination.sort_keys),"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2FpkE%3D","line":430,"updated":"2013-09-01 15:13:12.000000000","message":"This validation won\u0027t be necessary if you use a list of SortKeys as described above.","commit_id":"156b3cbd0478bf11ee05a9a49d66fc900a18e12c"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c9c95586ed4a8cf8d0853b9745b86ea6e5396f0f","unresolved":false,"context_lines":[{"line_number":799,"context_line":"        :param pagination: Parameters for pagination query."},{"line_number":800,"context_line":"        \"\"\""},{"line_number":801,"context_line":"        kwargs \u003d _query_to_kwargs(q, pecan.request.storage_conn.get_meters)"},{"line_number":802,"context_line":"        kwargs.update("},{"line_number":803,"context_line":"            {\u0027pagination\u0027: _convert_pagination_parameters(pagination)})"},{"line_number":804,"context_line":""},{"line_number":805,"context_line":"        return [Meter.from_db_model(m)"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2Fpjk%3D","line":802,"updated":"2013-09-01 15:13:12.000000000","message":"kwargs[\u0027pagination\u0027] \u003d ...","commit_id":"156b3cbd0478bf11ee05a9a49d66fc900a18e12c"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c9c95586ed4a8cf8d0853b9745b86ea6e5396f0f","unresolved":false,"context_lines":[{"line_number":892,"context_line":"        :param pagination: Parameters for pagination query."},{"line_number":893,"context_line":"        \"\"\""},{"line_number":894,"context_line":"        kwargs \u003d _query_to_kwargs(q, pecan.request.storage_conn.get_resources)"},{"line_number":895,"context_line":"        kwargs.update("},{"line_number":896,"context_line":"            {\u0027pagination\u0027: _convert_pagination_parameters(pagination)})"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"        resources \u003d ["}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2Fpjg%3D","line":895,"updated":"2013-09-01 15:13:12.000000000","message":"kwargs[\u0027pagination\u0027] \u003d ...","commit_id":"156b3cbd0478bf11ee05a9a49d66fc900a18e12c"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c9c95586ed4a8cf8d0853b9745b86ea6e5396f0f","unresolved":false,"context_lines":[{"line_number":1156,"context_line":"        \"\"\""},{"line_number":1157,"context_line":"        kwargs \u003d _query_to_kwargs(q,"},{"line_number":1158,"context_line":"                                  pecan.request.storage_conn.get_alarms)"},{"line_number":1159,"context_line":"        kwargs.update("},{"line_number":1160,"context_line":"            {\u0027pagination\u0027: _convert_pagination_parameters(pagination)})"},{"line_number":1161,"context_line":""},{"line_number":1162,"context_line":"        return [Alarm.from_db_model(m)"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAASn%2F%2FpjY%3D","line":1159,"updated":"2013-09-01 15:13:12.000000000","message":"kwargs[\u0027pagination\u0027] \u003d ...","commit_id":"156b3cbd0478bf11ee05a9a49d66fc900a18e12c"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"c11a6c11d6a1ef32b4c7a2fe26316cf03541de1b","unresolved":false,"context_lines":[{"line_number":798,"context_line":"    #NOTE(Fengqian): Seperate the user specificed sort keys and"},{"line_number":799,"context_line":"    #sort dirs out of pagination class. Create a new class SortArgs"},{"line_number":800,"context_line":"    #for them."},{"line_number":801,"context_line":"    @wsme_pecan.wsexpose([Meter], [Query], Pagination, [SortArgs])"},{"line_number":802,"context_line":"    def get_all(self, q\u003d[], pagination\u003dNone, sortargs\u003d[]):"},{"line_number":803,"context_line":"        \"\"\"Return all known meters, based on the data recorded so far."},{"line_number":804,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAASn%2F%2FlZs%3D","line":801,"updated":"2013-09-03 06:52:57.000000000","message":"No objection. Just wondering whether we can put the list of SortArgs into Pagination?","commit_id":"707c94ff0e2fb5de98443ae370e6023556b54690"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"701a23a9332521b666e193dc730f99a561ef678a","unresolved":false,"context_lines":[{"line_number":54,"context_line":"from ceilometer import sample"},{"line_number":55,"context_line":"from ceilometer import storage"},{"line_number":56,"context_line":"from ceilometer import utils"},{"line_number":57,"context_line":"from ceilometer.storage import base"},{"line_number":58,"context_line":"from ceilometer.api import acl"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAASn%2F%2FcJg%3D","line":57,"updated":"2013-09-04 18:39:17.000000000","message":"Imports should be in alphabetical order. See HACKING\nhttps://github.com/openstack-dev/hacking/blob/master/HACKING.rst","commit_id":"98042730d9287a1c9f103a53fcc752f644a76676"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"701a23a9332521b666e193dc730f99a561ef678a","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        return _get_value_as_type(self.value, self.type)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"#NOTE(Fengqian): Move this method out of Query class because the marker_pair"},{"line_number":177,"context_line":"#of Pagination class also need to use it."},{"line_number":178,"context_line":"def _get_value_as_type(value, convert_type):"},{"line_number":179,"context_line":"    \"\"\"Convert the data to specific type."}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAASn%2F%2FcJA%3D","line":176,"updated":"2013-09-04 18:39:17.000000000","message":"PEP8 http://www.python.org/dev/peps/pep-0008/#comments","commit_id":"98042730d9287a1c9f103a53fcc752f644a76676"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"701a23a9332521b666e193dc730f99a561ef678a","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    \"\"\"Convert the data to specific type."},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    :param value: The input data."},{"line_number":182,"context_line":"    :param convert_type: The data type specified by user"},{"line_number":183,"context_line":"    :returns: value converted with the specified data type."},{"line_number":184,"context_line":"    \"\"\""},{"line_number":185,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAASn%2F%2FcHs%3D","line":182,"updated":"2013-09-04 18:39:17.000000000","message":"This method could be rewritten to be more data-driven, which would simplify testing, complexity and readability.","commit_id":"98042730d9287a1c9f103a53fcc752f644a76676"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"701a23a9332521b666e193dc730f99a561ef678a","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                LOG.debug(msg)"},{"line_number":194,"context_line":"        else:"},{"line_number":195,"context_line":"            if convert_type \u003d\u003d \u0027integer\u0027:"},{"line_number":196,"context_line":"                converted_value \u003d int(value)"},{"line_number":197,"context_line":"            elif convert_type \u003d\u003d \u0027float\u0027:"},{"line_number":198,"context_line":"                converted_value \u003d float(value)"},{"line_number":199,"context_line":"            elif convert_type \u003d\u003d \u0027boolean\u0027:"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAASn%2F%2FcHo%3D","line":196,"updated":"2013-09-04 18:39:17.000000000","message":"could just\n\nreturn int(value)","commit_id":"98042730d9287a1c9f103a53fcc752f644a76676"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"701a23a9332521b666e193dc730f99a561ef678a","unresolved":false,"context_lines":[{"line_number":810,"context_line":""},{"line_number":811,"context_line":"    #NOTE(Fengqian): Seperate the user specificed sort keys and"},{"line_number":812,"context_line":"    #sort dirs out of pagination class. Create a new class SortArgs"},{"line_number":813,"context_line":"    #for them."},{"line_number":814,"context_line":"    @wsme_pecan.wsexpose([Meter], [Query], Pagination, [SortArgs])"},{"line_number":815,"context_line":"    def get_all(self, q\u003d[], pagination\u003dNone, sortargs\u003d[]):"},{"line_number":816,"context_line":"        \"\"\"Return all known meters, based on the data recorded so far."}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAASn%2F%2FcG0%3D","line":813,"updated":"2013-09-04 18:39:17.000000000","message":"pep8 comments","commit_id":"98042730d9287a1c9f103a53fcc752f644a76676"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"1993379734ee48dd870fb4433f7f56400e59fedb","unresolved":false,"context_lines":[{"line_number":45,"context_line":"from ceilometer.openstack.common.notifier import api as notify"},{"line_number":46,"context_line":"from ceilometer.openstack.common import strutils"},{"line_number":47,"context_line":"from ceilometer.openstack.common import timeutils"},{"line_number":48,"context_line":"from ceilometer.storage import base"},{"line_number":49,"context_line":"from ceilometer import sample"},{"line_number":50,"context_line":"from ceilometer import storage"},{"line_number":51,"context_line":"from ceilometer import utils"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATX%2F%2F%2FRg%3D","line":48,"updated":"2013-10-23 08:47:20.000000000","message":"wrong import order","commit_id":"2ae8d14ede558e9f964119abdaf1b3bd319ccd55"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"1993379734ee48dd870fb4433f7f56400e59fedb","unresolved":false,"context_lines":[{"line_number":953,"context_line":"            remainder \u003d remainder[:-1]"},{"line_number":954,"context_line":"        return MeterController(meter_id), remainder"},{"line_number":955,"context_line":""},{"line_number":956,"context_line":"    @wsme_pecan.wsexpose([Meter], [Query], Pagination, [SortArgs])"},{"line_number":957,"context_line":"    def get_all(self, q\u003d[], pagination\u003dNone, sortargs\u003d[]):"},{"line_number":958,"context_line":"        \"\"\"Return all known meters, based on the data recorded so far."},{"line_number":959,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATX%2F%2F%2FNU%3D","line":956,"updated":"2013-10-23 08:47:20.000000000","message":"maybe embed the [SorArgs] into Pagination? Like AlarmThresholdRule?","commit_id":"2ae8d14ede558e9f964119abdaf1b3bd319ccd55"}],"ceilometer/storage/base.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3036cadd37e5a96607f0cf9dc8fd19d945df554d","unresolved":false,"context_lines":[{"line_number":136,"context_line":"                      start_timestamp\u003dNone, start_timestamp_op\u003dNone,"},{"line_number":137,"context_line":"                      end_timestamp\u003dNone, end_timestamp_op\u003dNone,"},{"line_number":138,"context_line":"                      metaquery\u003d{}, resource\u003dNone, limit\u003dNone,"},{"line_number":139,"context_line":"                      marker_pair\u003dNone, sort_key\u003dNone, sort_dir\u003dNone):"},{"line_number":140,"context_line":"        \"\"\"Return an iterable of models.Resource instances containing"},{"line_number":141,"context_line":"        resource information."},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F4VI%3D","line":139,"updated":"2013-08-15 20:04:47.000000000","message":"These methods are growing a lot of arguments. I think I\u0027d like to have the pagination arguments passed as a single structure here, too. Please create a class, instead of using a dictionary. It will need to be a different type from the Pagination class in the API layer, since we don\u0027t want the storage code to depend on WSME.","commit_id":"7fbf745e19b2059bdc0f4ceca6d273af286f7cb3"}],"ceilometer/storage/impl_hbase.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"c633a8e93141631340046b945c7f8c507c23c22d","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        meter_table \u003d self.conn.table(self.METER_TABLE)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        if limit or marker_pairs:"},{"line_number":329,"context_line":"            raise NotImplementedError(\u0027pagination query not implemented\u0027)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        q, start_row, stop_row \u003d make_query(user\u003duser,"},{"line_number":332,"context_line":"                                            project\u003dproject,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2FF70%3D","line":329,"updated":"2013-08-07 11:06:12.000000000","message":"These changes to the HBase driver should be moved out to a separate patch (keeping this patch focused on API changes only).","commit_id":"ec25bef77332aa7d494509f6f2ec78441b60f8b8"}],"ceilometer/tests/api.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"3036cadd37e5a96607f0cf9dc8fd19d945df554d","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        if q:"},{"line_number":163,"context_line":"            all_params.update(query_params)"},{"line_number":164,"context_line":"        if marker:"},{"line_number":165,"context_line":"            marker_param \u003d {\u0027marker.field\u0027: marker[\u0027field\u0027],"},{"line_number":166,"context_line":"                            \u0027marker.value\u0027: marker[\u0027value\u0027]"},{"line_number":167,"context_line":"                            }"},{"line_number":168,"context_line":"            all_params.update(marker_param)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F4WU%3D","line":165,"updated":"2013-08-15 20:04:47.000000000","message":"marker_param is only used to update all_params, so why not modify all_params directly?","commit_id":"7fbf745e19b2059bdc0f4ceca6d273af286f7cb3"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"701a23a9332521b666e193dc730f99a561ef678a","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        for i in sortargs:"},{"line_number":214,"context_line":"            for name in [\u0027sort_key\u0027, \u0027sort_dir\u0027]:"},{"line_number":215,"context_line":"                sortargs_params[\u0027sortargs.%s\u0027 % name].append(i.get(name, \u0027\u0027))"},{"line_number":216,"context_line":"        if sortargs:"},{"line_number":217,"context_line":"            all_params.update(sortargs_params)"},{"line_number":218,"context_line":"        if pagination:"},{"line_number":219,"context_line":"            all_params.update(pagination)"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAASn%2F%2FcD8%3D","line":216,"updated":"2013-09-04 18:39:17.000000000","message":"Stuff like this always confuses me in tests ... how do we ensure this code is correct?","commit_id":"98042730d9287a1c9f103a53fcc752f644a76676"}],"tests/api/v2/alarm.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"2dbf8cd5cf5985e390a9ee6732f452a38a3911c9","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        self.assertEquals(2, len(alarms))"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"class TestAlarmWithPagination(TestAlarms):"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def test_alarms_limit(self):"},{"line_number":168,"context_line":"        data \u003d self.get_json(\u0027/alarms\u0027, limit\u003d2)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAQn%2F%2Fu%2FY%3D","line":165,"updated":"2013-07-24 07:49:25.000000000","message":"Inherit from TestAlarms would result in the TestAlarms.test_list_alarm()  to be run multiple times.\n\nWe should have a base class to the setUp() job and have both TestAlarmWithPagination and TestAlarms inherit from that base class.","commit_id":"5842d0c4515cac01f5a9516c6c574f3ad4182ffd"}],"tests/api/v2/list_meters.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"2dbf8cd5cf5985e390a9ee6732f452a38a3911c9","unresolved":false,"context_lines":[{"line_number":184,"context_line":"        self.assertEquals(data, [])"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"class TestMetersWithPagination(TestListMeters):"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def test_list_meters_limit(self):"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAQn%2F%2Fu%2FU%3D","line":187,"updated":"2013-07-24 07:49:25.000000000","message":"same issue as the alarm test.","commit_id":"5842d0c4515cac01f5a9516c6c574f3ad4182ffd"}],"tests/api/v2/list_resources.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"2dbf8cd5cf5985e390a9ee6732f452a38a3911c9","unresolved":false,"context_lines":[{"line_number":458,"context_line":"                        in links[1][\u0027href\u0027])"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"class TestResourceWithPagination(TestListResources):"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"    #Copy from ceilometer/tests/storage/base.py"},{"line_number":464,"context_line":"    def prepare_data(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAQn%2F%2Fu%2FI%3D","line":461,"updated":"2013-07-24 07:49:25.000000000","message":"same issue as the alarm test.","commit_id":"5842d0c4515cac01f5a9516c6c574f3ad4182ffd"}],"tests/api/v2/test_pagination.py":[{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"701a23a9332521b666e193dc730f99a561ef678a","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class TestPagination(tests_base.TestCase):"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def test_marker_get_value_as_type_integer(self):"},{"line_number":26,"context_line":"        pagination \u003d Pagination(marker\u003d\u0027100\u0027,"},{"line_number":27,"context_line":"                                type\u003d\u0027integer\u0027)"},{"line_number":28,"context_line":"        expected \u003d 100"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAASn%2F%2FcE0%3D","line":25,"updated":"2013-09-04 18:39:17.000000000","message":"these tests should be on the common _get_value_as_type() function and not require going through Pagination to get to it.","commit_id":"98042730d9287a1c9f103a53fcc752f644a76676"}]}
