Git Product home page Git Product logo

rde-dictionary's People

Contributors

ahrytsen avatar bnatrajan avatar dependabot[bot] avatar jautor avatar jeffwyeh avatar kilgorep avatar ksztyber avatar millerpa avatar mraineri avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rde-dictionary's Issues

Decoding alone

Hi I am trying to do only the decoding operation. Please let me know what is a PDR map.txt file and if possible can you send me few samples of the PDR map.txt?

Concatenating RDE-dictionaries

I have a basic question about using RDE-dictionaries (Hopefully this is the right place to ask this question. If not, I apologize.)

Let's say my RDE device is capable of receiving BEJ of two redfish schemas, ProcessorMetrics and MemoryMetrics. Right now I can generate dictionaries for each schema individually. Then I can use ProcessorMetrics schema dictionary for decoding ProcessorMetrics BEJ blocks and MemoryMetrics schema dictionary for decoding MemoryMetrics BEJ blocks.

So I need to know the original schema type of a BEJ block before hand to use the correct dictionary.

But if I can have one concatenated dictionary for both ProcessorMetrics and MemoryMetrics, then I do not need to know the original schema type of a BEJ block. I can simply feed either a ProcessorMetrics BEJ block or a MemoryMetrics BEJ block to the same dictionary for decoding.

Is there a way to generate a concatenated RDE-dictionary for both ProcessorMetrics and MemoryMetrics using rde_schema_dictionary_gen.py?

Handling of links in action parameters is wrong

The parameter CertificateURI in CertificateService's #ReplaceCertificate action is a link, but the dictionary generator is not recognizing this as a link and is instead pulling in the entire Certificate resource into the CertificateService dictionary. A similar problem is happening with ComputerSystem (#AddResourceBlock, #RemoveResourceBlock).

Regular resource properties corresponding to extra-schema links are being handled properly.

Script is not able to decode/encode correctly annotation set with child properties

Annotation set's properties should not have annotation selector bit, since annotations also can be annotated. (yes, sounds tricky)
For example:

"@Redfish.Settings" : {
    "SettingsObject" : {
        "@odata.id" : "..."
    }
}

So here only "@Redfish.Settings" and "@odata.id" must have annotation dictionary selector bit, since they are from root of the dictionary. In other words only properties from root of annotation dictionary(those have '@' sign) should have annot selector bit 1.

Actions are not being correctly represented in the dictionary

  1. Currently the dictionary builder encodes the name of the property that represents the action with just the Action name. Instead it should represent the action property as

    #Namespace.ActionName
    e.g. #Drive.SecureErase

  2. All actions have 2 child properties
    target
    title
    Currently the dictionary builder does not include these properties.

Reg the BEJ C++ encoder / decoder

Hi,

Is there any C++ library of encoder / decoder. Also, is there any reference example with the dictionary published by a RDE device, and doing a redfish request converted to BEJ & respond back.

Missing type validation during BEJ encoding

Consider a case of BEJ encoding a simple erroneous JSON payload using the most recent version of the Redfish Volume schema:

{
    "Encrypted": "true"
}

This payload is considered erroneous because the schema defines the Encrypted property as having a type of either boolean or null, and a string type value has been assigned.

The python function json.loads() will convert this JSON object to the following python dictionary:

{
    'Encrypted': 'true'
}

When this dictionary is fed into bej_encode() with a string value for the 'Encrypted' key, the BEJ encoding succeeds with a False value being assigned to the property instead of failing the encode since the provided value was a string type.

It looks like the function which determines the appropriate BEJ format encoder to call for a given tuple, bej_encode_sflv() is not doing any sort of type validation for provided property values. Some simple checking for obvious type mismatches, primarily for int, bool, string, and float, would help to avoid unexpected outcomes during the encode process.

Add command line to .map file

The human readable .map files that are generated alongside dictionary files should begin with the command line that was used to generate them. This will serve as internal documentation and will help ensure reproducibility of dictionary builds.

Tool silently dropping properties from dictionaries

Without access to collection schemas, links to them are not created properly (reasonable) but no error message is generated to alert the user that these properties are being skipped (which seems wrong). While the situation is clearly user error, a warning message seems necessary.

The specific case where this was observed was in building a dictionary for NetworkAdapter. When the user first built the dictionary, no entries were generated for NetworkAdapter.NetworkPorts and NetworkAdapter.NetworkDeviceFunctions. Copying the two collection files into the directory with generate_dictionaries.py enabled them to be generated in this user's case.

No way to reflect schema's ReadWrite properties as ReadOnly in dictionary

Hi,

My device doesn't support Writes for some of properties which appears in schema profile as a ReadWrite.
To generate a dictionary I'am using a profile where I'm specifying those properties with only ReadRequirements as mandatory,
but in dictionary they appears as ReadWrite ones.
Is there a way to reflect such properties as ReadOnly in dictionary?
If no, then is it a script issue or "Redfish Interoperability Profiles"(DSP0272) spec issue?

generate_dictionaries hard-codes annotations schema to v1_0_0

The annotations schema is currently at v1_1_0 / v1_1_1, but the folder-based script hard-codes the "redfish-payload-annotations" version to "v1_0_0".

The script should either allow that value to be configurable, or, since these are backward compatible, just use the highest-version / latest annotations schema. Also suggesting to the DMTF that a "redfish-payload-annotations-v1.json" file be created to always reflect the latest version to avoid these ties - as was done for the "redfish-schema-v1" schema extensions file.

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.