diff --git a/mogan/engine/api.py b/mogan/engine/api.py index 31b43dc0..6e645107 100644 --- a/mogan/engine/api.py +++ b/mogan/engine/api.py @@ -82,8 +82,6 @@ class API(object): requested_networks, user_data, key_name, max_count): """Verify all the input parameters""" - if flavor['disabled']: - raise exception.FlavorNotFound(flavor_id=flavor['uuid']) if user_data: l = len(user_data) diff --git a/mogan/tests/unit/engine/test_engine_api.py b/mogan/tests/unit/engine/test_engine_api.py index 80976803..d662a3fc 100644 --- a/mogan/tests/unit/engine/test_engine_api.py +++ b/mogan/tests/unit/engine/test_engine_api.py @@ -70,26 +70,6 @@ class ComputeAPIUnitTest(base.DbTestCase): self.assertEqual('test_az', base_opts['availability_zone']) self.assertIsNone(key_pair) - def test__validate_and_build_base_options_flavor_disabled(self): - flavor = self._create_flavor() - flavor.disabled = True - flavor.save() - - self.assertRaises( - exception.FlavorNotFound, - self.engine_api._validate_and_build_base_options, - self.context, - flavor, - 'fake-uuid', - 'fake-name', - 'fake-descritpion', - 'test_az', - {'k1', 'v1'}, - [{'uuid': 'fake'}], - None, - None, - 1) - @mock.patch('mogan.network.api.get_client') def test__check_requested_networks(self, mock_get_client): mock_get_client.return_value = mock.MagicMock()