<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 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.k
        {mso-style-name:k;}
span.nf
        {mso-style-name:nf;}
span.p
        {mso-style-name:p;}
span.bp
        {mso-style-name:bp;}
span.n
        {mso-style-name:n;}
span.o
        {mso-style-name:o;}
span.s
        {mso-style-name:s;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1267420929;
        mso-list-type:hybrid;
        mso-list-template-ids:426249960 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1
        {mso-list-id:1364285967;
        mso-list-template-ids:1714858226;}
@list l1:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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"><u><span style="font-size:14.0pt;font-family:"Calibri","sans-serif"">Background:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black">When a read operation is preformed via quantum API the result of the DB query is converted into python dictionary.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:black">So we  have a function like this for each DB entity:<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" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">    </span><b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">def</span></b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><b><span style="font-size:9.0pt;font-family:Consolas;color:#990000">_make_router_dict</span></b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">(</span><span style="font-size:9.0pt;font-family:Consolas;color:#999999">self</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">,</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">router,</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">fields<b>=</b></span><span style="font-size:9.0pt;font-family:Consolas;color:#999999">None</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">):</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">        </span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">res</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">=</span></b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">{</span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'id'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">:</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">router[</span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'id'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">],</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">               </span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'name'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">:</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">router[</span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'name'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">],</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">               </span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'tenant_id'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">:</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">router[</span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'tenant_id'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">],</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">               </span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'admin_state_up'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">:</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">router[</span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'admin_state_up'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">],</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">               </span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'status'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">:</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">router[</span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'status'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">],</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">               </span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'external_gateway_info'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">:</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#999999">None</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">}</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">        </span><b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">if</span></b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">router[</span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'gw_port_id'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">]:</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">            </span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">nw_id</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">=</span></b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">router<b>.</b>gw_port[</span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'network_id'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">]</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">            </span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">res[</span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'external_gateway_info'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">]</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">=</span></b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">{</span><span style="font-size:9.0pt;font-family:Consolas;color:#DD1144">'network_id'</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">:</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">nw_id}</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:10.9pt"><span style="font-size:9.0pt;font-family:Consolas;color:#333333">        </span><b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">return</span></b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#999999">self</span><b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">.</span></b><span style="font-size:9.0pt;font-family:Consolas;color:#333333">_fields(res,</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">
</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333">fields)</span><span style="font-size:9.0pt;font-family:Consolas;color:#333333"><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"><u><span style="font-size:14.0pt;font-family:"Calibri","sans-serif"">A generic approach:<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">The idea is to have ONE ”as_dict”  function that will get the DB object plus meta data that explains how to “dict it”.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">What we gain here:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]><span dir="LTR"></span>We have the mapping of the DB objects to dicts in one central location (See  the Appendix below)<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo2"><![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]><span dir="LTR"></span>All “_make_XYZ_dict” functions are gone and no need to write them in the future<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">So we created this configuration and a generic function that does the “magic”.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">We have also created 9 unit tests  that use the current quantum as_dict functions in one hand and the generic as_dict function on the other hand.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Code is here:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a href="https://www.dropbox.com/s/d9qx16r6ocp4veo/db2dict.py"><span style="color:windowtext">https://www.dropbox.com/s/d9qx16r6ocp4veo/db2dict.py</span></a> (please ignore
 alignment issues – the code needs cleanup)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">You can actually run it – just put it under quantum/db<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Avishay<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">Appendix<o:p></o:p></span></u></b></p>
<p class="MsoNormal"><b><u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4"><o:p><span style="text-decoration:none"> </span></o:p></span></u></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">MODEL_TO_API_MAP =  {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">    "quantum.db.l3_db.Router":["id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">                "name",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">                "tenant_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">                "admin_state_up",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">                "status",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">                {"external_gateway_info":{"gw_port":["network_id"]}}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">               ],
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">    "quantum.db.models_v2.Network":["id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">               "name",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">               "tenant_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">               "admin_state_up",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">               "status",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">               "shared",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">               {"subnets":["id"]},<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">               ],<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">    "quantum.db.models_v2.Subnet":["id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              "name",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              "tenant_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              "network_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              "ip_version",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              "cidr",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              {"allocation_pools":[{"start":"first_ip"},{"end":"last_ip"}]},<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              "gateway_ip",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              "enable_dhcp",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              {"dns_nameservers":["address"]},<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              {"host_routes":{"routes":["destination","nexthop"]}}, 
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              "shared",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              "gateway_ip"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">              ],<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">    "quantum.db.models_v2.Port":["id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">            "name",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">            "tenant_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">            "network_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">            "admin_state_up",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">            "mac_address",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">            "status",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">            {"fixed_ips":["subnet_id","ip_address"]},
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">            "device_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">            "device_owner"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           ],<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">  "quantum.db.l3_db.FloatingIP" : ["id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "tenant_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "floating_ip_address",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "floating_network_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "router_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           {"port_id":"fixed_port_id"},<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "fixed_ip_address"
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           ],<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">  "quantum.db.securitygroups_db.SecurityGroup" : ["id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "tenant_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "name",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "description",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "external_id"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           ],<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">  "quantum.db.securitygroups_db.SecurityGroupRule" : ["id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "tenant_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "external_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "security_group_id",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "ethertype",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "direction",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "protocol",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "port_range_min",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "port_range_max",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "source_ip_prefix",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           "source_group_id" 
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">           ]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#548DD4"><o:p> </o:p></span></p>
</div>
</body>
</html>