Пример #1
0
 def test_create_nsd(self):
     nsd_obj = utils.get_dummy_nsd_obj()
     with patch.object(TackerManager, 'get_service_plugins') as \
             mock_plugins:
         mock_plugins.return_value = {'VNFM': FakeVNFMPlugin()}
         result = self.nfvo_plugin.create_nsd(self.context, nsd_obj)
         self.assertIsNotNone(result)
         self.assertEqual(result['name'], 'dummy_NSD')
Пример #2
0
 def test_create_nsd(self):
     nsd_obj = utils.get_dummy_nsd_obj()
     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()
         result = self.nfvo_plugin.create_nsd(self.context, nsd_obj)
         self.assertIsNotNone(result)
         self.assertEqual(result['name'], 'dummy_NSD')
Пример #3
0
 def test_create_nsd(self):
     nsd_obj = utils.get_dummy_nsd_obj()
     with patch.object(TackerManager, 'get_service_plugins') as \
             mock_plugins:
         mock_plugins.return_value = {'VNFM': FakeVNFMPlugin()}
         result = self.nfvo_plugin.create_nsd(self.context, nsd_obj)
         self.assertIsNotNone(result)
         self.assertEqual('dummy_NSD', result['name'])
         self.assertIn('id', result)
         self.assertEqual('dummy nsd description', result['description'])
         self.assertEqual('8819a1542a5948b68f94d4be0fd50496',
                          result['tenant_id'])
         self.assertIn('attributes', result)
         self.assertIn('created_at', result)
         self.assertIn('updated_at', result)