From 859500cd62ec16090c808c877aa222d8aafa5fe3 Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Wed, 13 Jun 2018 11:39:06 +0800 Subject: Add test_get_hpa_dpdk Add test_get_hpa_dpdk Change-Id: I84ed1380b0870ab9beb24320b826ce9bb75e2dfc Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn --- vio/vio/tests/test_aai_client.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vio/vio/tests/test_aai_client.py b/vio/vio/tests/test_aai_client.py index 17a0047..fa83d5d 100644 --- a/vio/vio/tests/test_aai_client.py +++ b/vio/vio/tests/test_aai_client.py @@ -10,6 +10,7 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +import json import mock import unittest @@ -365,3 +366,13 @@ class TestAAIClient(unittest.TestCase): } ret = self.view._get_pci_passthrough_capabilities(extra) self.assertEqual(3, len(ret["hpa-feature-attributes"])) + + @mock.patch.object(restcall, "call_req") + def test_get_hpa_dpdk(self, mock_call): + self.view.get_vim = mock.MagicMock() + self.view.get_vim.return_value = { + "cloud-extra-info": json.dumps({'ovsDpdk': { + 'libname': 'generic', 'libversion': '17.04'}}) + } + ret = self.view._get_ovsdpdk_capabilities() + self.assertEqual(1, len(ret["hpa-feature-attributes"])) -- cgit 1.2.3-korg ublin'>dublin ARCHIVED- 2022-02-15 at the request of the projectGrokmirror user
summaryrefslogtreecommitdiffstats
blob: 921ea4fcaa5fa25fd01d76ac45489e5dc9e3cf95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36