From 8be73c6e177dfb7cc0879ccc0f5e6e999ac02d14 Mon Sep 17 00:00:00 2001
From: Erik Reid <erik.reid@geant.org>
Date: Sun, 3 Feb 2019 14:19:18 +0100
Subject: [PATCH] allow attribute 'inactive' on interface descriptions

---
 inventory_provider/juniper.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/inventory_provider/juniper.py b/inventory_provider/juniper.py
index 7d8f52d5..ebb015dd 100644
--- a/inventory_provider/juniper.py
+++ b/inventory_provider/juniper.py
@@ -15,12 +15,21 @@ CONFIG_SCHEMA = """<?xml version="1.1" encoding="UTF-8" ?>
     <xs:anyAttribute processContents="skip" />
   </xs:complexType>
 
+
   <!-- NOTE: 'unit' content isn't validated -->
   <xs:complexType name="juniper-interface">
     <xs:sequence>
         <xs:choice minOccurs="1" maxOccurs="unbounded">
           <xs:element name="name" minOccurs="1" maxOccurs="1" type="xs:string" />
-          <xs:element name="description" minOccurs="0" maxOccurs="1" type="xs:string" />
+          <xs:element name="description" minOccurs="0" maxOccurs="1">
+              <xs:complexType>
+                <xs:simpleContent>
+                  <xs:extension base="xs:string">
+                    <xs:attribute name="inactive" type="xs:string" />
+                  </xs:extension>
+                </xs:simpleContent>
+              </xs:complexType>
+          </xs:element>
           <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded" />
         </xs:choice>
     </xs:sequence>
-- 
GitLab