mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* removed unreachable code
* added changelog fragment
(cherry picked from commit b81a7cdd16
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
f51cdb367f
commit
f717c1f4fd
4 changed files with 4 additions and 21 deletions
4
changelogs/fragments/2157-unreachable-code.yml
Normal file
4
changelogs/fragments/2157-unreachable-code.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
minor_changes:
|
||||
- rhevm - removed unreachable code (https://github.com/ansible-collections/community.general/pull/2157).
|
||||
- ovh_ip_failover - removed unreachable code (https://github.com/ansible-collections/community.general/pull/2157).
|
||||
- bitbucket_pipeline_variable - removed unreachable code (https://github.com/ansible-collections/community.general/pull/2157).
|
|
@ -1229,24 +1229,6 @@ class RHEV(object):
|
|||
self.__get_conn()
|
||||
return self.conn.set_VM_Host(vmname, vmhost)
|
||||
|
||||
# pylint: disable=unreachable
|
||||
VM = self.conn.get_VM(vmname)
|
||||
HOST = self.conn.get_Host(vmhost)
|
||||
|
||||
if VM.placement_policy.host is None:
|
||||
self.conn.set_VM_Host(vmname, vmhost)
|
||||
elif str(VM.placement_policy.host.id) != str(HOST.id):
|
||||
self.conn.set_VM_Host(vmname, vmhost)
|
||||
else:
|
||||
setMsg("VM's startup host was already set to " + vmhost)
|
||||
checkFail()
|
||||
|
||||
if str(VM.status.state) == "up":
|
||||
self.conn.migrate_VM(vmname, vmhost)
|
||||
checkFail()
|
||||
|
||||
return True
|
||||
|
||||
def setHost(self, hostname, cluster, ifaces):
|
||||
self.__get_conn()
|
||||
return self.conn.set_Host(hostname, cluster, ifaces)
|
||||
|
|
|
@ -162,7 +162,6 @@ def waitForTaskDone(client, name, taskId, timeout):
|
|||
currentTimeout -= 5
|
||||
if currentTimeout < 0:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -149,8 +149,6 @@ def get_existing_pipeline_variable(module, bitbucket):
|
|||
var['name'] = var.pop('key')
|
||||
return var
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def create_pipeline_variable(module, bitbucket):
|
||||
info, content = bitbucket.request(
|
||||
|
|
Loading…
Reference in a new issue