incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject Model layer for CIMI
Date Wed, 09 Nov 2011 21:18:22 GMT

This is a model layer for CIMI that does both serialization and
deserialization of JSON and XML based on a simple metadata description of
the CIMI model expressed in a custom DSL. In particular, we won't need HAML
templates to format objects, and I am reasonably sure that the metadata
makes sure we serialize in a predictable manner to XML.

Patch 1/2 contains the basics, including the DSL, 2/2 shows how this can be
used for a specific class.

There's a few convenience additions that should be made to the DSL, in
particular making it possible to reuse nested structures that are used in
several places, something like

  array :operations, :class => Operation

but we can add that later.

One small fly in the ointment is that the use of XmlSimple causes child
elements in XML to be rendered in an unpredictable order; the CIMI standard
doesn't say anything about reordering elements, though with a strict
interpretation of XML, the rendered XML does not conform to the XML schema
implicitly defined in the CIMI standard.

David

Mime
View raw message