<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:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.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">Dan<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">,
</span>thank you<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
</span><span style="color:#1F497D">very much for pointing to nova examples.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Following these examples and also</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
</span><a href="http://wiki.openstack.org/WritingRequestExtensions">http://wiki.openstack.org/WritingRequestExtensions</a> guidelines I understand how to add extension to nova, but still has questions how to add it to Quantum.<o:p></o:p></p>
<p class="MsoNormal">Nova extensions make use of nova.api.openstack.extensions module and Quantum has its own implementation.<o:p></o:p></p>
<p class="MsoNormal">Can you please point to some documentation regarding writing Quantum extensions?  <o:p></o:p></p>
<p class="MsoNormal">Thanks a lot,<o:p></o:p></p>
<p class="MsoNormal">Irena<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Dan Wendlandt [mailto:dan@nicira.com]
<br>
<b>Sent:</b> Saturday, June 02, 2012 8:57 PM<br>
<b>To:</b> Robert Kukura<br>
<b>Cc:</b> Irena Berezovsky; Salvatore Orlando; netstack@lists.launchpad.net; openstack@lists.launchpad.net<br>
<b>Subject:</b> Re: [Netstack] question on get_network_details api call<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Irena, Bob, Salvatore, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Just catching up the thread, and looping the netstack and openstack lists in as well, as this info is general useful in my opinion.  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Our model with Quantum, like Nova, is that it is definitely ok to extend the content of a core object with additional attributes.  These attributes should be formatted properly as extended attribute, so that the "key" of the attribute is
 <extension-alias>:<attribute-name> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">This is done pretty commonly within Nova.  Two simple examples are: <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- nova/api/openstack/compute/contrib/scheduler_hints.py<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- nova/api/openstack/compute/contrib/extended_status.py<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I do not believe you need to (or should) modify the view-builder code for the core object when you want to add an extended attribute to it.  Instead, the extension framework has you write a wsgi controller specific to the extension that
 is inserted as its own stage into the wsgi request and response processing pipeline.  Thus, when the request is passed in, your code gets a chance to parse the data, and the the response is passed back, your code gets a chance to add data to it.  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Using the Nova code as example is probably the best bet if you can find a good example within quantum.  Quantum's extension framework (and several other openstack projects) all use essentially the same model. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Dan<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Sat, Jun 2, 2012 at 8:43 AM, Robert Kukura <<a href="mailto:rkukura@redhat.com" target="_blank">rkukura@redhat.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">On 06/02/2012 05:02 AM, Irena Berezovsky wrote:<br>
> Hi,<br>
> Bob, Dan,<br>
> I ran into following wiki page:<br>
> <a href="http://wiki.openstack.org/QuantumAPIExtensionsaction=AttachFile&do=view&target=quantum_api_extension.pdf" target="_blank">
http://wiki.openstack.org/QuantumAPIExtensionsaction=AttachFile&do=view&target=quantum_api_extension.pdf</a><br>
> 'port profile' is exactly what I was looking for to expose in the plugin.<br>
> I would like to add the port profile retrieval capability and contribute the implementation.<br>
><br>
> Can you please advise if there is any disagreement on getting it into core API? Shall I do it via extension?<br>
> Bob, seems that you are dealing with similar issues.<br>
> What do you suggest?<br>
><br>
> Thanks a lot,<br>
> Irena<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">Irena,<br>
<br>
I'm not sure there is any consensus around using a "network profile" for<br>
this. I did see that document as well as archived discussion about<br>
defining "port profile" and "network profile" as extensible collections<br>
of attributes. But the existing "port profile" extension looks to be<br>
Cisco-specific, and seems to serve a somewhat different purpose.<br>
<br>
My current thinking is that we'd be better off long term following the<br>
lead of Nova and other projects in supporting "extension data" within<br>
the existing resources instead of requiring introduction of a new<br>
resource just to hold plugin-specific attributes.<br>
<br>
But, in the short term, it might make the most sense for each extension<br>
just to provide its own resource extension with its attributes. That's<br>
what I'm tentatively planning to do for the provider-network blueprint,<br>
but would reconsider if there was consensus that either the "extension<br>
data" support or a more general "network profile" should be added now.<br>
<br>
-Bob<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
Dan Wendlandt <o:p></o:p></p>
<div>
<p class="MsoNormal">Nicira, Inc: <a href="http://www.nicira.com" target="_blank">www.nicira.com</a><o:p></o:p></p>
<div>
<p class="MsoNormal">twitter: danwendlandt<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>