Uploaded image for project: 'Active and Available Inventory'
  1. Active and Available Inventory
  2. AAI-2606

Schema-service entity description is not available

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Frankfurt Release
    • Dublin Release, El Alto Release, Frankfurt Release
    • None

      Getting the description of "plural" entities does not work, this call:

       

      introspectors.get("generic-vnfs").getMetadata(ObjectMetadata.DESCRIPTION)
      

       

      returns NULL, but when we look at the OXM we see:

      <xs:element name="generic-vnfs">
          <xs:complexType>
            <xs:annotation>
              <xs:appinfo>
                <annox:annotate target="class">@org.onap.aai.annotations.Metadata(description="Collection of VNFs")</annox:annotate>
              </xs:appinfo>
            </xs:annotation>
            <xs:sequence>
              <xs:element ref="tns:generic-vnf" minOccurs="0" maxOccurs="5000"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>

      As vk250x found out it is because:

      "For only the plural objects such as generic-vnfs, tenants and etc, they have two xml-properties child nodes to the parent node java-type in the oxm files.

              <java-type name="GenericVnfs">

                  <xml-properties>

                      <xml-property name="description" value="Collection of VNFs"/>

                  </xml-properties>

                  <xml-root-element name="generic-vnfs"/>

                  <java-attributes>

                      <xml-element container-type="java.util.ArrayList" java-attribute="genericVnf" name="generic-vnf" type="inventory.aai.onap.org.v16.GenericVnf"/>

                  </java-attributes>

                  <xml-properties>

                      <xml-property name="maximumDepth" value="0"/>

                  </xml-properties>

              </java-type>

       __ 

      It’s a bug in the oxm files it seems."

       

            jimmydot jimmydot
            wageslave wageslave
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: