- db_vim_action = {
- "instance_action_id": instance_action_id,
- "task_index": task_index,
- "datacenter_vim_id": target_vm["datacenter_tenant_id"],
- "action": "DELETE",
- "status": "SCHEDULED",
- "item": "instance_vms",
- "item_id": target_vm["uuid"],
- "extra": yaml.safe_dump({"params": vm_interfaces},
- default_flow_style=True, width=256)
- }
- task_index += 1
- db_vim_actions.append(db_vim_action)
- vm_result[vdu_id]["deleted"].append(vdu_id)
- # delete from database
- db_instance_vms.append({"TO-DELETE": vdu_id})
+ db_vim_action = {
+ "instance_action_id": instance_action_id,
+ "task_index": task_index,
+ "datacenter_vim_id": target_vm["datacenter_tenant_id"],
+ "action": "DELETE",
+ "status": "SCHEDULED",
+ "item": "instance_vms",
+ "item_id": vdu_id,
+ "extra": yaml.safe_dump({"params": vm_interfaces},
+ default_flow_style=True, width=256)
+ }
+ task_index += 1
+ db_vim_actions.append(db_vim_action)
+ vm_result["deleted"].append(vdu_id)
+ # delete from database
+ db_instance_vms.append({"TO-DELETE": vdu_id})