Esempio n. 1
0
 def test_delete_l2_gw_service(self):
     display_name = 'fake-gateway'
     node_uuid = _uuid()
     gw_id = self._create_gw_service(node_uuid, display_name)['uuid']
     nvplib.delete_l2_gw_service(self.fake_cluster, gw_id)
     results = nvplib.get_l2_gw_services(self.fake_cluster)
     self.assertEqual(len(results), 0)
Esempio n. 2
0
 def test_delete_l2_gw_service(self):
     display_name = 'fake-gateway'
     node_uuid = _uuid()
     gw_id = self._create_gw_service(node_uuid, display_name)['uuid']
     nvplib.delete_l2_gw_service(self.fake_cluster, gw_id)
     results = nvplib.get_l2_gw_services(self.fake_cluster)
     self.assertEqual(len(results), 0)
Esempio n. 3
0
 def test_list_l2_gw_service(self):
     gw_ids = []
     for name in ('fake-1', 'fake-2'):
         gw_ids.append(self._create_gw_service(_uuid(), name)['uuid'])
     results = nvplib.get_l2_gw_services(self.fake_cluster)
     self.assertEqual(len(results), 2)
     self.assertItemsEqual(gw_ids, [r['uuid'] for r in results])
Esempio n. 4
0
 def test_list_l2_gw_service(self):
     gw_ids = []
     for name in ('fake-1', 'fake-2'):
         gw_ids.append(self._create_gw_service(_uuid(), name)['uuid'])
     results = nvplib.get_l2_gw_services(self.fake_cluster)
     self.assertEqual(len(results), 2)
     self.assertEqual(sorted(gw_ids), sorted([r['uuid'] for r in results]))