Commit 2b24a3a2 authored by Jean Rebiffe's avatar Jean Rebiffe
Browse files

Update scripts/inventory/INV_FW_01/INV_FW_01_script.txt,...

Update scripts/inventory/INV_FW_01/INV_FW_01_script.txt, scripts/inventory/INV_FW_01/system_filter.xml, scripts/inventory/INV_FW_01/system-state_filter.xml, scripts/inventory/INV_FW_01/system_transform.xsl, scripts/inventory/INV_FW_01/system-state_transform.xsl, scripts/inventory/INV_FW_01/README.md
parent 02510811
Loading
Loading
Loading
Loading
+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 system get --filter-file system_filter.xml
netconf --reply system-state get --filter-file system-state_filter.xml
netconf close-session

# Formating data
table from_xml --reply system --table system --xsl-transform sytem_transform.xsl
table from_xml --reply system-state --table system-state --xsl-transform system-state_transform.xsl
table concat --table system
table concat --table system-state
table to_excel interfaces.xlsx --tables system system-state
+7 −0
Original line number Original line Diff line number Diff line
# INV_HW_01

The _INV_FW_01_script.txt_ script should product the inventory for hardware components of ietf-system module ([RFC7317](https://datatracker.ietf.org/doc/html/rfc7317)).

```console
$ python3 lncc.py "run_script INV_FW_01_script.txt"
```
+1 −0
Original line number Original line Diff line number Diff line
<system-state xmlns="urn:ietf:params:xml:ns:yang:ietf-system" />
+13 −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="/nc:data/sys:system-state/sys:platform"
                xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
                xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system">
        <system-state>
            <xsl:copy-of select="sys:os-name" />
            <xsl:copy-of select="sys:os-release" />
            <xsl:copy-of select="sys:os-version" />
            <xsl:copy-of select="sys:machine" />
        </system-state>
    </xsl:template>
</xsl:stylesheet>
+1 −0
Original line number Original line Diff line number Diff line
<system xmlns="urn:ietf:params:xml:ns:yang:ietf-system" />
Loading