Prompt handling during mass push on ExOS

Unimus support forum
Post Reply
j.koopmann
Posts: 5
Joined: Sat Jul 08, 2023 10:09 am

Mon Nov 11, 2024 11:51 am

Hi,

I have successfully automated a Netbox -> Unimus -> Switch deployment mechanism. There is only one thing left. In one particular case it is possible that during executing the configure commands on the Extreme Network Switch it will raise a warning and ask you to say "Y" in order to continue.

Naturally the default prompt handling is not handling this and the push results in an INTERACTION_ERROR. Is there a way to teach unimus that whenever it encounters something like [Y/n] to send a Y and then continue as usual?


Regards
JP
User avatar
Tomas
Posts: 1308
Joined: Sat Jun 25, 2016 12:33 pm

Mon Nov 11, 2024 9:03 pm

j.koopmann wrote:
Mon Nov 11, 2024 11:51 am
...
Naturally the default prompt handling is not handling this and the push results in an INTERACTION_ERROR. Is there a way to teach unimus that whenever it encounters something like [Y/n] to send a Y and then continue as usual?
...
Hi. We have multiple handlers for various [y/n] prompt formats, but it seems that the Extreme prompt is different enough for it to not be recognized by any of our handlers.

Could you please enable Device Output Logging (in Zones > your_zone > Debug mode), rerun the push, and post (or send me) the output from the Device Output log file? Based on this we can add a native handler in Unimus for this situation.

As an alternative in the meantime, you can use something like this:

Code: Select all

command 1
command 2$(wait-reply no)
$(delay 2000)y
command 3
Full documentation on what these macros do here: https://wiki.unimus.net/display/UNPUB/Mass+Config+Push
j.koopmann
Posts: 5
Joined: Sat Jul 08, 2023 10:09 am

Thu Nov 14, 2024 11:29 am

Hi,

Code: Select all

configure vlan 4092 delete ports 1:33

* Slot-1 TEST # configure vlan 4093 delete ports 1:33

* Slot-1 TEST # # Add VLANs as per current configuration

* Slot-1 TEST # configure vlan 88 add ports 1:33 untagged

Adding an existing tagged member port of vlan VoIP as untagged can cause STP configuration loss.
Do you really want to add these ports? (y/N) NoNoNo

Error: The VLANs specified could not be configured.
* Slot-1 TEST # 
This question only comes in certain moments and it is "unpredictable". What I need is basically:

- send the command
- if after the command the question "Do you really want to add these ports? (y/N)" appears, send Y
- go to the next command.

It will only come after certain configure vlan ... untagged commands in special conditions. 99% of the time it will not appear. Is this possible with the macros?
j.koopmann
Posts: 5
Joined: Sat Jul 08, 2023 10:09 am

Thu Nov 14, 2024 11:42 am

Since it is answering "No" I can only assume that the prompt IS recognized and since it being (y/N) instead of being (Y/n) unimus tries to anticipate the default and is sending No.

In that case maybe a modifier/macro would be interesting to overwrite this behavior on a per command level. Something along

$(if-reply y/n)y

Meaning "if the reply is y/n then send y". Or

$(answer-default Y)

Meaning "if there is a y/n prompt do not try to interpret it but send whatever is after answer-default"

Just thinking out loud.
j.koopmann
Posts: 5
Joined: Sat Jul 08, 2023 10:09 am

Mon Nov 18, 2024 9:11 am

@Tomas: Any insights on this? Anything I can do to make this work? If your suggestions should already make it happen I am simply too blind to see it and would appreciate a bit of help. :-)
Post Reply