mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-19 02:11:32 +00:00
[PR #11721/08442186 backport][stable-12] xenserver_guest: fix code style caught by codeqa (#11725)
xenserver_guest: fix code style caught by codeqa (#11721)
* xenserver_guest: fix code style caught by codeqa
* add changelog frag
(cherry picked from commit 08442186e6)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
b41916285e
commit
3bca7e1ad4
2 changed files with 3 additions and 4 deletions
|
|
@ -938,9 +938,7 @@ class XenServerVM(XenServerObject):
|
|||
)[0]
|
||||
self.xapi_session.xenapi.VBD.insert(cdrom_vbd_ref, cdrom_vdi_ref)
|
||||
elif change.get("networks_changed"):
|
||||
position = 0
|
||||
|
||||
for network_change_list in change["networks_changed"]:
|
||||
for position, network_change_list in enumerate(change["networks_changed"]):
|
||||
if network_change_list:
|
||||
vm_vif_params = self.vm_params["VIFs"][position]
|
||||
network_params = self.module.params["networks"][position]
|
||||
|
|
@ -1113,7 +1111,6 @@ class XenServerVM(XenServerObject):
|
|||
network_params[network_change],
|
||||
)
|
||||
|
||||
position += 1
|
||||
elif change.get("networks_new"):
|
||||
for position, vif_device in change["networks_new"]:
|
||||
network_params = self.module.params["networks"][position]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue