From 09ed428bb6df95afde304dcdb4bf522bdd2d4006 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 4 Sep 2014 16:05:28 -0500 Subject: [PATCH] created an f5 config gen --- scripts/f5-config.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/f5-config.py b/scripts/f5-config.py index d8f70d1177..f58f3256da 100755 --- a/scripts/f5-config.py +++ b/scripts/f5-config.py @@ -29,7 +29,7 @@ SNAT_POOL = ( ) MONITORS = ( - 'create ltm monitor mysql RPC_MON_GALERA { count 0 database' + 'create ltm monitor mysql %(prefix_name)s_MON_GALERA { count 0 database' ' information_schema debug yes defaults-from mysql destination *:*' ' interval 30 time-until-up 0 timeout 91 username haproxy }' ) @@ -57,6 +57,8 @@ VIRTUAL_ENTRIES = ( ' pool RPC_SNATPOOL type snat } }' ) + +# This is a dict of all groups and their respected values / requirements POOL_PARTS = { 'galera': { 'port': 3306, @@ -302,6 +304,14 @@ def args(): default=None ) + parser.add_argument( + '--limit-source', + help='Limit available connections to the source IP for all source' + ' limited entries.', + required=False, + default=None + ) + parser.add_argument( '-e', '--export', @@ -399,8 +409,7 @@ def main(): script = [ '#!/usr/bin/bash\n', snat_pool, - '# Monitors\n', - '%s\n' % MONITORS + '%s\n' % MONITORS % {'prefix_name': PREFIX_NAME} ] script.extend(nodes) script.extend(pools)