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

opeconfig yang model compilation with augmented support is not available in potassium based yangtools

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Lowest Lowest
    • None
    • None
    • Binding codegen
    • None
    • Highest

      Dear Robert,

       

      As part of openconfig yang model compilation (https://github.com/openconfig/public/tree/master/release/models), the generated source code is not carrying augmentation support.

      For example, components -> component -> Does not carry augmentation of LINECARD, OpticalLinePort, etc. It provides augmentation of Component.class only and it does not support " Class<? extends Augmentation"  feature"... 

      As a result of augmentation support, we are not able to augment and construct the openconfig model tree to start with platform itself. 

      Actuals:

      public ComponentsBuilder addAugmentation(Augmentation<Components> augmentation) {
              if (!(this.augmentation instanceof HashMap))

      {             this.augmentation = new HashMap<>();         }

              this.augmentation.put(augmentation.implementedInterface(), augmentation);
              return this;
          }

      // It does not carry 

      Expected ones:

      public ComponentsBuilder addAugmentation(Class<? extends Augmentation<Components>> augmentationType) {
              if (!(this.augmentation instanceof HashMap)) {             this.augmentation = new HashMap<>();         }

              this.augmentation.put(augmentation.implementedInterface(), augmentation);
              return this;
          }

      // Component reference

       /**
            * Add an augmentation to this builder's product.
            *
            * @param augmentation augmentation to be added
            * @return this builder
            * @throws NullPointerException if {@code augmentation} is null
            */
          public ComponentBuilder addAugmentation(Augmentation<Component> augmentation) {
              if (!(this.augmentation instanceof HashMap))

      {             this.augmentation = new HashMap<>();         }

              this.augmentation.put(augmentation.implementedInterface(), augmentation);
              return this;
          }

      // Expectation -> additional ask. Since the Parent is not support all the methods of augmentations.

       /**
            * Add an augmentation to this builder's product.
            *
            * @param augmentation augmentation to be added
            * @return this builder
            * @throws NullPointerException if {@code augmentation} is null
            */
          public ComponentBuilder addAugmentation(Class<? extends Augmentation<Component>> augmentationType ** ) {
              if (!(this.augmentation instanceof HashMap)) {             this.augmentation = new HashMap<>();         }

              this.augmentation.put(augmentation.implementedInterface(), augmentation);
              return this;
          }

            Unassigned Unassigned
            SureshPerumal007 Suresh.P Perumal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 3 days
                3d
                Remaining:
                Remaining Estimate - 3 days
                3d
                Logged:
                Time Spent - Not Specified
                Not Specified