XMC - System Variables

  • 0
  • 1
  • Question
  • Updated 4 months ago
  • Answered
Hello,

there are a lot of system variables in XMC for scripting. I test some of the variables with python on XMC together with an xos switch. All works fine.

But the variable $STATUS returns always 1 no matter the command works or not.

Here is the description from the manual:

"$STATUS

The execution status of the previously executed ExtremeXOS command: 0 if the command executed successfully, non-zero otherwise."

I tried the following in python:

cli_result = emc_cli.send("create vlan test")
check = emc_vars["STATUS"]
print check

The result for print check allways 1 no matter if I do the command one time or twice.

If I do the command only once the VLAN was created => I expected the value "0" for STATUS

If I do the command twice I received an error (because of the vlan is always there) => I expected the value != "0" for STATUS

My question is my expectation is wrong? Or what do I wrong?


Best regards

Stephan





Photo of SH

SH

  • 3,144 Points 3k badge 2x thumb

Posted 5 months ago

  • 0
  • 1
Photo of SH

SH

  • 3,144 Points 3k badge 2x thumb
Hello all,

according GTAC the $STATUS variable isn't supported with python.
The documentation will be revised in future.

Thank you to GTAC for clarification.

Best regards
Stephan