Some tools (e.g. NetworkManager) use "yes"/"no" in config files rather than "on/off". netcf needs to transform this in order to conform with the schema. --- data/xml/redhat-put.xsl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/data/xml/redhat-put.xsl b/data/xml/redhat-put.xsl index 267d9cd..88e6d73 100644 --- a/data/xml/redhat-put.xsl +++ b/data/xml/redhat-put.xsl @@ -77,7 +77,17 @@ <xsl:call-template name="interface-addressing"/> <bridge> <xsl:if test="node[@label = 'STP']"> - <xsl:attribute name="stp"><xsl:value-of select="node[@label = 'STP']/@value"/></xsl:attribute> + xsl:choose + <xsl:when test="node[@label = 'STP']/@value = 'yes'"> + <xsl:attribute name="stp">on</xsl:attribute> + </xsl:when> + <xsl:when test="node[@label = 'STP']/@value = 'no'"> + <xsl:attribute name="stp">off</xsl:attribute> + </xsl:when> + xsl:otherwise + <xsl:attribute name="stp"><xsl:value-of select="node[@label = 'STP']/@value"/></xsl:attribute> + </xsl:otherwise> + </xsl:choose> </xsl:if> <xsl:if test="node[@label = 'DELAY']"> <xsl:attribute name="delay"><xsl:value-of select="node[@label = 'DELAY']/@value"/></xsl:attribute>
On 11/18/2013 01:35 PM, Martin Wilck wrote:
Some tools (e.g. NetworkManager) use "yes"/"no" in config files rather than "on/off". netcf needs to transform this in order to conform with the schema.
I had seen this back in November but forgotten to push it. ACK and pushed. Thanks for the fix!
netcf-devel@lists.fedorahosted.org