Merge "Fixes ceilometer-compute service start failure"

This commit is contained in:
Jenkins 2014-06-22 17:31:57 +00:00 committed by Gerrit Code Review
commit a430fb923d
2 changed files with 8 additions and 7 deletions

View File

@ -17,7 +17,6 @@
from oslo.config import cfg
from oslo.vmware import api
from oslo.vmware import vim
from ceilometer.compute.virt import inspector as virt_inspector
from ceilometer.compute.virt.vmware import vsphere_operations
@ -43,7 +42,12 @@ OPTS = [
cfg.FloatOpt('task_poll_interval',
default=0.5,
help='Sleep time in seconds for polling an ongoing async '
'task')
'task'),
cfg.StrOpt('wsdl_location',
help='Optional vim service WSDL location '
'e.g http://<server>/vimService.wsdl. '
'Optional over-ride to default location for bug '
'work-arounds'),
]
cfg.CONF.register_group(opt_group)
@ -60,15 +64,13 @@ VC_DISK_WRITE_REQUESTS_RATE_CNTR = "disk:numberWriteAveraged:average"
def get_api_session():
hostIp = cfg.CONF.vmware.host_ip
wsdl_loc = vim.Vim._get_wsdl_loc("https", hostIp)
api_session = api.VMwareAPISession(
hostIp,
cfg.CONF.vmware.host_ip,
cfg.CONF.vmware.host_username,
cfg.CONF.vmware.host_password,
cfg.CONF.vmware.api_retry_count,
cfg.CONF.vmware.task_poll_interval,
wsdl_loc=wsdl_loc)
wsdl_loc=cfg.CONF.vmware.wsdl_location)
return api_session

View File

@ -31,7 +31,6 @@ class TestVsphereInspection(test.BaseTestCase):
api_session = api.VMwareAPISession("test_server", "test_user",
"test_password", 0, None,
create_session=False)
api_session._vim = mock.MagicMock()
vsphere_inspector.get_api_session = mock.Mock(
return_value=api_session)
self._inspector = vsphere_inspector.VsphereInspector()