~hudson-openstack/nova/trunk

« back to all changes in this revision

Viewing changes to nova/tests/db/fakes.py

  • Committer: Tarmac
  • Author(s): Rick Harris
  • Date: 2011-09-22 16:42:20 UTC
  • mfrom: (1590.1.11 flavor_min_filter)
  • Revision ID: tarmac-20110922164220-ndscikwberuj3c7f
This patch adds flavor filtering, specifically the ability to flavor on minRam, minDisk, or both, per the 1.1 OSAPI spec.

In addition, this patch refactors instance_type_get_all to return a *list* of instance_types instead of a *dict*. This makes it more consistent with the rest of the DB API.

Show diffs side-by-side

added added

removed removed

Lines of Context:
411
411
                       'address_v6': 'fe80::a00:3',
412
412
                       'network_id': 'fake_flat'}
413
413
 
414
 
    def fake_instance_type_get_all(context, inactive=0):
415
 
        return INSTANCE_TYPES
 
414
    def fake_instance_type_get_all(context, inactive=0, filters=None):
 
415
        return INSTANCE_TYPES.values()
416
416
 
417
417
    def fake_instance_type_get_by_name(context, name):
418
418
        return INSTANCE_TYPES[name]