5G-xHaul
5G-xHaul copied to clipboard
Identities for 'switch-selection-reason' are missing
For the Proposal in the issue https://github.com/openBackhaul/core/issues/23 , need to include the identities , SWITCH_STATE_REASON_MANUAL, SWITCH_STATE_REASON_FORCED, SWITCH_STATE_REASON_SIGNAL_DEGRADE, SWITCH_STATE_REASON_SIGNAL_FAIL
Solution : In the UML2YANG tool in the experimental branch , require to include the following code in the /models/tools/pruning-and-refactoring/core-model/src/main/resources/xslt/prune-and-refactor-core-model.xslt
<!-- To include the literal NONE,MANUAL,FORCED,DEGRADE,FAIL to the enumeration SWITCH_STATE_REASON -->
<xsl:template match="packagedElement[@name='SwitchStateReason']">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_zRKlICi9EeaGGvAxxSe1uA1" name="NONE">
<ownedComment xmi:type="uml:Comment" xmi:id="_zRKlICi9EeaGGvAxxSe1uA2" annotatedElement="_zRKlICi9EeaGGvAxxSe1uA1">
<body>No reason</body>
</ownedComment>
</ownedLiteral>
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_zRKlICi9EeaGGvAxxSe1uA2" name="MANUAL">
</ownedLiteral>
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_zRKlICi9EeaGGvAxxSe1uA3" name="FORCED">
</ownedLiteral>
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_zRKlICi9EeaGGvAxxSe1uA4" name="DEGRADE">
</ownedLiteral>
<ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_zRKlICi9EeaGGvAxxSe1uA5" name="FAIL">
</ownedLiteral>
<xsl:apply-templates select="node() | text()"/>
</xsl:copy>
</xsl:template>
Note : Include this in the end of the file before the tag </xsl:stylesheet>