From 37e1b459418f979e2a8a0bb58b804ccd7872e1ae Mon Sep 17 00:00:00 2001 From: "Paul Buetow (lxpbuetow.webde.local)" Date: Tue, 24 Jun 2014 15:32:54 +0200 Subject: can get and set node ratio --- docs/fapi.1 | 2 +- src/fapi | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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]) -- cgit v1.2.3