test - get devices

This commit is contained in:
Swapnil 2024-05-08 00:31:39 +05:30
parent 81f465c8c6
commit 2ad682b1b1
Signed by: swapnil
GPG Key ID: 58029C48BB100574
1 changed files with 5 additions and 4 deletions

View File

@ -190,6 +190,10 @@ def run_module():
argument_spec=module_args
)
module2 = SyncthingModule(
api_url='/rest/config/devices',
)
if module.params['state'] != 'absent' and not module.params['path']:
module.fail_json(msg='You must provide a path when creating')
@ -205,10 +209,7 @@ def run_module():
else:
module.delete_call(target=folder['id'])
else:
module = SyncthingModule(
api_url='/rest/config/devices',
)
devices_list = module.get_call()
devices_list = module2.get_call()
existing_device_ids = [device['deviceID'] for device in devices_list]
self_id = module.result['response']['x-syncthing-id']