[Openstack] Experimenting with additional field for JSON filter

Heng Xu shouhengzhang.xu at mail.utoronto.ca
Mon Aug 13 17:14:22 UTC 2012


Hello my friends,

I was trying to experiment with some of the scheduler’s functionality, as a mock-up, I was trying to augment the JSON filter’s functionality, JSON filter can filter anything in HostState class’s member fields, and I was trying to get the ID of a compute node, as in the compute_nodes table in the database, I added

self.currentid = 0

in __init__ method in HostState class, and added

databaseid = compute[‘id’]
self.currentid = databaseid

in update_from_compute_node method in HostState class, then in the hope that I can specify an id when pass a hint to JSON filter

nova boot –image 827d564a-e636-4fc4-a376-d36f7ebe1747 –flavor 1 –hint query=’[“=”,”$currentid”,1]’ server1

however, it always gives me an error on scheduling, I guess the scheduler could not find a compute node with id 1, but I just could not figure out, what is missing. Any thought and help is greatly appreciated.
Thanks
Heng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120813/ca1a4fb3/attachment.html>


More information about the Openstack mailing list