cancel
Showing results for 
Search instead for 
Did you mean: 

XMC python module for excel

XMC python module for excel

Jose_Chaves
New Contributor II

Hi,

 

I’m trying to make a table of the arp table of a VSP and put it to a excel file.

Does the XMC have a python module for that? I normally use openpyxl for that.

 

Regards,

Jose Chaves

10 REPLIES 10

marleyagostinel
New Contributor

It seems to me that it would be easiest for you to use one platform on which you will edit and create tables. Also, you may need to use additional formula calculation functions for your work, etc. For my work, for example, I often need to calculate indices, so I am always looking for a handy index match formula program. To provide all of these requirements, many people use Excel. Suppose your work is also related to the analysis of statistics. In that case, it may be useful to know the match formula, which can also be calculated online.

Jose_Chaves
New Contributor II

Hi,

I have created a script to send the command that I want and them, process the output and save a csv file file in the XMC file system.

Now I creating  a workflow to process all the files and send me the resolt by mail.

Regards,

Jose Chaves

Dan15
Contributor

You have to create the ARP table flexview by hand with the legacy Java tool as mentioned by Stephan. The problem is you need to set the “SNMP context” to the right vrf where the IPs belong. By default you poll vrf0 (Global routing). You can do that in the Java MIB tool for queries, but not when you create a flexview. At least I do not know how.

Here is my flexview for the ARP table. If you copy the content to a tpl file and place it in /usr/local/Extreme_Networks/NetSight/appdata/System/FlexViews/My FlexViews, it should work:

 

<?xml version="1.0" encoding="UTF-8"?>
<flextablelist version="8.5.1.60">
    <flextable autoExportCsvTextDelineation="DQUOTE" autoExportFrequencyUnit="Minutes" autoExportFormat="HTML" showHorizontalLines="true" autoExportFilename="" autoExportFileManagement="Replace" highlightBackground="153,255,255,255" class="com.enterasys.netsight.console.client.flexview.FvTable" id="IPmib_ARPTable" columnSelectionAllowed="false" autoCreateColumnsFromModel="false" autoExportAllowed="false" autoExportCsvFieldDelimiter="Comma">IPmib_ARPTable
        <tableModel>com.ets.nac.tables.TbModel</tableModel>
        <column comparator="com.ets.flextable.col.IntStringComparator" id="0" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" fixed="true" hidden="true">ReqID
            <notes></notes>
            <dataField>OID::ReqID:::SNMP::ReqID</dataField></column>
        <column comparator="com.ets.nac.tables.TbCompOid" id="1" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" fixed="true" modelIndex="1">IP Address
            <notes></notes>
            <dataField>OID::IP Address:::SNMP::IP Address</dataField></column>
        <column comparator="com.ets.nac.tables.TbCompOid" id="2" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" fixed="true" hidden="true" modelIndex="2">Instance
            <notes></notes>
            <dataField>OID::Instance:::SNMP::Instance</dataField></column>
        <column comparator="com.ets.flextable.col.VarStringComparator" id="104" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" modelIndex="3">Interface Name
            <notes></notes>
            <dataField>OID::ifName:::SNMP::SNMP;false;15;3;false;false;5;7;0;0;0;0;0</dataField></column>
        <column comparator="com.ets.nac.tables.TbCompIp" id="102" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" modelIndex="4">IP Address
            <notes></notes>
            <dataField>OID::ipNetToMediaNetAddress:::SNMP::SNMPW;false;64;4;true;false;4;2;0;0;0;0;0</dataField></column>
        <column comparator="com.ets.flextable.col.VarStringComparator" id="101" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" modelIndex="5">MAC Address
            <notes></notes>
            <dataField>OID::ipNetToMediaPhysAddress:::SNMP::SNMPW;false;4;5;true;false;4;2;0;0;0;0;0</dataField></column>
        <column comparator="com.enterasys.netsight.console.client.flexview.FvCompMibEnum" id="103" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" modelIndex="6">Type
            <notes></notes>
            <dataField>OID::ipNetToMediaType:::SNMP::SNMPW;false;2;6;true;false;4;2;0;0;0;0;0</dataField></column>
        <column comparator="com.ets.flextable.col.IntStringComparator" id="100" width="1374" sortOrder="descending" class="com.enterasys.netsight.console.client.flexview.FvColumn" modelIndex="7">Interface Index
            <notes></notes>
            <dataField>OID::ipNetToMediaIfIndex:::SNMP::SNMPW;false;2;7;true;false;4;2;1;0;0;0;0</dataField></column>
        <notes>IP-MIB ARP Table</notes>
        <dataField>TBLHASH::::TBLHDR::0;0;true;30;None;V.0.3.3.0;0;0;105</dataField></flextable></flextablelist>
 

StephanH
Valued Contributor III

based on my experience the way suggested by Mig is the easiest to implement and most flexible.

It is possible to read out the data from the individual switches via FlexViews and to display it in the GUI (if the devices have corresponding MIB entries for the required data). However, the FlexViews do not offer any reasonable possibilities to process the data as you want.

Besides the possibility mentioned by Mig to send the data by mail, there is of course also the possibility to simply include a shared folder in the Linux file system of the XMC and thus store the data directly there.

If you want to use the FlexViews you have to search the corresponding MIB tables of your switch for the data and build own FlexViews matching your requirements (can only be done in the legacy Java tool). 

Regards Stephan
GTM-P2G8KFN