Commit 631deb38 authored by Jean Rebiffe's avatar Jean Rebiffe
Browse files

Update...

Update scripts/inventory/INV_CARRIER_01/interface_type_microwaveRadioLinkTerminal_filter.xml, scripts/inventory/INV_CARRIER_01/INV_CARRIER_01_script.txt, scripts/inventory/INV_CARRIER_01/RLT_transform.xsl, scripts/inventory/INV_CARRIER_01/CT_transform.xsl, scripts/inventory/INV_CARRIER_01/interface_type_microwaveCarrierTermination_filter.xml, scripts/inventory/INV_CARRIER_01/README.md
parent ade2964d
Loading
Loading
Loading
Loading
+25 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        <interfaces>
            <xsl:for-each select="nc:data/if:interfaces/if:interface"
                        xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
                        xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"
                        xmlns:mrl="urn:ietf:params:xml:ns:yang:ietf-microwave-radio-link">
                <interface>
                    <xsl:copy-of select="if:name" />
                    <xsl:copy-of select="if:type" />
                    <xsl:copy-of select="mrl:tx-enabled" />
                    <xsl:copy-of select="mrl:tx-frequency" />
                    <xsl:copy-of select="mrl:duplex-distance" />
                    <xsl:copy-of select="mrl:channel-separation" />
                    <!-- get what is inside a child attribute (ex: mrl:maximum-nominal-power is inside mrl:rtpc -->
                    <xsl:copy-of select="mrl:rtpc/mrl:maximum-nominal-power" />
                    <xsl:copy-of select="mrl:single/mrl:selected-cm" />
                    <xsl:copy-of select="mrl:adaptive/mrl:selected-min-acm" />
                    <xsl:copy-of select="mrl:adaptive/mrl:selected-max-acm" />
                </interface>
            </xsl:for-each>
        </interfaces>
    </xsl:template>
</xsl:stylesheet>
+16 −0
Original line number Original line Diff line number Diff line
set feedback_to_output true
ne load ne.yaml
# set logging_config logging_config.yaml

# Retreive data from NEs
connect
netconf --reply CT get --filter-file interface_type_microwaveCarrierTermination_filter.xml
netconf --reply RLT get --filter-file interface_type_microwaveRadioLinkTerminal_filter.xml
netconf close-session

# Formating data
table from_xml --reply CT --table CT --xsl-transform CT_transform.xsl
table from_xml --reply RLT --table RLT --xsl-transform RLT_transform.xsl
table concat --table CT
table concat --table RTL
table to_excel interfaces.xlsx --tables CT RLT
+7 −0
Original line number Original line Diff line number Diff line
# MWT SDN Plugtests 4 materials

The _INV_CARRIER_01_script.txt_ script should product the inventory for both RLTs and CTs.

```console
$ python3 lncc.py "run_script INV_CARRIER_01_script.txt"
```
+19 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
        <interfaces>
            <xsl:for-each select="nc:data/if:interfaces/if:interface"
                        xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
                        xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"
                        xmlns:mrl="urn:ietf:params:xml:ns:yang:ietf-microwave-radio-link">
                <interface>
                    <xsl:copy-of select="if:name" />
                    <xsl:copy-of select="if:type" />
                    <xsl:copy-of select="mrl:id" />
                    <xsl:copy-of select="mrl:mode" />
                    <!-- Should we list "mrl:carrier-terminations" ? -->
                </interface>
            </xsl:for-each>
        </interfaces>
    </xsl:template>
</xsl:stylesheet>
+0 −0

File moved.

Loading