ā10-16-2018 05:36 PM
ā03-27-2020 10:03 AM
Hi all,
I like to bring some light in to the darkness. First you have to understand that XMC using Jython! This means that Python code get compiled to a Java class first and then becomes executed. This also mean that this Java call can use API call provided by the Java application serer you will never be found as a Python class.
Now to the lines you often see in our per default provided scrips and Workflows
from xmclib import emc_vars
The āemc_varsā are injected doesnāt matter if you have the line in place or not. Why this line exists have to do with the Integrated Developer Environment (IDE) your developer use to satisfy the IDE.
from xmclib import logger
This LOG facility is the XMC one you get access via server.log you will find under Administration ā Server ā Server Log. By default, are only the ERROR message level visible. Changing the LOG level should be only mad during a short time period if debugging needed. If you write a scrip and like to see your non-ERROR level message is not clever to change the LOG level. I strongly recommend NOT to use this way of logging! Python itself have a LOG facility called āloggingā which you can much better use for your needs.
from xmclib import cli
This method called ācliā is not the same than āemc_cliā you should use. Official supported are only āemc_cliā. In case you are using ācliā you cannot open any GTAC ticket!!!!
from device import api
Here is a direct access to the Java application server API. We will not expose any documentation about this internal API calls. Reverse engineering or guessing is not a good option to start using it!
Best regard
Markus
ā03-26-2020 07:12 AM
Hello,
After several discussions with colleagues from Extreme, it turns out that the modules I mentioned
are not intended for external parties (i.e. partners and customers).
There are many dependencies in the source code and many changes (for example during an update) that are not documented. Using the modules (for example through reverse engineering) can cause problems.
Extreme aims to do the work with the options in the GUI by using the scripts, workflows and emc_vars.
In my opinion it is unfortunate that these modules are used in some system workflows and scripts.
But that's the way it is. However, there will be no further documentation for these modules.
Best regards
Stephan
ā11-13-2019 08:13 PM
I had this same question about module documentation. Is there any update on this?
ā01-27-2020 01:04 PM
+1. Come on guys, canāt be that hard to provide documentation (which should already be available internally)...