<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I was looking through Nova Objects with a view to creating an extensible object that can be used by writers of plugins to include data generated by the plugin (others have also done the same e.g.
<a href="https://review.openstack.org/#/c/65826/">https://review.openstack.org/#/c/65826/</a> ) On the way I noticed what I think is a bug in Nova Objects serialization (but might be considered “by design” by some – see:
<a href="https://bugs.launchpad.net/nova/+bug/1275675">https://bugs.launchpad.net/nova/+bug/1275675</a>). Basically, if object A has object B as a child, and deserialization finds object B to be an unrecognized version, it will try to back port the object A
to the version number of object B.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Now this is not a problem if the version of A is always bumped when the version of B changes. If the A and B versions are always deployed together, because they are revised and built together, then A will always be the one that is found
to be incompatible first and in back porting it will always know what version its child should be. If that is not the way things are meant to work then there is a problem (I think).<o:p></o:p></p>
<p class="MsoNormal">
<o:p></o:p></p>
<p class="MsoNormal">Going back to the extensible object, what I would like to be able to do is allow the writer of a plugin to implement a nova object for data specific to that plugin, so that it can be communicated by Nova. (For example, a resource plugin
on the compute node generates resource specific data that is passed to the scheduler, where another plugin consumes it). This object will be communicated as a child of another object (e.g. the compute_node). It would be useful if the plugins at each end benefit
from the same version handling that nova does itself.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It is not reasonable to bump the version of the compute_node when new external plugin is developed. So currently the versioning seems too rigid to implement extensible/pluggable objects this way.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">A reasonable alternative might be for all objects to be deserialized individually within a tree data structure, but I’m not sure what might happen to parent/child compatability without some careful tracking.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Another might be to say that nova objects are for nova use only and that’s just tough for plugin writers!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thoughts?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Paul<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;color:gray;mso-fareast-language:EN-GB">Paul Murray<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;color:gray;mso-fareast-language:EN-GB">HP Cloud Services<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;color:gray;mso-fareast-language:EN-GB">+44 117 312 9309<br>
<br>
Hewlett-Packard Limited registered Office: Cain Road, Bracknell, Berks RG12 1HN Registered No: 690597 England. The contents of this message and any attachments to it are confidential and may be legally privileged. If you have received this message in error,
you should delete it from your system immediately and advise the sender. To any recipient of this message within HP, unless otherwise stated you should consider this message and attachments as "HP CONFIDENTIAL".</span><span lang="EN-GB" style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>