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
diff --git a/tempest/scenario/test_security_groups_basic_ops.py b/tempest/scenario/test_security_groups_basic_ops.py
index 188dea8..6c36034 100644
--- a/tempest/scenario/test_security_groups_basic_ops.py
+++ b/tempest/scenario/test_security_groups_basic_ops.py
@@ -241,7 +241,11 @@
             'security_groups': security_groups,
             'tenant_id': tenant.creds.tenant_id
         }
-        return self.create_server(name=name, create_kwargs=create_kwargs)
+        server = self.create_server(name=name, create_kwargs=create_kwargs)
+        self.assertEqual(
+            sorted([s['name'] for s in security_groups]),
+            sorted([s['name'] for s in server['security_groups']]))
+        return server
 
     def _create_tenant_servers(self, tenant, num=1):
         for i in range(num):