summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchinmay <chinmaya-bharadwaj.a@hp.com>2014-06-04 20:44:06 +0530
committeryan.haifeng <haifeng.yan@hp.com>2015-06-10 01:29:49 +0000
commit737e89950b8acd7c517e526331c92514b4efc678 (patch)
treef8d96adc608f5212792c8d59f5982f4bffd37269
parente0ebb7130f252e8f359aab3d9e23856c5f12ae05 (diff)
downloadceilometer-stable/icehouse.tar.gz
Fixes ceilometer-compute service start failureicehouse-eol2014.1.5stable/icehouse
Currently ceilometer-compute service is failing to start in the 'vmware' region, because of the additional parameter 'port', is added to the oslo.vmware _get_wsdl_loc method. This patch fixes it by not calling the private method _get_wsdl_loc, avoiding the mismatch in the method call. Test cases are not added, since the changed method just calls the oslo.vmware and method is already mocked in the setUp of the class TestVsphereInspection. Change-Id: Ib70092c1ccb14421701acdf8ff4a3805becbeef4 Closes-Bug: #1326230 (cherry picked from commit ff5c133cb0f548851a8d276a31c7f38bcc9c5522)
-rw-r--r--ceilometer/compute/virt/vmware/inspector.py8
-rw-r--r--ceilometer/tests/compute/virt/vmware/test_inspector.py1
2 files changed, 2 insertions, 7 deletions
diff --git a/ceilometer/compute/virt/vmware/inspector.py b/ceilometer/compute/virt/vmware/inspector.py
index 8a891855..f3e9d81f 100644
--- a/ceilometer/compute/virt/vmware/inspector.py
+++ b/ceilometer/compute/virt/vmware/inspector.py
@@ -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
@@ -61,15 +60,12 @@ 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)
+ cfg.CONF.vmware.task_poll_interval)
return api_session
diff --git a/ceilometer/tests/compute/virt/vmware/test_inspector.py b/ceilometer/tests/compute/virt/vmware/test_inspector.py
index 56b1f351..d5ee4c85 100644
--- a/ceilometer/tests/compute/virt/vmware/test_inspector.py
+++ b/ceilometer/tests/compute/virt/vmware/test_inspector.py
@@ -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()