test - get devices

This commit is contained in:
Swapnil 2024-05-08 00:40:32 +05:30
parent 0b60a7cf50
commit a5eabf9ca6
Signed by: swapnil
GPG Key ID: 58029C48BB100574
1 changed files with 2 additions and 6 deletions

View File

@ -190,7 +190,7 @@ def run_module():
argument_spec=module_args
)
module2 = SyncthingModule(
device_module = SyncthingModule(
api_url='/rest/config/devices',
argument_spec=module_args
)
@ -210,13 +210,10 @@ def run_module():
else:
module.delete_call(target=folder['id'])
else:
devices_list = module2.get_call()
devices_list = device_module.get_call()
existing_device_ids = [device['deviceID'] for device in devices_list]
self_id = module.result['response']['x-syncthing-id']
module.result['devices'] = devices_list
module2.result['devices'] = devices_list
if folder_exists: # exists but maybe needs changing
if module.check_mode:
module.result['changed'] = True
@ -235,7 +232,6 @@ def run_module():
module.post_call(data=folder_config_wanted)
module.exit_json()
module2.exit_json()
def main():
run_module()