On Mon, 2013-02-11 at 13:35 +0100, mfoj...@redhat.com wrote: > From: Michal Fojtik <mfoj...@redhat.com> > > The way of how we currently create CIMI entities is not > really nice. We parse the raw JSON/XML and then we are > trying to create the CIMI entity. > > Besides the code looks ugly, there is no way to add validation > for required attributes without make it even more uglier. > > This patch introduce the 'models/actions/' directory where > we can store the CIMI 'actions' model, like 'MachineTemplateCreate' > model. > > Then in MachineTemplate model, we can leverage the '.from_xml' and > the '.from_json' methods to create the action model and then use it > to create the CIMI entity (MachineTemplate in this case)
ACK to the patch though the above two paragraphs should be removed from the commit message as they are obsolete David