[openstack-dev] Event notification descriptors/schemas (? swagger ?)

Balázs Gibizer balazs.gibizer at ericsson.com
Fri Oct 14 08:42:43 UTC 2016


> -----Original Message-----
> From: Joshua Harlow [mailto:harlowja at fastmail.com]
> Sent: October 11, 2016 22:36
> 
> Chris Dent wrote:
> > On Tue, 11 Oct 2016, Joshua Harlow wrote:
> >
> >> Damn, that's crazy that the projects emitting events don't want to
> >> own the formats and versions (and schemas) that they emit. That is
> >> ummm, like ummm, what the, ha, words can't describe... And the fact
> >> that nothing much has changed since kilo, ya, also a what the...
> >
> > Nova started with versioning and schematizing notifications with this
> > blueprint:
> >
> > https://blueprints.launchpad.net/nova/+spec/versioned-notification-api
> >
> > That's sort of in the realm of what's being discussed here, but
> > centralized in nova for now.
> >
> > I agree that siloing the stuff in the code is bad in the long term,
> > but I guess it is good that it has started somewhere.
> >
> 
> Thanks for sharing, didn't recall that work being done.
> 
>  From glancing at it, it seems to be nova versioning its notifications (which is
> good) but I'm unclear what the objectification of those notifications means to
> the outside world (the actual consumers of notifications). Said outside world
> uses more than just python so it feels like some other intermediary format
> should be exposed to consumers as the schema that various python and
> non-python languages can consume (either via auto-generation of code or
> other).
> 
> Perhaps just jsonschema is enough (though it doesn't feel like it)? Has
> anyone tried 'to_json_schema' on those objects and outputting that schema
> into a nova/schema/notifications folder (or equivalent)?

This is exactly what we are planning to do.  Work is ongoing to add to_json_schema
support for every VersionedObject field [1]. Then we would like to add a small
tool to nova that makes it possible to generate the json schemas for the versioned
notifications [2]. Meanwhile we continue to transform legacy notifications to a versioned
format [3].

As soon as you have json schema you can find (or create) tools that generate an object
model and a parser from the json schema of the notifications in any modern language.

I hope this work in nova will servers as an example for other OpenStack project and
in the end OpenStack will have well defined and easy to consume notifications.

Any feedback on our plans are highly appreciated. 

Cheers,
gibi

[1] https://review.openstack.org/#/q/topic:bp/json-schema-for-versioned-object,n,z 
[2] https://blueprints.launchpad.net/nova/+spec/json-schema-for-versioned-notifications 
[3] https://vntburndown-gibi.rhcloud.com/index.html 

> 
> -Josh
> 
> __________________________________________________________
> ________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-
> request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list