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

YANG gen. binding classes with Optional<XYZ> newXYZIfValidPattern() kind of utility factory method

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Won't Do
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    Description

      In https://git.opendaylight.org/gerrit/#/c/53118/ for NETVIRT-514 I found myself writing a small utility with a method like this:

      Optional<Uuid> newUuidIfValidPattern(String possibleUuid)

      in class UuidUtil; about to be proposed into org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.IetfYangUtil also.

      I'm wondering if this is an extreme rare case, or not something one might reasonably often encounter wanting to do - perhaps you would consider generating such a utility factory method returning an Optional for all classes generated for regexp expression in YANG, so that in the case of above org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid would have this directly?

      Also see MDSAL-238 for a related more minor suggestion.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            vorburger Michael Vorburger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: