From 235cd886bb5620b016656b0f58fe9fe1bd293c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20C=2E=20B=C3=BCtow?= Date: Fri, 16 May 2014 15:00:52 +0200 Subject: typo --- docs/fapi.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fapi.pod b/docs/fapi.pod index 78f819e..e7a7bd1 100644 --- a/docs/fapi.pod +++ b/docs/fapi.pod @@ -46,7 +46,7 @@ L 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. -- cgit v1.2.3 From 7ea2c3cb0de31308c7b11a85f44ca0389d2a1c63 Mon Sep 17 00:00:00 2001 From: "Paul C. Buetow" Date: Fri, 16 May 2014 17:34:01 +0200 Subject: can set snat automap on vserver --- docs/fapi.1 | 2 +- src/fapi | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/fapi.1 b/docs/fapi.1 index b19cc21..a5a8ec8 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-15" "fapi 0.6.2" "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 5d26e2a..67bccf6 100755 --- a/src/fapi +++ b/src/fapi @@ -92,7 +92,7 @@ class FapiBase(object): ' vserver NAME get brief|detail|status', ' vserver NAME set nat|pat disabled|enabled', ' vserver NAME set pool POOLNAME', - ' vserver NAME set snat none' + ' vserver NAME set snat automap|none' + reset, 'The following partially needs admininstrator privileges on / and /Common', style + @@ -480,6 +480,8 @@ 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]) def __do_vip(self, f5): ''' Do stuff concerning virtual addresses ''' -- cgit v1.2.3 From 5da9b1d1dc99ae5550ff91ed09035f9ff2bf9469 Mon Sep 17 00:00:00 2001 From: "Paul C. Buetow" Date: Fri, 16 May 2014 17:47:59 +0200 Subject: add vserver set vlans option --- src/fapi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fapi b/src/fapi index 67bccf6..55c0bcc 100755 --- a/src/fapi +++ b/src/fapi @@ -93,6 +93,7 @@ class FapiBase(object): ' 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]', + reset, 'The following partially needs admininstrator privileges on / and /Common', style + @@ -482,6 +483,13 @@ 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': + 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 ''' -- cgit v1.2.3 From b5a64c14f6ad75add778b79dd57b97a76db5b2be Mon Sep 17 00:00:00 2001 From: "Paul C. Buetow" Date: Fri, 16 May 2014 17:49:42 +0200 Subject: documentation --- docs/fapi.pod | 4 ++++ src/fapi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/fapi.pod b/docs/fapi.pod index e7a7bd1..21b9683 100644 --- a/docs/fapi.pod +++ b/docs/fapi.pod @@ -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 vlans 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 55c0bcc..5a8515c 100755 --- a/src/fapi +++ b/src/fapi @@ -93,7 +93,7 @@ class FapiBase(object): ' 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 vlans [list,of,vlans,to,allow]', + reset, 'The following partially needs admininstrator privileges on / and /Common', style + -- cgit v1.2.3 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 From 09f3a1dcea0233463a3d17546176c043151ed525 Mon Sep 17 00:00:00 2001 From: "Paul C. Buetow" Date: Fri, 16 May 2014 17:54:44 +0200 Subject: syntax fix --- .version | 2 +- README.pod | 6 +++++- debian/changelog | 8 ++++++++ docs/fapi.1 | 8 ++++++-- docs/fapi.txt | 6 +++++- docs/synopsis.txt | 51 --------------------------------------------------- src/fapi | 4 ++-- 7 files changed, 27 insertions(+), 58 deletions(-) diff --git a/.version b/.version index b616048..faef31a 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.6.2 +0.7.0 diff --git a/README.pod b/README.pod index 78f819e..b5cfa9b 100644 --- a/README.pod +++ b/README.pod @@ -46,7 +46,7 @@ L 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 Fri, 16 May 2014 17:52:31 +0200 + fapi (0.6.2) stable; urgency=low * Some more PEP8 diff --git a/docs/fapi.1 b/docs/fapi.1 index a5a8ec8..1dc317f 100644 --- a/docs/fapi.1 +++ b/docs/fapi.1 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "FAPI 1" -.TH FAPI 1 "2014-05-15" "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 Date: Fri, 16 May 2014 17:55:23 +0200 Subject: There will be big changes for you but you will be happy. --- debian/files | 2 +- docs/synopsis.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) 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/synopsis.txt b/docs/synopsis.txt index 4112cc6..054543f 100644 --- a/docs/synopsis.txt +++ b/docs/synopsis.txt @@ -22,3 +22,55 @@ optional arguments: -V Print program version -C C Config file + +Synopsis: + monitor + monitor NAME get desc|state + node + node NODENAME create|delete + node NODENAME get detail|status + pool + pool NAME add member MEMBER:PORT + pool NAME add monitor MONITOR + pool NAME create [LIST,OF,POOL,MEMBERS:PORT] + pool NAME delete + pool NAME del member MEMBER:PORT + pool NAME del monitors + pool NAME get detail|lbmethod|members|monitor|status + pool NAME set lbmethod LBMETHOD + vip + vip NAME create NETMASK + vip NAME get arp|detail|status|tgroup + vip NAME set arp enabled|disabled + vip NAME set tgroup TGROUP + vserver + vserver NAME create [protocol] [profile] [poolname] [mask] + vserver NAME delete + 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 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] + -f Common -b balancer.example.com selfip NAME delete + -f Common -b balancer.example.com selfip NAME get detail|tgroup + -f Common -b balancer.example.com selfip NAME set tgroup TGROUP + -f Common tgroup + -f Common tgroup NAME add ha_order DEVICE ORDER + -f Common tgroup NAME create + -f Common tgroup NAME delete + -f Common tgroup NAME get detail + -f Common tgroup NAME get ha_order + -f Common tgroup NAME remove all_ha_orders + -f Common tgroup NAME remove ha_order DEVICE ORDER + -f Common vlan + -f Common vlan NAME create tagged VLANID internal|external|... + -f Common vlan NAME delete + -f Common vlan NAME get detail + -f / folder + -f / folder NAME create|delete + -f / folder NAME get detail|dgroup|tgroup + -f / folder NAME set dgroup|tgroup DGROUP|TGROUP +Please consult the manpage for examples. -- cgit v1.2.3 From 28a0c82564ea2287e2c9a5a6efa158fe02a213c0 Mon Sep 17 00:00:00 2001 From: "Paul C. Buetow (lxpbuetow.webde.local)" Date: Fri, 16 May 2014 17:57:40 +0200 Subject: It were not best that we should all think alike; it is difference of opinion that makes horse-races. -- Mark Twain, "Pudd'nhead Wilson's Calendar" --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fcf76dd..48c371d 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ documentation: pod2text ./docs/$(NAME).pod > ./docs/$(NAME).txt cp ./docs/$(NAME).pod README.pod ./bin/fapi -h -n > ./docs/synopsis.txt -# Build a debian package (don't sign it, modify the arguments if you want to sign it) +# Build a debian package deb: all dpkg-buildpackage dch: -- cgit v1.2.3 From 2fd8de973452707d3e1d2d7ea5228e8914ca0d03 Mon Sep 17 00:00:00 2001 From: "Paul C. Buetow" Date: Fri, 16 May 2014 18:00:48 +0200 Subject: New release --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 48c371d..0bc6d71 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ documentation: ./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 -- cgit v1.2.3