diff options
| -rw-r--r-- | .version | 2 | ||||
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | README.pod | 6 | ||||
| -rw-r--r-- | debian/changelog | 8 | ||||
| -rw-r--r-- | debian/files | 2 | ||||
| -rw-r--r-- | docs/fapi.1 | 8 | ||||
| -rw-r--r-- | docs/fapi.pod | 6 | ||||
| -rw-r--r-- | docs/fapi.txt | 6 | ||||
| -rw-r--r-- | docs/synopsis.txt | 5 | ||||
| -rwxr-xr-x | src/fapi | 16 |
10 files changed, 51 insertions, 14 deletions
@@ -1 +1 @@ -0.6.2 +0.7.0 @@ -28,10 +28,10 @@ documentation: --center="User Commands" ./docs/$(NAME).pod > ./docs/$(NAME).1 pod2text ./docs/$(NAME).pod > ./docs/$(NAME).txt cp ./docs/$(NAME).pod README.pod - ./bin/fapi -h -d > ./docs/synopsis.txt -# Build a debian package (don't sign it, modify the arguments if you want to sign it) + ./bin/fapi -h -n > ./docs/synopsis.txt +# Build a debian package deb: all - dpkg-buildpackage + dpkg-buildpackage -us -uc dch: dch -i release: dch deb @@ -46,7 +46,7 @@ L<https://devcentral.f5.com/d/bigsuds-python-icontrol-library> Unzip it and run - sudo python setyp.py install + sudo python setup.py install You may also install bigsuds from the contrib dir of the fapi source tree. @@ -121,6 +121,10 @@ A simple nPath service can be created as follows. fapi vserver myvserver.example.com:443 create PROTOCOL_TCP nPath fapi vserver myvserver.example.com:443 set pool foopool + # Restrict the vserver to a specific VLAN (IMPORTANT! security + # hole otherwise!) + 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/debian/changelog b/debian/changelog index a56eda1..b8812bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +fapi (0.7.0) stable; urgency=low + + * Can also set and get the vlan of a vserver + * Can also set SNAT to automap + * Small updates in the documentation + + -- Paul Buetow <paul.buetow@1und1.de> Fri, 16 May 2014 17:52:31 +0200 + fapi (0.6.2) stable; urgency=low * Some more PEP8 diff --git a/debian/files b/debian/files index 9aa4bcb..5a378c3 100644 --- a/debian/files +++ b/debian/files @@ -1 +1 @@ -fapi_0.6.2_all.deb utils optional +fapi_0.7.0_all.deb utils optional diff --git a/docs/fapi.1 b/docs/fapi.1 index b19cc21..1dc317f 100644 --- a/docs/fapi.1 +++ b/docs/fapi.1 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "FAPI 1" -.TH FAPI 1 "2014-04-29" "fapi 0.6.2" "User Commands" +.TH FAPI 1 "2014-05-16" "fapi 0.7.0" "User Commands" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -179,7 +179,7 @@ https://devcentral.f5.com/d/bigsuds\-python\-icontrol\-library <https://devcentr Unzip it and run .PP .Vb 1 -\& sudo python setyp.py install +\& sudo python setup.py install .Ve .PP You may also install bigsuds from the contrib dir of the fapi source tree. @@ -260,6 +260,10 @@ A simple nPath service can be created as follows. \& fapi vserver myvserver.example.com:443 create PROTOCOL_TCP nPath \& fapi vserver myvserver.example.com:443 set pool foopool \& +\& # Restrict the vserver to a specific VLAN (IMPORTANT! security +\& # hole otherwise!) +\& 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 .Ve diff --git a/docs/fapi.pod b/docs/fapi.pod index 78f819e..b5cfa9b 100644 --- a/docs/fapi.pod +++ b/docs/fapi.pod @@ -46,7 +46,7 @@ L<https://devcentral.f5.com/d/bigsuds-python-icontrol-library> Unzip it and run - sudo python setyp.py install + sudo python setup.py install You may also install bigsuds from the contrib dir of the fapi source tree. @@ -121,6 +121,10 @@ A simple nPath service can be created as follows. fapi vserver myvserver.example.com:443 create PROTOCOL_TCP nPath fapi vserver myvserver.example.com:443 set pool foopool + # Restrict the vserver to a specific VLAN (IMPORTANT! security + # hole otherwise!) + 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/docs/fapi.txt b/docs/fapi.txt index b96dbed..698a0cb 100644 --- a/docs/fapi.txt +++ b/docs/fapi.txt @@ -40,7 +40,7 @@ BIGSUDS Unzip it and run - sudo python setyp.py install + sudo python setup.py install You may also install bigsuds from the contrib dir of the fapi source tree. @@ -109,6 +109,10 @@ EXAMPLES fapi vserver myvserver.example.com:443 create PROTOCOL_TCP nPath fapi vserver myvserver.example.com:443 set pool foopool + # Restrict the vserver to a specific VLAN (IMPORTANT! security + # hole otherwise!) + 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/docs/synopsis.txt b/docs/synopsis.txt index 3d1e7f0..054543f 100644 --- a/docs/synopsis.txt +++ b/docs/synopsis.txt @@ -46,10 +46,11 @@ Synopsis: 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 none + vserver NAME set snat automap|none + vserver NAME set vlan [list,of,vlans,to,allow] The following partially needs admininstrator privileges on / and /Common -f Common -b balancer.example.com selfip -f Common -b balancer.example.com selfip NAME create NETMASK VLANNAME [TGROUP] @@ -89,10 +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 none' + ' vserver NAME set snat automap|none', + ' vserver NAME set vlan [list,of,vlans,to,allow]' + reset, 'The following partially needs admininstrator privileges on / and /Common', style + @@ -453,6 +454,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: @@ -503,6 +506,15 @@ class Fapi(FapiBase): elif a.sub2 == 'snat': if a.sub3 == 'none': 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 == 'vlan': + vlans = a.sub3.split(',') if a.sub3 else [] + vlan_filter_list = { + 'state': 'STATE_ENABLED', + 'vlans': vlans + } + return lambda: f5().set_vlan([name], [vlan_filter_list]) def __do_vip(self, f5): ''' Do stuff concerning virtual addresses ''' |
