Update the init of the collector to take in a conf

In the Ocata release, there is a new conf variable that is passed
into the collector.  This is generally used by the libvirt collector
at the moment.  It is not needed by the PowerVM collector, but the
__init__ signature needs to be updated to take it in.  This change
brings the PowerVM collector in line with the base requirements from
the core ceilometer project.

Change-Id: Ib5620f6830949f50939d07ba07be900a5451df56
This commit is contained in:
Drew Thorstensen 2016-11-09 22:07:48 -05:00
parent 95c7897367
commit 1c69b80258
2 changed files with 4 additions and 4 deletions

View File

@ -40,8 +40,8 @@ class PowerVMInspector(virt_inspector.Inspector):
Utilizes the pypowervm library to gather the instance metrics.
"""
def __init__(self):
super(PowerVMInspector, self).__init__()
def __init__(self, conf):
super(PowerVMInspector, self).__init__(conf)
# Build the adapter. May need to attempt the connection multiple times
# in case the REST server is starting.

View File

@ -42,7 +42,7 @@ class TestPowerVMInspectorInit(base.BaseTestCase):
mock_get_host_uuid.return_value = 'host_uuid'
# Invoke
inspector = p_inspect.PowerVMInspector()
inspector = p_inspect.PowerVMInspector(None)
# Validate
mock_session.assert_called_once_with(conn_tries=300)
@ -76,7 +76,7 @@ class TestPowerVMInspector(base.BaseTestCase):
with mock.patch('ceilometer_powervm.compute.virt.powervm.inspector.'
'PowerVMInspector._get_host_uuid'):
# Create the inspector
self.inspector = p_inspect.PowerVMInspector()
self.inspector = p_inspect.PowerVMInspector(None)
self.inspector.vm_metrics = self.mock_metrics
def test_inspect_cpus(self):