Hammer import-templates

I’m trying to use hammer-cli with templates plugin. It seems that installation went properly. I did everything exactly as it is in the repo https://github.com/theforeman/hammer-cli-foreman-templates

Unfortunately, I can’t use --help option. I’m getting this info:
“Unfortunately the server does not support such operation.”

What do you suggest to do? I didn’t find answer for that in the Internet.

Hi,
it seems like Foreman server does not recognize the action you wish to perform, there could be a number of causes. I’d first check if foreman_templates plugin is installed. The easiest way to do that is to take a look at Administer -> About page, plugins tab. If the plugin is installed, regenerating apipie cache might help.

I’d recommend using the installer to enable this plugin in the future. Installer is the most tested way and reduces the number of manual steps needed to get the plugin working.

I see that plugin is installed. I’ve checked it in Administer -> About -> Plugins. I see version 6.0.3 of foreman_templates plugin.
Unfortunately, still I can’t use hammer import-templates function. I see this option in hammer --help but when I try hammer import-templates I’m getting Unfortunately the server does not support such operation.

Have you tried regenerating apipie cache with foreman-rake apipie:cache ?

Yes, I’ve tried this command foreman-rake apipie:cache and it finished successfully. Unfortunately, it didn’t help. That’s a little bit weird. Other hammer commands work well.

Sorry for being so late with answer. Which versions of Foreman/Hammer Templates plugins do you use?

I’m quite sure that this is versions incompatibility problem. Please, see in https://github.com/theforeman/hammer-cli-foreman-templates which versions are compatible with each other. I think you just need to update hammer-cli-foreman-templates to 0.2.0.

Please, feel free to replay whether it helped or not.