diff --git a/README.rst b/README.rst index 0ac9a09d9..39305c165 100644 --- a/README.rst +++ b/README.rst @@ -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. diff --git a/tests/test_http.py b/tests/test_http.py index 90062b425..9ef878e51 100644 --- a/tests/test_http.py +++ b/tests/test_http.py @@ -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 diff --git a/tests/v1_0/fakes.py b/tests/v1_0/fakes.py index 3659610c5..85381ba93 100644 --- a/tests/v1_0/fakes.py +++ b/tests/v1_0/fakes.py @@ -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) diff --git a/tests/v1_0/test_auth.py b/tests/v1_0/test_auth.py index 3f103fb9a..474bcbaff 100644 --- a/tests/v1_0/test_auth.py +++ b/tests/v1_0/test_auth.py @@ -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):