~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/tests/vmwareapi/db_fakes.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman
  • Date: 2013-02-22 09:27:29 UTC
  • mfrom: (1.1.68)
  • Revision ID: package-import@ubuntu.com-20130222092729-nn3gt8rf97uvts77
Tags: 2013.1.g3-0ubuntu1
[ Chuck Short ]
* New usptream release. 
* debian/patches/debian/patches/fix-ubuntu-tests.patch: Refreshed.
* debian/nova-baremetal.logrotate: Fix logfile path.
* debian/control, debian/nova-spiceproxy.{install, logrotate, upstart}:
  Add spice html5 proxy support.
* debian/nova-novncproxy.upstart: Start on runlevel [2345]
* debian/rules: Call testr directly since run_tests.sh -N gives weird return
  value when tests pass.
* debian/pyddist-overrides: Add websockify.
* debian/nova-common.postinst: Removed config file conversion, since
  the option is no longer available. (LP: #1110567)
* debian/control: Add python-pyasn1 as a dependency.
* debian/control: Add python-oslo-config as a dependency.
* debian/control: Suggest sysfsutils, sg3-utils, multipath-tools for fibre
  channel support.

[ Adam Gandelman ]
* debian/control: Fix typo (websocikfy -> websockify).

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
            }
82
82
        return FakeModel(base_options)
83
83
 
84
 
    def fake_network_get_by_instance(context, instance_id):
85
 
        """Stubs out the db.network_get_by_instance method."""
86
 
 
87
 
        fields = {
88
 
            'bridge': 'vmnet0',
89
 
            'netmask': '255.255.255.0',
90
 
            'gateway': '10.10.10.1',
91
 
            'broadcast': '10.10.10.255',
92
 
            'dns1': 'fake',
93
 
            'vlan': 100}
94
 
        return FakeModel(fields)
95
 
 
96
84
    def fake_instance_type_get_all(context, inactive=0, filters=None):
97
85
        return INSTANCE_TYPES.values()
98
86
 
100
88
        return INSTANCE_TYPES[name]
101
89
 
102
90
    stubs.Set(db, 'instance_create', fake_instance_create)
103
 
    stubs.Set(db, 'network_get_by_instance', fake_network_get_by_instance)
104
91
    stubs.Set(db, 'instance_type_get_all', fake_instance_type_get_all)
105
92
    stubs.Set(db, 'instance_type_get_by_name', fake_instance_type_get_by_name)