Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

How to Sync F5 configuration using Python SDK

I tried the following to sync the config.

mgmt.tm.sys.configsync.synchronize_to_group_v2('SYNC-FAILOVER','/Common/test-host.com')

The idea is to 'sync' and also optionally to do a 'force sync'

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

I was able to initiate config sync using bigsuds, anyone knwos hows to initiate config sync using f5 python SDK ?

b.System.ConfigSync.synchronize_to_group_v2('SYNC-FAILOVER','/Common/<hostname>', 'true')
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

After some more more reading of f5 python sdk docs, I was able to get it working. Kindly let me know if there is a better way of doing it.

For Force Push

mgmt.tm.cm.exec_cmd('run', utilCmdArgs='config-sync force-full-load-push to-group <sync-failover-gp-name>')

For Push

mgmt.tm.cm.exec_cmd('run', utilCmdArgs='config-sync to-group <sync-failover-gp-name>')
0
Comments on this Answer
Comment made 31-Jul-2018 by Saran 57

Is there a way to get a feedback of whether the Sync was successful or not in one go ?
Currently I have to run the above command and run another command to check for sync status.

0