Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: engine_page: add compatiblePort() to src
......................................................................
engine_page: add compatiblePort() to src
compatiblePort() is defined vdsm/vdsm_reg/engine.py.in
(previous version of engine_page.py) delivered in
%{python_sitelib}/ovirt_config_setup/engine.py.
Instead of to keep this old file in vdsm tree just for
one function we should move the function to the new
project ovirt-node-plugin-vdsm and remove such file.
Change-Id: I8eec07e576dce8b3ce8c064897a2e47c674891f6
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
---
M src/engine_page.py
1 file changed, 22 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node-plugin-vdsm
refs/changes/19/26419/1
diff --git a/src/engine_page.py b/src/engine_page.py
index bd4a364..56fcdf0 100644
--- a/src/engine_page.py
+++ b/src/engine_page.py
@@ -25,7 +25,6 @@
from . import config
-from ovirt_config_setup.engine import compatiblePort
from ovirt.node import plugins, valid, ui, utils, log
from ovirt.node.config.defaults import NodeConfigFileSection, SSH, Management
from ovirt.node.plugins import Changeset
@@ -325,6 +324,28 @@
return enginePort
+def compatiblePort(portNumber):
+ """
+ Until the version 3.0, oVirt Engine provided port 8443/8080 to oVirt Node
+ download cert and others files. Since 3.1 the default port changed to
+ 443/80. This function, will return the compatible port in case the VDSM
+ cannot communicate with oVirt Engine.
+
+ :param portNumber: port which doesn't communicate with oVirt Engine
+ :returns: compatible port number (or None if there is no compatible port)
+ and if it's SSL port or not (bool)
+ """
+
+ compatPort = {
+ '443': ('8443', True),
+ '8443': ('443', True),
+ '80': ('8080', False),
+ '8080': ('80', False)
+ }
+
+ return compatPort.get(portNumber, (None, False))
+
+
def isHostReachable(host, port, ssl, timeout):
"""Check if a host is reachable on a given port via HTTP/HTTPS
"""
--
To view, visit http://gerrit.ovirt.org/26419
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8eec07e576dce8b3ce8c064897a2e47c674891f6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node-plugin-vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches