few missing references to api_key

This commit is contained in:
Sandy Walsh 2011-11-09 07:18:22 -08:00
parent cdde0d22cd
commit 00f05317ef
4 changed files with 11 additions and 11 deletions

View File

@ -36,7 +36,7 @@ Installing this package gets you a shell command, ``nova``, that you
can use to interact with any Rackspace compatible API (including OpenStack).
You'll need to provide your OpenStack username and API key. You can do this
with the ``--username``, ``--apikey`` and ``--projectid`` params, but it's easier to just
with the ``--username``, ``--password`` and ``--projectid`` params, but it's easier to just
set them as environment variables::
export NOVA_USERNAME=openstack
@ -62,7 +62,7 @@ can specify the one you want with ``--region_name`` (or
You'll find complete documentation on the shell by running
``nova help``::
usage: nova [--username USERNAME] [--apikey APIKEY] [--projectid PROJECTID]
usage: nova [--username USERNAME] [--password PASSWORD] [--projectid PROJECTID]
[--url URL] [--version VERSION] [--region_name NAME]
[--endpoint_name NAME]
<subcommand> ...
@ -142,8 +142,8 @@ You'll find complete documentation on the shell by running
Optional arguments:
--username USERNAME Defaults to env[NOVA_USERNAME].
--apikey PASSWORD Defaults to env[NOVA_PASSWORD].
--apikey PROJECTID Defaults to env[NOVA_PROJECT_ID].
--password PASSWORD Defaults to env[NOVA_PASSWORD].
--projectid PROJECTID Defaults to env[NOVA_PROJECT_ID].
--url AUTH_URL Defaults to env[NOVA_URL] or
https://auth.api.rackspacecloud.com/v1.0
if undefined.

View File

@ -12,7 +12,7 @@ mock_request = mock.Mock(return_value=(fake_response, fake_body))
def get_client():
cl = client.HTTPClient("username", "apikey",
cl = client.HTTPClient("username", "password",
"project_id", "auth_test")
return cl

View File

@ -10,7 +10,7 @@ from tests import fakes
class FakeClient(fakes.FakeClient, client.Client):
def __init__(self, *args, **kwargs):
client.Client.__init__(self, 'username', 'apikey',
client.Client.__init__(self, 'username', 'password',
'project_id', 'auth_url')
self.client = FakeHTTPClient(**kwargs)

View File

@ -9,7 +9,7 @@ from tests import utils
class AuthenticationTests(utils.TestCase):
def test_authenticate_success(self):
cs = client.Client("username", "apikey", "project_id")
cs = client.Client("username", "password", "project_id")
management_url = 'https://servers.api.rackspacecloud.com/v1.0/443470'
auth_response = httplib2.Response({
'status': 204,
@ -23,7 +23,7 @@ class AuthenticationTests(utils.TestCase):
cs.client.authenticate()
headers = {
'X-Auth-User': 'username',
'X-Auth-Key': 'apikey',
'X-Auth-Key': 'password',
'X-Auth-Project-Id': 'project_id',
'User-Agent': cs.client.USER_AGENT
}
@ -37,7 +37,7 @@ class AuthenticationTests(utils.TestCase):
test_auth_call()
def test_authenticate_failure(self):
cs = client.Client("username", "apikey", "project_id")
cs = client.Client("username", "password", "project_id")
auth_response = httplib2.Response({'status': 401})
mock_request = mock.Mock(return_value=(auth_response, None))
@ -48,7 +48,7 @@ class AuthenticationTests(utils.TestCase):
test_auth_call()
def test_auth_automatic(self):
cs = client.Client("username", "apikey", "project_id")
cs = client.Client("username", "password", "project_id")
http_client = cs.client
http_client.management_url = ''
mock_request = mock.Mock(return_value=(None, None))
@ -63,7 +63,7 @@ class AuthenticationTests(utils.TestCase):
test_auth_call()
def test_auth_manual(self):
cs = client.Client("username", "apikey", "project_id")
cs = client.Client("username", "password", "project_id")
@mock.patch.object(cs.client, 'authenticate')
def test_auth_call(m):