DMTF / YANG-to-Redfish-Converter

This tool converts a YANG model file to the corresponding Redfish schema, specified in OData CSDL, in accordance with the YANG-to-CSDL Mapping Specification.
Other
4 stars 5 forks source link

Missing "Type" facet to indicate the data type used #16

Closed seiferteric closed 6 years ago

seiferteric commented 6 years ago

When using the pyang converter, the Type seems to be missing from the properties.

tomasg2012 commented 6 years ago

Could you specify a particular file converted that this occurs on, which resulting properties it is the issue? If not able to be uploaded in a zip, point to its source online.

seiferteric commented 6 years ago

https://github.com/openconfig/public/blob/master/release/models/interfaces/openconfig-interfaces.yang . I only noticed the issue when taking the resultant csdl and trying to use the csdl to json schema converter. It complains about having no type defined for the properties and so it skips them.

For example, mtu in the yang:

    leaf mtu {
      type uint16;
      description
        "Set the max transmission unit size in octets
        for the physical interface.  If this is not set, the mtu is
        set to the operational default -- e.g., 1514 bytes on an
        Ethernet interface.";
}

And the outputted csdl:

                <Property Name="mtu">
                    <Annotation Term="RedfishYang.NodeType" EnumMember="RedfishYang.NodeTypes/leaf"/>
                    <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
                </Property>
tomasg2012 commented 6 years ago

I think one of the greater issues here is that the plugin currently doesn't have any programming catering the "grouping" tag, so the behavior may not be ideal. Otherwise, this issue will be addressed.

tomasg2012 commented 6 years ago

Grouping and missing type information has been improved, will doublecheck these files.

tomasg2012 commented 6 years ago

Resolution with Network TF Meeting 8/24: Closing as this appears to be fixed.