Use api_extensions to decide security_group type nova used

Even the system enables neutron, if neutron's security_group
extension is disabled, Nova can still use nova's security_group
by setting security_group_api=nova in nova.conf. So this is to
use neutron's security group only when neutron is enabled and
neutron's security_group extension is enabled.

Change-Id: Id23fdb8cd47fb0ecf0ad0b055dcbb423ff23a239
diff --git a/tempest/api/compute/security_groups/test_security_group_rules_negative.py b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
index 853ef31..4f53663 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules_negative.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules_negative.py
@@ -23,7 +23,8 @@
 
 
 def not_existing_id():
-    if CONF.service_available.neutron:
+    if (CONF.service_available.neutron and
+        test.is_extension_enabled('security-group', 'network')):
         return data_utils.rand_uuid()
     else:
         return data_utils.rand_int_id(start=999)