diff --git a/ceilometer/compute/virt/vmware/inspector.py b/ceilometer/compute/virt/vmware/inspector.py index 37189fe6c..b38f868b8 100644 --- a/ceilometer/compute/virt/vmware/inspector.py +++ b/ceilometer/compute/virt/vmware/inspector.py @@ -31,6 +31,9 @@ OPTS = [ cfg.StrOpt('host_ip', default='', help='IP address of the VMware Vsphere host.'), + cfg.IntOpt('host_port', + default=443, + help='Port of the VMware Vsphere host.'), cfg.StrOpt('host_username', default='', help='Username of VMware Vsphere.'), @@ -72,7 +75,8 @@ def get_api_session(): cfg.CONF.vmware.host_password, cfg.CONF.vmware.api_retry_count, cfg.CONF.vmware.task_poll_interval, - wsdl_loc=cfg.CONF.vmware.wsdl_location) + wsdl_loc=cfg.CONF.vmware.wsdl_location, + port=cfg.CONF.vmware.host_port) return api_session diff --git a/ceilometer/tests/compute/virt/vmware/test_inspector.py b/ceilometer/tests/compute/virt/vmware/test_inspector.py index c1fd52860..7461e8f6d 100644 --- a/ceilometer/tests/compute/virt/vmware/test_inspector.py +++ b/ceilometer/tests/compute/virt/vmware/test_inspector.py @@ -29,7 +29,7 @@ class TestVsphereInspection(base.BaseTestCase): def setUp(self): api_session = api.VMwareAPISession("test_server", "test_user", "test_password", 0, None, - create_session=False) + create_session=False, port=7443) vsphere_inspector.get_api_session = mock.Mock( return_value=api_session) self._inspector = vsphere_inspector.VsphereInspector() diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index 832252546..4b23f38ed 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -144,6 +144,7 @@ Parameter Default Note host_ip "" (Str) IP address of the VMware Vsphere host. host_password "" (Str) Password of VMware Vsphere. host_username "" (Str) Username of VMware Vsphere. +host_port 443 (Int) Listening Port of VMware Vsphere host. api_retry_count 10 (Int) Number of times a VMware Vsphere API must be retried. task_poll_interval 0.5 (Float) Sleep time in seconds for polling an ongoing async task. wsdl_location None (Str) Optional vim Service WSDL location