[Openstack] object-oriented design in nova--room for improvement?

Chris Friesen chris.friesen at windriver.com
Thu Aug 22 02:55:42 UTC 2013


I'm pretty new to OpenStack, so maybe I'm still not grokking the overall 
design.  Feel free to tell me I'm totally full of it. :)

Anyways, I've been poking around in the code with an eye towards maybe 
extending the set of information exported by the compute nodes for use 
in scheduler filters.

I started putting together a list of areas that would need to be 
updated, and it seems like there are quite a few separate chunks of code 
all over the codebase that are aware of the details of what is exported:

LibvirtDriver class
Claim” class
ComputeNode class
compute_node_statistics() in sqlalchemy/api.py
ServiceCommands class (to show host resources)
ResourceTracker class (to track used/free resources)
Stats class
FakeDriver class
HostState class in libvirt/driver.py
json/xml stuff in nova/doc/api_samples
HostController class
make_hypervisor() in compute/plugins/v3/hypervisors.py
HypervisorStatisticsTemplate API class
HypervisorsController API class
HostController API class
SchedulerManager class

I've probably missed some, the above was generated looking for cases of 

Maybe I'm dreaming, but it seems like there should be a way to do this 
more efficiently rather than manually copying knowledge into different 
parts of the code.



More information about the Openstack mailing list