|
|
e1da54 |
From c0f9207b474ffa4c68151f6351434da51c49cb84 Mon Sep 17 00:00:00 2001
|
|
|
e1da54 |
From: Martin Wilck <martin.wilck@ts.fujitsu.com>
|
|
|
e1da54 |
Date: Mon, 18 Nov 2013 12:35:15 +0100
|
|
|
e1da54 |
Subject: [PATCH] transform STP value from "yes/no" to "on/off" in
|
|
|
e1da54 |
redhat-put.xsl
|
|
|
e1da54 |
|
|
|
e1da54 |
https://bugzilla.redhat.com/show_bug.cgi?id=1060076
|
|
|
e1da54 |
https://bugzilla.redhat.com/show_bug.cgi?id=1031053
|
|
|
e1da54 |
|
|
|
e1da54 |
Some tools (e.g. NetworkManager) use "yes"/"no" in config files
|
|
|
e1da54 |
rather than "on/off". netcf needs to transform this in order to conform
|
|
|
e1da54 |
with the schema.
|
|
|
e1da54 |
|
|
|
e1da54 |
(cherry picked from commit 048d13afcc91f4a16a80012aa34b9a024d95368e)
|
|
|
e1da54 |
---
|
|
|
e1da54 |
AUTHORS | 1 +
|
|
|
e1da54 |
data/xml/redhat-put.xsl | 12 +++++++++++-
|
|
|
e1da54 |
2 files changed, 12 insertions(+), 1 deletion(-)
|
|
|
e1da54 |
|
|
|
e1da54 |
diff --git a/AUTHORS b/AUTHORS
|
|
|
e1da54 |
index 2512ac8..f38e939 100644
|
|
|
e1da54 |
--- a/AUTHORS
|
|
|
e1da54 |
+++ b/AUTHORS
|
|
|
e1da54 |
@@ -20,3 +20,4 @@ Contributions by:
|
|
|
e1da54 |
Ed Maste <emaste@freebsd.org>
|
|
|
e1da54 |
Hendrik Schwartke <hendrik@os-t.de>
|
|
|
e1da54 |
Satoru SATOH <ssato@redhat.com>
|
|
|
e1da54 |
+ Martin Wilck <martin.wilck@ts.fujitsu.com>
|
|
|
e1da54 |
diff --git a/data/xml/redhat-put.xsl b/data/xml/redhat-put.xsl
|
|
|
e1da54 |
index 267d9cd..88e6d73 100644
|
|
|
e1da54 |
--- a/data/xml/redhat-put.xsl
|
|
|
e1da54 |
+++ b/data/xml/redhat-put.xsl
|
|
|
e1da54 |
@@ -77,7 +77,17 @@
|
|
|
e1da54 |
<xsl:call-template name="interface-addressing"/>
|
|
|
e1da54 |
<bridge>
|
|
|
e1da54 |
<xsl:if test="node[@label = 'STP']">
|
|
|
e1da54 |
- <xsl:attribute name="stp"><xsl:value-of select="node[@label = 'STP']/@value"/></xsl:attribute>
|
|
|
e1da54 |
+ <xsl:choose>
|
|
|
e1da54 |
+ <xsl:when test="node[@label = 'STP']/@value = 'yes'">
|
|
|
e1da54 |
+ <xsl:attribute name="stp">on</xsl:attribute>
|
|
|
e1da54 |
+ </xsl:when>
|
|
|
e1da54 |
+ <xsl:when test="node[@label = 'STP']/@value = 'no'">
|
|
|
e1da54 |
+ <xsl:attribute name="stp">off</xsl:attribute>
|
|
|
e1da54 |
+ </xsl:when>
|
|
|
e1da54 |
+ <xsl:otherwise>
|
|
|
e1da54 |
+ <xsl:attribute name="stp"><xsl:value-of select="node[@label = 'STP']/@value"/></xsl:attribute>
|
|
|
e1da54 |
+ </xsl:otherwise>
|
|
|
e1da54 |
+ </xsl:choose>
|
|
|
e1da54 |
</xsl:if>
|
|
|
e1da54 |
<xsl:if test="node[@label = 'DELAY']">
|
|
|
e1da54 |
<xsl:attribute name="delay"><xsl:value-of select="node[@label = 'DELAY']/@value"/></xsl:attribute>
|
|
|
e1da54 |
--
|
|
|
e1da54 |
1.8.3.1
|
|
|
e1da54 |
|