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

« back to all changes in this revision

Viewing changes to nova/tests/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:
16
16
#    License for the specific language governing permissions and limitations
17
17
#    under the License.
18
18
 
19
 
"""Stubouts, mocks and fixtures for the test suite"""
 
19
"""Stubouts, mocks and fixtures for the test suite."""
20
20
 
21
21
from nova import db
22
22
from nova import exception
421
421
                return inst_type
422
422
        return None
423
423
 
424
 
    def fake_network_get_by_instance(context, instance_id):
425
 
        # Even instance numbers are on vlan networks
426
 
        if instance_id % 2 == 0:
427
 
            return FakeModel(vlan_network_fields)
428
 
        else:
429
 
            return FakeModel(flat_network_fields)
430
 
 
431
424
    def fake_network_get_all_by_instance(context, instance_id):
432
425
        # Even instance numbers are on vlan networks
433
426
        if instance_id % 2 == 0:
438
431
    def fake_fixed_ip_get_by_instance(context, instance_id):
439
432
        return [FakeModel(fixed_ip_fields)]
440
433
 
441
 
    funcs = [fake_network_get_by_instance,
442
 
             fake_network_get_all_by_instance,
 
434
    funcs = [fake_network_get_all_by_instance,
443
435
             fake_instance_type_get_all,
444
436
             fake_instance_type_get_by_name,
445
437
             fake_instance_type_get,