Make use of router primary write key in client too

This commit is contained in:
Joshua Boniface 2018-09-29 02:00:07 -04:00
parent 08c09135c8
commit 560fa57176
1 changed files with 4 additions and 1 deletions

View File

@ -101,7 +101,10 @@ def primary_router(zk_conn, router):
return False, 'ERROR: No router named "{}" is present in the cluster.'.format(router) return False, 'ERROR: No router named "{}" is present in the cluster.'.format(router)
click.echo('Setting router {} in primary mode.'.format(router)) click.echo('Setting router {} in primary mode.'.format(router))
zkhandler.writedata(zk_conn, { '/routers/{}/networkstate'.format(router): 'primary' }) zkhandler.writedata(zk_conn, {
'/routers': router,
'/routers/{}/networkstate'.format(router): 'primary'
})
return True, '' return True, ''
def get_info(zk_conn, router, long_output): def get_info(zk_conn, router, long_output):