Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-815

Add binding.api.(Keyed)Instance{Identifier,Wildcard}

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Medium Medium
    • 14.0.0, 13.0.2
    • None
    • Binding API

      Our current use of yang.binding.InstanceIdentifier in mdsal-binding-api is rather unfortunate - with accidental feature (i.e. wildcards) and layering violation.

      Add two basic concepts:

      • InstanceIdentifier, covering the yang.binding.InstanceIdentifier wildcarded=false case
      • InstanceWildcard, covering the yang.binding.InstanceIdentifier wildcarded=true case

      These should work similarly to InstanceIdentifierBuilder as of MDSAL-798.

      Compatibility to/from yang.binding.InstanceIdentifier should be covered with methods for each of the concepts:

      class InstanceIdentifier {
          // Throws IAE if legacy is wildcarded
          static InstanceIdentifier ofLegacy(yang.binding.InstanceIdentifier legacy);
      
          // Always non-wildcarded
          yang.binding.InstanceIdentifier toLegacy();
      }
      
      class InstanceWildcard {
          // Throws IAE if legacy is *not* wildcarded
          static InstanceWildcard ofLegacy(yang.binding.InstanceIdentifier legacy);
      
          // Always wildcarded
          yang.binding.InstanceIdentifier toLegacy();
      }

       

       

       

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: