rhtyd commented on a change in pull request #4068:
URL: https://github.com/apache/cloudstack/pull/4068#discussion_r438670762



##########
File path: python/lib/cloudutils/serviceConfig.py
##########
@@ -14,38 +14,44 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-from utilities import writeProgressBar, bash
-from cloudException import CloudRuntimeException, CloudInternalException, 
formatExceptionInfo
+from .utilities import writeProgressBar, bash
+from .cloudException import CloudRuntimeException, CloudInternalException, 
formatExceptionInfo
 import logging
-from networkConfig import networkConfig
+from .networkConfig import networkConfig
 import re
-from configFileOps import configFileOps
+from .configFileOps import configFileOps
 import os
 import shutil
 
 # exit() error constants
 Unknown = 0
 CentOS6 = 1
 CentOS7 = 2
-Ubuntu = 3
-RHEL6 = 4
-RHEL7 = 5
+CentOS8 = 3
+Ubuntu = 4
+RHEL6 = 5
+RHEL7 = 6
+RHEL8 = 7
 distro = None
 
 #=================== DISTRIBUTION DETECTION =================
 if os.path.exists("/etc/centos-release"):
-    version = file("/etc/centos-release").readline()
+    version = open("/etc/centos-release").readline()
     if version.find("CentOS release 6") != -1:
       distro = CentOS6
     elif version.find("CentOS Linux release 7") != -1:
       distro = CentOS7
+    elif version.find("CentOS Linux release 8") != -1:
+      distro = CentOS8
 elif os.path.exists("/etc/redhat-release"):
-    version = file("/etc/redhat-release").readline()
+    version = open("/etc/redhat-release").readline()
     if version.find("Red Hat Enterprise Linux Server release 6") != -1:
       distro = RHEL6
     elif version.find("Red Hat Enterprise Linux Server 7") != -1:
       distro = RHEL7
-elif os.path.exists("/etc/lsb-release") and "Ubuntu" in 
file("/etc/lsb-release").read(-1): distro = Ubuntu
+    elif version.find("Red Hat Enterprise Linux Server 8") != -1:

Review comment:
       @shwstppr @davidjumani have we tested RHEL 8, or just extrapolating?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to