~rackspace-titan/nova/unittests_2_6_lp834772

« back to all changes in this revision

Viewing changes to nova/tests/api/openstack/test_server_actions.py

This branch does the final tear out of AuthManager from the main code. The NoAuth middlewares (active by default) allow a user to specify any user and project id through headers (os_api) or access key (ec2_api).

The plan is to leave the auth manager code in but mention that it is deprecated.  There is a sample paste config in ini to still allow old auth.  Immediately after the diablo release we can tear out all of the Auth related code and not support the deprecated auth anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import base64
2
2
import json
3
 
import unittest
4
 
from xml.dom import minidom
5
3
 
6
4
import stubout
7
5
import webob
8
6
 
9
7
from nova import context
10
 
from nova import db
11
8
from nova import utils
12
9
from nova import flags
13
10
from nova.api.openstack import create_instance_helper
14
 
from nova.compute import instance_types
15
11
from nova.compute import power_state
16
12
import nova.db.api
17
13
from nova import test
103
99
        super(ServerActionsTest, self).setUp()
104
100
        self.flags(verbose=True)
105
101
        self.stubs = stubout.StubOutForTesting()
106
 
        fakes.FakeAuthManager.reset_fake_data()
107
 
        fakes.FakeAuthDatabase.data = {}
108
102
        fakes.stub_out_auth(self.stubs)
109
103
        self.stubs.Set(nova.db.api, 'instance_get', return_server_by_id)
110
104
        self.stubs.Set(nova.db.api, 'instance_update', instance_update)
468
462
        self.maxDiff = None
469
463
        super(ServerActionsTestV11, self).setUp()
470
464
        self.stubs = stubout.StubOutForTesting()
471
 
        fakes.FakeAuthManager.reset_fake_data()
472
 
        fakes.FakeAuthDatabase.data = {}
473
465
        fakes.stub_out_auth(self.stubs)
474
466
        self.stubs.Set(nova.db.api, 'instance_get', return_server_by_id)
475
467
        self.stubs.Set(nova.db.api, 'instance_update', instance_update)