)]}'
{"cloudkittyclient/v2/scope.py":[{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"f77323d40be1de35463fd7bc72b5426e9620ec1e","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        The all_scopes and the scope_id options are mutually exclusive and one"},{"line_number":57,"context_line":"        must be provided."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        :param state: ISO8601 datetime from which the state will be reset"},{"line_number":60,"context_line":"        :type state: iso8601 timestamp"},{"line_number":61,"context_line":"        :param all_scopes: Whether all scopes must be reset"},{"line_number":62,"context_line":"        :type all_scopes: bool"},{"line_number":63,"context_line":"        :param collector: Optional collector to filter on."}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_d8a6b6c1","line":60,"range":{"start_line":59,"start_character":8,"end_line":60,"end_character":38},"updated":"2019-07-19 07:53:00.000000000","message":"It\u0027d be great if the state could be a datetime.datetime object (more convenient if this function is called from a script).","commit_id":"8b77eb62fbc4460ca53ce8b53c17c3b877c02547"},{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"f77323d40be1de35463fd7bc72b5426e9620ec1e","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                if isinstance(kwargs[key], list):"},{"line_number":76,"context_line":"                    kwargs[key] \u003d \u0027,\u0027.join(kwargs[key])"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        authorized_args \u003d ["},{"line_number":79,"context_line":"            \u0027state\u0027, \u0027all_scopes\u0027, \u0027collector\u0027,"},{"line_number":80,"context_line":"            \u0027fetcher\u0027, \u0027scope_id\u0027, \u0027scope_key\u0027]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        url \u003d self.get_url(None, kwargs, authorized_args\u003dauthorized_args)"},{"line_number":83,"context_line":"        return self.api_client.put(url).json()"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_38a58aa2","line":82,"range":{"start_line":78,"start_character":0,"end_line":82,"end_character":73},"updated":"2019-07-19 07:53:00.000000000","message":"This will build an url with the  arguments specified in \"authorized_args\", but the arguments are supposed to be passed in the request body. You can skip the get_url step, and directly use self.url. But you\u0027ll have to build the request body manually. Example: https://github.com/openstack/python-cloudkittyclient/blob/c138f409b1f54bb2ea4528b4e61757ab19a989b9/cloudkittyclient/v1/rating/hashmap.py#L190","commit_id":"8b77eb62fbc4460ca53ce8b53c17c3b877c02547"},{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"905bbc02191effd2f51a5553610af1d4f5735f96","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            if key in kwargs.keys():"},{"line_number":87,"context_line":"                if isinstance(kwargs[key], list):"},{"line_number":88,"context_line":"                    kwargs[key] \u003d \u0027,\u0027.join(kwargs[key])"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        body \u003d dict("},{"line_number":91,"context_line":"            state\u003dkwargs.get(\u0027state\u0027),"},{"line_number":92,"context_line":"            scope_id\u003dkwargs.get(\u0027scope_id\u0027),"},{"line_number":93,"context_line":"            scope_key\u003dkwargs.get(\u0027scope_key\u0027),"},{"line_number":94,"context_line":"            collector\u003dkwargs.get(\u0027collector\u0027),"},{"line_number":95,"context_line":"            fetcher\u003dkwargs.get(\u0027fetcher\u0027),"},{"line_number":96,"context_line":"            all_scopes\u003dkwargs.get(\u0027all_scopes\u0027),"},{"line_number":97,"context_line":"        )"},{"line_number":98,"context_line":"        url \u003d self.get_url(None, kwargs)"},{"line_number":99,"context_line":"        return self.api_client.put(url, json\u003dbody).json()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_e4e984e2","line":97,"range":{"start_line":89,"start_character":0,"end_line":97,"end_character":9},"updated":"2019-07-19 15:10:12.000000000","message":"I had API validation issues when testing: : two or more values in the same group of exclusion \u0027scope_selector\u0027 .\n\nYou need to remove every key that doesn\u0027t contain anything from the body before making the request. The following quick-and-dirty implementation worked for me::\n\nempty_keys \u003d []\nfor k, v in body.items():\n    if not v:\n        empty_keys.append(k)\n\nfor k in empty_keys:\n    body.pop(k)","commit_id":"b45cacf2e244a93480ed952b72f9a54fddd052ab"},{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"905bbc02191effd2f51a5553610af1d4f5735f96","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            all_scopes\u003dkwargs.get(\u0027all_scopes\u0027),"},{"line_number":97,"context_line":"        )"},{"line_number":98,"context_line":"        url \u003d self.get_url(None, kwargs)"},{"line_number":99,"context_line":"        return self.api_client.put(url, json\u003dbody).json()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_c419e821","line":99,"range":{"start_line":99,"start_character":50,"end_line":99,"end_character":57},"updated":"2019-07-19 15:10:12.000000000","message":"As there is no response, this is not required","commit_id":"b45cacf2e244a93480ed952b72f9a54fddd052ab"},{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"b7a429441c7c26bb3d3be970876bb84ae9504a55","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            all_scopes\u003dkwargs.get(\u0027all_scopes\u0027),"},{"line_number":97,"context_line":"        )"},{"line_number":98,"context_line":"        # Stripping None values"},{"line_number":99,"context_line":"        body \u003d dict(filter(lambda elem: elem[1] is not None, body.items()))"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        url \u003d self.get_url(None, kwargs)"},{"line_number":102,"context_line":"        return self.api_client.put(url, json\u003dbody)"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_7fd44148","line":99,"range":{"start_line":99,"start_character":40,"end_line":99,"end_character":60},"updated":"2019-07-22 07:40:27.000000000","message":"please replace this by bool(elem[1]). False is not None, so when a scope_id is specified and all_states is not, both are put into the request body.","commit_id":"83b9c8e9f90bc7b6396735c0440d4f64d88ed7c2"}],"cloudkittyclient/v2/scope_cli.py":[{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"f77323d40be1de35463fd7bc72b5426e9620ec1e","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class CliScopeStateReset(command.Command):"},{"line_number":60,"context_line":"    \"\"\"Reset the state of several scopes.\"\"\""},{"line_number":61,"context_line":"    info_columns \u003d ["},{"line_number":62,"context_line":"        (\u0027scope_id\u0027, \u0027Scope ID\u0027),"},{"line_number":63,"context_line":"        (\u0027scope_key\u0027, \u0027Scope Key\u0027),"},{"line_number":64,"context_line":"        (\u0027collector\u0027, \u0027Collector\u0027),"},{"line_number":65,"context_line":"        (\u0027fetcher\u0027, \u0027Fetcher\u0027),"},{"line_number":66,"context_line":"        (\u0027state\u0027, \u0027State\u0027),"},{"line_number":67,"context_line":"        (\u0027all_scopes\u0027, \u0027All Scopes\u0027),"},{"line_number":68,"context_line":"    ]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def get_parser(self, prog_name):"},{"line_number":71,"context_line":"        parser \u003d super(CliScopeStateReset, self).get_parser(prog_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_d8c1d655","line":68,"range":{"start_line":61,"start_character":0,"end_line":68,"end_character":5},"updated":"2019-07-19 07:53:00.000000000","message":"These are used for output formatting in CliScopeStateGet, they aren\u0027t needed here","commit_id":"8b77eb62fbc4460ca53ce8b53c17c3b877c02547"},{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"f77323d40be1de35463fd7bc72b5426e9620ec1e","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def get_parser(self, prog_name):"},{"line_number":71,"context_line":"        parser \u003d super(CliScopeStateReset, self).get_parser(prog_name)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        for col in self.info_columns[:-1]:"},{"line_number":74,"context_line":"            parser.add_argument("},{"line_number":75,"context_line":"                \u0027--\u0027 + col[0].replace(\u0027_\u0027, \u0027-\u0027), type\u003dstr,"},{"line_number":76,"context_line":"                action\u003d\u0027append\u0027, help\u003d\u0027Optional filter on \u0027 + col[1])"},{"line_number":77,"context_line":"        return parser"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def take_action(self, parsed_args):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_58cde682","line":76,"range":{"start_line":73,"start_character":2,"end_line":76,"end_character":69},"updated":"2019-07-19 07:53:00.000000000","message":"This does not work as intended: The last flag \"all_scopes\" will be ignored, every argument will have an \"append\" action (ie the argument can be specified several times and behaves as a list)","commit_id":"8b77eb62fbc4460ca53ce8b53c17c3b877c02547"},{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"905bbc02191effd2f51a5553610af1d4f5735f96","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        parser.add_argument("},{"line_number":78,"context_line":"            \u0027-a\u0027, \u0027--all-scopes\u0027,"},{"line_number":79,"context_line":"            type\u003dbool, action\u003d\u0027store_true\u0027,"},{"line_number":80,"context_line":"            help\u003d\"Target all scopes at once\")"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        parser.add_argument("}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_24cd5c84","line":79,"range":{"start_line":79,"start_character":12,"end_line":79,"end_character":21},"updated":"2019-07-19 15:10:12.000000000","message":"type must not be specified with store_true: \"__init__() got an unexpected keyword argument \u0027type\u0027\"","commit_id":"b45cacf2e244a93480ed952b72f9a54fddd052ab"},{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"905bbc02191effd2f51a5553610af1d4f5735f96","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            help\u003d\"Target all scopes at once\")"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        parser.add_argument("},{"line_number":83,"context_line":"            \u0027-s\u0027, \u0027--state\u0027,"},{"line_number":84,"context_line":"            type\u003dtimeutils.parse_isotime,"},{"line_number":85,"context_line":"            help\u003d\"State iso8601 datetime from which the scope reset happens. \""},{"line_number":86,"context_line":"            \"Example: 2019-06-01T00:00:00Z.\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_84a3f0b1","line":83,"range":{"start_line":83,"start_character":12,"end_line":83,"end_character":28},"updated":"2019-07-19 15:10:12.000000000","message":"Could you please make this a positional argument ? (simply pass \u0027state\u0027)","commit_id":"b45cacf2e244a93480ed952b72f9a54fddd052ab"},{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"b7a429441c7c26bb3d3be970876bb84ae9504a55","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        parser.add_argument("},{"line_number":83,"context_line":"            \u0027state\u0027,"},{"line_number":84,"context_line":"            type\u003dtimeutils.parse_isotime,"},{"line_number":85,"context_line":"            help\u003d\"State iso8601 datetime from which the scope reset happens. \""},{"line_number":86,"context_line":"            \"Example: 2019-06-01T00:00:00Z.\")"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        return parser"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_951a2e6d","line":85,"range":{"start_line":85,"start_character":40,"end_line":85,"end_character":77},"updated":"2019-07-22 07:40:27.000000000","message":"\"To which the state should be set\" ?","commit_id":"83b9c8e9f90bc7b6396735c0440d4f64d88ed7c2"}],"setup.cfg":[{"author":{"_account_id":23060,"name":"Luka Peschke","email":"mail@lukapeschke.com","username":"lukapeschke"},"change_message_id":"f77323d40be1de35463fd7bc72b5426e9620ec1e","unresolved":false,"context_lines":[{"line_number":202,"context_line":"cloudkittyclient.v2 \u003d"},{"line_number":203,"context_line":"    scope_state_get \u003d cloudkittyclient.v2.scope_cli:CliScopeStateGet"},{"line_number":204,"context_line":"    scope_state_reset \u003d cloudkittyclient.v2.scope_cli:CliScopeStateReset"},{"line_number":205,"context_line":"    "},{"line_number":206,"context_line":"    summary_get \u003d cloudkittyclient.v2.summary_cli:CliSummaryGet"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    report_tenant_list \u003d cloudkittyclient.v1.report_cli:CliTenantList"}],"source_content_type":"text/x-ttcn-cfg","patch_set":3,"id":"7faddb67_58a08690","line":205,"range":{"start_line":205,"start_character":0,"end_line":205,"end_character":4},"updated":"2019-07-19 07:53:00.000000000","message":"whitespace","commit_id":"8b77eb62fbc4460ca53ce8b53c17c3b877c02547"}]}
