Remove interpret_puppet_exitcodes
This is dead code now. The equivilent function is now in openstack-infra/ansible-puppet Change-Id: I7ba2f0b9da720b72a0a97b27a43a873b29c41ed8
This commit is contained in:
parent
af4435ef99
commit
8a1d7a5ab6
@ -52,24 +52,3 @@ def ssh_connect(ip, username, connect_kwargs={}, timeout=60):
|
|||||||
if "access okay" in out:
|
if "access okay" in out:
|
||||||
return client
|
return client
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def interpret_puppet_exitcodes(rc, output):
|
|
||||||
if rc == 0:
|
|
||||||
# success
|
|
||||||
return
|
|
||||||
elif rc == 1:
|
|
||||||
# rc==1 could be because it's disabled
|
|
||||||
# rc==1 could also mean there was a compilation failure
|
|
||||||
disabled = "administratively disabled" in output
|
|
||||||
if disabled:
|
|
||||||
msg = "puppet is disabled"
|
|
||||||
else:
|
|
||||||
msg = "puppet did not run"
|
|
||||||
raise Exception(msg)
|
|
||||||
elif rc == 2:
|
|
||||||
# success with changes
|
|
||||||
return
|
|
||||||
elif rc == 124:
|
|
||||||
# timeout
|
|
||||||
raise Exception("Puppet timed out")
|
|
||||||
|
Loading…
Reference in New Issue
Block a user