)]}'
{"osc_placement/resources/aggregate.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d2c6ac5e2447ba277ccfe7b0d1cb8f9bc4a9ed99","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if self.compare_version(version.lt(\u00271.19\u0027)):"},{"line_number":72,"context_line":"            resp \u003d http.request(\u0027PUT\u0027, url, json\u003daggregate).json()"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            generation \u003d parsed_args.generation"},{"line_number":75,"context_line":"            data \u003d {\u0027aggregates\u0027: aggregate,"},{"line_number":76,"context_line":"                    \u0027resource_provider_generation\u0027: generation}"},{"line_number":77,"context_line":"            resp \u003d http.request(\u0027PUT\u0027, url, json\u003ddata).json()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_1cb74189","line":74,"updated":"2019-03-05 21:57:03.000000000","message":"Hmm, generation is still optional, so let\u0027s say I pin my OS_PLACEMENT_API_VERSION environment variable to 1.23 for example and run with this but don\u0027t specify a generation, it\u0027s going to blow up won\u0027t it?","commit_id":"6949df334338da2f2d61590fe0ff931c17a41b52"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4b6f0dc565482612b7cda27593661ece03510e1e","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if self.compare_version(version.lt(\u00271.19\u0027)):"},{"line_number":72,"context_line":"            resp \u003d http.request(\u0027PUT\u0027, url, json\u003daggregate).json()"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            generation \u003d parsed_args.generation"},{"line_number":75,"context_line":"            data \u003d {\u0027aggregates\u0027: aggregate,"},{"line_number":76,"context_line":"                    \u0027resource_provider_generation\u0027: generation}"},{"line_number":77,"context_line":"            resp \u003d http.request(\u0027PUT\u0027, url, json\u003ddata).json()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_fc7275e3","line":74,"in_reply_to":"5fc1f717_1cb74189","updated":"2019-03-05 21:58:29.000000000","message":"I think we have some other options where we check if they are specified and check the version and if those don\u0027t align we blow up, maybe like filtering providers by traits or something. But otherwise if the option isn\u0027t specified we don\u0027t care (and don\u0027t put it on the request).","commit_id":"6949df334338da2f2d61590fe0ff931c17a41b52"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2d3cdffc19724e70b3677107b2f5e874e6dfe982","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if self.compare_version(version.lt(\u00271.19\u0027)):"},{"line_number":72,"context_line":"            resp \u003d http.request(\u0027PUT\u0027, url, json\u003daggregate).json()"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            generation \u003d parsed_args.generation"},{"line_number":75,"context_line":"            data \u003d {\u0027aggregates\u0027: aggregate,"},{"line_number":76,"context_line":"                    \u0027resource_provider_generation\u0027: generation}"},{"line_number":77,"context_line":"            resp \u003d http.request(\u0027PUT\u0027, url, json\u003ddata).json()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_fc2035b3","line":74,"in_reply_to":"5fc1f717_1cb74189","updated":"2019-03-05 21:59:44.000000000","message":"Yeah, I wasn\u0027t clear what the pattern was on how that\u0027s enforced. In at least some cases \"blow up\" seems to be the designed outcome.\n\nCan you point me at an example where it is more gracious? Still finding my way.","commit_id":"6949df334338da2f2d61590fe0ff931c17a41b52"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f29577fe9b9b48475022bcdc24e9e7cf86fc565","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        else:"},{"line_number":85,"context_line":"            raise exceptions.CommandError("},{"line_number":86,"context_line":"                \u0027A generation must be specified.\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        return FIELDS, [[r] for r in resp[\u0027aggregates\u0027]]"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_57aedfe7","line":87,"updated":"2019-04-12 15:19:10.000000000","message":"Yeah I think the above all works as expected (the check_version and compare_version output is less than helpful but that\u0027s a separate bug 1804489):\n\nstack@train:~/osc-placement$ openstack resource provider list\n+--------------------------------------+-------+------------+\n| uuid                                 | name  | generation |\n+--------------------------------------+-------+------------+\n| 9a153de3-8e14-4d85-acba-6ea669fb9057 | train |          2 |\n+--------------------------------------+-------+------------+\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.19 resource provider aggregate set --aggregate e14b3511-c92f-4b60-9109-a23c0caf8f1c 9a153de3-8e14-4d85-acba-6ea669fb9057\nA generation must be specified.\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.19 resource provider aggregate set --aggregate e14b3511-c92f-4b60-9109-a23c0caf8f1d --generation 1 9a153de3-8e14-4d85-acba-6ea669fb9057\nResource provider\u0027s generation already changed. Please update the generation and try again. (HTTP 409)\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.19 resource provider aggregate set --aggregate e14b3511-c92f-4b60-9109-a23c0caf8f1d --generation 2 9a153de3-8e14-4d85-acba-6ea669fb9057\n+--------------------------------------+\n| uuid                                 |\n+--------------------------------------+\n| e14b3511-c92f-4b60-9109-a23c0caf8f1d |\n+--------------------------------------+\nstack@train:~/osc-placement$ openstack resource provider list\n+--------------------------------------+-------+------------+\n| uuid                                 | name  | generation |\n+--------------------------------------+-------+------------+\n| 9a153de3-8e14-4d85-acba-6ea669fb9057 | train |          3 |\n+--------------------------------------+-------+------------+\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.1 resource provider aggregate set --aggregate e14b3511-c92f-4b60-9109-a23c0caf8f1e --generation 3 9a153de3-8e14-4d85-acba-6ea669fb9057\nOperation or argument is not supported with version 1.1\nstack@train:~/osc-placement$","commit_id":"206978486f874c6e0d7c49b24fb2392dd5a9d657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9f29577fe9b9b48475022bcdc24e9e7cf86fc565","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class ListAggregate(command.Lister):"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    \"\"\"List resource provider aggregates."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    This command requires at least --os-placement-api-version 1.1."},{"line_number":96,"context_line":"    \"\"\""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def get_parser(self, prog_name):"},{"line_number":99,"context_line":"        parser \u003d super(ListAggregate, self).get_parser(prog_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_65048818","line":96,"range":{"start_line":93,"start_character":4,"end_line":96,"end_character":7},"updated":"2019-04-12 15:19:10.000000000","message":"We might want to mention that you can specify --os-placement-api-version 1.19 to get the provider generation since it\u0027s not in the help otherwise:\n\nstack@train:~/osc-placement$ openstack resource provider aggregate list --help\nusage: openstack resource provider aggregate list [-h]\n                                                  [-f {csv,json,table,value,yaml}]\n                                                  [-c COLUMN]\n                                                  [--max-width \u003cinteger\u003e]\n                                                  [--fit-width]\n                                                  [--print-empty] [--noindent]\n                                                  [--quote {all,minimal,none,nonnumeric}]\n                                                  [--sort-column SORT_COLUMN]\n                                                  \u003cuuid\u003e\n\nList resource provider aggregates. This command requires at least --os-\nplacement-api-version 1.1.\n\npositional arguments:\n  \u003cuuid\u003e                UUID of the resource provider\n\noptional arguments:\n  -h, --help            show this help message and exit\n\n\n--\n\nSo as a user I\u0027d have to know to use 1.19 to get that information when listing provider aggregates - oh but I guess in this command you\u0027re not dumping the provider generation even though it\u0027s in the response with \u003e\u003d1.19:\n\nstack@train:~/osc-placement$ openstack resource provider list\n+--------------------------------------+-------+------------+\n| uuid                                 | name  | generation |\n+--------------------------------------+-------+------------+\n| 9a153de3-8e14-4d85-acba-6ea669fb9057 | train |          2 |\n+--------------------------------------+-------+------------+\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.1 resource provider aggregate list 9a153de3-8e14-4d85-acba-6ea669fb9057\n\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.19 resource provider aggregate list 9a153de3-8e14-4d85-acba-6ea669fb9057\n\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.1 resource provider aggregate set --aggregate e14b3511-c92f-4b60-9109-a23c0caf8f1c 9a153de3-8e14-4d85-acba-6ea669fb9057\n+--------------------------------------+\n| uuid                                 |\n+--------------------------------------+\n| e14b3511-c92f-4b60-9109-a23c0caf8f1c |\n+--------------------------------------+\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.1 resource provider aggregate list 9a153de3-8e14-4d85-acba-6ea669fb9057\n+--------------------------------------+\n| uuid                                 |\n+--------------------------------------+\n| e14b3511-c92f-4b60-9109-a23c0caf8f1c |\n+--------------------------------------+\nstack@train:~/osc-placement$ openstack --os-placement-api-version 1.19 resource provider aggregate list 9a153de3-8e14-4d85-acba-6ea669fb9057\n+--------------------------------------+\n| uuid                                 |\n+--------------------------------------+\n| e14b3511-c92f-4b60-9109-a23c0caf8f1c |\n+--------------------------------------+\nstack@train:~/osc-placement$ \n\n\nIs there a reason to not dump the generation when listing aggregates if using \u003e\u003d1.19 since you\u0027ll need it to update them in the set command if using 1.19?","commit_id":"206978486f874c6e0d7c49b24fb2392dd5a9d657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6c82fcc700f935f5e554fc1aa09d4132cb15d8d7","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class ListAggregate(command.Lister):"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    \"\"\"List resource provider aggregates."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    This command requires at least --os-placement-api-version 1.1."},{"line_number":96,"context_line":"    \"\"\""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def get_parser(self, prog_name):"},{"line_number":99,"context_line":"        parser \u003d super(ListAggregate, self).get_parser(prog_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_97f20706","line":96,"range":{"start_line":93,"start_character":4,"end_line":96,"end_character":7},"in_reply_to":"3fce034c_65048818","updated":"2019-04-12 15:20:02.000000000","message":"\u003e Is there a reason to not dump the generation when listing aggregates if using \u003e\u003d1.19 since you\u0027ll need it to update them in the set command if using 1.19?\n\nThe easy response is, \u0027because you can get it from simply running \"openstack resource provider list\" without any microversions\u0027 - so maybe that\u0027s good enough.","commit_id":"206978486f874c6e0d7c49b24fb2392dd5a9d657"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4fd926570e78d860f69849ff55cb0c011c613e2a","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class ListAggregate(command.Lister):"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    \"\"\"List resource provider aggregates."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    This command requires at least --os-placement-api-version 1.1."},{"line_number":96,"context_line":"    \"\"\""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def get_parser(self, prog_name):"},{"line_number":99,"context_line":"        parser \u003d super(ListAggregate, self).get_parser(prog_name)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fce034c_3751d3d9","line":96,"range":{"start_line":93,"start_character":4,"end_line":96,"end_character":7},"in_reply_to":"3fce034c_97f20706","updated":"2019-04-12 15:25:31.000000000","message":"Discussed this with Chris in IRC and we\u0027re opting to just say go with what we have - you can get the provider generation when listing resource providers as noted, and if someone really wants to add the 1.19 support to this command to dump the generation when listing provider aggregates, they can add that separately.","commit_id":"206978486f874c6e0d7c49b24fb2392dd5a9d657"}]}
