3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # pylint: disable=missing-docstring
15 from functest.core import vnf
16 from functest.opnfv_tests.vnf.ims import cloudify_ims
19 class CloudifyImsTesting(unittest.TestCase):
23 self.tenant = 'cloudify_ims'
24 self.creds = {'username': 'user',
26 self.orchestrator = {'name': 'cloudify',
29 'requirements': {'flavor': {'name': 'm1.medium',
31 'os_image': 'manager_4.0'}}
33 self.vnf = {'name': 'clearwater',
34 'descriptor': {'version': '108',
35 'file_name': 'openstack-blueprint.yaml',
36 'name': 'clearwater-opnfv',
38 'requirements': {'flavor':
42 with mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.'
44 mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.'
45 'get_config', return_value={
46 'tenant_images': 'foo',
47 'orchestrator': self.orchestrator,
50 'version': 'whatever'}):
52 self.ims_vnf = cloudify_ims.CloudifyIms()
54 self.images = {'image1': 'url1',
56 self.details = {'orchestrator': {'status': 'PASS', 'duration': 120},
60 def test_prepare_missing_param(self):
61 with self.assertRaises(vnf.VnfPreparationException):
62 self.ims_vnf.prepare()
65 if __name__ == "__main__":
66 logging.disable(logging.CRITICAL)
67 unittest.main(verbosity=2)