summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (lxpbuetow.webde.local) <paul.buetow@1und1.de>2014-07-30 15:22:01 +0200
committerPaul Buetow (lxpbuetow.webde.local) <paul.buetow@1und1.de>2014-07-30 15:22:01 +0200
commit10431377eb507fd42e644e74e450df8ca151ca03 (patch)
tree7cbf2684479b997977e77cdbd8367bec55999798
parent2992bb53557f2801852232e410cece3b659bf435 (diff)
can set hagroup of a traffic group
-rwxr-xr-xsrc/fapi5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fapi b/src/fapi
index 743b6f1..d467529 100755
--- a/src/fapi
+++ b/src/fapi
@@ -135,6 +135,7 @@ class FapiBase(object):
' -f Common -b balancer.example.com hagroup NAME add trunk TRUNKNAME WEIGHT THRESHOLD',
' -f Common -b balancer.example.com hagroup NAME remove trunk TRUNKNAME',
' -f Common -b balancer.example.com hagroup NAME set trunk threshold TRUNKNAME THRESHOLD',
+ ' -f Common -b balancer.example.com tgroup NAME set hagroup HAGROUPNAME',
' -f Common tgroup',
' -f Common tgroup NAME add ha_order DEVICE ORDER',
' -f Common tgroup NAME create',
@@ -851,6 +852,10 @@ class Fapi(FapiBase):
elif a.sub2 == 'all_ha_orders':
orders = { 'device': a.sub3, 'order': a.sub4 }
return lambda: f5().remove_all_ha_orders([a.name])
+ elif a.sub == 'set':
+ if a.sub2 == 'ha_group':
+ ha_group = a.sub3
+ return lambda: f5().set_ha_group([a.name], [ha_group])
def _lazy(self):
''' Get the lazy code block to be executed '''