Adds TestSecurityGroupsBasicOps created VM's security_groups check
In nova.compute.manager.ComputeManager._build_instance, there is the
following code:
if request_spec and self.is_neutron_security_groups:
security_groups = request_spec.get('security_group')
else:
security_groups = []
Which will verify this from
nova.network.security_group.openstack_driver:
def is_neutron_security_groups():
return CONF.security_group_api.lower() in ('neutron', 'quantum')
This basically means that if the Nova compute node's nova.conf
does not contain security_group_api=neutron, the created VMs
security_groups will be [], which later will be default.
This commit checks the created VM's security_groups, this way
it makes sure that the created security group rules will be
applied to the VM.
Closes-Bug: #1364015
Change-Id: I444c128b6be01e29dd95c8727b7fb676e3dc4eed
1 file changed