summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (lxpbuetow.webde.local) <paul.buetow@1und1.de>2014-06-24 15:32:54 +0200
committerPaul Buetow (lxpbuetow.webde.local) <paul.buetow@1und1.de>2014-06-24 15:32:54 +0200
commit37e1b459418f979e2a8a0bb58b804ccd7872e1ae (patch)
treed9701653be8389041e101763a9ccc618a2d1fab5
parent3667043709be2fdc16e9f0519d87f63521475314 (diff)
can get and set node ratio
-rw-r--r--docs/fapi.12
-rwxr-xr-xsrc/fapi6
2 files changed, 7 insertions, 1 deletions
diff --git a/docs/fapi.1 b/docs/fapi.1
index 70e5de9..74ebe5a 100644
--- a/docs/fapi.1
+++ b/docs/fapi.1
@@ -124,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "FAPI 1"
-.TH FAPI 1 "2014-05-27" "fapi 0.8.3" "User Commands"
+.TH FAPI 1 "2014-06-18" "fapi 0.8.3" "User Commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff --git a/src/fapi b/src/fapi
index 8a02461..81b2c84 100755
--- a/src/fapi
+++ b/src/fapi
@@ -295,6 +295,12 @@ class Fapi(FapiBase):
return lambda: detail(f5)
if a.sub2 == 'status':
return lambda: f5().get_monitor_status([a.name])
+ if a.sub2 == 'ratio':
+ return lambda: f5().get_ratio([a.name])
+ if a.sub == 'set':
+ if a.sub2 == 'ratio':
+ ratio = a.sub3
+ return lambda: f5().set_ratio([a.name], [ratio])
elif a.sub == 'create':
fqdn_or_ip, ip, _ = self.lookup(a.name)
return lambda: f5().create([fqdn_or_ip], [ip], [0])