)]}'
{"ironicclient/osc/plugin.py":[{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"e05e752adbc508edee8b2bb610dda1f7f9e6e3a5","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                    \"%(version)s. In the future, the default will be the \""},{"line_number":43,"context_line":"                    \"latest available API version. You may preserve current \""},{"line_number":44,"context_line":"                    \"behavior by passing the --os-baremetal-api-version \""},{"line_number":45,"context_line":"                    \"argument with the desired version. Please ignore this \""},{"line_number":46,"context_line":"                    \"message if you already specify that argument.\","},{"line_number":47,"context_line":"                    {\u0027version\u0027: http.DEFAULT_VER})"},{"line_number":48,"context_line":"    baremetal_client_class \u003d utils.get_client_class("}],"source_content_type":"text/x-python","patch_set":1,"id":"9a30ddce_b7dd9472","line":45,"updated":"2017-03-07 14:38:55.000000000","message":"I don\u0027t like the idea of logging a warning if the user has deliberately specified a version. Perhaps we could add a member instance._api_version_set, and check that?","commit_id":"44671e3e7f1f71e81cdc3547ac88533566c75597"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"117308be5ecab7abe219e3d2ad6111126acd7df6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                    \"%(version)s. In the future, the default will be the \""},{"line_number":43,"context_line":"                    \"latest available API version. You may preserve current \""},{"line_number":44,"context_line":"                    \"behavior by passing the --os-baremetal-api-version \""},{"line_number":45,"context_line":"                    \"argument with the desired version. Please ignore this \""},{"line_number":46,"context_line":"                    \"message if you already specify that argument.\","},{"line_number":47,"context_line":"                    {\u0027version\u0027: http.DEFAULT_VER})"},{"line_number":48,"context_line":"    baremetal_client_class \u003d utils.get_client_class("}],"source_content_type":"text/x-python","patch_set":1,"id":"9a30ddce_d2c77643","line":45,"in_reply_to":"9a30ddce_b7dd9472","updated":"2017-03-07 15:03:40.000000000","message":"Unfortunately, my testing showed that python-openstackclient automatically sets instance._api_version to the default before calling make_client.\n\nIt also enforces that this option be an integer, so we can\u0027t use a non-integer sentinel value: https://github.com/openstack/python-openstackclient/blob/bfad2abf23de1689a28d0377b0498db0feccdf3a/openstackclient/shell.py#L98\n\nAdditionally, if we used a sentinel value like \"0\" or \"-1\", the help text would display those as available API versions.\n\nI can try modifying python-openstackclient to allow a string sentinel value, but I\u0027m not sure how amenable the project would be to this since we\u0027re not an in-tree plugin.\n\nWhat do you think?","commit_id":"44671e3e7f1f71e81cdc3547ac88533566c75597"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"772f74200b4d3ba718093aa331e720002323be0f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        choices\u003dsorted("},{"line_number":78,"context_line":"            API_VERSIONS,"},{"line_number":79,"context_line":"            key\u003dlambda k: [int(x) for x in k.split(\u0027.\u0027)]) + [\u0027latest\u0027],"},{"line_number":80,"context_line":"        action\u003dReplaceLatestVersion,"},{"line_number":81,"context_line":"        help\u003d\u0027Baremetal API version, default\u003d\u0027 +"},{"line_number":82,"context_line":"             http.DEFAULT_VER +"},{"line_number":83,"context_line":"             \u0027 (Env: OS_BAREMETAL_API_VERSION). \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a30ddce_f2939af8","line":80,"updated":"2017-03-07 15:05:01.000000000","message":"@Miles - I also tried overriding this action, but the \"action\" __call__ method doesn\u0027t get invoked if the option isn\u0027t specified.\n\nThe __init__ method gets called, but that doesn\u0027t get passed the default argument.","commit_id":"44671e3e7f1f71e81cdc3547ac88533566c75597"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"b91dd91a6c2318fe7cc3c283916cb58ac9265a98","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        choices\u003dsorted("},{"line_number":78,"context_line":"            API_VERSIONS,"},{"line_number":79,"context_line":"            key\u003dlambda k: [int(x) for x in k.split(\u0027.\u0027)]) + [\u0027latest\u0027],"},{"line_number":80,"context_line":"        action\u003dReplaceLatestVersion,"},{"line_number":81,"context_line":"        help\u003d\u0027Baremetal API version, default\u003d\u0027 +"},{"line_number":82,"context_line":"             http.DEFAULT_VER +"},{"line_number":83,"context_line":"             \u0027 (Env: OS_BAREMETAL_API_VERSION). \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a30ddce_857775d3","line":80,"in_reply_to":"9a30ddce_f2939af8","updated":"2017-03-07 16:42:20.000000000","message":"[Reprise from IRC conversation]\n\nWhat I was thinking was that in addition to the _api_version member, the instance object could have a boolean _api_version_explicit member, which defaults to False but is set to True by the handler for --os-baremetal-api-version. So `openstack baremetal --os-baremetal-api-version\u003d1.7\" \u003d\u003e (True, 1.7), but `openstack baremetal` \u003d\u003e (False, 1.7), if 1.7 is the default API version. That would allow us to distinguish between \"user has explicitly specified the default version\" and \"user has not specified a version\". I don\u0027t know if that\u0027s actually possible, though.","commit_id":"44671e3e7f1f71e81cdc3547ac88533566c75597"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"3b12ddfeecf61bcc1ec080c6c2b1dcef64ccbe23","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def make_client(instance):"},{"line_number":39,"context_line":"    \"\"\"Returns a baremetal service client.\"\"\""},{"line_number":40,"context_line":"    global OS_BAREMETAL_API_VERSION_SPECIFIED"},{"line_number":41,"context_line":"    if not OS_BAREMETAL_API_VERSION_SPECIFIED:"},{"line_number":42,"context_line":"        LOG.warning(\"You are using the default API version of the OpenStack \""},{"line_number":43,"context_line":"                    \"CLI baremetal plugin. This is currently API version \""}],"source_content_type":"text/x-python","patch_set":3,"id":"bff0334d_dc057715","line":40,"updated":"2017-04-12 15:41:28.000000000","message":"this is redundant","commit_id":"800b4f8431e6e6096aa408ff9c6677415a0f2499"}]}
