Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-36

Add util support for Identity

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: Windows
      Platform: PC

    Description

      (1) It would be good to have in org.opendaylight.yangtools.yang.model.api.type.IdentityrefTypeDefinition
      to have a method that returns the IdentitySchemaNode, not just the name

      (2) it would be good to have in IdentitySchemaNode a method that lets me get all the derived identities.
      I need this since the identityRef references the base but I have no links down the identity tree.

      for example in this Yang, I would be able to start at hashFunctionLeaf and
      getIdentityNode() to get the IdentitySchemaNode.
      From the base IdentitySchemaNode I can then recursively call getDerivedIdentities() to get BOB, IPSX and CRC and then from CRC to get CRC-Big and CRC_Small.

      leaf hashFunctionLeaf {
      type identityref

      { base "hashFunction"; }

      identity hashFunction {
      }
      identity BOB

      { base "hashFunction"; }
      identity IPSX { base "hashFunction"; }

      identity CRC

      { base "hashFunction"; }

      identity CRC_big

      { base "CRC"; }
      identity CRC_small { base "CRC"; }

      If this is already possible then please let me know how to do it

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            chrhartl@cisco.com Christopher Hartley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: