Exemplo n.º 1
0
 def test_create_vnffg_template_param_not_parse(self):
     with patch.object(TackerManager, 'get_service_plugins') as \
             mock_plugins:
         mock_plugins.return_value = {'VNFM': FakeVNFMPlugin()}
         self._insert_dummy_vnffg_multi_param_template()
         vnffg_obj = utils.get_dummy_vnffg_param_obj()
         self.assertRaises(nfvo.VnffgTemplateParamParsingException,
                           self.nfvo_plugin.create_vnffg,
                           self.context, vnffg_obj)
Exemplo n.º 2
0
 def test_create_vnffg_param_values(self):
     with patch.object(TackerManager, 'get_service_plugins') as \
             mock_plugins:
         mock_plugins.return_value = {'VNFM': FakeVNFMPlugin()}
         mock.patch('tacker.common.driver_manager.DriverManager',
                    side_effect=FakeDriverManager()).start()
         self._insert_dummy_vnffg_param_template()
         vnffg_obj = utils.get_dummy_vnffg_param_obj()
         result = self.nfvo_plugin.create_vnffg(self.context, vnffg_obj)
         self.assertIsNotNone(result)
         self.assertIn('id', result)
         self.assertIn('status', result)
         self.assertEqual('PENDING_CREATE', result['status'])
         self._driver_manager.invoke.assert_called_with(mock.ANY, mock.ANY,
                                                        name=mock.ANY,
                                                        vnfs=mock.ANY,
                                                        fc_id=mock.ANY,
                                                        auth_attr=mock.ANY,
                                                        symmetrical=mock.ANY
                                                        )