Quick review: in nova/compute/api.py:_create_instance we do:
security_groups = security_groups or ['default']
This value seems to propagate unmolested to the code in question, suggesting that, when called from this path at least, security_groups will never be empty.
Quick review: in nova/compute/ api.py: _create_ instance we do:
This value seems to propagate unmolested to the code in question, suggesting that, when called from this path at least, security_groups will never be empty.