Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identities for 'switch-selection-reason' are missing #40

Open
PrathibaJee opened this issue Sep 26, 2022 · 0 comments
Open

Identities for 'switch-selection-reason' are missing #40

PrathibaJee opened this issue Sep 26, 2022 · 0 comments
Assignees

Comments

@PrathibaJee
Copy link
Collaborator

PrathibaJee commented Sep 26, 2022

For the Proposal in the issue openBackhaul/core#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>

@PrathibaJee PrathibaJee self-assigned this Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant