cli to legacy semp for session-idle-timeout
Hello Solace-Community,
new Solace user here
We are currently developing our own terraform solace provider and are now at a point where we want to be able to configure some broker settings through terraform.
For that we are using the semp v2 api whenever possible but have to fall back to the legacy semp from time to time. In this case we want to be able to configure the session-idle-timeout value for the semp service. We want to do that through the legacy semp.
When I type it into my cli I can use the following command:
pubsubplus-0(configure)# service semp session-idle-timeout 100
This works, no problem.
When I then try to use the cli-2-semp tool, to translate this command into a semp request I get the following error:
Unexpected parameter(s): 'session-idle-timeout 100' in command 'service semp session-idle-timeout 100'
When I try to use the command in a semp request
<rpc> <service> <semp> <session-idle-timeout>129</session-idle-timeout> </semp> </service> </rpc>
I get the following response
<rpc-reply semp-version="soltr/9_11VMR"> <parse-error>invalid message: schema validation error</parse-error> </rpc-reply>
So it seems like I am doing something wrong, but I do not know what. If someone could help me in this case, would be great
I am using Solace PubSub+ Broker in Version 9.11.0.10 running on a on-premise openshift server.
Best Answer
-
Hi @jfg1306 ,
I guess you're looking for this command, however I totally agree that this ist not obvious. Also,
cli2semp
does not recognize the original cli command.<rpc> <service> <semp> <session-idle-timeout> <value>123</value> </session-idle-timeout> </semp> </service> </rpc>
1
Answers
-
Hi @jfg1306,
TL;DR:
<rpc> <console> <timeout> <idle-timeout>129</idle-timeout> </timeout> </console> </rpc>
Long version:
1. Get the current SEMP v1 schema file from the broker by doing a GET on http:///SEMP/v1/requestSchema.xsd
2. Use an XML schema viewer to find the element of interest. I actually did a grep for "timeout", but I am very lazy and that actually cost me more time than doing it properly
3. Write your xml
4. Use xmllint or other xmlschema validator to validate what you've written against the schema
5. Run the command.1 -
Hi @jfg1306 ,
I guess you're looking for this command, however I totally agree that this ist not obvious. Also,
cli2semp
does not recognize the original cli command.<rpc> <service> <semp> <session-idle-timeout> <value>123</value> </session-idle-timeout> </semp> </service> </rpc>
1