~soren/nova/lp658257

« back to all changes in this revision

Viewing changes to nova/tests/api/rackspace/test_servers.py

  • Committer: Tarmac
  • Author(s): mdietz, Cerberus
  • Date: 2010-10-05 20:13:50 UTC
  • mfrom: (314.1.10 api_cleanup)
  • Revision ID: hudson@openstack.org-20101005201350-pvsadn9xek9bi23h
Cleanup around the rackspace API for the ec2 to internal_id transition

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        fakes.stub_out_key_pair_funcs(self.stubs)
62
62
        fakes.stub_out_image_service(self.stubs)
63
63
        self.stubs.Set(nova.db.api, 'instance_get_all', return_servers)
64
 
        self.stubs.Set(nova.db.api, 'instance_get_by_ec2_id', return_server)
 
64
        self.stubs.Set(nova.db.api, 'instance_get_by_internal_id', return_server)
65
65
        self.stubs.Set(nova.db.api, 'instance_get_all_by_user', 
66
66
            return_servers)
67
67
 
93
93
 
94
94
        def instance_create(context, inst):
95
95
            class Foo(object):
96
 
                ec2_id = 1
 
96
                internal_id = 1
97
97
            return Foo()
98
98
 
99
99
        def fake_method(*args, **kwargs):
112
112
        self.stubs.Set(nova.db.api, 'instance_update',
113
113
            server_update)
114
114
        self.stubs.Set(nova.db.api, 'queue_get_for', queue_get_for)
115
 
        self.stubs.Set(nova.network.manager.FlatManager, 'allocate_fixed_ip',
 
115
        self.stubs.Set(nova.network.manager.VlanManager, 'allocate_fixed_ip',
116
116
            fake_method)
117
117
            
118
118
        fakes.stub_out_id_translator(self.stubs)