~hudson-openstack/nova/trunk

« back to all changes in this revision

Viewing changes to nova/tests/vmwareapi/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:
99
99
        """Stubs out the db.instance_get_fixed_address method."""
100
100
        return '10.10.10.10'
101
101
 
102
 
    def fake_instance_type_get_all(context, inactive=0):
103
 
        return INSTANCE_TYPES
 
102
    def fake_instance_type_get_all(context, inactive=0, filters=None):
 
103
        return INSTANCE_TYPES.values()
104
104
 
105
105
    def fake_instance_type_get_by_name(context, name):
106
106
        return INSTANCE_TYPES[name]