From e6daf2b92a4e3a143503a0c6931a9849562f0246 Mon Sep 17 00:00:00 2001 From: "Paul C. Buetow" Date: Sun, 13 Apr 2014 14:58:56 +0200 Subject: dependent profile --- src/fapi.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fapi.py b/src/fapi.py index ac0cc9c..9d2cdc9 100755 --- a/src/fapi.py +++ b/src/fapi.py @@ -280,7 +280,12 @@ class Fapi(object): fqdn, ip, port = self.lookup(a.name) protocol = a.arg2 if a.arg2 else 'PROTOCOL_TCP' netmask = a.arg3 if a.arg3 else '255.255.255.255' - profile = a.arg4 if a.arg4 else 'tcp' + if a.arg4: + profile = a.arg4 + elif protocol == 'PROTOCOL_UDP': + profile = 'udp' + else: + profile = 'tcp' poolname = a.arg5 vserver = { 'name': a.name, -- cgit v1.2.3