Forum Discussion

penghon_71315's avatar
penghon_71315
Icon for Nimbostratus rankNimbostratus
Sep 25, 2017

How does one use the f5-sdk add-to-trust?

Have been trying to automate the adding of peer device using the add-to-trust described here: https://devcentral.f5.com/wiki/icontrolrest.apiref_tm_cm_add-to-trust.ashx

 

Snippet of what I have tried to run with python: ManagementRoot('IP', 'admin', 'admin_password').tm.cm.add_to_trust.update(caDevice=True, name='Root', device='PEER_IP', deviceName='NAME_OF_PEER_BOX', username='admin', password='admin_password', command='run')

 

The above seems to send a PUT instead of a POST (probably due to the usage of update() instead of create() which is not allowed for UnnamedResource?)

 

Does anyone know how to force the use of a POST with add-to-trust (or the proper syntax of adding a device via the F5 python SDK)?