Allow filtering of the port chain list by id

Change-Id: I2d81c3836fe0b0d1ad9429922b59d42b4eab68f3
Signed-off-by: schillinge <ablu@mail.uni-paderborn.de>
diff --git a/src/emuvim/test/unittests/test_openstack.py b/src/emuvim/test/unittests/test_openstack.py
index a9273fb..93d7f4a 100755
--- a/src/emuvim/test/unittests/test_openstack.py
+++ b/src/emuvim/test/unittests/test_openstack.py
@@ -917,9 +917,18 @@
         url = "http://0.0.0.0:19696/v2.0/sfc/port_pairs"
         pp_list_resp = requests.get(url, headers=headers)
         self.assertEqual(pp_list_resp.status_code, 200)
+        pp_list = json.loads(pp_list_resp.content)["port_pairs"]
         # only pp1 and pp2 should be left
-        self.assertEqual(
-            len(json.loads(pp_list_resp.content)["port_pairs"]), 2)
+        self.assertEqual(len(pp_list), 2)
+
+        print('->>>>>>> test Neutron SFC Port Pair List filtered by id ->>>>>>>>>>>>>>>')
+        print('->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')
+        url = "http://0.0.0.0:19696/v2.0/sfc/port_pairs?id=%s" % pp_list[0]["id"]
+        pp_list_filtered_by_id_resp = requests.get(url, headers=headers)
+        pp_list_filtered_by_id = json.loads(pp_list_filtered_by_id_resp.content)["port_pairs"]
+        self.assertEqual(pp_list_filtered_by_id_resp.status_code, 200)
+        self.assertEqual(len(pp_list_filtered_by_id), 1)
+        self.assertEqual(pp_list_filtered_by_id[0], pp_list[0])
 
         print('->>>>>>> test Neutron SFC Port Pair Show ->>>>>>>>>>>>>>>')
         print('->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>')