Bundle's of karaf consol

Someone can tell me which bundles in the openhab-core project handles the commands openhab:user add , openhab:user list, …

I think I have already found these three bundle’s in the bundle folder of the openhab-core project:

But can you tell me if there are others or if I am wrong in any of these bundles.

Thanks in advance.

The .java file that contains

    private static final String SUBCMD_LIST = "list";
    private static final String SUBCMD_ADD = "add";
    private static final String SUBCMD_REMOVE = "remove";
    private static final String SUBCMD_CHANGEPASSWORD = "changePassword";
    private static final String SUBCMD_LISTAPITOKENS = "listApiTokens";
    private static final String SUBCMD_ADDAPITOKEN = "addApiToken";
    private static final String SUBCMD_RMAPITOKEN = "rmApiToken";
    private static final String SUBCMD_CLEARSESSIONS = "clearSessions";



so I would assume it is e.g.

1 Like

Ok thank you very much.

There are few things to note. Normal Apache Karaf (lower level tool) commands are implemented differently. Bundles which you have mentioned are related to OH implementation of commands. The org.openhab.core.io.consol.karaf is implementation of openHAB console API based on libraries supported within Karaf.

Historically OH/Eclipse Smart-House was working with various assemblies hence it was necessary to keep some unification.

Complete tutorial on how to write commands is here: Apache Karaf Container 4.x - Documentation. If you rely on Karaf command API then you loose portability but also gain possibility to provide suggestions (command completion).


1 Like