Revert api_key change in novaclient Client argument
Fixes bug 891442 Also, still need to support NOVA_API_KEY environment variable for now. Bump version to 2.6.8 so we can get this into pypi Updated setup.py to build properly Change-Id: I16233ac559bf44b78666118d68975509da6bfb0d
This commit is contained in:
parent
7a179e6577
commit
0e1e38d2e4
@ -62,6 +62,10 @@ class OpenStackComputeShell(object):
|
||||
default=env('NOVA_USERNAME'),
|
||||
help='Defaults to env[NOVA_USERNAME].')
|
||||
|
||||
parser.add_argument('--apikey',
|
||||
default=env('NOVA_API_KEY'),
|
||||
help='Defaults to env[NOVA_API_KEY].')
|
||||
|
||||
parser.add_argument('--password',
|
||||
default=env('NOVA_PASSWORD'),
|
||||
help='Defaults to env[NOVA_PASSWORD].')
|
||||
@ -157,9 +161,10 @@ class OpenStackComputeShell(object):
|
||||
self.do_help(args)
|
||||
return 0
|
||||
|
||||
user, password, projectid, url, region_name, endpoint_name, insecure =\
|
||||
args.username, args.password, args.projectid, args.url, \
|
||||
args.region_name, args.endpoint_name, args.insecure
|
||||
(user, apikey, password, projectid, url, region_name,
|
||||
endpoint_name, insecure) = (args.username, args.apikey,
|
||||
args.password, args.projectid, args.url,
|
||||
args.region_name, args.endpoint_name, args.insecure)
|
||||
|
||||
if not endpoint_name:
|
||||
endpoint_name = 'publicURL'
|
||||
@ -171,10 +176,14 @@ class OpenStackComputeShell(object):
|
||||
raise exc.CommandError("You must provide a username, either"
|
||||
"via --username or via "
|
||||
"env[NOVA_USERNAME]")
|
||||
|
||||
if not password:
|
||||
raise exc.CommandError("You must provide a password, either"
|
||||
"via --password or via"
|
||||
"env[NOVA_PASSWORD]")
|
||||
if not apikey:
|
||||
raise exc.CommandError("You must provide a password, either"
|
||||
"via --password or via env[NOVA_PASSWORD]")
|
||||
else:
|
||||
password = apikey
|
||||
|
||||
if options.version and options.version != '1.0':
|
||||
if not projectid:
|
||||
raise exc.CommandError("You must provide an projectid, either"
|
||||
|
@ -25,10 +25,13 @@ class Client(object):
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, username, password, project_id, auth_url=None,
|
||||
def __init__(self, username, api_key, project_id, auth_url=None,
|
||||
insecure=False, timeout=None, token=None, region_name=None,
|
||||
endpoint_name='publicURL'):
|
||||
|
||||
# FIXME(comstud): Rename the api_key argument above when we
|
||||
# know it's not being used as keyword argument
|
||||
password = api_key
|
||||
self.accounts = accounts.AccountManager(self)
|
||||
self.backup_schedules = backup_schedules.BackupScheduleManager(self)
|
||||
self.flavors = flavors.FlavorManager(self)
|
||||
|
@ -30,9 +30,12 @@ class Client(object):
|
||||
"""
|
||||
|
||||
# FIXME(jesse): project_id isn't required to authenticate
|
||||
def __init__(self, username, password, project_id, auth_url,
|
||||
def __init__(self, username, api_key, project_id, auth_url,
|
||||
insecure=False, timeout=None, token=None, region_name=None,
|
||||
endpoint_name='publicURL'):
|
||||
# FIXME(comstud): Rename the api_key argument above when we
|
||||
# know it's not being used as keyword argument
|
||||
password = api_key
|
||||
self.flavors = flavors.FlavorManager(self)
|
||||
self.floating_ips = floating_ips.FloatingIPManager(self)
|
||||
self.images = images.ImageManager(self)
|
||||
|
4
setup.py
4
setup.py
@ -28,14 +28,14 @@ def read_file(file_name):
|
||||
|
||||
setuptools.setup(
|
||||
name="python-novaclient",
|
||||
version="2.6.7",
|
||||
version="2.6.8",
|
||||
author="Rackspace, based on work by Jacob Kaplan-Moss",
|
||||
author_email="github@racklabs.com",
|
||||
description="Client library for OpenStack Nova API.",
|
||||
long_description=read_file("README.rst"),
|
||||
license="Apache License, Version 2.0",
|
||||
url="https://github.com/openstack/python-novaclient",
|
||||
packages=["novaclient"],
|
||||
packages=["novaclient", "novaclient.v1_0", "novaclient.v1_1"],
|
||||
install_requires=requirements,
|
||||
tests_require=["nose", "mock"],
|
||||
test_suite="nose.collector",
|
||||
|
Loading…
x
Reference in New Issue
Block a user