From d09efb4aa6858d43ce44039383a02e76b2856b38 Mon Sep 17 00:00:00 2001 From: "Paul C. Buetow" Date: Fri, 16 May 2014 17:52:10 +0200 Subject: can also get the vlan --- docs/fapi.pod | 2 +- src/fapi | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/fapi.pod b/docs/fapi.pod index 21b9683..b5cfa9b 100644 --- a/docs/fapi.pod +++ b/docs/fapi.pod @@ -123,7 +123,7 @@ A simple nPath service can be created as follows. # Restrict the vserver to a specific VLAN (IMPORTANT! security # hole otherwise!) - fapi vserver myvserver.example.com:443 set vlans VLANNAME + fapi vserver myvserver.example.com:443 set vlan VLANNAME # Put the VirtualAddress of the vserver into a specific traffic group fapi vip myserver.example.com set tgroup some-traffic-group diff --git a/src/fapi b/src/fapi index 5a8515c..e9ac3b1 100755 --- a/src/fapi +++ b/src/fapi @@ -89,11 +89,11 @@ class FapiBase(object): ' vserver', ' vserver NAME create [protocol] [profile] [poolname] [mask]', ' vserver NAME delete', - ' vserver NAME get brief|detail|status', + ' vserver NAME get brief|detail|status|vlan', ' vserver NAME set nat|pat disabled|enabled', ' vserver NAME set pool POOLNAME', ' vserver NAME set snat automap|none' - ' vserver NAME set vlans [list,of,vlans,to,allow]', + ' vserver NAME set vlan [list,of,vlans,to,allow]', + reset, 'The following partially needs admininstrator privileges on / and /Common', style + @@ -431,6 +431,8 @@ class Fapi(FapiBase): return lambda: brief(f5) elif a.sub2 == 'status': return lambda: f5().get_object_status([name]) + elif a.sub2 == 'vlan': + return lambda: f5().get_vlan([name]) elif a.sub == 'create': protocol = a.sub2 if a.sub2 else 'PROTOCOL_TCP' if a.sub3: @@ -483,7 +485,7 @@ class Fapi(FapiBase): return lambda: f5().set_source_address_translation_none([name]) elif a.sub3 == 'automap': return lambda: f5().set_source_address_translation_automap([name]) - elif a.sub2 == 'vlans': + elif a.sub2 == 'vlan': vlans = a.sub3.split(',') if a.sub3 else [] vlan_filter_list = { 'state': 'STATE_ENABLED', -- cgit v1.2.3