Git Product home page Git Product logo

Comments (15)

jcleung5549 avatar jcleung5549 commented on August 22, 2024

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.

tomasg2012 avatar tomasg2012 commented on August 22, 2024

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.

mraineri avatar mraineri commented on August 22, 2024

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.

mraineri avatar mraineri commented on August 22, 2024

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.

jcleung5549 avatar jcleung5549 commented on August 22, 2024

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.

jcleung5549 avatar jcleung5549 commented on August 22, 2024

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.

tomasg2012 avatar tomasg2012 commented on August 22, 2024

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.

jcleung5549 avatar jcleung5549 commented on August 22, 2024

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.

tomasg2012 avatar tomasg2012 commented on August 22, 2024

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.

jcleung5549 avatar jcleung5549 commented on August 22, 2024

My preference would be for the second structure, since it uses the RedfishYang defintitions. Joe?

from yang-to-redfish-converter.

jcleung5549 avatar jcleung5549 commented on August 22, 2024

May 10 - TF agreed to use option 1.

from yang-to-redfish-converter.

tomasg2012 avatar tomasg2012 commented on August 22, 2024
<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.

mraineri avatar mraineri commented on August 22, 2024

We'll need to update RedfishYangExtensions_v1.xml accordingly.

from yang-to-redfish-converter.

jcleung5549 avatar jcleung5549 commented on August 22, 2024

No longer seeing with YANG-2019. Waiting for a clean Travis run, before closing this issue.

from yang-to-redfish-converter.

jcleung5549 avatar jcleung5549 commented on August 22, 2024

Travis is no longer generating this error.

from yang-to-redfish-converter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.