| Summary: | Annotations not working with 0.7.0.201102210617 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Technology] Tigerstripe | Reporter: | Steve Jerman <stjerman> | ||||
| Component: | Annotations | Assignee: | Project Inbox <tigerstripe.annotations-inbox> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | nmehrega, skanton, yuri | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 0.5M0 | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
If you want to test, then my (small) test model is in GIT: http://sjc-hudson20-lnx.cisco.com:8080/git/Tigerstripe-Tycho The generator used is: annotation-poc/full-model-generator from the Git repo posted by Steve. The model is annotation-poc/annotation-poc-module. Created attachment 190514 [details] 337779 patch Source of the problem is com.cisco.xmpim.tsannotations plugin. It registers model for http://com.cisco.ts.annotations.xmp-im.core namespace. The same namespace is used in annotation-impl-model/core.ann annotations file. As registered model definition overrides model definition from annotation file and model definition from com.cisco.xmpim.tsannotations plugin doesn't contain InternalUseOnly, IsNetworkData, PalSchema... annotations the the namespace now, the annotation framework can resolve the annotations and returns null content during core.ann loading. Attached patch fixes '$an' in output, now unresolved annotations with null content are ignored. Corrected comment: Source of the problem is com.cisco.xmpim.tsannotations plugin. It registers model for http://com.cisco.ts.annotations.xmp-im.core namespace. The same namespace is used in annotation-impl-model/core.ann annotations file. As registered model definition overrides model definition from annotation file and model definition from com.cisco.xmpim.tsannotations plugin doesn't contain InternalUseOnly, IsNetworkData, PalSchema and other annotations in the http://com.cisco.ts.annotations.xmp-im.core namespace now, the annotation framework can't resolve content for the annotations during core.ann loading. Attached patch fixes '$an' in output, now unresolved annotations are ignored. Patch applied. Verified. Thanks! |
A simple plugin I have to list out annotations no longer seems to work headless (it did ....) It seems to 'see' the annotation, (hasAnnotations returns true) but getAnnotation returns null. Template: #macro (annos $ob) #if ($ob.hasAnnotations())#foreach($an in $ob.getAnnotations()) ---> $an #end #end #end #foreach($a in $allEntities) $a.fullyQualifiedName #annos($a)#foreach($f in $a.fields) - $f.name #annos ( $f)#end #end Result: com.cisco.test.TestIt ---> $an - attribute0 ---> $an ---> $an com.cisco.xmp.model.foundation.connectivity.PhysicalProtocolEndpoint - speed - portStatus - supportedSpeeds - isInternalPort - doAutoNegotiation - supportsAutoNegotiation - clocking - entPhysicalIndex - supportsAutoSpeed - supportedSpeedString com.cisco.xmp.model.foundation.connectivity.ConnectionProtocolEndpoint com.cisco.xmp.model.foundation.connectivity.InterfaceProtocolEndpointStatistics - ipepIndex - timeLastChange - nrInOctets - nrInUcastPkts - nrInDiscards - nrInErrors - nrInUnknownProtos - nrInMulticastPkts - nrInBroadcastPkts - nrOutOctets