Switch to pypowervm standard auth model

This change set switches nova-powervm to utilize a base Session as the
authentication model for log in to the API.  This assumes that the
nova-powervm process has the right user permissions to use the API, and
that it is running on the server hosting the PowerVM API.

Change-Id: I07be4249d5ab06d95fcda85c8c6c48c67f85bcf6
This commit is contained in:
Drew Thorstensen 2015-05-04 13:27:24 -05:00
parent 2b5d62069f
commit c3b5895f76
2 changed files with 1 additions and 15 deletions

View File

@ -40,21 +40,11 @@ pvm_opts = [
default='/tmp/cfgdrv/',
help='The location where the config drive ISO files should be '
'built.'),
# TODO(kyleh) Re-evaluate these as the auth model evolves.
cfg.StrOpt('pvm_host_mtms',
default='',
help='The Model Type/Serial Number of the host server to '
'manage. Format is MODEL-TYPE*SERIALNUM. Example is '
'8286-42A*1234ABC.'),
cfg.StrOpt('pvm_server_ip',
default='localhost',
help='The IP Address hosting the PowerVM REST API'),
cfg.StrOpt('pvm_user_id',
default='',
help='The user id for authentication into the API.'),
cfg.StrOpt('pvm_pass',
default='',
help='The password for authentication into the API.'),
cfg.StrOpt('fc_attach_strategy',
default='vscsi',
help='The Fibre Channel Volume Strategy defines how FC Cinder '

View File

@ -95,11 +95,7 @@ class PowerVMDriver(driver.ComputeDriver):
LOG.info(_LI("The compute driver has been initialized."))
def _get_adapter(self):
# Decode the password
password = CONF.pvm_pass.decode('base64', 'strict')
# TODO(IBM): set cert path
self.session = pvm_apt.Session(CONF.pvm_server_ip, CONF.pvm_user_id,
password, certpath=None)
self.session = pvm_apt.Session()
self.adapter = pvm_apt.Adapter(self.session,
helpers=log_hlp.log_helper)