[Openstack] [nova][oslo.rootwrap] RegExpFilter optional parameter

Kai Brennenstuhl kai.brennenstuhl at gmail.com
Tue Jul 8 14:57:59 UTC 2014


Hi list,

I want to create a RegExpFilter (in nova/rootwrap.d) where the last
parameter is optional.
I can create a filter so that it works either with the last parameter or
without.
But I don't know how the rule has to look like so that the last parameter
is optional.

Following is in my *.filters file:

mycmd: RegExpFilter, /usr/local/bin/mycmd, root, mycmd, either|or,
anotherparam, .*
if I use the rule above there must be a 3rd parameter (no matter how it
looks like)

However if I use the following I can't call  "mycmd" with a 3rd parameter
mycmd: RegExpFilter, /usr/local/bin/mycmd, root, mycmd, either|or,
anotherparam

If I use both rules the first one is ignored.

What should I change to have a rule with an optional parameter?

Many thanks,

Kai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140708/e15d250d/attachment.html>


More information about the Openstack mailing list