All of lore.kernel.org
 help / color / mirror / Atom feed
* Redfish Code Generation
@ 2019-11-08 17:42 Richard Hanley
  2019-11-08 19:49 ` James Feist
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Hanley @ 2019-11-08 17:42 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

Hi everyone,

I was considering work on spiking out a tool to parse Redfish OpenAPI
schemas, and create some minimal code generation.  Most of the existing
swagger tools I've found for Open API are either for clients or too heavy
weight for embedded use.

Has anyone in the community looked into this subject?  Would people be
interested in such a tool? Are there any pitfalls that people found that I
should be aware of?

Thank you,
Richard

[-- Attachment #2: Type: text/html, Size: 552 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Redfish Code Generation
  2019-11-08 17:42 Redfish Code Generation Richard Hanley
@ 2019-11-08 19:49 ` James Feist
  2019-11-08 22:32   ` Richard Hanley
  0 siblings, 1 reply; 3+ messages in thread
From: James Feist @ 2019-11-08 19:49 UTC (permalink / raw)
  To: Richard Hanley, openbmc

On 11/8/19 9:42 AM, Richard Hanley wrote:
> Hi everyone,
> 
> I was considering work on spiking out a tool to parse Redfish OpenAPI 
> schemas, and create some minimal code generation.  Most of the existing 
> swagger tools I've found for Open API are either for clients or too 
> heavy weight for embedded use.
> 
> Has anyone in the community looked into this subject?  Would people be 
> interested in such a tool? Are there any pitfalls that people found that 
> I should be aware of?

I heard at the hackathon that a couple of vendors have tried / are doing 
this, and most of the pitfalls were size. OpenBmc also makes the problem 
more interesting as the schemas aren't normally all that difficult to 
create, it's negotiating with dbus, limiting the api calls, and all the 
interfaces that seems to cause most of the problems. I'd be interested 
in what code you're trying to generate and what problem you're trying to 
solve. If you have some sort of white paper I'd be willing to give feedback.

-James

> 
> Thank you,
> Richard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Redfish Code Generation
  2019-11-08 19:49 ` James Feist
@ 2019-11-08 22:32   ` Richard Hanley
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Hanley @ 2019-11-08 22:32 UTC (permalink / raw)
  To: James Feist; +Cc: openbmc

[-- Attachment #1: Type: text/plain, Size: 2544 bytes --]

Hi James,

I do not have a white paper yet, but I will be putting one together.
Overall, there are two broad areas that I'm thinking about here.

The first is that I get the feeling that there is a growing need to work
directly with the Redfish data model.  If the industry is indeed moving
towards RDE for expansion components, then there will eventually be some
need to serialize Redfish schemas to/from BEJ.  Moreover, here at Google
I'm expecting that we will need to convert the Redfish data model from JSON
to protocol buffers in order to integrate into our data centers.

Tasks like these seem like decent candidates for automation, because it's
primarily about data not logic.  I agree with you're point that a lot of
the logic in bmcweb is around the d-bus layer.  So I'll make sure to avoid
mixing the two problems together.

The other thing that I'm hoping, is that once you have some tooling to
generate the data model, then you can start building up some testing and
validation.  This could be as simple as providing some compile time type
checking, and runtime assertions.  I could imagine it growing to validate
Redfish profiles, but let's not get too far ahead of myself.

You also make a good point about code size.  I could imagine code
generation done in a bad way would bloat the code.  I'll make sure to keep
that in the forefront of any design.

Thanks,
Richard

On Fri, Nov 8, 2019 at 11:49 AM James Feist <james.feist@linux.intel.com>
wrote:

> On 11/8/19 9:42 AM, Richard Hanley wrote:
> > Hi everyone,
> >
> > I was considering work on spiking out a tool to parse Redfish OpenAPI
> > schemas, and create some minimal code generation.  Most of the existing
> > swagger tools I've found for Open API are either for clients or too
> > heavy weight for embedded use.
> >
> > Has anyone in the community looked into this subject?  Would people be
> > interested in such a tool? Are there any pitfalls that people found that
> > I should be aware of?
>
> I heard at the hackathon that a couple of vendors have tried / are doing
> this, and most of the pitfalls were size. OpenBmc also makes the problem
> more interesting as the schemas aren't normally all that difficult to
> create, it's negotiating with dbus, limiting the api calls, and all the
> interfaces that seems to cause most of the problems. I'd be interested
> in what code you're trying to generate and what problem you're trying to
> solve. If you have some sort of white paper I'd be willing to give
> feedback.
>
> -James
>
> >
> > Thank you,
> > Richard
>

[-- Attachment #2: Type: text/html, Size: 3071 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-08 22:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 17:42 Redfish Code Generation Richard Hanley
2019-11-08 19:49 ` James Feist
2019-11-08 22:32   ` Richard Hanley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.