summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul C. Buetow <paul@buetow.org>2014-04-13 14:58:56 +0200
committerPaul C. Buetow <paul@buetow.org>2014-04-13 14:58:56 +0200
commite6daf2b92a4e3a143503a0c6931a9849562f0246 (patch)
tree4527c4b34ee4413b4d22bbf77116c7fc829aaa6f
parent045c370428d83260b4da6feaf9d1ec71ff10f9f5 (diff)
dependent profile
-rwxr-xr-xsrc/fapi.py7
1 files changed, 6 insertions, 1 deletions
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,