cancel
Showing results for 
Search instead for 
Did you mean: 

XMC - System Variables

XMC - System Variables

StephanH
Valued Contributor III
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:

"$STATUSThe 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




Regards Stephan
1 REPLY 1

StephanH
Valued Contributor III
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

Regards Stephan
GTM-P2G8KFN