XMC - System Variables
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎02-28-2018 08:02 PM
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎03-13-2018 08:14 PM
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
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