<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<span id="OLK_SRC_BODY_SECTION">
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
<br>
</div>
<div>Put it in this way, it also makes sense. But I think I need to see it translated in code to figure it out properly. Anyway, this is something which pertains the base classes rather than the reference driver.</div>
<div>I think from the perspective of the reference driver we should just raise if a "AnyAddressRequest" is sent for a subnet where addresses are supposed to be autogenerated, because the ipam driver won't generate the address.</div>
<div> </div>
</div>
</div>
</div>
</blockquote>
</span>
<div><br>
</div>
<div>Makes sense.</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div><br>
</div>
<div>Hmm. How dynamic is Python? I know in Ruby I could do something like this at class load time:</div>
<div><br>
</div>
<div>config.use_ipam ? DbBasePluginV2 = IpamDbBasePluginV2 : DbBasePluginV2 = LegacyDbBasePluginV2</div>
<div><br>
</div>
<div>and all the subclasses would work fine as before...</div>
</div>
</blockquote>
<div><br>
</div>
<div>Technically yes.</div>
<div>From a practical perspective however if the subclass is assuming that create_port works in the "old" way, and then instead is working in the "ipam" way, it might be mayhem!</div>
<div> </div>
</div>
</div>
</div>
</blockquote>
</span>
<div><br>
</div>
<div>Yes, certainly. But it provides a transition period for plugins to migrate to support the new IPAM model.</div>
</body>
</html>