Tom Walsh [Fri, 8 Aug 2014 21:27:22 +0000 (16:27 -0500)]
Modified the rpm_dist() and repository_url_part()
So they can use the newly defined distro.normalized_release object to determine
the correct OS version and return the information based on that. This should
work for all releases from RHEL, CentOS, and Scientific Linux 6 and greater.
Changed the test_centos.py file to use pytest fixtures to test multiple input
types for the various OSes we are testing for.
Signed-off-by: Tom Walsh <tom.walsh@expresshosting.net>
Tom Walsh [Fri, 8 Aug 2014 03:48:59 +0000 (22:48 -0500)]
Modified the system to handle subversion numbers in the release number. For instance in production our server was reporting a release version of 7.0.1406. This is not a valid float() so the system was returning an el6 value. I have added additional logic to find the first . (dot) in the string and convert that to a float value.
I have also added a test to look for and test this corner case.
Tom Walsh [Fri, 8 Aug 2014 02:37:32 +0000 (21:37 -0500)]
Reworked the release detection to normalize the value of distro.release as an integer and use that as the basis of determining the correct value of rpm_dist() and repository_url_part(). This should work for all versions of RH, CentOS, and SL going forward.
Signed-off-by: Tom Walsh <tom.walsh@expresshosting.net>