From 873ff86b025dafe54003f37c05f7223499ca19b8 Mon Sep 17 00:00:00 2001
From: Vasyl Saienko <vsaienko@mirantis.com>
Date: Fri, 9 Jun 2017 22:33:09 +0300
Subject: [PATCH] Trigger interface attach tests

This patch configures tempest trigger compute_feature_enabled/interface_attach
to run interface attach/detach tests when network interface is neutron,
and node have more than 1 NIC.

Change-Id: Ic49b6e6d04f06661ad30a7939ba8aa0684cc110e
Depends-On: I48c4706b3eb6e0a5105e463236870921d55dbd93
---
 devstack/lib/ironic | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/devstack/lib/ironic b/devstack/lib/ironic
index a43333f5a6..f94f74ab6a 100644
--- a/devstack/lib/ironic
+++ b/devstack/lib/ironic
@@ -2152,6 +2152,11 @@ function ironic_configure_tempest {
         iniset $TEMPEST_CONFIG compute flavor_ref $bm_flavor_id
         iniset $TEMPEST_CONFIG compute flavor_ref_alt $bm_flavor_id
         iniset $TEMPEST_CONFIG compute-feature-enabled disk_config False
+        if [[ "$IRONIC_NETWORK_INTERFACE" == "neutron" && $IRONIC_VM_INTERFACE_COUNT -gt 1 ]]; then
+            iniset $TEMPEST_CONFIG compute-feature-enabled interface_attach True
+        else
+            iniset $TEMPEST_CONFIG compute-feature-enabled interface_attach False
+        fi
     fi
     # NOTE(jlvillal): If IRONIC_PROVISION_NETWORK_NAME is set it means that
     # nodes are using the neutron network driver / multi-tenant networking.