I am new to OpenStack.
I have gone through the document as https://docs.openstack.org/nova/wallaby/user/filter-scheduler.html suggests. But I am not getting how and where to put the code.
Do I need to install the package I created as mentioned in the document?
Kindly guide me through the process.
There are multiple steps required to add a new filter. You first need to create your own python package. You then need to install it on the system running OpenStack and add it to
enabled_filtersandavailable_filtersunder thefilter_schedulersection of the nova configuration.Assuming you create a package named
nova_filter_examplewith a filter namedRandomFilter, you would need to change yournova.confto look something like this.I created a small example example package that might help. You can find it here. It includes steps on how to deploy and test the custom filter in a devstack environment.