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

decimal64 fraction digits sub statement

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Cannot Reproduce
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 8573

    Description

      Hi,

      For data type with following yang schema:

      typedef pm-data-type {
      type union {
      type uint64;
      type decimal64

      { fraction-digits 2; }

      type decimal64

      { fraction-digits 17; }

      }
      }

      ODL is thowing the following error:

      java.lang.IllegalArgumentException: Invalid data "-99.9" for union type.
      at org.opendaylight.yangtools.yang.data.util.AbstractStringUnionCodec.serialize(AbstractStringUnionCodec.java:47)
      at org.opendaylight.yangtools.yang.data.codec.gson.JSONStringUnionCodec.serializeToWriter(JSONStringUnionCodec.java:30)
      at org.opendaylight.yangtools.yang.data.codec.gson.JSONNormalizedNodeStreamWriter.writeValue(JSONNormalizedNodeStreamWriter.java:208)
      at org.opendaylight.yangtools.yang.data.codec.gson.JSONNormalizedNodeStreamWriter.leafNode(JSONNormalizedNodeStreamWriter.java:98)
      at org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeWriter.wasProcessAsSimpleNode(NormalizedNodeWriter.java:152)

      can you please help.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            dhbh Dhruv Bhardwaj
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: