test - get devices

This commit is contained in:
Swapnil 2024-05-08 01:20:10 +05:30
parent 6ff8db7fa2
commit cb6a2ca328
Signed by: swapnil
GPG Key ID: 58029C48BB100574
1 changed files with 1 additions and 6 deletions

View File

@ -80,10 +80,6 @@ response:
'''
from ansible_collections.community.syncthing.plugins.module_utils.syncthing_api import SyncthingModule
import json
def deep_equal(a, b):
return json.dumps(a, sort_keys=True) == json.dumps(b, sort_keys=True)
# Returns an object of a new folder
def create_folder(params, self_id, existing_device_ids):
@ -225,8 +221,7 @@ def run_module():
folder_with_updated_data = update_folder(
folder, module.params, self_id, existing_device_ids
)
if not deep_equal(folder, folder_with_updated_data):
module.patch_call(data=folder_with_updated_data, target=folder['id'])
module.patch_call(data=folder_with_updated_data, target=folder['id'])
else: # Doesn't exist but needs to be added
if module.check_mode:
module.result['changed'] = True