Merge "New client for RHEL activation"

This commit is contained in:
Jenkins
2014-08-15 17:54:08 +00:00
committed by Gerrit Code Review
2 changed files with 39 additions and 1 deletions

View File

@@ -552,3 +552,20 @@ class LinuxClient(RemoteInstanceClient):
time.sleep(self.connection_timeout)
return tx_bytes
def check_rhel_activation(self):
"""
@summary: Returns boolean - true or false depending of the activation
if it is passed or failed
@return: Activation status
@rtype: bool
"""
status_of_activation = False
command = 'rhn_check -v'
echo_call = 'echo $?'
rhel_network_satellite = self.ssh_client.execute_command(command)
if rhel_network_satellite.stdout is '':
output = self.ssh_client.execute_command(echo_call)
if int(output.stdout) is 0:
status_of_activation = True
return status_of_activation