dmtf / redfish-schema-creator Goto Github PK
View Code? Open in Web Editor NEWCreates a Redfish CSDL schema file from an annotated JSON file
License: Other
Creates a Redfish CSDL schema file from an annotated JSON file
License: Other
Allow creation of an OEM extension to existing defined schemas by accepting the "Oem" property in the root (likely with no other properties?) as the indication to output an OEM Extension schema rather than a full Redfish Resource definition.
Unlike other DMTF repositories, there is no "requirements.txt" file present.
A crash occurs within the XML tree library when an enumDescription / LongDescription key does not match a value in the enum list. While this is an error in the input, it would be helpful for the tool to validate that description entries match up with enum values. This can be easily reproduced using the test.json file in the repo, such as:
"ThingType": "RackMount | Cheap | Expensive | Obsolete | Trendy",
"ThingType!enumDescriptions": {
"RackMount": "tmp",
"SUPERCHEAP": "THIS VALUE DOES NOT MATCH A DEFINED ENUMERATION!",
"Expensive": "tmp2",
"Obsolete": "tmp3",
"Trendy": "tmp4"
},
Line DMTF/Redfish-Interface-Emulator#7 of test_csdl_creator.py import should be corrected from "create_navegation" to "create_navigation"
Using a json schema file as input, crash occurs when building a property with enumerations.
Traceback (most recent call last):
File "c:\Users\jeff\Documents\Github\Redfish-Schema-Creator\csdl_creator.py",
line 362, in <module>
sys.exit(main())
File "c:\Users\jeff\Documents\Github\Redfish-Schema-Creator\csdl_creator.py",
line 325, in main
csdl.build_csdl()
File "c:\Users\jeff\Documents\Github\Redfish-Schema-Creator\csdl_creator.py",
line 228, in build_csdl
self.build_csdl_node(self.entity, key, descriptors)
File "c:\Users\jeff\Documents\Github\Redfish-Schema-Creator\csdl_creator.py",
line 279, in build_csdl_node
self.csdl.append(create_enum_property(key, value, descriptors.get("enumDescr
iptions", None), descriptors.get("enumLongDescriptions", None)))
File "c:\Users\jeff\Documents\Github\Redfish-Schema-Creator\csdl_creator.py",
line 146, in create_enum_property
for value in enum_values:
TypeError: 'NoneType' object is not iterable
The error appears to be that the call is using value
(single value) rather than the discovered/imported enum
list. Changing the call to use the enum list resolves the crash and the function works properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.