[Kimchi-devel] [PATCH] [Kimchi 2/2] Enhancement to /plugins/kimchi/interfaces

sureshab at linux.vnet.ibm.com sureshab at linux.vnet.ibm.com
Tue Aug 30 10:20:11 UTC 2016


From: Suresh Babu Angadi <sureshab at in.ibm.com>

modified api calls to /plugins/kimchi/interfaces?_inuse=false
in test cases which were referring /plugins/kimchi/interfaces
to create virtual network

Signed-off-by: Suresh Babu Angadi <sureshab at in.ibm.com>
---
 tests/test_mock_network.py  | 4 ++--
 tests/test_model_network.py | 4 ++--
 tests/test_template.py      | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/test_mock_network.py b/tests/test_mock_network.py
index 3a2ca64..6fed641 100644
--- a/tests/test_mock_network.py
+++ b/tests/test_mock_network.py
@@ -69,8 +69,8 @@ class MockNetworkTests(unittest.TestCase):
         # Verify the current system has at least one interface to create a
         # bridged network
         interfaces = json.loads(
-            self.request('/plugins/kimchi/interfaces?type=nic').read()
-        )
+            self.request(
+                '/plugins/kimchi/interfaces?_inuse=false&type=nic').read())
         if len(interfaces) > 0:
             iface = interfaces[0]['name']
             _do_network_test(self, model, {'name': u'vlan-tagged-bridge',
diff --git a/tests/test_model_network.py b/tests/test_model_network.py
index 89c9f7d..3717c94 100644
--- a/tests/test_model_network.py
+++ b/tests/test_model_network.py
@@ -156,8 +156,8 @@ class NetworkTests(unittest.TestCase):
         # Verify the current system has at least one interface to create a
         # bridged network
         interfaces = json.loads(
-            self.request('/plugins/kimchi/interfaces?type=nic').read()
-        )
+            self.request(
+                '/plugins/kimchi/interfaces?_inuse=false&type=nic').read())
         if len(interfaces) > 0:
             iface = interfaces[0]['name']
             networks.append({'name': u'macvtap-network',
diff --git a/tests/test_template.py b/tests/test_template.py
index c0ca14f..727a354 100644
--- a/tests/test_template.py
+++ b/tests/test_template.py
@@ -370,8 +370,8 @@ class TemplateTests(unittest.TestCase):
         # Verify the current system has at least one interface to create a
         # bridged network
         interfaces = json.loads(
-            self.request('/plugins/kimchi/interfaces?type=nic').read()
-        )
+            self.request(
+                '/plugins/kimchi/interfaces?_inuse=false&type=nic').read())
         if len(interfaces) > 0:
             iface = interfaces[0]['name']
             networks.append({'name': u'bridge-network',
-- 
1.8.3.1




More information about the Kimchi-devel mailing list