summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--docs/extended-synopsis.txt28
-rwxr-xr-xsrc/fapi6
3 files changed, 5 insertions, 31 deletions
diff --git a/Makefile b/Makefile
index b8be7c4..1a5c360 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 -d -h -n > ./docs/synopsis.txt
- ./bin/fapi -d -h -n -E > ./docs/extended-synopsis.txt
+ ./bin/fapi -d -n -E > ./docs/extended-synopsis.txt || exit 0
# Build a debian package
deb: all
dpkg-buildpackage # -us -uc
diff --git a/docs/extended-synopsis.txt b/docs/extended-synopsis.txt
index ab1014b..8374b06 100644
--- a/docs/extended-synopsis.txt
+++ b/docs/extended-synopsis.txt
@@ -1,31 +1,3 @@
-usage: fapi [-a] [-b B] [-d] [-E] [-e E] [-f F] [-h] [-i] [-l] [-n] [-v] [-V]
- [-C C]
- [what] [name] [sub] [sub2] [sub3] [sub4] [sub5]
-
-positional arguments:
- what node|pool|monitor|vserver|...
- name The object name to operate on
- sub First sub command
- sub2 Second sub command
- sub3 Third sub command
- sub4 Fourth sub command
- sub5 Fith sub command
-
-optional arguments:
- -a Disables auto port in vserver name
- -b B Forces to use the secified loadbalancer (overwrites -e)
- -d Disable colorful output
- -E Show extended synopsis
- -e E Env to use, e.g. dev,qa,live
- -f F Overwrite partition/folder from fapi.conf
- -h Print this help
- -i Interactive shell
- -l Use list output
- -n No-op (don't do actual stuff)
- -v Verbose
- -V Print program version
- -C C Config file
-
Extended synopsis.
The following partially needs admininstrator privileges on / and /Common:
diff --git a/src/fapi b/src/fapi
index cbe7eac..89283e1 100755
--- a/src/fapi
+++ b/src/fapi
@@ -96,7 +96,7 @@ class FapiBase(object):
' vserver',
' vserver NAME create [protocol] [profile] [poolname] [mask]',
' vserver NAME delete',
- ' vserver NAME get brief|detail|status|vlan|profile|rule',
+ ' vserver NAME get brief|detail|status|vlan|persistence|profile|rule',
' vserver NAME set nat|pat disabled|enabled',
' vserver NAME set pool POOLNAME',
' vserver NAME set snat automap|none',
@@ -156,7 +156,7 @@ class ArgumentParser(FapiBase):
help='Forces to use the secified loadbalancer (overwrites -e)')
parser.add_argument('-d', action='store_true', help='Disable colorful output')
parser.add_argument('-E', action='store_true', help='Show extended synopsis')
- parser.add_argument('-e', action='store', help='Env to use, e.g. dev,qa,live',
+ parser.add_argument('-e', action='store', help='Environment to use, e.g. dev,qa,live',
default='qa')
parser.add_argument('-f', action='store', help='Overwrite partition/folder from fapi.conf')
parser.add_argument('-h', action='store_true', help='Print this help')
@@ -484,6 +484,8 @@ class Fapi(FapiBase):
return lambda: brief(f5)
elif a.sub2 == 'status':
return lambda: f5().get_object_status([name])
+ elif a.sub2 == 'persistence':
+ return lambda: f5().get_persistence_profile([name])
elif a.sub2 == 'vlan':
return lambda: f5().get_vlan([name])
elif a.sub2 == 'profile':