1 # Copyright (c) 2018-2019 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.
17 from yardstick.network_services.vnf_generic.vnf import agnostic_vnf
22 'vnfd:vnfd-catalog': {
24 'id': 'AgnosticVnf', # NSB python class mapping
25 'name': 'AgnosticVnf',
26 'short-name': 'AgnosticVnf',
27 'description': 'AgnosticVnf',
29 'vdu-id': 'vepcvnf-baremetal',
31 'password': 'password',
35 'id': 'vepcvnf-baremetal',
36 'name': 'vepc-vnf-baremetal',
37 'description': 'vAgnosticVnf workload',
38 'external-interface': []}],
43 class TestAgnosticVnf(unittest.TestCase):
46 self.vnfd = VNFD['vnfd:vnfd-catalog']['vnfd'][0]
47 self.agnostic_vnf = agnostic_vnf.AgnosticVnf(NAME, self.vnfd)
49 def test_instantiate(self):
50 self.assertIsNone(self.agnostic_vnf.instantiate({}, {}))
52 def test_wait_for_instantiate(self):
53 self.assertIsNone(self.agnostic_vnf.wait_for_instantiate())
55 def test_terminate(self):
56 self.assertIsNone(self.agnostic_vnf.terminate())
59 self.assertIsNone(self.agnostic_vnf.scale())
61 def test_collect_kpi(self):
62 self.assertIsNone(self.agnostic_vnf.collect_kpi())
64 def test_start_collect(self):
65 self.assertIsNone(self.agnostic_vnf.start_collect())
67 def test_stop_collect(self):
68 self.assertIsNone(self.agnostic_vnf.stop_collect())