Update RHUI repo check for redhat

This commit is contained in:
unknown 2015-11-06 16:01:51 +08:00
Родитель 374641f2d0
Коммит c00fe23304
2 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -37,7 +37,7 @@ if ($isDeployed)
}
elseif ($detectedDistro -imatch "REDHAT")
{
$matchstrings = @("_TEST_SUDOERS_VERIFICATION_SUCCESS","_TEST_NETWORK_MANAGER_NOT_INSTALLED","_TEST_NETWORK_FILE_SUCCESS", "_TEST_IFCFG_ETH0_FILE_SUCCESS", "_TEST_UDEV_RULES_SUCCESS", "_TEST_GRUB_VERIFICATION_SUCCESS")
$matchstrings = @("_TEST_SUDOERS_VERIFICATION_SUCCESS","_TEST_NETWORK_MANAGER_NOT_INSTALLED","_TEST_NETWORK_FILE_SUCCESS", "_TEST_IFCFG_ETH0_FILE_SUCCESS", "_TEST_UDEV_RULES_SUCCESS", "_TEST_GRUB_VERIFICATION_SUCCESS","_TEST_RHUIREPOSITORIES_AVAILABLE")
}
elseif ($detectedDistro -imatch "FEDORA")
{

Просмотреть файл

@ -305,6 +305,17 @@ if distro == "REDHAT" or distro == "FEDORA":
if "updates" not in r_out:
RunLog.error("Updates repository not present")
print(distro+"_TEST_REPOSITORIES_ERROR")
if distro == "REDHAT":
ra_out = Run("yum repolist all | grep 'rhui-rhel-' | wc -l")
if(ra_out > 5):
RunLog.info("yum repolist all status: Success, repo count = %s", ra_out)
print(distro+"_TEST_RHUIREPOSITORIES_AVAILABLE")
else:
RunLog.error("yum repolist all status: Fail, repo count = %s", ra_out)
print(distro+"_TEST_RHUIREPOSITORIES_ERROR")
#Verify etc/yum.conf
y_out = Run("cat /etc/yum.conf")
if "http_caching=packages" in y_out: