Project

General

Profile

Add domain to a running XMPP server with adhoc

Keren Meir
Added over 5 years ago

Hi,

I read the information in the link

http://www.tigase.org/content/specification-ad-hoc-commands-used-manage-virtual-domains

I want to add new domain (while the server is running) through web browser instead of an xmpp client.

I'm using HTTP API and groovy script "adhoc".

Where do I need to enter those three action: VHOSTS_RELOAD, VHOSTS_UPDATE, VHOSTS_REMOVE and the domain itself??

thanks.


Replies (4)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 5 years ago

You need to enter only 1 of those 3 actions as you can do only one of those actions during 1 execution of adhoc script. If you send HTTP POST request to adhoc script and pass content containing only specified node of command (VHOST_RELOAD/VHOST_UPDATE/VHOST_REMOVE) which you want to execute you will receive response from server containing form which NEEDS TO BE FILLED (it will contain required fieds, default values and their types) if any field is required.

Example content to request form for adhoc command:

<command>
    <node>VHOST_RELOAD</node>
</command>

Added by Keren Meir over 5 years ago

I know that I can execute only 1 of those 3 during 1 execution, but I didn't know how...

I tried what you've suggest, I get 404 error

@

Error 404

HTTP ERROR: 404

Problem accessing /rest/adhoc/sess-man@qa-dc.local. Reason:

<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html> @

Is there another way to do that?

BTW - I got the list of command that the adhoc support, VHOSTS_RELOAD and the other 2 are not included in the list....

Thanks

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 5 years ago

Why are you trying to execute command for node VHOST_RELOAD by sending request to sess-man@qa-dc.local? It is mentioned at http://www.tigase.org/content/specification-ad-hoc-commands-used-manage-virtual-domains

The full JID consists of the component name: 'vhost-man' and the local domain, that is domain which is already on the list of virtual domains and is active.

that you should execute this command by sending request to vhost-man@qa-dc.local.

There is no command VHOST_RELOAD for sess-man component and because of that you got HTTP 404 error code.

Added by Keren Meir over 5 years ago

I get list of available scripts of vhost-man@qa-dc.local. VHOST_RELOAD and the other 2 are not in the list.

I tried

@

comp-repo-item-add

Add new item

@ and it works!!

Thank you very much for. it was very helpful for me

The available command are:

@

comp-repo-item-addAdd new item

del-scriptRemove command script

comp-repo-item-removeRemove an item

comp-repo-item-updateUpdate item configuration

add-scriptNew command script

ssl-certificate-addAdd SSL Certificate

comp-repo-reloadReload component repository

query-dnsDNS Query@

    (1-4/4)