<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 11, 2012, at 11:41 AM, Christian Parpart wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi all,<div><br></div><div>while I am still "somewhat" new to OpenStack, I was able to successfully deploy a 6-node OpenStack setup</div><div>with 4 compute nodes, one controller node (yet to be HA'd) and one network node (yet to be HA'd).</div>
<div><br></div><div>However, now, that I am that far, I am in need to create a custom filter, due to the companies requirements</div><div>on what VMs to put on what hardware.</div><div>Unfortunately, I am not yet that experienced in Python (know quite a few others, so I shouldn't have </div>
<div>it that hard in getting into) and I - of course - don't know the Nova API as well as you do.</div><div><br></div><div>So I am looking for a complete basic Hello World Filter Scheduler example, e.g. in form of a github repo,</div>
<div>that I can fork off, and improve it, and learn Nova by doing.</div><div><br></div><div>I could not really find anything that helpful yet, and I think it might be a wonderful entry-point for</div><div>quite a few of us.</div>
<div><br></div><div>Is there anyone willing to help us here out a bit?</div><div><br></div><div>Many many thanks,</div><div>Christian Parpart.</div>
_______________________________________________<br></blockquote><br></div><div>Christian:</div><div><br></div><div>The admin docs have a chapter on scheduling that discusses the filter scheduler: <a href="http://docs.openstack.org/essex/openstack-compute/admin/content/ch_scheduling.html">http://docs.openstack.org/essex/openstack-compute/admin/content/ch_scheduling.html</a></div><div><br></div><div>It's from a user's point, not a developer, but it does describe what all of the built-in filters do. You should be able to look at the corresponding code and see what they do pretty easily.</div><div><br></div><div>Check out the nova/scheduler/filters directory which has the implementation of the existing filters: <a href="https://github.com/openstack/nova/tree/master/nova/scheduler/filters">https://github.com/openstack/nova/tree/master/nova/scheduler/filters</a></div><div><br></div><div>The simplest filter is the AllHostsFilter, which doesn't filter anything at all: <a href="https://github.com/openstack/nova/blob/master/nova/scheduler/filters/all_hosts_filter.py">https://github.com/openstack/nova/blob/master/nova/scheduler/filters/all_hosts_filter.py</a></div><br><div><br></div><div><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Take care,</div><div><br></div><div>Lorin</div><div>--</div><div>Lorin Hochstein</div><div>Lead Architect - Cloud Services</div><div>Nimbis Services, Inc.</div><div><a href="https://www.nimbisservices.com/">www.nimbisservices.com</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline"></div></div></body></html>