Add function to return the Major, Minor and Patch level of the current
booted kernel.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
TJH: Moved function from CgroupVersion class to utils.py
#
from run import Run
+import platform
# function to indent a block of text by cnt number of spaces
else:
return Run.run(cmd, shell_bool=True)
+# get the current kernel version
+def get_kernel_version(config):
+ kernel_version_str = str(platform.release())
+ kernel_version = kernel_version_str.split('.')[0:3]
+ return kernel_version
+
# vim: set et ts=4 sw=4: