Merge "Remove the duplicate flavor disable check"
This commit is contained in:
commit
b3c8d17270
@ -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)
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user