[openstack-dev] [nova][ironic] Specs matcher and its journey through time

Joshua Harlow harlowja at fastmail.com
Mon May 9 22:14:03 UTC 2016

Hi all,

Recently jroll proposed the following into oslo.utils


This moves the spec matching (if that's what u can call it) to 
oslo.utils so that it can be shared by nova and ironic (which I think is 
a fair thing to do, although personally I don't like oslo.utils turning 
into to much of a catch-all-lib).

The process proposing that code made me start to look over exactly what 
this code is (which sort of scared me). It has some 'interesting' 
aspects of it (including the '=' operator doing >= underneath); Anyones 
that's history that I'm not sure anyone knows about...

Besides that the other thing that tweaked me about this miniature DSL 
was that it was not well defined (making it hard to understand exactly 
what it does); so therefore I made 
https://review.openstack.org/#/c/313699/ which converts this into a more 
traditional 2-step (parse, and then evaluate) process with a well 
defined grammar.

The above change uses pyparsing, and uses a traditional (and simple) BNF 
grammar variant and it passes all the current tests that exist for this 
spec DSL.

Anyways, after doing that I wanted to get any thoughts from people on 
the ML about that code, if they can see anything obviously bad about 
having more formality in the matching/spec DSL and/or other usages of 
things that I am not aware of that might be problematic.



More information about the OpenStack-dev mailing list