flags.DEFINE_list('default_log_levels', ['amqplib=WARN', 'sqlalchemy=WARN', 'boto=WARN', 'eventlet.wsgi.server=WARN'], 'list of logger=LEVEL pairs')
I think that is a good pattern to follow. Your argument ends up looking like
--zone_capabilities=hypervisor=xenserver,os=linux
You'll end up with the list
['hypervisor=xenserver', 'os=linux']
You're definitely treating it as a list by splitting and iterating over it, so DEFINE_list seems reasonable. Based on your comments it looks like you might specify multiple values for any individual capability, in which case using a comma would break the flag list, maybe using a colon as the item separator would be reasonable?
From nova/flags.py:
flags.DEFINE_ list('default_ log_levels' ,
['amqplib= WARN',
'sqlalchem y=WARN' ,
'boto= WARN',
'eventlet. wsgi.server= WARN'],
'list of logger=LEVEL pairs')
I think that is a good pattern to follow. Your argument ends up looking like
--zone_ capabilities= hypervisor= xenserver, os=linux
You'll end up with the list
['hypervisor= xenserver' , 'os=linux']
You're definitely treating it as a list by splitting and iterating over it, so DEFINE_list seems reasonable. Based on your comments it looks like you might specify multiple values for any individual capability, in which case using a comma would break the flag list, maybe using a colon as the item separator would be reasonable?