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

Wrong placement of deprecated annotation

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 5882

    Description

      There are 3 misplacements:

      • we have unexpected javadoc annotation inside of yang model citation
      • we miss java and javadoc annotations for leaves
      • we miss correctly placed javadoc annotation

      Yang citation in javadoc shall not contain any annotations.
      In case of leaf the only available place for both annotations is above getter.
      In case of sub-container - both annotations can be placed above corresponding getter in parent structure or inside the container's interface.

      consider this yang fragment:
      list my-list {
      key ip-prefix;
      leaf ip-prefix

      { type inet:ip-prefix; }

      leaf l3-context

      { status deprecated; type gbp-common:context-id; mandatory true; }

      container network-containment

      { status deprecated; uses some-grouping; }

      }

      Then the top level interface has following javadoc (containing 2 unexpected @deprecated annotations):
      ...

      • <pre>
      • list my-list {
      • key "ip-prefix"
      • leaf ip-prefix { * type ip-prefix; * }
      • @deprecated - status DEPRECATED
      • leaf l3-context { * type context-id; * status DEPRECATED; * }
      • @deprecated - status DEPRECATED
      • container network-containment { * .. items from grouping * uses network-domain-key; * status DEPRECATED; * }
      • }
      • </pre>
        ...

      Generated getters look like this (no java nor javadoc annotations):
      /**

      • The context for the endpoint's layer 3 address
        *
        */
        ContextId getL3Context();

      /**

      • The network domain associated with this endpoint's fowarding context.
        *
        */
        NetworkContainment getNetworkContainment();

      And NetworkContainment javadoc looks following (unexpected javadoc annotation and correct java annotation below):

      • <pre>
      • @deprecated - status DEPRECATED
      • container network-containment { * .. items from grouping * uses network-domain-key; * status DEPRECATED; * }
      • </pre>
        *...
        */
        @Deprecated

      Attachments

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

        Activity

          People

            filip.gregor@pantheon.tech Filip Gregor
            michal.rehak Michal Rehak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: