)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"697c01cd86db44e8944ef7a768b74eb332e3bc2b","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_db52856a","line":14,"updated":"2020-02-10 10:55:37.000000000","message":"What about keeping \u0027power on\u0027 and \u0027power off\u0027 by making them separate commands? A bit more code to write but more convenient to use.","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"25b58b86748880ea0ffac4c39d9422a2d5c0b54f","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_3cfaac10","line":14,"in_reply_to":"3fa7e38b_23cdaf2e","updated":"2020-02-10 14:54:47.000000000","message":"The problem is (was?) that \u0027system power show\u0027 can be interpreted as a command on its own or as \u0027system power\u0027 with argument \u0027show\u0027. Maybe cliff can now handle it?","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"5a68f26897ce33573094af0cac46fa01dab82df1","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_5c9be8c6","line":14,"in_reply_to":"3fa7e38b_3cfaac10","updated":"2020-02-10 14:57:51.000000000","message":"I think cliff matches solely entry points. Not sure it ever considers the trailing pieces that are to be handled by the class-specific parser...\n\nAnyway, this seems to work for me.","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"3b2bdd01fbef4c7f53913578af861fc6522620e5","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_23cdaf2e","line":14,"in_reply_to":"3fa7e38b_43b78bf9","updated":"2020-02-10 13:20:50.000000000","message":"That seems to work, and I do not see why not. There seems to be no ambiguity, no?","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"36ee1890dbb8d1dfbd0e6093a313c286509273a3","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_639ba7c7","line":14,"in_reply_to":"3fa7e38b_50b98f79","updated":"2020-02-10 12:57:50.000000000","message":"You mean, having on/off as an argument? Then you\u0027ll get ambiguity between \u0027system power [on/off]\u0027 and \u0027system power show\u0027, cliff won\u0027t allow it.","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a3cbf47a506d87cae4705ee934a632afebc19bc1","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_5bfe9507","line":14,"in_reply_to":"3fa7e38b_5bdbf5e9","updated":"2020-02-10 11:09:59.000000000","message":"Who \"we\"? :) sushy-cli doesn\u0027t have anything yet, ironic does have \u0027openstack baremetal node power on/power off/reboot\u0027.","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"c1ca75110315f15d74160ac726d8c95324fac383","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_ad851055","line":14,"in_reply_to":"3fa7e38b_5bfe9507","updated":"2020-02-10 11:30:27.000000000","message":"Here [1] is the tip of the patch chain where we have more commands implemented.  I am trying to say that there we have only set and show.\n\nSo what\u0027s the syntax you propose?\n\nsushycli system power show -\u003e on/off\nsushycli system power on  -\u003e exit(0|1)\nsushycli system power off  -\u003e exit(0|1)\n\nThere seems to be a practical problem if we omit \u0027show\u0027 because `power show` should map to cliff Lister class, while `power set` should map to the Command class. They differ in behavior to reflect list/action operations.\n\nIf we omit both `show`/`set` tokens in entry_points, then we could not map these commands to different cliff classes. But perhaps we can get away with either  `show` or `set`.\n\nOr am I just missing some smart cliff hack?\n\n1. https://review.opendev.org/#/c/706461/2/setup.cfg","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"8b9701db90b519e17f5f5a81877369483f52a81c","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_a3f67fd4","line":14,"in_reply_to":"3fa7e38b_639ba7c7","updated":"2020-02-10 13:03:40.000000000","message":"Hmm, can\u0027t we have it this way?\n\n    sushycli \u003d\n        system_power_show \u003d sushycli.system_power:SystemPowerShow\n        system_power \u003d sushycli.system_power:SystemPowerSet","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"76d9fd2974f7ca05f98aa4c73871e53dc4184703","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_50b98f79","line":14,"in_reply_to":"3fa7e38b_6dd39838","updated":"2020-02-10 12:49:53.000000000","message":"\u003e we create a lot of commands, with each implementation differing only in a top-level constant.\n\nIs class constants anyhow better than interpreting the last on/off token of argv in a single class?","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"139048eb119e2ee4f4129d89e93cf10119168441","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_43b78bf9","line":14,"in_reply_to":"3fa7e38b_a3f67fd4","updated":"2020-02-10 13:06:14.000000000","message":"I don\u0027t think you can (feel free to try)","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dc8a5dadfda0e377526e2c0a3d7e52aab5c22521","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_6dd39838","line":14,"in_reply_to":"3fa7e38b_ad851055","updated":"2020-02-10 11:33:31.000000000","message":"Check out the hack we\u0027re using in ironicclient to handle the numerous provisioning commands: https://opendev.org/openstack/python-ironicclient/src/branch/master/ironicclient/osc/v1/baremetal_node.py#L47-L156. Essentially, we create a lot of commands, with each implementation differing only in a top-level constant. You can do the same to define power on/off. I agree about keeping show though.","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"12fe20d791666c16a6b298bc0fa26d3e568fe852","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"  sushycli system power show"},{"line_number":13,"context_line":"  sushycli system power set on"},{"line_number":14,"context_line":"  sushycli system power set off"},{"line_number":15,"context_line":"  sushycli version show"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ib7dd7dae908a8fddcd89ea754bb4f5b346f45519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3fa7e38b_5bdbf5e9","line":14,"in_reply_to":"3fa7e38b_db52856a","updated":"2020-02-10 10:58:17.000000000","message":"My only concern here would be that the syntax becomes less consistent... So far we have just `set` and `show` verbs.","commit_id":"f155c1b1a1c23dd23c17c1784ba7a4b94258d5b5"}]}
