5G-xHaul icon indicating copy to clipboard operation
5G-xHaul copied to clipboard

selected-fc-port must be a reference

Open PrathibaJee opened this issue 2 years ago • 0 comments

For the Proposal in the issue https://github.com/openBackhaul/core/issues/28 , need to modify the attribute selected-fc-port from a list to leaf-list in CoreModel.

Solution : In the UML2YANG tool in the experimental branch , require to include the following in the /models/tools/pruning-and-refactoring/core-model/src/main/resources/xslt/prune-and-refactor-core-model.xslt to modify the selected-fc-port from a list to leaf-list.

<!-- changing _selectedFcPort in fc-switch from list to leafref -->
<xsl:template match="ownedAttribute[@xmi:id = '_2PdiYI8lEeOw_ste-s6RrA' ]" >
    <xsl:copy>
      <xsl:apply-templates select="@*"/>
      <xsl:attribute name="aggregation">shared</xsl:attribute>
      <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 avatar Sep 26 '22 13:09 PrathibaJee