1 # Copyright (c) 2018 Intel Corporation
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 from yardstick.network_services.vnf_generic.vnf import agnostic_vnf
23 'vnfd:vnfd-catalog': {
25 'id': 'AgnosticVnf', # NSB python class mapping
26 'name': 'AgnosticVnf',
27 'short-name': 'AgnosticVnf',
28 'description': 'AgnosticVnf',
30 'vdu-id': 'vepcvnf-baremetal',
32 'password': 'password',
36 'id': 'vepcvnf-baremetal',
37 'name': 'vepc-vnf-baremetal',
38 'description': 'vAgnosticVnf workload',
39 'external-interface': []}],
44 class TestAgnosticVnf(unittest.TestCase):
47 self._id = uuid.uuid1().int
48 self.vnfd = VNFD['vnfd:vnfd-catalog']['vnfd'][0]
49 self.agnostic_vnf = agnostic_vnf.AgnosticVnf(NAME, self.vnfd, self._id)
51 def test_instantiate(self):
52 self.assertIsNone(self.agnostic_vnf.instantiate({}, {}))
54 def test_wait_for_instantiate(self):
55 self.assertIsNone(self.agnostic_vnf.wait_for_instantiate())
57 def test_terminate(self):
58 self.assertIsNone(self.agnostic_vnf.terminate())
61 self.assertIsNone(self.agnostic_vnf.scale())
63 def test_collect_kpi(self):
64 self.assertIsNone(self.agnostic_vnf.collect_kpi())
66 def test_start_collect(self):
67 self.assertIsNone(self.agnostic_vnf.start_collect())
69 def test_stop_collect(self):
70 self.assertIsNone(self.agnostic_vnf.stop_collect())