Details
-
Bug
-
Status: Closed
-
Medium
-
Resolution: Done
-
Dublin Release, El Alto Release, Frankfurt Release
-
None
Description
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."