open-iscsi / targetcli-fb

Command shell for managing Linux LIO kernel target
Apache License 2.0
103 stars 69 forks source link

remove display code from targetclid #169

Open iammattcoleman opened 4 years ago

iammattcoleman commented 4 years ago

Currently, the daemon is accepting raw command line parameters and returning formatted terminal output. As discussed in several pull requests, this results in several differences in targetcli's behavior when it's not using the daemon vs. when it is. The code's complexity is also increasing due to a lack of separation of concerns.

I propose changing targetclid to export its functionality via some form of IPC/RPC: when auto_use_daemon is set to True, targetcli would receive input, pass requests to targetclid (which would do the actual work and respond with structured data), and then format and display the response data.

This ticket should be used to discuss implementation details such as which form of IPC/RPC to use.

iammattcoleman commented 4 years ago

I think dbus makes the most sense, since it's already standard in most distributions and used by many core system services.