Comments (15)
Travis expects the element to be within another element (like ). This is a problem for some of the offending elements.
(Currently, commenting out the elements in the CSDL to make Travis happy.)
from yang-to-redfish-converter.
With both this and #42, I believe that's how we decided to handle it, but with the CSDL tests for Travis modified to accommodate. Without this change, it will then have a problem with multiple of the same Annotation (i.e multiple RedfishYang.identity in the same object).
How should multiple of the same Annotation work? perhaps combine them if possible?
from yang-to-redfish-converter.
The following syntax is likely not valid in CSDL terms (but it's hard to tell from the CSDL spec):
<Schema ...>
<Collection>
</Collection>
</Schema>
The <Collection>
tags likely need to be within a given <Annotation>
.
@jcleung5549 we might need to review the translation rules with the TF to see if we need to revise how this gets populated.
from yang-to-redfish-converter.
For example:
<Schema ...>
<Collection>
<Record>
<Annotation Term="RedfishYang.uses" String="interface-phys-holdtime-top"/>
</Record>
<Record>
<Annotation Term="RedfishYang.uses" String="subinterfaces-top"/>
</Record>
</Collection>
</Schema>
might need to turn into this:
<Schema ...>
<Annotation Term="RedfishYang.uses">
<Collection>
<String>interface-phys-holdtime-top</String>
<String>subinterfaces-top</String>
</Collection>
</Annotation>
</Schema>
from yang-to-redfish-converter.
I think you are right. The YANG to Redfish mapping specification does not specify the mapping. We can agree at the next Network Infrastructure TF meeting.
from yang-to-redfish-converter.
The following YANG statements do not result in an element.
- uses
- grouping
- augment
- include
- import
- belongsto
- deviation?
Keep annotations - extension
from yang-to-redfish-converter.
Since a Collection will not exist at the base of a Schema, the new approach would require creating Collection in a different form. Mike has pointed out that an Annotation with a specific name that can be defined more than once would require to be defined that way in the YangExtensions file.
<Term Name="revision" Type="Edm.String">
<Annotation Term="OData.Description" String="The yang revision name."/>
</Term>
needs to evolve to
<Term Name="revision" Type="Collection(RedfishYang.revision_type)">
<Annotation Term="OData.Description" String="The yang revision name."/>
</Term>
<ComplexType Name="revision_type">
<Property Name="revision_date" Type="Edm.String"/>
<Property Name="reference" Type="Edm.String"/>
</ComplexType>
or something similar, as suggested by Mike. Not sure if Property should be defined, perhaps there a way to make a more benign collection that can just follow a simpler annotation structure.
from yang-to-redfish-converter.
Adding the current CSDL structure (for the discussion purposes)
<Collection>
<Record>
<Annotation Term="RedfishYang.revision" String="2018-04-24">
<Annotation Term="OData.Description" String="Clarified behavior of last-change state leaf."/>
<Annotation Term="OData.LongDescription" String="Clarified behavior of last-change state leaf."/>
<Annotation Term="RedfishYang.reference" String="2.3.1"/>
</Annotation>
</Record>
<Record>
<Annotation Term="RedfishYang.revision" String="2018-01-05">
<Annotation Term="OData.Description" String="Add logical loopback to interface."/>
<Annotation Term="OData.LongDescription" String="Add logical loopback to interface."/>
<Annotation Term="RedfishYang.reference" String="2.3.0"/>
</Annotation>
</Record>
<Record>
<Annotation Term="RedfishYang.revision" String="2017-12-22">
<Annotation Term="OData.Description" String="Add IPv4 proxy ARP configuration."/>
<Annotation Term="OData.LongDescription" String="Add IPv4 proxy ARP configuration."/>
<Annotation Term="RedfishYang.reference" String="2.2.0"/>
</Annotation>
</Record>
</Collection>
from yang-to-redfish-converter.
This is the resulting CSDL that Mike had suggested
<Annotation Term="RedfishYang.revision">
<Collection>
<Record>
<PropertyValue Property="revision_date" String="2018-04-24"/>
<PropertyValue Property="reference" String="1.0.1"/>
<Annotation Term="OData.Description" String="Clarified order of ACL evaluation."/>
<Annotation Term="OData.LongDescription" String="Clarified order of ACL evaluation."/>
</Record>
<Record>
...
</Record>
</Collection>
</Annotation>
Or a possible variation.
<Annotation Term="RedfishYang.revision">
<Collection>
<Record>
<Annotation Term="RedfishYang.revision_date" String="2018-04-24"/>
<Annotation Term="RedfishYang.reference" String="1.0.1"/>
<Annotation Term="OData.Description" String="Clarified order of ACL evaluation."/>
<Annotation Term="OData.LongDescription" String="Clarified order of ACL evaluation."/>
</Record>
<Record>
...
</Record>
</Collection>
</Annotation>
from yang-to-redfish-converter.
My preference would be for the second structure, since it uses the RedfishYang defintitions. Joe?
from yang-to-redfish-converter.
May 10 - TF agreed to use option 1.
from yang-to-redfish-converter.
<Record>
<Annotation Term="RedfishYang.revision" String="2018-04-24">
<Annotation Term="OData.Description" String="Clarified order of ACL evaluation."/>
<Annotation Term="OData.LongDescription" String="Clarified order of ACL evaluation."/>
<PropertyValue Property="reference" String="1.0.1"/>
</Annotation>
</Record>
Is how the current code in yang-2019
is expected to output a collection of revisions. This will likely have issue with the testing framework as RedfishYangExtensions requires an update for each property that might have expected tags embedded in them, and embedded annotations.
Additionally, in above comment (#41 (comment)), these should no longer produce output.
from yang-to-redfish-converter.
We'll need to update RedfishYangExtensions_v1.xml accordingly.
from yang-to-redfish-converter.
No longer seeing with YANG-2019. Waiting for a clean Travis run, before closing this issue.
from yang-to-redfish-converter.
Travis is no longer generating this error.
from yang-to-redfish-converter.
Related Issues (20)
- Unresolved reference error while converting OpenConfig Yang file CSDL to JSON HOT 4
- Would like to get the plugin branch to master HOT 1
- One CSDL file per module HOT 2
- The conversion from OpenConfig YANG generates more CSDL files HOT 1
- Travis - Unknown element name Collection HOT 4
- Unclear how to reference generated CSDL file HOT 3
- Travis complains for <Annotation> elements HOT 8
- Broken type references HOT 1
- Unrecognized keyword - openconfig-extensions HOT 3
- Travis error - unexpected close tag HOT 5
- CSDLs are missing an Action HOT 4
- Travis errors in openconfig_acl_v1.xml HOT 2
- Travis errors on openconfig_if_aggregate_v1.xml HOT 3
- Travis error - Unknown attribute name Alias (3 times) HOT 3
- Travis warning - Complex Types Should Not have Permissions (5 times) HOT 1
- Travis error - Unable to locate type (6 times) HOT 1
- Travis error - Unable to locate annotation (5 times) HOT 1
- Travis error - RedfishYangExtensions.v1_0_0 needs OwningEntity and Release terms HOT 2
- RedfishYangExtension missing OwningEntity and Release annotations HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yang-to-redfish-converter.