From 882a266387dfdd630f45fa5b86adb83a3df843d3 Mon Sep 17 00:00:00 2001 From: Lvov Maxim Date: Thu, 9 Jun 2011 11:57:46 +0400 Subject: [PATCH] fix errors --- novaclient/__init__.py | 4 ++-- novaclient/client.py | 2 +- novaclient/shell.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/novaclient/__init__.py b/novaclient/__init__.py index afe5de81f..8ea7c7f7e 100644 --- a/novaclient/__init__.py +++ b/novaclient/__init__.py @@ -49,7 +49,7 @@ class OpenStack(object): Create an instance with your creds:: - >>> os = OpenStack(USERNAME, API_KEY, AUTH_URL) + >>> os = OpenStack(USERNAME, API_KEY, PROJECT_ID, AUTH_URL) Then call methods on its managers:: @@ -61,7 +61,7 @@ class OpenStack(object): &c. """ - def __init__(self, username, apikey, projectid + def __init__(self, username, apikey, projectid, auth_url='https://auth.api.rackspacecloud.com/v1.0'): self.backup_schedules = BackupScheduleManager(self) self.client = OpenStackClient(username, apikey, projectid, auth_url) diff --git a/novaclient/client.py b/novaclient/client.py index 7215a0f96..06c21e44e 100644 --- a/novaclient/client.py +++ b/novaclient/client.py @@ -28,7 +28,7 @@ class OpenStackClient(httplib2.Http): USER_AGENT = 'python-novaclient/%s' % novaclient.__version__ - def __init__(self, user, apikey, projectid auth_url): + def __init__(self, user, apikey, projectid, auth_url): super(OpenStackClient, self).__init__() self.user = user self.apikey = apikey diff --git a/novaclient/shell.py b/novaclient/shell.py index 6e120d4a7..918226ffc 100644 --- a/novaclient/shell.py +++ b/novaclient/shell.py @@ -96,7 +96,7 @@ class OpenStackShell(object): default=env('NOVA_API_KEY'), help='Defaults to env[NOVA_API_KEY].') - self.parser.add_argument('--projectid', + self.parser.add_argument('--projectid', default=env('NOVA_PROJECT_ID'), help='Defaults to env[NOVA_PROJECT_ID].')